sipXcallLib home page


PsTaoSpeaker.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 _PsTaoSpeaker_h_
12 #define _PsTaoSpeaker_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 PsTaoSpeaker 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  OsStatus setVolume(int volume);
53  //:Sets the speaker volume to a value between OFF and FULL (inclusive).
58 
59 
60 /* ============================ ACCESSORS ================================= */
61  OsStatus getVolume(int& rVolume);
62  //:Sets <i>rVolume</i> to the current speaker volume level.
65 
66 
67 /* ============================ INQUIRY =================================== */
68 
69 /* //////////////////////////// PROTECTED ///////////////////////////////// */
70 protected:
71  PsTaoSpeaker(const UtlString& rComponentName, int componentType);
72 
73  PsTaoSpeaker();
74  //:Default constructor
75 
76  virtual
77  ~PsTaoSpeaker();
78  //:Destructor
79 
80 /* //////////////////////////// PRIVATE /////////////////////////////////// */
81 private:
82  int mVolume; // the volume
83 
84  PsTaoSpeaker(const PsTaoSpeaker& rPsTaoSpeaker);
85  //:Copy constructor (not implemented for this class)
86 
87  PsTaoSpeaker& operator=(const PsTaoSpeaker& rhs);
88  //:Assignment operator (not implemented for this class)
89 
90 };
91 
92 /* ============================ INLINE METHODS ============================ */
93 
94 #endif // _PsTaoSpeaker_h_
Definition: PsTaoComponent.h:32
Definition: PsTaoSpeaker.h:41
int mVolume
Definition: PsTaoSpeaker.h:82
Definition: PsTaoSpeaker.h:29
PsTaoSpeaker()
Definition: PsTaoSpeaker.cpp:29
Definition: PsTaoSpeaker.h:43
virtual ~PsTaoSpeaker()
Definition: PsTaoSpeaker.cpp:47
OsStatus setVolume(int volume)
enumcode: OFF - The speaker is turned off enumcode: MIDDLE - The speaker volume level is set to the m...
Definition: PsTaoSpeaker.cpp:63
OsStatus getVolume(int &rVolume)
param: volume - The speaker volume level retcode: OS_SUCCESS - Success retcode: OS_INVALID_ARGUMENT -...
Definition: PsTaoSpeaker.cpp:74
VolumeLevel
Definition: PsTaoSpeaker.h:39
Definition: PsPhoneTask.h:50
Definition: PsTaoSpeaker.h:42
PsTaoSpeaker & operator=(const PsTaoSpeaker &rhs)
Definition: PsTaoSpeaker.cpp:55