sipXcallLib home page


PtTerminalConnectionListener.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 _PtTerminalConnectionListener_h_
13 #define _PtTerminalConnectionListener_h_
14 
15 // SYSTEM INCLUDES
16 // APPLICATION INCLUDES
18 
19 // DEFINES
20 // MACROS
21 // EXTERNAL FUNCTIONS
22 // EXTERNAL VARIABLES
23 // CONSTANTS
24 // STRUCTS
25 // TYPEDEFS
26 // FORWARD DECLARATIONS
28 
29 //:The PtTerminalConnectionListener is used to register with PtAddress,
30 //:PtTerminal, and PtCall objects to receive events from associated PtCall,
31 //:PtConnection, and PtTerminalConnection objects.
32 
34 {
35 /* //////////////////////////// PUBLIC //////////////////////////////////// */
36 public:
38 
39 /* ============================ CREATORS ================================== */
40 
42  //:Default constructor
44 
45  virtual
47  //:Destructor
48 
49 /* ============================ MANIPULATORS ============================== */
50 
51  virtual void terminalConnectionCreated(const PtTerminalConnectionEvent& rEvent);
52  //:Method invoked on listener for event id =
53  //:TERMINAL_CONNECTION_CREATED
54  //:indicating that a new PtTerminalConnection object has been created.
55  // The event parameter is valid only within
56  // this method. The implementation must copy the event if
57  // it is needed beyond the scope of an invocation. The implementation
58  // of this method should not block as it may prevent other listeners
59  // from processing events in a timely fashion.
61 
62  virtual void terminalConnectionIdle(const PtTerminalConnectionEvent& rEvent);
63  //:Method invoked on listener for event id =
64  //:TERMINAL_CONNECTION_IDLE
65  //:indicating that the state of the PtTerminalConnection object has
66  //:changed to PtTerminalConnection::IDLE.
67  // The event parameter is valid only within
68  // this method. The implementation must copy the event if
69  // it is needed beyond the scope of an invocation. The implementation
70  // of this method should not block as it may prevent other listeners
71  // from processing events in a timely fashion.
73 
74  virtual void terminalConnectionRinging(const PtTerminalConnectionEvent& rEvent);
75  //:Method invoked on listener for event id =
76  //:TERMINAL_CONNECTION_RINGING
77  //:indicating that the state of the PtTerminalConnection object has
78  //:changed to PtTerminalConnection::RINGING.
79  // The event parameter is valid only within
80  // this method. The implementation must copy the event if
81  // it is needed beyond the scope of an invocation. The implementation
82  // of this method should not block as it may prevent other listeners
83  // from processing events in a timely fashion.
85 
86  virtual void terminalConnectionDropped(const PtTerminalConnectionEvent& rEvent);
87  //:Method invoked on listener for event id =
88  //:TERMINAL_CONNECTION_DROPPED
89  //:indicating that the state of the PtTerminalConnection object has
90  //:changed to PtTerminalConnection::DROPPED.
91  // The event parameter is valid only within
92  // this method. The implementation must copy the event if
93  // it is needed beyond the scope of an invocation. The implementation
94  // of this method should not block as it may prevent other listeners
95  // from processing events in a timely fashion.
97 
98  virtual void terminalConnectionUnknown(const PtTerminalConnectionEvent& rEvent);
99  //:Method invoked on listener for event id =
100  //:TERMINAL_CONNECTION_UNKNOWN
101  //:indicating that the state of the PtTerminalConnection object has
102  //:changed to PtTerminalConnection::UNKNOWN.
103  // The event parameter is valid only within
104  // this method. The implementation must copy the event if
105  // it is needed beyond the scope of an invocation. The implementation
106  // of this method should not block as it may prevent other listeners
107  // from processing events in a timely fashion.
109 
110  virtual void terminalConnectionHeld(const PtTerminalConnectionEvent& rEvent);
111  //:Method invoked on listener for event id =
112  //:TERMINAL_CONNECTION_HELD
113  //:indicating that the state of the PtTerminalConnection object has
114  //:changed to PtTerminalConnection::HELD.
115  // The event parameter is valid only within
116  // this method. The implementation must copy the event if
117  // it is needed beyond the scope of an invocation. The implementation
118  // of this method should not block as it may prevent other listeners
119  // from processing events in a timely fashion.
121 
122  virtual void terminalConnectionTalking(const PtTerminalConnectionEvent& rEvent);
123  //:Method invoked on listener for event id =
124  //:TERMINAL_CONNECTION_TALKING
125  //:indicating that the state of the PtTerminalConnection object has
126  //:changed to PtTerminalConnection::TALKING.
127  // The event parameter is valid only within
128  // this method. The implementation must copy the event if
129  // it is needed beyond the scope of an invocation. The implementation
130  // of this method should not block as it may prevent other listeners
131  // from processing events in a timely fashion.
133 
134  virtual void terminalConnectionInUse(const PtTerminalConnectionEvent& rEvent);
135  //:Method invoked on listener for event id =
136  //:TERMINAL_CONNECTION_IN_USE
137  //:indicating that the state of the PtTerminalConnection object has
138  //:changed to PtTerminalConnection::IN_USE.
139  // The event parameter is valid only within
140  // this method. The implementation must copy the event if
141  // it is needed beyond the scope of an invocation. The implementation
142  // of this method should not block as it may prevent other listeners
143  // from processing events in a timely fashion.
145 
146 /* ============================ ACCESSORS ================================= */
147 
148  static const char* className();
149  //:Returns the name of this class
151 
152 /* ============================ INQUIRY =================================== */
153 
154  virtual PtBoolean isClass(const char* pClassName);
155  //:Determines if this object if of the specified type.
159 
160  virtual PtBoolean isInstanceOf(const char* pClassName);
161  //:Determines if this object is either an instance of or is derived from
162  //:the specified type.
166 
167 /* //////////////////////////// PROTECTED ///////////////////////////////// */
168 protected:
169 
170 /* //////////////////////////// PRIVATE /////////////////////////////////// */
171 private:
172 
173  PtTerminalConnectionListener(const PtTerminalConnectionListener& rPtTerminalConnectionListener);
174  //:Copy constructor
175 
176  PtTerminalConnectionListener& operator=(const PtTerminalConnectionListener& rhs);
177  //:Assignment operator
178 
179 };
180 
181 /* ============================ INLINE METHODS ============================ */
182 
183 #endif // _PtTerminalConnectionListener_h_
virtual PtBoolean isClass(const char *pClassName)
returns: Returns the string representation of the name of this class
Definition: PtTerminalConnectionListener.h:33
virtual void terminalConnectionTalking(const PtTerminalConnectionEvent &rEvent)
param: (in) rEvent - Reference to the PtEvent containing the specific event information.
Definition: PtTerminalConnectionListener.cpp:81
virtual void terminalConnectionHeld(const PtTerminalConnectionEvent &rEvent)
param: (in) rEvent - Reference to the PtEvent containing the specific event information.
Definition: PtTerminalConnectionListener.cpp:77
int PtBoolean
Definition: PtDefs.h:71
virtual void terminalConnectionRinging(const PtTerminalConnectionEvent &rEvent)
param: (in) rEvent - reference to the PtEvent containing the specific event information.
Definition: PtTerminalConnectionListener.cpp:65
virtual ~PtTerminalConnectionListener()
param: (in) pMask - Event mask defining events the listener is interested in. This must be a subset o...
Definition: PtTerminalConnectionListener.cpp:41
#define PT_CLASS_INFO_MEMBERS
Definition: PtDefs.h:73
virtual void terminalConnectionInUse(const PtTerminalConnectionEvent &rEvent)
param: (in) rEvent - Reference to the PtEvent containing the specific event information.
Definition: PtTerminalConnectionListener.cpp:85
virtual void terminalConnectionCreated(const PtTerminalConnectionEvent &rEvent)
Definition: PtTerminalConnectionListener.cpp:57
virtual void terminalConnectionIdle(const PtTerminalConnectionEvent &rEvent)
param: (in) rEvent - Reference to the PtEvent containing the specific event information.
Definition: PtTerminalConnectionListener.cpp:61
virtual PtBoolean isInstanceOf(const char *pClassName)
param: (in) pClassName - the string to compare with the name of this class. retcode: TRUE - if the gi...
virtual void terminalConnectionUnknown(const PtTerminalConnectionEvent &rEvent)
param: (in) rEvent - Reference to the PtEvent containing the specific event information.
Definition: PtTerminalConnectionListener.cpp:73
Definition: PtTerminalConnectionEvent.h:36
static const char * className()
param: (in) rEvent - reference to the PtEvent containing the specific event information.
PtTerminalConnectionListener & operator=(const PtTerminalConnectionListener &rhs)
Definition: PtTerminalConnectionListener.cpp:49
Definition: PtConnectionListener.h:33
Definition: PtEventMask.h:39
PT_CLASS_INFO_MEMBERS PtTerminalConnectionListener(PtEventMask *pMask=NULL)
Definition: PtTerminalConnectionListener.cpp:30
virtual void terminalConnectionDropped(const PtTerminalConnectionEvent &rEvent)
param: (in) rEvent - Reference to the PtEvent containing the specific event information.
Definition: PtTerminalConnectionListener.cpp:69