forked from BOINC/boinc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathboinccas.h
123 lines (101 loc) · 3.73 KB
/
boinccas.h
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
// 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.,
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
//
#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();
virtual UINT OnRollback();
virtual UINT OnCommit();
// Called when we are being executed from the InstallUISequence
virtual UINT OnExecution();
//
UINT SetUpgradeParameters();
BOOL IsUpgrading();
// Registry Property Management
UINT GetRegistryValue(
const tstring strName,
tstring& strValue,
bool bDisplayValue = true
);
UINT SetRegistryValue(
const tstring strName,
const tstring strValue,
bool bDisplayValue = true
);
// MSI Property Management
UINT GetProperty(
const tstring strPropertyName,
tstring& strPropertyValue,
bool bDisplayValue = true
);
UINT SetProperty(
const tstring strPropertyName,
const tstring strPropertyValue,
bool bDisplayValue = true
);
// MSI Database Management
UINT GetComponentKeyFilename(
const tstring strComponentName,
tstring& strComponentKeyFilename
);
// MSI UI Dialog Management
UINT DisplayMessage(
const UINT uiPushButtonStyle, // push button style to use in message box
const UINT uiIconStyle, // icon style to use in message box
const tstring strMessage // message
);
// 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
);
// Reboot machine when setup has completed.
UINT RebootWhenFinished();
protected:
MSIHANDLE m_hMSIHandle;
PMSIHANDLE m_phActionStartRec;
PMSIHANDLE m_phActionDataRec;
PMSIHANDLE m_phProgressRec;
PMSIHANDLE m_phLogInfoRec;
tstring m_strActionName;
tstring m_strProgressTitle;
};
#endif