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.

99 lines
3.9 KiB

  1. import "oaidl.idl";
  2. import "ocidl.idl";
  3. #define UUID_IPluggableTransport FB7045F0-A4DC-11D2-B724-00104BC51339
  4. ////////////////////////////////////////////////////////////////////////////////////////
  5. // NOTE NOTE: this is taken from AxCore.idl
  6. // Win32 HANDLEs have to be cast to these as the MIDL compiler doesn't
  7. // like the HANDLE type or in fact anything remotely associated with
  8. // them. If this ever gets ported to a MAC environment then these will
  9. // have to become an alertable synchronisation object that it supports
  10. typedef UINT_PTR HCOMMDEV;
  11. typedef UINT_PTR HEVENT;
  12. typedef enum tagPLUGXPRT_FRAMING
  13. {
  14. FRAMING_LEGACY_PSTN = 0, // legacy PSTN framing
  15. FRAMING_X224 = 1, // X224 Connect + X224 Data Transfer
  16. }
  17. PLUGXPRT_FRAMING;
  18. typedef enum tagPLUGXPRT_CALL_TYPE
  19. {
  20. PLUGXPRT_UNKNOWN_CALL_TYPE = 0,
  21. PLUGXPRT_CALLER = 1,
  22. PLUGXPRT_CALLEE = 2,
  23. }
  24. PLUGXPRT_CALL_TYPE;
  25. typedef enum tagPLUGXPRT_PSTN_CALL_CONTROL
  26. {
  27. PLUGXPRT_PSTN_CALL_CONTROL_PORT_HANDLE = 0, // default, for normal PSTN
  28. PLUGXPRT_PSTN_CALL_CONTROL_MANUAL = 1, // for legacy null modem
  29. }
  30. PLUGXPRT_PSTN_CALL_CONTROL;
  31. typedef struct tagPLUGXPRT_PARAMETERS
  32. {
  33. ULONG cbStructSize; // size of this structure, must be initialized
  34. DWORD dwFlags; // valid fields defined below
  35. /* PSTN framing */
  36. PLUGXPRT_PSTN_CALL_CONTROL eCallControl; // PSTN call control
  37. ULONG cbReadFileBufferSize; // 10K default; must be no less than 1K
  38. ULONG cbPhysicalLayerSendBufferSize; // 1K default; must be no less than the default
  39. ULONG cbPhysicalLayerReceiveBufferSize; // 10K default; must be no less than 1K
  40. ULONG cMaximumT200TimeoutsInQ922; // 5 default; must be no less than the default
  41. ULONG nT203TimeoutInQ922; // must be no less than the default, which is
  42. // 30000 for PLUGXPRT_PSTN_CALL_CONTROL_PORT_HANDLE,
  43. // 600 for PLUGXPRT_PSTN_CALL_CONTROL_MANUAL
  44. /* X.224 framing */
  45. // ...nothing so far...
  46. }
  47. PLUGXPRT_PARAMETERS;
  48. cpp_quote("#define PSTN_PARAM__CALL_CONTROL 0x0001")
  49. cpp_quote("#define PSTN_PARAM__READ_FILE_BUFFER_SIZE 0x0002")
  50. cpp_quote("#define PSTN_PARAM__PHYSICAL_LAYER_SEND_BUFFER_SIZE 0x0004")
  51. cpp_quote("#define PSTN_PARAM__PHSYICAL_LAYER_RECV_BUFFER_SIZE 0x0008")
  52. cpp_quote("#define PSTN_PARAM__MAX_T200_TIMEOUT_COUNT_IN_Q922 0x0010")
  53. cpp_quote("#define PSTN_PARAM__T203_TIMEOUT_IN_Q922 0x0020")
  54. [
  55. object,
  56. uuid(UUID_IPluggableTransport),
  57. pointer_default(unique)
  58. ]
  59. interface IPluggableTransport : IUnknown
  60. {
  61. HRESULT CreateConnection(
  62. [out] BSTR *pbstrConnectionID, // For placing a call and closing connection
  63. [in] PLUGXPRT_CALL_TYPE eCaller, // caller vs callee
  64. [in] DWORD dwProcessID, // Used for DuplicateHandle
  65. [in] HCOMMDEV hCommLink, // Handle to communications file handle
  66. [in] HEVENT hevtDataAvailable, // Ready To Read event ( data avail )
  67. [in] HEVENT hevtWriteReady, // Ready To Write event
  68. [in] HEVENT hevtConnectionClosed, // Connection closed ( unexpectedly???)
  69. [in] PLUGXPRT_FRAMING eFraming, // framing of bits sent on link
  70. [in] PLUGXPRT_PARAMETERS *pParams // OPTIONAL framing specific parameters
  71. );
  72. HRESULT CloseConnection(
  73. [in] BSTR bstrConnectionID);
  74. HRESULT EnableWinsock( );
  75. HRESULT DisableWinsock( );
  76. };