|
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(); |
|
35 |
|
36 protected: |
|
37 void ConstructL(); |
|
38 CPodcastSearchView(CPodcastModel& aPodcastModel); |
|
39 |
|
40 /** |
|
41 * Returns views id, intended for overriding by sub classes. |
|
42 * @return id for this view. |
|
43 */ |
|
44 TUid Id() const; |
|
45 |
|
46 /** |
|
47 * Handles a view activation and passes the message of type |
|
48 * @c aCustomMessageId. This function is intended for overriding by |
|
49 * sub classes. This function is called by @c AknViewActivatedL(). |
|
50 * @param aPrevViewId Specifies the view previously active. |
|
51 * @param aCustomMessageId Specifies the message type. |
|
52 * @param aCustomMessage The activation message. |
|
53 */ |
|
54 void DoActivateL(const TVwsViewId& aPrevViewId, |
|
55 TUid aCustomMessageId, |
|
56 const TDesC8& aCustomMessage); |
|
57 |
|
58 /** |
|
59 * View deactivation function intended for overriding by sub classes. |
|
60 * This function is called by @c AknViewDeactivated(). |
|
61 */ |
|
62 void DoDeactivate(); |
|
63 |
|
64 // from MEikListBoxObserverClass |
|
65 void HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aEventType); |
|
66 void UpdateListboxItemsL(); |
|
67 |
|
68 // from MFeedEngineObserver |
|
69 void FeedDownloadStartedL(TFeedState /*aState*/,TUint /*aFeedUid*/) {} |
|
70 void FeedDownloadFinishedL(TFeedState /*aState*/,TUint /*aFeedUid*/, TInt /*aError*/) {} |
|
71 void FeedUpdateAllCompleteL(TFeedState /*aState*/) {} |
|
72 void OpmlParsingComplete(TUint aNumFeedsImported); |
|
73 |
|
74 /** |
|
75 * Command handling function intended for overriding by sub classes. |
|
76 * Default implementation is empty. |
|
77 * @param aCommand ID of the command to respond to. |
|
78 */ |
|
79 void HandleCommandL(TInt aCommand); |
|
80 |
|
81 void UpdateToolbar(); |
|
82 |
|
83 private: |
|
84 CPodcastModel& iPodcastModel; |
|
85 TBool iSearchRunning; |
|
86 }; |
|
87 |
|
88 #endif // PODCASTSEARCHVIEW_H |