📄 tsapi.h
字号:
// Tsapi.h : TSAPI header file
//
#ifndef TSAPI_H_INCLUDE_GUARD
#define TSAPI_H_INCLUDE_GUARD
#include "acs.h"
#include "csta.h"
#include "attpriv.h"
/////////////////////////////////////////////////////////////////////////////
// See Tsapi.cpp for the implementation of this class
//
// user-specific windows messages
#define WM_TSAPIMSG WM_USER+2130
#define WM_TSAPIFAILURE WM_USER+2131
#define WM_TSAPIACSUNSOLICITED WM_USER+2132
#define WM_TSAPIACSCONFIRMATION WM_USER+2133
#define WM_TSAPICSTAUNSOLICITED WM_USER+2134
#define WM_TSAPICSTACONFIRMATION WM_USER+2135
#define WM_TSAPICSTAREQUEST WM_USER+2136
// this app will handle 1 2-party call at 1 device
#define MAX_CALLS_AT_DEVICE 1
#define MAX_DEVICES_IN_CALL 2
// this class is the device record. For each device the app supports, there will
// be one instance of this class.
class CTsapiDevice
{
public:
CTsapiDevice();
// sets the device ID for this device record
// sets the window that is responsible for handling TSAPI events for this device
void SetWndPtr(CWnd* pWnd) { m_pWnd = pWnd; };
// returns the window that is responsigle for handling TSAPI events for this device
CWnd* GetWndPtr() { return m_pWnd; };
private:
CSTAMonitorCrossRefID_t m_MonitorCrossRefID;
CWnd* m_pWnd;
// if there were an unknown number of calls that could be at a device,
// the memory would be dynamically allocated as needed.
ConnectionID_t m_ConnIDList[MAX_CALLS_AT_DEVICE][MAX_DEVICES_IN_CALL];
};
class CTsapiWnd : public CWnd
{
// Construction
public:
CTsapiWnd(); // standard constructor
virtual ~CTsapiWnd();
// The window responsible for clean-up and stream failure handling
CWnd* m_TsapiController;
// stream variables
ACSHandle_t m_AcsHandle;
unsigned short m_EventBufSize;
char m_EventBuf[10000];
ATTPrivateData_t m_AttPrivateData;
ATTEvent_t m_AttEvent;
CSTAEvent_t* m_EventBufPtr;
// Implementation
void DoCreate();
protected:
LRESULT OnTsapiMsg(WPARAM wParam, LPARAM lParam);
DECLARE_MESSAGE_MAP()
private:
// if the app was going to track an unknown number of devices, the
// memory would be dynamically allocated as needed, instead of being declared
// here
CTsapiDevice m_MyOneDevice;
};
#endif
/////////////////////////////////////////////////////////////////////////////
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -