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;
|
|
107 |
};
|
|
108 |
|
|
109 |
#endif // PODCASTSHOWSVIEWH
|
|
110 |
|
|
111 |
|