Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/kornelski/7z.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pavlov <ipavlov@users.sourceforge.net>2008-08-13 04:00:00 +0400
committerKornel LesiƄski <kornel@geekhood.net>2016-05-28 02:15:56 +0300
commit173c07e166fdf6fcd20f18ea73008f1b628945df (patch)
tree13ebea85cdc4c16ae93714ff0627ee9f91ad7e08 /CPP/7zip/Archive/IArchive.h
parent3901bf0ab88106a5b031cba7bc18d60cdebf7eef (diff)
4.59 beta
Diffstat (limited to 'CPP/7zip/Archive/IArchive.h')
-rwxr-xr-xCPP/7zip/Archive/IArchive.h73
1 files changed, 47 insertions, 26 deletions
diff --git a/CPP/7zip/Archive/IArchive.h b/CPP/7zip/Archive/IArchive.h
index e0ae7aa1..88d6c408 100755
--- a/CPP/7zip/Archive/IArchive.h
+++ b/CPP/7zip/Archive/IArchive.h
@@ -22,7 +22,7 @@ namespace NFileTimeType
namespace NArchive
{
- enum
+ enum
{
kName = 0,
kClassID,
@@ -39,7 +39,7 @@ namespace NArchive
{
namespace NAskMode
{
- enum
+ enum
{
kExtract = 0,
kTest,
@@ -48,7 +48,7 @@ namespace NArchive
}
namespace NOperationResult
{
- enum
+ enum
{
kOK = 0,
kUnSupportedMethod,
@@ -61,7 +61,7 @@ namespace NArchive
{
namespace NOperationResult
{
- enum
+ enum
{
kOK = 0,
kError
@@ -70,33 +70,42 @@ namespace NArchive
}
}
+#define INTERFACE_IArchiveOpenCallback(x) \
+ STDMETHOD(SetTotal)(const UInt64 *files, const UInt64 *bytes) x; \
+ STDMETHOD(SetCompleted)(const UInt64 *files, const UInt64 *bytes) x; \
+
ARCHIVE_INTERFACE(IArchiveOpenCallback, 0x10)
{
- STDMETHOD(SetTotal)(const UInt64 *files, const UInt64 *bytes) PURE;
- STDMETHOD(SetCompleted)(const UInt64 *files, const UInt64 *bytes) PURE;
+ INTERFACE_IArchiveOpenCallback(PURE);
};
+#define INTERFACE_IArchiveExtractCallback(x) \
+ INTERFACE_IProgress(x) \
+ /* GetStream OUT: S_OK - OK, S_FALSE - skeep this file */ \
+ STDMETHOD(GetStream)(UInt32 index, ISequentialOutStream **outStream, Int32 askExtractMode) x; \
+ STDMETHOD(PrepareOperation)(Int32 askExtractMode) x; \
+ STDMETHOD(SetOperationResult)(Int32 resultEOperationResult) x; \
+
ARCHIVE_INTERFACE_SUB(IArchiveExtractCallback, IProgress, 0x20)
{
- STDMETHOD(GetStream)(UInt32 index, ISequentialOutStream **outStream,
- Int32 askExtractMode) PURE;
- // GetStream OUT: S_OK - OK, S_FALSE - skeep this file
- STDMETHOD(PrepareOperation)(Int32 askExtractMode) PURE;
- STDMETHOD(SetOperationResult)(Int32 resultEOperationResult) PURE;
+ INTERFACE_IArchiveExtractCallback(PURE)
};
+#define INTERFACE_IArchiveOpenVolumeCallback(x) \
+ STDMETHOD(GetProperty)(PROPID propID, PROPVARIANT *value) x; \
+ STDMETHOD(GetStream)(const wchar_t *name, IInStream **inStream) x; \
+
ARCHIVE_INTERFACE(IArchiveOpenVolumeCallback, 0x30)
{
- STDMETHOD(GetProperty)(PROPID propID, PROPVARIANT *value) PURE;
- STDMETHOD(GetStream)(const wchar_t *name, IInStream **inStream) PURE;
+ INTERFACE_IArchiveOpenVolumeCallback(PURE);
};
ARCHIVE_INTERFACE(IInArchiveGetStream, 0x40)
{
- STDMETHOD(GetStream)(UInt32 index, ISequentialInStream **stream) PURE;
+ STDMETHOD(GetStream)(UInt32 index, ISequentialInStream **stream) PURE;
};
@@ -108,7 +117,7 @@ ARCHIVE_INTERFACE(IArchiveOpenSetSubArchiveName, 0x50)
/*
IInArchive::Extract:
- indices must be sorted
+ indices must be sorted
numItems = 0xFFFFFFFF means "all files"
testMode != 0 means "test files without writing to outStream"
*/
@@ -131,23 +140,30 @@ ARCHIVE_INTERFACE(IInArchive, 0x60)
};
+#define INTERFACE_IArchiveUpdateCallback(x) \
+ INTERFACE_IProgress(x); \
+ STDMETHOD(GetUpdateItemInfo)(UInt32 index, \
+ Int32 *newData, /*1 - new data, 0 - old data */ \
+ Int32 *newProperties, /* 1 - new properties, 0 - old properties */ \
+ UInt32 *indexInArchive /* -1 if there is no in archive, or if doesn't matter */ \
+ ) x; \
+ STDMETHOD(GetProperty)(UInt32 index, PROPID propID, PROPVARIANT *value) x; \
+ STDMETHOD(GetStream)(UInt32 index, ISequentialInStream **inStream) x; \
+ STDMETHOD(SetOperationResult)(Int32 operationResult) x; \
+
ARCHIVE_INTERFACE_SUB(IArchiveUpdateCallback, IProgress, 0x80)
{
- STDMETHOD(GetUpdateItemInfo)(UInt32 index,
- Int32 *newData, // 1 - new data, 0 - old data
- Int32 *newProperties, // 1 - new properties, 0 - old properties
- UInt32 *indexInArchive // -1 if there is no in archive, or if doesn't matter
- ) PURE;
- STDMETHOD(GetProperty)(UInt32 index, PROPID propID, PROPVARIANT *value) PURE;
- STDMETHOD(GetStream)(UInt32 index, ISequentialInStream **inStream) PURE;
- STDMETHOD(SetOperationResult)(Int32 operationResult) PURE;
+ INTERFACE_IArchiveUpdateCallback(PURE);
};
+#define INTERFACE_IArchiveUpdateCallback2(x) \
+ INTERFACE_IArchiveUpdateCallback(x) \
+ STDMETHOD(GetVolumeSize)(UInt32 index, UInt64 *size) x; \
+ STDMETHOD(GetVolumeStream)(UInt32 index, ISequentialOutStream **volumeStream) x; \
ARCHIVE_INTERFACE_SUB(IArchiveUpdateCallback2, IArchiveUpdateCallback, 0x82)
{
- STDMETHOD(GetVolumeSize)(UInt32 index, UInt64 *size) PURE;
- STDMETHOD(GetVolumeStream)(UInt32 index, ISequentialOutStream **volumeStream) PURE;
+ INTERFACE_IArchiveUpdateCallback2(PURE);
};
@@ -196,12 +212,17 @@ ARCHIVE_INTERFACE(ISetProperties, 0x03)
{ *numProperties = sizeof(kArcProps) / sizeof(kArcProps[0]); return S_OK; } \
STDMETHODIMP CHandler::GetArchivePropertyInfo IMP_IInArchive_GetProp(kArcProps)
+#define IMP_IInArchive_ArcProps_WITH_NAME \
+ STDMETHODIMP CHandler::GetNumberOfArchiveProperties(UInt32 *numProperties) \
+ { *numProperties = sizeof(kArcProps) / sizeof(kArcProps[0]); return S_OK; } \
+ STDMETHODIMP CHandler::GetArchivePropertyInfo IMP_IInArchive_GetProp_WITH_NAME(kArcProps)
+
#define IMP_IInArchive_ArcProps_NO \
STDMETHODIMP CHandler::GetNumberOfArchiveProperties(UInt32 *numProperties) \
{ *numProperties = 0; return S_OK; } \
STDMETHODIMP CHandler::GetArchivePropertyInfo(UInt32, BSTR *, PROPID *, VARTYPE *) \
{ return E_NOTIMPL; } \
STDMETHODIMP CHandler::GetArchiveProperty(PROPID, PROPVARIANT *value) \
- { value->vt = VT_EMPTY; return S_OK; }
+ { value->vt = VT_EMPTY; return S_OK; }
#endif