1 /* |
|
2 * Copyright (c) 2005 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: CXcapCacheIndex |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #ifndef __XCAPCACHEINDEX_H__ |
|
22 #define __XCAPCACHEINDEX_H__ |
|
23 |
|
24 // INCLUDES |
|
25 #include <s32file.h> |
|
26 #include <e32std.h> |
|
27 #include "CommonDefines.h" |
|
28 |
|
29 //FORWARD DECLARATIONs |
|
30 class CXcapCacheIndexEntry; |
|
31 |
|
32 // CLASS DECLARATION |
|
33 NONSHARABLE_CLASS( CXcapCacheIndex ) : public CBase |
|
34 { |
|
35 public: // Constructors and destructor |
|
36 |
|
37 /** |
|
38 * Returns Cache Index |
|
39 * @return Created Cache Index |
|
40 */ |
|
41 static CXcapCacheIndex* NewL(); |
|
42 |
|
43 /** |
|
44 * Returns the MIME type of the messages |
|
45 * @return TPtrC8 The MIME type of the messages |
|
46 */ |
|
47 static TInt Compare( const CXcapCacheIndexEntry& aFirst, |
|
48 const CXcapCacheIndexEntry& aSecond ); |
|
49 |
|
50 /** |
|
51 * Returns the MIME type of the messages |
|
52 * @return TPtrC8 The MIME type of the messages |
|
53 */ |
|
54 TInt UpdateIndexL( const CXcapCacheIndexEntry* aEntry ); |
|
55 |
|
56 /** |
|
57 * Returns the MIME type of the messages |
|
58 * @return TPtrC8 The MIME type of the messages |
|
59 */ |
|
60 CXcapCacheIndexEntry* Entry( TInt aIndex ) const; |
|
61 |
|
62 /** |
|
63 * Returns the MIME type of the messages |
|
64 * @return TPtrC8 The MIME type of the messages |
|
65 */ |
|
66 TInt EntryCount() const; |
|
67 |
|
68 /** |
|
69 * Returns the MIME type of the messages |
|
70 * @return TPtrC8 The MIME type of the messages |
|
71 */ |
|
72 void SortEntriesL(); |
|
73 |
|
74 /** |
|
75 * Returns the MIME type of the messages |
|
76 * @return TPtrC8 The MIME type of the messages |
|
77 */ |
|
78 void RemoveEntry( TInt aIndex ); |
|
79 |
|
80 /** |
|
81 * Returns the MIME type of the messages |
|
82 * @return TPtrC8 The MIME type of the messages |
|
83 */ |
|
84 void StoreCacheDataL(); |
|
85 |
|
86 /** |
|
87 * Returns the MIME type of the messages |
|
88 * @return TPtrC8 The MIME type of the messages |
|
89 */ |
|
90 ~CXcapCacheIndex(); |
|
91 |
|
92 private: |
|
93 |
|
94 /** |
|
95 * Returns the MIME type of the messages |
|
96 * @return TPtrC8 The MIME type of the messages |
|
97 */ |
|
98 CXcapCacheIndex(); |
|
99 |
|
100 /** |
|
101 * Returns the MIME type of the messages |
|
102 * @return TPtrC8 The MIME type of the messages |
|
103 */ |
|
104 void ConstructL(); |
|
105 |
|
106 /** |
|
107 * Returns the MIME type of the messages |
|
108 * @return TPtrC8 The MIME type of the messages |
|
109 */ |
|
110 RFile InitialiseIndexL(); |
|
111 |
|
112 /** |
|
113 * Returns the MIME type of the messages |
|
114 * @return TPtrC8 The MIME type of the messages |
|
115 */ |
|
116 void ReadEntriesL( TPtr8& aIndexData ); |
|
117 |
|
118 private: // Data |
|
119 |
|
120 RPointerArray<CXcapCacheIndexEntry> iEntryList; |
|
121 }; |
|
122 |
|
123 #endif |
|
124 |
|
125 // End of File |
|