TapiLine.h.svn-base
上传用户:c1686688
上传日期:2015-06-15
资源大小:73k
文件大小:1k
源码类别:

TAPI编程

开发平台:

Visual C++

  1. // TapiCall.h: interface for the CTapiCall class.
  2. //
  3. //////////////////////////////////////////////////////////////////////
  4. #if !defined(AFX_TAPILINE_H__64E4FCD7_09C8_419D_ABF4_6D864361094B__INCLUDED_)
  5. #define AFX_TAPILINE_H__64E4FCD7_09C8_419D_ABF4_6D864361094B__INCLUDED_
  6. #if _MSC_VER > 1000
  7. #pragma once
  8. #endif // _MSC_VER > 1000
  9. //#define TAPI_CURRENT_VERSION 0x00010004
  10. #define TAPI_CURRENT_VERSION 0x00020000
  11. #include <tapi.h>
  12.  
  13. class CTapiLine  
  14. {
  15. protected:
  16. HLINEAPP m_hLineApp; // application's usage handle for TAPI
  17. HLINE m_hLine;
  18. HCALL m_hCall;
  19. int m_nDevID;
  20. HANDLE m_hLineEvent; // line change events
  21. DWORD m_dwLineMsg;
  22. bool m_bConnected;
  23. HANDLE m_hEventFromThread;
  24. HANDLE m_hLineMsgThread;   // TAPI Event monitoring thread.
  25. bool m_bStopLineEventThread;
  26. static DWORD WINAPI LineEventThread(LPVOID lpVoid);
  27. long m_lEventThreadResult;
  28. public:
  29. HANDLE GetHandle(const char *szClassType, long *lError);
  30. int PickupIncomingCall();
  31. void GetErrorString(int nError, char *&szErrText);
  32. int MakeOutgoingCall(const char *szAddress);
  33. int GetIncomingCall();
  34. int Close();
  35. int Open(int nMode = 0);
  36. CTapiLine();
  37. virtual ~CTapiLine();
  38. };
  39. #endif // !defined(AFX_TAPILINE_H__64E4FCD7_09C8_419D_ABF4_6D864361094B__INCLUDED_)