sipxportlib  Version 3.3
NatMsg.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2006 Pingtel Corp.
3 //
4 // $$
6 
7 #ifndef _NatMsg_h_
8 #define _NatMsg_h_
9 
10 #include "os/IStunSocket.h"
11 #include "os/OsMsg.h"
12 #include "utl/UtlString.h"
13 
14 
15 //: Basic NatMsg -- relies on external bodies to allocate and free memory.
16 class NatMsg : public OsMsg
17 {
18 public:
19 
20 enum
21 {
25 } ;
26 
27 /* ============================ CREATORS ================================== */
28  NatMsg(int type,
29  char* szBuffer,
30  int nLength,
31  IStunSocket* pSocket,
32  UtlString receivedIp,
33  int iReceivedPort);
34  //:Constructor
35 
36  NatMsg(int type,
37  void* pContext);
38  //:Constructor
39 
40 
41  NatMsg(const NatMsg& rNatMsg);
42  //:Copy constructor
43 
44  virtual OsMsg* createCopy(void) const;
45  //:Create a copy of this msg object (which may be of a derived type)
46 
47  virtual
48  ~NatMsg();
49  //:Destructor
50 /* ============================ MANIPULATORS ============================== */
51 
52  NatMsg& operator=(const NatMsg& rhs);
53  //:Assignment operator
54 /* ============================ ACCESSORS ================================= */
55 
56  char* getBuffer() const ;
57 
58  int getLength() const ;
59 
60  IStunSocket* getSocket() const ;
61 
62  UtlString getReceivedIp() const ;
63 
64  int getReceivedPort() const ;
65 
66  int getType() const ;
67 
68  void* getContext() const ;
69 
70 /* ============================ INQUIRY =================================== */
71 
72 /* //////////////////////////// PROTECTED ///////////////////////////////// */
73 protected:
74  int miType ;
75  char* mBuffer ;
76  int mLength ;
80  void* mpContext ;
81 
82 
83 
84 /* //////////////////////////// PRIVATE /////////////////////////////////// */
85 };
86 
87 #endif
UtlString getReceivedIp() const
Definition: NatMsg.cpp:109
IStunSocket * mpSocket
Definition: NatMsg.h:77
int miType
Definition: NatMsg.h:74
Definition: NatMsg.h:23
void * getContext() const
Definition: NatMsg.cpp:125
int getType() const
Definition: NatMsg.cpp:120
int getReceivedPort() const
Definition: NatMsg.cpp:115
void * mpContext
Definition: NatMsg.h:80
Definition: IStunSocket.h:70
virtual ~NatMsg()
Definition: NatMsg.cpp:68
virtual OsMsg * createCopy(void) const
Definition: NatMsg.cpp:62
Definition: NatMsg.h:24
int getLength() const
Definition: NatMsg.cpp:97
char * getBuffer() const
Definition: NatMsg.cpp:91
UtlString mReceivedIp
Definition: NatMsg.h:78
Definition: UtlString.h:48
NatMsg(int type, char *szBuffer, int nLength, IStunSocket *pSocket, UtlString receivedIp, int iReceivedPort)
Definition: NatMsg.cpp:18
int mLength
Definition: NatMsg.h:76
IStunSocket * getSocket() const
Definition: NatMsg.cpp:103
Definition: NatMsg.h:22
Definition: OsMsg.h:36
Definition: NatMsg.h:16
int miReceivedPort
Definition: NatMsg.h:79
char * mBuffer
Definition: NatMsg.h:75
NatMsg & operator=(const NatMsg &rhs)
Definition: NatMsg.cpp:74