]> git.saurik.com Git - apple/mdnsresponder.git/blob - mDNSWindows/ControlPanel/SecondPage.h
mDNSResponder-541.tar.gz
[apple/mdnsresponder.git] / mDNSWindows / ControlPanel / SecondPage.h
1 /* -*- Mode: C; tab-width: 4 -*-
2 *
3 * Copyright (c) 2002-2004 Apple Computer, Inc. All rights reserved.
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
18 #pragma once
19
20 #include "stdafx.h"
21 #include "resource.h"
22
23 #include <DebugServices.h>
24 #include <list>
25
26
27 //---------------------------------------------------------------------------------------------------------------------------
28 // CSecondPage
29 //---------------------------------------------------------------------------------------------------------------------------
30
31 class CSecondPage : public CPropertyPage
32 {
33 public:
34 CSecondPage();
35 ~CSecondPage();
36
37 protected:
38
39 //{{AFX_DATA(CSecondPage)
40 enum { IDD = IDR_APPLET_PAGE2 };
41 //}}AFX_DATA
42
43 //{{AFX_VIRTUAL(CSecondPage)
44 virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
45 //}}AFX_VIRTUAL
46
47 DECLARE_DYNCREATE(CSecondPage)
48
49 //{{AFX_MSG(CSecondPage)
50 //}}AFX_MSG
51 DECLARE_MESSAGE_MAP()
52 public:
53
54 afx_msg void OnBnClickedSharedSecret();
55 afx_msg void OnBnClickedAdvertise();
56
57 void OnAddRegistrationDomain( CString & domain );
58 void OnRemoveRegistrationDomain( CString & domain );
59
60 private:
61
62 typedef std::list<CString> StringList;
63
64 afx_msg BOOL
65 OnSetActive();
66
67 afx_msg void
68 OnOK();
69
70 void
71 EmptyComboBox
72 (
73 CComboBox & box
74 );
75
76 OSStatus
77 Populate(
78 CComboBox & box,
79 HKEY key,
80 StringList & l
81 );
82
83 void
84 SetModified( BOOL bChanged = TRUE );
85
86 void
87 Commit();
88
89 OSStatus
90 Commit( CComboBox & box, HKEY key, DWORD enabled );
91
92 OSStatus
93 CreateKey( CString & name, DWORD enabled );
94
95 OSStatus
96 RegQueryString( HKEY key, CString valueName, CString & value );
97
98 CComboBox m_regDomainsBox;
99 CButton m_advertiseServicesButton;
100 CButton m_sharedSecretButton;
101 BOOL m_modified;
102 HKEY m_setupKey;
103
104 public:
105 afx_msg void OnCbnSelChange();
106 afx_msg void OnCbnEditChange();
107 };