44 // Constructors and destructor |
44 // Constructors and destructor |
45 |
45 |
46 /** |
46 /** |
47 * Two-phased constructor. |
47 * Two-phased constructor. |
48 */ |
48 */ |
49 static CCaWidgetStorageHandler* NewL( CCaStorageProxy* aStorage, |
49 static CCaWidgetStorageHandler* NewL( CCaStorageProxy* aStorage, |
50 RFs& aFs ); |
50 RFs& aFs ); |
51 static CCaWidgetStorageHandler* NewLC( CCaStorageProxy* aStorage, |
51 static CCaWidgetStorageHandler* NewLC( CCaStorageProxy* aStorage, |
52 RFs& aFs ); |
52 RFs& aFs ); |
53 |
53 |
54 /** |
54 /** |
55 * Destructor. |
55 * Destructor. |
56 */ |
56 */ |
57 virtual ~CCaWidgetStorageHandler(); |
57 virtual ~CCaWidgetStorageHandler(); |
58 |
58 |
59 /** |
59 /** |
60 * Synchronizes widgets |
60 * Synchronizes widgets |
61 * @param aWidgets widgets to synchronize |
61 * @param aWidgets widgets to synchronize |
62 */ |
62 */ |
63 void SynchronizeL( const RWidgetArray& aWidgets ); |
63 void SynchronizeL( const RWidgetArray& aWidgets ); |
64 |
64 |
65 |
65 |
66 private: |
66 private: |
67 |
67 |
68 /** |
68 /** |
69 * Adds widget to storage. |
69 * Adds widget to storage. |
70 * @param aWidget widget to be added |
70 * @param aWidget widget to be added |
71 */ |
71 */ |
72 void AddL( const CCaWidgetDescription* aWidget ); |
72 void AddL( const CCaWidgetDescription* aWidget ); |
73 |
73 |
74 /** |
74 /** |
75 * Updates widget in storage. |
75 * Updates widget in storage. |
76 * @param aWidget widget to be updated |
76 * @param aWidget widget to be updated |
77 */ |
77 */ |
78 void UpdateL( const CCaWidgetDescription* aWidget, TUint aEntryId ); |
78 void UpdateL( const CCaWidgetDescription* aWidget, TUint aEntryId ); |
79 |
79 |
80 /** |
80 /** |
81 * Add/Updates widgets in DB |
81 * Add/Updates widgets in DB |
82 * @param aWidgets widgets to add |
82 * @param aWidgets widgets to add |
83 */ |
83 */ |
84 void AddWidgetsL( const RWidgetArray& aWidgets ); |
84 void AddWidgetsL( const RWidgetArray& aWidgets ); |
85 |
85 |
86 /** |
86 /** |
87 * Removes widgets from DB |
87 * Removes widgets from DB |
88 */ |
88 */ |
89 void RemoveWidgetsL( ) ; |
89 void RemoveWidgetsL( ) ; |
90 |
90 |
91 /** |
91 /** |
92 * Fetch widgets from content storage |
92 * Fetch widgets from content storage |
93 */ |
93 */ |
94 void FetchWidgetsL( ); |
94 void FetchWidgetsL( ); |
95 |
95 |
96 /** |
96 /** |
97 * Add widget to download collection |
97 * Add widget to download collection |
98 * @param aEntry entry containing widget information |
98 * @param aEntry entry containing widget information |
99 */ |
99 */ |
100 void AddWidgetToDownloadCollectionL( const CCaInnerEntry* aEntry ); |
100 void AddWidgetToDownloadCollectionL( const CCaInnerEntry* aEntry ); |
101 |
101 |
102 /** |
102 /** |
103 * Sets missing flag for an entry |
103 * Set missing flag for an entry. |
104 * @param aWidget widget |
104 * @param aWidget widget. |
105 */ |
105 */ |
106 void SetMissingFlagL( const CCaWidgetDescription * aWidget ); |
106 void SetMissingFlagL( const CCaWidgetDescription * aWidget ); |
|
107 |
|
108 /** |
|
109 * Clear missing flag for an entry. |
|
110 * @param aWidget widget. |
|
111 */ |
|
112 void ClearVisibleFlagL( const CCaWidgetDescription* aWidget ); |
107 |
113 |
108 private: |
114 private: |
109 |
115 |
110 /** |
116 /** |
111 * C++ default constructor. |
117 * C++ default constructor. |
115 /** |
121 /** |
116 * By default Symbian 2nd phase constructor is private. |
122 * By default Symbian 2nd phase constructor is private. |
117 */ |
123 */ |
118 void ConstructL( ); |
124 void ConstructL( ); |
119 |
125 |
|
126 /** |
|
127 * Check if mass storage is not in use. |
|
128 * @return true if mass storage is not in use. |
|
129 */ |
|
130 TBool MassStorageNotInUse(); |
|
131 |
120 private: |
132 private: |
121 // Data |
133 // Data |
122 |
134 |
123 /* |
135 /* |
124 * Content Storage. Not Own |
136 * Content Storage. Not Own |
125 */ |
137 */ |
126 CCaStorageProxy* iStorage; |
138 CCaStorageProxy* iStorage; |
127 |
139 |
128 /* |
140 /* |
129 * File server. Not own |
141 * File server. Not own |
130 */ |
142 */ |
131 RFs iFs; |
143 RFs iFs; |
132 |
144 |
133 /* |
145 /* |
134 * Widgets. Own. |
146 * Widgets. Own. |
135 */ |
147 */ |
136 RWidgetArray iWidgets; |
148 RWidgetArray iWidgets; |
137 |
149 |
138 /* |
150 /* |
139 * Indexes updated during last add operation. Own. |
151 * Indexes updated during last add operation. Own. |
140 */ |
152 */ |
141 RArray<TInt> iUpdatedIndexes; |
153 RArray<TInt> iUpdatedIndexes; |
142 |
154 |
143 |
155 |
144 }; |
156 }; |
145 |
157 |
146 #endif // C_WIDGETSTORAGEHANDLER_H |
158 #endif // C_WIDGETSTORAGEHANDLER_H |
147 // End of File |
159 // End of File |