application/inc/PodcastAppui.h
author teknolog
Mon, 05 Apr 2010 13:54:26 +0100
changeset 117 3b59b88b089e
parent 115 d87e984bd8b8
child 367 4b75876aa85a
permissions -rw-r--r--
Fixed Code Scanner L-issues; Further improvements to HTTP robustness
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 PODCASTAPPUI_H
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    20
#define PODCASTAPPUI_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 <aknviewappui.h>
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    23
#include <akntabobserver.h>
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    24
#include <akntabgrp.h>
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    25
#include <aknnavide.h> 
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    26
13
f58e3c482bd9 Toolbars now hide when connection query appears
teknolog
parents: 11
diff changeset
    27
#include "ConnectionEngine.h"
f58e3c482bd9 Toolbars now hide when connection query appears
teknolog
parents: 11
diff changeset
    28
2
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    29
class CPodcastMainView;
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    30
class CPodcastFeedView;
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    31
class CPodcastShowsView;
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    32
class CPodcastQueueView;
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    33
class CPodcastSettingsView;
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    34
class CPodcastSearchView;
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    35
class CPodcastModel;
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
const TUid KUidPodcastClientID  = {0xA00046AE};
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    38
const TUid KUidPodcastFeedViewID = {0x00000001};
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    39
const TUid KUidPodcastShowsViewID = {0x00000002};
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    40
const TUid KUidPodcastQueueViewID = {0x00000003};
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    41
const TUid KUidPodcastSearchViewID = {0x00000004};
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    42
const TUid KUidPodcastSettingsViewID = {0x00000005};
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    43
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    44
const TInt KTabIdFeeds = 0;
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    45
const TInt KTabIdQueue = 1;
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
const TInt KTimeoutPrio = CActive::EPriorityStandard;
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    48
24
ca50ea154990 Moved search result title to navipane. Fixed but 1832
teknolog
parents: 13
diff changeset
    49
enum TNaviStyle
ca50ea154990 Moved search result title to navipane. Fixed but 1832
teknolog
parents: 13
diff changeset
    50
	{
ca50ea154990 Moved search result title to navipane. Fixed but 1832
teknolog
parents: 13
diff changeset
    51
	ENaviEmpty,
ca50ea154990 Moved search result title to navipane. Fixed but 1832
teknolog
parents: 13
diff changeset
    52
	ENaviText,
ca50ea154990 Moved search result title to navipane. Fixed but 1832
teknolog
parents: 13
diff changeset
    53
	ENaviTabGroup
ca50ea154990 Moved search result title to navipane. Fixed but 1832
teknolog
parents: 13
diff changeset
    54
	};
ca50ea154990 Moved search result title to navipane. Fixed but 1832
teknolog
parents: 13
diff changeset
    55
2
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    56
class CTimeout;
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    57
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    58
class MTimeoutObserver
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
public:
35
66c5303f3610 A ton of CodeScanner fixes (high issues) - but not all
Brendan Donegan <brendand@symbian.org>
parents: 24
diff changeset
    61
    virtual void HandleTimeoutL(const CTimeout& aId, TInt aError)=0;
2
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    62
protected:
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    63
    virtual ~MTimeoutObserver() {}
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
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    66
class CTimeout : public CTimer
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    67
{
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    68
public:
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    69
	
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    70
     static CTimeout* NewLC(MTimeoutObserver& aObserver, TInt aPrio=KTimeoutPrio)
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    71
    	 {
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    72
         CTimeout* self=new(ELeave) CTimeout(aObserver, aPrio);
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    73
         CleanupStack::PushL(self);
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    74
         self->ConstructL();
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    75
         return self;
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    76
    	 }
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    77
     
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    78
     static CTimeout* NewL(MTimeoutObserver& aObserver, TInt aPrio=KTimeoutPrio)
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
		CTimeout* self=NewLC(aObserver, aPrio);
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    81
		CleanupStack::Pop(self);
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    82
		return self;
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    83
		}
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    84
     
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    85
     ~CTimeout()
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
    	 Cancel();
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    88
    	 }
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    89
protected:
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    90
    CTimeout(MTimeoutObserver& aObserver, TInt aPrio) : CTimer(aPrio), iObserver(aObserver)
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    91
    {
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    92
        CActiveScheduler::Add(this);
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    93
    }
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    94
    void ConstructL()
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    95
    	{
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    96
    	    CTimer::ConstructL();
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    97
    	}
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    98
    
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    99
    void RunL()
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   100
    	{
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   101
    	    TInt r=iStatus.Int();
35
66c5303f3610 A ton of CodeScanner fixes (high issues) - but not all
Brendan Donegan <brendand@symbian.org>
parents: 24
diff changeset
   102
    	    iObserver.HandleTimeoutL(*this, r);
2
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   103
    	}
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   104
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   105
protected:
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   106
    MTimeoutObserver& iObserver;
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   107
};
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   108
13
f58e3c482bd9 Toolbars now hide when connection query appears
teknolog
parents: 11
diff changeset
   109
class CPodcastAppUi : public CAknViewAppUi, public MAknTabObserver, 
f58e3c482bd9 Toolbars now hide when connection query appears
teknolog
parents: 11
diff changeset
   110
	public MTimeoutObserver, public MConnectionObserver
2
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   111
    {
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   112
    public: 
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   113
    	CPodcastAppUi(CPodcastModel* aPodcastModel);
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   114
        void ConstructL();
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   115
       ~CPodcastAppUi();
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   116
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   117
       void SetActiveTab(TInt aIndex);
35
66c5303f3610 A ton of CodeScanner fixes (high issues) - but not all
Brendan Donegan <brendand@symbian.org>
parents: 24
diff changeset
   118
       void UpdateQueueTabL(TInt aQueueLength);
66c5303f3610 A ton of CodeScanner fixes (high issues) - but not all
Brendan Donegan <brendand@symbian.org>
parents: 24
diff changeset
   119
       void TabLeftL();
66c5303f3610 A ton of CodeScanner fixes (high issues) - but not all
Brendan Donegan <brendand@symbian.org>
parents: 24
diff changeset
   120
       void TabRightL();
24
ca50ea154990 Moved search result title to navipane. Fixed but 1832
teknolog
parents: 13
diff changeset
   121
       void NaviSetTextL(TInt aResourceId);
ca50ea154990 Moved search result title to navipane. Fixed but 1832
teknolog
parents: 13
diff changeset
   122
       void NaviShowTabGroupL();
117
3b59b88b089e Fixed Code Scanner L-issues; Further improvements to HTTP robustness
teknolog
parents: 115
diff changeset
   123
       void GetErrorTextL(TDes &aErrorMessage, TInt aErrorCode);
115
d87e984bd8b8 Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents: 35
diff changeset
   124
2
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   125
    private:
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   126
        // From MEikMenuObserver
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   127
        void DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane);
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   128
        void TabChangedL (TInt aIndex);
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   129
        CArrayFix<TCoeHelpContext>* HelpContextL() const;
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   130
        void HandleCommandL(TInt aCommand);
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   131
    protected:
35
66c5303f3610 A ton of CodeScanner fixes (high issues) - but not all
Brendan Donegan <brendand@symbian.org>
parents: 24
diff changeset
   132
    	void HandleTimeoutL(const CTimeout& aId, TInt aError);
2
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   133
13
f58e3c482bd9 Toolbars now hide when connection query appears
teknolog
parents: 11
diff changeset
   134
    protected:
f58e3c482bd9 Toolbars now hide when connection query appears
teknolog
parents: 11
diff changeset
   135
    	// from MConnectionObserver
f58e3c482bd9 Toolbars now hide when connection query appears
teknolog
parents: 11
diff changeset
   136
    	
f58e3c482bd9 Toolbars now hide when connection query appears
teknolog
parents: 11
diff changeset
   137
    	void ConnectionSelectionStart();
f58e3c482bd9 Toolbars now hide when connection query appears
teknolog
parents: 11
diff changeset
   138
    	void ConnectionSelectionEnd();    	
f58e3c482bd9 Toolbars now hide when connection query appears
teknolog
parents: 11
diff changeset
   139
    	void ConnectCompleteL(TInt /*aErrorCode*/) {}
f58e3c482bd9 Toolbars now hide when connection query appears
teknolog
parents: 11
diff changeset
   140
    	void Disconnected() {};
f58e3c482bd9 Toolbars now hide when connection query appears
teknolog
parents: 11
diff changeset
   141
    	
2
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   142
    private:
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   143
    	CPodcastMainView *iMainView;
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   144
		CPodcastFeedView* iFeedView;
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   145
		CPodcastShowsView* iShowsView;
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   146
		CPodcastQueueView* iQueueView;
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   147
		CPodcastSearchView* iSearchView;
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   148
		CPodcastSettingsView* iSettingsView;
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   149
		
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   150
		CPodcastModel* iPodcastModel;
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   151
24
ca50ea154990 Moved search result title to navipane. Fixed but 1832
teknolog
parents: 13
diff changeset
   152
		CAknNavigationDecorator* iNaviTabGroup;
ca50ea154990 Moved search result title to navipane. Fixed but 1832
teknolog
parents: 13
diff changeset
   153
		CAknNavigationDecorator* iNaviText;
2
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   154
		CAknTabGroup* iTabGroup;
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   155
		CAknNavigationControlContainer* iNaviPane;
24
ca50ea154990 Moved search result title to navipane. Fixed but 1832
teknolog
parents: 13
diff changeset
   156
		TNaviStyle iNaviStyle;
2
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   157
		CTimeout* iStartTimer;
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   158
    };
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   159
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   160
#endif