application/inc/PodcastSearchView.h
author Sebastian Brannstrom <sebastianb@symbian.org>
Sun, 31 Oct 2010 14:14:17 +0000
branchRCL_3
changeset 320 e3ec8e436951
parent 318 a231cc388498
child 368 b131f7696342
permissions -rw-r--r--
Fix for Hide command in Queue view
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
     1
/*
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
     2
* Copyright (c) 2007-2010 Sebastian Brannstrom, Lars Persson, EmbedDev AB
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
     3
*
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
     4
* All rights reserved.
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
     5
* This component and the accompanying materials are made available
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
     6
* under the terms of the License "Eclipse Public License v1.0"
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
     7
* which accompanies this distribution, and is available
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
     8
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
     9
*
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    10
* Initial Contributors:
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    11
* EmbedDev AB - initial contribution.
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    12
*
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    13
* Contributors:
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    14
*
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    15
* Description:
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    16
*
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    17
*/
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    18
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    19
#ifndef PODCASTSEARCHVIEW_H
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    20
#define PODCASTSEARCHVIEW_H 
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    21
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    22
#include <aknview.h>
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    23
#include "FeedEngine.h"
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    24
#include "PodcastModel.h"
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    25
#include "PodcastListView.h"
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    26
#include "Podcast.hrh"
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    27
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    28
class CPodcastSearchView : public CPodcastListView, public MEikListBoxObserver, 
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    29
	public MFeedEngineObserver
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    30
    {
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    31
    public: 
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    32
        static CPodcastSearchView* NewL(CPodcastModel& aPodcastModel);
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    33
        static CPodcastSearchView* NewLC(CPodcastModel& aPodcastModel);
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    34
        ~CPodcastSearchView();
140
68b48f53a8ec Updated help files merged from symbian1 branch
teknolog
parents: 13
diff changeset
    35
		void UpdateToolbar(TBool aVisible=EFalse) {};
2
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    36
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    37
	protected:
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    38
	    void ConstructL();
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    39
		CPodcastSearchView(CPodcastModel& aPodcastModel);
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    40
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    41
		/**
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    42
		 * Returns views id, intended for overriding by sub classes.
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    43
		 * @return id for this view.
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    44
		 */
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    45
		TUid Id() const;
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    46
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    47
		/** 
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    48
		 * Handles a view activation and passes the message of type 
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    49
		 * @c aCustomMessageId. This function is intended for overriding by 
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    50
		 * sub classes. This function is called by @c AknViewActivatedL().
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    51
		 * @param aPrevViewId Specifies the view previously active.
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    52
		 * @param aCustomMessageId Specifies the message type.
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    53
		 * @param aCustomMessage The activation message.
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    54
		 */
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    55
		void DoActivateL(const TVwsViewId& aPrevViewId,
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    56
	                                  TUid aCustomMessageId,
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    57
	                                  const TDesC8& aCustomMessage);
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    58
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    59
	    /** 
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    60
		 * View deactivation function intended for overriding by sub classes. 
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    61
		 * This function is called by @c AknViewDeactivated().
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    62
		 */
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    63
		void DoDeactivate();
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    64
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    65
		// from MEikListBoxObserverClass
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    66
		void HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aEventType);
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    67
		void UpdateListboxItemsL();
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    68
		
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    69
		// from MFeedEngineObserver
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    70
		void FeedDownloadStartedL(TFeedState /*aState*/,TUint /*aFeedUid*/) {}		
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    71
		void FeedDownloadFinishedL(TFeedState /*aState*/,TUint /*aFeedUid*/, TInt /*aError*/) {}
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    72
		void FeedUpdateAllCompleteL(TFeedState /*aState*/) {}
7
a7a43293ae56 Added error handling for searching
teknolog
parents: 2
diff changeset
    73
		void OpmlParsingComplete(TInt aError, TUint aNumFeedsImported);
2
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    74
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    75
		/** 
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    76
		 * Command handling function intended for overriding by sub classes. 
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    77
		 * Default implementation is empty.  
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    78
		 * @param aCommand ID of the command to respond to. 
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    79
		 */
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    80
		void HandleCommandL(TInt aCommand);
318
a231cc388498 Improved event handling
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 313
diff changeset
    81
2
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    82
	private:
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    83
		CPodcastModel& iPodcastModel;		
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    84
		TBool iSearchRunning;
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    85
};
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    86
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    87
#endif // PODCASTSEARCHVIEW_H