/[resiprocate]/main/resip/dum/AppDialogSet.cxx
ViewVC logotype

Contents of /main/resip/dum/AppDialogSet.cxx

Parent Directory Parent Directory | Revision Log Revision Log


Revision 9288 - (show annotations) (download)
Wed Sep 28 19:09:33 2011 UTC (8 years, 1 month ago) by sgodin
File MIME type: text/plain
File size: 4214 byte(s)
-fix compiler error on g++ 4.5.2
1 #include "resip/dum/AppDialogSet.hxx"
2 #include "resip/dum/AppDialog.hxx"
3 #include "resip/dum/DialogUsageManager.hxx"
4 #include "resip/dum/MasterProfile.hxx"
5 #include "rutil/WinLeakCheck.hxx"
6
7 using namespace resip;
8
9 AppDialogSet::AppDialogSet(DialogUsageManager& dum) :
10 Handled(dum),
11 mDum(dum),
12 mDialogSet(0),
13 mIsReUsed(false)
14 {}
15
16 AppDialogSet::~AppDialogSet()
17 {}
18
19 AppDialogSetHandle
20 AppDialogSet::getHandle()
21 {
22 return AppDialogSetHandle(mHam, mId);
23 }
24
25 void
26 AppDialogSet::destroy()
27 {
28 delete this;
29 }
30
31 void
32 AppDialogSet::end()
33 {
34 if (mDialogSet)
35 {
36 mDialogSet->end();
37 }
38 }
39
40 void
41 AppDialogSet::endCommand()
42 {
43 AppDialogSetHandle handle = getHandle();
44 mDum.post(new AppDialogSetEndCommand(handle));
45 }
46
47 SharedPtr<UserProfile>
48 AppDialogSet::selectUASUserProfile(const SipMessage&)
49 {
50 // Default is Master Profile - override this method to select a different userProfile for UAS DialogSets
51 return mDum.getMasterUserProfile();
52 }
53
54 SharedPtr<UserProfile>
55 AppDialogSet::getUserProfile()
56 {
57 if(mDialogSet)
58 {
59 return mDialogSet->getUserProfile();
60 }
61 else
62 {
63 return SharedPtr<UserProfile>();
64 }
65 }
66
67 AppDialog*
68 AppDialogSet::createAppDialog(const SipMessage&)
69 {
70 return new AppDialog(mDum);
71 }
72
73 DialogSetId
74 AppDialogSet::getDialogSetId()
75 {
76 if (mDialogSet)
77 {
78 return mDialogSet->getId();
79 }
80 else
81 {
82 return DialogSetId(Data::Empty, Data::Empty);
83 }
84 }
85
86 AppDialogSet*
87 AppDialogSet::reuse()
88 {
89 assert(mDialogSet);
90 mDialogSet->appDissociate();
91 mDialogSet = 0;
92
93 mIsReUsed = true;
94 return this;
95 }
96
97 bool
98 AppDialogSet::isReUsed() const
99 {
100 return mIsReUsed;
101 }
102
103 const Data
104 AppDialogSet::getClassName()
105 {
106 return "AppDialogSet";
107 }
108
109 EncodeStream&
110 AppDialogSet::dump(EncodeStream& strm) const
111 {
112 strm << "AppDialogSet " << mId;
113 return strm;
114 }
115
116 /* ====================================================================
117 * The Vovida Software License, Version 1.0
118 *
119 * Copyright (c) 2000 Vovida Networks, Inc. All rights reserved.
120 *
121 * Redistribution and use in source and binary forms, with or without
122 * modification, are permitted provided that the following conditions
123 * are met:
124 *
125 * 1. Redistributions of source code must retain the above copyright
126 * notice, this list of conditions and the following disclaimer.
127 *
128 * 2. Redistributions in binary form must reproduce the above copyright
129 * notice, this list of conditions and the following disclaimer in
130 * the documentation and/or other materials provided with the
131 * distribution.
132 *
133 * 3. The names "VOCAL", "Vovida Open Communication Application Library",
134 * and "Vovida Open Communication Application Library (VOCAL)" must
135 * not be used to endorse or promote products derived from this
136 * software without prior written permission. For written
137 * permission, please contact vocal@vovida.org.
138 *
139 * 4. Products derived from this software may not be called "VOCAL", nor
140 * may "VOCAL" appear in their name, without prior written
141 * permission of Vovida Networks, Inc.
142 *
143 * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
144 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
145 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
146 * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL VOVIDA
147 * NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES
148 * IN EXCESS OF $1,000, NOR FOR ANY INDIRECT, INCIDENTAL, SPECIAL,
149 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
150 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
151 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
152 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
153 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
154 * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
155 * DAMAGE.
156 *
157 * ====================================================================
158 *
159 * This software consists of voluntary contributions made by Vovida
160 * Networks, Inc. and many individuals on behalf of Vovida Networks,
161 * Inc. For more information on Vovida Networks, Inc., please see
162 * <http://www.vovida.org/>.
163 *
164 */

Properties

Name Value
svn:eol-style native
svn:mime-type text/plain

webmaster AT resiprocate DOT org
ViewVC Help
Powered by ViewVC 1.1.27