sipxmedialib  Version 3.3
MpSyncFlowgraphMsg.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2009 SIPez LLC.
3 // Licensed to SIPfoundry under a Contributor Agreement.
4 //
5 // Copyright (C) 2009 SIPfoundry Inc.
6 // Licensed by SIPfoundry under the LGPL license.
7 //
8 // $$
10 
11 #ifndef _MpSyncFlowgraphMsg_h_
12 #define _MpSyncFlowgraphMsg_h_
13 
14 // SYSTEM INCLUDES
15 
16 // APPLICATION INCLUDES
17 #include "mp/MpFlowGraphMsg.h"
18 #include "utl/UtlSerialized.h"
19 #include "os/OsEvent.h"
20 
21 // DEFINES
22 // MACROS
23 // EXTERNAL FUNCTIONS
24 // EXTERNAL VARIABLES
25 // CONSTANTS
26 // STRUCTS
27 // TYPEDEFS
28 // FORWARD DECLARATIONS
29 
76 {
77 /* //////////////////////////// PUBLIC //////////////////////////////////// */
78 public:
79 
80 /* ============================ CREATORS ================================== */
82 
83 
85  MpSyncFlowgraphMsg(int msgType, OsEvent *pDoneEvent = NULL)
86  : MpFlowGraphMsg(msgType)
87  , mpDoneEvent(pDoneEvent)
88  {
89  };
90 
93  : MpFlowGraphMsg(rMsg)
94  , mpDoneEvent(rMsg.mpDoneEvent)
95  , mData(rMsg.mData)
96  {
97  };
98 
100  OsMsg* createCopy() const
101  {
102  return new MpSyncFlowgraphMsg(*this);
103  }
104 
107  {
108  };
109 
111 
112 /* ============================ MANIPULATORS ============================== */
114 
115 
117  inline MpSyncFlowgraphMsg& operator=(const MpSyncFlowgraphMsg& rhs);
118 
120 
121 /* ============================ ACCESSORS ================================= */
123 
124 
126  inline UtlSerialized &getData();
127 
129  inline OsEvent *getDoneEvent();
130 
132 
133 /* ============================ INQUIRY =================================== */
135 
136 
138 
139 /* //////////////////////////// PROTECTED ///////////////////////////////// */
140 protected:
141 
142 /* //////////////////////////// PRIVATE /////////////////////////////////// */
143 private:
144  OsEvent *mpDoneEvent;
145  UtlSerialized mData;
148 };
149 
150 /* ============================ INLINE METHODS ============================ */
151 
153 {
154  if (this == &rhs) // handle the assignment to self case
155  return *this;
156 
157  MpFlowGraphMsg::operator=(rhs); // assign fields for parent class
158 
159  mpDoneEvent = rhs.mpDoneEvent;
160  mData = rhs.mData;
161 
162  return *this;
163 }
164 
166 {
167  return mData;
168 }
169 
171 {
172  return mpDoneEvent;
173 }
174 
175 #endif // _MpSyncFlowgraphMsg_h_
Message object used to communicate with the media processing task.
Definition: MpFlowGraphMsg.h:33
UtlSerialized mData
Packed data to be passed to the resource,.
Definition: MpSyncFlowgraphMsg.h:147
OsMsg * createCopy() const
Definition: MpSyncFlowgraphMsg.h:100
~MpSyncFlowgraphMsg()
Destructor.
Definition: MpSyncFlowgraphMsg.h:106
MpSyncFlowgraphMsg(int msgType, OsEvent *pDoneEvent=NULL)
Constructor.
Definition: MpSyncFlowgraphMsg.h:85
OsEvent * mpDoneEvent
Definition: MpSyncFlowgraphMsg.h:144
MpSyncFlowgraphMsg & operator=(const MpSyncFlowgraphMsg &rhs)
Assignment operator.
Definition: MpSyncFlowgraphMsg.h:152
OsEvent * getDoneEvent()
Get done-event.
Definition: MpSyncFlowgraphMsg.h:170
MpFlowGraphMsg & operator=(const MpFlowGraphMsg &rhs)
Assignment operator.
Definition: MpFlowGraphMsg.cpp:70
Message used to communicate with a flowgraph with ability to wait for command completion and get its ...
Definition: MpSyncFlowgraphMsg.h:75
UtlSerialized & getData()
Get stored data.
Definition: MpSyncFlowgraphMsg.h:165
MpSyncFlowgraphMsg(const MpSyncFlowgraphMsg &rMsg)
Copy constructor.
Definition: MpSyncFlowgraphMsg.h:92