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