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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3079 - (show annotations) (download)
Thu Jul 8 21:44:19 2004 UTC (15 years, 5 months ago) by derek
Original Path: main/sip/resiprocate/dum/SubscriptionHandler.hxx
File size: 1962 byte(s)
added postMS to DUM
graceful shutdown for DUM
transaction error fixes.

1 #if !defined(RESIP_SUBSCRIPTIONHANDLER_HXX)
2 #define RESIP_SUBSCRIPTIONHANDLER_HXX
3
4 #include "resiprocate/dum/Handles.hxx"
5
6 namespace resip
7 {
8 class SipMessage;
9
10 class ClientSubscriptionHandler
11 {
12 public:
13 virtual void onRefreshRejected(ClientSubscriptionHandle, const SipMessage& rejection)=0;
14 virtual void onUpdatePending(ClientSubscriptionHandle, const SipMessage& notify)=0;
15 virtual void onUpdateActive(ClientSubscriptionHandle, const SipMessage& notify)=0;
16 //unknown Subscription-State value
17 virtual void onUpdateExtension(ClientSubscriptionHandle, const SipMessage& notify)=0;
18
19 //subscription can be ended through a notify or a failure response.
20 virtual void onTerminated(ClientSubscriptionHandle, const SipMessage& msg)=0;
21 //not sure if this has any value.
22 virtual void onNewSubscription(ClientSubscriptionHandle, const SipMessage& response)=0;
23 };
24
25 class ServerSubscriptionHandler
26 {
27 public:
28 virtual void onNewSubscription(ServerSubscriptionHandle, const SipMessage& sub)=0;
29 virtual void onRefresh(ServerSubscriptionHandle, const SipMessage& sub)=0;
30
31 //called when this usage is destroyed for any reason. One of the following
32 //three methods will always be called before this, but this is the only
33 //method that MUST be implemented by a handler
34 virtual void onTerminated(ServerSubscriptionHandle)=0;
35
36 //will be called when a NOTIFY is not delivered
37 virtual void onError(ServerSubscriptionHandle, const SipMessage& msg);
38
39 //app can synchronously decorate terminating NOTIFY messages. The only
40 //graceful termination mechanism is expiration, but the client can
41 //explicity end a subscription with an Expires header of 0.
42 virtual void onExpiredByClient(ServerSubscriptionHandle, const SipMessage& sub, SipMessage& notify);
43 virtual void onExpired(ServerSubscriptionHandle, SipMessage& notify);
44 };
45
46 }
47
48 #endif

webmaster AT resiprocate DOT org
ViewVC Help
Powered by ViewVC 1.1.27