sipXcallLib home page


TaoProviderListener.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 _TaoProviderListener_h_
13 #define _TaoProviderListener_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 "tao/TaoDefs.h"
23 //#include "ptapi/PtTerminalConnectionListener.h"
25 
26 // DEFINES
27 // MACROS
28 // EXTERNAL FUNCTIONS
29 // EXTERNAL VARIABLES
30 // CONSTANTS
31 // STRUCTS
32 // TYPEDEFS
33 // FORWARD DECLARATIONS
34 class TaoTransportTask;
35 class OsConnectionSocket;
36 
38 {
39 /* //////////////////////////// PUBLIC //////////////////////////////////// */
40 public:
41 
42 /* ============================ CREATORS ================================== */
43 
44  TaoProviderListener(int objId,
45  TaoObjHandle clientSocket,
46  TaoTransportTask* pSvrTransport,
47  const char * terminalName);
48 
49  TaoProviderListener(PtEventMask* pMask = NULL);
50  //:Default constructor
52  // in. This must be a subset of the events that the listener supports. The
53  // mask may be NULL where it is assumed that all events applicable to the
54  // derived listener are of interest.
55 
56  TaoProviderListener(const TaoProviderListener& rTaoProviderListener);
57  //:Copy constructor
58 
59  virtual
61  //:Destructor
62 
64  //:Assignment operator
65 /* ============================ MANIPULATORS ============================== */
66 
68  //:Method invoked on listener for event id =
69  //:PROVIDER_EVENT_TRANSMISSION_ENDED
70  //:indicating that the application will no longer receive provider
71  //:events on this instance of the TaoProviderListener.
72  // The event parameter is valid only within
73  // this method. The implementation must copy the event if
74  // it is needed beyond the scope of an invocation. The implementation
75  // of this method should not block as it may prevent other listeners
76  // from processing events in a timely fashion.
78 
79  void providerInService(const PtProviderEvent& rEvent);
80  //:Method invoked on listener for event id =
81  //:PROVIDER_IN_SERVICE
82  //:indicating that the state of the PtProvider object has changed to
83  //:PtProvider::IN_SERVICE.
84  // The event parameter is valid only within
85  // this method. The implementation must copy the event if
86  // it is needed beyond the scope of an invocation. The implementation
87  // of this method should not block as it may prevent other listeners
88  // from processing events in a timely fashion.
90 
91  void providerOutOfService(const PtProviderEvent& rEvent);
92  //:Method invoked on listener for event id =
93  //:PROVIDER_OUT_OF_SERVICE
94  //:indicating that the state of the Provider object has changed to
95  //:PtProvider::OUT_OF_SERVICE.
96  // The event parameter is valid only within
97  // this method. The implementation must copy the event if
98  // it is needed beyond the scope of an invocation. The implementation
99  // of this method should not block as it may prevent other listeners
100  // from processing events in a timely fashion.
102 
103  void providerShutdown(const PtProviderEvent& rEvent);
104  //:Method invoked on listener for event id =
105  //:PROVIDER_SHUTDOWN
106  //:indicating that the state of the PtProvider object has changed to
107  //:PtProvider::SHUTDOWN.
108  // The event parameter is valid only within
109  // this method. The implementation must copy the event if
110  // it is needed beyond the scope of an invocation. The implementation
111  // of this method should not block as it may prevent other listeners
112  // from processing events in a timely fashion.
114 
115  void providerAddressAdded(const PtAddressEvent& rEvent);
116  //:Method invoked on listener for event id =
117  //:PROVIDER_ADDRESS_ADDED
118  //:indicating that a new PtAddress has been added to the provider.
119  // The event parameter is valid only within
120  // this method. The implementation must copy the event if
121  // it is needed beyond the scope of an invocation. The implementation
122  // of this method should not block as it may prevent other listeners
123  // from processing events in a timely fashion.
125 
126  void providerAddressRemoved(const PtAddressEvent& rEvent);
127  //:Method invoked on listener for event id =
128  //:PROVIDER_ADDRESS_REMOVED
129  //:indicating that a PtAddress has been removed from the provider.
130  // The event parameter is valid only within
131  // this method. The implementation must copy the event if
132  // it is needed beyond the scope of an invocation. The implementation
133  // of this method should not block as it may prevent other listeners
134  // from processing events in a timely fashion.
136 
137  void providerTerminalAdded(const PtTerminalEvent& rEvent);
138  //:Method invoked on listener for event id =
139  //:PROVIDER_TERMINAL_ADDED
140  //:indicating that a new PtTerminal has been added to the provider.
141  // The event parameter is valid only within
142  // this method. The implementation must copy the event if
143  // it is needed beyond the scope of an invocation. The implementation
144  // of this method should not block as it may prevent other listeners
145  // from processing events in a timely fashion.
147 
148  void providerTerminalRemoved(const PtTerminalEvent& rEvent);
149  //:Method invoked on listener for event id =
150  //:PROVIDER_TERMINAL_REMOVED
151  //:indicating that a PtTerminal has been removed from the provider.
152  // The event parameter is valid only within
153  // this method. The implementation must copy the event if
154  // it is needed beyond the scope of an invocation. The implementation
155  // of this method should not block as it may prevent other listeners
156  // from processing events in a timely fashion.
158 
159 /* ============================ ACCESSORS ================================= */
160 
161 /* ============================ INQUIRY =================================== */
162 
163 /* //////////////////////////// PROTECTED ///////////////////////////////// */
164 protected:
165 
166 /* //////////////////////////// PRIVATE /////////////////////////////////// */
167 private:
168  int mObjId;
170 
173  OsConnectionSocket* mpConnectionSocket;
174 
175 
176 
177 };
178 
179 #endif // _TaoProviderListener_h_
Definition: PtProviderListener.h:33
TaoObjHandle mhClientSocket
Definition: TaoProviderListener.h:171
int mObjId
param: (in) rEvent - Reference to the PtEvent containing the specific event information.
Definition: TaoProviderListener.h:168
OsConnectionSocket * mpConnectionSocket
Definition: TaoProviderListener.h:173
void providerOutOfService(const PtProviderEvent &rEvent)
param: (in) rEvent - Reference to the PtEvent containing the specific event information.
void providerAddressRemoved(const PtAddressEvent &rEvent)
param: (in) rEvent - Reference to the PtEvent containing the specific event information.
TaoProviderListener(int objId, TaoObjHandle clientSocket, TaoTransportTask *pSvrTransport, const char *terminalName)
Definition: TaoProviderListener.cpp:30
Definition: TaoTransportTask.h:45
void providerShutdown(const PtProviderEvent &rEvent)
param: (in) rEvent - Reference to the PtEvent containing the specific event information.
void providerInService(const PtProviderEvent &rEvent)
param: (in) rEvent - Reference to the PtEvent containing the specific event information.
void providerTerminalRemoved(const PtTerminalEvent &rEvent)
param: (in) rEvent - Reference to the PtEvent containing the specific event information.
void providerEventTransmissionEnded(const PtProviderEvent &rEvent)
TaoTransportTask * mpSvrTransport
Definition: TaoProviderListener.h:172
virtual ~TaoProviderListener()
Definition: TaoProviderListener.cpp:54
Definition: PtTerminalEvent.h:32
Definition: TaoProviderListener.h:37
TaoProviderListener & operator=(const TaoProviderListener &rhs)
Definition: PtAddressEvent.h:27
Definition: PtProviderEvent.h:27
void providerTerminalAdded(const PtTerminalEvent &rEvent)
param: (in) rEvent - Reference to the PtEvent containing the specific event information.
uintptr_t TaoObjHandle
Definition: TaoDefs.h:32
char * mTerminalName
Definition: TaoProviderListener.h:169
Definition: PtEventMask.h:39
void providerAddressAdded(const PtAddressEvent &rEvent)
param: (in) rEvent - Reference to the PtEvent containing the specific event information.