author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Wed, 23 Jun 2010 18:12:20 +0300 | |
changeset 45 | 6b911d05207e |
parent 37 | ba76fc04e6c2 |
child 46 | bc5a64e5bc3c |
permissions | -rw-r--r-- |
37 | 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 |
||
18 |
#include <hbdataformmodel.h> |
|
19 |
#include <hbdataformmodelitem.h> |
|
20 |
#include <hblineedit.h> |
|
21 |
#include <hbinputeditorinterface.h> |
|
22 |
#include <hbcombobox.h> |
|
23 |
#include <hbdeviceprogressdialog.h> |
|
24 |
#include <sssettingswrapper.h> |
|
25 |
#include <psetwrapper.h> |
|
26 |
#include <hbaction.h> |
|
27 |
#include <hblistwidget.h> |
|
28 |
#include <hblistwidgetitem.h> |
|
29 |
#include <hblabel.h> |
|
30 |
#include <cpitemdatahelper.h> |
|
31 |
#include "cpdivertplugingroup.h" |
|
32 |
#include "cpplugincommon.h" |
|
33 |
#include "cpphonenotes.h" |
|
34 |
#include "cppluginlogging.h" |
|
35 |
#include "cpdivertitemdata.h" |
|
36 |
||
37 |
Q_DECLARE_METATYPE(PsCallDivertingCondition) |
|
38 |
Q_DECLARE_METATYPE(PsServiceGroup) |
|
39 |
||
40 |
// CONSTANTS |
|
41 |
const QString KOtherNumber("otherNumber"); |
|
42 |
||
43 |
/*! |
|
44 |
CpDivertPluginGroup::CpDivertPluginGroup. |
|
45 |
*/ |
|
46 |
CpDivertPluginGroup::CpDivertPluginGroup(CpItemDataHelper &helper) |
|
47 |
: CpSettingFormItemData(HbDataFormModelItem::GroupItem, |
|
48 |
hbTrId("txt_phone_subhead_call_divert"),0), |
|
49 |
m_DataItemVoiceAllCalls(NULL), |
|
50 |
m_DataItemVoiceIfBusy(NULL), |
|
51 |
m_DataItemVoiceIfNotAnswered(NULL), |
|
52 |
m_DataItemVoiceIfOutOfReach(NULL), |
|
53 |
m_DataItemVoiceIfNotAvailable(NULL), |
|
54 |
m_DataItemVideoAllCalls(NULL), |
|
55 |
m_DataItemVideoIfBusy(NULL), |
|
56 |
m_DataItemVideoIfNotAnswered(NULL), |
|
57 |
m_DataItemVideoIfOutOfReach(NULL), |
|
58 |
m_DataItemVideoIfNotAvailable(NULL), |
|
59 |
m_activeNoteId(0), |
|
60 |
m_activeProgressNoteId(0), |
|
61 |
m_divertToVoiceMailBox(false), |
|
62 |
m_helper(helper), |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
63 |
m_activateDivertPhase(NonePhase), |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
64 |
m_dialog(NULL) |
37 | 65 |
{ |
66 |
DPRINT << ": IN"; |
|
67 |
||
68 |
// Registration needed, because PsCallDivertingCondition and PsServiceGroup |
|
69 |
// is used as a custom meta information for barring items. |
|
70 |
qRegisterMetaType<PsCallDivertingCondition>( |
|
71 |
"PsCallDivertingCondition"); |
|
72 |
||
73 |
qRegisterMetaType<PsServiceGroup>( |
|
74 |
"PsServiceGroup"); |
|
75 |
||
76 |
m_pSetWrapper = new PSetWrapper; |
|
77 |
DPRINT << ": PSetWrapper created"; |
|
78 |
||
79 |
m_ssSettingsWrapper = new SsSettingsWrapper; |
|
80 |
DPRINT << ": SsSettingsWrapper created"; |
|
81 |
||
82 |
m_callDivertingWrapper = &m_pSetWrapper->callDivertingWrapper(); |
|
83 |
QObject::connect( |
|
84 |
m_callDivertingWrapper, |
|
85 |
SIGNAL(handleDivertingChanged(const PSCallDivertingCommand&,bool)), |
|
86 |
this, |
|
87 |
SLOT(handleDivertingChanged(const PSCallDivertingCommand&,bool))); |
|
88 |
QObject::connect( |
|
89 |
m_callDivertingWrapper, |
|
90 |
SIGNAL(handleDivertingStatus(QList<PSCallDivertingStatus*>&, bool)), |
|
91 |
this, |
|
92 |
SLOT(handleDivertingStatus(QList<PSCallDivertingStatus*>&, bool))); |
|
93 |
QObject::connect( |
|
94 |
m_callDivertingWrapper, |
|
95 |
SIGNAL(handleDivertingError(int)), |
|
96 |
this, |
|
97 |
SLOT(handleDivertingError(int))); |
|
98 |
||
99 |
QObject::connect( |
|
100 |
m_callDivertingWrapper, |
|
101 |
SIGNAL(requestDone()), |
|
102 |
this, |
|
103 |
SLOT(divertRequestProcessed())); |
|
104 |
||
105 |
// Listen form item visibility change |
|
106 |
m_helper.connectToForm( |
|
107 |
SIGNAL(itemShown(QModelIndex)), this, SLOT(itemShown(QModelIndex))); |
|
108 |
||
109 |
// Create grouped setting items |
|
110 |
createVoiceCallItems(this); |
|
111 |
createVideoCallItems(this); |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
112 |
|
37 | 113 |
DPRINT << ": OUT"; |
114 |
} |
|
115 |
||
116 |
/*! |
|
117 |
CpDivertPluginGroup::~CpDivertPluginGroup. |
|
118 |
*/ |
|
119 |
CpDivertPluginGroup::~CpDivertPluginGroup() |
|
120 |
{ |
|
121 |
DPRINT << ": IN"; |
|
122 |
||
123 |
delete m_pSetWrapper; |
|
124 |
delete m_ssSettingsWrapper; |
|
125 |
||
126 |
DPRINT << ": OUT"; |
|
127 |
} |
|
128 |
||
129 |
/*! |
|
130 |
CpDivertPluginGroup::createVoiceCallItems. |
|
131 |
*/ |
|
132 |
void CpDivertPluginGroup::createVoiceCallItems(CpSettingFormItemData *parent) |
|
133 |
{ |
|
134 |
DPRINT << ": IN"; |
|
135 |
CpSettingFormItemData *page = new CpSettingFormItemData( |
|
136 |
HbDataFormModelItem::GroupPageItem, |
|
137 |
hbTrId("txt_phone_setlabel_service_val_voice_divert")); |
|
138 |
parent->appendChild(page); |
|
139 |
||
140 |
m_DataItemVoiceAllCalls = createDivertItem( |
|
141 |
DivertConditionUnconditional, |
|
142 |
ServiceGroupVoice, |
|
143 |
hbTrId("txt_phone_setlabel_all_calls"), |
|
144 |
hbTrId("txt_phone_setlabel_all_calls"), false, |
|
145 |
page); |
|
146 |
||
147 |
m_DataItemVoiceIfBusy = createDivertItem( |
|
148 |
DivertConditionBusy, |
|
149 |
ServiceGroupVoice, |
|
150 |
hbTrId("txt_phone_setlabel_if_busy"), |
|
151 |
hbTrId("txt_phone_setlabel_if_busy"), false, |
|
152 |
page); |
|
153 |
||
154 |
m_DataItemVoiceIfNotAnswered = createDivertItem( |
|
155 |
DivertConditionNoReply, |
|
156 |
ServiceGroupVoice, |
|
157 |
hbTrId("txt_phone_setlabel_if_not_answered"), |
|
158 |
hbTrId("txt_phone_setlabel_if_not_answered"), true, |
|
159 |
page); |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
160 |
m_DataItemVoiceIfNotAnswered->setDescription( |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
161 |
hbTrId("txt_phone_setlabel_divert_delay_ln_seconds", 0)); |
37 | 162 |
|
163 |
m_DataItemVoiceIfOutOfReach = createDivertItem( |
|
164 |
DivertConditionNotReachable, |
|
165 |
ServiceGroupVoice, |
|
166 |
hbTrId("txt_phone_setlabel_if_out_of_reach"), |
|
167 |
hbTrId("txt_phone_setlabel_if_out_of_reach"), false, |
|
168 |
page); |
|
169 |
||
170 |
m_DataItemVoiceIfNotAvailable = createDivertItem( |
|
171 |
DivertConditionAllConditionalCases, |
|
172 |
ServiceGroupVoice, |
|
173 |
hbTrId("txt_phone_setlabel_if_not_available"), |
|
174 |
hbTrId("txt_phone_setlabel_if_not_available"), true, |
|
175 |
page); |
|
176 |
||
177 |
DPRINT << ": OUT"; |
|
178 |
} |
|
179 |
||
180 |
/*! |
|
181 |
CpDivertPluginGroup::createVideoCallItems |
|
182 |
*/ |
|
183 |
void CpDivertPluginGroup::createVideoCallItems(CpSettingFormItemData *parent) |
|
184 |
{ |
|
185 |
DPRINT << ": IN"; |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
186 |
|
37 | 187 |
CpSettingFormItemData *page = new CpSettingFormItemData( |
188 |
HbDataFormModelItem::GroupPageItem, |
|
189 |
hbTrId("txt_phone_setlabel_service_val_video_divert")); |
|
190 |
||
191 |
parent->appendChild(page); |
|
192 |
||
193 |
m_DataItemVideoAllCalls = createDivertItem( |
|
194 |
DivertConditionUnconditional, |
|
195 |
ServiceGroupData, |
|
196 |
hbTrId("txt_phone_setlabel_all_calls"), |
|
197 |
hbTrId("txt_phone_setlabel_all_calls"), false, |
|
198 |
page); |
|
199 |
||
200 |
m_DataItemVideoIfBusy = createDivertItem( |
|
201 |
DivertConditionBusy, |
|
202 |
ServiceGroupData, |
|
203 |
hbTrId("txt_phone_setlabel_if_busy"), |
|
204 |
hbTrId("txt_phone_setlabel_if_busy"), false, |
|
205 |
page); |
|
206 |
||
207 |
m_DataItemVideoIfNotAnswered = createDivertItem( |
|
208 |
DivertConditionNoReply, |
|
209 |
ServiceGroupData, |
|
210 |
hbTrId("txt_phone_setlabel_if_not_answered"), |
|
211 |
hbTrId("txt_phone_setlabel_if_not_answered"), true, |
|
212 |
page); |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
213 |
m_DataItemVideoIfNotAnswered->setDescription( |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
214 |
hbTrId("txt_phone_setlabel_divert_delay_ln_seconds", 0)); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
215 |
|
37 | 216 |
m_DataItemVideoIfOutOfReach = createDivertItem( |
217 |
DivertConditionNotReachable, |
|
218 |
ServiceGroupData, |
|
219 |
hbTrId("txt_phone_setlabel_if_out_of_reach"), |
|
220 |
hbTrId("txt_phone_setlabel_if_out_of_reach"), false, |
|
221 |
page); |
|
222 |
||
223 |
m_DataItemVideoIfNotAvailable = createDivertItem( |
|
224 |
DivertConditionAllConditionalCases, |
|
225 |
ServiceGroupData, |
|
226 |
hbTrId("txt_phone_setlabel_if_not_available"), |
|
227 |
hbTrId("txt_phone_setlabel_if_not_available"), true, |
|
228 |
page); |
|
229 |
||
230 |
DPRINT << ": OUT"; |
|
231 |
} |
|
232 |
||
233 |
/*! |
|
234 |
CpDivertPluginGroup::createDivertItem |
|
235 |
*/ |
|
236 |
CpDivertItemData *CpDivertPluginGroup::createDivertItem( |
|
237 |
PsCallDivertingCondition condition, |
|
238 |
PsServiceGroup serviceGroup, |
|
239 |
const QString &label, |
|
240 |
const QString &queryLabel, |
|
241 |
bool needTimeoutInfo, |
|
242 |
CpSettingFormItemData *parent) |
|
243 |
{ |
|
244 |
DPRINT << ": IN"; |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
245 |
|
37 | 246 |
CpDivertItemData *item = new CpDivertItemData( |
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
247 |
HbDataFormModelItem::CheckBoxItem, |
37 | 248 |
label, |
249 |
m_helper, |
|
250 |
parent); |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
251 |
|
37 | 252 |
QVariant conditionVar; |
253 |
conditionVar.setValue(condition); |
|
254 |
item->setProperty("condition", conditionVar); |
|
255 |
QVariant serviceGroupVar; |
|
256 |
serviceGroupVar.setValue(serviceGroup); |
|
257 |
item->setProperty("serviceGroup", serviceGroupVar); |
|
258 |
item->setProperty("queryLabel", queryLabel); |
|
259 |
item->setProperty("needTimeoutInfo", needTimeoutInfo); |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
260 |
item->setProperty("divertItem", true); |
37 | 261 |
item->setEnabled(false); |
262 |
||
263 |
// Connect signals |
|
264 |
QObject::connect( |
|
265 |
item, SIGNAL(itemClicked(CpDivertItemData&)), |
|
266 |
this, SLOT(changeDivertingStateRequested(CpDivertItemData&))); |
|
267 |
||
268 |
parent->appendChild(item); |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
269 |
|
37 | 270 |
DPRINT << ": OUT"; |
271 |
return item; |
|
272 |
} |
|
273 |
||
274 |
/*! |
|
275 |
CpDivertPluginGroup::itemShown. |
|
276 |
*/ |
|
277 |
void CpDivertPluginGroup::itemShown(const QModelIndex& item) |
|
278 |
{ |
|
279 |
DPRINT << ": IN"; |
|
280 |
DPRINT << "item:" << item; |
|
281 |
||
282 |
HbDataFormModelItem* modelItem = |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
283 |
qobject_cast<const HbDataFormModel*>(item.model())->itemFromIndex(item); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
284 |
if (!isDivertSettingsItem(modelItem)) { |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
285 |
return; |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
286 |
} |
37 | 287 |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
288 |
bool isInitialStatusQueryDoneForItem = |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
289 |
modelItem->contentWidgetData("text").isValid(); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
290 |
if (!isInitialStatusQueryDoneForItem) { |
37 | 291 |
CpDivertItemData *item = static_cast<CpDivertItemData*>(modelItem); |
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
292 |
if (qvariant_cast<PsCallDivertingCondition>(item->property("condition")) != |
37 | 293 |
DivertConditionAllConditionalCases) { |
294 |
addToDivertingRequestQueue(CheckDivertStatus, *item); |
|
295 |
} |
|
296 |
} |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
297 |
|
37 | 298 |
DPRINT << ": OUT"; |
299 |
} |
|
300 |
||
301 |
/*! |
|
302 |
CpDivertPluginGroup::addToDivertingRequestQueue. |
|
303 |
*/ |
|
304 |
void CpDivertPluginGroup::addToDivertingRequestQueue( |
|
305 |
DivertRequest request, CpDivertItemData &item) |
|
306 |
{ |
|
307 |
DPRINT << ": IN"; |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
308 |
|
37 | 309 |
CpDivertRequestQueueItem i; |
310 |
i.request = request; |
|
311 |
i.item = &item; |
|
312 |
m_divertRequestQueue.enqueue(i); |
|
313 |
||
314 |
if (m_divertRequestQueue.count()==1) { |
|
315 |
// Process if first item was added, process other later |
|
316 |
try { |
|
317 |
processDivertingRequestQueue(); |
|
318 |
} catch(...) { |
|
319 |
DPRINT << "error!!"; |
|
320 |
} |
|
321 |
} |
|
322 |
||
323 |
DPRINT << ": OUT"; |
|
324 |
} |
|
325 |
||
326 |
/*! |
|
327 |
CpDivertPluginGroup::divertRequestProcessed. |
|
328 |
*/ |
|
329 |
void CpDivertPluginGroup::divertRequestProcessed() |
|
330 |
{ |
|
331 |
DPRINT << ": IN"; |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
332 |
|
37 | 333 |
// Remove previous request and process next one |
334 |
if (!m_divertRequestQueue.isEmpty()) { |
|
335 |
m_divertRequestQueue.dequeue(); |
|
336 |
processDivertingRequestQueue(); |
|
337 |
} |
|
338 |
||
339 |
if (m_divertRequestQueue.isEmpty()) { |
|
340 |
// Queue empty so cancel process note |
|
341 |
CpPhoneNotes::instance()->cancelNote(m_activeProgressNoteId); |
|
342 |
} |
|
343 |
||
344 |
DPRINT << ": OUT"; |
|
345 |
} |
|
346 |
||
347 |
/*! |
|
348 |
CpDivertPluginGroup::changeItemData. |
|
349 |
*/ |
|
350 |
void CpDivertPluginGroup::changeItemData( |
|
351 |
PsServiceGroup serviceGroup, |
|
352 |
PsCallDivertingCondition condition, |
|
353 |
PsCallDivertingStatus status, |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
354 |
const QString& aNumber, int aTimeout) |
37 | 355 |
{ |
356 |
DPRINT << ": IN"; |
|
357 |
||
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
358 |
Qt::CheckState itemState = Qt::Unchecked; |
37 | 359 |
if (status == DivertingStatusActive) { |
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
360 |
itemState = Qt::Checked; |
37 | 361 |
} else if (status == DivertingStatusInactive) { |
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
362 |
itemState = Qt::PartiallyChecked; |
37 | 363 |
} else { |
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
364 |
itemState = Qt::Unchecked; |
37 | 365 |
} |
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
366 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
367 |
QString number = aNumber; |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
368 |
int timeout = aTimeout; |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
369 |
if (Qt::PartiallyChecked == itemState) { |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
370 |
number = QString(""); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
371 |
timeout = 0; |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
372 |
} |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
373 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
374 |
QVariant numberValue; |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
375 |
numberValue.setValue(number); |
37 | 376 |
|
377 |
switch (condition) { |
|
378 |
case DivertConditionAllConditionalCases: |
|
379 |
DPRINT << ": DivertConditionAllConditionalCases"; |
|
380 |
||
381 |
// If not available effects also conditions below |
|
382 |
changeItemData(serviceGroup, DivertConditionBusy, status, number, timeout); |
|
383 |
changeItemData(serviceGroup, DivertConditionNoReply, status, number, timeout); |
|
384 |
changeItemData(serviceGroup, DivertConditionNotReachable, status, number, timeout); |
|
385 |
// Fall trough |
|
386 |
case DivertConditionUnconditional: |
|
387 |
case DivertConditionBusy: |
|
388 |
case DivertConditionNoReply: |
|
389 |
case DivertConditionNotReachable: |
|
390 |
if (serviceGroup & ServiceGroupVoice) { |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
391 |
CpSettingFormItemData* itemData = item(ServiceGroupVoice, condition); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
392 |
itemData->setContentWidgetData("text", numberValue); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
393 |
if (DivertConditionNoReply == condition) { |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
394 |
itemData->setDescription( |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
395 |
hbTrId("txt_phone_setlabel_divert_delay_ln_seconds", timeout)); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
396 |
} |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
397 |
itemData->setContentWidgetData("checkState", itemState); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
398 |
itemData->setEnabled(true); |
37 | 399 |
} |
400 |
||
401 |
if (serviceGroup & ServiceGroupData) { |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
402 |
CpSettingFormItemData* itemData = item(ServiceGroupData, condition); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
403 |
itemData->setContentWidgetData("text", numberValue); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
404 |
if (DivertConditionNoReply == condition) { |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
405 |
itemData->setDescription( |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
406 |
hbTrId("txt_phone_setlabel_divert_delay_ln_seconds", timeout)); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
407 |
} |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
408 |
itemData->setContentWidgetData("checkState", itemState); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
409 |
itemData->setEnabled(true); |
37 | 410 |
} |
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
411 |
|
37 | 412 |
break; |
413 |
case DivertConditionAllCalls: |
|
414 |
case DivertConditionUnknown: |
|
415 |
default: |
|
416 |
break; |
|
417 |
} |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
418 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
419 |
DPRINT << ": OUT"; |
37 | 420 |
} |
421 |
||
422 |
/*! |
|
423 |
CpDivertPluginGroup::revertItemData. |
|
424 |
*/ |
|
425 |
void CpDivertPluginGroup::revertItemData( |
|
426 |
PsServiceGroup serviceGroup, PsCallDivertingCondition condition) |
|
427 |
{ |
|
428 |
DPRINT << ": IN"; |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
429 |
|
37 | 430 |
if (serviceGroup & ServiceGroupVoice) { |
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
431 |
CpSettingFormItemData* itemData = item(ServiceGroupVoice, condition); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
432 |
int checkState = itemData->contentWidgetData("checkState").toInt(); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
433 |
int revertedCheckState = |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
434 |
Qt::Checked == checkState ? Qt::Unchecked : Qt::Checked; |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
435 |
itemData->setContentWidgetData("checkState", revertedCheckState); |
37 | 436 |
} |
437 |
||
438 |
if (serviceGroup & ServiceGroupData) { |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
439 |
CpSettingFormItemData* itemData = item(ServiceGroupData, condition); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
440 |
int checkState = itemData->contentWidgetData("checkState").toInt(); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
441 |
int revertedCheckState = |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
442 |
Qt::Checked == checkState ? Qt::Unchecked : Qt::Checked; |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
443 |
itemData->setContentWidgetData("checkState", revertedCheckState); |
37 | 444 |
} |
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
445 |
|
37 | 446 |
DPRINT << ": OUT"; |
447 |
} |
|
448 |
||
449 |
/*! |
|
450 |
CpDivertPluginGroup::item. |
|
451 |
*/ |
|
452 |
CpSettingFormItemData* CpDivertPluginGroup::item( |
|
453 |
PsService service, PsCallDivertingCondition condition) |
|
454 |
{ |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
455 |
DPRINT << ": IN"; |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
456 |
|
37 | 457 |
CpSettingFormItemData *ret = 0; |
458 |
switch (condition) { |
|
459 |
case DivertConditionUnconditional: |
|
460 |
if (service == ServiceGroupVoice) { |
|
461 |
ret = m_DataItemVoiceAllCalls; |
|
462 |
} else { |
|
463 |
ret = m_DataItemVideoAllCalls; |
|
464 |
} |
|
465 |
break; |
|
466 |
case DivertConditionBusy: |
|
467 |
if (service == ServiceGroupVoice) { |
|
468 |
ret = m_DataItemVoiceIfBusy; |
|
469 |
} else { |
|
470 |
ret = m_DataItemVideoIfBusy; |
|
471 |
} |
|
472 |
break; |
|
473 |
case DivertConditionNoReply: |
|
474 |
if (service == ServiceGroupVoice) { |
|
475 |
ret = m_DataItemVoiceIfNotAnswered; |
|
476 |
} else { |
|
477 |
ret = m_DataItemVideoIfNotAnswered; |
|
478 |
} |
|
479 |
break; |
|
480 |
case DivertConditionNotReachable: |
|
481 |
if (service == ServiceGroupVoice) { |
|
482 |
ret = m_DataItemVoiceIfOutOfReach; |
|
483 |
} else { |
|
484 |
ret = m_DataItemVideoIfOutOfReach; |
|
485 |
} |
|
486 |
break; |
|
487 |
case DivertConditionAllConditionalCases: |
|
488 |
if (service == ServiceGroupVoice) { |
|
489 |
ret = m_DataItemVoiceIfNotAvailable; |
|
490 |
} else { |
|
491 |
ret = m_DataItemVideoIfNotAvailable; |
|
492 |
} |
|
493 |
break; |
|
494 |
case DivertConditionAllCalls: |
|
495 |
case DivertConditionUnknown: |
|
496 |
default: |
|
497 |
break; |
|
498 |
} |
|
499 |
Q_CHECK_PTR(ret); |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
500 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
501 |
DPRINT << ": OUT"; |
37 | 502 |
return ret; |
503 |
} |
|
504 |
||
505 |
/*! |
|
506 |
CpDivertPluginGroup::processDivertingRequestQueue. |
|
507 |
*/ |
|
508 |
void CpDivertPluginGroup::processDivertingRequestQueue() |
|
509 |
{ |
|
510 |
DPRINT << ": IN"; |
|
511 |
if (m_divertRequestQueue.isEmpty()) { |
|
512 |
DPRINT << "queue empty : OUT"; |
|
513 |
return; |
|
514 |
} |
|
515 |
CpDivertRequestQueueItem request = m_divertRequestQueue.head(); |
|
516 |
// Command param |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
517 |
m_divertCommand.iServiceGroup = qvariant_cast<PsServiceGroup>( |
37 | 518 |
request.item->property("serviceGroup")); |
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
519 |
m_divertCommand.iCondition = qvariant_cast<PsCallDivertingCondition>( |
37 | 520 |
request.item->property("condition")); |
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
521 |
m_divertCommand.iStatus = DivertingStatusUnknown; |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
522 |
m_divertCommand.iNumber = ""; |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
523 |
m_divertCommand.iNoReplyTimer = 0; |
37 | 524 |
|
525 |
switch (request.request) { |
|
526 |
case ActivateDivert: { |
|
527 |
DPRINT << "activate"; |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
528 |
m_divertCommand.iSetting = RegisterDiverting; |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
529 |
m_activateDivertPhase = PopUpVoiceNumberListQueryPhase; |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
530 |
popUpVoiceNumberListQuery( |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
531 |
request.item->property("queryLabel").toString(), |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
532 |
m_divertCommand.iServiceGroup); |
37 | 533 |
} |
534 |
break; |
|
535 |
case DeactivateDivert: { |
|
536 |
DPRINT << "deactivate"; |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
537 |
m_divertCommand.iSetting = EraseDiverting; |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
538 |
setCallDiverting(m_divertCommand); |
37 | 539 |
} |
540 |
break; |
|
541 |
case CheckDivertStatus: { |
|
542 |
DPRINT << "check status"; |
|
543 |
m_callDivertingWrapper->getCallDivertingStatus( |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
544 |
m_divertCommand.iServiceGroup, |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
545 |
m_divertCommand.iCondition, |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
546 |
bscParam(m_divertCommand.iServiceGroup) ); |
37 | 547 |
|
548 |
if (!CpPhoneNotes::instance()->noteShowing()) { |
|
549 |
CpPhoneNotes::instance()->showGlobalProgressNote( |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
550 |
m_activeProgressNoteId, hbTrId("txt_common_info_requesting")); |
37 | 551 |
} |
552 |
} |
|
553 |
break; |
|
554 |
default: |
|
555 |
DPRINT << "Error: unknown enum value"; |
|
556 |
break; |
|
557 |
} |
|
558 |
||
559 |
DPRINT << ": OUT"; |
|
560 |
} |
|
561 |
||
562 |
/*! |
|
563 |
CpDivertPluginGroup::changeDivertingStateRequested. |
|
564 |
*/ |
|
565 |
void CpDivertPluginGroup::changeDivertingStateRequested( |
|
566 |
CpDivertItemData &item) |
|
567 |
{ |
|
568 |
DPRINT << ": IN"; |
|
569 |
||
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
570 |
DivertRequest event = ActivateDivert; |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
571 |
if (Qt::Checked == item.contentWidgetData("checkState").toInt()) { |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
572 |
event = ActivateDivert; |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
573 |
} else { |
37 | 574 |
event = DeactivateDivert; |
575 |
} |
|
576 |
||
577 |
addToDivertingRequestQueue(event, item); |
|
578 |
DPRINT << ": OUT"; |
|
579 |
} |
|
580 |
||
581 |
/*! |
|
582 |
CpDivertPluginGroup::handleDivertingChanged. |
|
583 |
*/ |
|
584 |
void CpDivertPluginGroup::handleDivertingChanged( |
|
585 |
const PSCallDivertingCommand& aSetting, |
|
586 |
bool aPlural) |
|
587 |
{ |
|
588 |
DPRINT << ": IN"; |
|
589 |
||
590 |
CpPhoneNotes::instance()->cancelNote(m_activeNoteId); |
|
591 |
DPRINT << "aPlural:" << aPlural; |
|
592 |
DPRINT << "iCondition:" << aSetting.iCondition; |
|
593 |
DPRINT << "iNoReplyTimer:" << aSetting.iNoReplyTimer; |
|
594 |
DPRINT << "iNumber:" << aSetting.iNumber; |
|
595 |
DPRINT << "iServiceGroup:" << aSetting.iServiceGroup; |
|
596 |
DPRINT << "iSetting:" << aSetting.iSetting; |
|
597 |
DPRINT << "iStatus:" << aSetting.iStatus; |
|
598 |
||
599 |
changeItemData( |
|
600 |
aSetting.iServiceGroup, |
|
601 |
aSetting.iCondition, aSetting.iStatus, |
|
602 |
aSetting.iNumber, aSetting.iNoReplyTimer); |
|
603 |
||
604 |
updateDependentDivertOptions( |
|
605 |
(DivertConditionUnconditional == aSetting.iCondition) && |
|
606 |
(DivertingStatusActive != aSetting.iStatus) ); |
|
607 |
||
608 |
switch(aSetting.iStatus) { |
|
609 |
case DivertingStatusActive: |
|
610 |
if (aPlural) { |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
611 |
CpPhoneNotes::instance()->showNotificationDialog(hbTrId("txt_phone_info_diverts_activated")); |
37 | 612 |
} else { |
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
613 |
CpPhoneNotes::instance()->showNotificationDialog(hbTrId("txt_phone_info_divert_activated")); |
37 | 614 |
} |
615 |
if (!m_divertToVoiceMailBox) { |
|
616 |
// Number, except vmbx number, will be added to defaultnumber list |
|
617 |
m_callDivertingWrapper->setNewDefaultNumber(aSetting.iNumber); |
|
618 |
} |
|
619 |
break; |
|
620 |
case DivertingStatusNotRegistered: |
|
621 |
case DivertingStatusInactive: |
|
622 |
if (aPlural) { |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
623 |
CpPhoneNotes::instance()->showNotificationDialog(hbTrId("txt_phone_info_diverts_deactivated")); |
37 | 624 |
} else { |
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
625 |
CpPhoneNotes::instance()->showNotificationDialog(hbTrId("txt_phone_info_divert_deactivated")); |
37 | 626 |
} |
627 |
break; |
|
628 |
case DivertingStatusNotProvisioned: |
|
629 |
case DivertingStatusUnknown: |
|
630 |
default: |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
631 |
CpPhoneNotes::instance()->showNotificationDialog(hbTrId("txt_phone_info_request_not_completed")); |
37 | 632 |
} |
633 |
||
634 |
DPRINT << ": OUT"; |
|
635 |
} |
|
636 |
||
637 |
/*! |
|
638 |
CpDivertPluginGroup::handleDivertingStatus. |
|
639 |
*/ |
|
640 |
void CpDivertPluginGroup::handleDivertingStatus( |
|
641 |
QList<PSCallDivertingStatus*> &divertList, |
|
642 |
bool plural) |
|
643 |
{ |
|
644 |
DPRINT << ": IN"; |
|
645 |
DPRINT << "divertList.Size():" << divertList.size(); |
|
646 |
DPRINT << "plural:" << plural; |
|
647 |
||
648 |
foreach(PSCallDivertingStatus* status, divertList) { |
|
649 |
DPRINT << status->iCondition; |
|
650 |
DPRINT << status->iNumber; |
|
651 |
DPRINT << status->iServiceGroup; |
|
652 |
DPRINT << status->iStatus; |
|
653 |
DPRINT << status->iTimeout; |
|
654 |
changeItemData( |
|
655 |
status->iServiceGroup, |
|
656 |
status->iCondition, status->iStatus, |
|
657 |
status->iNumber, status->iTimeout); |
|
658 |
||
659 |
} |
|
660 |
||
661 |
updateDependentDivertOptions(); |
|
662 |
||
663 |
DPRINT << ": OUT"; |
|
664 |
} |
|
665 |
||
666 |
/*! |
|
667 |
CpDivertPluginGroup::handleDivertingError. |
|
668 |
*/ |
|
669 |
void CpDivertPluginGroup::handleDivertingError(int aReason) |
|
670 |
{ |
|
671 |
DPRINT << ": IN : aReason:" << aReason; |
|
672 |
||
673 |
// Update view item for failed request |
|
674 |
if (m_divertRequestQueue.count()) { |
|
675 |
revertItemData( |
|
676 |
qvariant_cast<PsServiceGroup>( |
|
677 |
m_divertRequestQueue.head().item->property("serviceGroup")), |
|
678 |
qvariant_cast<PsCallDivertingCondition>( |
|
679 |
m_divertRequestQueue.head().item->property("condition"))); |
|
680 |
} |
|
681 |
||
682 |
// Clear queue |
|
683 |
m_divertRequestQueue.clear(); |
|
684 |
||
685 |
// Cancel previous note |
|
686 |
CpPhoneNotes::instance()->cancelNote(m_activeNoteId); |
|
687 |
||
688 |
// Show error note |
|
689 |
CpPhoneNotes::instance()->showGlobalErrorNote(m_activeNoteId, aReason); |
|
690 |
||
691 |
DPRINT << ": OUT"; |
|
692 |
} |
|
693 |
||
694 |
/*! |
|
695 |
CpDivertPluginGroup::popUpVoiceNumberListQuery. |
|
696 |
*/ |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
697 |
void CpDivertPluginGroup::popUpVoiceNumberListQuery( |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
698 |
const QString& heading, PsServiceGroup serviceGroup) |
37 | 699 |
{ |
700 |
DPRINT << ": IN"; |
|
701 |
||
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
702 |
m_divertCommand.iNumber = ""; |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
703 |
m_divertToVoiceMailBox = false; |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
704 |
QStringList defNumbers; |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
705 |
QScopedPointer<HbDialog> dialog(createDialog(heading)); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
706 |
HbListWidget *list = new HbListWidget(dialog.data()); |
37 | 707 |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
708 |
QString vmbxNumber; |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
709 |
int vmbxErr = 0; |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
710 |
if (serviceGroup == ServiceGroupVoice) { |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
711 |
vmbxErr = m_callDivertingWrapper->getVoiceMailBoxNumber( |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
712 |
vmbxNumber, ServiceGroupVoice); |
37 | 713 |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
714 |
} else if(serviceGroup == ServiceGroupData) { |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
715 |
vmbxErr = m_callDivertingWrapper->getVoiceMailBoxNumber( |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
716 |
vmbxNumber, ServiceGroupData); |
37 | 717 |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
718 |
} else { |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
719 |
vmbxErr = -1; |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
720 |
// Skip |
37 | 721 |
} |
722 |
||
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
723 |
if (!vmbxErr) { |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
724 |
addItemToListWidget( |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
725 |
list, |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
726 |
hbTrId("txt_phone_setlabel_voice_mbx"), |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
727 |
vmbxNumber ); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
728 |
} |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
729 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
730 |
// Add "old" divert number to list |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
731 |
m_callDivertingWrapper->getDefaultNumbers(defNumbers); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
732 |
int count(defNumbers.count()); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
733 |
for (int i = 0; i < count; i++) { |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
734 |
addItemToListWidget(list, defNumbers[i], defNumbers[i]); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
735 |
} |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
736 |
addItemToListWidget( |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
737 |
list, |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
738 |
hbTrId("txt_phone_list_enter_number_manually"), |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
739 |
KOtherNumber ); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
740 |
dialog->setContentWidget(list); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
741 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
742 |
// Connect list item activation signal to close the popup |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
743 |
QObject::connect(list, |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
744 |
SIGNAL(activated(HbListWidgetItem*)), |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
745 |
dialog.data(), |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
746 |
SLOT(close()), |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
747 |
Qt::UniqueConnection); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
748 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
749 |
// Sets the "Cancel"-action/button |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
750 |
HbAction *cancelAction = new HbAction(hbTrId( |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
751 |
"txt_common_button_cancel"), |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
752 |
dialog.data()); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
753 |
dialog->addAction(cancelAction); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
754 |
QObject::connect(cancelAction, |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
755 |
SIGNAL(triggered(bool)), |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
756 |
dialog.data(), |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
757 |
SLOT(close())); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
758 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
759 |
dialog->open(this, SLOT(voiceNumberListQueryClosed(HbAction *))); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
760 |
if (m_dialog) { |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
761 |
m_dialog->deleteLater(); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
762 |
m_dialog = NULL; |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
763 |
} |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
764 |
m_dialog = dialog.take(); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
765 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
766 |
DPRINT << ": OUT"; |
37 | 767 |
} |
768 |
||
769 |
/*! |
|
770 |
CpDivertPluginGroup::voiceNumberListQueryClosed() |
|
771 |
*/ |
|
772 |
void CpDivertPluginGroup::voiceNumberListQueryClosed(HbAction* action) |
|
773 |
{ |
|
774 |
DPRINT << ": IN"; |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
775 |
HbListWidget *list = NULL; |
37 | 776 |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
777 |
if (m_dialog) { |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
778 |
bool err = QObject::disconnect(m_dialog->contentWidget(), |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
779 |
SIGNAL(activated(HbListWidgetItem*)), |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
780 |
m_dialog, |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
781 |
SLOT(close())); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
782 |
list = qobject_cast<HbListWidget*>(m_dialog->contentWidget()); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
783 |
m_dialog->deleteLater(); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
784 |
m_dialog = NULL; |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
785 |
} |
37 | 786 |
|
787 |
// Enter if cancel wasn't selected |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
788 |
if (!action) { |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
789 |
QString data; |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
790 |
QString text; |
37 | 791 |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
792 |
if (list) { |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
793 |
// Update the view with selected text |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
794 |
data = list->currentItem()->data().toString(); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
795 |
text = list->currentItem()->text(); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
796 |
} |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
797 |
DPRINT << ": data: " << data; |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
798 |
DPRINT << ": text: " << text; |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
799 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
800 |
if (text == hbTrId("txt_phone_setlabel_voice_mbx")) { |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
801 |
m_divertCommand.iNumber = data; |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
802 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
803 |
if (m_divertCommand.iNumber.isEmpty()) { |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
804 |
DPRINT << ": voicemailboxnumber query"; |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
805 |
if (m_divertCommand.iServiceGroup == ServiceGroupVoice) { |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
806 |
m_callDivertingWrapper->queryVoiceMailBoxNumber( |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
807 |
m_divertCommand.iNumber, ServiceGroupVoice); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
808 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
809 |
} else if(m_divertCommand.iServiceGroup == ServiceGroupData) { |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
810 |
m_callDivertingWrapper->queryVoiceMailBoxNumber( |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
811 |
m_divertCommand.iNumber, ServiceGroupData); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
812 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
813 |
} else { |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
814 |
// Skip |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
815 |
} |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
816 |
|
37 | 817 |
} |
818 |
||
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
819 |
if (m_divertCommand.iNumber.isEmpty()) { |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
820 |
nextPhaseForActivateDivert(false); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
821 |
} else { |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
822 |
nextPhaseForActivateDivert(true); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
823 |
} |
37 | 824 |
} else if (data == KOtherNumber) { |
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
825 |
DPRINT << ": open popUpNumberEditor"; |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
826 |
popUpNumberEditor(hbTrId("txt_phone_info_number")); |
37 | 827 |
} else { |
828 |
//TODO if matched contact name not work |
|
829 |
DPRINT << ": else"; |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
830 |
m_divertCommand.iNumber = data; |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
831 |
nextPhaseForActivateDivert(true); |
37 | 832 |
} |
833 |
||
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
834 |
} else { |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
835 |
nextPhaseForActivateDivert(false); |
37 | 836 |
} |
837 |
||
838 |
DPRINT << ": OUT"; |
|
839 |
} |
|
840 |
||
841 |
/*! |
|
842 |
CpDivertPluginGroup::popUpNumberEditor. |
|
843 |
*/ |
|
844 |
void CpDivertPluginGroup::popUpNumberEditor( |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
845 |
const QString& heading) |
37 | 846 |
{ |
847 |
DPRINT << ": IN"; |
|
848 |
||
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
849 |
QScopedPointer<HbDialog> dialog(createDialog(heading)); |
37 | 850 |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
851 |
HbLineEdit *editor = new HbLineEdit(dialog.data()); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
852 |
editor->setInputMethodHints(Qt::ImhDialableCharactersOnly); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
853 |
//Ownership is transferred |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
854 |
dialog->setContentWidget(editor); |
37 | 855 |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
856 |
HbAction *okAction = new HbAction( |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
857 |
hbTrId("txt_common_button_ok"), |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
858 |
dialog.data()); |
37 | 859 |
dialog->addAction(okAction); |
860 |
||
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
861 |
HbAction *cancelAction = new HbAction( |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
862 |
hbTrId("txt_common_button_cancel"), |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
863 |
dialog.data()); |
37 | 864 |
dialog->addAction(cancelAction); |
865 |
||
866 |
dialog->open(this, SLOT(popUpNumberEditorClosed(HbAction*))); |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
867 |
if (m_dialog) { |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
868 |
m_dialog->deleteLater(); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
869 |
m_dialog = NULL; |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
870 |
} |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
871 |
m_dialog = dialog.take(); |
37 | 872 |
|
873 |
DPRINT << ": OUT"; |
|
874 |
} |
|
875 |
||
876 |
/*! |
|
877 |
CpDivertPluginGroup::popUpNumberEditorClosed. |
|
878 |
*/ |
|
879 |
void CpDivertPluginGroup::popUpNumberEditorClosed(HbAction* action) |
|
880 |
{ |
|
881 |
DPRINT << ": IN"; |
|
882 |
bool cancelled(true); |
|
883 |
if (action) { |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
884 |
if (action->text() == hbTrId("txt_common_button_ok")) { |
37 | 885 |
cancelled = false; |
886 |
DPRINT << ": ok selected"; |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
887 |
} |
37 | 888 |
} |
889 |
||
890 |
if (!cancelled) { |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
891 |
HbLineEdit *editor = qobject_cast<HbLineEdit *>(m_dialog->contentWidget()); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
892 |
if (editor) { |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
893 |
m_divertCommand.iNumber = editor->text(); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
894 |
} |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
895 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
896 |
DPRINT << ": m_divertCommand.iNumber " |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
897 |
<< m_divertCommand.iNumber; |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
898 |
if (m_divertCommand.iNumber.isEmpty()) { |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
899 |
CpPhoneNotes::instance()->showNotificationDialog(hbTrId("txt_phone_info_invalid_phone_number")); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
900 |
} |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
901 |
} |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
902 |
if (m_dialog) { |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
903 |
m_dialog->deleteLater(); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
904 |
m_dialog = NULL; |
37 | 905 |
} |
906 |
||
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
907 |
nextPhaseForActivateDivert(!cancelled); |
37 | 908 |
|
909 |
DPRINT << ": OUT"; |
|
910 |
} |
|
911 |
||
912 |
/*! |
|
913 |
CpDivertPluginGroup::setCallDiverting. |
|
914 |
*/ |
|
915 |
void CpDivertPluginGroup::setCallDiverting(PSCallDivertingCommand& command) |
|
916 |
{ |
|
917 |
DPRINT << ": IN"; |
|
918 |
DPRINT << "iCondition:" << command.iCondition; |
|
919 |
DPRINT << "iNoReplyTimer:" << command.iNoReplyTimer; |
|
920 |
DPRINT << "iNumber:" << command.iNumber; |
|
921 |
DPRINT << "iServiceGroup:" << command.iServiceGroup; |
|
922 |
DPRINT << "iSetting:" << command.iSetting; |
|
923 |
DPRINT << "iStatus:" << command.iStatus; |
|
924 |
||
925 |
int result = m_callDivertingWrapper->setCallDiverting( |
|
926 |
command, bscParam(command.iServiceGroup)); |
|
927 |
if (0 == result) { |
|
928 |
if (!CpPhoneNotes::instance()->noteShowing()) { |
|
929 |
CpPhoneNotes::instance()->showGlobalProgressNote( |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
930 |
m_activeProgressNoteId, hbTrId("txt_common_info_requesting")); |
37 | 931 |
} |
932 |
} else { |
|
933 |
handleDivertingError(result); |
|
934 |
} |
|
935 |
||
936 |
DPRINT << ": OUT "; |
|
937 |
} |
|
938 |
||
939 |
/*! |
|
940 |
CpDivertPluginGroup::popUpTimerQuery. |
|
941 |
*/ |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
942 |
void CpDivertPluginGroup::popUpTimerQuery() |
37 | 943 |
{ |
944 |
DPRINT << ": IN"; |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
945 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
946 |
m_divertCommand.iNoReplyTimer = 0; |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
947 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
948 |
QScopedPointer<HbDialog> dialog(createDialog(hbTrId("txt_phone_title_delay"))); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
949 |
HbListWidget *list = new HbListWidget(dialog.data()); |
37 | 950 |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
951 |
addItemToListWidget(list, hbTrId("txt_phone_list_5_seconds"), 5 ); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
952 |
addItemToListWidget(list, hbTrId("txt_phone_list_10_seconds"), 10); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
953 |
addItemToListWidget(list, hbTrId("txt_phone_list_15_seconds"), 15); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
954 |
addItemToListWidget(list, hbTrId("txt_phone_list_20_seconds"), 20); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
955 |
addItemToListWidget(list, hbTrId("txt_phone_list_25_seconds"), 25); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
956 |
addItemToListWidget(list, hbTrId("txt_phone_list_30_seconds"), 30); |
37 | 957 |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
958 |
// Connect list item activation signal to close the popup |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
959 |
QObject::connect( |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
960 |
list, SIGNAL(activated(HbListWidgetItem*)), |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
961 |
dialog.data(), SLOT(close()), |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
962 |
Qt::UniqueConnection); |
37 | 963 |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
964 |
// Sets the "Cancel"-action/button |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
965 |
HbAction *cancelAction = new HbAction(hbTrId("txt_common_button_cancel")); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
966 |
dialog->addAction(cancelAction); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
967 |
dialog->setContentWidget(list); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
968 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
969 |
dialog->open(this, SLOT(popUpTimerQueryClosed(HbAction *))); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
970 |
if (m_dialog) { |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
971 |
m_dialog->deleteLater(); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
972 |
m_dialog = NULL; |
37 | 973 |
} |
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
974 |
m_dialog = dialog.take(); |
37 | 975 |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
976 |
DPRINT << ": OUT"; |
37 | 977 |
} |
978 |
||
979 |
/*! |
|
980 |
CpDivertPluginGroup::popUpTimerQueryClosed. |
|
981 |
*/ |
|
982 |
void CpDivertPluginGroup::popUpTimerQueryClosed(HbAction* action) |
|
983 |
{ |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
984 |
DPRINT << ": IN"; |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
985 |
|
37 | 986 |
// If not cancel action selected |
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
987 |
bool cancelled(true); |
37 | 988 |
if (!action) { |
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
989 |
cancelled = false; |
37 | 990 |
// Update the view with selected text |
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
991 |
HbListWidget *list = qobject_cast<HbListWidget*>(m_dialog->contentWidget()); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
992 |
if (list && list->currentItem()) { |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
993 |
m_divertCommand.iNoReplyTimer = |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
994 |
list->currentItem()->data().toInt(); |
37 | 995 |
} |
996 |
} |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
997 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
998 |
if (m_dialog) { |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
999 |
m_dialog->deleteLater(); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1000 |
m_dialog = NULL; |
37 | 1001 |
} |
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1002 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1003 |
nextPhaseForActivateDivert(!cancelled); |
37 | 1004 |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1005 |
DPRINT << ": OUT: timeout: " << m_divertCommand.iNoReplyTimer; |
37 | 1006 |
} |
1007 |
||
1008 |
||
1009 |
/*! |
|
1010 |
CpDivertPluginGroup::bscParam. |
|
1011 |
*/ |
|
1012 |
int CpDivertPluginGroup::bscParam(PsServiceGroup serviceGroup) |
|
1013 |
{ |
|
1014 |
DPRINT << ": IN"; |
|
1015 |
||
1016 |
int bsc = AllTeleAndBearer; |
|
1017 |
||
1018 |
if (serviceGroup & ServiceGroupVoice) { |
|
1019 |
int alsLine(AlsNotSupported); |
|
1020 |
m_ssSettingsWrapper->get(Als,alsLine); |
|
1021 |
DPRINT << ": alsLine " << alsLine; |
|
1022 |
||
1023 |
if ((alsLine == AlsNotSupported) || (alsLine == AlsPrimary)) { |
|
1024 |
// Etelephony only activates voice service nothing else or causes |
|
1025 |
// voice service status request. |
|
1026 |
bsc = Telephony; |
|
1027 |
} |
|
1028 |
else { // ESSSettingsAlsAlternate |
|
1029 |
// EAltTele only activates alternate service nothing else or causes |
|
1030 |
// alternate service status request. |
|
1031 |
bsc = AltTele; |
|
1032 |
} |
|
1033 |
} |
|
1034 |
||
1035 |
if (serviceGroup & ServiceGroupData) { |
|
1036 |
bsc = AllBearer; |
|
1037 |
} |
|
1038 |
||
1039 |
DPRINT << ": OUT : bsc :" << bsc; |
|
1040 |
return bsc; |
|
1041 |
} |
|
1042 |
||
1043 |
/*! |
|
1044 |
CpDivertPluginGroup::createDialog. |
|
1045 |
*/ |
|
1046 |
HbDialog* CpDivertPluginGroup::createDialog( const QString& heading ) const |
|
1047 |
{ |
|
1048 |
DPRINT << ": IN"; |
|
1049 |
||
1050 |
HbDialog *dialog = new HbDialog(); |
|
1051 |
dialog->setDismissPolicy(HbDialog::NoDismiss); |
|
1052 |
dialog->setTimeout(HbDialog::NoTimeout); |
|
1053 |
dialog->setHeadingWidget(new HbLabel(heading)); |
|
1054 |
||
1055 |
DPRINT << ": OUT"; |
|
1056 |
return dialog; |
|
1057 |
} |
|
1058 |
||
1059 |
/*! |
|
1060 |
CpDivertPluginGroup::addItemToListWidget. |
|
1061 |
*/ |
|
1062 |
void CpDivertPluginGroup::addItemToListWidget(HbListWidget* w, |
|
1063 |
const QString& item, const QString& data) const |
|
1064 |
{ |
|
1065 |
DPRINT << ": IN"; |
|
1066 |
||
1067 |
HbListWidgetItem* o = new HbListWidgetItem(); |
|
1068 |
o->setText(item); |
|
1069 |
o->setData(data); |
|
1070 |
w->addItem(o); |
|
1071 |
||
1072 |
DPRINT << ": OUT"; |
|
1073 |
} |
|
1074 |
||
1075 |
/*! |
|
1076 |
CpDivertPluginGroup::addItemToListWidget. |
|
1077 |
*/ |
|
1078 |
void CpDivertPluginGroup::addItemToListWidget(HbListWidget* w, |
|
1079 |
const QString& item, const int& data) const |
|
1080 |
{ |
|
1081 |
DPRINT << ": IN"; |
|
1082 |
||
1083 |
HbListWidgetItem* o = new HbListWidgetItem(); |
|
1084 |
o->setText(item); |
|
1085 |
o->setData(data); |
|
1086 |
w->addItem(o); |
|
1087 |
||
1088 |
DPRINT << ": OUT"; |
|
1089 |
} |
|
1090 |
||
1091 |
/*! |
|
1092 |
CpDivertPluginGroup::updateDependentDivertOptions. |
|
1093 |
Updates statuses of diverts which are dependent from the status of some |
|
1094 |
other divert. Logic for dependent changes are: |
|
1095 |
1. Activation of all calls divert deactivates other diverts/puts them |
|
1096 |
into quiescent state. |
|
1097 |
2. Deactivation of all calls divert enables diverts in quiescent state. |
|
1098 |
3. Not available option is an abstraction of CFB, CFNry, CFNrc diverts. |
|
1099 |
Enabling/disabling that options changes all the aforementioned diverts |
|
1100 |
at once. |
|
1101 |
*/ |
|
1102 |
void CpDivertPluginGroup::updateDependentDivertOptions(bool fetchFromNetwork) |
|
1103 |
{ |
|
1104 |
DPRINT << ": IN"; |
|
1105 |
||
1106 |
// all calls divert activation deactivates automatically other diverts |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1107 |
QVariant itemState = m_DataItemVoiceAllCalls->contentWidgetData("checkState"); |
37 | 1108 |
if ((itemState.isValid()) && |
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1109 |
(itemState.toInt() == Qt::Checked)) { |
37 | 1110 |
deActivateDependentDivertOption(m_DataItemVoiceIfBusy); |
1111 |
deActivateDependentDivertOption(m_DataItemVoiceIfNotAnswered); |
|
1112 |
deActivateDependentDivertOption(m_DataItemVoiceIfOutOfReach); |
|
1113 |
} else { |
|
1114 |
// Must query data for diverts depending on all calls divert, because |
|
1115 |
// data may have been lost for registered diverts, which were |
|
1116 |
// automatically deactivated due to the activation of all calls divert. |
|
1117 |
activateDependentDivertOption(m_DataItemVoiceIfBusy, fetchFromNetwork); |
|
1118 |
activateDependentDivertOption(m_DataItemVoiceIfNotAnswered, fetchFromNetwork); |
|
1119 |
activateDependentDivertOption(m_DataItemVoiceIfOutOfReach, fetchFromNetwork); |
|
1120 |
} |
|
1121 |
||
1122 |
// all calls divert activation deactivates automatically other diverts |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1123 |
itemState = m_DataItemVideoAllCalls->contentWidgetData("checkState"); |
37 | 1124 |
if ((itemState.isValid()) && |
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1125 |
(itemState.toInt() == Qt::Checked)) { |
37 | 1126 |
deActivateDependentDivertOption(m_DataItemVideoIfBusy); |
1127 |
deActivateDependentDivertOption(m_DataItemVideoIfNotAnswered); |
|
1128 |
deActivateDependentDivertOption(m_DataItemVideoIfOutOfReach); |
|
1129 |
} else { |
|
1130 |
// Must query data for diverts depending on all calls divert, because |
|
1131 |
// data may have been lost for registered diverts, which were |
|
1132 |
// automatically deactivated due to the activation of all calls divert. |
|
1133 |
activateDependentDivertOption(m_DataItemVideoIfBusy, fetchFromNetwork); |
|
1134 |
activateDependentDivertOption(m_DataItemVideoIfNotAnswered, fetchFromNetwork); |
|
1135 |
activateDependentDivertOption(m_DataItemVideoIfOutOfReach, fetchFromNetwork); |
|
1136 |
} |
|
1137 |
||
1138 |
// update not available divert option |
|
1139 |
updateNotAvailableDivertOption(); |
|
1140 |
||
1141 |
DPRINT << ": OUT"; |
|
1142 |
} |
|
1143 |
||
1144 |
/*! |
|
1145 |
CpDivertPluginGroup::deActivateDependentDivertOption. |
|
1146 |
*/ |
|
1147 |
void CpDivertPluginGroup::deActivateDependentDivertOption( |
|
1148 |
CpDivertItemData* item) const |
|
1149 |
{ |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1150 |
DPRINT << ": IN"; |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1151 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1152 |
QVariant itemState = item->contentWidgetData("checkState"); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1153 |
if ((itemState.isValid()) && (itemState == Qt::Checked)) { |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1154 |
item->setContentWidgetData("checkState", Qt::Unchecked); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1155 |
item->setContentWidgetData("text", QString("")); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1156 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1157 |
if (!item->description().isEmpty()) { |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1158 |
item->setDescription( |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1159 |
hbTrId("txt_phone_setlabel_divert_delay_ln_seconds", 0)); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1160 |
} |
37 | 1161 |
} |
1162 |
item->setEnabled(false); |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1163 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1164 |
DPRINT << ": OUT"; |
37 | 1165 |
} |
1166 |
||
1167 |
/*! |
|
1168 |
CpDivertPluginGroup::activateDependentDivertOption. |
|
1169 |
*/ |
|
1170 |
void CpDivertPluginGroup::activateDependentDivertOption( |
|
1171 |
CpDivertItemData* item, bool fetchFromNetwork) |
|
1172 |
{ |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1173 |
DPRINT << ": IN"; |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1174 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1175 |
if ((Qt::Unchecked == item->contentWidgetData("checkState").toInt()) && |
37 | 1176 |
fetchFromNetwork) { |
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1177 |
addToDivertingRequestQueue(CheckDivertStatus, *item); |
37 | 1178 |
} |
1179 |
item->setEnabled(true); |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1180 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1181 |
DPRINT << ": OUT"; |
37 | 1182 |
} |
1183 |
||
1184 |
/*! |
|
1185 |
CpDivertPluginGroup::updateNotAvailableDivertOption. |
|
1186 |
*/ |
|
1187 |
void CpDivertPluginGroup::updateNotAvailableDivertOption() |
|
1188 |
{ |
|
1189 |
DPRINT << ": IN"; |
|
1190 |
||
1191 |
// We must check that both states & numbers match amongst CFB, CRNry and |
|
1192 |
// CFNrc before concluding that not available divert is enabled, because |
|
1193 |
// some networks may not return divert number for inactive diverts. |
|
1194 |
int cfbState = |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1195 |
m_DataItemVoiceIfBusy->contentWidgetData("checkState").toInt(); |
37 | 1196 |
int cfnryState = |
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1197 |
m_DataItemVoiceIfNotAnswered->contentWidgetData("checkState").toInt(); |
37 | 1198 |
int cfnrcState = |
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1199 |
m_DataItemVoiceIfOutOfReach->contentWidgetData("checkState").toInt(); |
37 | 1200 |
QVariant cfbNumber = |
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1201 |
m_DataItemVoiceIfBusy->contentWidgetData("text"); |
37 | 1202 |
QVariant cfnryNumber = |
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1203 |
m_DataItemVoiceIfNotAnswered->contentWidgetData("text"); |
37 | 1204 |
QVariant cfnrcNumber = |
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1205 |
m_DataItemVoiceIfOutOfReach->contentWidgetData("text"); |
37 | 1206 |
|
1207 |
if ((cfbNumber == cfnryNumber) && (cfbNumber == cfnrcNumber) && |
|
1208 |
(cfbState == cfnryState) && (cfbState == cfnrcState)) { |
|
1209 |
m_DataItemVoiceIfNotAvailable->setContentWidgetData( |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1210 |
"text", m_DataItemVoiceIfBusy->contentWidgetData("text")); |
37 | 1211 |
m_DataItemVoiceIfNotAvailable->setContentWidgetData( |
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1212 |
"checkState", m_DataItemVoiceIfBusy->contentWidgetData("checkState")); |
37 | 1213 |
} else { |
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1214 |
m_DataItemVoiceIfNotAvailable->setContentWidgetData("text", ""); |
37 | 1215 |
m_DataItemVoiceIfNotAvailable->setContentWidgetData( |
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1216 |
"checkState", Qt::Unchecked); |
37 | 1217 |
|
1218 |
} |
|
1219 |
// Item dimming |
|
1220 |
m_DataItemVoiceIfNotAvailable->setEnabled( |
|
1221 |
m_DataItemVoiceIfBusy->isEnabled() && |
|
1222 |
m_DataItemVoiceIfNotAnswered->isEnabled() && |
|
1223 |
m_DataItemVoiceIfOutOfReach->isEnabled()); |
|
1224 |
||
1225 |
||
1226 |
// We must check that both states & numbers match amongst CFB, CRNry and |
|
1227 |
// CFNrc before concluding that not available divert is enabled, because |
|
1228 |
// some networks may not return divert number for inactive diverts. |
|
1229 |
cfbState = |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1230 |
m_DataItemVideoIfBusy->contentWidgetData("checkState").toInt(); |
37 | 1231 |
cfnryState = |
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1232 |
m_DataItemVideoIfNotAnswered->contentWidgetData("checkState").toInt(); |
37 | 1233 |
cfnrcState = |
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1234 |
m_DataItemVideoIfOutOfReach->contentWidgetData("checkState").toInt(); |
37 | 1235 |
cfbNumber = |
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1236 |
m_DataItemVideoIfBusy->contentWidgetData("text"); |
37 | 1237 |
cfnryNumber = |
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1238 |
m_DataItemVideoIfNotAnswered->contentWidgetData("text"); |
37 | 1239 |
cfnrcNumber = |
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1240 |
m_DataItemVideoIfOutOfReach->contentWidgetData("text"); |
37 | 1241 |
|
1242 |
if ((cfbNumber == cfnryNumber) && (cfbNumber == cfnrcNumber) && |
|
1243 |
(cfbState == cfnryState) && (cfbState == cfnrcState)) { |
|
1244 |
m_DataItemVideoIfNotAvailable->setContentWidgetData( |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1245 |
"text", m_DataItemVideoIfBusy->contentWidgetData("text")); |
37 | 1246 |
m_DataItemVideoIfNotAvailable->setContentWidgetData( |
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1247 |
"checkState", m_DataItemVideoIfBusy->contentWidgetData("checkState")); |
37 | 1248 |
} else { |
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1249 |
m_DataItemVideoIfNotAvailable->setContentWidgetData("text", ""); |
37 | 1250 |
m_DataItemVideoIfNotAvailable->setContentWidgetData( |
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1251 |
"checkState", Qt::Unchecked); |
37 | 1252 |
} |
1253 |
||
1254 |
// Item dimming |
|
1255 |
m_DataItemVideoIfNotAvailable->setEnabled( |
|
1256 |
m_DataItemVideoIfBusy->isEnabled() && |
|
1257 |
m_DataItemVideoIfNotAnswered->isEnabled() && |
|
1258 |
m_DataItemVideoIfOutOfReach->isEnabled()); |
|
1259 |
||
1260 |
DPRINT << ": OUT"; |
|
1261 |
} |
|
1262 |
||
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1263 |
void CpDivertPluginGroup::nextPhaseForActivateDivert(bool ok) |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1264 |
{ |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1265 |
DPRINT << ": IN"; |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1266 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1267 |
if (ok) { |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1268 |
switch (m_activateDivertPhase) { |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1269 |
case PopUpVoiceNumberListQueryPhase: { |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1270 |
CpDivertRequestQueueItem request = m_divertRequestQueue.head(); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1271 |
if (request.item->property("needTimeoutInfo").toBool()) { |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1272 |
m_activateDivertPhase = PopUpTimerQueryPhase; |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1273 |
popUpTimerQuery(); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1274 |
} else { |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1275 |
m_activateDivertPhase = NonePhase; |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1276 |
setCallDiverting(m_divertCommand); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1277 |
} |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1278 |
} |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1279 |
break; |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1280 |
case PopUpTimerQueryPhase: { |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1281 |
m_activateDivertPhase = NonePhase; |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1282 |
setCallDiverting(m_divertCommand); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1283 |
} |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1284 |
default: |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1285 |
DPRINT << "Error: unknown enum value"; |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1286 |
break; |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1287 |
} |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1288 |
} else { |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1289 |
// Query was cancelled |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1290 |
revertItemData( |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1291 |
m_divertCommand.iServiceGroup, |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1292 |
m_divertCommand.iCondition); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1293 |
m_divertRequestQueue.clear(); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1294 |
m_activateDivertPhase = NonePhase; |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1295 |
} |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1296 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1297 |
DPRINT << ": OUT"; |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1298 |
} |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1299 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1300 |
/*! |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1301 |
CpDivertPluginGroup::itemShown. |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1302 |
*/ |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1303 |
bool CpDivertPluginGroup::isDivertSettingsItem(HbDataFormModelItem* modelItem) { |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1304 |
return ( |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1305 |
modelItem == m_DataItemVoiceAllCalls || |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1306 |
modelItem == m_DataItemVoiceIfBusy || |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1307 |
modelItem == m_DataItemVoiceIfNotAnswered || |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1308 |
modelItem == m_DataItemVoiceIfOutOfReach || |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1309 |
modelItem == m_DataItemVoiceIfNotAvailable || |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1310 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1311 |
modelItem == m_DataItemVideoAllCalls || |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1312 |
modelItem == m_DataItemVideoIfBusy || |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1313 |
modelItem == m_DataItemVideoIfNotAnswered || |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1314 |
modelItem == m_DataItemVideoIfOutOfReach || |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1315 |
modelItem == m_DataItemVideoIfNotAvailable |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1316 |
); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1317 |
} |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1318 |
|
37 | 1319 |
// End of File. |