[SETUPLIB][USETUP] Introduce a 'SetupLib' library. CORE-13544
[reactos.git] / base / setup / usetup / usetup.h
1 /*
2 * ReactOS kernel
3 * Copyright (C) 2002 ReactOS Team
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 */
19 /*
20 * COPYRIGHT: See COPYING in the top level directory
21 * PROJECT: ReactOS text-mode setup
22 * FILE: base/setup/usetup/usetup.h
23 * PURPOSE: Text-mode setup
24 * PROGRAMMER: Eric Kohl
25 */
26
27 #ifndef _USETUP_PCH_
28 #define _USETUP_PCH_
29
30 /* C Headers */
31 #include <stdio.h>
32 #include <stdlib.h>
33
34 /* PSDK/NDK */
35 #define WIN32_NO_STATUS
36 #include <windef.h>
37 #include <winbase.h>
38 #include <winreg.h>
39 #include <winuser.h>
40 #include <wincon.h>
41
42 #define NTOS_MODE_USER
43 #include <ndk/cmfuncs.h>
44 #include <ndk/exfuncs.h>
45 #include <ndk/iofuncs.h>
46 #include <ndk/kefuncs.h>
47 #include <ndk/mmfuncs.h>
48 #include <ndk/obfuncs.h>
49 #include <ndk/psfuncs.h>
50 #include <ndk/rtlfuncs.h>
51 #include <ndk/setypes.h>
52
53 #include <ntstrsafe.h>
54
55 /* Setup library headers */
56 #include <reactos/rosioctl.h>
57 #include <../lib/setuplib.h>
58 // #include "errorcode.h"
59
60 /* Internal Headers */
61 #include "consup.h"
62 #include "inffile.h"
63 #include "inicache.h"
64 #include "progress.h"
65 #include "infros.h"
66 #include "filequeue.h"
67 #include "registry.h"
68 #include "fslist.h"
69 #include "partlist.h"
70 #include "cabinet.h"
71 #include "filesup.h"
72 #include "genlist.h"
73 #include "mui.h"
74
75 extern HANDLE ProcessHeap;
76 extern UNICODE_STRING SourceRootPath;
77 extern UNICODE_STRING SourceRootDir;
78 extern UNICODE_STRING SourcePath;
79 extern BOOLEAN IsUnattendedSetup;
80 extern PWCHAR SelectedLanguageId;
81
82 extern VOID InfSetHeap(PVOID Heap);
83 extern VOID InfCloseFile(HINF InfHandle);
84 extern BOOLEAN InfFindNextLine(PINFCONTEXT ContextIn,
85 PINFCONTEXT ContextOut);
86 extern BOOLEAN InfGetBinaryField(PINFCONTEXT Context,
87 ULONG FieldIndex,
88 PUCHAR ReturnBuffer,
89 ULONG ReturnBufferSize,
90 PULONG RequiredSize);
91 extern BOOLEAN InfGetMultiSzField(PINFCONTEXT Context,
92 ULONG FieldIndex,
93 PWSTR ReturnBuffer,
94 ULONG ReturnBufferSize,
95 PULONG RequiredSize);
96 extern BOOLEAN InfGetStringField(PINFCONTEXT Context,
97 ULONG FieldIndex,
98 PWSTR ReturnBuffer,
99 ULONG ReturnBufferSize,
100 PULONG RequiredSize);
101
102 #define SetupCloseInfFile InfCloseFile
103 #define SetupFindNextLine InfFindNextLine
104 #define SetupGetBinaryField InfGetBinaryField
105 #define SetupGetMultiSzFieldW InfGetMultiSzField
106 #define SetupGetStringFieldW InfGetStringField
107
108 #ifndef _PAGE_NUMBER_DEFINED
109 #define _PAGE_NUMBER_DEFINED
110 typedef enum _PAGE_NUMBER
111 {
112 START_PAGE,
113 LANGUAGE_PAGE,
114 INTRO_PAGE,
115 LICENSE_PAGE,
116 INSTALL_INTRO_PAGE,
117
118 // SCSI_CONTROLLER_PAGE,
119
120 DEVICE_SETTINGS_PAGE,
121 COMPUTER_SETTINGS_PAGE,
122 DISPLAY_SETTINGS_PAGE,
123 KEYBOARD_SETTINGS_PAGE,
124 LAYOUT_SETTINGS_PAGE,
125
126 SELECT_PARTITION_PAGE,
127 CREATE_PRIMARY_PARTITION_PAGE,
128 CREATE_EXTENDED_PARTITION_PAGE,
129 CREATE_LOGICAL_PARTITION_PAGE,
130 CONFIRM_DELETE_SYSTEM_PARTITION_PAGE,
131 DELETE_PARTITION_PAGE,
132
133 SELECT_FILE_SYSTEM_PAGE,
134 FORMAT_PARTITION_PAGE,
135 CHECK_FILE_SYSTEM_PAGE,
136
137 PREPARE_COPY_PAGE,
138 INSTALL_DIRECTORY_PAGE,
139 FILE_COPY_PAGE,
140 REGISTRY_PAGE,
141 BOOT_LOADER_PAGE,
142 BOOT_LOADER_FLOPPY_PAGE,
143 BOOT_LOADER_HARDDISK_MBR_PAGE,
144 BOOT_LOADER_HARDDISK_VBR_PAGE,
145
146 REPAIR_INTRO_PAGE,
147
148 SUCCESS_PAGE,
149 QUIT_PAGE,
150 FLUSH_PAGE,
151 REBOOT_PAGE, /* virtual page */
152 RECOVERY_PAGE, /* virtual page */
153 } PAGE_NUMBER, *PPAGE_NUMBER;
154 #endif
155
156 #define POPUP_WAIT_NONE 0
157 #define POPUP_WAIT_ANY_KEY 1
158 #define POPUP_WAIT_ENTER 2
159
160 #endif /* _USETUP_PCH_ */