sipXcallLib home page


PsButtonInfo.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 _PsButtonInfo_h_
13 #define _PsButtonInfo_h_
14 
15 // SYSTEM INCLUDES
16 
17 // APPLICATION INCLUDES
18 #include "os/OsTime.h"
19 
20 // DEFINES
21 // MACROS
22 // EXTERNAL FUNCTIONS
23 // EXTERNAL VARIABLES
24 // CONSTANTS
25 // STRUCTS
26 // TYPEDEFS
27 // FORWARD DECLARATIONS
28 
29 //:Phone set button information
31 {
32 /* //////////////////////////// PUBLIC //////////////////////////////////// */
33 public:
34 
36  {
38  BUTTON_DOWN = 0x1,
39  BUTTON_UP = 0x2,
40  KEY_DOWN = 0x4, //a key hit on NT
41  KEY_UP = 0x8,
43  };
44 
46  {
47  UP,
49  };
50 
51 /* ============================ CREATORS ================================== */
52 
53  PsButtonInfo(int buttonId=-1,
54  const char* name="",
55  int eventMask=BUTTON_DOWN|BUTTON_UP,
56  const OsTime& repeatInterval=OsTime::OS_INFINITY);
57  //:Constructor
58 
59  PsButtonInfo(const PsButtonInfo& rPsButtonInfo);
60  //:Copy constructor
61 
62  virtual
63  ~PsButtonInfo();
64  //:Destructor
65 
66 /* ============================ MANIPULATORS ============================== */
67 
68  PsButtonInfo& operator=(const PsButtonInfo& rhs);
69  //:Assignment operator
70 
71  virtual void setState(int buttonState);
72  //:Set the button state to either UP or DOWN
73 
74 /* ============================ ACCESSORS ================================= */
75 
76  virtual int getEventMask(void) const;
77  //:Return the set of event types that are being handled for this button
78 
79  virtual int getId(void) const;
80  //:Return the button ID
81 
82  virtual char* getName(void) const;
83  //:Return the button name
84 
85  virtual void getRepInterval(OsTime& repeatIntvl) const;
86  //:Get the repeat interval for this button
87 
88  virtual int getState(void) const;
89  //:Return the button state (UP or DOWN)
90 
91 /* ============================ INQUIRY =================================== */
92 
93 /* //////////////////////////// PROTECTED ///////////////////////////////// */
94 protected:
95 
96 /* //////////////////////////// PRIVATE /////////////////////////////////// */
97 private:
98 
99  char* mpButtonName;
104 
105 
106 };
107 
108 /* ============================ INLINE METHODS ============================ */
109 
110 #endif // _PsButtonInfo_h_
Definition: PsButtonInfo.h:47
int mEventMask
Definition: PsButtonInfo.h:102
PsButtonInfo(int buttonId=-1, const char *name="", int eventMask=BUTTON_DOWN|BUTTON_UP, const OsTime &repeatInterval=OsTime::OS_INFINITY)
Definition: PsButtonInfo.cpp:30
int mButtonState
Definition: PsButtonInfo.h:101
int mButtonId
Definition: PsButtonInfo.h:100
virtual int getId(void) const
Definition: PsButtonInfo.cpp:122
Definition: PsButtonInfo.h:39
Definition: PsButtonInfo.h:42
OsTime mRepeatInterval
Definition: PsButtonInfo.h:103
Definition: PsButtonInfo.h:30
virtual char * getName(void) const
Definition: PsButtonInfo.cpp:128
virtual void setState(int buttonState)
Definition: PsButtonInfo.cpp:107
Definition: PsButtonInfo.h:37
Definition: PsButtonInfo.h:40
virtual int getEventMask(void) const
Definition: PsButtonInfo.cpp:116
EventTypes
Definition: PsButtonInfo.h:35
Definition: PsButtonInfo.h:41
PsButtonInfo & operator=(const PsButtonInfo &rhs)
Definition: PsButtonInfo.cpp:82
virtual void getRepInterval(OsTime &repeatIntvl) const
Definition: PsButtonInfo.cpp:134
Definition: PsButtonInfo.h:38
ButtonState
Definition: PsButtonInfo.h:45
char * mpButtonName
Definition: PsButtonInfo.h:99
virtual int getState(void) const
Definition: PsButtonInfo.cpp:140
virtual ~PsButtonInfo()
Definition: PsButtonInfo.cpp:69
Definition: PsButtonInfo.h:48