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.

123 lines
3.1 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1998 - 1999
  6. //
  7. // File: connectionui.h
  8. //
  9. //--------------------------------------------------------------------------
  10. #ifndef _CONNECTIONUI_H
  11. #define _CONNECTIONUI_H
  12. #include "snapdata.h"
  13. /////////////////////////////////////////////////////////////////////////////
  14. // CADSIEditConnectDialog
  15. class CADSIEditConnectDialog : public CDialog
  16. {
  17. // Construction
  18. public:
  19. CADSIEditConnectDialog(CContainerNode* pRootnode,
  20. CTreeNode* pTreeNode,
  21. CComponentDataObject* pComponentData,
  22. CConnectionData* pConnectData
  23. );
  24. ~CADSIEditConnectDialog();
  25. protected:
  26. virtual BOOL OnInitDialog();
  27. virtual void OnOK();
  28. virtual BOOL OnApply();
  29. afx_msg void OnSelChangeContextList();
  30. afx_msg void OnSelChangeDSList();
  31. afx_msg void OnSelChangeDNList();
  32. afx_msg void OnEditChangeDSList();
  33. afx_msg void OnEditChangeDNList();
  34. afx_msg void OnAdvanced();
  35. afx_msg void OnDNRadio();
  36. afx_msg void OnNCRadio();
  37. afx_msg void OnDSRadio();
  38. afx_msg void OnDefaultRadio();
  39. void SetAndDisplayPath();
  40. void LoadNamingContext();
  41. void SetupUI();
  42. void SetDirty()
  43. {
  44. m_bDirty = TRUE;
  45. }
  46. BOOL BuildPath(CString& s, BSTR bstrPath, IADs *pADs);
  47. BOOL BuildNamingContext(CComBSTR& bstrPath);
  48. void BuildRootDSE(CString& sRootDSE);
  49. BOOL DoDirty();
  50. void SaveMRUs();
  51. void LoadMRUs();
  52. BOOL m_bDirty;
  53. CConnectionData* m_pNewConnectData;
  54. CComponentDataObject* m_pComponentData;
  55. CADSIEditRootData* GetRootNode()
  56. {
  57. CADSIEditRootData* pRoot = dynamic_cast<CADSIEditRootData*>(GetTreeNode());
  58. if (pRoot == NULL)
  59. {
  60. pRoot = dynamic_cast<CADSIEditRootData*>(GetContainerNode());
  61. ASSERT(pRoot != NULL);
  62. }
  63. return pRoot;
  64. }
  65. CTreeNode* GetTreeNode() { return m_pTreeNode; }
  66. CContainerNode* GetContainerNode() { return m_pContainerNode; }
  67. CComponentDataObject* GetComponentData() { return m_pComponentData; }
  68. CConnectionData* GetConnectionData() { return m_pNewConnectData; }
  69. private:
  70. BOOL m_bNewConnect;
  71. CTreeNode* m_pTreeNode;
  72. CContainerNode* m_pContainerNode;
  73. CString m_szDisplayExtra;
  74. CString m_sDefaultServerName;
  75. CString m_szDomain;
  76. CString m_szConfigContainer;
  77. CString m_szRootDSE;
  78. CString m_szSchema;
  79. DECLARE_MESSAGE_MAP()
  80. };
  81. ///////////////////////////////////////////////////////////////////////////////
  82. // CADSIEditAdvancedConnectionPageHolder
  83. class CADSIEditAdvancedConnectionDialog : public CDialog
  84. {
  85. public:
  86. CADSIEditAdvancedConnectionDialog(CContainerNode* pRootDataNode, CTreeNode* pContainerNode,
  87. CComponentDataObject* pComponentData, CConnectionData* pConnectData);
  88. ~CADSIEditAdvancedConnectionDialog();
  89. protected:
  90. virtual BOOL OnInitDialog();
  91. virtual BOOL OnApply();
  92. virtual void OnOK();
  93. virtual void OnCredentials();
  94. // Member Data
  95. //
  96. CTreeNode* m_pTreeNode;
  97. CContainerNode* m_pContainerNode;
  98. CComponentDataObject* m_pComponentData;
  99. CConnectionData* m_pConnectData;
  100. DECLARE_MESSAGE_MAP()
  101. };
  102. #endif _CONNECTIONUI_H