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.

558 lines
15 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1998 - 1999
  6. //
  7. // File: recpag2.h
  8. //
  9. //--------------------------------------------------------------------------
  10. #ifndef _RECPAG2_H
  11. #define _RECPAG2_H
  12. ////////////////////////////////////////////////////////////////////////////
  13. // CDNS_A_RecordPropertyPage
  14. class CDNS_A_RecordPropertyPage : public CDNSRecordStandardPropertyPage
  15. {
  16. public:
  17. CDNS_A_RecordPropertyPage();
  18. protected:
  19. virtual BOOL OnInitDialog();
  20. virtual void SetUIData();
  21. virtual DNS_STATUS GetUIDataEx(BOOL bSilent = TRUE);
  22. afx_msg void OnIPv4CtrlChange();
  23. afx_msg void OnCreatePointerClicked();
  24. private:
  25. CDNSIPv4Control* GetIPv4Ctrl() { return (CDNSIPv4Control*)GetDlgItem(IDC_IPEDIT);}
  26. CButton* GetPTRCheckCtrl() { return (CButton*)GetDlgItem(IDC_UPDATE_PRT_CHECK);}
  27. CButton* GetSecurityCheckCtrl() { return (CButton*)GetDlgItem(IDC_UPDATE_SECURITY_CHECK);}
  28. DECLARE_MESSAGE_MAP()
  29. };
  30. ////////////////////////////////////////////////////////////////////////////
  31. // CDNS_ATMA_RecordPropertyPage
  32. class CDNS_ATMA_RecordPropertyPage : public CDNSRecordStandardPropertyPage
  33. {
  34. public:
  35. CDNS_ATMA_RecordPropertyPage();
  36. protected:
  37. virtual void SetUIData();
  38. virtual DNS_STATUS GetUIDataEx(BOOL bSilent = TRUE);
  39. afx_msg void OnAddressChange();
  40. afx_msg void OnFormatRadioChange();
  41. private:
  42. UCHAR GetFormat();
  43. void SetFormat(UCHAR chFormat);
  44. CEdit* GetAddressCtrl() { return (CEdit*)GetDlgItem(IDC_EDIT_ATMA_ADDRESS);}
  45. CButton* GetRadioNSAP() { return (CButton*)GetDlgItem(IDC_RADIO_NSAP);}
  46. CButton* GetRadioE164() { return (CButton*)GetDlgItem(IDC_RADIO_E164);}
  47. DECLARE_MESSAGE_MAP()
  48. };
  49. ////////////////////////////////////////////////////////////////////////////
  50. // CDNS_AAAA_RecordPropertyPage
  51. class CDNS_AAAA_RecordPropertyPage : public CDNSRecordStandardPropertyPage
  52. {
  53. public:
  54. CDNS_AAAA_RecordPropertyPage();
  55. protected:
  56. // overloaded these to fix NTRAID#NTBUG9-335565-2001/04/24-sburns
  57. virtual BOOL CreateRecord();
  58. virtual BOOL OnInitDialog();
  59. virtual BOOL OnApply();
  60. virtual void SetUIData();
  61. virtual DNS_STATUS GetUIDataEx(BOOL bSilent = TRUE);
  62. afx_msg void OnIPv6CtrlChange();
  63. private:
  64. CEdit* GetIPv6Edit() { return (CEdit*)GetDlgItem(IDC_IPV6EDIT);}
  65. DECLARE_MESSAGE_MAP()
  66. };
  67. ////////////////////////////////////////////////////////////////////////////
  68. // CDNS_HINFO_RecordPropertyPage
  69. class CDNS_HINFO_RecordPropertyPage : public CDNSRecordStandardPropertyPage
  70. {
  71. public:
  72. CDNS_HINFO_RecordPropertyPage();
  73. protected:
  74. virtual BOOL OnInitDialog();
  75. virtual void SetUIData();
  76. virtual DNS_STATUS GetUIDataEx(BOOL bSilent = TRUE);
  77. afx_msg void OnCPUTypeChange();
  78. afx_msg void OnOperatingSystemChange();
  79. private:
  80. CEdit* GetCPUTypeCtrl() { return (CEdit*)GetDlgItem(IDC_CPU_TYPE_EDIT);}
  81. CEdit* GetOperatingSystemCtrl() { return (CEdit*)GetDlgItem(IDC_OPERATING_SYSTEM_EDIT);}
  82. DECLARE_MESSAGE_MAP()
  83. };
  84. ////////////////////////////////////////////////////////////////////////////
  85. // CDNS_ISDN_RecordPropertyPage
  86. class CDNS_ISDN_RecordPropertyPage : public CDNSRecordStandardPropertyPage
  87. {
  88. public:
  89. CDNS_ISDN_RecordPropertyPage();
  90. protected:
  91. virtual void SetUIData();
  92. virtual DNS_STATUS GetUIDataEx(BOOL bSilent = TRUE);
  93. afx_msg void OnPhoneNumberAndDDIChange();
  94. afx_msg void OnSubAddressChange();
  95. private:
  96. CEdit* GetPhoneNumberAndDDICtrl() { return (CEdit*)GetDlgItem(IDC_PHONE_NUM_AND_DDI_EDIT);}
  97. CEdit* GetSubAddressCtrl() { return (CEdit*)GetDlgItem(IDC_SUBADDRESS_EDIT);}
  98. DECLARE_MESSAGE_MAP()
  99. };
  100. ////////////////////////////////////////////////////////////////////////////
  101. // CDNS_X25_RecordPropertyPage
  102. class CDNS_X25_RecordPropertyPage : public CDNSRecordStandardPropertyPage
  103. {
  104. public:
  105. CDNS_X25_RecordPropertyPage();
  106. protected:
  107. virtual BOOL OnInitDialog();
  108. virtual void SetUIData();
  109. virtual DNS_STATUS GetUIDataEx(BOOL bSilent = TRUE);
  110. afx_msg void OnX121PSDNAddressChange();
  111. CEdit* GetX121Edit() { return (CEdit*)GetDlgItem(IDC_X121_ADDRESS_EDIT); }
  112. private:
  113. DECLARE_MESSAGE_MAP()
  114. };
  115. ////////////////////////////////////////////////////////////////////////////
  116. // CDNS_PTR_CNAME_MB_MD_MF_MG_MR_NSCache_RecordPropertyPage
  117. class CDNS_PTR_CNAME_MB_MD_MF_MG_MR_NSCache_RecordPropertyPage :
  118. public CDNSRecordStandardPropertyPage
  119. {
  120. public:
  121. CDNS_PTR_CNAME_MB_MD_MF_MG_MR_NSCache_RecordPropertyPage(UINT nIDTemplate);
  122. protected:
  123. virtual BOOL OnInitDialog();
  124. virtual void SetUIData();
  125. virtual DNS_STATUS GetUIDataEx(BOOL bSilent = TRUE);
  126. afx_msg void OnNameNodeChange();
  127. virtual afx_msg void OnBrowse();
  128. CEdit* GetNameNodeEdit() { return (CEdit*)GetDlgItem(IDC_NAME_NODE_EDIT); }
  129. DECLARE_MESSAGE_MAP()
  130. };
  131. ////////////////////////////////////////////////////////////////////////////
  132. // CDNS_CNAME_RecordPropertyPage
  133. class CDNS_CNAME_RecordPropertyPage : public CDNS_PTR_CNAME_MB_MD_MF_MG_MR_NSCache_RecordPropertyPage
  134. {
  135. public:
  136. CDNS_CNAME_RecordPropertyPage();
  137. CButton* GetSecurityCheckCtrl() { return (CButton*)GetDlgItem(IDC_UPDATE_SECURITY_CHECK);}
  138. virtual BOOL CanCreateDuplicateRecords() { return FALSE; }
  139. protected:
  140. virtual BOOL OnInitDialog();
  141. virtual DNS_STATUS GetUIDataEx(BOOL bSilent = TRUE);
  142. };
  143. ////////////////////////////////////////////////////////////////////////////
  144. // CDNS_MB_RecordPropertyPage
  145. class CDNS_MB_RecordPropertyPage : public CDNS_PTR_CNAME_MB_MD_MF_MG_MR_NSCache_RecordPropertyPage
  146. {
  147. public:
  148. CDNS_MB_RecordPropertyPage();
  149. };
  150. ////////////////////////////////////////////////////////////////////////////
  151. // CDNS_MD_RecordPropertyPage
  152. class CDNS_MD_RecordPropertyPage : public CDNS_PTR_CNAME_MB_MD_MF_MG_MR_NSCache_RecordPropertyPage
  153. {
  154. public:
  155. CDNS_MD_RecordPropertyPage();
  156. };
  157. ////////////////////////////////////////////////////////////////////////////
  158. // CDNS_MF_RecordPropertyPage
  159. class CDNS_MF_RecordPropertyPage : public CDNS_PTR_CNAME_MB_MD_MF_MG_MR_NSCache_RecordPropertyPage
  160. {
  161. public:
  162. CDNS_MF_RecordPropertyPage();
  163. };
  164. ////////////////////////////////////////////////////////////////////////////
  165. // CDNS_MG_RecordPropertyPage
  166. class CDNS_MG_RecordPropertyPage : public CDNS_PTR_CNAME_MB_MD_MF_MG_MR_NSCache_RecordPropertyPage
  167. {
  168. public:
  169. CDNS_MG_RecordPropertyPage();
  170. DECLARE_MESSAGE_MAP();
  171. protected:
  172. virtual afx_msg void OnBrowse();
  173. };
  174. ////////////////////////////////////////////////////////////////////////////
  175. // CDNS_MR_RecordPropertyPage
  176. class CDNS_MR_RecordPropertyPage : public CDNS_PTR_CNAME_MB_MD_MF_MG_MR_NSCache_RecordPropertyPage
  177. {
  178. public:
  179. CDNS_MR_RecordPropertyPage();
  180. void OnNameNodeChange();
  181. DECLARE_MESSAGE_MAP();
  182. protected:
  183. virtual afx_msg void OnBrowse();
  184. };
  185. ////////////////////////////////////////////////////////////////////////////
  186. // CDNS_NSCache_RecordPropertyPage
  187. class CDNS_NSCache_RecordPropertyPage : public CDNS_PTR_CNAME_MB_MD_MF_MG_MR_NSCache_RecordPropertyPage
  188. {
  189. public:
  190. CDNS_NSCache_RecordPropertyPage();
  191. };
  192. ////////////////////////////////////////////////////////////////////////////
  193. // CDNS_PTR_RecordPropertyPage
  194. class CDNS_PTR_RecordPropertyPage : public CDNS_PTR_CNAME_MB_MD_MF_MG_MR_NSCache_RecordPropertyPage
  195. {
  196. public:
  197. CDNS_PTR_RecordPropertyPage();
  198. protected:
  199. virtual BOOL OnInitDialog();
  200. afx_msg void OnIPv4CtrlChange();
  201. virtual void SetUIData();
  202. virtual DNS_STATUS GetUIDataEx(BOOL bSilent = TRUE);
  203. private:
  204. BOOL m_bAdvancedView;
  205. int m_nOctets;
  206. CDNSIPv4Control* GetIPv4Ctrl()
  207. { return (CDNSIPv4Control*)GetDlgItem(IDC_RR_NAME_IPEDIT);}
  208. CButton* GetSecurityCheckCtrl() { return (CButton*)GetDlgItem(IDC_UPDATE_SECURITY_CHECK);}
  209. DECLARE_MESSAGE_MAP()
  210. };
  211. ////////////////////////////////////////////////////////////////////////////
  212. // CDNS_MINFO_RP_RecordPropertyPage
  213. class CDNS_MINFO_RP_RecordPropertyPage : public CDNSRecordStandardPropertyPage
  214. {
  215. public:
  216. CDNS_MINFO_RP_RecordPropertyPage(UINT nIDTemplate);
  217. protected:
  218. virtual void SetUIData();
  219. virtual DNS_STATUS GetUIDataEx(BOOL bSilent = TRUE);
  220. afx_msg void OnNameMailBoxChange();
  221. afx_msg void OnErrorToMailboxChange();
  222. afx_msg void OnBrowseNameMailBox();
  223. afx_msg void OnBrowseErrorToMailbox();
  224. private:
  225. CEdit* GetNameMailBoxCtrl() { return (CEdit*)GetDlgItem(IDC_NAME_MAILBOX_EDIT);}
  226. CEdit* GetErrorToMailboxCtrl() { return (CEdit*)GetDlgItem(IDC_ERROR_MAILBOX_EDIT);}
  227. DECLARE_MESSAGE_MAP()
  228. };
  229. ////////////////////////////////////////////////////////////////////////////
  230. // CDNS_MINFO_RecordPropertyPage
  231. class CDNS_MINFO_RecordPropertyPage : public CDNS_MINFO_RP_RecordPropertyPage
  232. {
  233. public:
  234. CDNS_MINFO_RecordPropertyPage();
  235. };
  236. ////////////////////////////////////////////////////////////////////////////
  237. // CDNS_RP_RecordPropertyPage
  238. class CDNS_RP_RecordPropertyPage : public CDNS_MINFO_RP_RecordPropertyPage
  239. {
  240. public:
  241. CDNS_RP_RecordPropertyPage();
  242. };
  243. ////////////////////////////////////////////////////////////////////////////
  244. // CDNS_MX_AFSDB_RT_RecordPropertyPage
  245. class CDNS_MX_AFSDB_RT_RecordPropertyPage : public CDNSRecordStandardPropertyPage
  246. {
  247. public:
  248. CDNS_MX_AFSDB_RT_RecordPropertyPage(UINT nIDTemplate);
  249. protected:
  250. virtual void SetUIData();
  251. virtual DNS_STATUS GetUIDataEx(BOOL bSilent = TRUE);
  252. afx_msg void OnNameExchangeChange();
  253. afx_msg void OnBrowse();
  254. private:
  255. CEdit* GetNameExchangeCtrl() { return (CEdit*)GetDlgItem(IDC_NAME_EXCHANGE_EDIT);}
  256. DECLARE_MESSAGE_MAP()
  257. };
  258. ////////////////////////////////////////////////////////////////////////////
  259. // CDNS_MX_RT_RecordPropertyPage
  260. class CDNS_MX_RT_RecordPropertyPage : public CDNS_MX_AFSDB_RT_RecordPropertyPage
  261. {
  262. public:
  263. CDNS_MX_RT_RecordPropertyPage(UINT nIDTemplate);
  264. protected:
  265. virtual void SetUIData();
  266. virtual DNS_STATUS GetUIDataEx(BOOL bSilent = TRUE);
  267. virtual BOOL OnInitDialog();
  268. afx_msg void OnPreferenceChange();
  269. protected:
  270. CDNSUnsignedIntEdit m_preferenceEdit;
  271. DECLARE_MESSAGE_MAP()
  272. };
  273. ////////////////////////////////////////////////////////////////////////////
  274. // CDNS_MX_RecordPropertyPage
  275. class CDNS_MX_RecordPropertyPage : public CDNS_MX_RT_RecordPropertyPage
  276. {
  277. public:
  278. CDNS_MX_RecordPropertyPage();
  279. virtual DNS_STATUS ValidateRecordName(PCWSTR pszName, DWORD dwNameChecking);
  280. };
  281. ////////////////////////////////////////////////////////////////////////////
  282. // CDNS_RT_RecordPropertyPage
  283. class CDNS_RT_RecordPropertyPage : public CDNS_MX_RT_RecordPropertyPage
  284. {
  285. public:
  286. CDNS_RT_RecordPropertyPage();
  287. };
  288. /////////////////////////////////////////////////////////////////////////////
  289. // CDNS_AFSDB_RecordPropertyPage
  290. class CDNS_AFSDB_RecordPropertyPage : public CDNS_MX_AFSDB_RT_RecordPropertyPage
  291. {
  292. public:
  293. CDNS_AFSDB_RecordPropertyPage();
  294. protected:
  295. virtual void SetUIData();
  296. virtual DNS_STATUS GetUIDataEx(BOOL bSilent = TRUE);
  297. virtual BOOL OnInitDialog();
  298. afx_msg void OnSubtypeEditChange();
  299. afx_msg void OnSubtypeRadioChange();
  300. private:
  301. CButton* GetAFSRadioButton() { return (CButton*)GetDlgItem(IDC_AFS_VLS_RADIO); }
  302. CButton* GetDCERadioButton() { return (CButton*)GetDlgItem(IDC_DCE_ANS_RADIO); }
  303. CButton* GetOtherRadioButton() { return (CButton*)GetDlgItem(IDC_OTHER_RADIO); }
  304. CDNSUnsignedIntEdit m_subtypeEdit;
  305. DECLARE_MESSAGE_MAP()
  306. };
  307. ////////////////////////////////////////////////////////////////////////////
  308. // CDNS_WKS_RecordPropertyPage
  309. class CDNS_WKS_RecordPropertyPage : public CDNSRecordStandardPropertyPage
  310. {
  311. public:
  312. CDNS_WKS_RecordPropertyPage();
  313. protected:
  314. virtual void SetUIData();
  315. virtual DNS_STATUS GetUIDataEx(BOOL bSilent = TRUE);
  316. virtual BOOL CreateRecord();
  317. afx_msg void OnIPv4CtrlChange();
  318. afx_msg void OnProtocolRadioChange();
  319. afx_msg void OnServicesEditChange();
  320. private:
  321. CDNSIPv4Control* GetIPv4Ctrl() { return (CDNSIPv4Control*)GetDlgItem(IDC_IPEDIT);}
  322. CButton* GetTCPRadioButton() { return (CButton*)GetDlgItem(IDC_TCP_RADIO); }
  323. CButton* GetUDPRadioButton() { return (CButton*)GetDlgItem(IDC_UDP_RADIO); }
  324. CEdit* GetServicesEdit() { return (CEdit*)GetDlgItem(IDC_SERVICES_EDIT); }
  325. DECLARE_MESSAGE_MAP()
  326. };
  327. ////////////////////////////////////////////////////////////////////////////
  328. // CDNS_SRV_RecordPropertyPage
  329. class CDNS_SRV_RR_ComboBox : public CComboBox
  330. {
  331. public:
  332. BOOL Initialize(UINT nCtrlID, CWnd* pParent);
  333. private:
  334. };
  335. class CDNS_SRV_RecordPropertyPage : public CDNSRecordStandardPropertyPage
  336. {
  337. public:
  338. CDNS_SRV_RecordPropertyPage();
  339. protected:
  340. // RR name handling
  341. virtual void OnInitName();
  342. virtual void OnSetName(CDNSRecordNodeBase* pRecordNode);
  343. virtual void OnGetName(CString& s);
  344. virtual BOOL CreateRecord();
  345. virtual void SetUIData();
  346. virtual DNS_STATUS GetUIDataEx(BOOL bSilent = TRUE);
  347. virtual BOOL OnInitDialog();
  348. virtual void PrimeServicesCombo();
  349. afx_msg void OnNumericEditChange();
  350. afx_msg void OnNameTargetEditChange();
  351. afx_msg void OnServiceComboEditChange();
  352. afx_msg void OnProtocolComboEditChange();
  353. afx_msg void OnServiceComboSelChange();
  354. afx_msg void OnProtocolComboSelChange();
  355. private:
  356. CEdit* GetNameTargetEdit() { return (CEdit*)GetDlgItem(IDC_NAME_TARGET_EDIT); }
  357. CButton* GetSecurityCheckCtrl() { return (CButton*)GetDlgItem(IDC_UPDATE_SECURITY_CHECK);}
  358. CDNS_SRV_RR_ComboBox m_serviceCombo;
  359. CDNS_SRV_RR_ComboBox m_protocolCombo;
  360. CDNSUnsignedIntEdit m_priorityEdit;
  361. CDNSUnsignedIntEdit m_weightEdit;
  362. CDNSUnsignedIntEdit m_portEdit;
  363. CString m_szProtocolName;
  364. CDNSDomainNode* m_pSubdomainNode;
  365. BOOL m_bCreateSubdomain;
  366. BOOL m_bSubdomainCreated;
  367. BOOL m_bCreated;
  368. CDNSDomainNode* m_pOldDomainNode;
  369. DECLARE_MESSAGE_MAP()
  370. };
  371. ////////////////////////////////////////////////////////////////////////
  372. // CNewHostDialog
  373. class CNewHostDialog : public CHelpDialog
  374. {
  375. // Construction
  376. public:
  377. CNewHostDialog(CDNSDomainNode* pParentDomainNode,
  378. CComponentDataObject* pComponentData);
  379. ~CNewHostDialog();
  380. // Implementation
  381. protected:
  382. virtual BOOL OnInitDialog();
  383. afx_msg void OnAddHost();
  384. #ifdef _USE_BLANK
  385. #else
  386. afx_msg void OnEditChange();
  387. #endif
  388. DECLARE_MESSAGE_MAP()
  389. private:
  390. CEdit* GetNameEdit() { return (CEdit*)GetDlgItem(IDC_RR_NAME_EDIT);}
  391. CEdit* GetDomainEditBox() { return(CEdit*)GetDlgItem(IDC_RR_DOMAIN_EDIT);}
  392. CDNSTTLControl* GetTTLCtrl() { return (CDNSTTLControl*)GetDlgItem(IDC_TTLEDIT);}
  393. CDNSIPv4Control* GetIPv4Ctrl() { return (CDNSIPv4Control*)GetDlgItem(IDC_IPEDIT);}
  394. CButton* GetPTRCheckCtrl() { return (CButton*)GetDlgItem(IDC_UPDATE_PRT_CHECK);}
  395. CButton* GetSecurityCheckCtrl() { return (CButton*)GetDlgItem(IDC_UPDATE_SECURITY_CHECK);}
  396. CDNSRecordNodeBase* CreateRecordNode();
  397. void SetUIData(BOOL bFirstTime);
  398. DNS_STATUS GetUIData(CDNSRecordNodeBase* pRecordNode);
  399. DNS_STATUS ValidateRecordName(PCWSTR pszName, DWORD dwNameChecking);
  400. CDNSDomainNode* m_pParentDomainNode;
  401. CComponentDataObject* m_pComponentData;
  402. CDNSRecord* m_pTempDNSRecord;
  403. int m_nUTF8ParentLen;
  404. // manage the Cancel/Done button label
  405. BOOL m_bFirstCreation;
  406. CDNSButtonToggleTextHelper m_cancelDoneTextHelper;
  407. };
  408. #endif // _RECPAG2_H