sipXcallLib home page


PsLampDev.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 _PsLampDev_h_
12 #define _PsLampDev_h_
13 
14 // SYSTEM INCLUDES
15 
16 // APPLICATION INCLUDES
17 #include "os/OsDefs.h"
18 #include "os/OsBSem.h"
19 
20 // DEFINES
21 // MACROS
22 // EXTERNAL FUNCTIONS
23 // EXTERNAL VARIABLES
24 // CONSTANTS
25 // STRUCTS
26 // TYPEDEFS
27 
28 // FORWARD DECLARATIONS
29 class PsLampTask;
30 
31 //:Base class for the phone set lamp device
32 // Platform-specific lamp classes are all derived from this class.
33 class PsLampDev
34 {
35 /* //////////////////////////// PUBLIC //////////////////////////////////// */
36 public:
37 
38 /* ============================ CREATORS ================================== */
39 
40  static PsLampDev* getLampDev(PsLampTask* pLampTask);
41  //:Return a pointer to the lamp device, creating it if necessary.
42 
43  virtual
44  ~PsLampDev();
45  //:Destructor
46 
47 /* ============================ MANIPULATORS ============================== */
48 
49  virtual void lightLamps(unsigned long onLamps) = 0;
50  //:Turn on the indicated lamps
51  // Each lamp is represented by a bit in the onLamps parameter.
52 
53 /* ============================ ACCESSORS ================================= */
54 
55 /* ============================ INQUIRY =================================== */
56 
57 /* //////////////////////////// PROTECTED ///////////////////////////////// */
58 protected:
59  static PsLampDev* spInstance; // pointer to the single instance of
60  // the PsLampDev class
61  static OsBSem sLock; // semaphore used to ensure that there
62  // is only one instance of this class
63  PsLampDev(PsLampTask* pLampTask=NULL);
64  //:Constructor
65 
66 /* //////////////////////////// PRIVATE /////////////////////////////////// */
67 private:
68 
70 
71  PsLampDev(const PsLampDev& rPsLampDev);
72  //:Copy constructor (not implemented for this class)
73 
74  PsLampDev& operator=(const PsLampDev& rhs);
75  //:Assignment operator (not implemented for this class)
76 
77 };
78 
79 /* ============================ INLINE METHODS ============================ */
80 
81 #endif // _PsLampDev_h_
static PsLampDev * getLampDev(PsLampTask *pLampTask)
Definition: PsLampDev.cpp:42
static PsLampDev * spInstance
Definition: PsLampDev.h:59
Definition: PsLampDev.h:33
static OsBSem sLock
Definition: PsLampDev.h:61
PsLampDev & operator=(const PsLampDev &rhs)
virtual void lightLamps(unsigned long onLamps)=0
Definition: PsLampTask.h:33
PsLampTask * mpLampTask
Definition: PsLampDev.h:69
virtual ~PsLampDev()
Definition: PsLampDev.cpp:87
PsLampDev(PsLampTask *pLampTask=NULL)
Definition: PsLampDev.cpp:102