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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3433 - (hide annotations) (download)
Tue Nov 2 18:02:55 2004 UTC (15 years, 1 month ago) by jason
Original Path: main/sip/resiprocate/dum/SubscriptionHandler.hxx
File size: 1960 byte(s)
reverting RESIP_ change to version 3429
1 jason 2727 #if !defined(RESIP_SUBSCRIPTIONHANDLER_HXX)
2     #define RESIP_SUBSCRIPTIONHANDLER_HXX
3    
4 jason 2941 #include "resiprocate/dum/Handles.hxx"
5 jason 2727
6     namespace resip
7     {
8     class SipMessage;
9    
10     class ClientSubscriptionHandler
11     {
12     public:
13 derek 3058 virtual void onRefreshRejected(ClientSubscriptionHandle, const SipMessage& rejection)=0;
14     virtual void onUpdatePending(ClientSubscriptionHandle, const SipMessage& notify)=0;
15 derek 3067 virtual void onUpdateActive(ClientSubscriptionHandle, const SipMessage& notify)=0;
16     //unknown Subscription-State value
17 derek 3079 virtual void onUpdateExtension(ClientSubscriptionHandle, const SipMessage& notify)=0;
18 derek 3066
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 derek 3082 virtual void onNewSubscription(ClientSubscriptionHandle, const SipMessage& notify)=0;
23 jason 2727 };
24    
25     class ServerSubscriptionHandler
26     {
27 derek 3067 public:
28 derek 3058 virtual void onNewSubscription(ServerSubscriptionHandle, const SipMessage& sub)=0;
29     virtual void onRefresh(ServerSubscriptionHandle, const SipMessage& sub)=0;
30 derek 3066
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 jason 3433 //will be called when a NOTIFY is not delivered
37 derek 3067 virtual void onError(ServerSubscriptionHandle, const SipMessage& msg);
38 derek 3066
39 jason 3433 //app can synchronously decorate terminating NOTIFY messages. The only
40 derek 3066 //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 jason 2727 };
45    
46     }
47    
48 derek 3058 #endif

webmaster AT resiprocate DOT org
ViewVC Help
Powered by ViewVC 1.1.27