summaryrefslogtreecommitdiffstats
path: root/bin/win32/BINDInstall/BINDInstallDlg.h
blob: 27ed21687105155185142128c79e5fec22f560c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
/*
 * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
 *
 * SPDX-License-Identifier: MPL-2.0
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0.  If a copy of the MPL was not distributed with this
 * file, you can obtain one at https://mozilla.org/MPL/2.0/.
 *
 * See the COPYRIGHT file distributed with this work for additional
 * information regarding copyright ownership.
 */

/*
 * Copyright (c) 1999-2000 by Nortel Networks Corporation
 *
 * Permission to use, copy, modify, and distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
 * copyright notice and this permission notice appear in all copies.
 *
 * THE SOFTWARE IS PROVIDED "AS IS" AND NORTEL NETWORKS DISCLAIMS
 * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL NORTEL NETWORKS
 * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
 * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
 * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
 * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
 * SOFTWARE.
 */

#ifndef BINDINSTALLDLG_H
#define BINDINSTALLDLG_H

class CBINDInstallDlg : public CDialog {
      public:
	CBINDInstallDlg(CWnd *pParent = NULL); /* standard constructor */

	/*{{AFX_DATA(CBINDInstallDlg) */
	enum { IDD = IDD_BINDINSTALL_DIALOG };
	CString m_targetDir;
	CString m_version;
	BOOL m_autoStart;
	BOOL m_keepFiles;
	BOOL m_toolsOnly;
	CString m_current;
	BOOL m_startOnInstall;
	/*}}AFX_DATA */

	/* ClassWizard generated virtual function overrides */
	/*{{AFX_VIRTUAL(CBINDInstallDlg) */
      protected:
	virtual void
	DoDataExchange(CDataExchange *pDX); /* DDX/DDV support */
					    /*}}AFX_VIRTUAL */

      protected:
	void
	StartBINDService();
	void
	StopBINDService();

	void
	InstallTags();
	void
	UninstallTags();

	void
	CreateDirs();
	void
	RemoveDirs(BOOL uninstall);

	void
	ReadInstallFlags();
	void
	ReadInstallFileList();

	void
	CopyFiles();
	void
	DeleteFiles(BOOL uninstall);

	void
	RegisterService();
	void
	UpdateService(CString StartName);
	void
	UnregisterService(BOOL uninstall);

	void
	RegisterMessages();
	void
	UnregisterMessages(BOOL uninstall);

	void
	FailedInstall();
	void
	SetItemStatus(UINT nID, BOOL bSuccess = TRUE);

	void
	GetCurrentServiceAccountName();
	BOOL
	ValidateServiceAccount();

      protected:
	CString
	DestDir(int destination);
	int
	MsgBox(int id, ...);
	int
	MsgBox(int id, UINT type, ...);
	CString
	GetErrMessage(DWORD err = -1);
	BOOL
	CheckBINDService();
	void
	SetCurrent(int id, ...);
	void
	ProgramGroup(BOOL create = TRUE);
	void
	ProgramGroupCreate(TCHAR *commonPath);
	void
	ProgramGroupRemove(TCHAR *commonPath);

	HICON m_hIcon;
	CString m_defaultDir;
	CString m_etcDir;
	CString m_binDir;
	CString m_winSysDir;
	BOOL m_installed;
	CString m_currentDir;
	BOOL m_accountExists;
	BOOL m_accountUsed;
	CString m_currentAccount;
	CString m_accountName;
	CString m_accountPasswordConfirm;
	CString m_accountPassword;
	BOOL m_serviceExists;

	/* Generated message map functions */
	/*{{AFX_MSG(CBINDInstallDlg) */
	virtual BOOL
	OnInitDialog();
	afx_msg void
	OnPaint();
	afx_msg HCURSOR
	OnQueryDragIcon();
	afx_msg void
	OnBrowse();
	afx_msg void
	OnChangeTargetdir();
	afx_msg void
	OnInstall();
	afx_msg void
	OnExit();
	afx_msg void
	OnUninstall();
	afx_msg void
	OnAutoStart();
	afx_msg void
	OnKeepFiles();
	afx_msg void
	OnStartOnInstall();
	/*}}AFX_MSG */
	DECLARE_MESSAGE_MAP()
};

#endif /* ifndef BINDINSTALLDLG_H */