sipXcallLib home page


PtPhoneSpeaker.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 _PtPhoneSpeaker_h_
13 #define _PtPhoneSpeaker_h_
14 
15 // SYSTEM INCLUDES
16 // APPLICATION INCLUDES
17 #include "ptapi/PtComponent.h"
18 #include "os/OsTime.h"
19 #include "os/OsProtectEventMgr.h"
20 // DEFINES
21 // MACROS
22 // EXTERNAL FUNCTIONS
23 // EXTERNAL VARIABLES
24 // CONSTANTS
25 // STRUCTS
26 // TYPEDEFS
27 // FORWARD DECLARATIONS
28 class TaoClientTask;
29 
30 //:The PtPhoneSpeaker class models a phone speaker.
31 
33 {
34 /* //////////////////////////// PUBLIC //////////////////////////////////// */
35 public:
36 
38  {
39  OFF = 0,
40  MIDDLE = 5,
41  FULL = 10
42  };
46 
47 /* ============================ CREATORS ================================== */
49  //:Default constructor
50 
51  PtPhoneSpeaker(TaoClientTask *pClient);
52 
53  PtPhoneSpeaker(const PtPhoneSpeaker& rPtPhoneSpeaker);
54  //:Copy constructor
55 
57  //:Assignment operator
58  virtual
60  //:Destructor
61 
62 
63 /* ============================ MANIPULATORS ============================== */
64  virtual PtStatus setVolume(int volume);
65  //:Sets the speaker volume to a value between OFF and FULL (inclusive).
70 
71 /* ============================ ACCESSORS ================================= */
72 
73  virtual PtStatus getVolume(int& rVolume);
74  //:Sets <i>rVolume</i> to the current speaker volume level.
77 
78 
79 
80  virtual PtStatus getNominalVolume(int& rVolume);
81  //:Sets <i>rVolume</i> to the default speaker volume level.
84 
85 
86 /* ============================ INQUIRY =================================== */
87 
88 /* //////////////////////////// PROTECTED ///////////////////////////////// */
89 protected:
91 
92  OsTime mTimeOut;
93 /* //////////////////////////// PRIVATE /////////////////////////////////// */
94 private:
95  OsProtectEventMgr *mpEventMgr;
96 
97 
98 };
99 
100 /* ============================ INLINE METHODS ============================ */
101 
102 #endif // _PtPhoneSpeaker_h_
virtual PtStatus getNominalVolume(int &rVolume)
retcode: PT_SUCCESS - Success retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available ...
Definition: PtPhoneSpeaker.cpp:195
PtStatus
Definition: PtDefs.h:49
virtual ~PtPhoneSpeaker()
Definition: PtPhoneSpeaker.cpp:75
virtual PtStatus setVolume(int volume)
Definition: PtPhoneSpeaker.cpp:99
VolumeLevel
Definition: PtPhoneSpeaker.h:37
Definition: PtPhoneSpeaker.h:39
PtPhoneSpeaker()
enumcode: OFF - The speaker is turned off enumcode: MIDDLE - The speaker volume level is set to the m...
Definition: PtPhoneSpeaker.cpp:39
Definition: PtPhoneSpeaker.h:41
OsTime mTimeOut
Definition: PtPhoneSpeaker.h:92
TaoClientTask * mpClient
retcode: PT_SUCCESS - Success retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available ...
Definition: PtPhoneSpeaker.h:90
Definition: PtComponent.h:30
Definition: PtPhoneSpeaker.h:40
PtPhoneSpeaker & operator=(const PtPhoneSpeaker &rhs)
Definition: PtPhoneSpeaker.cpp:83
virtual PtStatus getVolume(int &rVolume)
param: volume - The speaker volume level retcode: PT_SUCCESS - Success retcode: PT_INVALID_ARGUMENT -...
Definition: PtPhoneSpeaker.cpp:152
Definition: PtPhoneSpeaker.h:32
OsProtectEventMgr * mpEventMgr
Definition: PtPhoneSpeaker.h:95
Definition: TaoClientTask.h:50