sipxmedialib  Version 3.3
MpSetSocketsMsg.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2007-2011 SIPez LLC. Al rights reserved.
3 // Licensed to SIPfoundry under a Contributor Agreement.
4 //
5 // Copyright (C) 2007 SIPfoundry Inc.
6 // Licensed by SIPfoundry under the LGPL license.
7 //
8 // $$
10 
11 #ifndef _MpSetSocketsMsg_h_
12 #define _MpSetSocketsMsg_h_
13 
14 // SYSTEM INCLUDES
15 
16 // APPLICATION INCLUDES
17 #include "mp/MpResourceMsg.h"
18 
19 // DEFINES
20 // MACROS
21 // EXTERNAL FUNCTIONS
22 // EXTERNAL VARIABLES
23 // CONSTANTS
24 // STRUCTS
25 // TYPEDEFS
26 // FORWARD DECLARATIONS
27 
30 {
31 /* //////////////////////////// PUBLIC //////////////////////////////////// */
32 public:
33 
34 /* ============================ CREATORS ================================== */
36 
37 
39  MpSetSocketsMsg(const UtlString& targetResourceName,
40  OsSocket* rtpSocket,
41  OsSocket* rtcpSocket)
42  : MpResourceMsg(MPRM_SET_SOCKETS, targetResourceName)
43  , mRtpSocket(rtpSocket)
44  , mRtcpSocket(rtcpSocket)
45  {};
46 
48  MpSetSocketsMsg(const MpSetSocketsMsg& resourceMsg)
49  : MpResourceMsg(resourceMsg)
50  , mRtpSocket(resourceMsg.mRtpSocket)
51  , mRtcpSocket(resourceMsg.mRtcpSocket)
52  {};
53 
55  OsMsg* createCopy(void) const
56  {
57  return(new MpSetSocketsMsg(*this));
58  }
59 
62 
64 
65 /* ============================ MANIPULATORS ============================== */
67 
68 
71  {
72  if(&rhs == this)
73  {
74  return(*this);
75  }
76 
78  mRtpSocket = rhs.mRtpSocket;
80 
81  return *this;
82  }
83 
85 
86 /* ============================ ACCESSORS ================================= */
88 
89 
90  OsSocket* getRtpSocket() const {return mRtpSocket;}
91  OsSocket* getRtcpSocket() const {return mRtcpSocket;}
92 
94 
95 /* ============================ INQUIRY =================================== */
97 
98 
100 
101 /* //////////////////////////// PROTECTED ///////////////////////////////// */
102 protected:
103 
104 /* //////////////////////////// PRIVATE /////////////////////////////////// */
105 private:
106  OsSocket* mRtpSocket;
107  OsSocket* mRtcpSocket;
108 };
109 
110 /* ============================ INLINE METHODS ============================ */
111 
112 #endif // _MpSetSocketsMsg_h_
MpResourceMsg & operator=(const MpResourceMsg &rhs)
Assignment operator.
Definition: MpResourceMsg.cpp:60
Message object used to communicate with the media processing task.
Definition: MpResourceMsg.h:30
MpSetSocketsMsg & operator=(const MpSetSocketsMsg &rhs)
Assignment operator.
Definition: MpSetSocketsMsg.h:70
MpSetSocketsMsg(const MpSetSocketsMsg &resourceMsg)
Copy constructor.
Definition: MpSetSocketsMsg.h:48
OsSocket * mRtpSocket
RTP socket.
Definition: MpSetSocketsMsg.h:106
OsMsg * createCopy(void) const
Create a copy of this msg object (which may be of a derived type)
Definition: MpSetSocketsMsg.h:55
OsSocket * getRtpSocket() const
Definition: MpSetSocketsMsg.h:90
MpSetSocketsMsg(const UtlString &targetResourceName, OsSocket *rtpSocket, OsSocket *rtcpSocket)
Constructor.
Definition: MpSetSocketsMsg.h:39
~MpSetSocketsMsg()
Destructor.
Definition: MpSetSocketsMsg.h:61
OsSocket * mRtcpSocket
RTCP socket.
Definition: MpSetSocketsMsg.h:107
MprFromNet and containers set RTP/RTCP sockets.
Definition: MpResourceMsg.h:50
OsSocket * getRtcpSocket() const
Definition: MpSetSocketsMsg.h:91
Message used to set gains in bridge mix matrix.
Definition: MpSetSocketsMsg.h:29