sipxmedialib  Version 3.3
Message.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2004-2006 SIPfoundry Inc.
3 // Licensed by SIPfoundry under the LGPL license.
4 //
5 // Copyright (C) 2004-2006 Pingtel Corp. All rights reserved.
6 // Licensed to SIPfoundry under a Contributor Agreement.
7 //
8 // $$
10 
11 
12 #ifndef _Message_h
13 #define _Message_h
14 
15 #include "rtcp/RtcpConfig.h"
16 
17 #ifdef __pingtel_on_posix__
18 #include "os/OsMsg.h"
19 #endif
20 
21 // Defines
22 #define MAX_ARGUMENTS 5
23 #define UNASSIGNED (unsigned short)-1
24 
25 
26 
27 /*|><|************************************************************************
28 *
29 * Class Name: CMessage
30 *
31 * Inheritance:
32 *
33 * Methods:
34 *
35 * Attributes:
36 *
37 * Description:
38 *
39 *
40 *
41 *
42 ************************************************************************|<>|*/
43 class CMessage
44 #ifdef __pingtel_on_posix__
45  : public OsMsg
46 #endif
47 {
48 
49  public: // Public Member Functions
50 
51 
52 
53 /*|><|************************************************************************
54 *
55 * Method Name: CMessage - Constructor
56 *
57 *
58 * Inputs: None
59 *
60 * Outputs: None
61 *
62 * Returns: None
63 *
64 * Logic Notes:
65 *
66 * Caveats:
67 *
68 ************************************************************************|<>|*/
69  CMessage(unsigned long dwMsgType=0, void *pvArgument1=(void *)0,
70  void *pvArgument2=(void *)0, void *pvArgument3=(void *)0,
71  void *pvArgument4=(void *)0, void *pvArgument5=(void *)0);
72 
73 /*|><|************************************************************************
74 *
75 * Method Name: CMessage - Destructor
76 *
77 *
78 * Inputs: None
79 *
80 * Outputs: None
81 *
82 * Returns: None
83 *
84 * Logic Notes:
85 *
86 * Caveats:
87 *
88 *
89 ************************************************************************|<>|*/
90  ~CMessage();
91 
92 
93 /*|><|************************************************************************
94 *
95 * Method Name: AddContents
96 *
97 *
98 * Inputs: unsigned long dwMsgType,
99 * void *pvArgument1,
100 * void *pvArgument2,
101 * void *pvArgument3,
102 * void *pvArgument4,
103 * void *pvArgument5
104 *
105 * Outputs: None
106 *
107 * Returns: None
108 *
109 * Logic Notes:
110 *
111 * Caveats:
112 *
113 ************************************************************************|<>|*/
114  void AddContents(unsigned long dwMsgType, void *pvArgument1=(void *)0,
115  void *pvArgument2=(void *)0, void *pvArgument3=(void *)0,
116  void *pvArgument4=(void *)0, void *pvArgument5=(void *)0);
117 
118 #ifdef __pingtel_on_posix__
119  virtual OsMsg * createCopy(void) const;
120 #endif
121 
122 /*|><|************************************************************************
123 *
124 * Method Name: GetContents
125 *
126 *
127 * Inputs: None
128 *
129 * Outputs: unsigned long *pdwMsgType,
130 * void **ppvArgument1,
131 * void **ppvArgument2,
132 * void **ppvArgument3,
133 * void **ppvArgument4,
134 * void **ppvArgument5
135 *
136 * Returns: None
137 *
138 * Logic Notes:
139 *
140 * Caveats:
141 *
142 ************************************************************************|<>|*/
143  void GetContents(unsigned long *pdwMsgType, void **ppvArgument1,
144  void **ppvArgument2, void **ppvArgument3,
145  void **ppvArgument4, void **ppvArgument5);
146 
147 
148 /*|><|************************************************************************
149 *
150 * Method Name: GetMsgType
151 *
152 *
153 * Inputs: None
154 *
155 * Outputs: None
156 *
157 * Returns: unsigned long
158 *
159 * Logic Notes:
160 *
161 * Caveats:
162 *
163 ************************************************************************|<>|*/
164  unsigned long GetMsgType(void);
165 
166 
167 /*|><|************************************************************************
168 *
169 * Method Name: GetFirstArgument
170 *
171 *
172 * Inputs: None
173 *
174 * Outputs: None
175 *
176 * Returns: void *
177 *
178 * Logic Notes:
179 *
180 * Caveats:
181 *
182 ************************************************************************|<>|*/
183  void *GetFirstArgument(void);
184 
185 
186 /*|><|************************************************************************
187 *
188 * Method Name: GetSecondArgument
189 *
190 *
191 * Inputs: None
192 *
193 * Outputs: None
194 *
195 * Returns: void *
196 *
197 * Logic Notes:
198 *
199 * Caveats:
200 *
201 ************************************************************************|<>|*/
202  void *GetSecondArgument(void);
203 
204 /*|><|************************************************************************
205 *
206 * Method Name: GetThirdArgument
207 *
208 *
209 * Inputs: None
210 *
211 * Outputs: None
212 *
213 * Returns: void *
214 *
215 * Logic Notes:
216 *
217 * Caveats:
218 *
219 ************************************************************************|<>|*/
220  void *GetThirdArgument(void);
221 
222 /*|><|************************************************************************
223 *
224 * Method Name: GetFourthArgument
225 *
226 *
227 * Inputs: None
228 *
229 * Outputs: None
230 *
231 * Returns: void *
232 *
233 * Logic Notes:
234 *
235 * Caveats:
236 *
237 ************************************************************************|<>|*/
238  void *GetFourthArgument(void);
239 
240 /*|><|************************************************************************
241 *
242 * Method Name: GetFifthArgument
243 *
244 *
245 * Inputs: None
246 *
247 * Outputs: None
248 *
249 * Returns: void *
250 *
251 * Logic Notes:
252 *
253 * Caveats:
254 *
255 ************************************************************************|<>|*/
256  void *GetFifthArgument(void);
257 
258 
259  private: // Private Data Members
260 
261 /*|><|************************************************************************
262 *
263 * Attribute Name: m_dwMsgType
264 *
265 * Type: unsigned long
266 *
267 * Description: An identifier for the type of message.
268 *
269 ************************************************************************|<>|*/
270  unsigned long m_dwMsgType;
271 
272 
273 /*|><|************************************************************************
274 *
275 * Attribute Name: m_pvArguments[MAX_ARGUMENTS]
276 *
277 * Type: void *
278 *
279 * Description: An array of pointers containing arguments associated with
280 * the message. A maximum of 5 (MAX_ARGUMENTS) optional
281 * arguments may be associated with a message.
282 *
283 ************************************************************************|<>|*/
285 
286 };
287 
288 
289 #endif
void * GetFirstArgument(void)
void * GetFourthArgument(void)
unsigned long GetMsgType(void)
void * GetThirdArgument(void)
void * m_pvArgument[MAX_ARGUMENTS]
Definition: Message.h:284
void GetContents(unsigned long *pdwMsgType, void **ppvArgument1, void **ppvArgument2, void **ppvArgument3, void **ppvArgument4, void **ppvArgument5)
CMessage(unsigned long dwMsgType=0, void *pvArgument1=(void *) 0, void *pvArgument2=(void *) 0, void *pvArgument3=(void *) 0, void *pvArgument4=(void *) 0, void *pvArgument5=(void *) 0)
unsigned long m_dwMsgType
Definition: Message.h:270
void AddContents(unsigned long dwMsgType, void *pvArgument1=(void *) 0, void *pvArgument2=(void *) 0, void *pvArgument3=(void *) 0, void *pvArgument4=(void *) 0, void *pvArgument5=(void *) 0)
void * GetFifthArgument(void)
#define MAX_ARGUMENTS
Definition: Message.h:22
Definition: Message.h:43
void * GetSecondArgument(void)