|
1 /* |
|
2 * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "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 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Uncompress the zipped vpn policies. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef C_ZIPFILEDECOMPRESSOR_H |
|
21 #define C_ZIPFILEDECOMPRESSOR_H |
|
22 |
|
23 #include <e32base.h> |
|
24 #include <f32file.h> |
|
25 |
|
26 |
|
27 class CZipFile; |
|
28 class CZipFileMemberIterator; |
|
29 class CZipFileMember; |
|
30 |
|
31 class CZipFileDecompressor : public CActive |
|
32 { |
|
33 public: |
|
34 static CZipFileDecompressor* NewL(); |
|
35 ~CZipFileDecompressor(); |
|
36 |
|
37 void DecompressZipFile(const TDesC& aSourceFile, |
|
38 const TDesC& aTargetDir, |
|
39 TRequestStatus& aClientStatus); |
|
40 |
|
41 |
|
42 void DecompressZipFile(RFile& aSourceFile, |
|
43 const TDesC& aTargetDir, |
|
44 TRequestStatus& aClientStatus); |
|
45 |
|
46 |
|
47 void Cancel(); |
|
48 protected: |
|
49 |
|
50 void RunL(); |
|
51 void DoCancel(); |
|
52 TInt RunError(TInt aError); |
|
53 |
|
54 private: |
|
55 CZipFileDecompressor(); |
|
56 void ConstructL(); |
|
57 |
|
58 |
|
59 |
|
60 void DecompressZipFileL(RFile& aSourceFile, |
|
61 const TDesC& aTargetDir); |
|
62 |
|
63 |
|
64 void DecompressNextMemberL(CZipFileMember& aMember); |
|
65 |
|
66 |
|
67 RFs iFileServer; |
|
68 RFile iZippedFile; |
|
69 TBool iCloseZippedFile; |
|
70 TRequestStatus* iClientStatus; |
|
71 |
|
72 CZipFile* iZipFile; |
|
73 CZipFileMemberIterator *iZipFileMemberIterator; |
|
74 |
|
75 HBufC8* iUncompressedData; |
|
76 RFile iUncompressedFile; |
|
77 }; |
|
78 |
|
79 #endif //C_ZIPFILEDECOMPRESSOR_H |