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.

74 lines
3.4 KiB

  1. // Gemplus (C) 1999
  2. // This object defines any reader interface.
  3. // So all reader should implement it.
  4. // Version 1.0
  5. // Author: Sergey Ivanov
  6. // Date of creation - 11.01.1999
  7. // Change log:
  8. //
  9. #ifndef _READER_
  10. #define _READER_
  11. #include "generic.h"
  12. #pragma PAGEDCODE
  13. class CSmartCard;
  14. class CUSBReader;//TOBE REMOVED
  15. // Abstruct class
  16. class CReader
  17. {
  18. public:
  19. NTSTATUS m_Status;
  20. SAFE_DESTRUCTORS();
  21. virtual VOID dispose(){self_delete();};
  22. public:
  23. CReader() {};
  24. virtual ~CReader(){};
  25. //virtual BOOL createInterface(LONG interfaceType, LONG protocolType,CDevice* device) {return FALSE;};//TOBE CHANGED
  26. virtual BOOL createInterface(LONG interfaceType, LONG protocolType,CUSBReader* device) {return FALSE;};
  27. virtual BOOL isSmartCardInitialized() {return FALSE;};
  28. virtual VOID setSmartCardInitialized(BOOL state) {};
  29. virtual VOID initializeSmartCardSystem() {};
  30. virtual PSMARTCARD_EXTENSION getCardExtention() {return NULL;};
  31. virtual CSmartCard* getSmartCard() {return NULL;};
  32. virtual PDEVICE_OBJECT getSystemDeviceObject() {return NULL;};
  33. // Synchronization functions...
  34. virtual VOID reader_set_busy() {};
  35. virtual VOID reader_set_Idle() {};
  36. virtual NTSTATUS reader_WaitForIdle() {return STATUS_SUCCESS;};
  37. virtual NTSTATUS reader_WaitForIdleAndBlock() {return STATUS_SUCCESS;};
  38. // Interface with smartcard system
  39. virtual ULONG reader_UpdateCardState() {return 0;};
  40. //virtual ULONG getCardState() {return 0;};
  41. //virtual VOID setCardState(ULONG state) {};
  42. virtual NTSTATUS reader_getVersion(PUCHAR pVersion, PULONG pLength) {return STATUS_SUCCESS;};
  43. virtual NTSTATUS reader_setMode(ULONG mode) {return STATUS_SUCCESS;};
  44. virtual VOID setNotificationState(ULONG state) {};
  45. virtual ULONG getNotificationState() {return 0;};
  46. virtual VOID completeCardTracking() {};
  47. #ifdef DEBUG
  48. // Defines methods to process system requests...
  49. virtual NTSTATUS reader_Read(IN PIRP Irp) {return STATUS_SUCCESS;};
  50. virtual NTSTATUS reader_Write(IN PIRP Irp) {return STATUS_SUCCESS;};
  51. #endif
  52. // Define methods to process driver requests...
  53. virtual NTSTATUS reader_Read(BYTE * pRequest,ULONG RequestLength,BYTE * pReply,ULONG* pReplyLength) {return STATUS_SUCCESS;};
  54. virtual NTSTATUS reader_Write(BYTE* pRequest,ULONG RequestLength,BYTE * pReply,ULONG* pReplyLength) {return STATUS_SUCCESS;};
  55. virtual NTSTATUS reader_Ioctl(ULONG ControlCode,BYTE* pRequest,ULONG RequestLength,BYTE* pReply,ULONG* pReplyLength) {return STATUS_SUCCESS;};
  56. virtual NTSTATUS reader_SwitchSpeed(ULONG ControlCode,BYTE* pRequest,ULONG RequestLength,BYTE* pReply,ULONG* pReplyLength) {return STATUS_SUCCESS;};
  57. virtual NTSTATUS reader_VendorAttribute(ULONG ControlCode,BYTE* pRequest,ULONG RequestLength,BYTE* pReply,ULONG* pReplyLength) {return STATUS_SUCCESS;};
  58. virtual NTSTATUS reader_Power(ULONG ControlCode,BYTE* pReply,ULONG* pReplyLength, BOOLEAN Specific) {return STATUS_SUCCESS;};
  59. virtual NTSTATUS reader_SetProtocol(ULONG ProtocolRequested, UCHAR ProtocolNegociation) {return STATUS_SUCCESS;};
  60. virtual NTSTATUS reader_translate_request(BYTE * pRequest,ULONG RequestLength,BYTE * pReply,ULONG* pReplyLength, PSCARD_CARD_CAPABILITIES cardCapabilities, BYTE NewWtx) {return STATUS_SUCCESS;};
  61. virtual NTSTATUS reader_translate_response(BYTE * pRequest,ULONG RequestLength,BYTE * pReply,ULONG* pReplyLength) {return STATUS_SUCCESS;};
  62. };
  63. #endif // If defined