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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 9322 - (show annotations) (download)
Mon Jan 9 21:17:30 2012 UTC (7 years, 10 months ago) by fjoanis
File MIME type: text/plain
File size: 4874 byte(s)
Fixed compilation problem on gcc 4.4.6 (CentOS Linux 6.2). Also tested on Visual Studio 9 2008.
1 #if !defined(RESIP_APPDIALOGSET_HXX)
2 #define RESIP_APPDIALOGSET_HXX
3
4 #include "resip/dum/Handles.hxx"
5 #include "resip/dum/Handled.hxx"
6 #include "resip/dum/DialogSet.hxx"
7 #include "resip/dum/DialogSetId.hxx"
8 #include "resip/dum/UserProfile.hxx"
9 #include "resip/dum/DumCommand.hxx"
10
11 namespace resip
12 {
13
14 class SipMessage;
15 class DialogUsageManager;
16
17 class AppDialogSet : public Handled
18 {
19 public:
20
21 // by default, dum calls the destructor. application can override this if it
22 // wants to manage memory on its own.
23 virtual void destroy();
24
25 virtual void end();
26
27 // Asynchronously calls end() through a DUM command
28 virtual void endCommand();
29
30 virtual SharedPtr<UserProfile> getUserProfile();
31
32 virtual AppDialog* createAppDialog(const SipMessage&);
33
34 AppDialogSetHandle getHandle();
35 DialogSetId getDialogSetId();
36
37 virtual const Data getClassName();
38
39 virtual EncodeStream& dump(EncodeStream& strm) const;
40
41 protected:
42
43 class AppDialogSetEndCommand : public DumCommandAdapter
44 {
45 public:
46 AppDialogSetEndCommand(const AppDialogSetHandle& dialogSet)
47 : mAppDialogSet(dialogSet)
48 {
49 }
50
51 virtual void executeCommand()
52 {
53 if(mAppDialogSet.isValid())
54 {
55 mAppDialogSet->end();
56 }
57 }
58
59 virtual EncodeStream& encodeBrief(EncodeStream& strm) const
60 {
61 return strm << "AppDialogSetEndCommand";
62 }
63 private:
64 AppDialogSetHandle mAppDialogSet;
65 };
66
67 AppDialogSet(DialogUsageManager& dum);
68
69 DialogUsageManager& mDum;
70 virtual ~AppDialogSet();
71 // This is called by the DialogUsageManager to select an userProfile to assign to a UAS DialogSet.
72 // The application should not call this directly, but should override it, in order to assign
73 // an userProfile other than the MasterProfile
74 virtual SharedPtr<UserProfile> selectUASUserProfile(const SipMessage&);
75
76 private:
77 /// Prepare for association with a different dialog set id. Need this
78 /// when the initial message changes (408/Retry-After) but the application
79 /// doesn't want to know.
80 AppDialogSet* reuse();
81 bool isReUsed() const;
82
83 friend class DialogUsageManager;
84 friend class AppDialogSetFactory;
85 friend class ClientSubscription;
86
87 DialogSet* mDialogSet;
88 bool mIsReUsed;
89 };
90
91 }
92
93 #endif
94
95 /* ====================================================================
96 * The Vovida Software License, Version 1.0
97 *
98 * Copyright (c) 2000 Vovida Networks, Inc. All rights reserved.
99 *
100 * Redistribution and use in source and binary forms, with or without
101 * modification, are permitted provided that the following conditions
102 * are met:
103 *
104 * 1. Redistributions of source code must retain the above copyright
105 * notice, this list of conditions and the following disclaimer.
106 *
107 * 2. Redistributions in binary form must reproduce the above copyright
108 * notice, this list of conditions and the following disclaimer in
109 * the documentation and/or other materials provided with the
110 * distribution.
111 *
112 * 3. The names "VOCAL", "Vovida Open Communication Application Library",
113 * and "Vovida Open Communication Application Library (VOCAL)" must
114 * not be used to endorse or promote products derived from this
115 * software without prior written permission. For written
116 * permission, please contact vocal@vovida.org.
117 *
118 * 4. Products derived from this software may not be called "VOCAL", nor
119 * may "VOCAL" appear in their name, without prior written
120 * permission of Vovida Networks, Inc.
121 *
122 * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
123 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
124 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
125 * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL VOVIDA
126 * NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES
127 * IN EXCESS OF $1,000, NOR FOR ANY INDIRECT, INCIDENTAL, SPECIAL,
128 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
129 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
130 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
131 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
132 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
133 * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
134 * DAMAGE.
135 *
136 * ====================================================================
137 *
138 * This software consists of voluntary contributions made by Vovida
139 * Networks, Inc. and many individuals on behalf of Vovida Networks,
140 * Inc. For more information on Vovida Networks, Inc., please see
141 * <http://www.vovida.org/>.
142 *
143 */

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