1 /* |
|
2 * Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: ?Description |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef IRCOMMON_H |
|
20 #define IRCOMMON_H |
|
21 |
|
22 #include <e32base.h> |
|
23 namespace |
|
24 { |
|
25 |
|
26 // --------------------------------------------------------------------------- |
|
27 // Performs ResetAndDestroy() and Close() on the supplied object. |
|
28 // --------------------------------------------------------------------------- |
|
29 // |
|
30 template <class T> |
|
31 inline void DoCleanupResetAndDestroyClose( TAny* aSelf ) |
|
32 { |
|
33 T* self = static_cast<T*>( aSelf ); |
|
34 if ( self ) |
|
35 { |
|
36 self->ResetAndDestroy(); |
|
37 self->Close(); |
|
38 } |
|
39 } |
|
40 |
|
41 // --------------------------------------------------------------------------- |
|
42 // Pushes an object onto the cleanup stack. |
|
43 // |
|
44 // Use this only for objects that you want to have ResetAndDestroy() and |
|
45 // Close() called upon their destruction. |
|
46 // --------------------------------------------------------------------------- |
|
47 // |
|
48 template <class T> |
|
49 inline void CleanupResetAndDestroyClosePushL( T& aObject ) |
|
50 { |
|
51 CleanupStack::PushL( TCleanupItem( DoCleanupResetAndDestroyClose<T>, &aObject ) ); |
|
52 } |
|
53 |
|
54 } |
|
55 |
|
56 #define KUIDIRAPP 0x2000B499 |
|
57 |
|
58 //violates PC Lint Warning 569: Loss of information |
|
59 //(initialization) (32 bits to 31 bits) |
|
60 |
|
61 /* |
|
62 * Application Uid |
|
63 */ |
|
64 static const TUid KUidInternetRadioApp = {KUIDIRAPP}; |
|
65 |
|
66 /** Maximum UID for the views. If some view starts to use this id, this */ |
|
67 /** value must be changed. */ |
|
68 const TUid KIRMaximumViewId = { 0x00000010 }; |
|
69 |
|
70 /* |
|
71 * View IDs |
|
72 */ |
|
73 static const TUid KIRTandCViewID = {1}; |
|
74 static const TUid KIRMainChoiceViewID = {2}; |
|
75 static const TUid KIRDiscoverStationsViewID = {3}; |
|
76 static const TUid KIRBrowseByCategoryViewID = {4}; |
|
77 static const TUid KIRStationsViewID = {5}; |
|
78 static const TUid KIRNowPlayingViewID = {6}; |
|
79 static const TUid KIRStationInformationViewID = {7}; |
|
80 static const TUid KIRSavedStationsViewID = {8}; |
|
81 static const TUid KIRSearchViewID = {9}; |
|
82 static const TUid KIRSearchResultsViewID = {10}; |
|
83 static const TUid KIRAddManuallyStationViewID = {11}; |
|
84 static const TUid KIRProgressBarViewID = {12}; |
|
85 static const TUid KIRUpdateWarningViewID = {15}; |
|
86 static const TUid KIRPlsViewID = {17}; |
|
87 static const TUid KIRSettingsViewId = {18}; |
|
88 static const TUid KIRSettingsPopupViewID = {19}; |
|
89 static const TUid KIRAccessPointView = {20}; |
|
90 static const TUid KIRGPRSBitRateView = {21}; |
|
91 static const TUid KIR3GBitRateView = {22}; |
|
92 static const TUid KIRWIFIBitRateView = {23}; |
|
93 static const TUid KIRStationDirectoryViewId = {30}; |
|
94 static const TUid KIRCostWarningViewId={26}; |
|
95 static const TUid KIRCategoryViewId={27}; |
|
96 static const TUid KIRStationsViewId={28}; |
|
97 static const TUid KIRTopStationsViewId={29}; |
|
98 /** UID of the Channel List View */ |
|
99 const TUid KVRChannelListViewId = { 0x00000004 }; |
|
100 const TUid KIRHistoryListViewId = { 24 }; |
|
101 const TUid KIRFirstTimeViewId = { 0x00000005 }; |
|
102 static const TUid KIRStationInfoViewId = {31}; |
|
103 |
|
104 static const TUid KIRNowPlayingViewCustomMessageId = {106}; |
|
105 static const TUid KHistoryLaunch = {100}; |
|
106 static const TUid KMainViewLaunch = {104}; |
|
107 static const TUid KNowPlayingLaunch = {107}; |
|
108 static const TUid KNowPlayingFrmMainView = {108}; |
|
109 |
|
110 |
|
111 |
|
112 _LIT8(KIRNowPlayingViewCustomMessagePlayAfterActivation, "PlayAfterActivation"); |
|
113 |
|
114 /* |
|
115 * Mif Files |
|
116 */ |
|
117 _LIT(KMIFFILE,"InternetRadio.mif"); |
|
118 _LIT(KEDWINSKINFILE,"InternetRadioEdwinSkin.mif"); |
|
119 |
|
120 /* |
|
121 * File path |
|
122 */ |
|
123 _LIT(KTAB,"\t"); |
|
124 |
|
125 /* |
|
126 * Application name |
|
127 */ |
|
128 _LIT(KAPPNAME,"Internet Radio"); |
|
129 |
|
130 /* |
|
131 * SVG name |
|
132 */ |
|
133 _LIT(KSVGLOADING,"qgn_ir_loading.svg"); |
|
134 _LIT(KBUFFERING,"qgn_ir_buffering_anim.svg"); |
|
135 |
|
136 //Different Bitrate ranges |
|
137 enum TIRBitRateQuality |
|
138 { |
|
139 EIRStandardQuality, |
|
140 EIRHighQuality, |
|
141 EIRBestQuality |
|
142 }; |
|
143 |
|
144 #endif // IRCOMMON_H |
|