/[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 4599 - (hide annotations) (download)
Wed May 11 23:10:19 2005 UTC (14 years, 8 months ago) by derek
Original Path: main/sip/resiprocate/dum/test/UserAgent.hxx
File size: 5249 byte(s)
set svn:eol-style to LF
1 jason 4076 #if !defined(DUM_UserAgent_hxx)
2     #define DUM_UserAgent_hxx
3    
4     #include "CommandLineParser.hxx"
5    
6 jason 4383 #include "resiprocate/StackThread.hxx"
7 jason 4076 #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 jason 4383 public InviteSessionHandler
24 jason 4076 {
25     public:
26     UserAgent(int argc, char** argv);
27     virtual ~UserAgent();
28    
29 jason 4078 void startup();
30     void shutdown();
31    
32 jason 4076 void process();
33    
34     public:
35     // Invite Session Handler /////////////////////////////////////////////////////
36     virtual void onNewSession(ClientInviteSessionHandle h, InviteSession::OfferAnswerType oat, const SipMessage& msg);
37     virtual void onNewSession(ServerInviteSessionHandle h, InviteSession::OfferAnswerType oat, const SipMessage& msg);
38     virtual void onFailure(ClientInviteSessionHandle h, const SipMessage& msg);
39     virtual void onEarlyMedia(ClientInviteSessionHandle, const SipMessage&, const SdpContents&);
40     virtual void onProvisional(ClientInviteSessionHandle, const SipMessage& msg);
41     virtual void onConnected(ClientInviteSessionHandle h, const SipMessage& msg);
42     virtual void onConnected(InviteSessionHandle, const SipMessage& msg);
43     virtual void onStaleCallTimeout(ClientInviteSessionHandle);
44     virtual void onTerminated(InviteSessionHandle h, InviteSessionHandler::TerminatedReason reason, const SipMessage* msg);
45     virtual void onRedirected(ClientInviteSessionHandle, const SipMessage& msg);
46     virtual void onAnswer(InviteSessionHandle, const SipMessage& msg, const SdpContents&);
47     virtual void onOffer(InviteSessionHandle handle, const SipMessage& msg, const SdpContents& offer);
48     virtual void onOfferRequired(InviteSessionHandle, const SipMessage& msg);
49     virtual void onOfferRejected(InviteSessionHandle, const SipMessage& msg);
50     virtual void onDialogModified(InviteSessionHandle, InviteSession::OfferAnswerType oat, const SipMessage& msg);
51     virtual void onInfo(InviteSessionHandle, const SipMessage& msg);
52     virtual void onInfoSuccess(InviteSessionHandle, const SipMessage& msg);
53     virtual void onInfoFailure(InviteSessionHandle, const SipMessage& msg);
54     virtual void onRefer(InviteSessionHandle, ServerSubscriptionHandle, const SipMessage& msg);
55     virtual void onReferAccepted(InviteSessionHandle, ClientSubscriptionHandle, const SipMessage& msg);
56     virtual void onReferRejected(InviteSessionHandle, const SipMessage& msg);
57    
58     // Registration Handler ////////////////////////////////////////////////////////
59     virtual void onSuccess(ClientRegistrationHandle h, const SipMessage& response);
60     virtual void onFailure(ClientRegistrationHandle h, const SipMessage& response);
61     virtual void onRemoved(ClientRegistrationHandle h);
62     virtual int onRequestRetry(ClientRegistrationHandle h, int retryMinimum, const SipMessage& msg);
63    
64     // ClientSubscriptionHandler ///////////////////////////////////////////////////
65     virtual void onRefreshRejected(ClientSubscriptionHandle h, const SipMessage& rejection);
66     virtual void onUpdatePending(ClientSubscriptionHandle h, const SipMessage& notify);
67     virtual void onUpdateActive(ClientSubscriptionHandle h, const SipMessage& notify);
68     virtual void onUpdateExtension(ClientSubscriptionHandle, const SipMessage& notify);
69     virtual void onTerminated(ClientSubscriptionHandle h, const SipMessage& notify);
70     virtual void onNewSubscription(ClientSubscriptionHandle h, const SipMessage& notify);
71     virtual int onRequestRetry(ClientSubscriptionHandle h, int retryMinimum, const SipMessage& notify);
72    
73     // ClientPublicationHandler ////////////////////////////////////////////////////
74     virtual void onSuccess(ClientPublicationHandle h, const SipMessage& status);
75     virtual void onRemove(ClientPublicationHandle h, const SipMessage& status);
76     virtual void onFailure(ClientPublicationHandle h, const SipMessage& response);
77     virtual int onRequestRetry(ClientPublicationHandle h, int retryMinimum, const SipMessage& response);
78    
79     // OutOfDialogHandler //////////////////////////////////////////////////////////
80     virtual void onSuccess(ClientOutOfDialogReqHandle, const SipMessage& response);
81     virtual void onFailure(ClientOutOfDialogReqHandle, const SipMessage& response);
82     virtual void onReceivedRequest(ServerOutOfDialogReqHandle, const SipMessage& request);
83     virtual void onForkDestroyed(ClientInviteSessionHandle);
84    
85     protected:
86     void addTransport(TransportType type, int port);
87    
88     private:
89     MasterProfile mProfile;
90 jason 4383 Security* mSecurity;
91     SipStack mStack;
92 jason 4076 DialogUsageManager mDum;
93 jason 4383 StackThread mStackThread;
94 jason 4076 };
95    
96     }
97    
98     #endif

Properties

Name Value
svn:eol-style LF

webmaster AT resiprocate DOT org
ViewVC Help
Powered by ViewVC 1.1.27