sipxmedialib  Version 3.3
MpPackedResourceMsg.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 _MpPackedResourceMsg_h_
12 #define _MpPackedResourceMsg_h_
13 
14 // SYSTEM INCLUDES
15 
16 // APPLICATION INCLUDES
17 #include "mp/MpResourceMsg.h"
18 #include "utl/UtlSerialized.h"
19 
20 // DEFINES
21 // MACROS
22 // EXTERNAL FUNCTIONS
23 // EXTERNAL VARIABLES
24 // CONSTANTS
25 // STRUCTS
26 // TYPEDEFS
27 // FORWARD DECLARATIONS
28 
31 {
32 /* //////////////////////////// PUBLIC //////////////////////////////////// */
33 public:
34 
35 /* ============================ CREATORS ================================== */
37 
38 
41  const UtlString& targetResourceName)
42  : MpResourceMsg(msgType, targetResourceName)
43  {
44  };
45 
48  : MpResourceMsg(resourceMsg)
49  , mData(resourceMsg.mData)
50  {
51  };
52 
54  OsMsg* createCopy() const
55  {
56  return new MpPackedResourceMsg(*this);
57  }
58 
61  {
62  };
63 
65 
66 /* ============================ MANIPULATORS ============================== */
68 
69 
72  {
73  if(&rhs == this)
74  {
75  return(*this);
76  }
77 
79  mData = rhs.mData;
80  return *this;
81  }
82 
84 
85 /* ============================ ACCESSORS ================================= */
87 
88 
90  inline UtlSerialized &getData();
91 
93 
94 /* ============================ INQUIRY =================================== */
96 
97 
99 
100 /* //////////////////////////// PROTECTED ///////////////////////////////// */
101 protected:
102 
103 /* //////////////////////////// PRIVATE /////////////////////////////////// */
104 private:
105  UtlSerialized mData;
106 };
107 
108 /* ============================ INLINE METHODS ============================ */
109 
111 {
112  return mData;
113 }
114 #endif // _MpPackedResourceMsg_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
Message used pass arbitrary data to a resource.
Definition: MpPackedResourceMsg.h:30
~MpPackedResourceMsg()
Destructor.
Definition: MpPackedResourceMsg.h:60
MpPackedResourceMsg & operator=(const MpPackedResourceMsg &rhs)
Assignment operator.
Definition: MpPackedResourceMsg.h:71
UtlSerialized mData
Packed data to be passed to the resource,.
Definition: MpPackedResourceMsg.h:105
OsMsg * createCopy() const
Definition: MpPackedResourceMsg.h:54
MpPackedResourceMsg(MpResourceMsgType msgType, const UtlString &targetResourceName)
Constructor.
Definition: MpPackedResourceMsg.h:40
MpResourceMsgType
Resource message types.
Definition: MpResourceMsg.h:36
UtlSerialized & getData()
Get stored data.
Definition: MpPackedResourceMsg.h:110
MpPackedResourceMsg(const MpPackedResourceMsg &resourceMsg)
Copy constructor.
Definition: MpPackedResourceMsg.h:47