author | Sebastian Brannstrom <sebastianb@symbian.org> |
Sun, 31 Oct 2010 14:14:17 +0000 | |
branch | RCL_3 |
changeset 320 | e3ec8e436951 |
parent 318 | a231cc388498 |
child 323 | 0bd524909716 |
permissions | -rw-r--r-- |
2 | 1 |
/* |
2 |
* Copyright (c) 2007-2010 Sebastian Brannstrom, Lars Persson, EmbedDev AB |
|
3 |
* |
|
4 |
* All rights reserved. |
|
5 |
* This component and the accompanying materials are made available |
|
6 |
* under the terms of the License "Eclipse Public License v1.0" |
|
7 |
* which accompanies this distribution, and is available |
|
8 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
9 |
* |
|
10 |
* Initial Contributors: |
|
11 |
* EmbedDev AB - initial contribution. |
|
12 |
* |
|
13 |
* Contributors: |
|
14 |
* |
|
15 |
* Description: |
|
16 |
* |
|
17 |
*/ |
|
18 |
||
19 |
#ifndef PODCASTFEEDVIEWH |
|
20 |
#define PODCASTFEEDVIEWH |
|
21 |
||
22 |
#include "FeedEngine.h" |
|
23 |
#include "PodcastListView.h" |
|
24 |
#include "ImageHandler.h" |
|
25 |
||
26 |
class CPodcastFeedViewUpdater; |
|
27 |
||
28 |
enum TOpmlState { |
|
29 |
EOpmlIdle, |
|
30 |
EOpmlImporting, |
|
31 |
EOpmlSearching |
|
32 |
}; |
|
33 |
||
34 |
class CPodcastFeedView : public CPodcastListView, public MEikListBoxObserver, |
|
35 |
public MFeedEngineObserver, public MImageHandlerCallback |
|
36 |
{ |
|
37 |
public: |
|
38 |
static CPodcastFeedView* NewL(CPodcastModel& aPodcastModel); |
|
39 |
static CPodcastFeedView* NewLC(CPodcastModel& aPodcastModel); |
|
40 |
~CPodcastFeedView(); |
|
41 |
void UpdateItemL(TInt aIndex); |
|
35
66c5303f3610
A ton of CodeScanner fixes (high issues) - but not all
Brendan Donegan <brendand@symbian.org>
parents:
25
diff
changeset
|
42 |
void CheckResumeDownloadL(); |
13 | 43 |
void UpdateToolbar(TBool aVisible=ETrue); |
45
56d4e0784e5d
Nicer way to handle back from queue view to feed/show view
teknolog
parents:
36
diff
changeset
|
44 |
TBool ViewingShows(); |
292
655dbce90b70
Added check and query when downloading is active while trying to exit
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
45 |
|
655dbce90b70
Added check and query when downloading is active while trying to exit
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
46 |
void CheckConfirmExit(); |
311
606f4f6babf6
Fix so feed icons are scaled nicely when rotating view
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
306
diff
changeset
|
47 |
void ShowItem(TUint aUid); |
292
655dbce90b70
Added check and query when downloading is active while trying to exit
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
48 |
|
2 | 49 |
protected: |
50 |
void ConstructL(); |
|
51 |
CPodcastFeedView(CPodcastModel& aPodcastModel); |
|
52 |
||
53 |
/** |
|
54 |
* Returns views id, intended for overriding by sub classes. |
|
55 |
* @return id for this view. |
|
56 |
*/ |
|
57 |
TUid Id() const; |
|
58 |
||
59 |
/** |
|
60 |
* Handles a view activation and passes the message of type |
|
61 |
* @c aCustomMessageId. This function is intended for overriding by |
|
62 |
* sub classes. This function is called by @c AknViewActivatedL(). |
|
63 |
* @param aPrevViewId Specifies the view previously active. |
|
64 |
* @param aCustomMessageId Specifies the message type. |
|
65 |
* @param aCustomMessage The activation message. |
|
66 |
*/ |
|
67 |
void DoActivateL(const TVwsViewId& aPrevViewId, |
|
68 |
TUid aCustomMessageId, |
|
69 |
const TDesC8& aCustomMessage); |
|
70 |
||
71 |
/** |
|
72 |
* View deactivation function intended for overriding by sub classes. |
|
73 |
* This function is called by @c AknViewDeactivated(). |
|
74 |
*/ |
|
75 |
void DoDeactivate(); |
|
76 |
||
77 |
||
78 |
// From // MEikListBoxObserverClass |
|
79 |
void HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aEventType); |
|
80 |
void UpdateListboxItemsL(); |
|
81 |
||
82 |
// from MFeedEngineObserver |
|
83 |
void FeedDownloadStartedL(TFeedState aState,TUint aFeedUid); |
|
84 |
void FeedDownloadFinishedL(TFeedState aState,TUint aFeeidUid, TInt aError); |
|
85 |
void FeedUpdateAllCompleteL(TFeedState aState); |
|
7 | 86 |
void OpmlParsingComplete(TInt aError, TUint aNumFeedsImported); |
2 | 87 |
|
88 |
/** |
|
89 |
* Command handling function intended for overriding by sub classes. |
|
90 |
* Default implementation is empty. |
|
91 |
* @param aCommand ID of the command to respond to. |
|
92 |
*/ |
|
93 |
void HandleCommandL(TInt aCommand); |
|
94 |
void FeedInfoUpdatedL(TUint aFeedUid); |
|
95 |
void UpdateFeedInfoDataL(CFeedInfo* aFeedInfo, TInt aIndex, TBool aIsUpdating = EFalse); |
|
96 |
void UpdateFeedInfoStatusL(TUint aFeedUid, TBool aIsUpdating = EFalse); |
|
97 |
||
98 |
// from MProgressDialogCallback |
|
99 |
void DialogDismissedL(TInt aButtonId); |
|
100 |
||
101 |
// from MImageHandlerCallback |
|
93
bbf5c5204844
We always build the static version of sqlite for now. Further improvements for signaling when icons has been generated so these can be used in the feedview
Lars Persson <lars.persson@embeddev.se>
parents:
32
diff
changeset
|
102 |
void ImageOperationCompleteL(TInt aError, TUint aHandle, CPodcastModel& aPodcastModel); |
2 | 103 |
private: |
104 |
void FormatFeedInfoListBoxItemL(CFeedInfo& aFeedInfo, TBool aIsUpdating = EFalse); |
|
105 |
void HandleAddFeedL(); |
|
207
9fef0425017e
Bug 2865 - added option to search or enter URL for feed adding
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
163
diff
changeset
|
106 |
void HandleAddFeedUrlL(); |
9fef0425017e
Bug 2865 - added option to search or enter URL for feed adding
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
163
diff
changeset
|
107 |
void HandleAddFeedSearchL(); |
2 | 108 |
void HandleEditFeedL(); |
109 |
void HandleRemoveFeedL(); |
|
110 |
void HandleImportFeedsL(); |
|
111 |
void HandleExportFeedsL(); |
|
112 |
void HandleUpdateFeedL(); |
|
5 | 113 |
void GetFeedErrorText(TDes &aErrorMessage, TInt aErrorCode); |
117
3b59b88b089e
Fixed Code Scanner L-issues; Further improvements to HTTP robustness
teknolog
parents:
100
diff
changeset
|
114 |
void OpmlParsingCompleteL(TInt aError, TUint aNumFeedsImported); |
314
e7776f6a2198
Dual listbox solution now mostly works
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
313
diff
changeset
|
115 |
void LoadIcons(); |
2 | 116 |
private: |
117 |
CPodcastModel& iPodcastModel; |
|
306
a36dc474cae2
Fix so "Updating..." text remains for a feed when list is updated
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
292
diff
changeset
|
118 |
TUint iFeedUpdating; |
2 | 119 |
HBufC* iFeedsFormat; |
120 |
HBufC* iNeverUpdated; |
|
121 |
CPodcastFeedViewUpdater* iUpdater; |
|
122 |
TBool iFirstActivateAfterLaunch; |
|
123 |
TOpmlState iOpmlState; |
|
25
ae65906c4347
Added feature to show showsview on return from queue if previously showed showsview
teknolog
parents:
13
diff
changeset
|
124 |
TBool iViewingShows; |
100
e0fc52a5df4d
Update to keep features from merge.
Lars Persson <lars.persson@embeddev.se>
parents:
99
diff
changeset
|
125 |
RArray<TInt> iFeedIdForIconArray; |
2 | 126 |
}; |
127 |
||
128 |
#endif // PODCASTFEEDVIEWH |