sipXcallLib home page


PtTerminalComponentListener.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 _PtTerminalComponentListener_h_
13 #define _PtTerminalComponentListener_h_
14 
15 // SYSTEM INCLUDES
16 // APPLICATION INCLUDES
18 // DEFINES
19 // MACROS
20 // EXTERNAL FUNCTIONS
21 // EXTERNAL VARIABLES
22 // CONSTANTS
23 // STRUCTS
24 // TYPEDEFS
25 // FORWARD DECLARATIONS
29 class PtEventMask;
30 
31 //:The PtTerminalComponentListener is used to register with and receive
32 //:events from PtTerminal objects.
33 
35 {
36 /* //////////////////////////// PUBLIC //////////////////////////////////// */
37 public:
39 
40 /* ============================ CREATORS ================================== */
41 
42  PtTerminalComponentListener(const char* name = NULL, PtEventMask* pMask = NULL);
43  //:Default constructor
45 
46  virtual
48  //:Destructor
49 
50 /* ============================ MANIPULATORS ============================== */
51 
52  virtual void phoneRingerVolumeChanged(const PtComponentIntChangeEvent& rEvent);
53  //:Method invoked on listener for event id =
54  //:PHONE_RINGER_VOLUME_CHANGED
55  //:indicating that the PtPhoneRinger volume has changed.
56  // The event parameter is valid only within
57  // this method. The implementation must copy the event if
58  // it is needed beyond the scope of an invocation. The implementation
59  // of this method should not block as it may prevent other listeners
60  // from processing events in a timely fashion.
62 
63  virtual void phoneRingerPatternChanged(const PtComponentIntChangeEvent& rEvent);
64  //:Method invoked on listener for event id =
65  //:PHONE_RINGER_PATTERN_CHANGED
66  //:indicating that the PtPhoneRinger audio pattern to be played when ringing has changed.
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 phoneRingerInfoChanged(const PtComponentStringChangeEvent& rEvent);
75  //:Method invoked on listener for event id =
76  //:PHONE_RINGER_INFO_CHANGED
77  //:indicating that the PtPhoneRinger info string has changed.
78  // The event parameter is valid only within
79  // this method. The implementation must copy the event if
80  // it is needed beyond the scope of an invocation. The implementation
81  // of this method should not block as it may prevent other listeners
82  // from processing events in a timely fashion.
84 
85  virtual void phoneSpeakerVolumeChanged(const PtComponentIntChangeEvent& rEvent);
86  //:Method invoked on listener for event id =
87  //:PHONE_SPEAKER_VOLUME_CHANGED
88  //:indicating that the associated PtPhoneSpeaker volume has changed.
89  // The event parameter is valid only within
90  // this method. The implementation must copy the event if
91  // it is needed beyond the scope of an invocation. The implementation
92  // of this method should not block as it may prevent other listeners
93  // from processing events in a timely fashion.
95 
96  virtual void phoneMicrophoneGainChanged(const PtComponentIntChangeEvent& rEvent);
97  //:Method invoked on listener for event id =
98  //:PHONE_MICROPHONE_GAIN_CHANGED
99  //:indicating that the associated PtPhoneMicrophone gain has changed.
100  // The event parameter is valid only within
101  // this method. The implementation must copy the event if
102  // it is needed beyond the scope of an invocation. The implementation
103  // of this method should not block as it may prevent other listeners
104  // from processing events in a timely fashion.
106 
107  virtual void phoneLampModeChanged(const PtComponentIntChangeEvent& rEvent);
108  //:Method invoked on listener for event id =
109  //:PHONE_LAMP_MODE_CHANGED
110  //:indicating that the associated PtPhoneLamp mode has changed.
111  // The event parameter is valid only within
112  // this method. The implementation must copy the event if
113  // it is needed beyond the scope of an invocation. The implementation
114  // of this method should not block as it may prevent other listeners
115  // from processing events in a timely fashion.
117 
118  virtual void phoneButtonInfoChanged(const PtComponentStringChangeEvent& rEvent);
119  //:Method invoked on listener for event id =
120  //:PHONE_BUTTON_INFO_CHANGED
121  //:indicating that the associated PtPhoneButton info string has changed.
122  // The event parameter is valid only within
123  // this method. The implementation must copy the event if
124  // it is needed beyond the scope of an invocation. The implementation
125  // of this method should not block as it may prevent other listeners
126  // from processing events in a timely fashion.
128 
129  virtual void phoneButtonUp(const PtTerminalComponentEvent& rEvent);
130  //:Method invoked on listener for event id =
131  //:PHONE_BUTTON_UP
132  //:indicating that the associated PtPhoneButton has changed to the up
133  //:(released) position.
134  // The event parameter is valid only within
135  // this method. The implementation must copy the event if
136  // it is needed beyond the scope of an invocation. The implementation
137  // of this method should not block as it may prevent other listeners
138  // from processing events in a timely fashion.
140 
141  virtual void phoneButtonDown(const PtTerminalComponentEvent& rEvent);
142  //:Method invoked on listener for event id =
143  //:PHONE_BUTTON_DOWN
144  //:indicating that the associated PtPhoneButton has changed to the down
145  //:(pressed) position.
146  // The event parameter is valid only within
147  // this method. The implementation must copy the event if
148  // it is needed beyond the scope of an invocation. The implementation
149  // of this method should not block as it may prevent other listeners
150  // from processing events in a timely fashion.
152 
153  virtual void phoneButtonRepeat(const PtTerminalComponentEvent& rEvent);
154  //:Method invoked on listener for event id =
155  //:PHONE_BUTTON_DOWN
156  //:indicating that the associated PtPhoneButton has changed to the down
157  //:(pressed) position.
158  // The event parameter is valid only within
159  // this method. The implementation must copy the event if
160  // it is needed beyond the scope of an invocation. The implementation
161  // of this method should not block as it may prevent other listeners
162  // from processing events in a timely fashion.
164 
165  virtual void phoneHookswitchOffhook(const PtTerminalComponentEvent& rEvent);
166  //:Method invoked on listener for event id =
167  //:PHONE_HOOKSWITCH_OFFHOOK
168  //:indicating that the PtPhoneHookswitch has changed to the offhook state.
169  // The event parameter is valid only within
170  // this method. The implementation must copy the event if
171  // it is needed beyond the scope of an invocation. The implementation
172  // of this method should not block as it may prevent other listeners
173  // from processing events in a timely fashion.
175 
176  virtual void phoneHookswitchOnhook(const PtTerminalComponentEvent& rEvent);
177  //:Method invoked on listener for event id =
178  //:PHONE_HOOKSWITCH_ONHOOK
179  //:indicating that the PtPhoneHookswitch has changed to the onhook state.
180  // The event parameter is valid only within
181  // this method. The implementation must copy the event if
182  // it is needed beyond the scope of an invocation. The implementation
183  // of this method should not block as it may prevent other listeners
184  // from processing events in a timely fashion.
186 
187  virtual void phoneDisplayChanged(const PtTerminalComponentEvent& rEvent);
188  //:Method invoked on listener for event id =
189  //:PHONE_DISPLAY_CHANGED
190  //:indicates that the PtPhoneDisplay has changed.
191  // The event parameter is valid only within
192  // this method. The implementation must copy the event if
193  // it is needed beyond the scope of an invocation. The implementation
194  // of this method should not block as it may prevent other listeners
195  // from processing events in a timely fashion.
197 
198  virtual void phoneHandsetVolumeChanged(const PtComponentIntChangeEvent& rEvent);
199  //:Method invoked on listener for event id =
200  //:PHONE_HANDSET_VOLUME_CHANGED
201  //:indicating that the phone handset speaker volume has changed.
202  // The event parameter is valid only within
203  // this method. The implementation must copy the event if
204  // it is needed beyond the scope of an invocation. The implementation
205  // of this method should not block as it may prevent other listeners
206  // from processing events in a timely fashion.
208 
209  virtual void phoneExtSpeakerConnected(const PtTerminalComponentEvent& rEvent);
210  //:Method invoked on listener for event id =
211  //:PHONE_EXTSPEAKER_CONNECTED
212  //:indicating that the phone external speaker has been plugged in.
213  // The event parameter is valid only within
214  // this method. The implementation must copy the event if
215  // it is needed beyond the scope of an invocation. The implementation
216  // of this method should not block as it may prevent other listeners
217  // from processing events in a timely fashion.
219 
220  virtual void phoneExtSpeakerDisconnected(const PtTerminalComponentEvent& rEvent);
221  //:Method invoked on listener for event id =
222  //:PHONE_EXTSPEAKER_CONNECTED
223  //:indicating that the phone external speaker has been plugged in.
224  // The event parameter is valid only within
225  // this method. The implementation must copy the event if
226  // it is needed beyond the scope of an invocation. The implementation
227  // of this method should not block as it may prevent other listeners
228  // from processing events in a timely fashion.
230 
231 /* ============================ ACCESSORS ================================= */
232 
233  static const char* className();
234  //:Returns the name of this class
236 
237 /* ============================ INQUIRY =================================== */
238 
239  virtual PtBoolean isClass(const char* pClassName);
240  //:Determines if this object if of the specified type.
244 
245  virtual PtBoolean isInstanceOf(const char* pClassName);
246  //:Determines if this object is either an instance of or is derived from
247  //:the specified type.
251 
252 /* //////////////////////////// PROTECTED ///////////////////////////////// */
253 protected:
254  PtTerminalComponentListener(const PtTerminalComponentListener& rPtTerminalComponentListener);
255  //:Copy constructor
256 
257  PtTerminalComponentListener& operator=(const PtTerminalComponentListener& rhs);
258  //:Assignment operator
259 
260 /* //////////////////////////// PRIVATE /////////////////////////////////// */
261 private:
262 
263 
264 };
265 
266 /* ============================ INLINE METHODS ============================ */
267 
268 #endif // _PtTerminalComponentListener_h_
virtual void phoneButtonDown(const PtTerminalComponentEvent &rEvent)
param: (in) rEvent - Reference to the PtEvent containing the specific event information.
Definition: PtTerminalComponentListener.cpp:92
virtual void phoneDisplayChanged(const PtTerminalComponentEvent &rEvent)
param: (in) rEvent - Reference to the PtEvent containing the specific event information.
Definition: PtTerminalComponentListener.cpp:108
virtual void phoneSpeakerVolumeChanged(const PtComponentIntChangeEvent &rEvent)
param: (in) rEvent - Reference to the PtEvent containing the specific event information.
Definition: PtTerminalComponentListener.cpp:72
virtual void phoneRingerVolumeChanged(const PtComponentIntChangeEvent &rEvent)
Definition: PtTerminalComponentListener.cpp:60
virtual void phoneLampModeChanged(const PtComponentIntChangeEvent &rEvent)
param: (in) rEvent - Reference to the PtEvent containing the specific event information.
Definition: PtTerminalComponentListener.cpp:80
int PtBoolean
Definition: PtDefs.h:71
Definition: PtTerminalComponentEvent.h:41
virtual void phoneRingerInfoChanged(const PtComponentStringChangeEvent &rEvent)
param: (in) rEvent - Reference to the PtEvent containing the specific event information.
Definition: PtTerminalComponentListener.cpp:68
virtual void phoneRingerPatternChanged(const PtComponentIntChangeEvent &rEvent)
param: (in) rEvent - Reference to the PtEvent containing the specific event information.
Definition: PtTerminalComponentListener.cpp:64
PtTerminalComponentListener & operator=(const PtTerminalComponentListener &rhs)
Definition: PtTerminalComponentListener.cpp:52
Definition: PtTerminalComponentListener.h:34
virtual void phoneButtonInfoChanged(const PtComponentStringChangeEvent &rEvent)
param: (in) rEvent - Reference to the PtEvent containing the specific event information.
Definition: PtTerminalComponentListener.cpp:84
virtual void phoneHandsetVolumeChanged(const PtComponentIntChangeEvent &rEvent)
param: (in) rEvent - Reference to the PtEvent containing the specific event information.
Definition: PtTerminalComponentListener.cpp:112
virtual PtBoolean isClass(const char *pClassName)
returns: Returns the string representation of the name of this class
virtual void phoneHookswitchOffhook(const PtTerminalComponentEvent &rEvent)
param: (in) rEvent - Reference to the PtEvent containing the specific event information.
Definition: PtTerminalComponentListener.cpp:100
virtual PtBoolean isInstanceOf(const char *pClassName)
param: (in) pClassName - the string to compare with the name of this class. retcode: TRUE - if the gi...
Definition: PtComponentIntChangeEvent.h:29
#define PT_CLASS_INFO_MEMBERS
Definition: PtDefs.h:73
PT_CLASS_INFO_MEMBERS PtTerminalComponentListener(const char *name=NULL, PtEventMask *pMask=NULL)
Definition: PtTerminalComponentListener.cpp:33
virtual void phoneButtonUp(const PtTerminalComponentEvent &rEvent)
param: (in) rEvent - Reference to the PtEvent containing the specific event information.
Definition: PtTerminalComponentListener.cpp:88
virtual void phoneExtSpeakerDisconnected(const PtTerminalComponentEvent &rEvent)
param: (in) rEvent - Reference to the PtEvent containing the specific event information.
Definition: PtTerminalComponentListener.cpp:120
virtual void phoneMicrophoneGainChanged(const PtComponentIntChangeEvent &rEvent)
param: (in) rEvent - Reference to the PtEvent containing the specific event information.
Definition: PtTerminalComponentListener.cpp:76
static const char * className()
param: (in) rEvent - Reference to the PtEvent containing the specific event information.
virtual ~PtTerminalComponentListener()
param: (in) pMask - Event mask defining events the listener is interested in. This must be a subset o...
Definition: PtTerminalComponentListener.cpp:44
Definition: PtComponentStringChangeEvent.h:30
virtual void phoneButtonRepeat(const PtTerminalComponentEvent &rEvent)
param: (in) rEvent - Reference to the PtEvent containing the specific event information.
Definition: PtTerminalComponentListener.cpp:96
Definition: PtEventMask.h:39
virtual void phoneExtSpeakerConnected(const PtTerminalComponentEvent &rEvent)
param: (in) rEvent - Reference to the PtEvent containing the specific event information.
Definition: PtTerminalComponentListener.cpp:116
Definition: PtTerminalListener.h:31
virtual void phoneHookswitchOnhook(const PtTerminalComponentEvent &rEvent)
param: (in) rEvent - Reference to the PtEvent containing the specific event information.
Definition: PtTerminalComponentListener.cpp:104