|
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 the License "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: Manages the feed related views and implements the FeedsViewBridge. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef FEEDS_CLIENT_UTILITIES_H |
|
20 #define FEEDS_CLIENT_UTILITIES_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <BrCtlSpecialLoadObserver.h> |
|
24 |
|
25 #include "Preferences.h" |
|
26 #include "FeedsWaitDialog.h" |
|
27 #include "FeedsFileSearchAgent.h" |
|
28 #include "CommonConstants.h" |
|
29 #include "FeedsInterface.h" |
|
30 #include "FeedsMap.h" |
|
31 #include "Transaction.h" |
|
32 // CONSTANTS |
|
33 |
|
34 // MACROS |
|
35 |
|
36 // DATA TYPES |
|
37 |
|
38 // FUNCTION PROTOTYPES |
|
39 |
|
40 // FORWARD DECLARATIONS |
|
41 class CAknViewAppUi; |
|
42 class CEikMenuPane; |
|
43 class MApiProvider; |
|
44 class CFeedsFolderView; |
|
45 class CFeedsTopicView; |
|
46 class CFeedsFeedView; |
|
47 class CBrowserGotoPane; |
|
48 |
|
49 // CLASS DECLARATION |
|
50 |
|
51 |
|
52 /** |
|
53 * Manages the feed related views and implements the FeedsViewBridge. |
|
54 * @lib FeedsViewBridge.lib |
|
55 * @since 3.1 |
|
56 */ |
|
57 class CFeedsClientUtilities: public CBase, |
|
58 public MPreferencesObserver, |
|
59 public MFeedsWaitDialogListener, |
|
60 public MFeedsFileSearchAgentCallback, |
|
61 public MFeedsApiObserver |
|
62 { |
|
63 public: // Constructors and destructor |
|
64 |
|
65 static CFeedsClientUtilities* NewL( CAknViewAppUi& aAppUI, MApiProvider& aApiProvider ); |
|
66 |
|
67 /** |
|
68 * Destructor. |
|
69 */ |
|
70 ~CFeedsClientUtilities(); |
|
71 |
|
72 public: // from MPreferencesObserver |
|
73 |
|
74 /** |
|
75 * Derived classes should implement this method, and act accordingly. |
|
76 */ |
|
77 void HandlePreferencesChangeL( const TPreferencesEvent aEvent, |
|
78 TPreferencesValues& aValues, |
|
79 TBrCtlDefs::TBrCtlSettings aSettingType ); |
|
80 |
|
81 public: //From MFeedsApiObserver |
|
82 /** |
|
83 * This function is called by CFeedsInterface class whenever |
|
84 * request is completed |
|
85 * |
|
86 * @param aTrans Pointer to current transaction class |
|
87 * @param aEvent event related to this call. |
|
88 */ |
|
89 virtual void RequestCompleted(CTransaction* aTrans,TInt aEvent); |
|
90 |
|
91 public: |
|
92 /** |
|
93 * Request to create a network connection. |
|
94 * |
|
95 * @since 7.1 |
|
96 * @param aConnectionPtr A pointer to the new connection. If NULL, the |
|
97 * proxy filter will automatically create a network connection. |
|
98 * @param aSockSvrHandle A handle to the socket server. |
|
99 * @param aNewConn A flag if a new connection was created. If the |
|
100 * connection is not new, proxy filter optimization will not |
|
101 * read the proxy again from CommsBd. |
|
102 * @param aBearerType The bearer type of the new connection |
|
103 * @return void |
|
104 */ |
|
105 void NetworkConnectionNeededL( TInt* aConnectionPtr, TInt& aSockSvrHandle, |
|
106 TBool& aNewConn, TApBearerType& aBearerType ); |
|
107 |
|
108 public: |
|
109 |
|
110 /** |
|
111 * Set Browser prefs to Feed engine |
|
112 * @since 3.1 |
|
113 * @param aValues Browser preferences |
|
114 * @return void |
|
115 */ |
|
116 void SetPreferencesToFeedL( const TPreferencesValues& aValues ); |
|
117 |
|
118 /** |
|
119 * Load Url in new window |
|
120 * |
|
121 * @since 3.1 |
|
122 * @return void. |
|
123 */ |
|
124 void LoadUrlL( const TDesC& aUrl ); |
|
125 |
|
126 /** |
|
127 * Shows the folder view, loading the folder list from the FeedsServer if need be. |
|
128 * |
|
129 * @since 3.1 |
|
130 * @param aCalledFromView to recored from which view this was invoked. Default value |
|
131 * is BrowserBookmarksViewId if this argument is not specified. |
|
132 * @return void. |
|
133 */ |
|
134 void ShowFolderViewL(TUid aCalledFromView = KUidBrowserBookmarksViewId); |
|
135 |
|
136 /** |
|
137 * Shows the topic view, loading the given feed associated with the given |
|
138 * folder item. |
|
139 * |
|
140 * @since 3.1 |
|
141 * @return void. |
|
142 */ |
|
143 void ShowTopicViewL(const CFeedsEntity& aFolderItem); |
|
144 |
|
145 /** |
|
146 * Shows the folder view and subscribes to the given feed. |
|
147 * |
|
148 * @since 3.1 |
|
149 * @param aTitle The feed's title. |
|
150 * @param aUrl The feed's url. |
|
151 * @return void. |
|
152 */ |
|
153 void SubscribeToL(const TDesC& aTitle, const TDesC& aUrl); |
|
154 |
|
155 /** |
|
156 * Returns the feed related mime-types. This makes |
|
157 * for a clean way to pass downloaded feeds content from the client to the FeedsServer |
|
158 * (via CFeedsClientUtilities::HandleFeedL). |
|
159 * |
|
160 * @since 3.1 |
|
161 * @return An array of supported mime-types. |
|
162 */ |
|
163 TPtrC SupportedMimeTypesL(); |
|
164 |
|
165 /** |
|
166 * Returns Feeds Server related settings. |
|
167 * |
|
168 * @since 3.1 |
|
169 * @return Feeds Server related settings. |
|
170 */ |
|
171 TInt FeedsServerSettingsL(TFeedsServerSetting& aSetting); |
|
172 |
|
173 /** |
|
174 * Sets Feeds Server related settings. |
|
175 * |
|
176 * @since 3.1 |
|
177 * @param aNewSettings The new settings. |
|
178 * @return void. |
|
179 */ |
|
180 void SetFeedsServerSettingsL(const TFeedsServerSetting& aNewSetting); |
|
181 |
|
182 /** |
|
183 * Sets a Browser Control related settings. These settings are directly passed to all |
|
184 * Browser Control instances used by the CFeedsViewBridge. As such see the Browser |
|
185 * Control documentation for infomation about the settings. |
|
186 * |
|
187 * @since 3.1 |
|
188 * @param aSetting The setting to update |
|
189 * @param aValue The new value of the setting |
|
190 * @return void. |
|
191 */ |
|
192 void SetBrowserControlSettingL(TUint aSetting, TUint aValue); |
|
193 |
|
194 /** |
|
195 * Called by RequestHandlerCompleted when the root FolderItem is either ready or an error occured. |
|
196 * |
|
197 * @since 3.1 |
|
198 * @param aStatus The result code of the FetchRootFolderItemL method. |
|
199 * @param aTrans The type of transaction that was made |
|
200 * @return void. |
|
201 */ |
|
202 void FolderItemRequestCompleted(TInt aStatus, CTransaction::TTransactionType aTrans=CTransaction::ENone); |
|
203 |
|
204 /** |
|
205 * Leaving method which is called by FolderItemRequestCompleted |
|
206 * |
|
207 * @since 3.2 |
|
208 * @param aStatus The result code of the FetchRootFolderItemL method. |
|
209 * @param aTrans The type of transaction that was made |
|
210 * @return void. |
|
211 */ |
|
212 void FolderItemRequestCompletedL(TInt aStatus, CTransaction::TTransactionType aTransType=CTransaction::ENone); |
|
213 |
|
214 /** |
|
215 * Called by RequestHandlerCompleted when the FolderItem has changed. The client |
|
216 * should request an updated copy from the server. |
|
217 * |
|
218 * @since 3.1 |
|
219 * @return void. |
|
220 */ |
|
221 void FolderItemChanged() {}; |
|
222 |
|
223 /** |
|
224 * Called by RequestHandlerCompleted when the asynchronous request is complete. |
|
225 * |
|
226 * @since 3.1 |
|
227 * @pram aStatus The completion status code. |
|
228 * @return void. |
|
229 */ |
|
230 void FeedRequestCompleted(TInt aStatus); |
|
231 |
|
232 /** |
|
233 * Leaving method which is called from FeedRequestCompleted |
|
234 * |
|
235 * @since 3.2 |
|
236 * @pram aStatus The completion status code. |
|
237 * @return void. |
|
238 */ |
|
239 void FeedRequestCompletedL(TInt aStatus); |
|
240 |
|
241 /** |
|
242 * Notifies the observer that the feed has changed. This method is called |
|
243 * when the feed is updated by the feeds server. |
|
244 * |
|
245 * @since 3.1 |
|
246 * @return void. |
|
247 */ |
|
248 void FeedChanged() {}; |
|
249 |
|
250 /** |
|
251 * Notifies the observer that the feed's item status has changed. |
|
252 * This method is called when __another__ client updates the feed's |
|
253 * item status (via UpdateFeedItemStatusL). |
|
254 * |
|
255 * @since 3.1 |
|
256 * @return void. |
|
257 */ |
|
258 void FeedItemStatusChanged() {}; |
|
259 |
|
260 |
|
261 public: // From MWaitDialogListener |
|
262 /** |
|
263 * Called when the user presses the cancel button. |
|
264 * |
|
265 * @since 3.0 |
|
266 * @return void. |
|
267 */ |
|
268 void DialogDismissedL(); |
|
269 |
|
270 |
|
271 public: // New Methods. |
|
272 /** |
|
273 * Searches for a FolderItem with the given name. If "this" |
|
274 * isn't a folder it only checks whether or not it matches |
|
275 * the given name. If "this" is a folder it also checks |
|
276 * all embedded items |
|
277 * |
|
278 * @since 7.1 |
|
279 * @param aName The title of the feed |
|
280 * @param aFolder The folder to be searched |
|
281 * @return void. |
|
282 */ |
|
283 |
|
284 const CFeedsEntity* Search(const TDesC& aName,const CFeedsEntity& aFolder) const; |
|
285 /** |
|
286 * Searches for a FolderItem with the given id. If "this" |
|
287 * isn't a folder it only checks whether or not it matches |
|
288 * the given id. If "this" is a folder it also checks |
|
289 * all embedded items |
|
290 * |
|
291 * @since 7.1 |
|
292 * @param aFolderItemId The id of the folder item. |
|
293 * @param aFolder The folder to be searched |
|
294 * @return void. |
|
295 */ |
|
296 |
|
297 const CFeedsEntity* Search(TInt aFolderItemId,const CFeedsEntity& aFolder) const; |
|
298 |
|
299 /** |
|
300 * Get the root folder from the Feeds server. |
|
301 * |
|
302 * @since 3.1 |
|
303 * @return void. |
|
304 */ |
|
305 void FetchRootFolderL(); |
|
306 |
|
307 /** |
|
308 * Add a new folder item. |
|
309 * |
|
310 * @since 3.1 |
|
311 * @param aTitle The title of the item. |
|
312 * @param aUrl The url of the item. |
|
313 * @param aIsFolder True if this is a folder. |
|
314 * @param aParent The parent folder. |
|
315 * @param aFreq The frequency for auto updating. |
|
316 * @return void. |
|
317 */ |
|
318 void AddFolderItemL(const TDesC& aTitle, const TDesC& aUrl, |
|
319 TBool aIsFolder, const CFeedsEntity& aParent, TInt aFreq); |
|
320 |
|
321 /** |
|
322 * Change the folder item. If this is a folder then KNullDesC |
|
323 * should be passed to the aUrl argument. |
|
324 * |
|
325 * @since 3.1 |
|
326 * @param aFolderItem The item to update. |
|
327 * @param aTitle The item's title.. |
|
328 * @param aUrl The item's url or KNullDesC. |
|
329 * @param aFreq The frequency for auto updating. |
|
330 * @return void |
|
331 */ |
|
332 void ChangeFolderItemL(CFeedsEntity& aFolderItem, |
|
333 const TDesC& aTitle, const TDesC& aUrl, TInt aFreq); |
|
334 |
|
335 /** |
|
336 * Delete the folder items. |
|
337 * |
|
338 * @since 3.1 |
|
339 * @param aFolderItem The folder item that's being deleted. |
|
340 * @return void |
|
341 */ |
|
342 void DeleteFolderItemsL(RPointerArray<const CFeedsEntity>& aFolderItems); |
|
343 |
|
344 /** |
|
345 * Move the folder items to a different parent. |
|
346 * |
|
347 * @since 3.1 |
|
348 * @param aFolderItem The folder item that's being moved. |
|
349 * @param aParent The folder item's new parent. |
|
350 * @return void |
|
351 */ |
|
352 void MoveFolderItemsToL(RPointerArray<const CFeedsEntity>& aFolderItems, |
|
353 const CFeedsEntity& aParent); |
|
354 |
|
355 /** |
|
356 * Move the folder item to a different index. |
|
357 * |
|
358 * @since 3.1 |
|
359 * @param aFolderItem The folder item that's being moved. |
|
360 * @param aIndex The new index of the folder item (within its parent). |
|
361 * @return void |
|
362 */ |
|
363 void MoveFolderItemsL(RPointerArray<const CFeedsEntity>& aFolderItems, |
|
364 TInt aIndex); |
|
365 |
|
366 /** |
|
367 * Get the given feed from the Feeds server. |
|
368 * |
|
369 * @since 3.1 |
|
370 * @param aFeedUrl The id of the feed to fetch. |
|
371 * @param aForceUpdate When true the server will ignore the cache. |
|
372 * @param aNoCache When true the server will not cache the feed. |
|
373 * @return void. |
|
374 */ |
|
375 void FetchFeedL(const CFeedsEntity& aFeedEntity, TBool aForceUpdate = EFalse, |
|
376 TBool aNoCache = EFalse); |
|
377 |
|
378 /** |
|
379 * Updates the feed with the given id. |
|
380 * |
|
381 * @since 3.1 |
|
382 * @param aFeedId The id of the feed to update. |
|
383 * @return void. |
|
384 */ |
|
385 void UpdateFeedL(const CFeedsEntity& aFeedEntity); |
|
386 |
|
387 /** |
|
388 * Updates the given feeds in the background. |
|
389 * |
|
390 * @since 3.1 |
|
391 * @param aFolderItems The feeds to update. |
|
392 * @return void. |
|
393 */ |
|
394 void UpdateFolderItemsL(const RPointerArray<const CFeedsEntity>& |
|
395 aFolderItems); |
|
396 |
|
397 /** |
|
398 * Updates all of feeds in the background. |
|
399 * |
|
400 * @since 3.1 |
|
401 * @return void. |
|
402 */ |
|
403 void UpdateFolderItemsL(); |
|
404 |
|
405 /** |
|
406 * Handle the menu "Import Feeds" command. This will kick off the search |
|
407 * for OMPL feeds files stored on the phone. Control will return via the |
|
408 * FeedsFileSearchComplete callback. |
|
409 * |
|
410 * @since 3.2 |
|
411 * @return void. |
|
412 */ |
|
413 void ImportFeedsL(); |
|
414 |
|
415 /** |
|
416 * Given a filepath on the filesystem, begin import feeds from the file path |
|
417 * This will set up the path and flags and allow the feeds folder to be |
|
418 * activated before the import actually takes place. |
|
419 * |
|
420 * @since 3.2 |
|
421 * @return void |
|
422 * @param a filesystem path to import from |
|
423 */ |
|
424 void BeginImportOPMLFeedsFileL( TFileName& aFilepath ); |
|
425 |
|
426 /** |
|
427 * Handle the menu "Export Feeds" command |
|
428 * once items have been selected and a name chosen. |
|
429 * |
|
430 * @since 3.2 |
|
431 * @return void |
|
432 * @param folder items to export and a name to export to |
|
433 */ |
|
434 void ExportFeedsL(RPointerArray<const CFeedsEntity>& aFolderItems, const TDesC &aExportFileName); |
|
435 |
|
436 /** |
|
437 * Shows the folder view. |
|
438 * |
|
439 * @since 3.1 |
|
440 * @return void. |
|
441 */ |
|
442 void ShowFolderViewLocalL(); |
|
443 |
|
444 /** |
|
445 * Shows the topic view. |
|
446 * |
|
447 * @since 3.1 |
|
448 * @param aInitialItem The initial item to show. |
|
449 * @return void. |
|
450 */ |
|
451 void ShowTopicViewLocalL(TInt aInitialItem); |
|
452 |
|
453 /** |
|
454 * Shows the feed view. |
|
455 * |
|
456 * @since 3.1 |
|
457 * @param aInitialItem The initial item to show. |
|
458 * @return void. |
|
459 */ |
|
460 void ShowFeedViewLocalL(TInt aInitialItem); |
|
461 |
|
462 |
|
463 /** |
|
464 * Returns the current root folder. |
|
465 * |
|
466 * @since 3.1 |
|
467 * @return The current root folder.. |
|
468 */ |
|
469 const CFeedsEntity* CurrentRootFolder() ; |
|
470 |
|
471 /** |
|
472 * Returns the current feed. |
|
473 * |
|
474 * @since 3.1 |
|
475 * @return The current feed. |
|
476 */ |
|
477 CFeedsEntity* CurrentFeed() ; |
|
478 |
|
479 /** |
|
480 * Add a menu item to the given menu. |
|
481 * |
|
482 * @since 3.1 |
|
483 * @param aMenuPane The menu to add the item to. |
|
484 * @param aCommand The item's command. |
|
485 * @param aTitleId The item's title resouce-id. |
|
486 * @return void. |
|
487 */ |
|
488 void AddItemL(CEikMenuPane& aMenuPane, TInt aCommand, TInt aTitleId); |
|
489 |
|
490 /** |
|
491 * Add a sub-menu to the given menu. |
|
492 * |
|
493 * @since 3.1 |
|
494 * @param aMenuPane The menu to add the item to. |
|
495 * @param aCommand The cascade's command. |
|
496 * @param aTitleId The item's title resouce-id. |
|
497 * @param aCascade The cascade's resource id. |
|
498 * @return void. |
|
499 */ |
|
500 void AddCascadeL(CEikMenuPane& aMenuPane, TInt aCommand, |
|
501 TInt aTitleId, TInt aCascade); |
|
502 |
|
503 /** |
|
504 * Sets the item's status (read/unread/new). |
|
505 * |
|
506 * @since 3.1 |
|
507 * @param aItemIndex The index of the item to change. |
|
508 * @param aStatus The new status. |
|
509 * @return void. |
|
510 */ |
|
511 void SetItemStatusL(CFeedsEntity* aItem, TFeedItemStatus aStatus); |
|
512 |
|
513 /** |
|
514 * Returns the item's status (read/unread/new). |
|
515 * |
|
516 * @since 3.1 |
|
517 * @param aItemIndex The index of the item to change. |
|
518 * @return The status. |
|
519 */ |
|
520 TFeedItemStatus ItemStatus(TInt aItemIndex); |
|
521 |
|
522 /** |
|
523 * Writes the item status out to the server. |
|
524 * |
|
525 * @since 3.1 |
|
526 * @return Void. |
|
527 */ |
|
528 void ItemStatusWriteToServerL(); |
|
529 |
|
530 /** |
|
531 * Returns the Favicon to the given url or NULL if one isn't found. |
|
532 * |
|
533 * @since 3.1 |
|
534 * @param aUrl The url of the Favicon. |
|
535 * @return The associated Favicon or NULL. |
|
536 */ |
|
537 CGulIcon* FaviconL(const TDesC& aUrl); |
|
538 |
|
539 /** |
|
540 * Connect to the server. |
|
541 * |
|
542 * @since 3.1 |
|
543 * @param aGetRootFolder If true the root folder is also fetched. |
|
544 * @return Void |
|
545 */ |
|
546 void ConnectToServerL(TBool aGetRootFolder = ETrue); |
|
547 |
|
548 /** |
|
549 * Disconnect from the server. |
|
550 * |
|
551 * @since 3.1 |
|
552 * @return Void |
|
553 */ |
|
554 void DisconnectFromServer(); |
|
555 |
|
556 /** |
|
557 * Since the folder list isn't updated after it is fetched the FeedsClientUtilities |
|
558 * tracks the last update times for feeds the user visits in the current session. |
|
559 * This method returns the "last updated" timestamp of the given item. |
|
560 * |
|
561 * @since 3.1 |
|
562 * @param aItem The folder item to get the last updated time. |
|
563 * @return The timestamp. |
|
564 */ |
|
565 TTime FeedUpdatedTime(const CFeedsEntity& aItem); |
|
566 |
|
567 /** |
|
568 * Resets the "last updated" cache. |
|
569 * |
|
570 * @since 3.1 |
|
571 * @return Void. |
|
572 */ |
|
573 void ResetFeedUpdateTime(); |
|
574 |
|
575 /** |
|
576 * Update the feed's "last updated" value in the cache. |
|
577 * |
|
578 * @since 3.1 |
|
579 * @param aFeed The feed to udpate the last updated time. |
|
580 * @return Void. |
|
581 */ |
|
582 void UpdateFeedUpdatedTimeL(const CFeedsEntity& aFeed); |
|
583 |
|
584 /** |
|
585 * Initialize context-sensitive menu. |
|
586 * @param aResourceId Resource id of the menu pane. |
|
587 * @param aMenuPane Menu pane object being initialized. |
|
588 */ |
|
589 void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane ); |
|
590 |
|
591 /** |
|
592 * Processes commands. |
|
593 * |
|
594 * @since 3.1 |
|
595 * @param aViewId the view that calls this. |
|
596 * @param aCommand the command to process. |
|
597 * @return void. |
|
598 */ |
|
599 void HandleCommandL(TUid aViewId, TInt aCommand); |
|
600 |
|
601 /** |
|
602 * Sets Feeds Server related settings. |
|
603 * |
|
604 * @since 3.1 |
|
605 * @return void. |
|
606 */ |
|
607 void DisconnectManualUpdateConnectionL(); |
|
608 |
|
609 /** |
|
610 * Disconnect connection used by FeedsView |
|
611 * |
|
612 * @since 3.1 |
|
613 * @return void. |
|
614 */ |
|
615 void DisconnectFeedsViewL(); |
|
616 |
|
617 /** |
|
618 * Set the View Id that called Feeds |
|
619 * |
|
620 * @since 3.1 |
|
621 * @param View id of the view Feeds was called from. |
|
622 */ |
|
623 void SetCalledFromView(TUid aViewId); |
|
624 |
|
625 /** |
|
626 * Get the View Id that called Feeds |
|
627 * |
|
628 * @since 3.1 |
|
629 * @return the view id Feeds was called from. |
|
630 */ |
|
631 TUid CalledFromView(); |
|
632 |
|
633 public: // from MFeedsFileSearchAgentCallback |
|
634 /** |
|
635 * Callback to this class when the search agent CActive had |
|
636 * completed its searching for feeds files |
|
637 * |
|
638 * @since 3.2 |
|
639 * @return void |
|
640 * @param the number of files found |
|
641 */ |
|
642 |
|
643 void FeedsFileSearchCompleteL(TInt aCount); |
|
644 |
|
645 private: // New Methods. |
|
646 /** |
|
647 * C++ default constructor. aName and |
|
648 * aSourceUrl are adopted by this method. |
|
649 */ |
|
650 CFeedsClientUtilities(CAknViewAppUi& aAppUI, MApiProvider& iApiProvider); |
|
651 |
|
652 /** |
|
653 * By default Symbian 2nd phase constructor is private. |
|
654 */ |
|
655 void ConstructL(); |
|
656 |
|
657 /** |
|
658 * Ensures that the views and the connection to the FeedsServer are ready. |
|
659 * |
|
660 * @since 3.1 |
|
661 * @param aGetRootFolder If true the root folder is also fetched. |
|
662 * @return void. |
|
663 */ |
|
664 void LazyInitL(TBool aGetRootFolder); |
|
665 |
|
666 /** |
|
667 * Show a server error. |
|
668 * |
|
669 * @since 3.1 |
|
670 * @param aStatus The status code. |
|
671 * @param aRequestType The type of request that was made |
|
672 * @return void. |
|
673 */ |
|
674 void ShowServerError(TInt aStatus, CTransaction::TTransactionType aRequestType = CTransaction::ENone); |
|
675 |
|
676 /** |
|
677 * Init a menu item |
|
678 * @since 3.1 |
|
679 * @param aMenuPane Menu pane to be initialized |
|
680 * @param aCommandId The command ID |
|
681 * @param aResourceId The resource ID |
|
682 * @param aCascadeId The cascade ID |
|
683 * @param aFlags Flags |
|
684 * @return void |
|
685 */ |
|
686 void InitMenuItemL( CEikMenuPane* aMenuPane, |
|
687 TInt aCommandId, |
|
688 TInt aResourceId, |
|
689 TInt aCascadeId = 0, |
|
690 TInt aFlags = 0 ); |
|
691 |
|
692 /** |
|
693 * Send the OPML using the Send UI |
|
694 * |
|
695 * @since 3.2 |
|
696 * @param void. |
|
697 * @return void. |
|
698 */ |
|
699 void SendOPMLFileL(void); |
|
700 |
|
701 /** |
|
702 * Returns the INITIAL status of each of the items in the feed. |
|
703 * The caller can then modify the values and call RFeed::UpdateFeedItemStatusL |
|
704 * to request the feeds server to update the feed's item status. |
|
705 * |
|
706 * @since 7.1 |
|
707 * @param aItemIds The ids of the items. |
|
708 * @param aItemStatus The coresponding status of each of the items in the feed. |
|
709 * @param aFeed The feed whose items' status has to fetched. |
|
710 * @return void. |
|
711 */ |
|
712 void ItemStatusL(RArray<TInt>& aItemIds, |
|
713 RArray<TFeedItemStatus>& aItemStatus, const CFeedsEntity& aFeed) const; |
|
714 |
|
715 |
|
716 |
|
717 private: // Data. |
|
718 CAknViewAppUi& iAppUI; |
|
719 MApiProvider& iApiProvider; |
|
720 TUid iNextViewId; |
|
721 TBool iIsUpdatingFeed; |
|
722 CFeedsWaitDialog* iWaitDialog; |
|
723 HBufC* iEnteredURL; |
|
724 TInt iCbaResource; |
|
725 |
|
726 CFeedsFolderView* iFolderView; // not owned |
|
727 CFeedsTopicView* iTopicView; // not owned |
|
728 CFeedsFeedView* iFeedView; // not owned |
|
729 |
|
730 TBool iIsConnected; |
|
731 RArray<TInt> iItemIds; |
|
732 RArray<TFeedItemStatus> iItemStatus; |
|
733 RArray<TFeedItemStatus> iItemStatusOrig; |
|
734 |
|
735 HBufC* iMimeTypes; |
|
736 |
|
737 RArray<TInt> iFeedUpdateTimeIds; |
|
738 RArray<TTime> iFeedUpdateTimeTimestamps; |
|
739 |
|
740 TDesC* iPendingFolderItemTitle; |
|
741 TDesC* iPendingFolderItemUrl; |
|
742 TDesC* iExportFileName; |
|
743 |
|
744 CFeedsFileSearchAgent* iSearchAgent; |
|
745 CArrayFixFlat<TBrCtlSelectOptionData>* iSearchOptList; |
|
746 |
|
747 TFileName iTempOPMLImportFilePath; |
|
748 TBool iFeedImportRequested; |
|
749 TBool iRequestCanceled; |
|
750 TUid iCalledFromView; |
|
751 TBool iIsWaitDialogDisplayed; |
|
752 RFeedsInterface iFeedsInterface; |
|
753 CTransaction::TTransactionType iCurrentRequest; |
|
754 CTransaction::TTransactionType iCanceledRequest; |
|
755 }; |
|
756 |
|
757 #endif // FEEDS_CLIENT_UTILITIES_H |
|
758 |
|
759 // End of File |