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.

59 lines
1.6 KiB

  1. #ifndef _PSTN_TRANSPORT_INTERFACE_
  2. #define _PSTN_TRANSPORT_INTERFACE_
  3. extern DictionaryClass *g_pComPortList2;
  4. extern SListClass *g_pPSTNEventList;
  5. // #include "wincfg.h"
  6. typedef enum
  7. {
  8. READ_EVENT,
  9. WRITE_EVENT,
  10. CONTROL_EVENT
  11. }
  12. WIN32Event;
  13. typedef struct
  14. {
  15. HANDLE event;
  16. WIN32Event event_type;
  17. BOOL delete_event;
  18. PhysicalHandle hCommLink; // physical handle
  19. ComPort *comport; // phsyical layer
  20. }
  21. EventObject, * PEventObject;
  22. class CTransportInterface : public ILegacyTransport
  23. {
  24. public:
  25. CTransportInterface(TransportError *);
  26. ~CTransportInterface(void);
  27. STDMETHODIMP_(void) ReleaseInterface(void);
  28. STDMETHODIMP_(TransportError) TInitialize(TransportCallback, void *user_defined);
  29. STDMETHODIMP_(TransportError) TCleanup(void);
  30. STDMETHODIMP_(TransportError) TCreateTransportStack(THIS_ BOOL fCaller, HANDLE hCommLink, HANDLE hevtClose, PLUGXPRT_PARAMETERS *pParams);
  31. STDMETHODIMP_(TransportError) TCloseTransportStack(THIS_ HANDLE hCommLink);
  32. STDMETHODIMP_(TransportError) TConnectRequest(LEGACY_HANDLE *, HANDLE hCommLink);
  33. STDMETHODIMP_(TransportError) TDisconnectRequest(LEGACY_HANDLE, BOOL trash_packets);
  34. STDMETHODIMP_(TransportError) TDataRequest(LEGACY_HANDLE, LPBYTE pbData, ULONG cbDataSize);
  35. STDMETHODIMP_(TransportError) TReceiveBufferAvailable(void);
  36. STDMETHODIMP_(TransportError) TPurgeRequest(LEGACY_HANDLE);
  37. STDMETHODIMP_(TransportError) TEnableReceiver(void);
  38. private:
  39. LONG m_cUsers;
  40. };
  41. extern ULONG NotifyT120(ULONG msg, void *lParam);
  42. #endif _PSTN_TRANSPORT_INTERFACE_