OSDN Git Service

SquashFS,CramFS,ppmdの対応を追加。
[tpi/lychee.git] / src / plugin / 7zArc / 7zArc.h
1 /*******************************************************************************\r
2   TPI - flexible but useless plug-in framework.\r
3   Copyright (C) 2002-2009 Silky\r
4 \r
5   This library is free software; you can redistribute it and/or modify it under\r
6   the terms of the GNU Lesser General Public License as published by the Free\r
7   Software Foundation; either version 2.1 of the License, or (at your option)\r
8   any later version.\r
9 \r
10   This library is distributed in the hope that it will be useful, but WITHOUT\r
11   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or \r
12   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License\r
13   for more details.\r
14 \r
15   You should have received a copy of the GNU Lesser General Public License along\r
16   with this library; if not, write to the Free Software Foundation, Inc.,\r
17   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\r
18 \r
19   $Id$\r
20 *******************************************************************************/\r
21 \r
22 #include "StdAfx.h"\r
23 \r
24 #include "Common/IntToString.h"\r
25 #include "Common/MyInitGuid.h"\r
26 #include "Common/StringConvert.h"\r
27 \r
28 #include "Windows/DLL.h"\r
29 #include "Windows/FileDir.h"\r
30 #include "Windows/FileFind.h"\r
31 #include "Windows/FileName.h"\r
32 #include "Windows/PropVariant.h"\r
33 #include "Windows/PropVariantConversions.h"\r
34 #include "Windows/Time.h"\r
35 \r
36 #include "../../Common/FileStreams.h"\r
37 \r
38 #include "../../Archive/IArchive.h"\r
39 \r
40 #include "../../IPassword.h"\r
41 #include "../../MyVersion.h"\r
42 \r
43 //******************************************************************************\r
44 //    Defines\r
45 //******************************************************************************\r
46 \r
47 DEFINE_GUID(CLSID_CFormatZip,   0x23170F69, 0x40C1, 0x278A, 0x10, 0x00, 0x00, 0x01, 0x10, 0x01, 0x00, 0x00);\r
48 DEFINE_GUID(CLSID_CFormatBZip2, 0x23170F69, 0x40C1, 0x278A, 0x10, 0x00, 0x00, 0x01, 0x10, 0x02, 0x00, 0x00);\r
49 DEFINE_GUID(CLSID_CFormatRar,   0x23170F69, 0x40C1, 0x278A, 0x10, 0x00, 0x00, 0x01, 0x10, 0x03, 0x00, 0x00);\r
50 DEFINE_GUID(CLSID_CFormatArj,   0x23170F69, 0x40C1, 0x278A, 0x10, 0x00, 0x00, 0x01, 0x10, 0x04, 0x00, 0x00);\r
51 DEFINE_GUID(CLSID_CFormatZ,     0x23170F69, 0x40C1, 0x278A, 0x10, 0x00, 0x00, 0x01, 0x10, 0x05, 0x00, 0x00);\r
52 DEFINE_GUID(CLSID_CFormatLzh,   0x23170F69, 0x40C1, 0x278A, 0x10, 0x00, 0x00, 0x01, 0x10, 0x06, 0x00, 0x00);\r
53 DEFINE_GUID(CLSID_CFormat7z,    0x23170F69, 0x40C1, 0x278A, 0x10, 0x00, 0x00, 0x01, 0x10, 0x07, 0x00, 0x00);\r
54 DEFINE_GUID(CLSID_CFormatCab,   0x23170F69, 0x40C1, 0x278A, 0x10, 0x00, 0x00, 0x01, 0x10, 0x08, 0x00, 0x00);\r
55 DEFINE_GUID(CLSID_CFormatNsis,  0x23170F69, 0x40C1, 0x278A, 0x10, 0x00, 0x00, 0x01, 0x10, 0x09, 0x00, 0x00);\r
56 DEFINE_GUID(CLSID_CFormatLzma,  0x23170F69, 0x40C1, 0x278A, 0x10, 0x00, 0x00, 0x01, 0x10, 0x0A, 0x00, 0x00);\r
57 DEFINE_GUID(CLSID_CFormatLzma86,0x23170F69, 0x40C1, 0x278A, 0x10, 0x00, 0x00, 0x01, 0x10, 0x0B, 0x00, 0x00);\r
58 DEFINE_GUID(CLSID_CFormatXz,    0x23170F69, 0x40C1, 0x278A, 0x10, 0x00, 0x00, 0x01, 0x10, 0x0C, 0x00, 0x00);\r
59 DEFINE_GUID(CLSID_CFormatPpmd,  0x23170F69, 0x40C1, 0x278A, 0x10, 0x00, 0x00, 0x01, 0x10, 0x0D, 0x00, 0x00);\r
60 DEFINE_GUID(CLSID_CFormatSquash,0x23170F69, 0x40C1, 0x278A, 0x10, 0x00, 0x00, 0x01, 0x10, 0xD2, 0x00, 0x00);\r
61 DEFINE_GUID(CLSID_CFormatCram,  0x23170F69, 0x40C1, 0x278A, 0x10, 0x00, 0x00, 0x01, 0x10, 0xD3, 0x00, 0x00);\r
62 DEFINE_GUID(CLSID_CFormatApm,   0x23170F69, 0x40C1, 0x278A, 0x10, 0x00, 0x00, 0x01, 0x10, 0xD4, 0x00, 0x00);\r
63 DEFINE_GUID(CLSID_CFormatMslz,  0x23170F69, 0x40C1, 0x278A, 0x10, 0x00, 0x00, 0x01, 0x10, 0xD5, 0x00, 0x00);\r
64 DEFINE_GUID(CLSID_CFormatFlv,   0x23170F69, 0x40C1, 0x278A, 0x10, 0x00, 0x00, 0x01, 0x10, 0xD6, 0x00, 0x00);\r
65 DEFINE_GUID(CLSID_CFormatSwf,   0x23170F69, 0x40C1, 0x278A, 0x10, 0x00, 0x00, 0x01, 0x10, 0xD7, 0x00, 0x00);\r
66 DEFINE_GUID(CLSID_CFormatSwfc,  0x23170F69, 0x40C1, 0x278A, 0x10, 0x00, 0x00, 0x01, 0x10, 0xD8, 0x00, 0x00);\r
67 DEFINE_GUID(CLSID_CFormatNtfs,  0x23170F69, 0x40C1, 0x278A, 0x10, 0x00, 0x00, 0x01, 0x10, 0xD9, 0x00, 0x00);\r
68 DEFINE_GUID(CLSID_CFormatFat,   0x23170F69, 0x40C1, 0x278A, 0x10, 0x00, 0x00, 0x01, 0x10, 0xDA, 0x00, 0x00);\r
69 DEFINE_GUID(CLSID_CFormatMbr,   0x23170F69, 0x40C1, 0x278A, 0x10, 0x00, 0x00, 0x01, 0x10, 0xDB, 0x00, 0x00);\r
70 DEFINE_GUID(CLSID_CFormatVhd,   0x23170F69, 0x40C1, 0x278A, 0x10, 0x00, 0x00, 0x01, 0x10, 0xDC, 0x00, 0x00);\r
71 DEFINE_GUID(CLSID_CFormatPe,    0x23170F69, 0x40C1, 0x278A, 0x10, 0x00, 0x00, 0x01, 0x10, 0xDD, 0x00, 0x00);\r
72 DEFINE_GUID(CLSID_CFormatElf,   0x23170F69, 0x40C1, 0x278A, 0x10, 0x00, 0x00, 0x01, 0x10, 0xDE, 0x00, 0x00);\r
73 DEFINE_GUID(CLSID_CFormatMachO, 0x23170F69, 0x40C1, 0x278A, 0x10, 0x00, 0x00, 0x01, 0x10, 0xDF, 0x00, 0x00);\r
74 DEFINE_GUID(CLSID_CFormatUdf,   0x23170F69, 0x40C1, 0x278A, 0x10, 0x00, 0x00, 0x01, 0x10, 0xE0, 0x00, 0x00);\r
75 DEFINE_GUID(CLSID_CFormatXar,   0x23170F69, 0x40C1, 0x278A, 0x10, 0x00, 0x00, 0x01, 0x10, 0xE1, 0x00, 0x00);\r
76 DEFINE_GUID(CLSID_CFormatMub,   0x23170F69, 0x40C1, 0x278A, 0x10, 0x00, 0x00, 0x01, 0x10, 0xE2, 0x00, 0x00);\r
77 DEFINE_GUID(CLSID_CFormatHfs,   0x23170F69, 0x40C1, 0x278A, 0x10, 0x00, 0x00, 0x01, 0x10, 0xE3, 0x00, 0x00);\r
78 DEFINE_GUID(CLSID_CFormatDmg,   0x23170F69, 0x40C1, 0x278A, 0x10, 0x00, 0x00, 0x01, 0x10, 0xE4, 0x00, 0x00);\r
79 DEFINE_GUID(CLSID_CFormatCom,   0x23170F69, 0x40C1, 0x278A, 0x10, 0x00, 0x00, 0x01, 0x10, 0xE5, 0x00, 0x00);\r
80 DEFINE_GUID(CLSID_CFormatWim,   0x23170F69, 0x40C1, 0x278A, 0x10, 0x00, 0x00, 0x01, 0x10, 0xE6, 0x00, 0x00);\r
81 DEFINE_GUID(CLSID_CFormatIso,   0x23170F69, 0x40C1, 0x278A, 0x10, 0x00, 0x00, 0x01, 0x10, 0xE7, 0x00, 0x00);\r
82 DEFINE_GUID(CLSID_CFormatBkf,   0x23170F69, 0x40C1, 0x278A, 0x10, 0x00, 0x00, 0x01, 0x10, 0xE8, 0x00, 0x00);\r
83 DEFINE_GUID(CLSID_CFormatChm,   0x23170F69, 0x40C1, 0x278A, 0x10, 0x00, 0x00, 0x01, 0x10, 0xE9, 0x00, 0x00);\r
84 DEFINE_GUID(CLSID_CFormatSplit, 0x23170F69, 0x40C1, 0x278A, 0x10, 0x00, 0x00, 0x01, 0x10, 0xEA, 0x00, 0x00);\r
85 DEFINE_GUID(CLSID_CFormatRpm,   0x23170F69, 0x40C1, 0x278A, 0x10, 0x00, 0x00, 0x01, 0x10, 0xEB, 0x00, 0x00);\r
86 DEFINE_GUID(CLSID_CFormatDeb,   0x23170F69, 0x40C1, 0x278A, 0x10, 0x00, 0x00, 0x01, 0x10, 0xEC, 0x00, 0x00);\r
87 DEFINE_GUID(CLSID_CFormatCpio,  0x23170F69, 0x40C1, 0x278A, 0x10, 0x00, 0x00, 0x01, 0x10, 0xED, 0x00, 0x00);\r
88 DEFINE_GUID(CLSID_CFormatTar,   0x23170F69, 0x40C1, 0x278A, 0x10, 0x00, 0x00, 0x01, 0x10, 0xEE, 0x00, 0x00);\r
89 DEFINE_GUID(CLSID_CFormatGZip,  0x23170F69, 0x40C1, 0x278A, 0x10, 0x00, 0x00, 0x01, 0x10, 0xEF, 0x00, 0x00);\r
90 \r
91 const GUID guidList[] = {\r
92         CLSID_CFormatZip,\r
93         CLSID_CFormatBZip2,\r
94 //      CLSID_CFormatRar,\r
95 #ifdef __LINUX__\r
96         CLSID_CFormatArj,\r
97 #endif\r
98         CLSID_CFormatZ,\r
99 #ifdef __LINUX__\r
100         CLSID_CFormatLzh,\r
101 #endif\r
102         CLSID_CFormat7z,\r
103 #ifdef __LINUX__\r
104         CLSID_CFormatCab,\r
105 #endif\r
106         CLSID_CFormatNsis,\r
107         CLSID_CFormatLzma,\r
108         CLSID_CFormatLzma86,\r
109         CLSID_CFormatXz,\r
110         CLSID_CFormatPpmd,\r
111         CLSID_CFormatSquash,\r
112         CLSID_CFormatCram,\r
113         CLSID_CFormatApm,\r
114         CLSID_CFormatMslz,\r
115         CLSID_CFormatFlv,\r
116 //      CLSID_CFormatSwf,\r
117         CLSID_CFormatSwfc,\r
118         CLSID_CFormatNtfs,\r
119         CLSID_CFormatFat,\r
120         CLSID_CFormatMbr,\r
121         CLSID_CFormatVhd,\r
122 //      CLSID_CFormatPe,\r
123 //      CLSID_CFormatElf,\r
124         CLSID_CFormatMachO,\r
125         CLSID_CFormatUdf,\r
126         CLSID_CFormatXar,\r
127         CLSID_CFormatMub,\r
128         CLSID_CFormatHfs,\r
129         CLSID_CFormatDmg,\r
130         CLSID_CFormatCom,\r
131         CLSID_CFormatWim,\r
132         CLSID_CFormatIso,\r
133         CLSID_CFormatBkf,\r
134         CLSID_CFormatChm,\r
135         CLSID_CFormatSplit,\r
136 #ifdef __LINUX__\r
137         CLSID_CFormatRpm,\r
138         CLSID_CFormatDeb,\r
139         CLSID_CFormatCpio,\r
140         CLSID_CFormatTar,\r
141 #endif\r
142         CLSID_CFormatGZip\r
143 };\r
144 \r
145 //******************************************************************************\r
146 //    Structures\r
147 //******************************************************************************\r
148 \r