Source code of Windows XP (NT5)
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.

144 lines
3.4 KiB

  1. #ifndef ATTRGEN_HPP_INCLUDED
  2. #define ATTRGEN_HPP_INCLUDED
  3. //
  4. // Index Field bits
  5. //
  6. const DWORD INDEX_BIT_ATTINDEX = 0;
  7. const DWORD INDEX_BIT_PDNTATTINDEX = 1;
  8. // NOTE, to get ANR behaviour, set both
  9. // INDEX_BIT_ANR and INDEX_BIT_ATTINDEX.
  10. const DWORD INDEX_BIT_ANR = 2;
  11. const DWORD INDEX_BIT_PRESERVEONDELETE = 3;
  12. const DWORD INDEX_BIT_COPYONDUPLICATE = 4;
  13. // CN of the class "User"
  14. extern const TCHAR szUserClass[];
  15. // disable User Copy for the following list of attributes
  16. extern const TCHAR * rgszExclClass[];
  17. class AttributeGeneralPage : public CPropertyPage
  18. {
  19. public:
  20. AttributeGeneralPage( Component *pResultControl,
  21. LPDATAOBJECT lpDataObject );
  22. ~AttributeGeneralPage();
  23. //
  24. // The schema object that this property page is for.
  25. //
  26. void Load( Cookie& CookieRef );
  27. Cookie *pCookie;
  28. //
  29. // The things we need for UpdateAllViews().
  30. //
  31. LPDATAOBJECT lpResultDataObject;
  32. Component *pComponent;
  33. //
  34. // Data members for property fields.
  35. //
  36. IADs *pIADsObject;
  37. SchemaObject *pObject;
  38. BOOL fDataLoaded;
  39. CString ObjectName;
  40. CString Description;
  41. CString DDXDescription;
  42. CString DisplayName;
  43. CString SysClassString;
  44. CString MultiValued;
  45. CString SyntaxString;
  46. CString RangeUpper;
  47. CString DDXRangeUpper;
  48. CString RangeLower;
  49. CString DDXRangeLower;
  50. CString OidString;
  51. DWORD search_flags; // low order bit => indexed
  52. BOOL DDXIndexed;
  53. BOOL DDXANR;
  54. BOOL DDXCopyOnDuplicate;
  55. BOOL DDXContainerIndexed;
  56. BOOL Displayable;
  57. BOOL DDXDisplayable;
  58. BOOL Defunct;
  59. BOOL DDXDefunct;
  60. BOOL ReplicatedToGC;
  61. BOOL DDXReplicatedToGC;
  62. private:
  63. CParsedEdit m_editLowerRange;
  64. CParsedEdit m_editUpperRange;
  65. protected:
  66. // Helper functions
  67. // Search User class & aux classes for the specified attribute
  68. BOOL IsAttributeInUserClass( const CString & strAttribDN );
  69. // Search the user class & subclasses
  70. BOOL RecursiveIsAttributeInUserClass( const CString & strAttribDN,
  71. SchemaObject * pObject );
  72. // Linear search of the linked list for the string strAttribDN
  73. BOOL SearchResultList( const CString & strAttribDN,
  74. ListEntry * pList );
  75. // Traverse each auxiliary class by recursivly
  76. // calling RecursiveIsAttributeInUserClass()
  77. BOOL TraverseAuxiliaryClassList( const CString & strAttribDN,
  78. ListEntry * pList );
  79. HRESULT ChangeDefunctState( BOOL DDXDefunct,
  80. BOOL & Defunct,
  81. IADsPropertyList * pPropertyList,
  82. BOOL & fApplyAbort,
  83. BOOL & fApplyFailed );
  84. public:
  85. //
  86. // Required property sheet routines.
  87. //
  88. virtual BOOL OnApply();
  89. virtual BOOL OnInitDialog();
  90. virtual BOOL OnSetActive();
  91. virtual void DoDataExchange( CDataExchange *pDX );
  92. static const DWORD help_map[];
  93. BOOL OnHelp(WPARAM wParam, LPARAM lParam) { return ShowHelp( GetSafeHwnd(), wParam, lParam, help_map, FALSE ); };
  94. BOOL OnContextHelp(WPARAM wParam, LPARAM lParam) { return ShowHelp( GetSafeHwnd(), wParam, lParam, help_map, TRUE ); };
  95. void OnIndexClick();
  96. void OnDeactivateClick();
  97. DECLARE_MESSAGE_MAP()
  98. };
  99. #endif // ATTRGEN_HPP_INCLUDED