sipXcallLib home page


PtPhoneHookswitch.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 _PtPhoneHookswitch_h_
13 #define _PtPhoneHookswitch_h_
14 
15 // SYSTEM INCLUDES
16 // APPLICATION INCLUDES
17 #include "ptapi/PtComponent.h"
18 #include "os/OsTime.h"
19 #include "os/OsProtectEventMgr.h"
20 
21 // DEFINES
22 // MACROS
23 // EXTERNAL FUNCTIONS
24 // EXTERNAL VARIABLES
25 // CONSTANTS
26 // STRUCTS
27 // TYPEDEFS
28 // FORWARD DECLARATIONS
29 class PtProvider;
30 class PtCall;
31 class TaoClientTask;
32 
33 //:The PtPhoneHookswitch class models the phone hook switch.
34 
36 {
37 /* //////////////////////////// PUBLIC //////////////////////////////////// */
38 public:
40  {
43  };
46 
47  PtPhoneHookswitch(PtProvider*& rpProvider);
48 
49  virtual
51  //:Destructor
52 
53 /* ============================ CREATORS ================================== */
55  //:Default constructor
56 
58 
59  PtPhoneHookswitch(const PtPhoneHookswitch& rPtPhoneHookswitch);
60  //:Copy constructor (not implemented for this class)
61 
63  //:Assignment operator (not implemented for this class)
64 
65 /* ============================ MANIPULATORS ============================== */
66 
67  virtual PtStatus setHookswitchState(int state);
68  //:Sets the state of the hookswitch to either ON_HOOK or OFF_HOOK.
72 
73 /* ============================ ACCESSORS ================================= */
74 
75  virtual PtStatus getHookswitchState(int& rState);
76  //:Sets <i>rState</i> to reflect the current state of the hook switch.
79 
80  virtual PtStatus getCall(PtCall& rCall);
81 
82 /* ============================ INQUIRY =================================== */
83 
84 /* //////////////////////////// PROTECTED ///////////////////////////////// */
85 protected:
86  int mState;
88 
91 
92  OsTime mTimeOut;
93 /* //////////////////////////// PRIVATE /////////////////////////////////// */
94 private:
95  OsProtectEventMgr *mpEventMgr;
96 
97 
98 };
99 
100 /* ============================ INLINE METHODS ============================ */
101 
102 #endif // _PtPhoneHookswitch_h_
PtStatus
Definition: PtDefs.h:49
virtual PtStatus getHookswitchState(int &rState)
param: state - The state of the hookswitch (either ON_HOOK or OFF_HOOK) retcode: PT_SUCCESS - Success...
Definition: PtPhoneHookswitch.cpp:154
PtPhoneHookswitch()
Definition: PtPhoneHookswitch.cpp:32
Definition: PtPhoneHookswitch.h:42
OsTime mTimeOut
Definition: PtPhoneHookswitch.h:92
PtPhoneHookswitch & operator=(const PtPhoneHookswitch &rhs)
Definition: PtPhoneHookswitch.cpp:93
TaoClientTask * mpClient
Definition: PtPhoneHookswitch.h:89
Definition: PtComponent.h:30
PtCall * mpCall
Definition: PtPhoneHookswitch.h:90
HookswitchState
Definition: PtPhoneHookswitch.h:39
int mState
Definition: PtPhoneHookswitch.h:86
Definition: PtPhoneHookswitch.h:35
OsProtectEventMgr * mpEventMgr
Definition: PtPhoneHookswitch.h:95
virtual ~PtPhoneHookswitch()
Definition: PtPhoneHookswitch.cpp:85
Definition: PtPhoneHookswitch.h:41
PtProvider * mpProvider
Definition: PtPhoneHookswitch.h:87
virtual PtStatus setHookswitchState(int state)
Definition: PtPhoneHookswitch.cpp:113
virtual PtStatus getCall(PtCall &rCall)
retcode: PT_SUCCESS - Success retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available ...
Definition: PtPhoneHookswitch.cpp:189
Definition: PtCall.h:253
Definition: PtProvider.h:118
Definition: TaoClientTask.h:50