|
1 /* |
|
2 * Copyright (c) 2009 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: |
|
15 * |
|
16 */ |
|
17 #ifndef IRQISDSCLIENTIMPL_H_ |
|
18 #define IRQISDSCLIENTIMPL_H_ |
|
19 |
|
20 #include "irqisdsclient.h" |
|
21 #include "irqabstractisdsclientimpl.h" |
|
22 #include "misdsresponseobserver.h" |
|
23 #include "mlogodownloadobserver.h" |
|
24 |
|
25 class CIRIsdsClient; |
|
26 class IRQFavoritesDB; |
|
27 class CIRLogoDownloadEngine; |
|
28 class IRQIsdsClientImpl : public QObject, |
|
29 public IRQAbstractIsdsClientImpl, |
|
30 public MIsdsResponseObserver, |
|
31 public MLogoDownloadObserver |
|
32 { |
|
33 Q_OBJECT |
|
34 |
|
35 public: |
|
36 |
|
37 IRQIsdsClientImpl(IRQIsdsClient *aParent); |
|
38 |
|
39 ~IRQIsdsClientImpl(); |
|
40 |
|
41 void isdsSearchRequestImpl(const QString& aIsdsSearchString); |
|
42 |
|
43 |
|
44 void isdsCategoryRequestImpl( |
|
45 IRQIsdsClient::IRQIsdsClientInterfaceIDs aIDType, bool& aCache); |
|
46 |
|
47 bool isdsIsCategoryCachedImpl(IRQIsdsClient::IRQIsdsClientInterfaceIDs aIDType); |
|
48 |
|
49 bool isdsIsChannelCachedImpl(int aIndex); |
|
50 |
|
51 void isdsChannelRequestImpl(int aIndex, bool& aCache); |
|
52 |
|
53 |
|
54 void isdsListenRequestImpl(int aCurrentIndex, bool aHistoryBool = |
|
55 false); |
|
56 |
|
57 |
|
58 int isdsSyncPresetImpl(int aPresetId, const QString& aIfModifySince, IRQFavoritesDB *aFavPresets); |
|
59 |
|
60 void isdsCancelRequestImpl(); |
|
61 |
|
62 bool isdsIsCategoryBannerImpl(); |
|
63 |
|
64 bool isdsIsChannelBannerImpl(); |
|
65 |
|
66 void isdsLogoDownSendRequestImpl(IRQPreset* aPreset, int aNPVReq = 1, |
|
67 int aXValue = 0, int aYValue = 0); |
|
68 |
|
69 bool isdsIsLogoCachedImpl(IRQPreset* aPreset, int aXValue = 0, int aYValue = 0); |
|
70 |
|
71 void isdsLogoDownCancelTransactionImpl(); |
|
72 |
|
73 bool isdsLogoDownIsRunningImpl() const; |
|
74 |
|
75 void isdsLogoDownCheckCacheLogoImpl(const QString& aURL, int& aStatus); |
|
76 |
|
77 TDesC8& isdsLogoDownSendCacheLogoImpl(); |
|
78 |
|
79 void isdsPostLogImpl(const QString &aFileName); |
|
80 |
|
81 void isdsGetIRIDImpl(); |
|
82 |
|
83 void isdsGetBrowseBannerImpl(QString& aBannerUrl, QString& aClickThroughUrl); |
|
84 |
|
85 void isdsMultSearchImpl(QString aGenreID, QString aCountryID, QString aLanguageID, QString aSearchText); |
|
86 |
|
87 bool isdsIsConstructSucceed() const; |
|
88 |
|
89 private: |
|
90 |
|
91 /** |
|
92 *IRQIsdsClientImpl::IsdsErrorL() |
|
93 *used to indicate errors in retrieving data from isds server |
|
94 *@param int, the error code sent by the http receiver |
|
95 **/ |
|
96 void IsdsErrorL(int aErrCode); |
|
97 /** |
|
98 *IRQIsdsClientImpl::IsdsCatogoryDataReceivedL() |
|
99 *when we get the category data from low layer, the function is called and |
|
100 *we will generate the data pushed to UI |
|
101 **/ |
|
102 void IsdsCatogoryDataReceivedL( |
|
103 CArrayPtrFlat<CIRBrowseCatagoryItems> & aParsedStructure); |
|
104 /** |
|
105 *IRQIsdsClientImpl::IsdsChannelDataReceivedL() |
|
106 *when we get the channels data from low layer, the function is called and |
|
107 *we will generate the data pushed to UI |
|
108 **/ |
|
109 void IsdsChannelDataReceivedL( |
|
110 CArrayPtrFlat<CIRBrowseChannelItems> & aParsedStructure); |
|
111 /** |
|
112 *IRQIsdsClientImpl::IsdsPresetDataReceivedL() |
|
113 *when we get the presets data from low layer, the function is called and |
|
114 *we will generate the data pushed to UI |
|
115 **/ |
|
116 void IsdsPresetDataReceivedL( |
|
117 CArrayPtrFlat<CIRIsdsPreset> & aParsedStructure); |
|
118 /** |
|
119 *IRQIsdsClientImpl::IsdsPresetRemovedL() |
|
120 *when we find that the preset to be syc is deleted from isds server, the function |
|
121 *will be called to notify the UI. |
|
122 **/ |
|
123 void IsdsPresetRemovedL(TInt aId); |
|
124 /** |
|
125 *IRQIsdsClientImpl::IsdsPresetChangedL() |
|
126 *when we find that the preset to be syc is changed from isds server, the function |
|
127 *will be called to notify the UI. |
|
128 **/ |
|
129 void IsdsPresetChangedL(CIRIsdsPreset& aPreset); |
|
130 /** |
|
131 *IRQIsdsClientImpl::IsdsPresetNoChangeL() |
|
132 *when we find that the preset to be syc is not changed from isds server, the function |
|
133 *will be called to notify the UI. |
|
134 **/ |
|
135 void IsdsPresetNoChangeL(); |
|
136 /** |
|
137 * IRQIsdsClientImpl::PresetLogoDownloadedL() |
|
138 * called back when a preset's logo has downloaded |
|
139 * @param CIRIsdsPreset*, preset with downloaded logo |
|
140 */ |
|
141 void PresetLogoDownloadedL(CIRIsdsPreset* aPreset); |
|
142 |
|
143 /** |
|
144 * IRQIsdsClientImpl::PresetLogoDownloadError() |
|
145 * called back when a preset's logo has not downloaded |
|
146 * @param CIRIsdsPreset*, preset with no logo data |
|
147 */ |
|
148 void PresetLogoDownloadError(CIRIsdsPreset* aPreset); |
|
149 |
|
150 |
|
151 void IsdsOtaInfoRecieved( CIROTAUpdate &aOtaData); |
|
152 |
|
153 /* |
|
154 * IRQIsdsClientImpl::IsdsIRIDRecieved() |
|
155 * call back from MIsdsResponseObserver |
|
156 */ |
|
157 void IsdsIRIDRecieved(const TDesC& aIRID); |
|
158 |
|
159 private: |
|
160 |
|
161 /** |
|
162 * iISDSClient |
|
163 * ISDS INTERFACE |
|
164 */ |
|
165 CIRIsdsClient *iISDSClient; |
|
166 |
|
167 /* |
|
168 * iFavPresets |
|
169 * Instance of FavoritesDb |
|
170 */ |
|
171 IRQFavoritesDB *iFavPresets; |
|
172 |
|
173 /** |
|
174 * iChannelBannerUrl |
|
175 * banner url in statons view |
|
176 */ |
|
177 QString iChannelBannerUrl; |
|
178 |
|
179 /** |
|
180 * iCatBannerUrl |
|
181 * banner url in category view |
|
182 */ |
|
183 QString iCatBannerUrl; |
|
184 |
|
185 /** |
|
186 * iChannelClickThroughUrl |
|
187 * click through url in stations view |
|
188 */ |
|
189 QString iChannelClickThroughUrl; |
|
190 |
|
191 /** |
|
192 * iCatClickThroughUrl |
|
193 * click through url in category view |
|
194 */ |
|
195 QString iCatClickThroughUrl; |
|
196 |
|
197 /** |
|
198 * iCatBannerTag |
|
199 * bool value to show is there any category banner |
|
200 */ |
|
201 bool iCatBannerTag; |
|
202 |
|
203 /** |
|
204 * iChannelBannerTag |
|
205 * bool value to show is there any channel banner |
|
206 */ |
|
207 bool iChannelBannerTag; |
|
208 |
|
209 |
|
210 /** |
|
211 *Pointet to Logo download |
|
212 */ |
|
213 CIRLogoDownloadEngine* iLogoDownloadEngine; |
|
214 |
|
215 /** |
|
216 *Pointet to father |
|
217 */ |
|
218 IRQIsdsClient *q_ptr; |
|
219 |
|
220 }; |
|
221 |
|
222 #endif |
|
223 |