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.

102 lines
2.5 KiB

  1. #ifndef _IT120_TRANSPORT_H_
  2. #define _IT120_TRANSPORT_H_
  3. #include <basetyps.h>
  4. #include <t120type.h>
  5. #define T120_CONNECTION_ID_LENGTH 64
  6. typedef enum tagPLUGXPRT_PROTOCOL
  7. {
  8. PLUGXPRT_PROTOCOL_X224 = 0,
  9. }
  10. PLUGXPRT_PROTOCOL;
  11. typedef enum tagPLUGXPRT_RESULT
  12. {
  13. PLUGXPRT_RESULT_SUCCESSFUL = 0,
  14. PLUGXPRT_RESULT_READ_FAILED = 1,
  15. PLUGXPRT_RESULT_WRITE_FAILED = 2,
  16. PLUGXPRT_RESULT_FAILED = 3,
  17. PLUGXPRT_RESULT_ABANDONED = 4,
  18. }
  19. PLUGXPRT_RESULT;
  20. typedef enum tagPLUGXPRT_STATE
  21. {
  22. PLUGXPRT_UNKNOWN_STATE = 0,
  23. PLUGXPRT_CONNECTING = 1,
  24. PLUGXPRT_CONNECTED = 2,
  25. PLUGXPRT_DISCONNECTING = 3,
  26. PLUGXPRT_DISCONNECTED = 4,
  27. }
  28. PLUGXPRT_STATE;
  29. typedef struct tagPLUGXPRT_MESSAGE
  30. {
  31. PLUGXPRT_STATE eState;
  32. LPVOID pContext;
  33. LPSTR pszConnID;
  34. PLUGXPRT_PROTOCOL eProtocol;
  35. PLUGXPRT_RESULT eResult;
  36. }
  37. PLUGXPRT_MESSAGE;
  38. typedef void (CALLBACK *LPFN_PLUGXPRT_CB) (PLUGXPRT_MESSAGE *);
  39. #undef INTERFACE
  40. #define INTERFACE IT120PluggableTransport
  41. DECLARE_INTERFACE(IT120PluggableTransport)
  42. {
  43. STDMETHOD_(void, ReleaseInterface) (THIS) PURE;
  44. STDMETHOD_(T120Error, CreateConnection) (THIS_
  45. char szConnID[], /* out */
  46. PLUGXPRT_CALL_TYPE eCaller, // caller vs callee
  47. HANDLE hCommLink,
  48. HANDLE hevtDataAvailable,
  49. HANDLE hevtWriteReady,
  50. HANDLE hevtConnectionClosed,
  51. PLUGXPRT_FRAMING eFraming,
  52. PLUGXPRT_PARAMETERS *pParams) PURE;
  53. STDMETHOD_(T120Error, UpdateConnection) (THIS_
  54. LPSTR pszConnID,
  55. HANDLE hCommLink) PURE;
  56. STDMETHOD_(T120Error, CloseConnection) (THIS_ LPSTR pszConnID) PURE;
  57. STDMETHOD_(T120Error, EnableWinsock) (THIS) PURE;
  58. STDMETHOD_(T120Error, DisableWinsock) (THIS) PURE;
  59. STDMETHOD_(void, Advise) (THIS_ LPFN_PLUGXPRT_CB, LPVOID pContext) PURE;
  60. STDMETHOD_(void, UnAdvise) (THIS) PURE;
  61. STDMETHOD_(void, ResetConnCounter) (THIS) PURE;
  62. };
  63. #ifdef __cplusplus
  64. extern "C" {
  65. #endif
  66. T120Error WINAPI T120_CreatePluggableTransport(IT120PluggableTransport **);
  67. #ifdef __cplusplus
  68. }
  69. #endif
  70. #endif // _IT120_TRANSPORT_H_