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.

71 lines
1.7 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1999 - 1999
  6. //
  7. // File: condition.h
  8. //
  9. //--------------------------------------------------------------------------
  10. // Condition.h: interface for the CCondition class.
  11. //
  12. //////////////////////////////////////////////////////////////////////
  13. #ifndef _CONDITION__INCLUDE_
  14. #define _CONDITION__INCLUDE_
  15. #include "atltmp.h"
  16. #if _MSC_VER >= 1000
  17. #pragma once
  18. #endif // _MSC_VER >= 1000
  19. typedef enum _CONDITIONTYPE
  20. {
  21. IAS_MATCH_CONDITION = 0x01,
  22. IAS_TIMEOFDAY_CONDITION = IAS_MATCH_CONDITION + 1,
  23. IAS_NTGROUPS_CONDITION = IAS_TIMEOFDAY_CONDITION + 1
  24. } CONDITIONTYPE;
  25. class CCondition
  26. {
  27. public:
  28. CCondition(IIASAttributeInfo* pAttributeInfo, ATL::CString& strConditionText);
  29. CCondition(IIASAttributeInfo* pAttributeInfo);
  30. virtual ~CCondition() {};
  31. // editor for this conditon type
  32. // must be implemented by subclass
  33. virtual HRESULT Edit() = 0;
  34. virtual ATL::CString GetDisplayText();
  35. virtual WCHAR* GetConditionText();
  36. public:
  37. //
  38. // pointer to the condition attribute
  39. //
  40. CComPtr<IIASAttributeInfo> m_spAttributeInfo;
  41. // condition text for the condition
  42. // this is public so client can access this string very easily
  43. ATL::CString m_strConditionText;
  44. };
  45. // Useful function for adding condition lists to SdoCollections.
  46. // Used in both PolicyPage1.cpp and AddPolicyWizardPage2.cpp
  47. HRESULT WriteConditionListToSDO( CSimpleArray<CCondition*> & ConditionList
  48. , ISdoCollection * pConditionCollectionSdo
  49. , HWND hWnd
  50. );
  51. #endif // ifndef _CONDITION__INCLUDE_