iplgxprt.idl
上传用户:dzyhzl
上传日期:2019-04-29
资源大小:56270k
文件大小:4k
源码类别:

模拟服务器

开发平台:

C/C++

  1. //+---------------------------------------------------------------------------
  2. //
  3. //  Copyright 1999 Microsoft Corporation. All Rights Reserved.
  4. //
  5. //  Contents:   NetMeeting pluggable transport interfaces
  6. //
  7. //----------------------------------------------------------------------------
  8. import "oaidl.idl";
  9. import "ocidl.idl";
  10. #define UUID_IPluggableTransport        FB7045F0-A4DC-11D2-B724-00104BC51339
  11. typedef unsigned int HCOMMDEV;
  12. typedef unsigned int HEVENT;
  13. typedef enum tagPLUGXPRT_FRAMING
  14. {
  15.     FRAMING_LEGACY_PSTN     = 0,    // legacy PSTN framing
  16.     FRAMING_X224            = 1,    // X224 Connect + X224 Data Transfer
  17. }
  18.     PLUGXPRT_FRAMING;
  19. typedef enum tagPLUGXPRT_CALL_TYPE
  20. {
  21.     PLUGXPRT_UNKNOWN_CALL_TYPE  = 0,
  22.     PLUGXPRT_CALLER             = 1,
  23.     PLUGXPRT_CALLEE             = 2,
  24. }
  25.     PLUGXPRT_CALL_TYPE;
  26. typedef enum tagPLUGXPRT_PSTN_CALL_CONTROL
  27. {
  28.     PLUGXPRT_PSTN_CALL_CONTROL_PORT_HANDLE    = 0,  // default, for normal PSTN
  29.     PLUGXPRT_PSTN_CALL_CONTROL_MANUAL         = 1,  // for legacy null modem
  30. }
  31.     PLUGXPRT_PSTN_CALL_CONTROL;
  32. typedef struct tagPLUGXPRT_PARAMETERS
  33. {
  34.     ULONG       cbStructSize;                       // size of this structure, must be initialized
  35.     DWORD       dwFlags;                            // valid fields defined below
  36.     /* PSTN framing */
  37.     PLUGXPRT_PSTN_CALL_CONTROL  eCallControl;       // PSTN call control
  38.     ULONG       cbReadFileBufferSize;               // 10K default; must be no less than 1K
  39.     ULONG       cbPhysicalLayerSendBufferSize;      //  1K default; must be no less than the default
  40.     ULONG       cbPhysicalLayerReceiveBufferSize;   // 10K default; must be no less than 1K
  41.     ULONG       cMaximumT200TimeoutsInQ922;         //   5 default; must be no less than the default
  42.     ULONG       nT203TimeoutInQ922;                 // must be no less than the default, which is
  43.                                                     // 30000 for PLUGXPRT_PSTN_CALL_CONTROL_PORT_HANDLE,
  44.                                                     //   600 for PLUGXPRT_PSTN_CALL_CONTROL_MANUAL
  45.     /* X.224 framing */
  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. };