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.

170 lines
4.5 KiB

  1. //+----------------------------------------------------------------------------
  2. //
  3. // DS Administration MMC snapin.
  4. //
  5. // Microsoft Windows
  6. // Copyright (C) Microsoft Corporation, 1992 - 1999
  7. //
  8. // File: Rename.h
  9. //
  10. // Contents: Rename object functions
  11. //
  12. // Classes: CDSRenameObject
  13. //
  14. // History: 28-Oct-99 JeffJon Created
  15. //
  16. //--------------------------------------------------------------------------
  17. #ifndef __RENAME_H_
  18. #define __RENAME_H_
  19. ///////////////////////////////////////////////////////////////////////////
  20. // Forward declarations
  21. //
  22. class CUINode;
  23. class CDSCookie;
  24. class CDSComponentData;
  25. ///////////////////////////////////////////////////////////////////////////
  26. // CDSRenameObject
  27. //
  28. class CDSRenameObject
  29. {
  30. public:
  31. CDSRenameObject(CUINode* pUINode,
  32. CDSCookie* pCookie,
  33. LPCWSTR pszNewName,
  34. HWND hwnd,
  35. CDSComponentData* pComponentData)
  36. : m_pUINode(pUINode),
  37. m_pCookie(pCookie),
  38. m_hwnd(hwnd),
  39. m_pComponentData(pComponentData)
  40. {
  41. m_szNewName = pszNewName;
  42. }
  43. virtual ~CDSRenameObject() {}
  44. virtual HRESULT DoRename();
  45. protected:
  46. HRESULT CommitRenameToDS();
  47. HRESULT ValidateAndModifyName(CString& refName,
  48. PCWSTR pszIllegalChars,
  49. WCHAR wReplacementChar,
  50. UINT nModifyStringID,
  51. HWND hWnd);
  52. CUINode* m_pUINode;
  53. CDSCookie* m_pCookie;
  54. CString m_szNewName;
  55. HWND m_hwnd;
  56. CDSComponentData* m_pComponentData;
  57. };
  58. ///////////////////////////////////////////////////////////////////////////
  59. // CDSRenameUser
  60. //
  61. class CDSRenameUser : public CDSRenameObject
  62. {
  63. public:
  64. CDSRenameUser(CUINode* pUINode,
  65. CDSCookie* pCookie,
  66. LPCWSTR pszNewName,
  67. HWND hwnd,
  68. CDSComponentData* pComponentData)
  69. : CDSRenameObject(pUINode, pCookie, pszNewName, hwnd, pComponentData) {}
  70. virtual HRESULT DoRename();
  71. };
  72. ///////////////////////////////////////////////////////////////////////////
  73. // CDSRenameGroup
  74. //
  75. class CDSRenameGroup : public CDSRenameObject
  76. {
  77. public:
  78. CDSRenameGroup(CUINode* pUINode,
  79. CDSCookie* pCookie,
  80. LPCWSTR pszNewName,
  81. HWND hwnd,
  82. CDSComponentData* pComponentData)
  83. : CDSRenameObject(pUINode, pCookie, pszNewName, hwnd, pComponentData) {}
  84. virtual HRESULT DoRename();
  85. };
  86. ///////////////////////////////////////////////////////////////////////////
  87. // CDSRenameContact
  88. //
  89. class CDSRenameContact : public CDSRenameObject
  90. {
  91. public:
  92. CDSRenameContact(CUINode* pUINode,
  93. CDSCookie* pCookie,
  94. LPCWSTR pszNewName,
  95. HWND hwnd,
  96. CDSComponentData* pComponentData)
  97. : CDSRenameObject(pUINode, pCookie, pszNewName, hwnd, pComponentData) {}
  98. virtual HRESULT DoRename();
  99. };
  100. ///////////////////////////////////////////////////////////////////////////
  101. // CDSRenameSite
  102. //
  103. class CDSRenameSite : public CDSRenameObject
  104. {
  105. public:
  106. CDSRenameSite(CUINode* pUINode,
  107. CDSCookie* pCookie,
  108. LPCWSTR pszNewName,
  109. HWND hwnd,
  110. CDSComponentData* pComponentData)
  111. : CDSRenameObject(pUINode, pCookie, pszNewName, hwnd, pComponentData) {}
  112. virtual HRESULT DoRename();
  113. };
  114. ///////////////////////////////////////////////////////////////////////////
  115. // CDSRenameNTDSConnection
  116. //
  117. class CDSRenameNTDSConnection : public CDSRenameObject
  118. {
  119. public:
  120. CDSRenameNTDSConnection(CUINode* pUINode,
  121. CDSCookie* pCookie,
  122. LPCWSTR pszNewName,
  123. HWND hwnd,
  124. CDSComponentData* pComponentData)
  125. : CDSRenameObject(pUINode, pCookie, pszNewName, hwnd, pComponentData) {}
  126. virtual HRESULT DoRename();
  127. };
  128. ///////////////////////////////////////////////////////////////////////////
  129. // CDSRenameSubnet
  130. //
  131. class CDSRenameSubnet : public CDSRenameObject
  132. {
  133. public:
  134. CDSRenameSubnet(CUINode* pUINode,
  135. CDSCookie* pCookie,
  136. LPCWSTR pszNewName,
  137. HWND hwnd,
  138. CDSComponentData* pComponentData)
  139. : CDSRenameObject(pUINode, pCookie, pszNewName, hwnd, pComponentData) {}
  140. virtual HRESULT DoRename();
  141. };
  142. #endif // __RENAME_H_