- Create another branch for networking fixes
[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 /* $Id$
20 * COPYRIGHT: See COPYING in the top level directory
21 * PROJECT: ReactOS text-mode setup
22 * FILE: subsys/system/usetup/filequeue.h
23 * PURPOSE: File queue functions
24 * PROGRAMMER: Eric Kohl
25 */
26
27 #ifndef __FILEQUEUE_H__
28 #define __FILEQUEUE_H__
29
30
31 #define SPFILENOTIFY_STARTQUEUE 0x1
32 #define SPFILENOTIFY_ENDQUEUE 0x2
33 #define SPFILENOTIFY_STARTSUBQUEUE 0x3
34 #define SPFILENOTIFY_ENDSUBQUEUE 0x4
35
36 #define SPFILENOTIFY_STARTCOPY 0xb
37 #define SPFILENOTIFY_ENDCOPY 0xc
38 #define SPFILENOTIFY_COPYERROR 0xd
39
40 #define FILEOP_COPY 0x0
41 #define FILEOP_RENAME 0x1
42 #define FILEOP_DELETE 0x2
43 #define FILEOP_BACKUP 0x3
44
45 #define FILEOP_ABORT 0x0
46 #define FILEOP_DOIT 0x1
47 #define FILEOP_SKIP 0x2
48 #define FILEOP_RETRY FILEOP_DOIT
49 #define FILEOP_NEWPATH 0x4
50
51
52 /* TYPES ********************************************************************/
53
54 typedef PVOID HSPFILEQ;
55
56 typedef UINT (CALLBACK* PSP_FILE_CALLBACK_W)(PVOID Context,
57 UINT Notification,
58 UINT_PTR Param1,
59 UINT_PTR Param2);
60
61 typedef struct _COPYCONTEXT
62 {
63 LPCWSTR DestinationRootPath; /* Not owned by this structure */
64 LPCWSTR InstallPath; /* Not owned by this structure */
65 ULONG TotalOperations;
66 ULONG CompletedOperations;
67 PPROGRESSBAR ProgressBar;
68 PPROGRESSBAR MemoryBars[4];
69 } COPYCONTEXT, *PCOPYCONTEXT;
70
71 /* FUNCTIONS ****************************************************************/
72
73 HSPFILEQ WINAPI
74 SetupOpenFileQueue(VOID);
75
76 VOID WINAPI
77 SetupCloseFileQueue(
78 IN HSPFILEQ QueueHandle);
79
80 BOOL WINAPI
81 SetupQueueCopyWNew(
82 IN HSPFILEQ QueueHandle,
83 IN PCWSTR SourceRootPath,
84 IN PCWSTR SourcePath,
85 IN PCWSTR SourceFileName,
86 IN PCWSTR SourceDescription,
87 IN PCWSTR SourceTagFile,
88 IN PCWSTR TargetDirectory,
89 IN PCWSTR TargetFileName,
90 IN DWORD CopyStyle);
91
92 BOOL
93 SetupQueueCopy(HSPFILEQ QueueHandle,
94 PCWSTR SourceCabinet,
95 PCWSTR SourceRootPath,
96 PCWSTR SourcePath,
97 PCWSTR SourceFilename,
98 PCWSTR TargetDirectory,
99 PCWSTR TargetFilename);
100
101 BOOL WINAPI
102 SetupCommitFileQueueW(HWND Owner,
103 HSPFILEQ QueueHandle,
104 PSP_FILE_CALLBACK_W MsgHandler,
105 PVOID Context);
106
107 #endif /* __FILEQUEUE_H__ */
108
109 /* EOF */