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.

60 lines
1.3 KiB

  1. /*++
  2. Copyright (c) 2000 Microsoft Corporation
  3. Module Name :
  4. scartss.h
  5. Abstract:
  6. Smart card subsystem device object handles one redirected smart card subsystem
  7. Revision History:
  8. JoyC 9/11 Created
  9. --*/
  10. #pragma once
  11. typedef enum {
  12. dsCreated,
  13. dsInitialized,
  14. dsDisconnected
  15. } DrSmartCardState;
  16. class DrSmartCard : public DrDevice
  17. {
  18. private:
  19. LONG _CreateRefCount;
  20. DrSmartCardState _SmartCardState;
  21. protected:
  22. virtual BOOL IsDeviceNameValid();
  23. public:
  24. DoubleList _MidList;
  25. DrSmartCard(SmartPtr<DrSession> &Session, ULONG DeviceType,
  26. ULONG DeviceId, PUCHAR PreferredDosName);
  27. virtual NTSTATUS Initialize(PRDPDR_DEVICE_ANNOUNCE devAnnounceMsg, ULONG Length);
  28. virtual BOOL SupportDiscon();
  29. virtual BOOL IsAvailable()
  30. {
  31. return (_DeviceStatus == dsAvailable || _DeviceStatus == dsConnected);
  32. }
  33. virtual void Disconnect ();
  34. void AddDeviceRef() {
  35. InterlockedIncrement(&_CreateRefCount);
  36. }
  37. virtual VOID Remove() { }
  38. virtual NTSTATUS Create(IN OUT PRX_CONTEXT RxContext);
  39. virtual NTSTATUS Close(IN OUT PRX_CONTEXT RxContext);
  40. virtual NTSTATUS IoControl(IN OUT PRX_CONTEXT RxContext);
  41. void ClientConnect(PRDPDR_DEVICE_ANNOUNCE devAnnouceMsg, ULONG Length);
  42. };