sipXcallLib home page


TaoEventDispatcher.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 _TaoEventDispatcher_h_
13 #define _TaoEventDispatcher_h_
14 
15 #if _MSC_VER >= 1000
16 #pragma once
17 #endif // _MSC_VER >= 1000
18 
19 // SYSTEM INCLUDES
20 
21 // APPLICATION INCLUDES
22 #include "os/OsServerTask.h"
23 #include "tao/TaoDefs.h"
24 
25 // DEFINES
26 // MACROS
27 // EXTERNAL FUNCTIONS
28 // EXTERNAL VARIABLES
29 // CONSTANTS
30 // STRUCTS
31 // TYPEDEFS
32 // FORWARD DECLARATIONS
33 class TaoEvent;
34 class OsServerTask;
35 class OsEvent;
36 
37 //:Receives incoming event notificatons, looks uo the corresponding listener and
38 // invokes the appropriate method.
39 class TaoEventDispatcher : public OsServerTask
40 {
41 /* //////////////////////////// PUBLIC //////////////////////////////////// */
42 public:
43 /* ============================ CREATORS ================================== */
44  TaoEventDispatcher(const UtlString& name = "TaoEventDispatcher-%d", const int maxRequestQMsgs=DEF_MAX_MSGS);
45  //:Constructor
46 
47  virtual ~TaoEventDispatcher();
48 
49 /* ============================ ACCESSORS ============================== */
51 
52 /* ============================ MANIPULATORS ============================== */
53 
55 
56  virtual UtlBoolean handleMessage(OsMsg& rMsg);
57  //:Handle an incoming message.
58  // If the message is not one that the object is prepared to process,
59  // the handleMessage() method in the derived class should return FALSE
60  // which will cause the OsMessageTask::handleMessage() method to be
61  // invoked on the message.
62 
63  virtual OsStatus setErrno(int errno);
64  //:Set the errno status for the task
65  // This call has no effect under Windows NT and, if the task has been
66  // started, will always returns OS_SUCCESS
67 
68 /* //////////////////////////// PRIVATE /////////////////////////////////// */
69 private:
72 
73 
74 };
75 
76 
77 #endif // _TaoEventDispatcher_h_
virtual OsStatus setErrno(int errno)
Definition: TaoEventDispatcher.cpp:82
TaoEventDispatcher(const UtlString &name="TaoEventDispatcher-%d", const int maxRequestQMsgs=DEF_MAX_MSGS)
Definition: TaoEventDispatcher.cpp:27
Definition: TaoEventDispatcher.h:39
TaoObjHandle & getObjHandle()
Definition: TaoEventDispatcher.h:50
virtual UtlBoolean handleMessage(OsMsg &rMsg)
Definition: TaoEventDispatcher.cpp:43
Definition: TaoEvent.h:23
TaoEvent * mpProviderEvent
Definition: TaoEventDispatcher.h:71
virtual ~TaoEventDispatcher()
Definition: TaoEventDispatcher.cpp:34
TaoEvent * getProviderEvent()
Definition: TaoEventDispatcher.h:54
uintptr_t TaoObjHandle
Definition: TaoDefs.h:32
TaoObjHandle mTaoObjHandle
Definition: TaoEventDispatcher.h:70