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.

112 lines
3.1 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1995 - 1999
  6. //
  7. // File: cipolicy.h
  8. //
  9. //--------------------------------------------------------------------------
  10. // cipolicy.h : Declaration of the CCertServerPolicy class
  11. #include "cscomres.h" // main symbols
  12. /////////////////////////////////////////////////////////////////////////////
  13. // CertIF
  14. class CCertServerPolicy:
  15. public IDispatchImpl<ICertServerPolicy, &IID_ICertServerPolicy, &LIBID_CERTCLIENTLib>,
  16. public ISupportErrorInfoImpl<&IID_ICertServerPolicy>,
  17. public CComObjectRoot,
  18. public CComCoClass<CCertServerPolicy,&CLSID_CCertServerPolicy>
  19. {
  20. public:
  21. CCertServerPolicy() { m_Context = 0; m_fExtensionValid = FALSE; }
  22. ~CCertServerPolicy();
  23. BEGIN_COM_MAP(CCertServerPolicy)
  24. COM_INTERFACE_ENTRY(IDispatch)
  25. COM_INTERFACE_ENTRY(ISupportErrorInfo)
  26. COM_INTERFACE_ENTRY(ICertServerPolicy)
  27. END_COM_MAP()
  28. // Remove the comment from following the line if you don't want your object to
  29. // support aggregation. The default is to support it.
  30. DECLARE_NOT_AGGREGATABLE(CCertServerPolicy)
  31. DECLARE_REGISTRY(
  32. CCertServerPolicy,
  33. wszCLASS_CERTSERVERPOLICY TEXT(".1"),
  34. wszCLASS_CERTSERVERPOLICY,
  35. IDS_CERTSERVERPOLICY_DESC,
  36. THREADFLAGS_BOTH)
  37. // ICertServerPolicy
  38. public:
  39. STDMETHOD(SetContext)(
  40. IN LONG Context);
  41. STDMETHOD(GetRequestProperty)(
  42. IN BSTR const strPropertyName,
  43. IN LONG PropertyType,
  44. OUT VARIANT __RPC_FAR *pvarPropertyValue);
  45. STDMETHOD(GetRequestAttribute)(
  46. IN BSTR const strAttributeName,
  47. OUT BSTR __RPC_FAR *pstrAttributeValue);
  48. STDMETHOD(GetCertificateProperty)(
  49. IN BSTR const strPropertyName,
  50. IN LONG PropertyType,
  51. OUT VARIANT __RPC_FAR *pvarPropertyValue);
  52. STDMETHOD(SetCertificateProperty)(
  53. IN BSTR const strPropertyName,
  54. IN LONG PropertyType,
  55. IN VARIANT const __RPC_FAR *pvarPropertyValue);
  56. STDMETHOD(GetCertificateExtension)(
  57. IN BSTR const strExtensionName,
  58. IN LONG Type,
  59. OUT VARIANT __RPC_FAR *pvarValue);
  60. STDMETHOD(GetCertificateExtensionFlags)(
  61. OUT LONG __RPC_FAR *pFlags);
  62. STDMETHOD(SetCertificateExtension)(
  63. IN BSTR const strExtensionName,
  64. IN LONG Type,
  65. IN LONG ExtFlags,
  66. IN VARIANT const __RPC_FAR *pvarValue);
  67. STDMETHOD(EnumerateExtensionsSetup)(
  68. IN LONG Flags);
  69. STDMETHOD(EnumerateExtensions)(
  70. OUT BSTR *pstrExtensionName);
  71. STDMETHOD(EnumerateExtensionsClose)(VOID);
  72. STDMETHOD(EnumerateAttributesSetup)(
  73. IN LONG Flags);
  74. STDMETHOD(EnumerateAttributes)(
  75. OUT BSTR *pstrAttributeName);
  76. STDMETHOD(EnumerateAttributesClose)(VOID);
  77. private:
  78. HRESULT _SetErrorInfo(
  79. IN HRESULT hrError,
  80. IN WCHAR const *pwszDescription,
  81. OPTIONAL IN WCHAR const *pwszPropName);
  82. LONG m_Context;
  83. LONG m_ExtFlags;
  84. BOOL m_fExtensionValid;
  85. CIENUM m_ciEnumExtensions;
  86. CIENUM m_ciEnumAttributes;
  87. };