|
1 // Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // cexamplecpimanager.h |
|
15 // |
|
16 // |
|
17 |
|
18 #ifndef __CEXAMPLECPIMANAGER_H__ |
|
19 #define __CEXAMPLECPIMANAGER_H__ |
|
20 |
|
21 // System Includes |
|
22 #include <http/mhttpcpimanager.h> |
|
23 #include <f32file.h> |
|
24 |
|
25 |
|
26 /** CExampleCpiManager is an example implementation of a CPI Manager class that |
|
27 provides the MHTTPCpiManager interface |
|
28 */ |
|
29 class CExampleCpiManager : public CBase, public MHTTPCpiManager |
|
30 { |
|
31 public: // methods |
|
32 |
|
33 IMPORT_C static CExampleCpiManager* NewL(RStringPool aStringPool); |
|
34 |
|
35 IMPORT_C ~CExampleCpiManager(); |
|
36 |
|
37 /** Enumeration defining the two different types of CPI information |
|
38 */ |
|
39 enum TCpiType |
|
40 { |
|
41 EProfile, |
|
42 EProfileDiff |
|
43 }; |
|
44 |
|
45 |
|
46 public: // methods from MHTTPCpiManager |
|
47 |
|
48 IMPORT_C virtual RPointerArray<HBufC8>& GetProfiles(); |
|
49 |
|
50 IMPORT_C virtual RPointerArray<HBufC8>& GetProfileDiffs(); |
|
51 |
|
52 |
|
53 private: // methods |
|
54 |
|
55 CExampleCpiManager(RStringPool aStringPool); |
|
56 |
|
57 void ConstructL(); |
|
58 |
|
59 void FindCpiFilesL(); |
|
60 |
|
61 void DiscoverProfilesL(); |
|
62 |
|
63 void BuildProfilesL(TEntry& aEntry, CExampleCpiManager::TCpiType aCpiType); |
|
64 |
|
65 |
|
66 private: // attributes |
|
67 |
|
68 /** String pool to be used |
|
69 */ |
|
70 RStringPool iStringPool; |
|
71 |
|
72 /** Array of CPI files |
|
73 */ |
|
74 RPointerArray<TEntry> iCpiFileList; |
|
75 |
|
76 /** Profile table |
|
77 */ |
|
78 RPointerArray<HBufC8> iProfileData; |
|
79 |
|
80 /** Profile-Diff table |
|
81 */ |
|
82 RPointerArray<HBufC8> iProfileDiffData; |
|
83 |
|
84 /** Handle to the file server |
|
85 */ |
|
86 RFs iFs; |
|
87 }; |
|
88 |
|
89 |
|
90 #endif //__CEXAMPLECPIMANAGER_H__ |