1*0a1e2f0eSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*0a1e2f0eSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*0a1e2f0eSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*0a1e2f0eSAndrew Rist  * distributed with this work for additional information
6*0a1e2f0eSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*0a1e2f0eSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*0a1e2f0eSAndrew Rist  * "License"); you may not use this file except in compliance
9*0a1e2f0eSAndrew Rist  * with the License.  You may obtain a copy of the License at
10*0a1e2f0eSAndrew Rist  *
11*0a1e2f0eSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*0a1e2f0eSAndrew Rist  *
13*0a1e2f0eSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*0a1e2f0eSAndrew Rist  * software distributed under the License is distributed on an
15*0a1e2f0eSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*0a1e2f0eSAndrew Rist  * KIND, either express or implied.  See the License for the
17*0a1e2f0eSAndrew Rist  * specific language governing permissions and limitations
18*0a1e2f0eSAndrew Rist  * under the License.
19*0a1e2f0eSAndrew Rist  *
20*0a1e2f0eSAndrew Rist  *************************************************************/
21*0a1e2f0eSAndrew Rist 
22*0a1e2f0eSAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir 
25cdf0e10cSrcweir #ifndef SETUP_MAIN_HXX
26cdf0e10cSrcweir #define SETUP_MAIN_HXX
27cdf0e10cSrcweir 
28cdf0e10cSrcweir class SetupApp
29cdf0e10cSrcweir {
30cdf0e10cSrcweir     DWORD           m_nOSVersion;
31cdf0e10cSrcweir     DWORD           m_nMinorVersion;
32cdf0e10cSrcweir     boolean         m_bIsWin9x      : 1;
33cdf0e10cSrcweir     boolean         m_bNeedReboot   : 1;
34cdf0e10cSrcweir     boolean         m_bAdministrative : 1;
35cdf0e10cSrcweir 
36cdf0e10cSrcweir public:
37cdf0e10cSrcweir     UINT            m_uiRet;
38cdf0e10cSrcweir 
39cdf0e10cSrcweir                     SetupApp();
40cdf0e10cSrcweir     virtual        ~SetupApp();
41cdf0e10cSrcweir 
42cdf0e10cSrcweir     virtual boolean Initialize( HINSTANCE hInst ) = 0;
43cdf0e10cSrcweir     virtual boolean AlreadyRunning() const = 0;
44cdf0e10cSrcweir     virtual boolean ReadProfile() = 0;
45cdf0e10cSrcweir     virtual boolean GetPatches() = 0;
46cdf0e10cSrcweir     virtual boolean ChooseLanguage( long& rLanguage ) = 0;
47cdf0e10cSrcweir     virtual boolean CheckVersion() = 0;
48cdf0e10cSrcweir     virtual boolean CheckForUpgrade() = 0;
49cdf0e10cSrcweir     virtual boolean InstallRuntimes() = 0;
50cdf0e10cSrcweir     virtual boolean Install( long nLanguage ) = 0;
51cdf0e10cSrcweir 
52cdf0e10cSrcweir     virtual UINT    GetError() const = 0;
53cdf0e10cSrcweir     virtual void    DisplayError( UINT nErr ) const = 0;
54cdf0e10cSrcweir 
SetError(UINT nErr)55cdf0e10cSrcweir     void            SetError( UINT nErr ) { m_uiRet = nErr; }
IsWin9x() const56cdf0e10cSrcweir     boolean         IsWin9x() const { return m_bIsWin9x; }
GetOSVersion() const57cdf0e10cSrcweir     DWORD           GetOSVersion() const { return m_nOSVersion; }
GetMinorVersion() const58cdf0e10cSrcweir     DWORD           GetMinorVersion() const { return m_nMinorVersion; }
59cdf0e10cSrcweir 
IsAdminInstall()60cdf0e10cSrcweir     boolean         IsAdminInstall() { return m_bAdministrative; }
SetAdminInstall(boolean bValue)61cdf0e10cSrcweir     void            SetAdminInstall( boolean bValue ) { m_bAdministrative = bValue; }
62cdf0e10cSrcweir 
SetRebootNeeded(boolean bNeedReboot)63cdf0e10cSrcweir     void            SetRebootNeeded( boolean bNeedReboot ) { m_bNeedReboot = bNeedReboot; }
NeedReboot() const64cdf0e10cSrcweir     boolean         NeedReboot() const { return m_bNeedReboot; }
65cdf0e10cSrcweir };
66cdf0e10cSrcweir 
67cdf0e10cSrcweir SetupApp* Create_SetupAppA();
68cdf0e10cSrcweir SetupApp* Create_SetupAppW();
69cdf0e10cSrcweir 
70cdf0e10cSrcweir #endif
71