blob: d4caca16480cf8f94d28e73c0c4d5da41900bcb7 (
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
|
// AgentProxy.h
#ifndef __AGENT_PROXY_H
#define __AGENT_PROXY_H
#include "Common/MyString.h"
#include "../Common/OpenArchive.h"
struct CProxyFile
{
UInt32 Index;
UString Name;
};
struct CProxyFolder: public CProxyFile
{
CProxyFolder *Parent;
CObjectVector<CProxyFolder> Folders;
CObjectVector<CProxyFile> Files;
bool IsLeaf;
bool CrcIsDefined;
UInt64 Size;
UInt64 PackSize;
UInt32 Crc;
UInt32 NumSubFolders;
UInt32 NumSubFiles;
CProxyFolder(): Parent(NULL) {};
int FindDirSubItemIndex(const UString &name, int &insertPos) const;
int FindDirSubItemIndex(const UString &name) const;
CProxyFolder* AddDirSubItem(UInt32 index, bool leaf, const UString &name);
void AddFileSubItem(UInt32 index, const UString &name);
void Clear();
void GetPathParts(UStringVector &pathParts) const;
UString GetFullPathPrefix() const;
UString GetItemName(UInt32 index) const;
void AddRealIndices(CUIntVector &realIndices) const;
void GetRealIndices(const UInt32 *indices, UInt32 numItems, CUIntVector &realIndices) const;
void CalculateSizes(IInArchive *archive);
};
struct CProxyArchive
{
CProxyFolder RootFolder;
bool ThereIsPathProp;
HRESULT Load(const CArc &arc, IProgress *progress);
};
#endif
|