Source code of Windows XP (NT5)
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.

74 lines
2.3 KiB

  1. #ifndef _T123_TRANSPORT_DRIVER_INTERFACE_H_
  2. #define _T123_TRANSPORT_DRIVER_INTERFACE_H_
  3. #include <basetyps.h>
  4. #include <t120type.h>
  5. #include "iplgxprt.h"
  6. typedef UINT_PTR LEGACY_HANDLE;
  7. typedef HANDLE PHYSICAL_HANDLE;
  8. typedef ULONG (CALLBACK *TransportCallback) (ULONG, void *, void *);
  9. /*
  10. * This structure is passed back with the TRANSPORT_DATA_INDICATION message.
  11. */
  12. typedef struct
  13. {
  14. UINT_PTR logical_handle;
  15. LPBYTE pbData;
  16. ULONG cbDataSize;
  17. }
  18. LegacyTransportData;
  19. /*
  20. * This structure is passed back with the TRANSPORT_CONNECT_INDICATION,
  21. * TRANSPORT_CONNECT_CONFIRM, and the TRANSPORT_DISONNECT_INDICATION messages.
  22. * This structure contains the transport connection identifier and
  23. * physical handle.
  24. */
  25. typedef struct
  26. {
  27. LEGACY_HANDLE logical_handle;
  28. PHYSICAL_HANDLE hCommLink;
  29. }
  30. LegacyTransportID;
  31. #undef INTERFACE
  32. #define INTERFACE ILegacyTransport
  33. DECLARE_INTERFACE(ILegacyTransport)
  34. {
  35. STDMETHOD_(void, ReleaseInterface) (THIS) PURE;
  36. STDMETHOD_(TransportError, TInitialize) (THIS_ TransportCallback, void *user_defined) PURE;
  37. STDMETHOD_(TransportError, TCleanup) (THIS) PURE;
  38. STDMETHOD_(TransportError, TCreateTransportStack) (THIS_ BOOL fCaller, HANDLE hCommLink, HANDLE hevtClose, PLUGXPRT_PARAMETERS *pParams) PURE;
  39. STDMETHOD_(TransportError, TCloseTransportStack) (THIS_ HANDLE hCommLink) PURE;
  40. STDMETHOD_(TransportError, TConnectRequest) (THIS_ LEGACY_HANDLE *, HANDLE hCommLink) PURE;
  41. STDMETHOD_(TransportError, TDisconnectRequest) (THIS_ LEGACY_HANDLE, BOOL trash_packets) PURE;
  42. STDMETHOD_(TransportError, TDataRequest) (THIS_ LEGACY_HANDLE, LPBYTE pbData, ULONG cbDataSize) PURE;
  43. STDMETHOD_(TransportError, TReceiveBufferAvailable) (THIS) PURE;
  44. STDMETHOD_(TransportError, TPurgeRequest) (THIS_ LEGACY_HANDLE) PURE;
  45. STDMETHOD_(TransportError, TEnableReceiver) (THIS) PURE;
  46. };
  47. #ifdef __cplusplus
  48. extern "C" {
  49. #endif
  50. TransportError WINAPI T123_CreateTransportInterface(ILegacyTransport **);
  51. typedef TransportError (WINAPI *LPFN_T123_CreateTransportInterface) (ILegacyTransport **);
  52. #define LPSTR_T123_CreateTransportInterface "T123_CreateTransportInterface"
  53. #ifdef __cplusplus
  54. }
  55. #endif
  56. #endif // _PSTN_TRANSPORT_DRIVER_INTERFACE_H_
  57.