author | Sebastian Brannstrom <sebastianb@symbian.org> |
Sun, 31 Oct 2010 14:14:17 +0000 | |
branch | RCL_3 |
changeset 320 | e3ec8e436951 |
parent 318 | a231cc388498 |
child 368 | b131f7696342 |
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 PODCASTSEARCHVIEW_H |
|
20 |
#define PODCASTSEARCHVIEW_H |
|
21 |
||
22 |
#include <aknview.h> |
|
23 |
#include "FeedEngine.h" |
|
24 |
#include "PodcastModel.h" |
|
25 |
#include "PodcastListView.h" |
|
26 |
#include "Podcast.hrh" |
|
27 |
||
28 |
class CPodcastSearchView : public CPodcastListView, public MEikListBoxObserver, |
|
29 |
public MFeedEngineObserver |
|
30 |
{ |
|
31 |
public: |
|
32 |
static CPodcastSearchView* NewL(CPodcastModel& aPodcastModel); |
|
33 |
static CPodcastSearchView* NewLC(CPodcastModel& aPodcastModel); |
|
34 |
~CPodcastSearchView(); |
|
140 | 35 |
void UpdateToolbar(TBool aVisible=EFalse) {}; |
2 | 36 |
|
37 |
protected: |
|
38 |
void ConstructL(); |
|
39 |
CPodcastSearchView(CPodcastModel& aPodcastModel); |
|
40 |
||
41 |
/** |
|
42 |
* Returns views id, intended for overriding by sub classes. |
|
43 |
* @return id for this view. |
|
44 |
*/ |
|
45 |
TUid Id() const; |
|
46 |
||
47 |
/** |
|
48 |
* Handles a view activation and passes the message of type |
|
49 |
* @c aCustomMessageId. This function is intended for overriding by |
|
50 |
* sub classes. This function is called by @c AknViewActivatedL(). |
|
51 |
* @param aPrevViewId Specifies the view previously active. |
|
52 |
* @param aCustomMessageId Specifies the message type. |
|
53 |
* @param aCustomMessage The activation message. |
|
54 |
*/ |
|
55 |
void DoActivateL(const TVwsViewId& aPrevViewId, |
|
56 |
TUid aCustomMessageId, |
|
57 |
const TDesC8& aCustomMessage); |
|
58 |
||
59 |
/** |
|
60 |
* View deactivation function intended for overriding by sub classes. |
|
61 |
* This function is called by @c AknViewDeactivated(). |
|
62 |
*/ |
|
63 |
void DoDeactivate(); |
|
64 |
||
65 |
// from MEikListBoxObserverClass |
|
66 |
void HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aEventType); |
|
67 |
void UpdateListboxItemsL(); |
|
68 |
||
69 |
// from MFeedEngineObserver |
|
70 |
void FeedDownloadStartedL(TFeedState /*aState*/,TUint /*aFeedUid*/) {} |
|
71 |
void FeedDownloadFinishedL(TFeedState /*aState*/,TUint /*aFeedUid*/, TInt /*aError*/) {} |
|
72 |
void FeedUpdateAllCompleteL(TFeedState /*aState*/) {} |
|
7 | 73 |
void OpmlParsingComplete(TInt aError, TUint aNumFeedsImported); |
2 | 74 |
|
75 |
/** |
|
76 |
* Command handling function intended for overriding by sub classes. |
|
77 |
* Default implementation is empty. |
|
78 |
* @param aCommand ID of the command to respond to. |
|
79 |
*/ |
|
80 |
void HandleCommandL(TInt aCommand); |
|
318
a231cc388498
Improved event handling
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
313
diff
changeset
|
81 |
|
2 | 82 |
private: |
83 |
CPodcastModel& iPodcastModel; |
|
84 |
TBool iSearchRunning; |
|
85 |
}; |
|
86 |
||
87 |
#endif // PODCASTSEARCHVIEW_H |