3cb3f6867cf90188b5f4bf192ed3885e04b986fbAndreas Gustafsson/*
2f0eac53a97037ee18478b5aedc479b498ed6702Tinderbox User * Portions Copyright (C) 2001, 2004, 2007, 2009, 2015-2017 Internet Systems Consortium, Inc. ("ISC")
3cb3f6867cf90188b5f4bf192ed3885e04b986fbAndreas Gustafsson *
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * This Source Code Form is subject to the terms of the Mozilla Public
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * License, v. 2.0. If a copy of the MPL was not distributed with this
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * file, You can obtain one at http://mozilla.org/MPL/2.0/.
3cb3f6867cf90188b5f4bf192ed3885e04b986fbAndreas Gustafsson */
3cb3f6867cf90188b5f4bf192ed3885e04b986fbAndreas Gustafsson
479b80d4d706be399fd8974e941d9a0edb4259efMark Andrews/* $Id: BINDInstallDlg.h,v 1.11 2009/09/01 06:51:47 marka Exp $ */
4e6b8a18ff7dd22797970208060cca9f99f54dafAndreas Gustafsson
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer/*
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer * Copyright (c) 1999-2000 by Nortel Networks Corporation
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer *
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer * Permission to use, copy, modify, and distribute this software for any
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer * purpose with or without fee is hereby granted, provided that the above
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer * copyright notice and this permission notice appear in all copies.
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer *
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer * THE SOFTWARE IS PROVIDED "AS IS" AND NORTEL NETWORKS DISCLAIMS
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL NORTEL NETWORKS
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer * SOFTWARE.
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer */
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer#ifndef BINDINSTALLDLG_H
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer#define BINDINSTALLDLG_H
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayerclass CBINDInstallDlg : public CDialog
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer{
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayerpublic:
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer CBINDInstallDlg(CWnd* pParent = NULL); // standard constructor
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer //{{AFX_DATA(CBINDInstallDlg)
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer enum { IDD = IDD_BINDINSTALL_DIALOG };
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer CString m_targetDir;
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer CString m_version;
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer BOOL m_autoStart;
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer BOOL m_keepFiles;
2bee3c2e705cdcc969cfcf5e9fda817563c19449Mark Andrews BOOL m_toolsOnly;
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer CString m_current;
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer BOOL m_startOnInstall;
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer //}}AFX_DATA
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer // ClassWizard generated virtual function overrides
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer //{{AFX_VIRTUAL(CBINDInstallDlg)
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer protected:
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer //}}AFX_VIRTUAL
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayerprotected:
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer void StartBINDService();
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer void StopBINDService();
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer void InstallTags();
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer void UninstallTags();
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer void CreateDirs();
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer void RemoveDirs(BOOL uninstall);
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer
3fa134363f99816b36e30822a098196810ae6f20Mark Andrews void ReadInstallFlags();
3fa134363f99816b36e30822a098196810ae6f20Mark Andrews void ReadInstallFileList();
3fa134363f99816b36e30822a098196810ae6f20Mark Andrews
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer void CopyFiles();
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer void DeleteFiles(BOOL uninstall);
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer void RegisterService();
479b80d4d706be399fd8974e941d9a0edb4259efMark Andrews void UpdateService(CString StartName);
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer void UnregisterService(BOOL uninstall);
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer void RegisterMessages();
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer void UnregisterMessages(BOOL uninstall);
da035d9f4429b9679e537542b2ab9a7c279cf2dfAutomatic Updater
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer void FailedInstall();
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer void SetItemStatus(UINT nID, BOOL bSuccess = TRUE);
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer
53b74007317af95402b21a9b26169534ac17c54fDanny Mayer void GetCurrentServiceAccountName();
53b74007317af95402b21a9b26169534ac17c54fDanny Mayer BOOL ValidateServiceAccount();
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayerprotected:
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer CString DestDir(int destination);
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer int MsgBox(int id, ...);
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer int MsgBox(int id, UINT type, ...);
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer CString GetErrMessage(DWORD err = -1);
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer BOOL CheckBINDService();
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer void SetCurrent(int id, ...);
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer void ProgramGroup(BOOL create = TRUE);
fcb5e646e4d775539e348fa21ba13307f2695bf5Mark Andrews void ProgramGroupCreate(TCHAR *commonPath);
fcb5e646e4d775539e348fa21ba13307f2695bf5Mark Andrews void ProgramGroupRemove(TCHAR *commonPath);
da035d9f4429b9679e537542b2ab9a7c279cf2dfAutomatic Updater
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer HICON m_hIcon;
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer CString m_defaultDir;
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer CString m_etcDir;
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer CString m_binDir;
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer CString m_winSysDir;
53b74007317af95402b21a9b26169534ac17c54fDanny Mayer BOOL m_installed;
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer CString m_currentDir;
53b74007317af95402b21a9b26169534ac17c54fDanny Mayer BOOL m_accountExists;
53b74007317af95402b21a9b26169534ac17c54fDanny Mayer BOOL m_accountUsed;
7e22eec3005f4069b0a7f8c1bd72e6e6978c88e6Danny Mayer CString m_currentAccount;
53b74007317af95402b21a9b26169534ac17c54fDanny Mayer CString m_accountName;
53b74007317af95402b21a9b26169534ac17c54fDanny Mayer CString m_accountPasswordConfirm;
53b74007317af95402b21a9b26169534ac17c54fDanny Mayer CString m_accountPassword;
7e22eec3005f4069b0a7f8c1bd72e6e6978c88e6Danny Mayer BOOL m_serviceExists;
da035d9f4429b9679e537542b2ab9a7c279cf2dfAutomatic Updater
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer // Generated message map functions
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer //{{AFX_MSG(CBINDInstallDlg)
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer virtual BOOL OnInitDialog();
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer afx_msg void OnPaint();
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer afx_msg HCURSOR OnQueryDragIcon();
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer afx_msg void OnBrowse();
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer afx_msg void OnChangeTargetdir();
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer afx_msg void OnInstall();
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer afx_msg void OnExit();
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer afx_msg void OnUninstall();
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer afx_msg void OnAutoStart();
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer afx_msg void OnKeepFiles();
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer afx_msg void OnStartOnInstall();
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer //}}AFX_MSG
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer DECLARE_MESSAGE_MAP()
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer};
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer
01c7700793e3db356c774e7e7d2bf80456db1014Danny Mayer#endif