sipXcallLib home page


PtPhoneMicrophone.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 _PtPhoneMicrophone_h_
13 #define _PtPhoneMicrophone_h_
14 
15 // SYSTEM INCLUDES
16 // APPLICATION INCLUDES
17 #include "os/OsTime.h"
18 #include "os/OsProtectEventMgr.h"
19 // DEFINES
20 // MACROS
21 // EXTERNAL FUNCTIONS
22 // EXTERNAL VARIABLES
23 // CONSTANTS
24 // STRUCTS
25 // TYPEDEFS
26 // FORWARD DECLARATIONS
27 class TaoClientTask;
28 
29 //:The PtPhoneMicrophone class models a phone microphone.
30 
32 {
33 /* //////////////////////////// PUBLIC //////////////////////////////////// */
34 public:
35 
36  enum GainLevel
37  {
38  OFF = 0,
39  MIDDLE = 5,
40  FULL = 10
41  };
45 
46 /* ============================ CREATORS ================================== */
48  //:Default constructor
49 
51 
52  PtPhoneMicrophone(const PtPhoneMicrophone& rPtPhoneMicrophone);
53  //:Copy constructor (not implemented for this class)
54 
56  //:Assignment operator (not implemented for this class)
57 
58  virtual
60  //:Destructor
61 
62 
63 /* ============================ MANIPULATORS ============================== */
64 
65  virtual PtStatus setGain(int gain);
66  //:Sets the microphone gain (volume) to a value between OFF and
67  //:FULL (inclusive).
72 
73 /* ============================ ACCESSORS ================================= */
74 
75  virtual PtStatus getGain(int& rGain);
76  //:Sets <i>rGain</i> to the current microphone gain level.
79 
80 /* ============================ INQUIRY =================================== */
81 
82 /* //////////////////////////// PROTECTED ///////////////////////////////// */
83 protected:
84 
86 
87  OsTime mTimeOut;
88 /* //////////////////////////// PRIVATE /////////////////////////////////// */
89 private:
90  OsProtectEventMgr *mpEventMgr;
91 
92 
93 };
94 
95 /* ============================ INLINE METHODS ============================ */
96 
97 #endif // _PtPhoneMicrophone_h_
PtStatus
Definition: PtDefs.h:49
OsProtectEventMgr * mpEventMgr
Definition: PtPhoneMicrophone.h:90
OsTime mTimeOut
Definition: PtPhoneMicrophone.h:87
Definition: PtComponent.h:30
Definition: PtPhoneMicrophone.h:38
GainLevel
Definition: PtPhoneMicrophone.h:36
virtual PtStatus setGain(int gain)
Definition: PtPhoneMicrophone.cpp:93
TaoClientTask * mpClient
retcode: PT_SUCCESS - Success retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available ...
Definition: PtPhoneMicrophone.h:85
Definition: TaoClientTask.h:50
virtual ~PtPhoneMicrophone()
Definition: PtPhoneMicrophone.cpp:69
Definition: PtPhoneMicrophone.h:31
PtPhoneMicrophone & operator=(const PtPhoneMicrophone &rhs)
Definition: PtPhoneMicrophone.cpp:77
virtual PtStatus getGain(int &rGain)
param: gain - The microphone gain level retcode: PT_SUCCESS - Success retcode: PT_INVALID_ARGUMENT - ...
Definition: PtPhoneMicrophone.cpp:144
PtPhoneMicrophone()
enumcode: OFF - The microphone is turned off enumcode: MIDDLE - The microphone gain is set to the mid...
Definition: PtPhoneMicrophone.cpp:38
Definition: PtPhoneMicrophone.h:39
Definition: PtPhoneMicrophone.h:40