sipxmedialib  Version 3.3
MpIntResourceMsg.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2008 SIPez LLC.
3 // Licensed to SIPfoundry under a Contributor Agreement.
4 //
5 // Copyright (C) 2008 SIPfoundry Inc.
6 // Licensed by SIPfoundry under the LGPL license.
7 //
8 // $$
10 
11 #ifndef _MpIntResourceMsg_h_
12 #define _MpIntResourceMsg_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 
40  const UtlString& targetResourceName,
41  int data)
42  : MpResourceMsg(type, targetResourceName)
43  , mData(data)
44  {
45  };
46 
49  : MpResourceMsg(msg)
50  , mData(msg.mData)
51  {
52  };
53 
55  OsMsg* createCopy() const
56  {
57  return new MpIntResourceMsg(*this);
58  }
59 
61 
62 /* ============================ MANIPULATORS ============================== */
64 
65 
68  {
69  if(&rhs == this)
70  {
71  return(*this);
72  }
73 
75 
76  mData = rhs.mData;
77 
78  return *this;
79  }
80 
82 
83 /* ============================ ACCESSORS ================================= */
85 
86 
88  int getData() const {return mData;}
89 
91 
92 /* ============================ INQUIRY =================================== */
94 
95 
97 
98 /* //////////////////////////// PROTECTED ///////////////////////////////// */
99 protected:
100 
101 /* //////////////////////////// PRIVATE /////////////////////////////////// */
102 private:
103  int mData;
104 };
105 
106 /* ============================ INLINE METHODS ============================ */
107 
108 #endif // _MpIntResourceMsg_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
OsMsg * createCopy() const
Create a copy of this msg object (which may be of a derived type)
Definition: MpIntResourceMsg.h:55
MpIntResourceMsg(const MpIntResourceMsg &msg)
Copy constructor.
Definition: MpIntResourceMsg.h:48
MpIntResourceMsg & operator=(const MpIntResourceMsg &rhs)
Assignment operator.
Definition: MpIntResourceMsg.h:67
int mData
Integer to be passed to resource.
Definition: MpIntResourceMsg.h:103
Message used to pass an integer value to resource.
Definition: MpIntResourceMsg.h:29
MpResourceMsgType
Resource message types.
Definition: MpResourceMsg.h:36
int getData() const
Return contained integer.
Definition: MpIntResourceMsg.h:88
MpIntResourceMsg(MpResourceMsgType type, const UtlString &targetResourceName, int data)
Constructor.
Definition: MpIntResourceMsg.h:39