author | teknolog |
Sat, 15 May 2010 11:13:19 +0100 | |
branch | symbian1 |
changeset 90 | d0c0c3e6f7a1 |
parent 65 | bcd88ba95046 |
child 347 | b8d687bb7ca1 |
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 |
||
44 |
const TInt KTabIdFeeds = 0; |
|
45 |
const TInt KTabIdQueue = 1; |
|
46 |
||
47 |
const TInt KTimeoutPrio = CActive::EPriorityStandard; |
|
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 | 56 |
class CTimeout; |
57 |
||
58 |
class MTimeoutObserver |
|
59 |
{ |
|
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 | 62 |
protected: |
63 |
virtual ~MTimeoutObserver() {} |
|
64 |
}; |
|
65 |
||
66 |
class CTimeout : public CTimer |
|
67 |
{ |
|
68 |
public: |
|
69 |
||
70 |
static CTimeout* NewLC(MTimeoutObserver& aObserver, TInt aPrio=KTimeoutPrio) |
|
71 |
{ |
|
72 |
CTimeout* self=new(ELeave) CTimeout(aObserver, aPrio); |
|
73 |
CleanupStack::PushL(self); |
|
74 |
self->ConstructL(); |
|
75 |
return self; |
|
76 |
} |
|
77 |
||
78 |
static CTimeout* NewL(MTimeoutObserver& aObserver, TInt aPrio=KTimeoutPrio) |
|
79 |
{ |
|
80 |
CTimeout* self=NewLC(aObserver, aPrio); |
|
81 |
CleanupStack::Pop(self); |
|
82 |
return self; |
|
83 |
} |
|
84 |
||
85 |
~CTimeout() |
|
86 |
{ |
|
87 |
Cancel(); |
|
88 |
} |
|
89 |
protected: |
|
90 |
CTimeout(MTimeoutObserver& aObserver, TInt aPrio) : CTimer(aPrio), iObserver(aObserver) |
|
91 |
{ |
|
92 |
CActiveScheduler::Add(this); |
|
93 |
} |
|
94 |
void ConstructL() |
|
95 |
{ |
|
96 |
CTimer::ConstructL(); |
|
97 |
} |
|
98 |
||
99 |
void RunL() |
|
100 |
{ |
|
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 | 103 |
} |
104 |
||
105 |
protected: |
|
106 |
MTimeoutObserver& iObserver; |
|
107 |
}; |
|
108 |
||
13 | 109 |
class CPodcastAppUi : public CAknViewAppUi, public MAknTabObserver, |
110 |
public MTimeoutObserver, public MConnectionObserver |
|
2 | 111 |
{ |
112 |
public: |
|
113 |
CPodcastAppUi(CPodcastModel* aPodcastModel); |
|
114 |
void ConstructL(); |
|
115 |
~CPodcastAppUi(); |
|
116 |
||
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(); |
60 | 123 |
void GetErrorTextL(TDes &aErrorMessage, TInt aErrorCode); |
124 |
||
2 | 125 |
private: |
126 |
// From MEikMenuObserver |
|
127 |
void DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane); |
|
128 |
void TabChangedL (TInt aIndex); |
|
129 |
CArrayFix<TCoeHelpContext>* HelpContextL() const; |
|
130 |
void HandleCommandL(TInt aCommand); |
|
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 | 133 |
|
13 | 134 |
protected: |
135 |
// from MConnectionObserver |
|
136 |
||
137 |
void ConnectionSelectionStart(); |
|
138 |
void ConnectionSelectionEnd(); |
|
139 |
void ConnectCompleteL(TInt /*aErrorCode*/) {} |
|
140 |
void Disconnected() {}; |
|
141 |
||
2 | 142 |
private: |
143 |
CPodcastMainView *iMainView; |
|
144 |
CPodcastFeedView* iFeedView; |
|
145 |
CPodcastShowsView* iShowsView; |
|
146 |
CPodcastQueueView* iQueueView; |
|
147 |
CPodcastSearchView* iSearchView; |
|
148 |
CPodcastSettingsView* iSettingsView; |
|
149 |
||
150 |
CPodcastModel* iPodcastModel; |
|
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 | 154 |
CAknTabGroup* iTabGroup; |
155 |
CAknNavigationControlContainer* iNaviPane; |
|
24
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
13
diff
changeset
|
156 |
TNaviStyle iNaviStyle; |
2 | 157 |
CTimeout* iStartTimer; |
158 |
}; |
|
159 |
||
160 |
#endif |