author | teknolog |
Thu, 27 May 2010 17:08:58 +0100 | |
changeset 140 | 68b48f53a8ec |
parent 121 | 1cc7501102a8 |
child 151 | 17da6d3a5a4b |
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 PODCASTSHOWSVIEWH |
|
20 |
#define PODCASTSHOWSVIEWH |
|
21 |
||
22 |
#include <aknview.h> |
|
23 |
#include <aknlists.h> |
|
24 |
#include <eiklbo.h> |
|
25 |
#include <AknToolbarObserver.h> |
|
26 |
#include <AknToolbar.h> |
|
27 |
#include "ShowEngine.h" |
|
28 |
#include "FeedEngine.h" |
|
29 |
#include "PodcastModel.h" |
|
30 |
#include "Podcast.hrh" |
|
31 |
#include "PodcastListView.h" |
|
32 |
||
33 |
class CPodcastShowsView : public CPodcastListView, public MEikListBoxObserver, |
|
49
43e204e6ae2e
Fix for accidental merge regressions. Text fixes for tool tip and settings.
teknolog
parents:
32
diff
changeset
|
34 |
public MFeedEngineObserver, public MShowEngineObserver |
2 | 35 |
{ |
36 |
public: |
|
37 |
static CPodcastShowsView* NewL(CPodcastModel& aPodcastModel); |
|
38 |
static CPodcastShowsView* NewLC(CPodcastModel& aPodcastModel); |
|
39 |
~CPodcastShowsView(); |
|
13 | 40 |
void UpdateToolbar(TBool aVisible=ETrue); |
41 |
||
2 | 42 |
protected: |
43 |
void ConstructL(); |
|
44 |
CPodcastShowsView(CPodcastModel& aPodcastModel); |
|
45 |
||
46 |
/** |
|
47 |
* Returns views id, intended for overriding by sub classes. |
|
48 |
* @return id for this view. |
|
49 |
*/ |
|
50 |
TUid Id() const; |
|
51 |
||
52 |
/** |
|
53 |
* Handles a view activation and passes the message of type |
|
54 |
* @c aCustomMessageId. This function is intended for overriding by |
|
55 |
* sub classes. This function is called by @c AknViewActivatedL(). |
|
56 |
* @param aPrevViewId Specifies the view previously active. |
|
57 |
* @param aCustomMessageId Specifies the message type. |
|
58 |
* @param aCustomMessage The activation message. |
|
59 |
*/ |
|
60 |
void DoActivateL(const TVwsViewId& aPrevViewId, |
|
61 |
TUid aCustomMessageId, |
|
62 |
const TDesC8& aCustomMessage); |
|
63 |
||
64 |
/** |
|
65 |
* View deactivation function intended for overriding by sub classes. |
|
66 |
* This function is called by @c AknViewDeactivated(). |
|
67 |
*/ |
|
68 |
void DoDeactivate(); |
|
69 |
||
70 |
void UpdateListboxItemsL(); |
|
71 |
||
72 |
// From // MEikListBoxObserverClass |
|
73 |
void HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aEventType); |
|
74 |
// From showengine observer |
|
75 |
void ShowListUpdatedL(); |
|
76 |
void ShowDownloadUpdatedL(TInt aBytesOfCurrentDownload, TInt aBytesTotal); |
|
77 |
void DownloadQueueUpdatedL(TInt aDownloadingShows, TInt aQueuedShows); |
|
78 |
void ShowDownloadFinishedL(TUint aShowUid, TInt aError) ; |
|
79 |
// from MFeedEngineObserver |
|
80 |
void FeedDownloadStartedL(TFeedState aState,TUint aFeedUid); |
|
81 |
void FeedDownloadFinishedL(TFeedState aState,TUint aFeedUid, 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 |
TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType); |
|
92 |
||
93 |
void UpdateFeedUpdateStateL(); |
|
94 |
void UpdateShowItemL(TUint aUid, TInt aSizeDownloaded); |
|
95 |
void UpdateShowItemDataL(CShowInfo* aShowInfo,TInt aIndex, TInt aSizeDownloaded = KErrNotFound); |
|
96 |
void DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane); |
|
97 |
void FormatShowInfoListBoxItemL(CShowInfo& aShowInfo, TInt aSizeDownloaded = 0); |
|
98 |
||
99 |
void HandleLongTapEventL( const TPoint& aPenEventLocation, const TPoint& aPenEventScreenLocation); |
|
121
1cc7501102a8
CPodcastQueueView now inherits CPodcastShowsView instead of CPodcastListView. This removes the duplicated code between the two classes.
teknolog
parents:
107
diff
changeset
|
100 |
void GetShowIcons(CShowInfo* aShowInfo, TInt& aIconIndex); |
1cc7501102a8
CPodcastQueueView now inherits CPodcastShowsView instead of CPodcastListView. This removes the duplicated code between the two classes.
teknolog
parents:
107
diff
changeset
|
101 |
void CreateIconsL(); |
2 | 102 |
|
103 |
private: |
|
104 |
void DisplayShowInfoDialogL(); |
|
35
66c5303f3610
A ton of CodeScanner fixes (high issues) - but not all
Brendan Donegan <brendand@symbian.org>
parents:
13
diff
changeset
|
105 |
void HandleSetShowPlayedL(TBool aPlayed); |
66c5303f3610
A ton of CodeScanner fixes (high issues) - but not all
Brendan Donegan <brendand@symbian.org>
parents:
13
diff
changeset
|
106 |
void HandleDeleteShowL(); |
107
af6475fdf8d6
Improved error handling; Implemented support for more than 2 flash drives also for import/export feeds
teknolog
parents:
96
diff
changeset
|
107 |
void ImageOperationCompleteL(TInt /* aError */, TUint /* aHandle */, CPodcastModel& /* aPodcastModel */) {} |
5 | 108 |
void HandleSetShowPlayed(TBool aPlayed); |
109 |
void HandleDeleteShow(); |
|
2 | 110 |
void UpdateViewTitleL(); |
111 |
void GetShowErrorText(TDes &aErrorMessage, TInt aErrorCode); |
|
112 |
||
121
1cc7501102a8
CPodcastQueueView now inherits CPodcastShowsView instead of CPodcastListView. This removes the duplicated code between the two classes.
teknolog
parents:
107
diff
changeset
|
113 |
protected: |
2 | 114 |
|
115 |
CPodcastModel& iPodcastModel; |
|
116 |
TBool iProgressAdded; |
|
117 |
TInt iLastImageHandlerError; |
|
118 |
TBool iSetTitlebarImage; |
|
119 |
}; |
|
120 |
||
121 |
#endif // PODCASTSHOWSVIEWH |
|
122 |
||
123 |