blob: 7567864a75f58851f357b4848255fa85e7b6dfc2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
// 7zUpdate.h
#ifndef __7Z_UPDATE_H
#define __7Z_UPDATE_H
#include "7zIn.h"
#include "7zCompressionMode.h"
#include "../IArchive.h"
namespace NArchive {
namespace N7z {
struct CUpdateItem
{
bool NewData;
bool NewProperties;
int IndexInArchive;
int IndexInClient;
UInt32 Attributes;
FILETIME CreationTime;
FILETIME LastWriteTime;
UInt64 Size;
UString Name;
bool IsAnti;
bool IsDirectory;
bool CreationTimeIsDefined;
bool LastWriteTimeIsDefined;
bool AttributesAreDefined;
const bool HasStream() const
{ return !IsDirectory && !IsAnti && Size != 0; }
CUpdateItem(): IsAnti(false) {}
void SetDirectoryStatusFromAttributes()
{ IsDirectory = ((Attributes & FILE_ATTRIBUTE_DIRECTORY) != 0); };
int GetExtensionPos() const;
UString GetExtension() const;
};
struct CUpdateOptions
{
const CCompressionMethodMode *Method;
const CCompressionMethodMode *HeaderMethod;
bool UseFilters;
bool MaxFilter;
bool UseAdditionalHeaderStreams;
bool CompressMainHeader;
UInt64 NumSolidFiles;
UInt64 NumSolidBytes;
bool SolidExtension;
bool RemoveSfxBlock;
bool VolumeMode;
};
HRESULT Update(
IInStream *inStream,
const CArchiveDatabaseEx *database,
const CObjectVector<CUpdateItem> &updateItems,
ISequentialOutStream *seqOutStream,
IArchiveUpdateCallback *updateCallback,
const CUpdateOptions &options);
}}
#endif
|