|
1 // fzip.h |
|
2 // |
|
3 // Copyright (c) 2008 - 2010 Accenture. All rights reserved. |
|
4 // This component and the accompanying materials are made available |
|
5 // under the terms of the "Eclipse Public License v1.0" |
|
6 // which accompanies this distribution, and is available |
|
7 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 // |
|
9 // Initial Contributors: |
|
10 // Accenture - Initial contribution |
|
11 // |
|
12 |
|
13 #ifndef __FZIP_H__ |
|
14 #define __FZIP_H__ |
|
15 |
|
16 #include "fzipup.h" |
|
17 |
|
18 class CZipFile; |
|
19 class CZipFileMember; |
|
20 class CZipFileMemberIterator; |
|
21 class CCmdZip : public CCommandBase |
|
22 { |
|
23 public: |
|
24 static CCommandBase* NewLC(); |
|
25 ~CCmdZip(); |
|
26 |
|
27 // from CCommandBase |
|
28 virtual const TDesC& Name() const; |
|
29 virtual void DoRunL(); |
|
30 virtual void ArgumentsL(RCommandArgumentList& aArguments); |
|
31 virtual void OptionsL(RCommandOptionList& aOptions); |
|
32 private: |
|
33 CCmdZip(); |
|
34 void CreateArchiveL(); |
|
35 void ExpandArchiveL(); |
|
36 |
|
37 // gz (gzip) format support |
|
38 void CreateGzArchiveL(); |
|
39 void ExpandGzArchiveL(); |
|
40 |
|
41 // zip format support |
|
42 void CreateZipArchiveL(); |
|
43 void ExpandZipArchiveL(); |
|
44 void ExtractZipFileL(CZipFile& aZip, const CZipFileMember& aMember); |
|
45 void AddFileL(CZipItUp& aZipArchive, const TFileName2& aFile); |
|
46 private: |
|
47 // user-specified command-line options and arguments |
|
48 TBool iVerbose; |
|
49 TBool iUnzip; |
|
50 TBool iRecurse; |
|
51 enum TType |
|
52 { |
|
53 EZip, |
|
54 EGZip |
|
55 } iCompressionType; |
|
56 TFileName2 iArchive; |
|
57 TFileName2 iUnzipPath; |
|
58 RArray<TFileName2> iFileToZip; |
|
59 }; |
|
60 |
|
61 |
|
62 #endif // __FZIP_H__ |