sipXcallLib home page


PsTaoRinger.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 #ifndef _PsTaoRinger_h_
12 #define _PsTaoRinger_h_
13 
14 // SYSTEM INCLUDES
15 
16 // APPLICATION INCLUDES
17 #include "ps/PsTaoComponent.h"
18 
19 // DEFINES
20 // MACROS
21 // EXTERNAL FUNCTIONS
22 // EXTERNAL VARIABLES
23 // CONSTANTS
24 // STRUCTS
25 // TYPEDEFS
26 // FORWARD DECLARATIONS
27 
28 //:The PsTaoRinger class models the keypad and feature buttons.
30 {
31  friend class PsPhoneTask;
32  // The PsPhoneTask is responsible for creating and destroying
33  // all objects derived from the PsTaoComponent class. No other entity
34  // should invoke the constructors or destructors for these classes.
35 
36 /* //////////////////////////// PUBLIC //////////////////////////////////// */
37 public:
38 
40  {
41  OFF = 0,
42  MIDDLE = 5,
43  FULL = 10
44  };
48 
49 /* ============================ CREATORS ================================== */
50 
51 /* ============================ MANIPULATORS ============================== */
52 
53  OsStatus setRingerInfo(int patternIndex, char* info);
54  //:Specifies the information string to associate with the indicated
55  //:ringer pattern.
56  // The <i>info</i> text string is used to provide additional
57  // ringer-related information to the phone system (for example, the
58  // sound file to associate with this ringer pattern).
64 
65  OsStatus setRingerPattern(int patternIndex);
66  //:Sets the ringer pattern given a valid index number.
67  // The pattern index should be a number between 0 and the value returned
68  // by getMaxRingPatternIndex().
72 
73  OsStatus setRingerVolume(int volume);
74  //:Sets the ringer volume to a value between OFF and FULL (inclusive).
79 
80 /* ============================ ACCESSORS ================================= */
81 
82  OsStatus getMaxRingPatternIndex(int& rMaxIndex);
83  //:Sets <i>rMaxIndex</i> to the maximum valid ringer pattern index.
86 
87  OsStatus getNumberOfRings(int& rNumRingCycles);
88  //:Sets <i>rNumRingCycles</i> to the number of complete ring cycles that the ringer has been ringing.
91 
92  OsStatus getRingerInfo(int patternIndex, char*& rpInfo);
93  //:Sets <i>rpInfo</i> to point to the information text string that is
94  //:associated with the specified ringer pattern.
100 
101  OsStatus getRingerPattern(int& rPatternIndex);
102  //:Sets <i>rPatternIndex</i> to the index of the current ringer pattern.
105 
106  OsStatus getRingerVolume(int& rVolume);
107  //:Sets <i>rVolume</i> to the current ringer volume level.
110 
111 /* ============================ INQUIRY =================================== */
112 
113  OsStatus isRingerOn(UtlBoolean& rIsOn);
114  //:Sets <i>rIsOn</i> to FALSE if the ringer is OFF and FALSE otherwise.
118 
119 /* //////////////////////////// PROTECTED ///////////////////////////////// */
120 protected:
121  PsTaoRinger(const UtlString& rComponentName, int componentType);
122 
123  PsTaoRinger();
124  //:Default constructor
125 
126  virtual
127  ~PsTaoRinger();
128  //:Destructor
129 
130 /* //////////////////////////// PRIVATE /////////////////////////////////// */
131 private:
132  int mVolume; // the volume
134 
135  PsTaoRinger(const PsTaoRinger& rPsTaoRinger);
136  //:Copy constructor (not implemented for this class)
137 
138  PsTaoRinger& operator=(const PsTaoRinger& rhs);
139  //:Assignment operator (not implemented for this class)
140 
141 };
142 
143 /* ============================ INLINE METHODS ============================ */
144 
145 #endif // _PsTaoRinger_h_
PsTaoRinger()
Definition: PsTaoRinger.cpp:29
Definition: PsTaoComponent.h:32
OsStatus setRingerPattern(int patternIndex)
param: patternIndex - Identifies the pattern whose info string will be modified. param: info - The te...
Definition: PsTaoRinger.cpp:68
bool mIsRingerOn
Definition: PsTaoRinger.h:133
Definition: PsTaoRinger.h:29
RingerLevel
Definition: PsTaoRinger.h:39
OsStatus getRingerPattern(int &rPatternIndex)
param: patternIndex - identifies the pattern whose info string will be modified. param: rpInfo - set ...
Definition: PsTaoRinger.cpp:97
Definition: PsTaoRinger.h:41
int mVolume
Definition: PsTaoRinger.h:132
OsStatus getNumberOfRings(int &rNumRingCycles)
retcode: OS_SUCCESS - Success retcode: OS_PROVIDER_UNAVAILABLE - The provider is not available ...
Definition: PsTaoRinger.cpp:87
OsStatus getMaxRingPatternIndex(int &rMaxIndex)
param: volume - The ringer volume level retcode: OS_SUCCESS - Success retcode: OS_INVALID_ARGUMENT - ...
Definition: PsTaoRinger.cpp:82
Definition: PsTaoRinger.h:43
OsStatus setRingerVolume(int volume)
retcode: OS_SUCCESS - Success retcode: OS_INVALID_ARGUMENT - Invalid pattern index retcode: OS_PROVID...
Definition: PsTaoRinger.cpp:73
OsStatus getRingerVolume(int &rVolume)
retcode: OS_SUCCESS - Success retcode: OS_PROVIDER_UNAVAILABLE - The provider is not available ...
Definition: PsTaoRinger.cpp:102
PsTaoRinger & operator=(const PsTaoRinger &rhs)
Definition: PsTaoRinger.cpp:55
OsStatus isRingerOn(UtlBoolean &rIsOn)
retcode: OS_SUCCESS - Success retcode: OS_PROVIDER_UNAVAILABLE - The provider is not available ...
Definition: PsTaoRinger.cpp:110
virtual ~PsTaoRinger()
Definition: PsTaoRinger.cpp:47
OsStatus setRingerInfo(int patternIndex, char *info)
enumcode: OFF - The ringer is turned off enumcode: MIDDLE - The ringer volume is set to the middle of...
Definition: PsTaoRinger.cpp:63
Definition: PsTaoRinger.h:42
Definition: PsPhoneTask.h:50
OsStatus getRingerInfo(int patternIndex, char *&rpInfo)
retcode: OS_SUCCESS - Success retcode: OS_PROVIDER_UNAVAILABLE - The provider is not available ...
Definition: PsTaoRinger.cpp:92