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.

62 lines
1.6 KiB

  1. //-------------------------------------------------------------------
  2. // This is abstract class for generic protocol
  3. // Specific protocols should use it as a parent device
  4. // Author: Sergey Ivanov
  5. // Log:
  6. // 11/09/99 - implemented
  7. //-------------------------------------------------------------------
  8. #ifndef __PROTOCOL__
  9. #define __PROTOCOL__
  10. #include "generic.h"
  11. #include "kernel.h"
  12. #define READER_PROTOCOL_LV 1
  13. #define READER_PROTOCOL_GBP 2
  14. #define READER_PROTOCOL_TLP 3
  15. #define PROTOCOL_OUTPUT_BUFFER_SIZE 0x1000
  16. #define PROTOCOL_INPUT_BUFFER_SIZE 0x1000
  17. //class CDevice;
  18. class CUSBReader;
  19. class CDebug;
  20. class CMemory;
  21. #pragma PAGEDCODE
  22. class CProtocol
  23. {
  24. public:
  25. NTSTATUS m_Status;
  26. SAFE_DESTRUCTORS();
  27. virtual VOID dispose(){self_delete();};
  28. protected:
  29. CDevice* device;
  30. //CUSBReader* device;
  31. CDebug* debug;
  32. CMemory* memory;
  33. // Internal buffers to manage Xfers...
  34. ULONG OutputBufferLength;
  35. PUCHAR pOutputBuffer;
  36. ULONG InputBufferLength;
  37. PUCHAR pInputBuffer;
  38. protected:
  39. CProtocol();
  40. virtual ~CProtocol();
  41. public:
  42. CProtocol(CDevice* device);
  43. //CProtocol(CUSBReader* device);
  44. virtual VOID set_WTR_Delay(LONG Delay) {};
  45. virtual ULONG get_WTR_Delay() {return 0;};
  46. virtual VOID set_Default_WTR_Delay() {};
  47. virtual LONG get_Power_WTR_Delay() {return 0;};
  48. virtual ULONG getCardState() {return 0;};
  49. virtual NTSTATUS writeAndWait(PUCHAR pRequest,ULONG RequestLength,PUCHAR pReply,ULONG* pReplyLength) {return STATUS_SUCCESS;};
  50. virtual NTSTATUS readAndWait(PUCHAR pRequest,ULONG RequestLength,PUCHAR pReply,ULONG* pReplyLength) {return STATUS_SUCCESS;};
  51. };
  52. #endif