mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-09 10:07:10 -06:00
23.01
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
// Update.h
|
||||
|
||||
#ifndef __COMMON_UPDATE_H
|
||||
#define __COMMON_UPDATE_H
|
||||
#ifndef ZIP7_INC_COMMON_UPDATE_H
|
||||
#define ZIP7_INC_COMMON_UPDATE_H
|
||||
|
||||
#include "../../../Common/Wildcard.h"
|
||||
|
||||
@@ -34,7 +34,7 @@ struct CArchivePath
|
||||
FString TempPrefix; // path(folder) for temp location
|
||||
FString TempPostfix;
|
||||
|
||||
CArchivePath(): Temp(false) {};
|
||||
CArchivePath(): Temp(false) {}
|
||||
|
||||
void ParseFromPath(const UString &path, EArcNameMode mode);
|
||||
UString GetPathWithoutExt() const { return Prefix + Name; }
|
||||
@@ -81,31 +81,21 @@ struct CRenamePair
|
||||
|
||||
struct CUpdateOptions
|
||||
{
|
||||
CCompressionMethodMode MethodMode;
|
||||
|
||||
CObjectVector<CUpdateArchiveCommand> Commands;
|
||||
bool UpdateArchiveItself;
|
||||
CArchivePath ArchivePath;
|
||||
EArcNameMode ArcNameMode;
|
||||
|
||||
bool SfxMode;
|
||||
FString SfxModule;
|
||||
|
||||
|
||||
bool PreserveATime;
|
||||
bool OpenShareForWrite;
|
||||
bool StopAfterOpenError;
|
||||
|
||||
bool StdInMode;
|
||||
UString StdInFileName;
|
||||
bool StdOutMode;
|
||||
|
||||
|
||||
bool EMailMode;
|
||||
bool EMailRemoveAfter;
|
||||
UString EMailAddress;
|
||||
|
||||
FString WorkingDir;
|
||||
NWildcard::ECensorPathMode PathMode;
|
||||
// UString AddPathPrefix;
|
||||
bool DeleteAfterCompressing;
|
||||
bool SetArcMTime;
|
||||
|
||||
CBoolPair NtSecurity;
|
||||
CBoolPair AltStreams;
|
||||
@@ -115,19 +105,28 @@ struct CUpdateOptions
|
||||
CBoolPair StoreOwnerId;
|
||||
CBoolPair StoreOwnerName;
|
||||
|
||||
bool DeleteAfterCompressing;
|
||||
EArcNameMode ArcNameMode;
|
||||
NWildcard::ECensorPathMode PathMode;
|
||||
|
||||
bool SetArcMTime;
|
||||
CCompressionMethodMode MethodMode;
|
||||
|
||||
CObjectVector<CUpdateArchiveCommand> Commands;
|
||||
CArchivePath ArchivePath;
|
||||
|
||||
FString SfxModule;
|
||||
UString StdInFileName;
|
||||
UString EMailAddress;
|
||||
FString WorkingDir;
|
||||
// UString AddPathPrefix;
|
||||
|
||||
CObjectVector<CRenamePair> RenamePairs;
|
||||
CRecordVector<UInt64> VolumesSizes;
|
||||
|
||||
bool InitFormatIndex(const CCodecs *codecs, const CObjectVector<COpenType> &types, const UString &arcPath);
|
||||
bool SetArcPath(const CCodecs *codecs, const UString &arcPath);
|
||||
|
||||
CUpdateOptions():
|
||||
UpdateArchiveItself(true),
|
||||
ArcNameMode(k_ArcNameMode_Smart),
|
||||
|
||||
SfxMode(false),
|
||||
|
||||
PreserveATime(false),
|
||||
@@ -140,12 +139,13 @@ struct CUpdateOptions
|
||||
EMailMode(false),
|
||||
EMailRemoveAfter(false),
|
||||
|
||||
PathMode(NWildcard::k_RelatPath),
|
||||
|
||||
DeleteAfterCompressing(false),
|
||||
SetArcMTime(false)
|
||||
SetArcMTime(false),
|
||||
|
||||
{};
|
||||
ArcNameMode(k_ArcNameMode_Smart),
|
||||
PathMode(NWildcard::k_RelatPath)
|
||||
|
||||
{}
|
||||
|
||||
void SetActionCommand_Add()
|
||||
{
|
||||
@@ -154,10 +154,9 @@ struct CUpdateOptions
|
||||
c.ActionSet = NUpdateArchive::k_ActionSet_Add;
|
||||
Commands.Add(c);
|
||||
}
|
||||
|
||||
CRecordVector<UInt64> VolumesSizes;
|
||||
};
|
||||
|
||||
|
||||
struct CUpdateErrorInfo
|
||||
{
|
||||
DWORD SystemError; // it's DWORD (WRes) only;
|
||||
@@ -170,32 +169,40 @@ struct CUpdateErrorInfo
|
||||
HRESULT SetFromLastError(const char *message, const FString &fileName);
|
||||
HRESULT SetFromError_DWORD(const char *message, const FString &fileName, DWORD error);
|
||||
|
||||
CUpdateErrorInfo(): SystemError(0) {};
|
||||
CUpdateErrorInfo(): SystemError(0) {}
|
||||
};
|
||||
|
||||
struct CFinishArchiveStat
|
||||
{
|
||||
UInt64 OutArcFileSize;
|
||||
unsigned NumVolumes;
|
||||
bool IsMultiVolMode;
|
||||
|
||||
CFinishArchiveStat(): OutArcFileSize(0) {}
|
||||
CFinishArchiveStat(): OutArcFileSize(0), NumVolumes(0), IsMultiVolMode(false) {}
|
||||
};
|
||||
|
||||
#define INTERFACE_IUpdateCallbackUI2(x) \
|
||||
INTERFACE_IUpdateCallbackUI(x) \
|
||||
INTERFACE_IDirItemsCallback(x) \
|
||||
virtual HRESULT OpenResult(const CCodecs *codecs, const CArchiveLink &arcLink, const wchar_t *name, HRESULT result) x; \
|
||||
virtual HRESULT StartScanning() x; \
|
||||
virtual HRESULT FinishScanning(const CDirItemsStat &st) x; \
|
||||
virtual HRESULT StartOpenArchive(const wchar_t *name) x; \
|
||||
virtual HRESULT StartArchive(const wchar_t *name, bool updating) x; \
|
||||
virtual HRESULT FinishArchive(const CFinishArchiveStat &st) x; \
|
||||
virtual HRESULT DeletingAfterArchiving(const FString &path, bool isDir) x; \
|
||||
virtual HRESULT FinishDeletingAfterArchiving() x; \
|
||||
Z7_PURE_INTERFACES_BEGIN
|
||||
|
||||
struct IUpdateCallbackUI2: public IUpdateCallbackUI, public IDirItemsCallback
|
||||
// INTERFACE_IUpdateCallbackUI(x)
|
||||
// INTERFACE_IDirItemsCallback(x)
|
||||
|
||||
#define Z7_IFACEN_IUpdateCallbackUI2(x) \
|
||||
virtual HRESULT OpenResult(const CCodecs *codecs, const CArchiveLink &arcLink, const wchar_t *name, HRESULT result) x \
|
||||
virtual HRESULT StartScanning() x \
|
||||
virtual HRESULT FinishScanning(const CDirItemsStat &st) x \
|
||||
virtual HRESULT StartOpenArchive(const wchar_t *name) x \
|
||||
virtual HRESULT StartArchive(const wchar_t *name, bool updating) x \
|
||||
virtual HRESULT FinishArchive(const CFinishArchiveStat &st) x \
|
||||
virtual HRESULT DeletingAfterArchiving(const FString &path, bool isDir) x \
|
||||
virtual HRESULT FinishDeletingAfterArchiving() x \
|
||||
|
||||
DECLARE_INTERFACE(IUpdateCallbackUI2):
|
||||
public IUpdateCallbackUI,
|
||||
public IDirItemsCallback
|
||||
{
|
||||
INTERFACE_IUpdateCallbackUI2(=0)
|
||||
Z7_IFACE_PURE(IUpdateCallbackUI2)
|
||||
};
|
||||
Z7_PURE_INTERFACES_END
|
||||
|
||||
HRESULT UpdateArchive(
|
||||
CCodecs *codecs,
|
||||
|
||||
Reference in New Issue
Block a user