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.

103 lines
2.8 KiB

  1. /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2. Microsoft Windows
  3. Copyright (C) Microsoft Corporation, 1995 - 1999.
  4. File: Qualifiers.h
  5. Content: Declaration of CQualifiers.
  6. History: 11-17-2001 dsie created
  7. ------------------------------------------------------------------------------*/
  8. #ifndef __QUALIFIERS_H_
  9. #define __QUALIFIERS_H_
  10. #include "Resource.h"
  11. #include "Debug.h"
  12. #include "Error.h"
  13. #include "CopyItem.h"
  14. #include "Qualifier.h"
  15. //
  16. // typdefs to make life easier.
  17. //
  18. typedef std::map<CComBSTR, CComPtr<IQualifier> > QualifierMap;
  19. typedef CComEnumOnSTL<IEnumVARIANT, &IID_IEnumVARIANT, VARIANT, _CopyMapItem<IQualifier>, QualifierMap> QualifierEnum;
  20. typedef ICollectionOnSTLImpl<IQualifiers, QualifierMap, VARIANT, _CopyMapItem<IQualifier>, QualifierEnum> IQualifiersCollection;
  21. ////////////////////////////////////////////////////////////////////////////////
  22. //
  23. // Exported functions.
  24. //
  25. /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  26. Function : CreateQualifiersObject
  27. Synopsis : Create a qualifiers collection object and populate the collection
  28. with qualifiers from the specified certificate policies.
  29. Parameter: PCERT_POLICY_INFO pCertPolicyInfo - Pointer to CERT_POLICY_INFO.
  30. IQualifiers ** ppIQualifiers - Pointer to pointer IQualifiers
  31. object.
  32. Remark :
  33. ------------------------------------------------------------------------------*/
  34. HRESULT CreateQualifiersObject (PCERT_POLICY_INFO pCertPolicyInfo,
  35. IQualifiers ** ppIQualifiers);
  36. ////////////////////////////////////////////////////////////////////////////////
  37. //
  38. // CQualifiers
  39. //
  40. class ATL_NO_VTABLE CQualifiers :
  41. public CComObjectRootEx<CComMultiThreadModel>,
  42. public CComCoClass<CQualifiers, &CLSID_Qualifiers>,
  43. public ICAPICOMError<CQualifiers, &IID_IQualifiers>,
  44. public IDispatchImpl<IQualifiersCollection, &IID_IQualifiers, &LIBID_CAPICOM,
  45. CAPICOM_MAJOR_VERSION, CAPICOM_MINOR_VERSION>
  46. {
  47. public:
  48. CQualifiers()
  49. {
  50. }
  51. DECLARE_NO_REGISTRY()
  52. DECLARE_GET_CONTROLLING_UNKNOWN()
  53. DECLARE_PROTECT_FINAL_CONSTRUCT()
  54. BEGIN_COM_MAP(CQualifiers)
  55. COM_INTERFACE_ENTRY(IQualifiers)
  56. COM_INTERFACE_ENTRY(IDispatch)
  57. COM_INTERFACE_ENTRY(ISupportErrorInfo)
  58. END_COM_MAP()
  59. BEGIN_CATEGORY_MAP(CQualifiers)
  60. END_CATEGORY_MAP()
  61. //
  62. // IQualifiers
  63. //
  64. public:
  65. //
  66. // These are the only ones that we need to implemented, others will be
  67. // handled by ATL ICollectionOnSTLImpl.
  68. //
  69. //
  70. // None COM functions.
  71. //
  72. STDMETHOD(Init)
  73. (PCERT_POLICY_INFO pCertPolicyInfo);
  74. };
  75. #endif //__QUALIFIERS_H_