author | Lars Persson <lars.persson@embeddev.se> |
Thu, 01 Apr 2010 11:41:33 +0200 | |
changeset 66 | 41d00e97e2f7 |
parent 65 | 523e04129df6 |
parent 63 | a8538f50e2ba |
child 67 | e0fc52a5df4d |
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(); |
56d4e0784e5d
Nicer way to handle back from queue view to feed/show view
teknolog
parents:
36
diff
changeset
|
45 |
|
2 | 46 |
protected: |
47 |
void ConstructL(); |
|
48 |
CPodcastFeedView(CPodcastModel& aPodcastModel); |
|
49 |
||
50 |
/** |
|
51 |
* Returns views id, intended for overriding by sub classes. |
|
52 |
* @return id for this view. |
|
53 |
*/ |
|
54 |
TUid Id() const; |
|
55 |
||
56 |
/** |
|
57 |
* Handles a view activation and passes the message of type |
|
58 |
* @c aCustomMessageId. This function is intended for overriding by |
|
59 |
* sub classes. This function is called by @c AknViewActivatedL(). |
|
60 |
* @param aPrevViewId Specifies the view previously active. |
|
61 |
* @param aCustomMessageId Specifies the message type. |
|
62 |
* @param aCustomMessage The activation message. |
|
63 |
*/ |
|
64 |
void DoActivateL(const TVwsViewId& aPrevViewId, |
|
65 |
TUid aCustomMessageId, |
|
66 |
const TDesC8& aCustomMessage); |
|
67 |
||
68 |
/** |
|
69 |
* View deactivation function intended for overriding by sub classes. |
|
70 |
* This function is called by @c AknViewDeactivated(). |
|
71 |
*/ |
|
72 |
void DoDeactivate(); |
|
73 |
||
74 |
||
75 |
// From // MEikListBoxObserverClass |
|
76 |
void HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aEventType); |
|
77 |
void UpdateListboxItemsL(); |
|
78 |
||
79 |
// from MFeedEngineObserver |
|
80 |
void FeedDownloadStartedL(TFeedState aState,TUint aFeedUid); |
|
81 |
void FeedDownloadFinishedL(TFeedState aState,TUint aFeeidUid, TInt aError); |
|
82 |
void FeedUpdateAllCompleteL(TFeedState aState); |
|
7 | 83 |
void OpmlParsingComplete(TInt aError, TUint aNumFeedsImported); |
2 | 84 |
|
85 |
/** |
|
86 |
* Command handling function intended for overriding by sub classes. |
|
87 |
* Default implementation is empty. |
|
88 |
* @param aCommand ID of the command to respond to. |
|
89 |
*/ |
|
90 |
void HandleCommandL(TInt aCommand); |
|
91 |
void FeedInfoUpdatedL(TUint aFeedUid); |
|
92 |
void UpdateFeedInfoDataL(CFeedInfo* aFeedInfo, TInt aIndex, TBool aIsUpdating = EFalse); |
|
93 |
void UpdateFeedInfoStatusL(TUint aFeedUid, TBool aIsUpdating = EFalse); |
|
94 |
||
95 |
// from MProgressDialogCallback |
|
96 |
void DialogDismissedL(TInt aButtonId); |
|
97 |
||
98 |
// from MImageHandlerCallback |
|
60
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
|
99 |
void ImageOperationCompleteL(TInt aError, TUint aHandle, CPodcastModel& aPodcastModel); |
8 | 100 |
|
101 |
void HandleLongTapEventL( const TPoint& aPenEventLocation, const TPoint& aPenEventScreenLocation); |
|
102 |
||
2 | 103 |
private: |
104 |
void FormatFeedInfoListBoxItemL(CFeedInfo& aFeedInfo, TBool aIsUpdating = EFalse); |
|
105 |
void HandleAddFeedL(); |
|
106 |
void HandleEditFeedL(); |
|
107 |
void HandleRemoveFeedL(); |
|
108 |
void HandleImportFeedsL(); |
|
109 |
void HandleExportFeedsL(); |
|
110 |
void HandleUpdateFeedL(); |
|
5 | 111 |
void GetFeedErrorText(TDes &aErrorMessage, TInt aErrorCode); |
2 | 112 |
|
113 |
private: |
|
114 |
CPodcastModel& iPodcastModel; |
|
115 |
TBool iUpdatingAllRunning; |
|
116 |
HBufC* iFeedsFormat; |
|
117 |
HBufC* iNeverUpdated; |
|
118 |
CPodcastFeedViewUpdater* iUpdater; |
|
119 |
TBool iFirstActivateAfterLaunch; |
|
120 |
TOpmlState iOpmlState; |
|
25
ae65906c4347
Added feature to show showsview on return from queue if previously showed showsview
teknolog
parents:
13
diff
changeset
|
121 |
TBool iViewingShows; |
2 | 122 |
}; |
123 |
||
124 |
#endif // PODCASTFEEDVIEWH |