sipXcallLib home page


PsTaoMicrophone.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 _PsTaoMicrophone_h_
12 #define _PsTaoMicrophone_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 PsTaoMicrophone 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 
39  enum GainLevel
40  {
41  OFF = 0,
42  MIDDLE = 5,
43  FULL = 10
44  };
48 
49 /* ============================ CREATORS ================================== */
50 
51 /* ============================ MANIPULATORS ============================== */
52 
53  OsStatus setGain(int gain);
54  //:Sets the microphone gain (volume) to a value between OFF and
55  //:FULL (inclusive).
60 
61 /* ============================ ACCESSORS ================================= */
62 
63  OsStatus getGain(int& rGain);
64  //:Sets <i>rGain</i> to the current microphone gain level.
67 
68 /* ============================ INQUIRY =================================== */
69 
70 /* //////////////////////////// PROTECTED ///////////////////////////////// */
71 protected:
72  PsTaoMicrophone(const UtlString& rComponentName, int componentType);
73 
75  //:Default constructor
76 
77  virtual
79  //:Destructor
80 
81 /* //////////////////////////// PRIVATE /////////////////////////////////// */
82 private:
83  int mGain; // the gain
84 
85  PsTaoMicrophone(const PsTaoMicrophone& rPsTaoMicrophone);
86  //:Copy constructor (not implemented for this class)
87 
89  //:Assignment operator (not implemented for this class)
90 
91 };
92 
93 /* ============================ INLINE METHODS ============================ */
94 
95 #endif // _PsTaoMicrophone_h_
Definition: PsTaoComponent.h:32
OsStatus setGain(int gain)
enumcode: OFF - The microphone is turned off enumcode: MIDDLE - The microphone gain is set to the mid...
Definition: PsTaoMicrophone.cpp:63
OsStatus getGain(int &rGain)
param: gain - The microphone gain level retcode: OS_SUCCESS - Success retcode: OS_INVALID_ARGUMENT - ...
Definition: PsTaoMicrophone.cpp:72
int mGain
Definition: PsTaoMicrophone.h:83
Definition: PsTaoMicrophone.h:41
GainLevel
Definition: PsTaoMicrophone.h:39
Definition: PsTaoMicrophone.h:43
Definition: PsTaoMicrophone.h:29
PsTaoMicrophone & operator=(const PsTaoMicrophone &rhs)
Definition: PsTaoMicrophone.cpp:55
virtual ~PsTaoMicrophone()
Definition: PsTaoMicrophone.cpp:47
PsTaoMicrophone()
Definition: PsTaoMicrophone.cpp:29
Definition: PsTaoMicrophone.h:42
Definition: PsPhoneTask.h:50