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