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 "mystr.h"
13 #include "fdi.h"
14 #include "fci.h"
15 #include "lhazarc.h"
16 
17 using std::vector;
18 
19 class LHAZPROCFILE;
20 class PATH;
21 
22 namespace gui {
23 
24 class LHAZTREEVIEW;
25 
26 } // namespace gui
27 
28 /*************************************************************************/
31 class ARCCAB : public ARCHIVE {
32 public:
33  enum { CAB_TOTAL_BYTES_LIMIT = 0x7FFF8000 };
34  //
35  static MYSTR ARCNAME;
36  static const char HEADER[4];
37  static long coffFiles;
38  static vector<long> coffCabstart;
39  static LONGLONG SkipSize;
40  //
41  // 自己解凍書庫に変換
42  static bool Convert(const MYSTR& name);
43  static LONGLONG SkipSfxCode(MYFILE& file);
44  static bool IsArchiveSfxCab(int size, const char* buf);
45  //
46  // 全解凍用コンストラクタ
47  ARCCAB(HWND hwnd, const WSTR& name, TYPE type);
48  // 閲覧用コンストラクタ
49  ARCCAB(HWND hwnd, const WSTR& name, TYPE type, const WSTR& filter, gui::LHAZTREEVIEW* treeview);
50  // デストラクタ
51  ‾ARCCAB(void);
52  // 全解凍
53  bool Extract(bool verify, const WSTR& temp, const WSTR& password);
54  // 個別解凍
55  bool Extract(const WSTR& temp);
56  // 圧縮
57  bool Compress(int method, int header, const WSTR& pass, const PATH& temp, const vector<LHAZPROCFILE>& v);
58  // 個別削除
59  bool Delete(const vector<LHAZFILE*>& v);
60  //
61  friend FNFCIGETTEMPFILE(get_temp_file);
62  friend FNFCISTATUS(progress);
63  friend FNFDINOTIFY(notification_function);
64 
65 private:
66  enum { FOLDER_THRESHOLD = 900000 };
67  enum { SETID = 0x1204 };
68  //
69  static const ULONG MEDIA_SIZE;
70  static const TCHAR* METHODS[];
71  static const BYTE SfxCode[];
72  //
73  PATH Temp;
76  vector<const WSTR*> Ext;
77  bool OverWrite;
78  bool SkipFlag;
79  MYSTR ArcName;
80  //
81  class CFHEADER {
82  public:
83  CFHEADER(void);
84  ‾CFHEADER(void);
85  bool Get(MYFILE& fp);
86  //
87  char signature[4];
88  long reserved1;
89  long cbCabinet;
90  long reserved2;
91  long coffFiles;
92  long reserved3;
95  short cFolders;
96  short cFiles;
97  short flags;
98  short setID;
99  short iCabinet;
100  unsigned short cbCFHeader;
102  char cbCFData;
103  char* abReserve;
105  MYSTR szDiskPrev;
107  MYSTR szDiskNext;
108  private:
109  static const unsigned short cfhdrPREV_CABINET;
110  static const unsigned short cfhdrNEXT_CABINET;
111  static const unsigned short cfhdrRESERVE_PRESENT;
112  };
113  //
114  class CFFOLDER {
115  public:
116  CFFOLDER(void);
117  ‾CFFOLDER(void);
118  //
119  bool Get(MYFILE& fp, unsigned char cbCFFolder);
120  //
122  short cCFData;
124  char* abReserve;
125  };
126  //
127  class CFFILE {
128  public:
129  CFFILE(void);
130  ‾CFFILE(void);
131  //
132  const MYSTR& GetName(void) const { return szName; }
133  bool Get(MYFILE& fp);
134  //
135  long cbFile;
137  short iFolder;
138  short date;
139  short time;
140  short attribs;
141  static const short ifoldCONTINUED_FROM_PREV;
142  static const short ifoldCONTINUED_TO_NEXT;
143  static const short ifoldCONTINUED_PREV_AND_NEXT;
144  private:
145  MYSTR szName;
146  };
147  //
148  ARCHIVE::COMPLETE Extract(void);
149 
150 };
COMPLETE
Definition: lhazarc.h:53
Archive.
TYPE
Definition: lhazarc.h:28
static const short ifoldCONTINUED_TO_NEXT
Definition: lhazcab.h:142
short cCFData
Definition: lhazcab.h:122
unsigned short cbCFHeader
Definition: lhazcab.h:100
MYSTR ArcName
Definition: lhazcab.h:79
static MYSTR ARCNAME
Definition: lhazcab.h:35
long Total_compressed_size
Definition: lhazcab.h:74
FNFCIGETTEMPFILE(get_temp_file)
Definition: lhazcab.cpp:864
short iCabinet
Definition: lhazcab.h:99
PATH Temp
Definition: lhazcab.h:73
short typeCompress
Definition: lhazcab.h:123
long cbFile
Definition: lhazcab.h:135
Definition: lhazarc.h:25
Definition: lhazbz2.h:17
then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file
Definition: LICENSE.txt:110
short time
Definition: lhazcab.h:139
static long coffFiles
Definition: lhazcab.h:37
static const ULONG MEDIA_SIZE
Definition: lhazcab.h:69
long cbCabinet
Definition: lhazcab.h:89
long uoffFolderStart
Definition: lhazcab.h:136
short cFiles
Definition: lhazcab.h:96
and that you are informed that you can do these things To protect your we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it For if you distribute copies of the whether gratis or for a you must give the recipients all the rights that we gave you You must make sure that receive or can get the source code If you link other code with the you must provide complete object files to the so that they can relink them with the library after making changes to the library and recompiling it And you must show them these terms so they know their rights We protect your rights with a two step method
Definition: copying.txt:35
FNFDINOTIFY(notification_function)
Definition: lhazcab.cpp:643
static const unsigned short cfhdrPREV_CABINET
Definition: lhazcab.h:109
long reserved1
Definition: lhazcab.h:88
static const short ifoldCONTINUED_PREV_AND_NEXT
Definition: lhazcab.h:143
static LONGLONG SkipSize
Definition: lhazcab.h:39
char cbCFData
Definition: lhazcab.h:102
CAB書庫
Definition: lhazcab.h:31
MYSTR szDiskNext
Definition: lhazcab.h:107
MYSTR szDiskPrev
Definition: lhazcab.h:105
FNFCISTATUS(progress)
Definition: lhazcab.cpp:887
Definition: lhaztreeview.h:18
short date
Definition: lhazcab.h:138
vector< const WSTR * > Ext
Definition: lhazcab.h:76
static vector< long > coffCabstart
Definition: lhazcab.h:38
short iFolder
Definition: lhazcab.h:137
Definition: lhazcab.h:127
long reserved2
Definition: lhazcab.h:90
const MYSTR & GetName(void) const
Definition: lhazcab.h:132
static const short ifoldCONTINUED_FROM_PREV
Definition: lhazcab.h:141
機能テストを実施するためのディレクトリです. *概要 Git Bash上で一部またはすべてのテストを自動的に実行することができます. *実行方法 call_test shを実行すると,配下に存在する全てのテストを順次実行します. 各テストケースのtest shを実行すると,そのテストだけが実行されます. call_test sh[-v 2][-a 86][-k][-r][types...] test sh[-v 2][-a 86][-k][types...] v
Definition: README.txt:18
long coffCabstart
Definition: lhazcab.h:121
bool SkipFlag
Definition: lhazcab.h:78
char * abReserve
Definition: lhazcab.h:124
Definition: lhazcab.h:114
char cbCFFolder
Definition: lhazcab.h:101
long coffFiles
Definition: lhazcab.h:91
MYSTR szName
Definition: lhazcab.h:145
short flags
Definition: lhazcab.h:97
short attribs
Definition: lhazcab.h:140
Definition: lhazprocfile.h:11
static const unsigned short cfhdrNEXT_CABINET
Definition: lhazcab.h:110
char * abReserve
Definition: lhazcab.h:103
MYSTR szCabinetNext
Definition: lhazcab.h:106
bool OverWrite
Definition: lhazcab.h:77
short setID
Definition: lhazcab.h:98
Definition: lhazcab.h:81
long Total_uncompressed_size
Definition: lhazcab.h:75
short cFolders
Definition: lhazcab.h:95
MYSTR szCabinetPrev
Definition: lhazcab.h:104
char versionMinor
Definition: lhazcab.h:93
long reserved3
Definition: lhazcab.h:92
static const unsigned short cfhdrRESERVE_PRESENT
Definition: lhazcab.h:111
char versionMajor
Definition: lhazcab.h:94