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
2.6 KiB

  1. /**********************************************************************/
  2. /** Microsoft Passport **/
  3. /** Copyright(c) Microsoft Corporation, 1999 - 2001 **/
  4. /**********************************************************************/
  5. /*
  6. admin.h
  7. Define CAdmin class for passport admin interface
  8. FILE HISTORY:
  9. */
  10. #ifndef __ADMIN_H_
  11. #define __ADMIN_H_
  12. #include "resource.h" // main symbols
  13. /////////////////////////////////////////////////////////////////////////////
  14. // CAdmin
  15. class ATL_NO_VTABLE CAdmin :
  16. public CComObjectRootEx<CComMultiThreadModel>,
  17. public CComCoClass<CAdmin, &CLSID_Admin>,
  18. public ISupportErrorInfo,
  19. // public IDispatchImpl<IPassportAdmin, &IID_IPassportAdmin, &LIBID_PASSPORTLib>,
  20. public IDispatchImpl<IPassportAdminEx, &IID_IPassportAdminEx, &LIBID_PASSPORTLib>
  21. {
  22. public:
  23. CAdmin()
  24. {
  25. }
  26. public:
  27. DECLARE_REGISTRY_RESOURCEID(IDR_ADMIN)
  28. DECLARE_PROTECT_FINAL_CONSTRUCT()
  29. BEGIN_COM_MAP(CAdmin)
  30. COM_INTERFACE_ENTRY (IPassportAdmin)
  31. COM_INTERFACE_ENTRY (IPassportAdminEx)
  32. COM_INTERFACE_ENTRY2(IDispatch, IPassportAdminEx)
  33. COM_INTERFACE_ENTRY (ISupportErrorInfo)
  34. END_COM_MAP()
  35. // ISupportsErrorInfo
  36. STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid);
  37. // IPassportAdmin
  38. public:
  39. STDMETHOD(get_currentKeyVersion)(/*[out, retval]*/ int *pVal);
  40. STDMETHOD(put_currentKeyVersion)(/*[in]*/ int Val);
  41. STDMETHOD(setKeyTime)(/*[in]*/ int version, /*[in]*/ int fromNow);
  42. STDMETHOD(deleteKey)(/*[in]*/ int version);
  43. STDMETHOD(addKey)(/*[in]*/ BSTR keyMaterial, /*[in]*/ int version, /*[in]*/ long expires, /*[out,retval]*/ VARIANT_BOOL *ok);
  44. STDMETHOD(get_ErrorDescription)(/*[out, retval]*/ BSTR *pVal);
  45. STDMETHOD(get_IsValid)(/*[out, retval]*/ VARIANT_BOOL *pVal);
  46. STDMETHOD(Refresh)(/*[in]*/ VARIANT_BOOL bWait, /*[out,retval]*/ VARIANT_BOOL* pbSuccess);
  47. STDMETHOD(setKeyTimeEx)(/*[in]*/ int version, /*[in]*/ int fromNow, /*[in,optional]*/ VARIANT vSiteName);
  48. STDMETHOD(deleteKeyEx)(/*[in]*/ int version, /*[in,optional]*/ VARIANT vSiteName);
  49. STDMETHOD(addKeyEx)(/*[in]*/ BSTR keyMaterial, /*[in]*/ int version, /*[in]*/ long expires, /*[in,optional]*/ VARIANT vSiteName, /*[out,retval]*/ VARIANT_BOOL *ok);
  50. STDMETHOD(getCurrentKeyVersionEx)(/*[in,optional]*/ VARIANT vSiteName, /*[out, retval]*/ int *pVal);
  51. STDMETHOD(putCurrentKeyVersionEx)(/*[in]*/ int Val, /*[in,optional]*/ VARIANT vSiteName);
  52. STDMETHOD(setNexusPassword)(/*[in]*/ BSTR bstrPwd);
  53. };
  54. //
  55. // Helper routine to create/set the CCDPassword
  56. //
  57. HRESULT SetCCDPassword(VOID);
  58. #endif //__ADMIN_H_