Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

128 lines
3.4 KiB

  1. /*++
  2. Copyright (c) 1997-1999 Microsoft Corporation
  3. Module Name:
  4. terminal.h
  5. Abstract:
  6. Declaration of the CTerminal class
  7. Author:
  8. mquinton 06-12-97
  9. Notes:
  10. Revision History:
  11. --*/
  12. #ifndef __TERMINAL_H_
  13. #define __TERMINAL_H_
  14. #include "address.h"
  15. #include "resource.h" // main symbols
  16. #include "connect.h"
  17. class CTAPI;
  18. /////////////////////////////////////////////////////////////////////////////
  19. // CTerminal
  20. class CTerminal :
  21. public CTAPIComObjectRoot<CTerminal>,
  22. public CComDualImpl<ITTerminal, &IID_ITTerminal, &LIBID_TAPI3Lib>,
  23. public CComDualImpl<ITBasicAudioTerminal, &IID_ITBasicAudioTerminal, &LIBID_TAPI3Lib>,
  24. public ITTerminalPrivate,
  25. public CObjectSafeImpl
  26. {
  27. public:
  28. CTerminal() : m_pName(NULL),
  29. m_State(TS_NOTINUSE),
  30. m_TerminalType(TT_STATIC),
  31. m_Direction(TD_RENDER),
  32. m_Class(CLSID_NULL),
  33. m_lMediaType(LINEMEDIAMODE_AUTOMATEDVOICE),
  34. m_pMSPCall(NULL),
  35. m_dwAPIVersion(0)
  36. {}
  37. void FinalRelease();
  38. DECLARE_MARSHALQI(CTerminal)
  39. DECLARE_TRACELOG_CLASS(CTerminal)
  40. BEGIN_COM_MAP(CTerminal)
  41. COM_INTERFACE_ENTRY2(IDispatch, ITTerminal)
  42. COM_INTERFACE_ENTRY(ITTerminal)
  43. COM_INTERFACE_ENTRY(ITBasicAudioTerminal)
  44. COM_INTERFACE_ENTRY(ITTerminalPrivate)
  45. COM_INTERFACE_ENTRY(IObjectSafety)
  46. COM_INTERFACE_ENTRY_FUNC(IID_IMarshal, 0, IMarshalQI)
  47. COM_INTERFACE_ENTRY_AGGREGATE(IID_IMarshal, m_pFTM)
  48. END_COM_MAP()
  49. protected:
  50. PWSTR m_pName;
  51. TERMINAL_STATE m_State;
  52. TERMINAL_TYPE m_TerminalType;
  53. TERMINAL_DIRECTION m_Direction;
  54. DWORD m_dwAPIVersion;
  55. CLSID m_Class;
  56. long m_lMediaType;
  57. DWORD m_dwHookSwitchDev;
  58. DWORD m_dwPhoneID;
  59. HPHONEAPP m_hPhoneApp;
  60. ITPhoneMSPCallPrivate * m_pMSPCall;
  61. #if DBG
  62. PWSTR m_pDebug;
  63. #endif
  64. public:
  65. HRESULT
  66. static Create(
  67. HPHONEAPP hPhoneApp,
  68. DWORD dwPhoneID,
  69. LPPHONECAPS pPhoneCaps,
  70. DWORD dwHookSwitchDev,
  71. TERMINAL_DIRECTION td,
  72. DWORD dwAPIVersion,
  73. ITTerminal ** ppTerminal
  74. );
  75. //
  76. // ITTerminal
  77. //
  78. STDMETHOD(get_Name)(BSTR * ppName);
  79. STDMETHOD(get_State)(TERMINAL_STATE * pTerminalState);
  80. STDMETHOD(get_TerminalType)(TERMINAL_TYPE * pType);
  81. STDMETHOD(get_TerminalClass)(BSTR * pTerminalClass);
  82. STDMETHOD(get_MediaType)(long * plMediaType);
  83. STDMETHOD(get_Direction)(TERMINAL_DIRECTION * pTerminalDirection);
  84. // itterminalprivate
  85. STDMETHOD(GetHookSwitchDev)(DWORD * pdwHookSwitchDev);
  86. STDMETHOD(GetPhoneID)(DWORD * pdwPhoneID);
  87. STDMETHOD(GetHPhoneApp)(HPHONEAPP * phPhoneApp);
  88. STDMETHOD(GetAPIVersion)(DWORD * pdwAPIVersion);
  89. STDMETHOD(SetMSPCall)(ITPhoneMSPCallPrivate * pPhoneMSPCall);
  90. // itbasicaudio
  91. STDMETHOD(get_Gain)(long *pVal);
  92. STDMETHOD(put_Gain)(long newVal);
  93. STDMETHOD(get_Balance)(long *pVal);
  94. STDMETHOD(put_Balance)(long newVal);
  95. STDMETHOD(get_Volume)(long *pVal);
  96. STDMETHOD(put_Volume)(long newVal);
  97. };
  98. #endif //__TERMINAL_H_