equal
deleted
inserted
replaced
30 class CHarvesterSessionAsyncHandler; |
30 class CHarvesterSessionAsyncHandler; |
31 class CHarvesterEventObserverAO; |
31 class CHarvesterEventObserverAO; |
32 class MHarvesterEventObserver; |
32 class MHarvesterEventObserver; |
33 class CHarvesterRequestActive; |
33 class CHarvesterRequestActive; |
34 class CHarvesterRequestQueue; |
34 class CHarvesterRequestQueue; |
|
35 class MHarvesterSessionObserver; |
|
36 class CHarvesterSessionWatcher; |
35 |
37 |
36 // default event interval for MHarvesterEventObserver |
38 // default event interval for MHarvesterEventObserver |
37 const TInt KHarvesterEventInterval = 20; |
39 const TInt KHarvesterEventInterval = 20; |
38 |
40 |
39 /** |
41 /** |
169 HarvesterEventObserverType aHEObserverType, |
171 HarvesterEventObserverType aHEObserverType, |
170 HarvesterEventState aHarvesterEventState, |
172 HarvesterEventState aHarvesterEventState, |
171 TInt aItemsLeft ) = 0; |
173 TInt aItemsLeft ) = 0; |
172 }; |
174 }; |
173 |
175 |
|
176 class MHarvesterSessionObserver |
|
177 { |
|
178 public: |
|
179 |
|
180 /** |
|
181 * Called to notify the observer that harvester server has been terminated, |
|
182 * thus harvester server sessions created are now invalid and new connection |
|
183 * needs to be established |
|
184 * NOTE! Cliens still have to call Close() on the session to release client side |
|
185 * resources. |
|
186 */ |
|
187 virtual void HarvesterServerTerminated() = 0; |
|
188 }; |
|
189 |
174 /** |
190 /** |
175 * Harvester client session class which provides also means to: |
191 * Harvester client session class which provides also means to: |
176 * - Pause/resume the Harvesting framework |
192 * - Pause/resume the Harvesting framework |
177 * - Fast harvest files and observe when they have been harvested |
193 * - Fast harvest files and observe when they have been harvested |
178 * - Setup observers to observe the harvesting progress |
194 * - Setup observers to observe the harvesting progress |
282 */ |
298 */ |
283 IMPORT_C void HarvestFileWithUID( const TDesC& aURI, |
299 IMPORT_C void HarvestFileWithUID( const TDesC& aURI, |
284 RArray<TItemId> &aAlbumIds, |
300 RArray<TItemId> &aAlbumIds, |
285 TBool aAddLocation, |
301 TBool aAddLocation, |
286 TUid aUid ); |
302 TUid aUid ); |
287 |
303 |
|
304 /** |
|
305 * Public method to set observer for notifications about harvester server termination. |
|
306 * Only one observer at a time is currently supported. |
|
307 * |
|
308 * @param aObserver Pointer to the observer |
|
309 */ |
|
310 IMPORT_C void AddSessionObserverL( MHarvesterSessionObserver& aObserver ); |
|
311 |
|
312 /** |
|
313 * Public method to remove harvester session observer |
|
314 */ |
|
315 IMPORT_C void RemoveSessionObserver(); |
|
316 |
288 /** |
317 /** |
289 * Requests a harvest complete event from harvester server. |
318 * Requests a harvest complete event from harvester server. |
290 * On return, aURI is the URI of the harvested file. |
319 * On return, aURI is the URI of the harvested file. |
291 * |
320 * |
292 * @param aURI Harvested image uri what server |
321 * @param aURI Harvested image uri what server |
344 |
373 |
345 /** |
374 /** |
346 * Request queue processor. |
375 * Request queue processor. |
347 */ |
376 */ |
348 CHarvesterRequestQueue* iRequestQueue; |
377 CHarvesterRequestQueue* iRequestQueue; |
|
378 |
|
379 /** |
|
380 * Harvester session observer AO. |
|
381 */ |
|
382 CHarvesterSessionWatcher* iSessionWatcher; |
349 }; |
383 }; |
350 |
384 |
351 #endif // __HARVESTER_CLIENT_H__ |
385 #endif // __HARVESTER_CLIENT_H__ |