[USETUP] Move the SetupExtractFile() function to where it is (only) used.
[reactos.git] / base / setup / usetup / filequeue.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/filequeue.h
23 * PURPOSE: File queue functions
24 * PROGRAMMER:
25 */
26
27 #pragma once
28
29 #define SPFILENOTIFY_STARTQUEUE 0x1
30 #define SPFILENOTIFY_ENDQUEUE 0x2
31 #define SPFILENOTIFY_STARTSUBQUEUE 0x3
32 #define SPFILENOTIFY_ENDSUBQUEUE 0x4
33
34 #define SPFILENOTIFY_STARTCOPY 0xb
35 #define SPFILENOTIFY_ENDCOPY 0xc
36 #define SPFILENOTIFY_COPYERROR 0xd
37
38 #define FILEOP_COPY 0x0
39 #define FILEOP_RENAME 0x1
40 #define FILEOP_DELETE 0x2
41 #define FILEOP_BACKUP 0x3
42
43 #define FILEOP_ABORT 0x0
44 #define FILEOP_DOIT 0x1
45 #define FILEOP_SKIP 0x2
46 #define FILEOP_RETRY FILEOP_DOIT
47 #define FILEOP_NEWPATH 0x4
48
49
50 /* TYPES ********************************************************************/
51
52 typedef PVOID HSPFILEQ;
53
54 typedef UINT (CALLBACK* PSP_FILE_CALLBACK_W)(
55 PVOID Context,
56 UINT Notification,
57 UINT_PTR Param1,
58 UINT_PTR Param2);
59
60 typedef struct _COPYCONTEXT
61 {
62 LPCWSTR DestinationRootPath; /* Not owned by this structure */
63 LPCWSTR InstallPath; /* Not owned by this structure */
64 ULONG TotalOperations;
65 ULONG CompletedOperations;
66 PPROGRESSBAR ProgressBar;
67 PPROGRESSBAR MemoryBars[4];
68 } COPYCONTEXT, *PCOPYCONTEXT;
69
70 /* FUNCTIONS ****************************************************************/
71
72 NTSTATUS
73 SetupExtractFile(
74 PWCHAR CabinetFileName,
75 PWCHAR SourceFileName,
76 PWCHAR DestinationFileName);
77
78 HSPFILEQ
79 WINAPI
80 SetupOpenFileQueue(VOID);
81
82 VOID
83 WINAPI
84 SetupCloseFileQueue(
85 IN HSPFILEQ QueueHandle);
86
87 #if 0 // This is the API that is declared in setupapi.h and exported by setupapi.dll
88 BOOL
89 WINAPI
90 SetupQueueCopyWNew(
91 IN HSPFILEQ QueueHandle,
92 IN PCWSTR SourceRootPath,
93 IN PCWSTR SourcePath,
94 IN PCWSTR SourceFileName,
95 IN PCWSTR SourceDescription,
96 IN PCWSTR SourceTagFile,
97 IN PCWSTR TargetDirectory,
98 IN PCWSTR TargetFileName,
99 IN DWORD CopyStyle);
100 #endif
101
102 BOOL
103 SetupQueueCopy(
104 HSPFILEQ QueueHandle,
105 PCWSTR SourceCabinet,
106 PCWSTR SourceRootPath,
107 PCWSTR SourcePath,
108 PCWSTR SourceFilename,
109 PCWSTR TargetDirectory,
110 PCWSTR TargetFilename);
111
112 BOOL
113 WINAPI
114 SetupCommitFileQueueW(
115 HWND Owner,
116 HSPFILEQ QueueHandle,
117 PSP_FILE_CALLBACK_W MsgHandler,
118 PVOID Context);
119
120 /* EOF */