reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
AppDialogSet.cxx
Go to the documentation of this file.
6
7using namespace resip;
8
10 Handled(dum),
11 mDum(dum),
12 mDialogSet(0),
13 mIsReUsed(false)
14{}
15
18
24
25void
27{
28 delete this;
29}
30
31void
33{
34 if (mDialogSet)
35 {
36 mDialogSet->end();
37 }
38}
39
40void
41AppDialogSet::end(const Data& reason)
42{
43 if (mDialogSet)
44 {
45 mDialogSet->end(reason);
46 }
47}
48
49void
51{
52 if (mDialogSet)
53 {
54 mDialogSet->end(endReasons);
55 }
56}
57
58void
64
65void
67{
69 mDum.post(new AppDialogSetEndCommand(handle, reason));
70}
71
72void
74{
76 mDum.post(new AppDialogSetEndCommand(handle, Data::Empty, endReasons));
77}
78
79std::shared_ptr<UserProfile>
81{
82 // Default is Master Profile - override this method to select a different userProfile for UAS DialogSets
84}
85
86std::shared_ptr<UserProfile>
88{
89 return mDialogSet ? mDialogSet->getUserProfile() : nullptr;
90}
91
97
100{
101 if (mDialogSet)
102 {
103 return mDialogSet->getId();
104 }
105 else
106 {
108 }
109}
110
112AppDialogSet::reuse()
113{
114 resip_assert(mDialogSet);
115 mDialogSet->appDissociate();
116 mDialogSet = 0;
117
118 mIsReUsed = true;
119 return this;
120}
121
122bool
123AppDialogSet::isReUsed() const
124{
125 return mIsReUsed;
126}
127
128const Data
130{
131 return "AppDialogSet";
132}
133
135AppDialogSet::dump(EncodeStream& strm) const
136{
137 strm << "AppDialogSet " << mId;
138 return strm;
139}
140
141/* ====================================================================
142 * The Vovida Software License, Version 1.0
143 *
144 * Copyright (c) 2000 Vovida Networks, Inc. All rights reserved.
145 *
146 * Redistribution and use in source and binary forms, with or without
147 * modification, are permitted provided that the following conditions
148 * are met:
149 *
150 * 1. Redistributions of source code must retain the above copyright
151 * notice, this list of conditions and the following disclaimer.
152 *
153 * 2. Redistributions in binary form must reproduce the above copyright
154 * notice, this list of conditions and the following disclaimer in
155 * the documentation and/or other materials provided with the
156 * distribution.
157 *
158 * 3. The names "VOCAL", "Vovida Open Communication Application Library",
159 * and "Vovida Open Communication Application Library (VOCAL)" must
160 * not be used to endorse or promote products derived from this
161 * software without prior written permission. For written
162 * permission, please contact vocal@vovida.org.
163 *
164 * 4. Products derived from this software may not be called "VOCAL", nor
165 * may "VOCAL" appear in their name, without prior written
166 * permission of Vovida Networks, Inc.
167 *
168 * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
169 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
170 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
171 * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL VOVIDA
172 * NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES
173 * IN EXCESS OF $1,000, NOR FOR ANY INDIRECT, INCIDENTAL, SPECIAL,
174 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
175 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
176 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
177 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
178 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
179 * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
180 * DAMAGE.
181 *
182 * ====================================================================
183 *
184 * This software consists of voluntary contributions made by Vovida
185 * Networks, Inc. and many individuals on behalf of Vovida Networks,
186 * Inc. For more information on Vovida Networks, Inc., please see
187 * <http://www.vovida.org/>.
188 *
189 */
#define resip_assert(x)
This file needs to work for both C and C++ code.
AppDialogSet(DialogUsageManager &dum)
virtual void end()
DialogUsageManager & mDum
virtual void destroy()
virtual AppDialog * createAppDialog(const SipMessage &)
AppDialogSetHandle getHandle()
virtual std::shared_ptr< UserProfile > getUserProfile()
virtual void endCommand()
DialogSetId getDialogSetId()
virtual const Data getClassName()
virtual EncodeStream & dump(EncodeStream &strm) const
virtual std::shared_ptr< UserProfile > selectUASUserProfile(const SipMessage &)
An alternative to std::string, encapsulates an arbitrary buffer of bytes.
Definition Data.hxx:90
static const Data Empty
Constant that represents a zero-length data.
Definition Data.hxx:882
void end(const Data &endReason)
std::shared_ptr< UserProfile > getUserProfile() const
DialogSetId getId() const
std::shared_ptr< UserProfile > & getMasterUserProfile()
Handled::Id mId
Definition Handled.hxx:25
HandleManager & mHam
Definition Handled.hxx:24
Container class for ParserCategory, used by SipMessage to represent multi-valued headers (Contact,...
Represents a SIP message.
void post(Message *msg)
Posts a Message to this TransactionUser's fifo.
dcm! – add UnusedChecking(_enum) below;
Handle< AppDialogSet > AppDialogSetHandle
Definition Handles.hxx:27
#define EncodeStream