2005-03-03 11:08:38 +00:00
|
|
|
// Berkeley Open Infrastructure for Network Computing
|
|
|
|
// http://boinc.berkeley.edu
|
|
|
|
// Copyright (C) 2005 University of California
|
|
|
|
//
|
|
|
|
// This is free software; you can redistribute it and/or
|
|
|
|
// modify it under the terms of the GNU Lesser General Public
|
|
|
|
// License as published by the Free Software Foundation;
|
|
|
|
// either version 2.1 of the License, or (at your option) any later version.
|
|
|
|
//
|
|
|
|
// This software is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
// See the GNU Lesser General Public License for more details.
|
|
|
|
//
|
|
|
|
// To view the GNU Lesser General Public License visit
|
|
|
|
// http://www.gnu.org/copyleft/lesser.html
|
|
|
|
// or write to the Free Software Foundation, Inc.,
|
2007-10-09 11:35:47 +00:00
|
|
|
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
2005-03-03 11:08:38 +00:00
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef _BOINCCAS_H_
|
|
|
|
#define _BOINCCAS_H_
|
|
|
|
|
|
|
|
class BOINCCABase
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
BOINCCABase(
|
|
|
|
MSIHANDLE hMSIHandle,
|
|
|
|
const tstring strActionName,
|
|
|
|
const tstring strProgressTitle
|
|
|
|
);
|
|
|
|
|
|
|
|
~BOINCCABase();
|
|
|
|
|
|
|
|
|
|
|
|
// Main Custom Action Execution Routine
|
|
|
|
UINT Execute();
|
|
|
|
|
|
|
|
|
|
|
|
// Overrides
|
|
|
|
virtual UINT OnInitialize();
|
|
|
|
virtual UINT OnCleanup();
|
|
|
|
// Called when we are being executed from the InstallExecutionSequence
|
|
|
|
virtual UINT OnInstall();
|
2007-12-12 15:34:34 +00:00
|
|
|
virtual UINT OnRollback();
|
|
|
|
virtual UINT OnCommit();
|
2005-03-03 11:08:38 +00:00
|
|
|
// Called when we are being executed from the InstallUISequence
|
|
|
|
virtual UINT OnExecution();
|
|
|
|
|
2014-08-27 19:02:54 +00:00
|
|
|
//
|
|
|
|
UINT SetUpgradeParameters();
|
|
|
|
BOOL IsUpgrading();
|
2005-03-03 11:08:38 +00:00
|
|
|
|
2009-06-12 16:29:25 +00:00
|
|
|
// Registry Property Management
|
|
|
|
UINT GetRegistryValue(
|
|
|
|
const tstring strName,
|
|
|
|
tstring& strValue,
|
|
|
|
bool bDisplayValue = true
|
|
|
|
);
|
|
|
|
|
|
|
|
UINT SetRegistryValue(
|
|
|
|
const tstring strName,
|
|
|
|
const tstring strValue,
|
|
|
|
bool bDisplayValue = true
|
|
|
|
);
|
|
|
|
|
2005-03-03 11:08:38 +00:00
|
|
|
// MSI Property Management
|
|
|
|
UINT GetProperty(
|
|
|
|
const tstring strPropertyName,
|
2005-03-03 22:58:53 +00:00
|
|
|
tstring& strPropertyValue,
|
|
|
|
bool bDisplayValue = true
|
2005-03-03 11:08:38 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
UINT SetProperty(
|
2007-01-05 08:49:02 +00:00
|
|
|
const tstring strPropertyName,
|
|
|
|
const tstring strPropertyValue,
|
|
|
|
bool bDisplayValue = true
|
|
|
|
);
|
|
|
|
|
2009-06-12 16:29:25 +00:00
|
|
|
// MSI Database Management
|
|
|
|
UINT GetComponentKeyFilename(
|
|
|
|
const tstring strComponentName,
|
|
|
|
tstring& strComponentKeyFilename
|
|
|
|
);
|
2005-03-03 11:08:38 +00:00
|
|
|
|
2005-03-03 22:58:53 +00:00
|
|
|
// MSI UI Dialog Management
|
|
|
|
UINT DisplayMessage(
|
2009-06-12 16:29:25 +00:00
|
|
|
const UINT uiPushButtonStyle, // push button style to use in message box
|
2005-03-03 22:58:53 +00:00
|
|
|
const UINT uiIconStyle, // icon style to use in message box
|
|
|
|
const tstring strMessage // message
|
|
|
|
);
|
2005-03-03 11:08:38 +00:00
|
|
|
|
|
|
|
// MSI Logging Management
|
|
|
|
UINT LogProgress(
|
|
|
|
const tstring strProgress // message to display
|
|
|
|
);
|
|
|
|
|
|
|
|
UINT LogMessage(
|
|
|
|
const UINT uiInstallMessageType, // message type to send to Windows Installer
|
|
|
|
const UINT uiPushButtonStyle, // push button sstyle to use in message box
|
|
|
|
const UINT uiIconStyle, // icon style to use in message box
|
|
|
|
const UINT uiErrorNumber, // number of error in Error table
|
|
|
|
const UINT uiErrorCode, // the return value from an api
|
|
|
|
const tstring strMessage // message
|
|
|
|
);
|
|
|
|
|
2008-04-03 20:24:46 +00:00
|
|
|
// Reboot machine when setup has completed.
|
|
|
|
UINT RebootWhenFinished();
|
2005-03-03 11:08:38 +00:00
|
|
|
|
|
|
|
protected:
|
|
|
|
MSIHANDLE m_hMSIHandle;
|
|
|
|
PMSIHANDLE m_phActionStartRec;
|
|
|
|
PMSIHANDLE m_phActionDataRec;
|
|
|
|
PMSIHANDLE m_phProgressRec;
|
|
|
|
PMSIHANDLE m_phLogInfoRec;
|
|
|
|
|
|
|
|
tstring m_strActionName;
|
2006-04-13 09:06:26 +00:00
|
|
|
tstring m_strProgressTitle;
|
|
|
|
};
|
2005-03-03 11:08:38 +00:00
|
|
|
|
|
|
|
#endif
|
|
|
|
|