|
1 /* |
|
2 * Copyright (c) 2006 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 the License "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: Definition of CHttpCacheObserver |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef CHTTPCACHEOBSERVER_H |
|
19 #define CHTTPCACHEOBSERVER_H |
|
20 |
|
21 // INCLUDES |
|
22 #include <e32base.h> |
|
23 #include <f32file.h> |
|
24 |
|
25 // CONSTANTS |
|
26 |
|
27 // MACROS |
|
28 |
|
29 // DATA TYPES |
|
30 |
|
31 // FUNCTION PROTOTYPES |
|
32 |
|
33 // FORWARD DECLARATIONS |
|
34 class CHttpCacheHandler; |
|
35 |
|
36 // CLASS DECLARATION |
|
37 |
|
38 /** |
|
39 * |
|
40 * @lib |
|
41 * @since 3.1 |
|
42 */ |
|
43 NONSHARABLE_CLASS(CHttpCacheObserver) : public CActive |
|
44 { |
|
45 public: // Constructors and destructor |
|
46 |
|
47 /** |
|
48 * Two-phased constructor. |
|
49 * @since 3.1 |
|
50 * @param |
|
51 * @param |
|
52 * @return CacheHandler object. |
|
53 */ |
|
54 static CHttpCacheObserver* NewL( const HBufC* aDirectory, const HBufC* aIndexFile, |
|
55 CHttpCacheHandler* aHttpCacheHandler); |
|
56 |
|
57 /** |
|
58 * Destructor. |
|
59 */ |
|
60 virtual ~CHttpCacheObserver(); |
|
61 |
|
62 public: // new functions |
|
63 void StartObserver(); |
|
64 |
|
65 public: // from base class CActive |
|
66 void RunL(); |
|
67 TInt RunError(TInt aError); |
|
68 void DoCancel(); |
|
69 |
|
70 private: |
|
71 |
|
72 /** |
|
73 * Construct. |
|
74 * @since 3.1 |
|
75 * @param |
|
76 * @param |
|
77 * @return CacheObserver object. |
|
78 */ |
|
79 CHttpCacheObserver(CHttpCacheHandler* aHttpCacheHandler); |
|
80 |
|
81 /** |
|
82 * By default Symbian 2nd phase constructor is private. |
|
83 */ |
|
84 void ConstructL(const HBufC* aDirectory, const HBufC* aIndexFile); |
|
85 |
|
86 private: // Data |
|
87 |
|
88 // name and path of index file |
|
89 HBufC* iFileName; // owned |
|
90 RFs iFsSession; // not owned |
|
91 CHttpCacheHandler* iHttpCacheHandler; |
|
92 }; |
|
93 |
|
94 #endif // CHTTPCACHEOBSERVER_H |
|
95 |
|
96 // End of File |