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.

129 lines
3.8 KiB

  1. /*++
  2. 1998 Seagate Software, Inc. All rights reserved
  3. Module Name:
  4. RmsClien.h
  5. Abstract:
  6. Declaration of the CRmsClient class
  7. Author:
  8. Brian Dodd [brian] 15-Nov-1996
  9. Revision History:
  10. --*/
  11. #ifndef _RMSCLIEN_
  12. #define _RMSCLIEN_
  13. #include "resource.h" // resource symbols
  14. #include "RmsObjct.h" // CRmsComObject
  15. /*++
  16. Class Name:
  17. CRmsClient
  18. Class Description:
  19. A CRmsClient represents information about a registerered
  20. Rms client application.
  21. --*/
  22. class CRmsClient :
  23. public CComDualImpl<IRmsClient, &IID_IRmsClient, &LIBID_RMSLib>,
  24. public CRmsComObject,
  25. public CWsbObject, // inherits CComObjectRoot
  26. public CComCoClass<CRmsClient,&CLSID_CRmsClient>
  27. {
  28. public:
  29. CRmsClient() {}
  30. BEGIN_COM_MAP(CRmsClient)
  31. COM_INTERFACE_ENTRY2(IDispatch, IRmsClient)
  32. COM_INTERFACE_ENTRY(IRmsClient)
  33. COM_INTERFACE_ENTRY(IRmsComObject)
  34. COM_INTERFACE_ENTRY(ISupportErrorInfo)
  35. COM_INTERFACE_ENTRY2(IPersist, IPersistStream)
  36. COM_INTERFACE_ENTRY(IPersistStream)
  37. COM_INTERFACE_ENTRY(IWsbCollectable)
  38. COM_INTERFACE_ENTRY(IWsbPersistStream)
  39. COM_INTERFACE_ENTRY(IWsbTestable)
  40. END_COM_MAP()
  41. DECLARE_REGISTRY_RESOURCEID(IDR_RmsClient)
  42. // CComObjectRoot
  43. public:
  44. STDMETHOD(FinalConstruct)(void);
  45. // IPersist
  46. public:
  47. STDMETHOD(GetClassID)(CLSID *pClsid);
  48. // IPersistStream
  49. public:
  50. STDMETHOD(GetSizeMax)(ULARGE_INTEGER* pSize);
  51. STDMETHOD(Load)(IStream* pStream);
  52. STDMETHOD(Save)(IStream* pStream, BOOL clearDirty);
  53. // IWsbCollectable
  54. public:
  55. STDMETHOD(CompareTo)(IUnknown* pCollectable, SHORT* pResult);
  56. WSB_FROM_CWSBOBJECT;
  57. // IWsbTestable
  58. public:
  59. STDMETHOD(Test)(USHORT *pPassed, USHORT *pFailed);
  60. // IRmsClient
  61. public:
  62. STDMETHOD(GetOwnerClassId)(CLSID *pClassId);
  63. STDMETHOD(SetOwnerClassId)(CLSID classId);
  64. STDMETHOD( GetName )( BSTR *pName );
  65. STDMETHOD( SetName )( BSTR name );
  66. STDMETHOD( GetPassword )( BSTR *pName );
  67. STDMETHOD( SetPassword )( BSTR name );
  68. STDMETHOD(GetInfo)(UCHAR *pInfo, SHORT *pSize);
  69. STDMETHOD(SetInfo)(UCHAR *pInfo, SHORT size);
  70. STDMETHOD(GetVerifierClass)(CLSID *pClassId);
  71. STDMETHOD(SetVerifierClass)(CLSID classId);
  72. STDMETHOD(GetPortalClass)(CLSID *pClassId);
  73. STDMETHOD(SetPortalClass)(CLSID classId);
  74. private:
  75. enum { // Class specific constants:
  76. //
  77. Version = 1, // Class version, this should be
  78. // incremented each time the
  79. // the class definition changes.
  80. MaxInfo = 128, // Size of the application specific
  81. // infomation buffer. Currently
  82. // fixed in size.
  83. }; //
  84. CLSID m_ownerClassId; // The Class ID for the client application.
  85. CWsbBstrPtr m_password; // Client password.
  86. SHORT m_sizeofInfo; // The size of valid data in the application
  87. // specific information buffer.
  88. UCHAR m_info[MaxInfo]; // Application specific information.
  89. CLSID m_verifierClass; // The interface to the on-media
  90. // ID verification function.
  91. CLSID m_portalClass; // The interface to a site specific import
  92. // and export storage location
  93. // specification dialog.
  94. };
  95. #endif // _RMSCLIEN_