sipXcallLib home page


PsTaoLamp.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 _PsTaoLamp_h_
12 #define _PsTaoLamp_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 class PsTaoButton;
28 
29 //:The PsTaoLamp class models the keypad and feature buttons.
30 class PsTaoLamp : public PsTaoComponent
31 {
32  friend class PsPhoneTask;
33  // The PsPhoneTask is responsible for creating and destroying
34  // all objects derived from the PsTaoComponent class. No other entity
35  // should invoke the constructors or destructors for these classes.
36 
37 /* //////////////////////////// PUBLIC //////////////////////////////////// */
38 public:
39 
41  {
42  MODE_OFF = 0x00,
43  MODE_STEADY = 0x01,
44  MODE_FLASH = 0x02,
45  MODE_FLUTTER = 0x04,
47  MODE_WINK = 0x10
48  };
55 
56 /* ============================ CREATORS ================================== */
57 
58 /* ============================ MANIPULATORS ============================== */
59 
60  OsStatus setMode(int mode);
61  //:Sets the indicator to one of its supported modes.
65 
66 /* ============================ ACCESSORS ================================= */
67 
68  OsStatus getAssociatedPhoneButton(PsTaoButton*& rpButton);
69  //:Returns a pointer to the PsTaoButton object associated with this indicator.
73 
74  OsStatus getMode(int& rMode);
75  //:Sets <i>rMode</i> to the current mode for this indicator,
78 
79  OsStatus getSupportedModes(int& rModeMask);
80  //:Sets <i>rModeMask</i> to all of the modes that are supported for this indicator.
81 
82  /* ============================ INQUIRY =================================== */
83 
84 /* //////////////////////////// PROTECTED ///////////////////////////////// */
85 protected:
86  PsTaoLamp(const UtlString& rComponentName, int componentType);
87 
88  PsTaoLamp();
89  //:Default constructor
90 
91  virtual
92  ~PsTaoLamp();
93  //:Destructor
94 
95 /* //////////////////////////// PRIVATE /////////////////////////////////// */
96 private:
97 
98  PsTaoLamp(const PsTaoLamp& rPsTaoLamp);
99  //:Copy constructor (not implemented for this class)
100 
101  PsTaoLamp& operator=(const PsTaoLamp& rhs);
102  //:Assignment operator (not implemented for this class)
103 
104 };
105 
106 /* ============================ INLINE METHODS ============================ */
107 
108 #endif // _PsTaoLamp_h_
virtual ~PsTaoLamp()
Definition: PsTaoLamp.cpp:43
Definition: PsTaoComponent.h:32
Definition: PsTaoLamp.h:44
PsTaoLamp()
Definition: PsTaoLamp.cpp:28
Definition: PsTaoLamp.h:45
Definition: PsTaoLamp.h:47
Definition: PsTaoButton.h:30
OsStatus setMode(int mode)
enumcode: MODE_OFF - The indicator mode is off enumcode: MODE_STEADY - The indicator mode is continuo...
Definition: PsTaoLamp.h:30
PsTaoLamp & operator=(const PsTaoLamp &rhs)
Definition: PsTaoLamp.cpp:51
OsStatus getSupportedModes(int &rModeMask)
retcode: OS_SUCCESS - Success retcode: OS_PROVIDER_UNAVAILABLE - The provider is not available ...
Definition: PsTaoLamp.h:42
IndicatorMode
Definition: PsTaoLamp.h:40
Definition: PsTaoLamp.h:46
OsStatus getMode(int &rMode)
param: (out) rpButton - The pointer to the associated button object retcode: OS_SUCCESS - Success ret...
Definition: PsTaoLamp.h:43
Definition: PsPhoneTask.h:50
OsStatus getAssociatedPhoneButton(PsTaoButton *&rpButton)
retcode: OS_SUCCESS - Success retcode: OS_INVALID_ARGUMENT - The requested mode is not supported by t...