📄 ptphonehookswitch.h
字号:
//// Copyright (C) 2004, 2005 Pingtel Corp.// //// $$//////////////////////////////////////////////////////////////////////////////#ifndef _PtPhoneHookswitch_h_#define _PtPhoneHookswitch_h_// SYSTEM INCLUDES// APPLICATION INCLUDES#include "ptapi/PtComponent.h"#include "os/OsTime.h"#include "os/OsProtectEventMgr.h"// DEFINES// MACROS// EXTERNAL FUNCTIONS// EXTERNAL VARIABLES// CONSTANTS// STRUCTS// TYPEDEFS// FORWARD DECLARATIONSclass PtProvider;class PtCall;class TaoClientTask;//:The PtPhoneHookswitch class models the phone hook switch.class PtPhoneHookswitch : public PtComponent{/* //////////////////////////// PUBLIC //////////////////////////////////// */public: enum HookswitchState { ON_HOOK, OFF_HOOK }; //!enumcode: OFF_HOOK - The phone is off hook //!enumcode: ON_HOOK - The phone is on hook PtPhoneHookswitch(PtProvider*& rpProvider); virtual ~PtPhoneHookswitch(); //:Destructor/* ============================ CREATORS ================================== */ PtPhoneHookswitch(); //:Default constructor PtPhoneHookswitch(TaoClientTask *pClient); PtPhoneHookswitch(const PtPhoneHookswitch& rPtPhoneHookswitch); //:Copy constructor (not implemented for this class) PtPhoneHookswitch& operator=(const PtPhoneHookswitch& rhs); //:Assignment operator (not implemented for this class)/* ============================ MANIPULATORS ============================== */ virtual PtStatus setHookswitchState(int state); //:Sets the state of the hookswitch to either ON_HOOK or OFF_HOOK. //!param: state - The state of the hookswitch (either ON_HOOK or OFF_HOOK) //!retcode: PT_SUCCESS - Success //!retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available/* ============================ ACCESSORS ================================= */ virtual PtStatus getHookswitchState(int& rState); //:Sets <i>rState</i> to reflect the current state of the hook switch. //!retcode: PT_SUCCESS - Success //!retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available virtual PtStatus getCall(PtCall& rCall);/* ============================ INQUIRY =================================== *//* //////////////////////////// PROTECTED ///////////////////////////////// */protected: int mState; PtProvider *mpProvider; TaoClientTask *mpClient; PtCall *mpCall; OsTime mTimeOut;/* //////////////////////////// PRIVATE /////////////////////////////////// */private: OsProtectEventMgr *mpEventMgr;};/* ============================ INLINE METHODS ============================ */#endif // _PtPhoneHookswitch_h_
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -