Source code of Windows XP (NT5)
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.

127 lines
3.7 KiB

  1. #ifndef _FSAFTCLT_
  2. #define _FSAFTCLT_
  3. /*++
  4. 1998 Seagate Software, Inc. All rights reserved.
  5. Module Name:
  6. fsafltr.cpp
  7. Abstract:
  8. This class represents a user who the filter has detected accessing a file with placeholder information.
  9. Author:
  10. Chuck Bardeen [cbardeen] 12-Feb-1997
  11. Revision History:
  12. --*/
  13. #include "resource.h" // main symbols
  14. #include "fsa.h"
  15. /*++
  16. Class Name:
  17. CFsaFilterClient
  18. Class Description:
  19. This class represents a user who the filter has detected accessing a file with placeholder information.
  20. --*/
  21. class CFsaFilterClient :
  22. public CWsbCollectable,
  23. public IFsaFilterClient,
  24. public CComCoClass<CFsaFilterClient,&CLSID_CFsaFilterClientNTFS>
  25. {
  26. public:
  27. CFsaFilterClient() {}
  28. BEGIN_COM_MAP(CFsaFilterClient)
  29. COM_INTERFACE_ENTRY(IFsaFilterClient)
  30. COM_INTERFACE_ENTRY(IWsbCollectable)
  31. COM_INTERFACE_ENTRY(IWsbTestable)
  32. END_COM_MAP()
  33. DECLARE_REGISTRY_RESOURCEID(IDR_FsaFilterClient)
  34. // CComObjectRoot
  35. public:
  36. STDMETHOD(FinalConstruct)(void);
  37. void (FinalRelease)(void);
  38. // IWsbCollectable
  39. public:
  40. STDMETHOD(CompareTo)(IUnknown* pUnknown, SHORT* pResult);
  41. // IPersist
  42. public:
  43. STDMETHOD(GetClassID)(LPCLSID pClsid);
  44. // IPersistStream
  45. public:
  46. STDMETHOD(GetSizeMax)(ULARGE_INTEGER* pSize);
  47. STDMETHOD(Load)(IStream* pStream);
  48. STDMETHOD(Save)(IStream* pStream, BOOL clearDirty);
  49. // IWsbTestable
  50. STDMETHOD(Test)(USHORT *passed, USHORT* failed);
  51. // IFsaFilterClient
  52. public:
  53. STDMETHOD(CompareBy)(FSA_FILTERCLIENT_COMPARE by);
  54. STDMETHOD(CompareToAuthenticationId)(LONG luidHigh, ULONG luidLow, SHORT* pResult);
  55. STDMETHOD(CompareToIClient)(IFsaFilterClient* pClient, SHORT* pResult);
  56. STDMETHOD(CompareToMachineName)(OLECHAR* name, SHORT* pResult);
  57. STDMETHOD(GetAuthenticationId)(LONG* pLuidHigh, ULONG* pLuidLow);
  58. STDMETHOD(GetDomainName)(OLECHAR** pName, ULONG bufferSize);
  59. STDMETHOD(GetLastRecallTime)(FILETIME* pTime);
  60. STDMETHOD(GetMachineName)(OLECHAR** pName, ULONG bufferSize);
  61. STDMETHOD(GetRecallCount)(ULONG* pCount);
  62. STDMETHOD(GetUserName)(OLECHAR** pName, ULONG bufferSize);
  63. STDMETHOD(HasRecallDisabled)(void);
  64. STDMETHOD(HitRecallLimit)(void);
  65. STDMETHOD(SetAuthenticationId)(LONG luidHigh, ULONG luidLow);
  66. STDMETHOD(SetDomainName)(OLECHAR* pName);
  67. STDMETHOD(SetHasRecallDisabled)(BOOL isDisabled);
  68. STDMETHOD(SetHitRecallLimit)(BOOL hitLimit);
  69. STDMETHOD(SetLastRecallTime)(FILETIME time);
  70. STDMETHOD(SetMachineName)(OLECHAR* pName);
  71. STDMETHOD(SetRecallCount)(ULONG count);
  72. STDMETHOD(SetUserName)(OLECHAR* pName);
  73. STDMETHOD(StartIdentify)();
  74. STDMETHOD(SetTokenSource)(CHAR *source);
  75. STDMETHOD(SendRecallInfo)(IFsaFilterRecall *pRecall, BOOL starting, HRESULT rHr);
  76. STDMETHOD(IdentifyThread)(void);
  77. STDMETHOD(SetIsAdmin)(BOOLEAN isAdmin);
  78. STDMETHOD(GetIsAdmin)(BOOLEAN *isAdmin);
  79. STDMETHOD(CheckRecallLimit)(DWORD minRecallInterval, DWORD maxRecalls, BOOLEAN exemptAdmin);
  80. protected:
  81. FSA_FILTERCLIENT_COMPARE m_compareBy;
  82. LONG m_luidHigh;
  83. ULONG m_luidLow;
  84. CWsbStringPtr m_domainName;
  85. BOOL m_hasRecallDisabled;
  86. BOOL m_hitRecallLimit;
  87. FILETIME m_lastRecallTime;
  88. CWsbStringPtr m_machineName;
  89. ULONG m_recallCount;
  90. CWsbStringPtr m_userName;
  91. BOOL m_identified;
  92. CWsbStringPtr m_tokenSource;
  93. ULONG m_msgCounter;
  94. HANDLE m_identifyThread;
  95. BOOLEAN m_isAdmin;
  96. BOOLEAN m_loggedLimitError;
  97. };
  98. #endif // _FSAFTCLT_