Lhaz
lhaziscab.h
[詳解]
1 /*==========================================================================*/
2 /* Lhaz InstallShield CAB Interface lhaz@chitora.jp */
3 /*==========================================================================*/
4 #ifdef FEATURE_ISCAB
5 #ifndef _LHAZISCAB_H
6 #define _LHAZISCAB_H
7 
8 #include <windows.h>
9 #include <vector>
10 #include "mystr.h"
11 #include "lhazarc.h"
12 #include "../i6comp/rsa/global.h"
13 #include "../i6comp/rsa/md5.h"
14 #include "../i6comp/is6cab.h"
15 #include "../i6comp/i6comp.h"
16 #include "../i6comp/zdatas.h"
17 
18 #define CSFG_MAX 512
19 #define CSCP_MAX 512
20 
21 #define CRYPT_NONE 0
22 //#define CRYPT_DECRYPT 1
23 //#define CRYPT_ENCRYPT 2
24 
25 using namespace std;
26 
27 class PATH;
28 
29 class ARCISCAB : public ARCHIVE {
30 
31 public:
32  static bool IsArchiveISCab(const WSTR& name);
33  //
34  ARCISCAB(HWND hwnd, const WSTR& name, TYPE type);
35  ARCISCAB(HWND hwnd, const WSTR& name, TYPE type, const WSTR& filter);
36  ‾ARCISCAB(void);
37  // 全解凍
38  bool Extract(bool verify, const WSTR& temp, const WSTR& password);
39  // 部分解凍
40  bool Extract(const WSTR& temp);
41  bool Compress(int method, int header, const WSTR& pass, const PATH& temp, const vector<LHAZPROCFILE>& v);
42  bool Delete(const vector<LHAZFILE*>& v);
43 
44 private:
45  static const char _MonthDays[];
46  //
47  static const DWORD FileAttrVals[4];
48  static const char FileAttrChars[];
49  //
50  MYSTR pCabPattern;
51  LPCABDESC pCabDesc;
52  CABHEADER CabHdr;
53  DWORD cSetupTypes;
54  SETUPTYPETABLE SetupTypes;
55  FILEGROUPDESC* FileGroups[CSFG_MAX];
56  DWORD cFileGroups;
57  COMPONENTDESC* Components[CSCP_MAX];
58  DWORD cComponents;
59  DIRARRAY* Dirs;
60  FILEDESC* Files;
61  DWORD optFileGroup;
62  BOOL optRecurseSubdirs;
63  BOOL optFGasDir;
64  LPCABFILELIST pFileList;
65  DWORD FileCount;
66  BOOL optMatchWithDirs;
67  char* pZBuf;
68  //
69  static MYSTR GetName(const char* pPattern, int voln, const char* ext);
70  static MYSTR GetCabPattern(const MYSTR& cabfile);
71  static int __cdecl CompareFileGroups(const FILEGROUPDESC** pFG1, const FILEGROUPDESC** pFG2);
72  static int ZDCALLBACK ReadData(void* pbuf, DWORD* size, RWHANDLES* pHnd);
73  static int ZDCALLBACK WriteData(void* pbuf, DWORD* size, RWHANDLES* pHnd);
74  static int ZDCALLBACK ExtractRead(void* pbuf, DWORD* size, EXTRACTINFO* pHnd);
75  //
76  bool Constructor(const MYSTR& name);
77  ARCHIVE::COMPLETE ExtractSub(bool ext_part);
78  bool TranslateFileGroup(void);
79  DWORD GetGroupIndexByName(LPSTR GroupName);
80  void CabBasedFileList(LPSTR CabParam, LPSTR DiskParam);
81  void ListFiles(void);
82  LPDIRARRAY DirsArrayBuild(DFTABLE DFT);
83  void InitZData(void* pHnds, ZDProcess proc);
84  FILEHANDLE OpenCabReadHeader(int VolN, LPSTR ext, int Access, LPCABHEADER pHdr);
85  FILEHANDLE OpenCabForAccess(int VolN, LPSTR ext, int Access);
86  FILEHANDLE OpenForAccess(LPSTR filename, int Access);
87  void ReadCabHeader(FILEHANDLE hCab, LPCABHEADER pHdr);
88  void SetFileAttrs(char* filename, DWORD Attrs);
89  void SetFileDosTime(char* filename, WORD DosDate, WORD DosTime);
90  time_t DosTimeToFileTime(WORD DosDate, WORD DosTime);
91  void ExtractData(EXTRACTINFO* pHnd, DWORD Crypt);
92  void DecryptBuffer(BYTE* Buf, DWORD dwTran, DWORD* pTotal);
93  FILEHANDLE OpenForWrite(LPSTR filename, int Flags);
94  void CreateDir(LPSTR dirname);
95  BOOL DirExists(LPSTR DirName);
96  void TranslateChars(char* str, char* sFrom, char* sTo);
97  BOOL WildMatch(LPSTR str, LPSTR wildcard);
98  LPSTR GetGroupNameByFile(DWORD Index);
99  BOOL IsMask(LPSTR str);
100  BOOL TranslatePathToGroup(LPSTR* ppPath, LPSTR* ppFGName);
101  long strtolong(char* str);
102  void DosTimeToSysTime(WORD DosDate, WORD DosTime, SYSTIME* systime);
103  LPFILEGROUPDESC GetGroupByFile(DWORD index);
104 
105 };
106 #endif // _LHAZISCAB_H
107 #endif // FEATURE_ISCAB
COMPLETE
Definition: lhazarc.h:53
Archive.
Definition: lhazarc.h:25
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
機能テストを実施するためのディレクトリです. *概要 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