author | teknolog |
Sun, 04 Apr 2010 21:47:56 +0100 | |
changeset 115 | d87e984bd8b8 |
parent 13 | f58e3c482bd9 |
child 116 | a2e43aa1ad11 |
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 PODCASTQUEUEVIEWH |
|
20 |
#define PODCASTQUEUEVIEWH |
|
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 CPodcastQueueView : public CPodcastListView, public MEikListBoxObserver, |
|
34 |
public MFeedEngineObserver, public MShowEngineObserver |
|
35 |
{ |
|
36 |
public: |
|
37 |
static CPodcastQueueView* NewL(CPodcastModel& aPodcastModel); |
|
38 |
static CPodcastQueueView* NewLC(CPodcastModel& aPodcastModel); |
|
39 |
~CPodcastQueueView(); |
|
13 | 40 |
void UpdateToolbar(TBool aVisible=ETrue); |
2 | 41 |
protected: |
42 |
void ConstructL(); |
|
43 |
CPodcastQueueView(CPodcastModel& aPodcastModel); |
|
44 |
||
45 |
/** |
|
46 |
* Returns views id, intended for overriding by sub classes. |
|
47 |
* @return id for this view. |
|
48 |
*/ |
|
49 |
TUid Id() const; |
|
50 |
||
51 |
/** |
|
52 |
* Handles a view activation and passes the message of type |
|
53 |
* @c aCustomMessageId. This function is intended for overriding by |
|
54 |
* sub classes. This function is called by @c AknViewActivatedL(). |
|
55 |
* @param aPrevViewId Specifies the view previously active. |
|
56 |
* @param aCustomMessageId Specifies the message type. |
|
57 |
* @param aCustomMessage The activation message. |
|
58 |
*/ |
|
59 |
void DoActivateL(const TVwsViewId& aPrevViewId, |
|
60 |
TUid aCustomMessageId, |
|
61 |
const TDesC8& aCustomMessage); |
|
62 |
||
63 |
/** |
|
64 |
* View deactivation function intended for overriding by sub classes. |
|
65 |
* This function is called by @c AknViewDeactivated(). |
|
66 |
*/ |
|
67 |
void DoDeactivate(); |
|
68 |
||
69 |
void UpdateListboxItemsL(); |
|
70 |
||
71 |
// From // MEikListBoxObserverClass |
|
72 |
void HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aEventType); |
|
73 |
// From showengine observer |
|
74 |
void ShowListUpdatedL(); |
|
75 |
void ShowDownloadUpdatedL(TInt aBytesOfCurrentDownload, TInt aBytesTotal); |
|
76 |
void DownloadQueueUpdatedL(TInt aDownloadingShows, TInt aQueuedShows); |
|
77 |
void ShowDownloadFinishedL(TUint aShowUid, TInt aError) ; |
|
78 |
// from MFeedEngineObserver |
|
79 |
void FeedDownloadStartedL(TFeedState aState,TUint aFeedUid); |
|
80 |
void FeedDownloadFinishedL(TFeedState aState,TUint aFeedUid, 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 |
TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType); |
|
91 |
||
92 |
void UpdateFeedUpdateStateL(); |
|
93 |
void UpdateShowItemL(TUint aUid, TInt aSizeDownloaded); |
|
94 |
void UpdateShowItemDataL(CShowInfo* aShowInfo,TInt aIndex, TInt aSizeDownloaded = KErrNotFound); |
|
95 |
void DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane); |
|
96 |
void FormatShowInfoListBoxItemL(CShowInfo& aShowInfo, TInt aSizeDownloaded = 0); |
|
97 |
||
98 |
private: |
|
99 |
void GetShowIcons(CShowInfo* aShowInfo, TInt& aIconIndex); |
|
100 |
||
101 |
private: |
|
102 |
||
103 |
CPodcastModel& iPodcastModel; |
|
104 |
TBool iProgressAdded; |
|
105 |
TInt iLastImageHandlerError; |
|
106 |
TBool iSetTitlebarImage; |
|
115
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
13
diff
changeset
|
107 |
TBool iEatQueueUpdate; |
2 | 108 |
}; |
109 |
||
110 |
#endif // PODCASTSHOWSVIEWH |
|
111 |
||
112 |