sipXcallLib home page


PsKeybdDev.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 _PsKeybdDev_h_
12 #define _PsKeybdDev_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 PsButtonTask;
30 
31 //:Base class for the phone set keyboard device
32 // Platform-specific keyboard classes are all derived from this class.
34 {
35 /* //////////////////////////// PUBLIC //////////////////////////////////// */
36 public:
37 
38 /* ============================ CREATORS ================================== */
39 
40  static PsKeybdDev* getKeybdDev(PsButtonTask* pButtonTask=NULL);
41  //:Return a pointer to the keyboard device, creating it if necessary.
42 
43  virtual
44  ~PsKeybdDev();
45  //:Destructor
46 
47 /* ============================ MANIPULATORS ============================== */
48 
49  virtual void disableIntr(void) = 0;
50  //:Disable keyboard interrupts
51 
52  virtual void enableIntr(void) = 0;
53  //:Enable keyboard interrupts
54 
55 /* ============================ ACCESSORS ================================= */
56 
57 /* ============================ INQUIRY =================================== */
58 
59 /* //////////////////////////// PROTECTED ///////////////////////////////// */
60 protected:
61  static PsKeybdDev* spInstance; // pointer to the single instance of
62  // the PsKeybdDev class
63  static OsBSem sLock; // semaphore used to ensure that there
64  // is only one instance of this class
66 
67  PsKeybdDev(PsButtonTask* pButtonTask);
68  //:Constructor
69 
70 /* //////////////////////////// PRIVATE /////////////////////////////////// */
71 private:
72 
73  PsKeybdDev(const PsKeybdDev& rPsKeybdDev);
74  //:Copy constructor (not implemented for this class)
75 
76  PsKeybdDev& operator=(const PsKeybdDev& rhs);
77  //:Assignment operator (not implemented for this class)
78 
79 };
80 
81 /* ============================ INLINE METHODS ============================ */
82 
83 #endif // _PsKeybdDev_h_
virtual void disableIntr(void)=0
static PsKeybdDev * getKeybdDev(PsButtonTask *pButtonTask=NULL)
Definition: PsKeybdDev.cpp:42
static PsKeybdDev * spInstance
Definition: PsKeybdDev.h:61
Definition: PsButtonTask.h:40
virtual void enableIntr(void)=0
virtual ~PsKeybdDev()
Definition: PsKeybdDev.cpp:94
PsKeybdDev(PsButtonTask *pButtonTask)
Definition: PsKeybdDev.cpp:108
PsKeybdDev & operator=(const PsKeybdDev &rhs)
Definition: PsKeybdDev.h:33
PsButtonTask * mpButtonTask
Definition: PsKeybdDev.h:65
static OsBSem sLock
Definition: PsKeybdDev.h:63