Imported Upstream version 9.20
[platform/upstream/7zip.git] / CPP / 7zip / Archive / Zip / ZipUpdate.h
1 // Zip/Update.h\r
2 \r
3 #ifndef __ZIP_UPDATE_H\r
4 #define __ZIP_UPDATE_H\r
5 \r
6 #include "../../ICoder.h"\r
7 #include "../IArchive.h"\r
8 \r
9 #include "../../Common/CreateCoder.h"\r
10 \r
11 #include "ZipCompressionMode.h"\r
12 #include "ZipIn.h"\r
13 \r
14 namespace NArchive {\r
15 namespace NZip {\r
16 \r
17 struct CUpdateRange\r
18 {\r
19   UInt64 Position;\r
20   UInt64 Size;\r
21   CUpdateRange() {};\r
22   CUpdateRange(UInt64 position, UInt64 size): Position(position), Size(size) {};\r
23 };\r
24 \r
25 struct CUpdateItem\r
26 {\r
27   bool NewData;\r
28   bool NewProperties;\r
29   bool IsDir;\r
30   bool NtfsTimeIsDefined;\r
31   bool IsUtf8;\r
32   int IndexInArchive;\r
33   int IndexInClient;\r
34   UInt32 Attributes;\r
35   UInt32 Time;\r
36   UInt64 Size;\r
37   AString Name;\r
38   // bool Commented;\r
39   // CUpdateRange CommentRange;\r
40   FILETIME NtfsMTime;\r
41   FILETIME NtfsATime;\r
42   FILETIME NtfsCTime;\r
43 \r
44   CUpdateItem(): NtfsTimeIsDefined(false), IsUtf8(false), Size(0) {}\r
45 };\r
46 \r
47 HRESULT Update(\r
48     DECL_EXTERNAL_CODECS_LOC_VARS\r
49     const CObjectVector<CItemEx> &inputItems,\r
50     const CObjectVector<CUpdateItem> &updateItems,\r
51     ISequentialOutStream *seqOutStream,\r
52     CInArchive *inArchive,\r
53     CCompressionMethodMode *compressionMethodMode,\r
54     IArchiveUpdateCallback *updateCallback);\r
55 \r
56 }}\r
57 \r
58 #endif\r