/[resiprocate]/main/resip/dum/test/UserAgent.hxx
ViewVC logotype

Annotation of /main/resip/dum/test/UserAgent.hxx

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4076 - (hide annotations) (download)
Wed Mar 30 07:54:54 2005 UTC (14 years, 9 months ago) by jason
Original Path: main/sip/resiprocate/dum/test/UserAgent.hxx
File size: 5244 byte(s)
added skeleton of a dum-based version of limpc

1 jason 4076 #if !defined(DUM_UserAgent_hxx)
2     #define DUM_UserAgent_hxx
3    
4     #include "CommandLineParser.hxx"
5    
6     #include "resiprocate/os/ThreadIf.hxx"
7     #include "resiprocate/dum/MasterProfile.hxx"
8     #include "resiprocate/dum/RegistrationHandler.hxx"
9     #include "resiprocate/dum/SubscriptionHandler.hxx"
10     #include "resiprocate/dum/PublicationHandler.hxx"
11     #include "resiprocate/dum/OutOfDialogHandler.hxx"
12     #include "resiprocate/dum/InviteSessionHandler.hxx"
13     #include "resiprocate/dum/DialogUsageManager.hxx"
14    
15     namespace resip
16     {
17    
18     class UserAgent : public CommandLineParser,
19     public ClientRegistrationHandler,
20     public ClientSubscriptionHandler,
21     public ClientPublicationHandler,
22     public OutOfDialogHandler,
23     public InviteSessionHandler,
24     public ThreadIf
25     {
26     public:
27     UserAgent(int argc, char** argv);
28     virtual ~UserAgent();
29    
30     void startRegistering();
31     virtual void thread();
32     void process();
33    
34    
35     public:
36     // Invite Session Handler /////////////////////////////////////////////////////
37     virtual void onNewSession(ClientInviteSessionHandle h, InviteSession::OfferAnswerType oat, const SipMessage& msg);
38     virtual void onNewSession(ServerInviteSessionHandle h, InviteSession::OfferAnswerType oat, const SipMessage& msg);
39     virtual void onFailure(ClientInviteSessionHandle h, const SipMessage& msg);
40     virtual void onEarlyMedia(ClientInviteSessionHandle, const SipMessage&, const SdpContents&);
41     virtual void onProvisional(ClientInviteSessionHandle, const SipMessage& msg);
42     virtual void onConnected(ClientInviteSessionHandle h, const SipMessage& msg);
43     virtual void onConnected(InviteSessionHandle, const SipMessage& msg);
44     virtual void onStaleCallTimeout(ClientInviteSessionHandle);
45     virtual void onTerminated(InviteSessionHandle h, InviteSessionHandler::TerminatedReason reason, const SipMessage* msg);
46     virtual void onRedirected(ClientInviteSessionHandle, const SipMessage& msg);
47     virtual void onAnswer(InviteSessionHandle, const SipMessage& msg, const SdpContents&);
48     virtual void onOffer(InviteSessionHandle handle, const SipMessage& msg, const SdpContents& offer);
49     virtual void onOfferRequired(InviteSessionHandle, const SipMessage& msg);
50     virtual void onOfferRejected(InviteSessionHandle, const SipMessage& msg);
51     virtual void onDialogModified(InviteSessionHandle, InviteSession::OfferAnswerType oat, const SipMessage& msg);
52     virtual void onInfo(InviteSessionHandle, const SipMessage& msg);
53     virtual void onInfoSuccess(InviteSessionHandle, const SipMessage& msg);
54     virtual void onInfoFailure(InviteSessionHandle, const SipMessage& msg);
55     virtual void onRefer(InviteSessionHandle, ServerSubscriptionHandle, const SipMessage& msg);
56     virtual void onReferAccepted(InviteSessionHandle, ClientSubscriptionHandle, const SipMessage& msg);
57     virtual void onReferRejected(InviteSessionHandle, const SipMessage& msg);
58    
59     // Registration Handler ////////////////////////////////////////////////////////
60     virtual void onSuccess(ClientRegistrationHandle h, const SipMessage& response);
61     virtual void onFailure(ClientRegistrationHandle h, const SipMessage& response);
62     virtual void onRemoved(ClientRegistrationHandle h);
63     virtual int onRequestRetry(ClientRegistrationHandle h, int retryMinimum, const SipMessage& msg);
64    
65     // ClientSubscriptionHandler ///////////////////////////////////////////////////
66     virtual void onRefreshRejected(ClientSubscriptionHandle h, const SipMessage& rejection);
67     virtual void onUpdatePending(ClientSubscriptionHandle h, const SipMessage& notify);
68     virtual void onUpdateActive(ClientSubscriptionHandle h, const SipMessage& notify);
69     virtual void onUpdateExtension(ClientSubscriptionHandle, const SipMessage& notify);
70     virtual void onTerminated(ClientSubscriptionHandle h, const SipMessage& notify);
71     virtual void onNewSubscription(ClientSubscriptionHandle h, const SipMessage& notify);
72     virtual int onRequestRetry(ClientSubscriptionHandle h, int retryMinimum, const SipMessage& notify);
73    
74     // ClientPublicationHandler ////////////////////////////////////////////////////
75     virtual void onSuccess(ClientPublicationHandle h, const SipMessage& status);
76     virtual void onRemove(ClientPublicationHandle h, const SipMessage& status);
77     virtual void onFailure(ClientPublicationHandle h, const SipMessage& response);
78     virtual int onRequestRetry(ClientPublicationHandle h, int retryMinimum, const SipMessage& response);
79    
80     // OutOfDialogHandler //////////////////////////////////////////////////////////
81     virtual void onSuccess(ClientOutOfDialogReqHandle, const SipMessage& response);
82     virtual void onFailure(ClientOutOfDialogReqHandle, const SipMessage& response);
83     virtual void onReceivedRequest(ServerOutOfDialogReqHandle, const SipMessage& request);
84     virtual void onForkDestroyed(ClientInviteSessionHandle);
85    
86     protected:
87     void addTransport(TransportType type, int port);
88    
89     private:
90     Security* mSecurity;
91     MasterProfile mProfile;
92     DialogUsageManager mDum;
93     };
94    
95     }
96    
97     #endif

webmaster AT resiprocate DOT org
ViewVC Help
Powered by ViewVC 1.1.27