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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4768 - (show annotations) (download)
Fri May 27 20:32:01 2005 UTC (14 years, 8 months ago) by greg
Original Path: main/sip/resiprocate/dum/SubscriptionHandler.hxx
File size: 5241 byte(s)
Add virtual destructors to classes with virtual methods; for gcc 4.0

1 #if !defined(RESIP_SUBSCRIPTIONHANDLER_HXX)
2 #define RESIP_SUBSCRIPTIONHANDLER_HXX
3
4 #include "resiprocate/dum/Handles.hxx"
5 #include "resiprocate/Mime.hxx"
6
7 namespace resip
8 {
9 class SipMessage;
10 class SecurityAttributes;
11
12 class ClientSubscriptionHandler
13 {
14 public:
15 virtual ~ClientSubscriptionHandler() { }
16
17 virtual void onRefreshRejected(ClientSubscriptionHandle, const SipMessage& rejection)=0;
18
19 //Client must call acceptUpdate or rejectUpdate for any onUpdateFoo
20 virtual void onUpdatePending(ClientSubscriptionHandle, const SipMessage& notify)=0;
21 virtual void onUpdateActive(ClientSubscriptionHandle, const SipMessage& notify)=0;
22 //unknown Subscription-State value
23 virtual void onUpdateExtension(ClientSubscriptionHandle, const SipMessage& notify)=0;
24
25 virtual int onRequestRetry(ClientSubscriptionHandle, int retrySeconds, const SipMessage& notify)=0;
26
27 //subscription can be ended through a notify or a failure response.
28 virtual void onTerminated(ClientSubscriptionHandle, const SipMessage& msg)=0;
29 //not sure if this has any value.
30 virtual void onNewSubscription(ClientSubscriptionHandle, const SipMessage& notify)=0;
31 };
32
33 class ServerSubscriptionHandler
34 {
35 public:
36 virtual ~ServerSubscriptionHandler() {}
37
38 virtual void onNewSubscription(ServerSubscriptionHandle, const SipMessage& sub)=0;
39 virtual void onRefresh(ServerSubscriptionHandle, const SipMessage& sub);
40 virtual void onPublished(ServerSubscriptionHandle associated,
41 ServerPublicationHandle publication,
42 const Contents* contents,
43 const SecurityAttributes* attrs);
44
45 virtual void onNotifyRejected(ServerSubscriptionHandle, const SipMessage& msg);
46
47 //called when this usage is destroyed for any reason. One of the following
48 //three methods will always be called before this, but this is the only
49 //method that MUST be implemented by a handler
50 virtual void onTerminated(ServerSubscriptionHandle)=0;
51
52 //will be called when a NOTIFY is not delivered(with a usage terminating
53 //statusCode), or the Dialog is destroyed
54 virtual void onError(ServerSubscriptionHandle, const SipMessage& msg);
55
56 //app can synchronously decorate terminating NOTIFY messages. The only
57 //graceful termination mechanism is expiration, but the client can
58 //explicity end a subscription with an Expires header of 0.
59 virtual void onExpiredByClient(ServerSubscriptionHandle, const SipMessage& sub, SipMessage& notify);
60 virtual void onExpired(ServerSubscriptionHandle, SipMessage& notify);
61
62 virtual bool hasDefaultExpires() const;
63 virtual int getDefaultExpires() const;
64
65 const Mimes& getSupportedMimeTypes() const;
66 };
67
68 }
69
70 #endif
71
72 /* ====================================================================
73 * The Vovida Software License, Version 1.0
74 *
75 * Copyright (c) 2000 Vovida Networks, Inc. All rights reserved.
76 *
77 * Redistribution and use in source and binary forms, with or without
78 * modification, are permitted provided that the following conditions
79 * are met:
80 *
81 * 1. Redistributions of source code must retain the above copyright
82 * notice, this list of conditions and the following disclaimer.
83 *
84 * 2. Redistributions in binary form must reproduce the above copyright
85 * notice, this list of conditions and the following disclaimer in
86 * the documentation and/or other materials provided with the
87 * distribution.
88 *
89 * 3. The names "VOCAL", "Vovida Open Communication Application Library",
90 * and "Vovida Open Communication Application Library (VOCAL)" must
91 * not be used to endorse or promote products derived from this
92 * software without prior written permission. For written
93 * permission, please contact vocal@vovida.org.
94 *
95 * 4. Products derived from this software may not be called "VOCAL", nor
96 * may "VOCAL" appear in their name, without prior written
97 * permission of Vovida Networks, Inc.
98 *
99 * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
100 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
101 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
102 * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL VOVIDA
103 * NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES
104 * IN EXCESS OF $1,000, NOR FOR ANY INDIRECT, INCIDENTAL, SPECIAL,
105 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
106 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
107 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
108 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
109 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
110 * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
111 * DAMAGE.
112 *
113 * ====================================================================
114 *
115 * This software consists of voluntary contributions made by Vovida
116 * Networks, Inc. and many individuals on behalf of Vovida Networks,
117 * Inc. For more information on Vovida Networks, Inc., please see
118 * <http://www.vovida.org/>.
119 *
120 */

Properties

Name Value
svn:eol-style LF

webmaster AT resiprocate DOT org
ViewVC Help
Powered by ViewVC 1.1.27