sipXcallLib home page


TaoPhoneComponentAdaptor.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 _TaoPhoneComponentAdaptor_h_
13 #define _TaoPhoneComponentAdaptor_h_
14 
15 // SYSTEM INCLUDES
16 // APPLICATION INCLUDES
17 #include "tao/TaoAdaptor.h"
18 // DEFINES
19 // MACROS
20 // EXTERNAL FUNCTIONS
21 // EXTERNAL VARIABLES
22 // CONSTANTS
23 // STRUCTS
24 // TYPEDEFS
25 // FORWARD DECLARATIONS
26 class PsPhoneTask;
27 class PsButtonTask;
28 class PsHookswTask;
29 class TaoPhoneLamp;
30 class TaoTransportTask;
31 class TaoMessage;
32 
34 {
35 /* //////////////////////////// PUBLIC //////////////////////////////////// */
36 public:
37 
38 /* ============================ CREATORS ================================== */
40  TaoMessage& rMsg,
41  const UtlString& name = "TaoPhoneComponentAdaptor",
42  const int maxRequestQMsgs=DEF_MAX_MSGS);
43 
44  //:Default constructor
45 
46  virtual
48  //:Destructor
49 
50 /* ============================ MANIPULATORS ============================== */
51 
52  virtual UtlBoolean handleMessage(OsMsg& rMsg);
53  //:Handle an incoming message.
54  // If the message is not one that the object is prepared to process,
55  // the handleMessage() method in the derived class should return FALSE
56  // which will cause the OsServerTask::handleMessage() method to be
57  // invoked on the message.
58 
60 
62 
64  //:Press this button.
67 
69  //:Set the information associated with this button.
73 
75 
77  //:Specifies the information string to associate with the indicated
78  //:ringer pattern.
79  // The <i>info</i> text string is used to provide additional
80  // ringer-related information to the phone system (for example, the
81  // sound file to associate with this ringer pattern).
87 
89  //:Sets the ringer pattern given a valid index number.
90  // The pattern index should be a number between 0 and the value returned
91  // by getMaxRingPatternIndex().
95 
97  //:Sets the ringer volume to a value between OFF and FULL (inclusive).
102 
104  //:Sets the microphone gain (volume) to a value between OFF and
105  //:FULL (inclusive).
110 
112  //:Sets the speaker volume to a value between OFF and FULL (inclusive).
117 
119  //:Sets the external speaker volume to a value between OFF and FULL (inclusive).
124 
126  //:Sets the indicator to one of its supported modes.
130 
132  //:Sets the display string at position (x, y).
133 
135  //:Sets the display contrast.
136 
137 
139  //:Enables the audio apparatus associated with the component group.
140  // Returns TRUE if successful, FALSE if unsuccessful
141 
143  //:Disables the audio apparatus associated with the component group.
144  // Returns TRUE if successful, FALSE if unsuccessful
145 
147 
148 /* ============================ ACCESSORS ================================= */
149 
151  //:Returns a pointer to the PtPhoneLamp object associated with this button.
155 
157 
159 
161  //:Returns the information associated with this button.
163 
164 
166  //:Sets <i>rMaxIndex</i> to the maximum valid ringer pattern index.
169 
171  //:Sets <i>rNumRingCycles</i> to the number of complete ring cycles that the ringer has been ringing.
174 
176  //:Sets <i>rpInfo</i> to point to the information text string that is
177  //:associated with the specified ringer pattern.
183 
185  //:Sets <i>rPatternIndex</i> to the index of the current ringer pattern.
188 
190  //:Sets <i>rVolume</i> to the current ringer volume level.
193 
195  //:Sets <i>rGain</i> to the current microphone gain level.
198 
200  //:Sets <i>rVolume</i> to the current speaker volume level.
203 
205  //:Sets <i>rVolume</i> to the nominal speaker volume level.
208 
210  //:Sets <i>rVolume</i> to the current external speaker volume level.
213 
215  //:Sets <i>rVolume</i> to the nominal external speaker volume level.
218 
220  //:Returns a pointer to the PsTaoButton object associated with this indicator.
224 
226  //:Sets <i>rMode</i> to the current mode for this indicator,
229 
231  //:Sets <i>rModeMask</i> to all of the modes that are supported for this indicator.
232 
234  //:Returns the display rows.
235 
237  //:Returns the display columns.
238 
240  // returns the string displayed at (x, y)
241 
243  //:Gets the display contrast.
244 
246  //:Returns pointers to the components in this group.
247  // The caller provides an array that can hold up to <i>size</i>
248  // PsTaoComponent pointers. This method fills in the <i>pComponents</i>
249  // array with up to <i>size</i> pointers. The actual number of items
250  // filled in is passed back via the <i>nItems</i> argument.
251  // Returns OS_LIMIT_REACHED if there are more than <i>nItems</i>
252  // components in the group. Otherwise, returns OS_SUCCESS.
253 
255  //:Returns a string describing the component group.
256 
258  //:Returns the type of the component group, either HEAD_SET, HAND_SET,
259  //:SPEAKER_PHONE, PHONE_SET or OTHER.
260 
261 /* ============================ INQUIRY =================================== */
262 
264  //:Sets <i>rIsOn</i> to FALSE if the ringer is OFF and FALSE otherwise.
268 
269 
271  //:Determine whether the audio apparatus associated with the component
272  //:group is enabled.
273  // Returns TRUE if activated, FALSE if deactivated.
274 
275 /* //////////////////////////// PROTECTED ///////////////////////////////// */
276 protected:
281 
282  int mLCDContrast; // current LCD level, for LCD contrast level adjustment
283  int mLCDLow; // minimum LCD level, for LCD adjustment
284  int mLCDHigh; // maximum LCD level, for LCD adjustment
285  int mLCDOffset; // LCD offset, for LCD adjustment
286 
287 /* //////////////////////////// PRIVATE /////////////////////////////////// */
288 private:
289 
290  TaoPhoneComponentAdaptor(const TaoPhoneComponentAdaptor& rTaoPhoneComponentAdaptor);
291  //:Copy constructor (not implemented for this class)
292 
294  //:Assignment operator (not implemented for this class)
295 
296  TaoPhoneLamp* mpLamp;
297  UtlString mInfo;
299 
300 
301 };
302 
303 /* ============================ INLINE METHODS ============================ */
304 
305 #endif // _TaoPhoneComponentAdaptor_h_
TaoStatus getRingerPattern(TaoMessage &rMsg)
param: patternIndex - identifies the pattern whose info string will be modified. param: rpInfo - set ...
Definition: TaoPhoneComponentAdaptor.cpp:791
TaoPhoneComponentAdaptor(TaoTransportTask *&rpSvrTransport, TaoMessage &rMsg, const UtlString &name="TaoPhoneComponentAdaptor", const int maxRequestQMsgs=DEF_MAX_MSGS)
Definition: TaoPhoneComponentAdaptor.cpp:40
TaoStatus isRingerOn(TaoMessage &rMsg)
Definition: TaoPhoneComponentAdaptor.cpp:1107
TaoStatus setHookswState(TaoMessage &rMsg)
param: (in) buttonInfo - The string to associate with this button retcode: PT_SUCCESS - Success retco...
Definition: TaoPhoneComponentAdaptor.cpp:474
TaoPhoneComponentAdaptor & operator=(const TaoPhoneComponentAdaptor &rhs)
Definition: TaoPhoneComponentAdaptor.cpp:385
PsHookswTask * mpHookswTask
Definition: TaoPhoneComponentAdaptor.h:279
Definition: TaoMessage.h:51
TaoStatus setRingerVolume(TaoMessage &rMsg)
retcode: TAO_SUCCESS - Success retcode: TAO_INVALID_ARGUMENT - Invalid pattern index retcode: TAO_PRO...
Definition: TaoPhoneComponentAdaptor.cpp:528
TaoStatus getGroupDescription(TaoMessage &rMsg)
Definition: TaoPhoneComponentAdaptor.cpp:1075
TaoStatus deactivateGroup(TaoMessage &rMsg)
Definition: TaoPhoneComponentAdaptor.cpp:691
PsPhoneTask * mpPhoneTask
Definition: TaoPhoneComponentAdaptor.h:278
Abstract event handler for processing call management event.
Definition: TaoAdaptor.h:41
int mHookswState
Definition: TaoPhoneComponentAdaptor.h:298
TaoStatus setRingerPattern(TaoMessage &rMsg)
param: patternIndex - Identifies the pattern whose info string will be modified. param: info - The te...
Definition: TaoPhoneComponentAdaptor.cpp:513
TaoPhoneLamp * mpLamp
Definition: TaoPhoneComponentAdaptor.h:296
TaoStatus getMaxRingPatternIndex(TaoMessage &rMsg)
param: (out) rpInfo - A pointer to the string associated with this button
Definition: TaoPhoneComponentAdaptor.cpp:760
TaoStatus getDisplay(TaoMessage &rMsg)
Definition: TaoPhoneComponentAdaptor.cpp:1007
TaoStatus returnResult(TaoMessage &rMsg)
Definition: TaoPhoneComponentAdaptor.cpp:1094
Definition: TaoPhoneComponentAdaptor.h:33
TaoStatus setExtSpeakerVolume(TaoMessage &rMsg)
param: volume - The speaker volume level retcode: TAO_SUCCESS - Success retcode: TAO_INVALID_ARGUMENT...
Definition: TaoPhoneComponentAdaptor.cpp:583
TaoStatus buttonUp(TaoMessage &rMsg)
Definition: TaoPhoneComponentAdaptor.cpp:414
TaoStatus setMicGain(TaoMessage &rMsg)
param: volume - The ringer volume level retcode: TAO_SUCCESS - Success retcode: TAO_INVALID_ARGUMENT ...
Definition: TaoPhoneComponentAdaptor.cpp:544
Definition: PsButtonTask.h:40
Definition: TaoTransportTask.h:45
TaoStatus getGroupType(TaoMessage &rMsg)
Definition: TaoPhoneComponentAdaptor.cpp:1084
UtlString mInfo
Definition: TaoPhoneComponentAdaptor.h:297
TaoStatus setDisplayContrast(TaoMessage &rMsg)
Definition: TaoPhoneComponentAdaptor.cpp:634
TaoStatus setSpeakerVolume(TaoMessage &rMsg)
param: gain - The microphone gain level retcode: TAO_SUCCESS - Success retcode: TAO_INVALID_ARGUMENT ...
Definition: TaoPhoneComponentAdaptor.cpp:562
TaoStatus getSpeakerNominalVolume(TaoMessage &rMsg)
retcode: TAO_SUCCESS - Success retcode: TAO_PROVIDER_UNAVAILABLE - The provider is not available ...
Definition: TaoPhoneComponentAdaptor.cpp:871
int mLCDOffset
Definition: TaoPhoneComponentAdaptor.h:285
TaoStatus getHookswCall(TaoMessage &rMsg)
Definition: TaoPhoneComponentAdaptor.cpp:747
TaoStatus activateGroup(TaoMessage &rMsg)
Definition: TaoPhoneComponentAdaptor.cpp:675
int mLCDLow
Definition: TaoPhoneComponentAdaptor.h:283
int mLCDHigh
Definition: TaoPhoneComponentAdaptor.h:284
TaoStatus setDisplay(TaoMessage &rMsg)
retcode: TAO_SUCCESS - Success retcode: TAO_INVALID_ARGUMENT - The requested mode is not supported by...
Definition: TaoPhoneComponentAdaptor.cpp:622
Definition: PsHookswTask.h:41
TaoStatus getDisplayColumns(TaoMessage &rMsg)
Definition: TaoPhoneComponentAdaptor.cpp:995
TaoStatus getAssociatedPhoneLamp(TaoMessage &rMsg)
Definition: TaoPhoneComponentAdaptor.cpp:710
TaoStatus
Definition: TaoDefs.h:41
TaoStatus buttonPress(TaoMessage &rMsg)
Definition: TaoPhoneComponentAdaptor.cpp:393
TaoTransportTask * mpSvrTransport
Definition: TaoPhoneComponentAdaptor.h:280
TaoStatus getSupportedLampModes(TaoMessage &rMsg)
retcode: TAO_SUCCESS - Success retcode: TAO_PROVIDER_UNAVAILABLE - The provider is not available ...
Definition: TaoPhoneComponentAdaptor.cpp:975
TaoStatus getNumberOfRings(TaoMessage &rMsg)
retcode: TAO_SUCCESS - Success retcode: TAO_PROVIDER_UNAVAILABLE - The provider is not available ...
Definition: TaoPhoneComponentAdaptor.cpp:768
TaoStatus getSpeakerVolume(TaoMessage &rMsg)
retcode: TAO_SUCCESS - Success retcode: TAO_PROVIDER_UNAVAILABLE - The provider is not available ...
Definition: TaoPhoneComponentAdaptor.cpp:843
TaoStatus getGroupComponents(TaoMessage &rMsg)
Definition: TaoPhoneComponentAdaptor.cpp:1065
TaoStatus getExtSpeakerVolume(TaoMessage &rMsg)
retcode: TAO_SUCCESS - Success retcode: TAO_PROVIDER_UNAVAILABLE - The provider is not available ...
Definition: TaoPhoneComponentAdaptor.cpp:899
PsButtonTask * mpButtonTask
Definition: TaoPhoneComponentAdaptor.h:277
TaoStatus setButtonInfo(TaoMessage &rMsg)
retcode: PT_SUCCESS - Success retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available ...
Definition: TaoPhoneComponentAdaptor.cpp:452
TaoStatus getButtonInfo(TaoMessage &rMsg)
Definition: TaoPhoneComponentAdaptor.cpp:726
TaoStatus getDisplayRows(TaoMessage &rMsg)
Definition: TaoPhoneComponentAdaptor.cpp:983
TaoStatus getRingerVolume(TaoMessage &rMsg)
retcode: TAO_SUCCESS - Success retcode: TAO_PROVIDER_UNAVAILABLE - The provider is not available ...
Definition: TaoPhoneComponentAdaptor.cpp:799
TaoStatus setRingerInfo(TaoMessage &rMsg)
Definition: TaoPhoneComponentAdaptor.cpp:491
TaoStatus isGroupActivated(TaoMessage &rMsg)
param: (out) rIsOn - TRUE ==> ringer is ON, FALSE ==> ringer is OFF retcode: TAO_SUCCESS - Success re...
Definition: TaoPhoneComponentAdaptor.cpp:1115
TaoStatus setLampMode(TaoMessage &rMsg)
param: volume - The speaker volume level retcode: TAO_SUCCESS - Success retcode: TAO_INVALID_ARGUMENT...
Definition: TaoPhoneComponentAdaptor.cpp:604
int mLCDContrast
Definition: TaoPhoneComponentAdaptor.h:282
TaoStatus getExtSpeakerNominalVolume(TaoMessage &rMsg)
retcode: TAO_SUCCESS - Success retcode: TAO_PROVIDER_UNAVAILABLE - The provider is not available ...
Definition: TaoPhoneComponentAdaptor.cpp:927
TaoStatus getHookswState(TaoMessage &rMsg)
param: (out) rpLamp - The pointer to the associated lamp object retcode: PT_SUCCESS - Success retcode...
Definition: TaoPhoneComponentAdaptor.cpp:735
virtual ~TaoPhoneComponentAdaptor()
Definition: TaoPhoneComponentAdaptor.cpp:79
TaoStatus getAssociatedPhoneButton(TaoMessage &rMsg)
retcode: TAO_SUCCESS - Success retcode: TAO_PROVIDER_UNAVAILABLE - The provider is not available ...
Definition: TaoPhoneComponentAdaptor.cpp:955
virtual UtlBoolean handleMessage(OsMsg &rMsg)
Handle an incoming message.
Definition: TaoPhoneComponentAdaptor.cpp:85
Definition: PsPhoneTask.h:50
TaoStatus getRingerInfo(TaoMessage &rMsg)
retcode: TAO_SUCCESS - Success retcode: TAO_PROVIDER_UNAVAILABLE - The provider is not available ...
Definition: TaoPhoneComponentAdaptor.cpp:776
TaoStatus getLampMode(TaoMessage &rMsg)
param: (out) rpButton - The pointer to the associated button object retcode: TAO_SUCCESS - Success re...
Definition: TaoPhoneComponentAdaptor.cpp:967
TaoStatus getMicGain(TaoMessage &rMsg)
retcode: TAO_SUCCESS - Success retcode: TAO_PROVIDER_UNAVAILABLE - The provider is not available ...
Definition: TaoPhoneComponentAdaptor.cpp:820
TaoStatus getDisplayContrast(TaoMessage &rMsg)
Definition: TaoPhoneComponentAdaptor.cpp:1019
TaoStatus buttonDown(TaoMessage &rMsg)
Definition: TaoPhoneComponentAdaptor.cpp:433