1 /* |
1 /* |
2 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of "Eclipse Public License v1.0" |
5 * under the terms of "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
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: |
|
15 * |
8 * |
16 */ |
9 * Initial Contributors: |
17 |
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
18 |
17 |
19 #ifndef C_WIDGETSTORAGEHANDLER_H |
18 #ifndef C_WIDGETSTORAGEHANDLER_H |
20 #define C_WIDGETSTORAGEHANDLER_H |
19 #define C_WIDGETSTORAGEHANDLER_H |
21 |
20 |
22 class CCaStorageProxy; |
21 class CCaStorageProxy; |
23 class CCaWidgetDescription; |
22 class CCaWidgetDescription; |
|
23 class CCaWidgetScannerParser; |
24 |
24 |
25 // INCLUDES |
25 // INCLUDES |
26 #include <e32base.h> |
26 #include <e32base.h> |
27 #include <usif/scr/scr.h> |
27 #include <usif/scr/scr.h> |
28 #include "cawidgetdescription.h" |
28 #include "cawidgetdescription.h" |
74 void AddL( const CCaWidgetDescription* aWidget ); |
72 void AddL( const CCaWidgetDescription* aWidget ); |
75 |
73 |
76 /** |
74 /** |
77 * Updates widget in storage. |
75 * Updates widget in storage. |
78 * @param aWidget widget to be updated |
76 * @param aWidget widget to be updated |
|
77 * @param aEntryId entry of widget in db |
79 */ |
78 */ |
80 void UpdateL( const CCaWidgetDescription* aWidget, TUint aEntryId ); |
79 void UpdateL( const CCaWidgetDescription* aWidget, TUint aEntryId ); |
81 |
80 |
82 /** |
81 /** |
83 * Add/Updates widgets in DB |
82 * Add/Updates widgets in DB |
86 void AddWidgetsL( const RWidgetArray& aWidgets ); |
85 void AddWidgetsL( const RWidgetArray& aWidgets ); |
87 |
86 |
88 /** |
87 /** |
89 * Removes widgets from DB |
88 * Removes widgets from DB |
90 */ |
89 */ |
91 void RemoveWidgetsL( ) ; |
90 void RemoveWidgetsL(); |
92 |
91 |
93 /** |
92 /** |
94 * Fetch widgets from content storage |
93 * Fetch widgets from content storage |
95 */ |
94 */ |
96 void FetchWidgetsL( ); |
95 void FetchWidgetsL(); |
97 |
96 |
98 /** |
97 /** |
99 * Add widget to download collection |
98 * Add widget to download collection |
100 * @param aEntry entry containing widget information |
99 * @param aEntry entry containing widget information |
101 */ |
100 */ |
110 /** |
109 /** |
111 * Clear missing flag for an entry. |
110 * Clear missing flag for an entry. |
112 * @param aWidget widget. |
111 * @param aWidget widget. |
113 */ |
112 */ |
114 void ClearVisibleFlagL( const CCaWidgetDescription* aWidget ); |
113 void ClearVisibleFlagL( const CCaWidgetDescription* aWidget ); |
115 |
114 |
116 /** |
115 /** |
117 * Set localizations for widget in db |
116 * Set localizations for widget in db |
118 * @param aWidget widget. |
117 * @param aWidget widget. |
119 * @param aEntryId of widget. |
118 * @param aEntryId of widget. |
120 */ |
119 */ |
121 void SetLocalizationsL( const CCaWidgetDescription* aWidget, |
120 void SetLocalizationsL( const CCaWidgetDescription* aWidget, TInt aEntryId ); |
122 TInt aEntryId ); |
|
123 |
121 |
124 private: |
122 private: |
125 |
123 |
126 /** |
124 /** |
127 * C++ default constructor. |
125 * C++ default constructor. |
143 * Adds or updates component id attribute in entry based on SCR provided data |
141 * Adds or updates component id attribute in entry based on SCR provided data |
144 * @param aPackageUid uid of the package which the widget represented by aEntry |
142 * @param aPackageUid uid of the package which the widget represented by aEntry |
145 * is delivered with |
143 * is delivered with |
146 * @param aEntry widget entry being updated with component id attribute. |
144 * @param aEntry widget entry being updated with component id attribute. |
147 */ |
145 */ |
148 void UpdateComponentIdL( const TDesC& aManifestFilePathName, |
146 void UpdateComponentIdL( const TDesC& aManifestFilePathName, |
149 CCaInnerEntry& aEntry ) const; |
147 CCaInnerEntry& aEntry ) const; |
150 |
|
151 |
148 |
152 private: |
149 private: |
153 // Data |
150 // Data |
154 |
151 |
155 /* |
152 /* |
165 /* |
162 /* |
166 * Widgets. Own. |
163 * Widgets. Own. |
167 */ |
164 */ |
168 RWidgetArray iWidgets; |
165 RWidgetArray iWidgets; |
169 |
166 |
170 /* |
167 /** |
171 * Indexes updated during last add operation. Own. |
168 * Pointer to a parser object. Own |
172 */ |
169 */ |
173 RArray<TInt> iUpdatedIndexes; |
170 CCaWidgetScannerParser* iParser; |
174 |
|
175 |
171 |
176 Usif::RSoftwareComponentRegistry iSoftwareRegistry; |
172 Usif::RSoftwareComponentRegistry iSoftwareRegistry; |
177 }; |
173 }; |
178 |
174 |
179 #endif // C_WIDGETSTORAGEHANDLER_H |
175 #endif // C_WIDGETSTORAGEHANDLER_H |