TAPIAPP.H
资源名称:tapi3.zip [点击查看]
上传用户:chinamans
上传日期:2013-03-17
资源大小:202k
文件大小:3k
源码类别:
TAPI编程
开发平台:
Visual C++
- // tapiapp.h : main header file for the TAPIAPP class
- // (c) Dialogic corp 1995, 1996
- //
- #define TAPI_VERSION1_3 0x00010003
- #define TAPI_VERSION1_4 0x00010004
- #define TAPI_VERSION2_0 0x00020000
- // Because Microsoft does not have a better way to find out if tapi.h is a 2.0...
- #ifdef LINE_AGENTSPECIFIC
- #define TAPI20 1
- #define CURRENT_TAPI_VERSION TAPI_VERSION2_0
- #else
- #define CURRENT_TAPI_VERSION TAPI_VERSION1_4
- #endif
- // Async IDs stuff
- #define FIND_ID 0
- #define REMOVE_ID 1
- typedef struct _asynccall {
- DWORD dwID;
- WORD wFunction;
- WORD wState;
- LPVOID pvLine;
- LPVOID pvCall;
- } ASYNCCALL, *PASYNCCALL;
- typedef CMap<DWORD, DWORD, PASYNCCALL, PASYNCCALL&> CMAPASYNC; // async calls
- /////////////////////////////////////////////////////////////////////////////
- // CTapiApp:
- // See tapiapp32.cpp for the implementation of this class
- //
- class CTapiApp : public CWinApp
- {
- public:
- CTapiApp();
- BOOL InitTAPIApp();
- void CloseTAPIApp();
- void SetAsyncID(DWORD dwID, WORD wState, WORD wFunc, LPVOID pvLine, LPVOID pvCall);
- PASYNCCALL FindAsyncID(DWORD dwID, WORD wAction = FIND_ID);
- virtual void PurgeAsyncQue(); // free resources
- // Message handlers
- virtual void OnLineReply(DWORD dwCallback, DWORD idRequest, DWORD dwStatus);
- LPLINECALLINFO GetCallInfo(HCALL hCall);
- LPLINECALLSTATUS GetCallStatus(HCALL hCall);
- // to be implemented in derived class
- virtual void OnCallState(HCALL hCall, DWORD hCallback, DWORD dwCallState,
- DWORD dwCallStateDetail, DWORD dwCallPrivilege) = 0;
- virtual void OnLineCallInfo(HCALL hCall, DWORD dwCallBack, DWORD dwParm) = 0;
- virtual void OnMonitorDigits(HCALL hCall, DWORD dwCallBack, DWORD dwDigit, DWORD dwDigitMode) = 0;
- virtual void OnGatherDigits(HCALL hCall, DWORD dwCallBack, DWORD dwTermination) = 0;
- virtual void OnLineDevSpec(DWORD hCall, DWORD dwCallBack, DWORD dwParm1, DWORD dwParm2, DWORD dwParm3) = 0;
- virtual void OnMonitorMedia(DWORD hCall, DWORD dwCallBack, DWORD dwParm1, DWORD dwParm2, DWORD dwParm3) = 0;
- virtual void NotifyFrontEnd(DWORD dwLineID) = 0; // front end notification
- virtual void SetNotificationControlID(DWORD dwID) = 0;
- // Overrides
- // ClassWizard generated virtual function overrides
- //{{AFX_VIRTUAL(CTapiApp)
- public:
- virtual BOOL InitInstance();
- virtual int ExitInstance();
- //}}AFX_VIRTUAL
- // Implementation
- public:
- HLINEAPP m_hApp;
- DWORD m_dwLines;
- protected:
- CMAPASYNC *m_pAsyncList;
- HANDLE m_hAsyncListSem;
- //{{AFX_MSG(CTapiApp)
- // NOTE - the ClassWizard will add and remove member functions here.
- // DO NOT EDIT what you see in these blocks of generated code !
- //}}AFX_MSG
- DECLARE_MESSAGE_MAP()
- };
- extern "C"
- {
- VOID WINAPI LineCallBackProc(DWORD hDevice, DWORD dwMsg,
- DWORD dwCallbackInstance, DWORD dwParam1, DWORD dwParam2,
- DWORD dwParam3);
- }
- /////////////////////////////////////////////////////////////////////////////