sipxmedialib  Version 3.3
MpStreamMsg.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2006 SIPez LLC.
3 // Licensed to SIPfoundry under a Contributor Agreement.
4 //
5 // Copyright (C) 2004-2006 SIPfoundry Inc.
6 // Licensed by SIPfoundry under the LGPL license.
7 //
8 // Copyright (C) 2004-2006 Pingtel Corp. All rights reserved.
9 // Licensed to SIPfoundry under a Contributor Agreement.
10 //
11 // $$
13 
14 
15 #ifndef _MpStreamMsg_h_
16 #define _MpStreamMsg_h_
17 
18 // SYSTEM INCLUDES
19 
20 // APPLICATION INCLUDES
21 #include <utl/UtlString.h>
22 
23 #include "os/OsMsg.h"
24 #include "mp/StreamDefs.h"
25 
26 // DEFINES
27 // MACROS
28 // EXTERNAL FUNCTIONS
29 // EXTERNAL VARIABLES
30 // CONSTANTS
31 // STRUCTS
32 // TYPEDEFS
33 // FORWARD DECLARATIONS
34 
36 class MpStreamMsg : public OsMsg
37 {
38 /* //////////////////////////// PUBLIC //////////////////////////////////// */
39 public:
40 
42  typedef enum
43  {
53 
54 /* ============================ CREATORS ================================== */
56 
57 
59  MpStreamMsg(int msg, UtlString& target, StreamHandle handle, void* pPtr1=NULL,
60  void* pPtr2=NULL, intptr_t int1=-1, intptr_t int2=-1);
61 
63  MpStreamMsg(const MpStreamMsg& rMpStreamMsg);
64 
66  virtual OsMsg* createCopy() const;
67 
69  virtual
70  ~MpStreamMsg();
71 
73 
74 /* ============================ MANIPULATORS ============================== */
76 
77 
79  MpStreamMsg& operator=(const MpStreamMsg& rhs);
80 
82  void setTarget(UtlString& target);
83 
85  void setHandle(StreamHandle handle);
86 
88  void setPtr1(void* p);
89 
91  void setPtr2(void* p);
92 
94  void setInt1(intptr_t i);
95 
97  void setInt2(intptr_t i);
98 
100 
101 /* ============================ ACCESSORS ================================= */
103 
104 
106  int getMsg() const;
107 
109  UtlString getTarget() const;
110 
112  StreamHandle getHandle() const;
113 
115  void* getPtr1() const;
116 
118  void* getPtr2() const;
119 
121  intptr_t getInt1() const;
122 
124  intptr_t getInt2() const;
125 
127 
128 /* ============================ INQUIRY =================================== */
130 
131 
133 
134 /* //////////////////////////// PROTECTED ///////////////////////////////// */
135 protected:
136 
137 /* //////////////////////////// PRIVATE /////////////////////////////////// */
138 private:
139  UtlString mTarget;
141  void* mpPtr1;
142  void* mpPtr2;
143  intptr_t mInt1;
144  intptr_t mInt2;
145 
146 };
147 
148 /* ============================ INLINE METHODS ============================ */
149 
150 #endif // _MpStreamMsg_h_
Definition: MpStreamMsg.h:46
UtlString mTarget
Target ID.
Definition: MpStreamMsg.h:139
void setInt1(intptr_t i)
Sets integer 1 of the stream message.
Definition: MpStreamMsg.cpp:115
void * mpPtr1
Message pointer 1.
Definition: MpStreamMsg.h:141
void setPtr2(void *p)
Sets pointer 2 (void*) of the stream message.
Definition: MpStreamMsg.cpp:109
Definition: MpStreamMsg.h:50
intptr_t getInt2() const
Return integer 2 of the media stream message.
Definition: MpStreamMsg.cpp:165
StreamHandle mHandle
Stream Handle.
Definition: MpStreamMsg.h:140
Message object used to communicate with the media processing task.
Definition: MpStreamMsg.h:36
virtual OsMsg * createCopy() const
Create a copy of this msg object (which may be of a derived type)
Definition: MpStreamMsg.cpp:57
Definition: MpStreamMsg.h:45
MpStreamMsgType
Phone set message types.
Definition: MpStreamMsg.h:42
void setTarget(UtlString &target)
Sets the target id of the stream message.
Definition: MpStreamMsg.cpp:91
UtlString getTarget() const
Return the target id of the stream message.
Definition: MpStreamMsg.cpp:135
MpStreamMsg & operator=(const MpStreamMsg &rhs)
Assignment operator.
Definition: MpStreamMsg.cpp:72
MpStreamMsg(int msg, UtlString &target, StreamHandle handle, void *pPtr1=NULL, void *pPtr2=NULL, intptr_t int1=-1, intptr_t int2=-1)
Constructor.
Definition: MpStreamMsg.cpp:31
intptr_t getInt1() const
Return integer 1 of the media stream message.
Definition: MpStreamMsg.cpp:159
void * StreamHandle
Handles used by the renderer.
Definition: StreamDefs.h:42
intptr_t mInt2
Message integer 2.
Definition: MpStreamMsg.h:144
Definition: MpStreamMsg.h:49
Definition: MpStreamMsg.h:48
void * getPtr2() const
Return pointer 2 (void*) of the stream message.
Definition: MpStreamMsg.cpp:153
void setInt2(intptr_t i)
Sets integer 2 of the stream message.
Definition: MpStreamMsg.cpp:121
void setPtr1(void *p)
Sets pointer 1 (void*) of the stream message.
Definition: MpStreamMsg.cpp:103
virtual ~MpStreamMsg()
Destructor.
Definition: MpStreamMsg.cpp:63
intptr_t mInt1
Message integer 1.
Definition: MpStreamMsg.h:143
Definition: MpStreamMsg.h:47
Definition: MpStreamMsg.h:51
void * getPtr1() const
Return pointer 1 (void*) of the stream message.
Definition: MpStreamMsg.cpp:147
void setHandle(StreamHandle handle)
Sets the stream handle of the stream message.
Definition: MpStreamMsg.cpp:97
int getMsg() const
Returns the type of the stream message.
Definition: MpStreamMsg.cpp:129
StreamHandle getHandle() const
Return stream handle of stream msg.
Definition: MpStreamMsg.cpp:141
void * mpPtr2
Message pointer 2.
Definition: MpStreamMsg.h:142
Definition: MpStreamMsg.h:44