sipxportlib  Version 3.3
OsQueuedEvent.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 _OsQueuedEvent_h_
13 #define _OsQueuedEvent_h_
14 
15 // SYSTEM INCLUDES
16 
17 // APPLICATION INCLUDES
18 #include "os/OsDefs.h"
19 #include "os/OsBSem.h"
20 #include "os/OsMsgQ.h"
21 #include "os/OsNotification.h"
22 #include "os/OsTime.h"
23 
24 // DEFINES
25 // MACROS
26 // EXTERNAL FUNCTIONS
27 // EXTERNAL VARIABLES
28 // CONSTANTS
29 // STRUCTS
30 // TYPEDEFS
31 // FORWARD DECLARATIONS
32 
58 {
59 /* //////////////////////////// PUBLIC //////////////////////////////////// */
60 public:
61 
62 /* ============================ CREATORS ================================== */
63 
65  OsQueuedEvent(OsMsgQ& rMsgQ, const intptr_t userData);
66 
68  virtual ~OsQueuedEvent();
69 
70 /* ============================ MANIPULATORS ============================== */
71 
73  virtual OsStatus signal(const intptr_t eventData);
78  virtual OsStatus setUserData(intptr_t userData);
84 /* ============================ ACCESSORS ================================= */
85 
87  virtual OsStatus getUserData(intptr_t& rUserData) const;
92 /* ============================ INQUIRY =================================== */
93 
94 /* //////////////////////////// PROTECTED ///////////////////////////////// */
95 protected:
96 
97 /* //////////////////////////// PRIVATE /////////////////////////////////// */
98 private:
99 
100  intptr_t mUserData;
101  OsMsgQ* mpMsgQ;
105 
108  OsStatus doSendEventMsg(const int msgType, const intptr_t eventData) const;
113  OsQueuedEvent(const OsQueuedEvent& rOsQueuedEvent);
115 
117  OsQueuedEvent& operator=(const OsQueuedEvent& rhs);
118 
119 };
120 
121 /* ============================ INLINE METHODS ============================ */
122 
123 #endif // _OsQueuedEvent_h_
124 
Queued events are used to send event notifications using a message queue.
Definition: OsQueuedEvent.h:57
Definition: OsNotification.h:35
OsStatus
Definition: OsStatus.h:27
virtual OsStatus getUserData(intptr_t &rUserData) const
Return the user data specified when this object was constructed.
Definition: OsQueuedEvent.cpp:70
OsQueuedEvent(OsMsgQ &rMsgQ, const intptr_t userData)
Constructor.
Definition: OsQueuedEvent.cpp:33
virtual OsStatus signal(const intptr_t eventData)
Set the event data and send an event message to the designated queue.
Definition: OsQueuedEvent.cpp:50
virtual ~OsQueuedEvent()
Destructor.
Definition: OsQueuedEvent.cpp:40
_W64 signed int intptr_t
Definition: stdint.h:118
virtual OsStatus setUserData(intptr_t userData)
Set the user data value for this object.
Definition: OsQueuedEvent.cpp:60