sipXcallLib home page


SipXMessageObserver.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2006-2012 SIPez LLC. All rights reserved.
3 //
4 // Copyright (C) 2004-2006 SIPfoundry Inc.
5 // Licensed by SIPfoundry under the LGPL license.
6 //
7 // Copyright (C) 2004-2006 Pingtel Corp. All rights reserved.
8 // Licensed to SIPfoundry under a Contributor Agreement.
9 //
10 // $$
12 
13 #ifndef _SipXMessageObserver_h_
14 #define _SipXMessageObserver_h_
15 
16 // SYSTEM INCLUDES
17 // APPLICATION INCLUDES
18 #include "os/OsServerTask.h"
19 #include "net/SipMessage.h"
20 #include "net/SipMessageEvent.h"
21 #include "sipXtapi.h"
22 
23 
24 // DEFINES
25 #define SIPXMO_NOTIFICATION_STUN 1
26 // MACROS
27 // EXTERNAL FUNCTIONS
28 // CONSTANTS
29 // STRUCTS
30 // TYPEDEFS
31 // MACROS
32 
33 // FORWARD DECLARATIONS
34 class OsEventMsg ;
35 
40 class SipXMessageObserver : public OsServerTask
41 {
42 public:
43 /* ============================ CREATORS ================================== */
44 
45  SipXMessageObserver(const SIPX_INST hInst);
46  virtual ~SipXMessageObserver(void);
47 
48 /* ============================ MANIPULATORS ============================== */
49 
53  UtlBoolean handleMessage(OsMsg& rMsg);
54 
58  void setTestResponseCode(int code) { mTestResponseCode = code; }
59 
60 private:
61  bool handleIncomingInfoMessage(SipMessage* pMessage);
62  bool handleIncomingInfoStatus(SipMessage* pMessage, int messageType);
63  bool handleStunOutcome(OsEventMsg* pMsg) ;
64 
70 };
71 
72 #endif
int mTestResponseCode
Special response code - for test purposes only.
Definition: SipXMessageObserver.h:68
SipXMessageObserver(const SIPX_INST hInst)
Definition: SipXMessageObserver.cpp:43
UtlBoolean handleMessage(OsMsg &rMsg)
Implementation of OsServerTask's pure virtual method.
Definition: SipXMessageObserver.cpp:59
bool handleIncomingInfoStatus(SipMessage *pMessage, int messageType)
Definition: SipXMessageObserver.cpp:208
void setTestResponseCode(int code)
FOR TEST PURPOSES ONLY - a response code to send back to the client.
Definition: SipXMessageObserver.h:58
SIPX_INST mhInst
Definition: SipXMessageObserver.h:69
bool handleIncomingInfoMessage(SipMessage *pMessage)
Definition: SipXMessageObserver.cpp:110
bool handleStunOutcome(OsEventMsg *pMsg)
Definition: SipXMessageObserver.cpp:301
Class that is an OsServerTask, and has a message queue that observes SIP messages.
Definition: SipXMessageObserver.h:40
void * SIPX_INST
The SIPX_INST handle represents an instance of a user agent.
Definition: sipXtapi.h:811
sipXtapi main API declarations
virtual ~SipXMessageObserver(void)
Definition: SipXMessageObserver.cpp:52