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.

94 lines
2.2 KiB

  1. /*++
  2. Copyright (c) 1998 Microsoft Corporation
  3. Module Name:
  4. vcint.h
  5. Abstract:
  6. This module defines the virtual channel interface class.
  7. Author:
  8. Madan Appiah (madana) 17-Sep-1998
  9. Revision History:
  10. --*/
  11. #ifndef __PORTMAP_H__
  12. #define __PORTMAP_H__
  13. //include externally exposed API
  14. #include "drapi.h"
  15. //definition of a channel init handle
  16. //this is used only by internal plugins
  17. #include "vchandle.h"
  18. #define STATE_UNKNOWN 0xFF
  19. #define PRDR_VC_CHANNEL_NAME DR_CHANNEL_NAME
  20. class ProcObj;
  21. class VCManager;
  22. typedef struct _VC_TX_DATA
  23. {
  24. UINT32 uiLength;
  25. UINT32 uiAvailLen;
  26. BYTE *pbData;
  27. } VC_TX_DATA, *PVC_TX_DATA;
  28. class CClip;
  29. class CRDPSound;
  30. class VCManager : public IRDPDR_INTERFACE_OBJ {
  31. public:
  32. VCManager(CHANNEL_ENTRY_POINTS_EX*);
  33. VOID ChannelWrite(LPVOID, UINT);
  34. // This version returns a status for the write as:
  35. // CHANNEL_RC_OK, CHANNEL_RC_NOT_INITIALIZED, CHANNEL_RC_NOT_CONNECTED,
  36. // CHANNEL_RC_BAD_CHANNEL_HANDLE, CHANNEL_RC_NULL_DATA,
  37. // CHANNEL_RC_ZERO_LENGTH
  38. UINT ChannelWriteEx(LPVOID, UINT);
  39. UINT ChannelClose();
  40. VOID ChannelInitEvent(PVOID, UINT, PVOID, UINT);
  41. VOID ChannelOpenEvent(ULONG, UINT, PVOID, UINT32, UINT32, UINT32);
  42. VOID SetClip(CClip* pClip) {_pClip = pClip;}
  43. CClip* GetClip() {return _pClip;}
  44. VOID SetInitData(PRDPDR_DATA pInitData) {_pRdpDrInitSettings = pInitData;}
  45. PRDPDR_DATA GetInitData() {return _pRdpDrInitSettings;}
  46. VOID SetSound(CRDPSound *pSound) { _pSound = pSound; }
  47. CRDPSound *GetSound() { return _pSound; }
  48. virtual void OnDeviceChange(WPARAM wParam, LPARAM lParam);
  49. protected:
  50. PVOID _hVCHandle; // Virtual Channel Handle.
  51. ULONG _hVCOpenHandle; // VC open handle for rdpdr channel.
  52. VC_TX_DATA _Buffer; // Data for compiling data recieved by the channel
  53. BYTE _bState; // State of the connection/system
  54. ProcObj *_pProcObj; // Pointer to the processing unit
  55. CHANNEL_ENTRY_POINTS_EX _ChannelEntries;
  56. // Callback methods
  57. PRDPDR_DATA _pRdpDrInitSettings;
  58. CClip* _pClip;
  59. CRDPSound *_pSound;
  60. };
  61. #endif // __PORTMAP_H__