Lhaz
読み取り中…
検索中…
一致する文字列を見つけられません
lhazcab.h
[詳解]
1/*************************************************************************/
6#pragma once
7
8#include "altstr.hpp"
9#include "path.h"
10#include <windows.h>
11#include <vector>
12#include "mybuf.h"
13#include "mystr.h"
14#include "fdi.h"
15#include "fci.h"
16#include "lhazarc.h"
17
18using std::vector;
19
20class LHAZPROCFILE;
21class PATH;
22
23namespace gui {
24
25class LHAZTREEVIEW;
26
27} // namespace gui
28
29/*************************************************************************/
32class ARCCAB : public ARCHIVE {
33public:
34 enum { CAB_TOTAL_BYTES_LIMIT = 0x7FFF8000 };
35 //
36 static MYSTR ARCNAME;
37 static const char HEADER[4];
38 static long coffFiles;
39 static vector<long> coffCabstart;
40 static LONGLONG SkipSize;
41 //
43 //
44 // 自己解凍書庫に変換
45 static bool Convert(const MYSTR& name);
46 static LONGLONG SkipSfxCode(MYFILE& file);
47 static bool IsArchiveSfxCab(int size, const char* buf);
48 //
49 // 全解凍用コンストラクタ
50 ARCCAB(HWND hwnd, const WSTR& name, TYPE type);
51 // 閲覧用コンストラクタ
52 ARCCAB(HWND hwnd, const WSTR& name, TYPE type, const WSTR& filter, gui::LHAZTREEVIEW* treeview);
53 // デストラクタ
54 ‾ARCCAB(void);
55 // 全解凍
56 bool Extract(bool verify, const WSTR& temp, const WSTR& password);
57 // 個別解凍
58 bool Extract(const WSTR& temp);
59 // 圧縮
60 bool Compress(int method, int header, const WSTR& pass, const PATH& temp, const vector<LHAZPROCFILE>& v);
61 // 個別削除
62 bool Delete(const vector<LHAZFILE*>& v);
63 //
64 friend FNFCIGETTEMPFILE(get_temp_file);
65 friend FNFCISTATUS(progress);
66 friend FNFDINOTIFY(notification_function);
67
68private:
69 enum { FOLDER_THRESHOLD = 900000 };
70 enum { SETID = 0x1204 };
71 //
72 static const ULONG MEDIA_SIZE;
73 static const TCHAR* METHODS[];
74 static const BYTE SfxCode[];
75 //
76 PATH Temp;
79 vector<const WSTR*> Ext;
82 MYSTR ArcName;
83 //
84 class CFHEADER {
85 public:
86 CFHEADER(void);
87 ‾CFHEADER(void);
88 bool Get(MYFILE& fp);
89 //
90 char signature[4];
98 short cFolders;
99 short cFiles;
100 short flags;
101 short setID;
102 short iCabinet;
103 unsigned short cbCFHeader;
111 private:
112 static const unsigned short cfhdrPREV_CABINET;
113 static const unsigned short cfhdrNEXT_CABINET;
114 static const unsigned short cfhdrRESERVE_PRESENT;
115 };
116 //
117 class CFFOLDER {
118 public:
119 CFFOLDER(void);
120 ‾CFFOLDER(void);
121 //
122 bool Get(MYFILE& fp, unsigned char cbCFFolder);
123 //
125 short cCFData;
128 };
129 //
130 class CFFILE {
131 public:
132 CFFILE(void);
133 ‾CFFILE(void);
134 //
135 const MYSTR& GetName(void) const { return szName; }
136 bool Get(MYFILE& fp);
137 //
138 long cbFile;
140 short iFolder;
141 short date;
142 short time;
143 short attribs;
144 static const short ifoldCONTINUED_FROM_PREV;
145 static const short ifoldCONTINUED_TO_NEXT;
147 private:
148 MYSTR szName;
149 };
150 //
152
153};
Definition lhazcab.h:130
static const short ifoldCONTINUED_TO_NEXT
Definition lhazcab.h:145
short date
Definition lhazcab.h:141
‾CFFILE(void)
Definition lhazcab.cpp:240
long uoffFolderStart
Definition lhazcab.h:139
static const short ifoldCONTINUED_FROM_PREV
Definition lhazcab.h:144
short attribs
Definition lhazcab.h:143
bool Get(MYFILE &fp)
Definition lhazcab.cpp:247
CFFILE(void)
Definition lhazcab.cpp:227
short time
Definition lhazcab.h:142
MYSTR szName
Definition lhazcab.h:148
static const short ifoldCONTINUED_PREV_AND_NEXT
Definition lhazcab.h:146
const MYSTR & GetName(void) const
Definition lhazcab.h:135
short iFolder
Definition lhazcab.h:140
long cbFile
Definition lhazcab.h:138
Definition lhazcab.h:117
short cCFData
Definition lhazcab.h:125
‾CFFOLDER(void)
Definition lhazcab.cpp:199
bool Get(MYFILE &fp, unsigned char cbCFFolder)
Definition lhazcab.cpp:207
short typeCompress
Definition lhazcab.h:126
long coffCabstart
Definition lhazcab.h:124
CFFOLDER(void)
Definition lhazcab.cpp:188
char * abReserve
Definition lhazcab.h:127
Definition lhazcab.h:84
MYSTR szCabinetPrev
Definition lhazcab.h:107
long reserved2
Definition lhazcab.h:93
unsigned short cbCFHeader
Definition lhazcab.h:103
short flags
Definition lhazcab.h:100
static const unsigned short cfhdrRESERVE_PRESENT
Definition lhazcab.h:114
short setID
Definition lhazcab.h:101
short cFolders
Definition lhazcab.h:98
long cbCabinet
Definition lhazcab.h:92
char versionMajor
Definition lhazcab.h:97
static const unsigned short cfhdrPREV_CABINET
Definition lhazcab.h:112
long reserved3
Definition lhazcab.h:95
long coffFiles
Definition lhazcab.h:94
MYSTR szCabinetNext
Definition lhazcab.h:109
short cFiles
Definition lhazcab.h:99
long reserved1
Definition lhazcab.h:91
‾CFHEADER(void)
Definition lhazcab.cpp:100
bool Get(MYFILE &fp)
Definition lhazcab.cpp:108
char * abReserve
Definition lhazcab.h:106
char cbCFData
Definition lhazcab.h:105
static const unsigned short cfhdrNEXT_CABINET
Definition lhazcab.h:113
CFHEADER(void)
Definition lhazcab.cpp:76
char signature[4]
Definition lhazcab.h:90
char versionMinor
Definition lhazcab.h:96
MYSTR szDiskPrev
Definition lhazcab.h:108
short iCabinet
Definition lhazcab.h:102
char cbCFFolder
Definition lhazcab.h:104
MYSTR szDiskNext
Definition lhazcab.h:110
CAB書庫
Definition lhazcab.h:32
static LONGLONG SkipSize
Definition lhazcab.h:40
static const BYTE SfxCode[]
Definition lhazcab.h:35
static const ULONG MEDIA_SIZE
Definition lhazcab.h:72
static const char HEADER[4]
Definition lhazcab.h:27
@ FOLDER_THRESHOLD
Definition lhazcab.h:69
friend FNFCIGETTEMPFILE(get_temp_file)
MYBUF ZoneIdentifier
Definition lhazcab.h:42
static bool Convert(const MYSTR &name)
Definition lhazcab.cpp:1225
‾ARCCAB(void)
Definition lhazcab.cpp:439
static MYSTR ARCNAME
Definition lhazcab.h:36
MYSTR ArcName
Definition lhazcab.h:82
ARCHIVE::COMPLETE Extract(void)
Definition lhazcab.cpp:987
static vector< long > coffCabstart
Definition lhazcab.h:39
@ SETID
Definition lhazcab.h:70
bool OverWrite
Definition lhazcab.h:80
static long coffFiles
Definition lhazcab.h:38
bool SkipFlag
Definition lhazcab.h:81
friend FNFDINOTIFY(notification_function)
bool Compress(int method, int header, const WSTR &pass, const PATH &temp, const vector< LHAZPROCFILE > &v)
Definition lhazcab.cpp:1045
bool Delete(const vector< LHAZFILE * > &v)
Definition lhazcab.cpp:1170
static const TCHAR * METHODS[]
Definition lhazcab.h:34
static LONGLONG SkipSfxCode(MYFILE &file)
Definition lhazcab.cpp:1178
PATH Temp
Definition lhazcab.h:76
long Total_uncompressed_size
Definition lhazcab.h:78
@ CAB_TOTAL_BYTES_LIMIT
Definition lhazcab.h:34
friend FNFCISTATUS(progress)
vector< const WSTR * > Ext
Definition lhazcab.h:79
long Total_compressed_size
Definition lhazcab.h:77
static bool IsArchiveSfxCab(int size, const char *buf)
Definition lhazcab.cpp:1212
Definition lhazarc.h:25
COMPLETE
Definition lhazarc.h:55
TYPE
Definition lhazarc.h:28
Definition lhazprocfile.h:11
Definition lhaztreeview.h:18
Archive
¥ type v
Definition lhazregs.h:21
Definition lhazbz2.h:17