author | hgs |
Wed, 20 Oct 2010 14:52:56 +0300 | |
changeset 80 | 9dcba1ee99f7 |
parent 77 | d1838696558c |
permissions | -rw-r--r-- |
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1 |
/* |
44 | 2 |
* Copyright (c) 2009-2010 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: This module contains the implementation of IAUpdateEngine |
|
15 |
* class member functions. |
|
16 |
* |
|
17 |
*/ |
|
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
18 |
|
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
19 |
#include <qapplication.h> |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
20 |
#include <hbmessagebox.h> |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
21 |
#include <hbaction.h> |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
22 |
#include <eikenv.h> |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
23 |
#include <centralrepository.h> |
44 | 24 |
#include <cmmanager.h> |
25 |
#include <cmdestination.h> |
|
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
26 |
#include <rconnmon.h> |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
27 |
#include <apgwgnam.h> |
33
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
28 |
#include <starterclient.h> |
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
29 |
|
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
30 |
#include "iaupdateengine.h" |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
31 |
#include "iaupdateserviceprovider.h" |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
32 |
#include "iaupdateuicontroller.h" |
33
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
33 |
#include "iaupdatefwupdatehandler.h" |
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
34 |
#include "iaupdategloballockhandler.h" |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
35 |
#include "iaupdatenodefilter.h" |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
36 |
#include "iaupdateresult.h" |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
37 |
#include "iaupdateprivatecrkeys.h" |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
38 |
#include "iaupdateuiconfigdata.h" |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
39 |
#include "iaupdatequeryhistory.h" |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
40 |
#include "iaupdateparameters.h" |
33
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
41 |
#include "iaupdateagreement.h" |
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
42 |
#include "iaupdateautomaticcheck.h" |
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
43 |
#include "iaupdateresultsdialog.h" |
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
44 |
#include "iaupdatedebug.h" |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
45 |
|
44 | 46 |
IAUpdateEngine::IAUpdateEngine(QObject *parent) : |
47 |
QObject(parent) |
|
48 |
{ |
|
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
49 |
IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::IAUpdateEngine() begin"); |
42
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
50 |
iController = NULL; |
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
51 |
iFwUpdateHandler = NULL; |
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
52 |
iGlobalLockHandler = NULL; |
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
53 |
iAutomaticCheck = NULL; |
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
54 |
iIdle = NULL; |
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
55 |
iIdleAutCheck = NULL; |
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
56 |
iEikEnv = CEikonEnv::Static(); |
42
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
57 |
mUpdateNow = false; |
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
58 |
mRequestIssued = false; |
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
59 |
mStartedFromApplication = false; |
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
60 |
mUiRefreshAllowed = true; |
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
61 |
mWgId = 0; |
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
62 |
mUpdatequeryUid = 0; |
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
63 |
mDialogState = NoDialog; |
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
64 |
mResultsDialog = NULL; |
33
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
65 |
mServiceProvider = NULL; |
44 | 66 |
mServiceProvider = new IAUpdateServiceProvider(*this); |
67 |
connect(mServiceProvider, SIGNAL(clientDisconnected()), this, |
|
68 |
SLOT(handleAllClientsClosed())); |
|
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
69 |
TRAP_IGNORE( iController = CIAUpdateUiController::NewL( *this )); |
33
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
70 |
IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::IAUpdateEngine() end"); |
44 | 71 |
} |
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
72 |
|
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
73 |
IAUpdateEngine::~IAUpdateEngine() |
44 | 74 |
{ |
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
75 |
IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::~IAUpdateEngine() begin"); |
44 | 76 |
InformRequestObserver(KErrCancel); |
77 | 77 |
if (iController) |
78 |
{ |
|
79 |
delete iController; |
|
80 |
} |
|
81 |
||
33
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
82 |
if (iIdle) |
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
83 |
{ |
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
84 |
delete iIdle; |
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
85 |
} |
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
86 |
if (iIdleAutCheck) |
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
87 |
{ |
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
88 |
delete iIdleAutCheck; |
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
89 |
} |
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
90 |
if (iGlobalLockHandler) |
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
91 |
{ |
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
92 |
delete iGlobalLockHandler; |
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
93 |
} |
44 | 94 |
if (iAutomaticCheck) |
42
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
95 |
{ |
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
96 |
delete iAutomaticCheck; |
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
97 |
} |
77 | 98 |
|
44 | 99 |
if (iFwUpdateHandler) |
33
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
100 |
{ |
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
101 |
delete iFwUpdateHandler; |
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
102 |
} |
44 | 103 |
if (mServiceProvider) |
33
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
104 |
{ |
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
105 |
delete mServiceProvider; |
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
106 |
} |
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
107 |
IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::~IAUpdateEngine() end"); |
44 | 108 |
} |
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
109 |
|
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
110 |
// ----------------------------------------------------------------------------- |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
111 |
// IAUpdateEngine::StartedByLauncherL |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
112 |
// |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
113 |
// ----------------------------------------------------------------------------- |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
114 |
// |
44 | 115 |
void IAUpdateEngine::StartedByLauncherL(bool aRefreshFromNetworkDenied) |
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
116 |
{ |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
117 |
IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::StartedByLauncherL() begin"); |
80 | 118 |
emit createUI(); |
42
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
119 |
mRequestIssued = true; |
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
120 |
mRequestType = IAUpdateUiDefines::ENoRequest; |
44 | 121 |
iController->SetRequestType(mRequestType); |
122 |
SetVisibleL(true); |
|
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
123 |
CIAUpdateParameters* params = iController->ParamsReadAndRemoveFileL(); |
44 | 124 |
iController->CheckUpdatesDeferredL(params, aRefreshFromNetworkDenied); |
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
125 |
} |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
126 |
|
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
127 |
// ----------------------------------------------------------------------------- |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
128 |
// IAUpdateEngine::CheckUpdatesRequestL |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
129 |
// |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
130 |
// ----------------------------------------------------------------------------- |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
131 |
// |
44 | 132 |
void IAUpdateEngine::CheckUpdatesRequestL(int wgid, |
133 |
CIAUpdateParameters* aFilterParams, bool aForcedRefresh) |
|
134 |
||
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
135 |
{ |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
136 |
IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::CheckUpdatesRequestL() begin"); |
44 | 137 |
SetClientWgId(wgid); |
42
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
138 |
mRequestIssued = true; |
44 | 139 |
mStartedFromApplication = true; |
140 |
CleanupStack::PushL(aFilterParams); |
|
141 |
if (wgid > 0) |
|
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
142 |
{ |
44 | 143 |
HideApplicationInFSWL(true); |
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
144 |
} |
44 | 145 |
CleanupStack::Pop(aFilterParams); |
146 |
||
147 |
if (!aFilterParams->ShowProgress()) |
|
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
148 |
{ |
44 | 149 |
iEikEnv->RootWin().SetOrdinalPosition(-1, ECoeWinPriorityNeverAtFront); |
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
150 |
} |
44 | 151 |
|
152 |
mRequestType = IAUpdateUiDefines::ECheckUpdates; |
|
153 |
iController->SetRequestType(mRequestType); |
|
154 |
iController->SetForcedRefresh(aForcedRefresh); |
|
155 |
||
156 |
iController->CheckUpdatesDeferredL(aFilterParams, false); |
|
157 |
||
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
158 |
IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::CheckUpdatesRequestL() end"); |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
159 |
} |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
160 |
|
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
161 |
// ----------------------------------------------------------------------------- |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
162 |
// IAUpdateEngine::ShowUpdatesRequestL |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
163 |
// |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
164 |
// ----------------------------------------------------------------------------- |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
165 |
// |
44 | 166 |
void IAUpdateEngine::ShowUpdatesRequestL(int wgid, |
167 |
CIAUpdateParameters* aFilterParams) |
|
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
168 |
{ |
44 | 169 |
IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::ShowUpdatesRequestL() begin"); |
80 | 170 |
emit createUI(); |
44 | 171 |
SetClientWgId(wgid); |
42
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
172 |
mRequestIssued = true; |
44 | 173 |
// delete iBackgroundTimer; |
174 |
// iBackgroundTimer = NULL; |
|
175 |
mStartedFromApplication = true; |
|
176 |
CleanupStack::PushL(aFilterParams); |
|
177 |
if (wgid > 0) |
|
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
178 |
{ |
44 | 179 |
HideApplicationInFSWL(true); |
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
180 |
} |
44 | 181 |
|
42
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
182 |
//StatusPane()->MakeVisible( true ); |
44 | 183 |
iEikEnv->RootWin().SetOrdinalPosition(0, ECoeWinPriorityNormal); |
184 |
||
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
185 |
//iRequestObserver = &aObserver; |
42
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
186 |
mRequestType = IAUpdateUiDefines::EShowUpdates; |
44 | 187 |
iController->SetRequestType(mRequestType); |
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
188 |
|
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
189 |
//if ( !iMainView ) |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
190 |
// { |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
191 |
// iMainView = CIAUpdateMainView::NewL( ClientRect() ); |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
192 |
// AddViewL( iMainView ); |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
193 |
// } |
44 | 194 |
|
195 |
||
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
196 |
// by pushing object to cleanup stack its destructor is called if leave happens |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
197 |
// so global lock issued by this instance can be released in destructor of CIAUpdateGlobalLockHandler |
44 | 198 |
CIAUpdateGlobalLockHandler* globalLockHandler = |
199 |
CIAUpdateGlobalLockHandler::NewLC(); |
|
200 |
if (!globalLockHandler->InUseByAnotherInstanceL()) |
|
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
201 |
{ |
44 | 202 |
globalLockHandler->SetToInUseForAnotherInstancesL(true); |
203 |
CleanupStack::Pop(globalLockHandler); |
|
204 |
CleanupStack::Pop(aFilterParams); |
|
205 |
CleanupStack::PushL(globalLockHandler); |
|
206 |
iController->CheckUpdatesDeferredL(aFilterParams, false); |
|
207 |
CleanupStack::Pop(globalLockHandler); |
|
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
208 |
delete iGlobalLockHandler; |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
209 |
iGlobalLockHandler = globalLockHandler; |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
210 |
//now possible deletion of iGlobalLockHandler in leave situation is handled |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
211 |
//in HandleLeaveErrorL() and HandleLeaveErrorWithoutLeave methods. |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
212 |
} |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
213 |
else |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
214 |
{ |
44 | 215 |
CleanupStack::PopAndDestroy(globalLockHandler); |
216 |
CleanupStack::PopAndDestroy(aFilterParams); |
|
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
217 |
// locked by another IAD instance, nothing else to do than just complete client's request. |
44 | 218 |
InformRequestObserver(KErrNone); |
219 |
} |
|
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
220 |
|
44 | 221 |
IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::ShowUpdatesRequestL() end"); |
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
222 |
} |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
223 |
|
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
224 |
// ----------------------------------------------------------------------------- |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
225 |
// IAUpdateEngine::ShowUpdateQueryRequestL |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
226 |
// |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
227 |
// ----------------------------------------------------------------------------- |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
228 |
// |
44 | 229 |
void IAUpdateEngine::ShowUpdateQueryRequestL(int wgid, uint aUid) |
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
230 |
{ |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
231 |
IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::ShowUpdateQueryRequestL begin"); |
80 | 232 |
emit createUI(); |
44 | 233 |
SetClientWgId(wgid); |
42
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
234 |
mRequestIssued = true; |
44 | 235 |
mStartedFromApplication = true; |
42
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
236 |
mUpdatequeryUid = aUid; |
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
237 |
mUpdateNow = false; |
44 | 238 |
if (wgid > 0) |
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
239 |
{ |
44 | 240 |
HideApplicationInFSWL(true); |
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
241 |
} |
42
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
242 |
mRequestType = IAUpdateUiDefines::EUpdateQuery; |
44 | 243 |
|
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
244 |
delete iIdle; |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
245 |
iIdle = NULL; |
44 | 246 |
iIdle = CIdle::NewL(CActive::EPriorityIdle); |
247 |
iIdle->Start(TCallBack(UpdateQueryCallbackL, this)); |
|
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
248 |
IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::ShowUpdateQueryRequestL end") |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
249 |
} |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
250 |
|
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
251 |
// ----------------------------------------------------------------------------- |
33
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
252 |
// IAUpdateEngine::StartUpdate |
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
253 |
// |
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
254 |
// ----------------------------------------------------------------------------- |
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
255 |
// |
44 | 256 |
void IAUpdateEngine::StartUpdate(bool aFirmwareUpdate) |
33
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
257 |
{ |
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
258 |
IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::StartUpdate() begin"); |
44 | 259 |
if (aFirmwareUpdate) |
33
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
260 |
{ |
44 | 261 |
if (!iFwUpdateHandler) |
33
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
262 |
{ |
77 | 263 |
TRAP_IGNORE(CIAUpdateFWUpdateHandler::NewL()); |
33
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
264 |
} |
44 | 265 |
if (iFwUpdateHandler) |
33
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
266 |
{ |
77 | 267 |
iFwUpdateHandler->FirmWareUpdatewithFOTA(this); |
33
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
268 |
} |
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
269 |
} |
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
270 |
else |
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
271 |
{ |
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
272 |
// by pushing object to cleanup stack it's destructor is called if leave happens |
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
273 |
// so global lock issued by this instance can be released in destructor of CIAUpdateGlobalLockHandler |
44 | 274 |
CIAUpdateGlobalLockHandler* globalLockHandler = |
275 |
CIAUpdateGlobalLockHandler::NewLC(); |
|
276 |
if (!globalLockHandler->InUseByAnotherInstanceL()) |
|
33
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
277 |
{ |
44 | 278 |
globalLockHandler->SetToInUseForAnotherInstancesL(true); |
33
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
279 |
// No need to be totally silent since the updating is started |
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
280 |
// by user. |
44 | 281 |
SetDefaultConnectionMethodL(false); |
33
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
282 |
iController->StartUpdateL(); |
44 | 283 |
CleanupStack::Pop(globalLockHandler); |
33
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
284 |
delete iGlobalLockHandler; |
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
285 |
iGlobalLockHandler = globalLockHandler; |
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
286 |
//now possible deletion of iGlobalLockHandler in leave situation is handled |
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
287 |
//in HandleLeaveErrorL() and HandleLeaveErrorWithoutLeave methods. |
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
288 |
} |
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
289 |
else |
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
290 |
{ |
44 | 291 |
CleanupStack::PopAndDestroy(globalLockHandler); |
33
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
292 |
} |
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
293 |
} |
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
294 |
IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::StartUpdate() end"); |
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
295 |
} |
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
296 |
|
77 | 297 |
|
33
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
298 |
// ----------------------------------------------------------------------------- |
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
299 |
// IAUpdateEngine::SetVisibleL |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
300 |
// |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
301 |
// ----------------------------------------------------------------------------- |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
302 |
// |
44 | 303 |
void IAUpdateEngine::SetVisibleL(bool /*aVisible*/) |
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
304 |
{ |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
305 |
IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::SetVisibleL() begin"); |
44 | 306 |
//IAUPDATE_TRACE_1("[IAUPDATE] visible: %d", aVisible ); |
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
307 |
/*if ( aVisible ) |
44 | 308 |
{ |
309 |
if ( iEikonEnv->RootWin().OrdinalPosition() != 0 || iEikonEnv->RootWin().OrdinalPriority() != ECoeWinPriorityNormal ) |
|
310 |
{ |
|
311 |
iEikonEnv->RootWin().SetOrdinalPosition( 0, ECoeWinPriorityNormal ); |
|
312 |
} |
|
313 |
||
314 |
StatusPane()->MakeVisible( ETrue ); |
|
315 |
iMainView = CIAUpdateMainView::NewL( ClientRect() ); |
|
316 |
AddViewL( iMainView ); |
|
317 |
ActivateLocalViewL( TUid::Uid( EIAUpdateMainViewId ) ); |
|
318 |
} |
|
319 |
else |
|
320 |
{ |
|
321 |
iEikonEnv->RootWin().SetOrdinalPosition( -1, ECoeWinPriorityNeverAtFront ); |
|
322 |
StatusPane()->MakeVisible( EFalse ); |
|
323 |
}*/ |
|
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
324 |
IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::SetVisibleL() end"); |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
325 |
} |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
326 |
|
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
327 |
// ----------------------------------------------------------------------------- |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
328 |
// IAUpdateEngine::SetClientWgId |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
329 |
// |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
330 |
// ----------------------------------------------------------------------------- |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
331 |
// |
44 | 332 |
void IAUpdateEngine::SetClientWgId(int aWgId) |
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
333 |
{ |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
334 |
IAUPDATE_TRACE_1("[IAUPDATE] IAUpdateEngine::SetClientWgId() wgId %d", aWgId ); |
42
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
335 |
mWgId = aWgId; |
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
336 |
} |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
337 |
|
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
338 |
// ----------------------------------------------------------------------------- |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
339 |
// IAUpdateEngine::ClientInBackgroundL |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
340 |
// |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
341 |
// ----------------------------------------------------------------------------- |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
342 |
// |
42
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
343 |
bool IAUpdateEngine::ClientInBackgroundL() const |
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
344 |
{ |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
345 |
IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::ClientInBackgroundL() begin"); |
42
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
346 |
bool inBackground = false; |
44 | 347 |
if (mWgId > 0) |
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
348 |
{ |
44 | 349 |
CArrayFixFlat<int>* wgArray = new (ELeave) CArrayFixFlat<int> (10); |
350 |
CleanupStack::PushL(wgArray); |
|
351 |
User::LeaveIfError(iEikEnv->WsSession().WindowGroupList(0, wgArray)); |
|
42
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
352 |
int ownWgId = iEikEnv->RootWin().Identifier(); |
44 | 353 |
if ((wgArray->At(0) != ownWgId) && (wgArray->At(0) != mWgId)) |
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
354 |
{ |
42
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
355 |
inBackground = true; |
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
356 |
} |
44 | 357 |
CleanupStack::PopAndDestroy(wgArray); |
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
358 |
} |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
359 |
IAUPDATE_TRACE_1("[IAUPDATE] IAUpdateEngine::ClientInBackgroundL() inBackground: %d", inBackground ); |
44 | 360 |
return inBackground; |
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
361 |
} |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
362 |
|
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
363 |
// ----------------------------------------------------------------------------- |
77 | 364 |
// IAUpdateEngine::Controller() |
365 |
// |
|
366 |
// ----------------------------------------------------------------------------- |
|
367 |
// |
|
368 |
CIAUpdateUiController* IAUpdateEngine::Controller() const |
|
369 |
{ |
|
370 |
return iController; |
|
371 |
} |
|
372 |
||
373 |
||
374 |
||
375 |
||
376 |
||
377 |
// ----------------------------------------------------------------------------- |
|
33
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
378 |
// IAUpdateEngine::handleAllClientsClosed() |
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
379 |
// |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
380 |
// ----------------------------------------------------------------------------- |
33
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
381 |
// |
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
382 |
void IAUpdateEngine::handleAllClientsClosed() |
44 | 383 |
{ |
384 |
qApp->quit(); |
|
385 |
} |
|
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
386 |
|
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
387 |
// ----------------------------------------------------------------------------- |
42
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
388 |
// IAUpdateEngine::dialogFinished |
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
389 |
// Called when dialog is finished. |
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
390 |
// ----------------------------------------------------------------------------- |
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
391 |
// |
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
392 |
void IAUpdateEngine::dialogFinished(HbAction *action) |
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
393 |
{ |
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
394 |
DialogState dialogState = mDialogState; |
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
395 |
mDialogState = NoDialog; |
44 | 396 |
|
397 |
switch (dialogState) |
|
42
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
398 |
{ |
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
399 |
case Results: |
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
400 |
mUiRefreshAllowed = true; |
44 | 401 |
if (iController->ResultsInfo().iRebootAfterInstall) |
42
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
402 |
{ |
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
403 |
ShowRebootDialogL(); |
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
404 |
} |
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
405 |
else |
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
406 |
{ |
44 | 407 |
if (!DoPossibleApplicationClose()) |
408 |
{ |
|
409 |
iController->RefreshNodeList(); |
|
410 |
RefreshUI(); |
|
411 |
} |
|
42
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
412 |
} |
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
413 |
break; |
44 | 414 |
case RebootQuery: |
415 |
if (action == mPrimaryAction) |
|
42
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
416 |
{ |
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
417 |
RStarterSession startersession; |
44 | 418 |
if (startersession.Connect() == KErrNone) |
42
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
419 |
{ |
44 | 420 |
startersession.Reset(RStarterSession::EUnknownReset); |
42
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
421 |
startersession.Close(); |
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
422 |
} |
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
423 |
} |
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
424 |
else |
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
425 |
{ |
44 | 426 |
if (!DoPossibleApplicationClose()) |
427 |
{ |
|
428 |
iController->RefreshNodeList(); |
|
429 |
RefreshUI(); |
|
430 |
} |
|
42
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
431 |
} |
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
432 |
break; |
44 | 433 |
case ShowUpdateQuery: |
42
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
434 |
if (action == mPrimaryAction) |
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
435 |
{ |
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
436 |
IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::dialogFinished() Now"); |
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
437 |
mUpdateNow = true; |
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
438 |
} |
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
439 |
else if (action == mSecondaryAction) |
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
440 |
{ |
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
441 |
IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::dialogFinished() Later"); |
44 | 442 |
CIAUpdateQueryHistory* updateQueryHistory = |
443 |
CIAUpdateQueryHistory::NewL(); |
|
444 |
CleanupStack::PushL(updateQueryHistory); |
|
445 |
updateQueryHistory->SetTimeL(mUpdatequeryUid); |
|
446 |
CleanupStack::PopAndDestroy(updateQueryHistory); |
|
42
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
447 |
} |
44 | 448 |
InformRequestObserver(KErrNone); |
42
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
449 |
break; |
44 | 450 |
default: |
42
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
451 |
break; |
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
452 |
} |
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
453 |
} |
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
454 |
|
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
455 |
// ----------------------------------------------------------------------------- |
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
456 |
// IAUpdateEngine::StartupComplete |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
457 |
// |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
458 |
// ----------------------------------------------------------------------------- |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
459 |
// |
44 | 460 |
void IAUpdateEngine::StartupComplete(TInt aError) |
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
461 |
{ |
44 | 462 |
IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::StartupComplete() begin"); |
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
463 |
IAUPDATE_TRACE_1("[IAUPDATE] error code: %d", aError); |
44 | 464 |
|
465 |
if (aError != KErrNone) |
|
466 |
{ |
|
467 |
HandleLeaveErrorWithoutLeave(aError); |
|
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
468 |
} |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
469 |
else |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
470 |
{ |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
471 |
TRAPD( err, StartupCompleteL() ); |
44 | 472 |
if (err != KErrNone) |
473 |
{ |
|
474 |
HandleLeaveErrorWithoutLeave(err); |
|
475 |
} |
|
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
476 |
} |
44 | 477 |
|
478 |
IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::StartupComplete() end"); |
|
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
479 |
} |
44 | 480 |
|
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
481 |
// ----------------------------------------------------------------------------- |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
482 |
// IAUpdateEngine::StartupCompleteL |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
483 |
// |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
484 |
// ----------------------------------------------------------------------------- |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
485 |
// |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
486 |
void IAUpdateEngine::StartupCompleteL() |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
487 |
{ |
44 | 488 |
IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::StartupCompleteL() begin"); |
489 |
||
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
490 |
delete iGlobalLockHandler; |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
491 |
iGlobalLockHandler = NULL; |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
492 |
iGlobalLockHandler = CIAUpdateGlobalLockHandler::NewL(); |
44 | 493 |
if (!iGlobalLockHandler->InUseByAnotherInstanceL()) |
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
494 |
{ |
42
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
495 |
bool totalSilent(false); |
44 | 496 |
if (mRequestType == IAUpdateUiDefines::ECheckUpdates) |
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
497 |
{ |
44 | 498 |
if (iController->Filter()) |
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
499 |
{ |
44 | 500 |
if (iController->Filter()->FilterParams()) |
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
501 |
{ |
44 | 502 |
if (iController->Filter()->FilterParams()->Refresh()) |
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
503 |
{ |
44 | 504 |
if (!iController->ForcedRefresh()) |
33
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
505 |
{ |
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
506 |
//from bgchecker, make it silent |
42
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
507 |
totalSilent = true; |
33
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
508 |
} |
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
509 |
} |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
510 |
} |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
511 |
} |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
512 |
} |
44 | 513 |
SetDefaultConnectionMethodL(totalSilent); |
42
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
514 |
iGlobalLockHandler->SetToInUseForAnotherInstancesL(true); |
44 | 515 |
iController->StartRefreshL(); |
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
516 |
} |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
517 |
else |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
518 |
{ |
44 | 519 |
RefreshCompleteL(true, KErrServerBusy); |
520 |
} |
|
521 |
||
522 |
IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::StartupCompleteL() end"); |
|
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
523 |
} |
33
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
524 |
|
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
525 |
// ----------------------------------------------------------------------------- |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
526 |
// IAUpdateEngine::HandleLeaveErrorL |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
527 |
// |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
528 |
// ----------------------------------------------------------------------------- |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
529 |
// |
44 | 530 |
void IAUpdateEngine::HandleLeaveErrorL(TInt aError) |
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
531 |
{ |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
532 |
IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::HandleLeaveErrorL() begin"); |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
533 |
//removal of iGlobalLockHandler releases possible global operation lock to other IAD instances |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
534 |
delete iGlobalLockHandler; |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
535 |
iGlobalLockHandler = NULL; |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
536 |
// client request is completed before leave in case of leave error |
44 | 537 |
if (aError != KErrNone) |
538 |
{ |
|
539 |
InformRequestObserver(aError); |
|
540 |
User::Leave(aError); |
|
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
541 |
} |
44 | 542 |
|
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
543 |
IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::HandleLeaveErrorL() end"); |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
544 |
} |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
545 |
|
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
546 |
// ----------------------------------------------------------------------------- |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
547 |
// IAUpdateEngine::HandleLeaveErrorWithoutLeave |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
548 |
// |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
549 |
// ----------------------------------------------------------------------------- |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
550 |
// |
44 | 551 |
void IAUpdateEngine::HandleLeaveErrorWithoutLeave(TInt aError) |
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
552 |
{ |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
553 |
IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::HandleLeaveErrorWithoutLeave() begin"); |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
554 |
//removal of iGlobalLockHandler releases possible global operation lock to other IAD instances |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
555 |
delete iGlobalLockHandler; |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
556 |
iGlobalLockHandler = NULL; |
44 | 557 |
if (aError != KErrNone) |
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
558 |
{ |
44 | 559 |
InformRequestObserver(aError); |
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
560 |
} |
44 | 561 |
if (aError == KErrDiskFull) |
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
562 |
{ |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
563 |
//TRAP_IGNORE( ShowGlobalErrorNoteL( aError ) ); |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
564 |
} |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
565 |
IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::HandleLeaveErrorWithoutLeave end"); |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
566 |
} |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
567 |
|
44 | 568 |
// ----------------------------------------------------------------------------- |
569 |
// IAUpdateEngine::RefreshUI |
|
570 |
// |
|
571 |
// ----------------------------------------------------------------------------- |
|
572 |
// |
|
573 |
void IAUpdateEngine::RefreshUI() |
|
574 |
{ |
|
575 |
emit refresh(iController->Nodes(), iController->FwNodes(), KErrNone); |
|
576 |
} |
|
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
577 |
|
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
578 |
// ----------------------------------------------------------------------------- |
77 | 579 |
// IAUpdateEngine::RefreshUIProgress |
580 |
// |
|
581 |
// ----------------------------------------------------------------------------- |
|
582 |
// |
|
583 |
void IAUpdateEngine::RefreshUIProgress() |
|
584 |
{ |
|
585 |
emit refreshProgress(); |
|
586 |
} |
|
587 |
||
588 |
// ----------------------------------------------------------------------------- |
|
589 |
// IAUpdateEngine::SetUpdatesRefreshing |
|
590 |
// |
|
591 |
// ----------------------------------------------------------------------------- |
|
592 |
// |
|
593 |
void IAUpdateEngine::SetUpdatesRefreshing( TBool aRefreshing ) |
|
594 |
{ |
|
595 |
emit setUpdatesRefreshing(aRefreshing); |
|
596 |
} |
|
597 |
||
598 |
// ----------------------------------------------------------------------------- |
|
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
599 |
// IAUpdateEngine::RefreshCompleteL |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
600 |
// |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
601 |
// ----------------------------------------------------------------------------- |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
602 |
// |
44 | 603 |
void IAUpdateEngine::RefreshCompleteL(TBool /*aWithViewActivation*/, |
604 |
TInt aError) |
|
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
605 |
{ |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
606 |
IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::RefreshCompleteL() begin"); |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
607 |
IAUPDATE_TRACE_1("[IAUPDATE] error code: %d", aError ); |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
608 |
//removal of iGlobalLockHandler releases possible global operation lock to other IAD instances |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
609 |
delete iGlobalLockHandler; |
44 | 610 |
iGlobalLockHandler = NULL; |
611 |
||
612 |
if (mRequestType == IAUpdateUiDefines::ECheckUpdates) |
|
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
613 |
{ |
44 | 614 |
InformRequestObserver(aError); |
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
615 |
} |
44 | 616 |
else |
617 |
{ |
|
618 |
emit refresh(iController->Nodes(), iController->FwNodes(), aError); |
|
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
619 |
//if ( aWithViewActivation) |
44 | 620 |
// { |
621 |
// ActivateLocalViewL( TUid::Uid( EIAUpdateMainViewId ) ); |
|
622 |
// } |
|
33
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
623 |
CIAUpdateAgreement* agreement = CIAUpdateAgreement::NewLC(); |
42
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
624 |
bool agreementAccepted = agreement->AgreementAcceptedL(); |
44 | 625 |
if (iController->ForcedRefresh()) |
33
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
626 |
{ |
44 | 627 |
if (!agreementAccepted) |
33
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
628 |
{ |
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
629 |
agreement->SetAgreementAcceptedL(); |
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
630 |
} |
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
631 |
} |
44 | 632 |
CleanupStack::PopAndDestroy(agreement); |
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
633 |
// By calling CIdle possible waiting dialog can be closed before |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
634 |
// automatic check where a new dialog may be launched |
33
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
635 |
delete iIdleAutCheck; |
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
636 |
iIdleAutCheck = NULL; |
44 | 637 |
iIdleAutCheck = CIdle::NewL(CActive::EPriorityIdle); |
638 |
iIdleAutCheck->Start(TCallBack(AutomaticCheckCallbackL, this)); |
|
639 |
} |
|
640 |
||
641 |
IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::RefreshCompleteL() end"); |
|
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
642 |
} |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
643 |
|
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
644 |
// ----------------------------------------------------------------------------- |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
645 |
// IAUpdateEngine::UpdateCompleteL |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
646 |
// |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
647 |
// ----------------------------------------------------------------------------- |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
648 |
// |
44 | 649 |
void IAUpdateEngine::UpdateCompleteL(TInt aError) |
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
650 |
{ |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
651 |
IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::UpdateCompleteL begin"); |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
652 |
IAUPDATE_TRACE_1("[IAUPDATE] error code: %d", aError ); |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
653 |
//removal of iGlobalLockHandler releases possible global operation lock to other IAD instances |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
654 |
delete iGlobalLockHandler; |
44 | 655 |
iGlobalLockHandler = NULL; |
656 |
if (mRequestType != IAUpdateUiDefines::ENoRequest) |
|
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
657 |
{ |
44 | 658 |
InformRequestObserver(aError); |
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
659 |
} |
44 | 660 |
|
77 | 661 |
emit updateCompleted(); |
42
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
662 |
ShowResultsDialogL(); |
44 | 663 |
|
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
664 |
IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::UpdateCompleteL end"); |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
665 |
} |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
666 |
|
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
667 |
// ----------------------------------------------------------------------------- |
77 | 668 |
// IAUpdateEngine::PreparingStarted |
669 |
// |
|
670 |
// ----------------------------------------------------------------------------- |
|
671 |
// |
|
672 |
void IAUpdateEngine::PreparingStarted() |
|
673 |
{ |
|
674 |
||
675 |
} |
|
676 |
||
677 |
// ----------------------------------------------------------------------------- |
|
678 |
// IAUpdateEngine::Prepared |
|
679 |
// |
|
680 |
// ----------------------------------------------------------------------------- |
|
681 |
// |
|
682 |
void IAUpdateEngine::Prepared() |
|
683 |
{ |
|
684 |
emit updateCompleted(); |
|
685 |
} |
|
686 |
||
687 |
// ----------------------------------------------------------------------------- |
|
33
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
688 |
// IAUpdateEngine::ShowResultsDialogL |
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
689 |
// |
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
690 |
// ----------------------------------------------------------------------------- |
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
691 |
// |
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
692 |
void IAUpdateEngine::ShowResultsDialogL() |
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
693 |
{ |
44 | 694 |
IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::ShowResultsDialogL() begin"); |
695 |
||
42
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
696 |
mUiRefreshAllowed = false; |
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
697 |
mResultsDialog = new IAUpdateResultsDialog(this); |
44 | 698 |
mResultsDialog->showResults(iController->ResultsInfo(), this, |
699 |
SLOT(dialogFinished(HbAction*))); |
|
42
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
700 |
mDialogState = Results; |
44 | 701 |
|
33
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
702 |
IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::ShowResultsDialogL() end"); |
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
703 |
} |
44 | 704 |
|
33
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
705 |
// ----------------------------------------------------------------------------- |
42
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
706 |
// IAUpdateEngine::ShowRebootDialogL |
33
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
707 |
// |
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
708 |
// ----------------------------------------------------------------------------- |
42
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
709 |
// |
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
710 |
void IAUpdateEngine::ShowRebootDialogL() |
33
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
711 |
{ |
42
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
712 |
IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::ShowRebootDialogL() begin"); |
44 | 713 |
|
714 |
HbMessageBox *messageBox = new HbMessageBox( |
|
715 |
HbMessageBox::MessageTypeQuestion); |
|
77 | 716 |
messageBox->setText |
717 |
(hbTrId("txt_software_info_device_restart_is_needed_restar")); |
|
42
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
718 |
int actionCount = messageBox->actions().count(); |
44 | 719 |
for (int i = actionCount - 1; i >= 0; i--) |
720 |
{ |
|
42
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
721 |
messageBox->removeAction(messageBox->actions().at(i)); |
44 | 722 |
} |
42
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
723 |
mPrimaryAction = NULL; |
77 | 724 |
mPrimaryAction = new HbAction(hbTrId("txt_common_button_ok")); |
42
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
725 |
HbAction *secondaryAction = NULL; |
77 | 726 |
secondaryAction = new HbAction(hbTrId("txt_common_button_cancel")); |
33
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
727 |
|
42
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
728 |
messageBox->addAction(mPrimaryAction); |
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
729 |
messageBox->addAction(secondaryAction); |
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
730 |
messageBox->setTimeout(HbPopup::NoTimeout); |
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
731 |
messageBox->setAttribute(Qt::WA_DeleteOnClose); |
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
732 |
messageBox->open(this, SLOT(dialogFinished(HbAction*))); |
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
733 |
mDialogState = RebootQuery; |
44 | 734 |
|
42
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
735 |
IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::ShowRebootDialogL() end"); |
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
736 |
} |
33
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
737 |
|
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
738 |
// ----------------------------------------------------------------------------- |
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
739 |
// IAUpdateEngine::InformRequestObserver |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
740 |
// |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
741 |
// ----------------------------------------------------------------------------- |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
742 |
// |
44 | 743 |
void IAUpdateEngine::InformRequestObserver(int aError) |
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
744 |
{ |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
745 |
IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::InformRequestObserver() begin"); |
44 | 746 |
|
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
747 |
//if ( iRequestObserver ) |
44 | 748 |
if (mRequestIssued) |
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
749 |
{ |
44 | 750 |
if (iController->ClosingAllowedByClient()) |
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
751 |
{ |
44 | 752 |
if (mRequestType != IAUpdateUiDefines::ENoRequest) |
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
753 |
{ |
44 | 754 |
// if ( iRequestType == IAUpdateUiDefines::EUpdateQuery && iUpdateNow ) |
755 |
// { |
|
756 |
// if ( !iBackgroundTimer ) |
|
757 |
// { |
|
758 |
// iBackgroundTimer = CIAUpdateUITimer::NewL( *this, CIAUpdateUITimer::EBackgroundDelay ); |
|
759 |
// } |
|
760 |
// if ( !iBackgroundTimer->IsActive() ) |
|
761 |
// { |
|
762 |
// iBackgroundTimer->After( 500000 ); |
|
763 |
// } |
|
764 |
// } |
|
765 |
// else |
|
766 |
// { |
|
767 |
iEikEnv->RootWin().SetOrdinalPosition(-1, |
|
768 |
ECoeWinPriorityNeverAtFront); |
|
769 |
// } |
|
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
770 |
} |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
771 |
} |
44 | 772 |
|
773 |
switch (mRequestType) |
|
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
774 |
{ |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
775 |
case IAUpdateUiDefines::ENoRequest: |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
776 |
{ |
44 | 777 |
mServiceProvider->completeLauncherLaunch(aError); |
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
778 |
break; |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
779 |
} |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
780 |
case IAUpdateUiDefines::ECheckUpdates: |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
781 |
{ |
44 | 782 |
mServiceProvider->completeCheckUpdates( |
783 |
iController->CountOfAvailableUpdates(), aError); |
|
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
784 |
break; |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
785 |
} |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
786 |
case IAUpdateUiDefines::EShowUpdates: |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
787 |
{ |
44 | 788 |
CIAUpdateResult* result(NULL); |
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
789 |
TRAPD( error, result = CIAUpdateResult::NewL() ) |
44 | 790 |
if (result) |
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
791 |
{ |
44 | 792 |
TIAUpdateResultsInfo resultsInfo( |
793 |
iController->ResultsInfo()); |
|
794 |
IAUPDATE_TRACE_3("[IAUPDATE] IAUpdateEngine::InformRequestObserver succeed: %d failed: %d cancelled: %d", |
|
795 |
resultsInfo.iCountSuccessfull, |
|
796 |
resultsInfo.iCountFailed, |
|
797 |
resultsInfo.iCountCancelled ); |
|
798 |
result->SetSuccessCount(resultsInfo.iCountSuccessfull); |
|
799 |
result->SetFailCount(resultsInfo.iCountFailed); |
|
800 |
result->SetCancelCount(resultsInfo.iCountCancelled); |
|
801 |
mServiceProvider->completeShowUpdates(result, aError); |
|
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
802 |
// Ownership of result is transferred here. |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
803 |
} |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
804 |
else |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
805 |
{ |
44 | 806 |
mServiceProvider->completeShowUpdates(NULL, error); |
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
807 |
} |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
808 |
break; |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
809 |
} |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
810 |
case IAUpdateUiDefines::EUpdateQuery: |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
811 |
{ |
44 | 812 |
mServiceProvider->completeUpdateQuery(mUpdateNow, aError); |
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
813 |
break; |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
814 |
} |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
815 |
default: |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
816 |
{ |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
817 |
break; |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
818 |
} |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
819 |
} |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
820 |
|
42
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
821 |
mRequestIssued = false; |
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
822 |
} |
44 | 823 |
|
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
824 |
IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::InformRequestObserver() end"); |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
825 |
} |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
826 |
|
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
827 |
// --------------------------------------------------------------------------- |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
828 |
// IAUpdateEngine::SetDefaultConnectionMethodL |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
829 |
// Sets the connection method for the update network connection. |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
830 |
// --------------------------------------------------------------------------- |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
831 |
// |
44 | 832 |
void IAUpdateEngine::SetDefaultConnectionMethodL(bool aTotalSilent) |
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
833 |
{ |
44 | 834 |
if (aTotalSilent) |
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
835 |
{ |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
836 |
// from back ground checker, choose the IAP to make the internet access silent |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
837 |
IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::SetDefaultConnectionMethodL() begin"); |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
838 |
|
44 | 839 |
uint connectionMethodId(0); |
840 |
int connMethodId(0); |
|
841 |
||
842 |
// Let's first check whether cenrep contains SNAP id other than zero |
|
843 |
CRepository* cenrep(CRepository::NewLC(KCRUidIAUpdateSettings)); |
|
844 |
User::LeaveIfError(cenrep->Get(KIAUpdateAccessPoint, connMethodId)); |
|
845 |
CleanupStack::PopAndDestroy(cenrep); |
|
846 |
cenrep = NULL; |
|
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
847 |
|
44 | 848 |
RCmManager cmManager; |
849 |
cmManager.OpenL(); |
|
850 |
CleanupClosePushL(cmManager); |
|
851 |
||
852 |
if (connMethodId == -1) |
|
853 |
{ |
|
854 |
IAUPDATE_TRACE("[IAUPDATE] user chooses default connection, use IAP logic"); |
|
855 |
||
856 |
//check what is the default connection by users |
|
857 |
||
858 |
TCmDefConnValue DCSetting; |
|
859 |
cmManager.ReadDefConnL(DCSetting); |
|
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
860 |
|
44 | 861 |
switch (DCSetting.iType) |
862 |
{ |
|
863 |
case ECmDefConnAlwaysAsk: |
|
864 |
case ECmDefConnAskOnce: |
|
865 |
{ |
|
866 |
//go with the best IAP under internet snap |
|
867 |
connectionMethodId = GetBestIAPInAllSNAPsL(cmManager); |
|
868 |
break; |
|
869 |
} |
|
870 |
case ECmDefConnDestination: |
|
871 |
{ |
|
872 |
//go with the best IAP under this snap |
|
873 |
connectionMethodId = GetBestIAPInThisSNAPL(cmManager, |
|
874 |
DCSetting.iId); |
|
875 |
break; |
|
876 |
} |
|
877 |
case ECmDefConnConnectionMethod: |
|
878 |
{ |
|
879 |
//go with the best IAP under this snap |
|
880 |
connectionMethodId = DCSetting.iId; |
|
881 |
break; |
|
882 |
} |
|
883 |
} |
|
884 |
} |
|
885 |
else if (connMethodId == 0) |
|
886 |
{ |
|
887 |
//no choice from user, we go with the best IAP under Internent SNAP |
|
888 |
connectionMethodId = GetBestIAPInAllSNAPsL(cmManager); |
|
889 |
} |
|
890 |
else |
|
891 |
{ |
|
892 |
IAUPDATE_TRACE("[IAUPDATE] use chooses a snap"); |
|
893 |
// It was some SNAP value |
|
894 |
connectionMethodId = GetBestIAPInThisSNAPL(cmManager, |
|
895 |
connMethodId); |
|
896 |
} |
|
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
897 |
|
44 | 898 |
CleanupStack::PopAndDestroy(&cmManager); |
899 |
||
900 |
if (connectionMethodId != 0) |
|
901 |
{ |
|
902 |
TIAUpdateConnectionMethod |
|
903 |
connectionMethod( |
|
904 |
connectionMethodId, |
|
905 |
TIAUpdateConnectionMethod::EConnectionMethodTypeAccessPoint); |
|
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
906 |
|
44 | 907 |
iController->SetDefaultConnectionMethodL(connectionMethod); |
908 |
} |
|
909 |
else |
|
910 |
{ |
|
911 |
//In the totally silent case, if no usable IAP, we complete the check update with 0 updates. |
|
912 |
//the bgchecker will try again later after 1 month. |
|
913 |
//The LEAVE will be catched up later and complete the request from background checker. |
|
914 |
User::LeaveIfError(KErrNotFound); |
|
915 |
} |
|
916 |
IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::SetDefaultConnectionMethodL() end"); |
|
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
917 |
} |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
918 |
else |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
919 |
{ |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
920 |
// from grid, use the old logic |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
921 |
IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::SetDefaultConnectionMethodL() begin"); |
44 | 922 |
uint connectionMethodId(0); |
923 |
int connMethodId(0); |
|
924 |
||
925 |
// Set initial value to always ask |
|
926 |
int connectionMethodType( |
|
927 |
TIAUpdateConnectionMethod::EConnectionMethodTypeAlwaysAsk); |
|
928 |
bool needSaving(false); |
|
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
929 |
|
44 | 930 |
// Let's first check whether cenrep contains SNAP id other than zero |
931 |
CRepository* cenrep(CRepository::NewLC(KCRUidIAUpdateSettings)); |
|
932 |
User::LeaveIfError(cenrep->Get(KIAUpdateAccessPoint, connMethodId)); |
|
933 |
CleanupStack::PopAndDestroy(cenrep); |
|
934 |
cenrep = NULL; |
|
935 |
||
936 |
if (connMethodId == -1) |
|
937 |
{ |
|
938 |
IAUPDATE_TRACE("[IAUPDATE] user chooses default connection, use IAP logic"); |
|
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
939 |
|
44 | 940 |
connectionMethodId = 0; |
941 |
connectionMethodType |
|
942 |
= TIAUpdateConnectionMethod::EConnectionMethodTypeDefault; |
|
943 |
} |
|
944 |
else if (connMethodId == 0) |
|
945 |
{ |
|
946 |
IAUPDATE_TRACE("[IAUPDATE] use chooses nothing, use internal IAP logic"); |
|
947 |
//if nothing is set by user, use our new logic |
|
948 |
//SetDefaultConnectionMethod2L(); |
|
949 |
//return; |
|
950 |
// CenRep didn't contain any SNAP id. Let's try Internet SNAP then. |
|
951 |
||
952 |
RCmManager cmManager; |
|
953 |
cmManager.OpenL(); |
|
954 |
CleanupClosePushL(cmManager); |
|
955 |
iDestIdArray.Reset(); |
|
956 |
cmManager.AllDestinationsL(iDestIdArray); |
|
957 |
||
958 |
for (int i = 0; i < iDestIdArray.Count(); i++) |
|
959 |
{ |
|
960 |
RCmDestination dest = cmManager.DestinationL(iDestIdArray[i]); |
|
961 |
CleanupClosePushL(dest); |
|
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
962 |
|
44 | 963 |
if (dest.MetadataL(CMManager::ESnapMetadataInternet)) |
964 |
{ |
|
965 |
// Check whether Internet SNAP contains any IAP. |
|
966 |
if (dest.ConnectionMethodCount() > 0) |
|
967 |
{ |
|
968 |
connectionMethodId = iDestIdArray[i]; |
|
969 |
needSaving = true; |
|
970 |
IAUPDATE_TRACE_1("[IAUPDATE] connectionMethodId: %d", connectionMethodId ); |
|
971 |
} |
|
972 |
CleanupStack::PopAndDestroy(&dest); |
|
973 |
break; |
|
974 |
} |
|
975 |
||
976 |
CleanupStack::PopAndDestroy(&dest); |
|
977 |
} |
|
978 |
iDestIdArray.Reset(); |
|
979 |
CleanupStack::PopAndDestroy(&cmManager); |
|
980 |
} |
|
981 |
else |
|
982 |
{ |
|
983 |
IAUPDATE_TRACE("[IAUPDATE] use chooses a snap"); |
|
984 |
// It was some SNAP value |
|
985 |
connectionMethodId = connMethodId; |
|
986 |
} |
|
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
987 |
|
44 | 988 |
if (connectionMethodId > 0) |
989 |
{ |
|
990 |
// We have now some valid SNAP id, either from CenRep or Internet SNAP |
|
991 |
connectionMethodType |
|
992 |
= TIAUpdateConnectionMethod::EConnectionMethodTypeDestination; |
|
993 |
// Save to cenrep if needed |
|
994 |
if (needSaving) |
|
995 |
{ |
|
996 |
cenrep = CRepository::NewLC(KCRUidIAUpdateSettings); |
|
997 |
int err = cenrep->StartTransaction( |
|
998 |
CRepository::EReadWriteTransaction); |
|
999 |
User::LeaveIfError(err); |
|
1000 |
cenrep->CleanupCancelTransactionPushL(); |
|
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1001 |
|
44 | 1002 |
connMethodId = connectionMethodId; |
1003 |
err = cenrep->Set(KIAUpdateAccessPoint, connMethodId); |
|
1004 |
User::LeaveIfError(err); |
|
1005 |
TUint32 ignore = KErrNone; |
|
1006 |
User::LeaveIfError(cenrep->CommitTransaction(ignore)); |
|
1007 |
CleanupStack::PopAndDestroy(); // CleanupCancelTransactionPushL() |
|
1008 |
CleanupStack::PopAndDestroy(cenrep); |
|
1009 |
} |
|
1010 |
} |
|
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1011 |
|
44 | 1012 |
TIAUpdateConnectionMethod |
1013 |
connectionMethod( |
|
1014 |
connectionMethodId, |
|
1015 |
static_cast<TIAUpdateConnectionMethod::TConnectionMethodType> (connectionMethodType)); |
|
1016 |
||
1017 |
iController->SetDefaultConnectionMethodL(connectionMethod); |
|
1018 |
||
1019 |
IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::SetDefaultConnectionMethodL() end"); |
|
1020 |
} |
|
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1021 |
} |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1022 |
|
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1023 |
// --------------------------------------------------------------------------- |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1024 |
// IAUpdateEngine::GetBestIAPInAllSNAPsL |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1025 |
// Sets the best IAP from all snaps |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1026 |
// --------------------------------------------------------------------------- |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1027 |
// |
44 | 1028 |
uint IAUpdateEngine::GetBestIAPInAllSNAPsL(RCmManager& aCmManager) |
1029 |
{ |
|
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1030 |
//go with internet SNAP first. |
42
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
1031 |
uint IAPID = 0; |
44 | 1032 |
IAPID = GetBestIAPInInternetSNAPL(aCmManager); |
1033 |
||
1034 |
if (IAPID) |
|
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1035 |
{ |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1036 |
return IAPID; |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1037 |
} |
44 | 1038 |
|
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1039 |
//select IAP from rest of the SNAPs |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1040 |
iDestIdArray.Reset(); |
44 | 1041 |
aCmManager.AllDestinationsL(iDestIdArray); |
1042 |
||
1043 |
for (int i = 0; i < iDestIdArray.Count(); i++) |
|
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1044 |
{ |
44 | 1045 |
uint SNAPID = iDestIdArray[i]; |
1046 |
IAPID = GetBestIAPInThisSNAPL(aCmManager, SNAPID); |
|
1047 |
if (IAPID) |
|
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1048 |
{ |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1049 |
break; |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1050 |
} |
44 | 1051 |
} |
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1052 |
iDestIdArray.Reset(); |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1053 |
return IAPID; |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1054 |
} |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1055 |
|
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1056 |
// --------------------------------------------------------------------------- |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1057 |
// IAUpdateEngine::GetBestIAPInInternetSNAPL |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1058 |
// Sets the best IAP from internet snap |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1059 |
// --------------------------------------------------------------------------- |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1060 |
// |
44 | 1061 |
uint IAUpdateEngine::GetBestIAPInInternetSNAPL(RCmManager& aCmManager) |
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1062 |
{ |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1063 |
//select IAP from Internet SNAP |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1064 |
iDestIdArray.Reset(); |
44 | 1065 |
aCmManager.AllDestinationsL(iDestIdArray); |
42
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
1066 |
uint InternetSNAPID = 0; |
44 | 1067 |
for (int i = 0; i < iDestIdArray.Count(); i++) |
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1068 |
{ |
44 | 1069 |
RCmDestination dest = aCmManager.DestinationL(iDestIdArray[i]); |
1070 |
CleanupClosePushL(dest); |
|
1071 |
||
1072 |
if (dest.MetadataL(CMManager::ESnapMetadataInternet)) |
|
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1073 |
{ |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1074 |
InternetSNAPID = iDestIdArray[i]; |
44 | 1075 |
CleanupStack::PopAndDestroy(&dest); |
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1076 |
break; |
44 | 1077 |
} |
1078 |
CleanupStack::PopAndDestroy(&dest); |
|
1079 |
} |
|
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1080 |
iDestIdArray.Reset(); |
44 | 1081 |
|
1082 |
return GetBestIAPInThisSNAPL(aCmManager, InternetSNAPID); |
|
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1083 |
} |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1084 |
|
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1085 |
// --------------------------------------------------------------------------- |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1086 |
// IAUpdateEngine::GetBestIAPInThisSNAPL |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1087 |
// Sets the best IAP from the given snap |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1088 |
// --------------------------------------------------------------------------- |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1089 |
// |
44 | 1090 |
uint IAUpdateEngine::GetBestIAPInThisSNAPL(RCmManager& aCmManager, |
1091 |
uint aSNAPID) |
|
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1092 |
{ |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1093 |
//get all usable IAPs |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1094 |
TConnMonIapInfoBuf iapInfo; |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1095 |
TRequestStatus status; |
44 | 1096 |
|
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1097 |
RConnectionMonitor connMon; |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1098 |
connMon.ConnectL(); |
44 | 1099 |
CleanupClosePushL(connMon); |
1100 |
||
1101 |
connMon.GetPckgAttribute(EBearerIdAll, 0, KIapAvailability, iapInfo, |
|
1102 |
status); |
|
1103 |
User::WaitForRequest(status); |
|
1104 |
User::LeaveIfError(status.Int()); |
|
1105 |
||
1106 |
CleanupStack::PopAndDestroy(&connMon); |
|
1107 |
||
1108 |
RCmDestination dest = aCmManager.DestinationL(aSNAPID); |
|
1109 |
CleanupClosePushL(dest); |
|
1110 |
||
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1111 |
// Check whether the SNAP contains any IAP. |
44 | 1112 |
for (int i = 0; i < dest.ConnectionMethodCount(); i++) |
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1113 |
{ |
44 | 1114 |
RCmConnectionMethod cm = dest.ConnectionMethodL(i); |
1115 |
CleanupClosePushL(cm); |
|
1116 |
||
1117 |
uint iapid = cm.GetIntAttributeL(CMManager::ECmIapId); |
|
1118 |
||
1119 |
for (int i = 0; i < iapInfo().iCount; i++) |
|
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1120 |
{ |
44 | 1121 |
if (iapInfo().iIap[i].iIapId == iapid) |
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1122 |
{ |
44 | 1123 |
CleanupStack::PopAndDestroy(2); //cm & dest; |
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1124 |
return iapid; |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1125 |
} |
44 | 1126 |
} |
1127 |
||
1128 |
CleanupStack::PopAndDestroy(&cm); |
|
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1129 |
} |
44 | 1130 |
|
1131 |
CleanupStack::PopAndDestroy(&dest); |
|
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1132 |
return 0; |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1133 |
} |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1134 |
|
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1135 |
// ----------------------------------------------------------------------------- |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1136 |
// IAUpdateEngine::ShowUpdateQueryL |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1137 |
// |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1138 |
// ----------------------------------------------------------------------------- |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1139 |
// |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1140 |
void IAUpdateEngine::ShowUpdateQueryL() |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1141 |
{ |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1142 |
IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::ShowUpdateQueryL() begin"); |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1143 |
CIAUpdateQueryHistory* updateQueryHistory = CIAUpdateQueryHistory::NewL(); |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1144 |
// Get the delay information from the controller that has read it from |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1145 |
// the config file. |
44 | 1146 |
updateQueryHistory->SetDelay( |
1147 |
iController->ConfigData().QueryHistoryDelayHours()); |
|
1148 |
CleanupStack::PushL(updateQueryHistory); |
|
1149 |
bool isDelayed(updateQueryHistory->IsDelayedL(mUpdatequeryUid)); |
|
1150 |
CleanupStack::PopAndDestroy(updateQueryHistory); |
|
1151 |
if (!isDelayed) |
|
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1152 |
{ |
44 | 1153 |
if (ClientInBackgroundL()) |
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1154 |
{ |
44 | 1155 |
iEikEnv->RootWin().SetOrdinalPosition(-1, ECoeWinPriorityNormal); |
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1156 |
} |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1157 |
else |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1158 |
{ |
44 | 1159 |
iEikEnv->RootWin().SetOrdinalPosition(0, ECoeWinPriorityNormal); |
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1160 |
} |
44 | 1161 |
|
1162 |
HbMessageBox *messageBox = new HbMessageBox( |
|
1163 |
HbMessageBox::MessageTypeQuestion); |
|
1164 |
messageBox->setText(QString( |
|
80 | 1165 |
hbTrId("txt_software_info_application_update_is_available"))); |
42
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
1166 |
int actionCount = messageBox->actions().count(); |
44 | 1167 |
for (int i = actionCount - 1; i >= 0; i--) |
1168 |
{ |
|
42
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
1169 |
messageBox->removeAction(messageBox->actions().at(i)); |
44 | 1170 |
} |
42
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
1171 |
mPrimaryAction = NULL; |
80 | 1172 |
mPrimaryAction = new HbAction(hbTrId("txt_software_button_now")); |
42
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
1173 |
mSecondaryAction = NULL; |
80 | 1174 |
mSecondaryAction = new HbAction(hbTrId("txt_software_button_later")); |
42
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
1175 |
messageBox->addAction(mPrimaryAction); |
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
1176 |
messageBox->addAction(mSecondaryAction); |
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
1177 |
messageBox->setTimeout(HbPopup::NoTimeout); |
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
1178 |
messageBox->setAttribute(Qt::WA_DeleteOnClose); |
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
1179 |
messageBox->open(this, SLOT(dialogFinished(HbAction*))); |
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
1180 |
mDialogState = ShowUpdateQuery; |
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
1181 |
} |
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
1182 |
else |
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
1183 |
{ |
44 | 1184 |
InformRequestObserver(KErrNone); |
42
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
1185 |
} |
44 | 1186 |
|
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1187 |
IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::ShowUpdateQueryL() end"); |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1188 |
} |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1189 |
|
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1190 |
// ----------------------------------------------------------------------------- |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1191 |
// IAUpdateEngine::HideApplicationInFSWL |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1192 |
// |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1193 |
// ----------------------------------------------------------------------------- |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1194 |
// |
44 | 1195 |
void IAUpdateEngine::HideApplicationInFSWL(bool aHide) const |
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1196 |
{ |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1197 |
IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::HideApplicationInFSW() begin"); |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1198 |
IAUPDATE_TRACE_1("[IAUPDATE] hide: %d", aHide ); |
42
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
1199 |
int id = iEikEnv->RootWin().Identifier(); |
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1200 |
|
44 | 1201 |
CApaWindowGroupName* wgName = CApaWindowGroupName::NewLC( |
1202 |
iEikEnv->WsSession(), id); |
|
1203 |
||
1204 |
wgName->SetHidden(aHide); |
|
1205 |
wgName->SetWindowGroupName(iEikEnv->RootWin()); |
|
1206 |
CleanupStack::PopAndDestroy(wgName); |
|
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1207 |
IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::HideApplicationInFSW() end"); |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1208 |
} |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1209 |
|
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1210 |
// --------------------------------------------------------------------------- |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1211 |
// IAUpdateEngine::UpdateQueryCallbackL |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1212 |
// --------------------------------------------------------------------------- |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1213 |
// |
44 | 1214 |
TInt IAUpdateEngine::UpdateQueryCallbackL(TAny* aPtr) |
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1215 |
{ |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1216 |
IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::UpdateQueryCallbackL() begin"); |
44 | 1217 |
IAUpdateEngine* engine = static_cast<IAUpdateEngine*> (aPtr); |
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1218 |
//TRAPD( err, engine->ShowUpdateQueryL() ); |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1219 |
TRAP_IGNORE( engine->ShowUpdateQueryL() ); |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1220 |
//if ( err != KErrNone ) |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1221 |
// { |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1222 |
// appUI->HandleLeaveErrorL( err ); |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1223 |
// } |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1224 |
IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::UpdateQueryCallbackL() end"); |
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1225 |
return KErrNone; |
44 | 1226 |
} |
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1227 |
|
33
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
1228 |
// --------------------------------------------------------------------------- |
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
1229 |
// IAUpdateEngine::AutomaticCheckCallbackL |
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
1230 |
// --------------------------------------------------------------------------- |
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
1231 |
// |
44 | 1232 |
|
1233 |
TInt IAUpdateEngine::AutomaticCheckCallbackL(TAny* aPtr) |
|
33
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
1234 |
{ |
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
1235 |
IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::AutomaticCheckCallbackL() begin"); |
44 | 1236 |
IAUpdateEngine* engine = static_cast<IAUpdateEngine*> (aPtr); |
1237 |
||
42
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
1238 |
int err = KErrNone; |
44 | 1239 |
if (!engine->iAutomaticCheck) |
42
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
1240 |
{ |
44 | 1241 |
TRAP( err, engine->iAutomaticCheck = CIAUpdateAutomaticCheck::NewL() ); |
42
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
1242 |
} |
44 | 1243 |
if (err != KErrNone) |
33
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
1244 |
{ |
44 | 1245 |
engine->HandleLeaveErrorL(err); |
33
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
1246 |
} |
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
1247 |
else |
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
1248 |
{ |
42
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
1249 |
TRAP( err, engine->iAutomaticCheck->AcceptAutomaticCheckL() ); |
44 | 1250 |
if (err != KErrNone) |
33
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
1251 |
{ |
44 | 1252 |
engine->HandleLeaveErrorL(err); |
1253 |
} |
|
1254 |
} |
|
1255 |
||
33
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
1256 |
IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::AutomaticCheckCallbackL() end"); |
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
1257 |
return KErrNone; |
8110bf1194d1
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
29
diff
changeset
|
1258 |
} |
29
26b6f0522fd8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1259 |
|
42
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
1260 |
// --------------------------------------------------------------------------- |
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
1261 |
// IAUpdateEngine::DoPossibleApplicationClose() |
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
1262 |
// --------------------------------------------------------------------------- |
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
1263 |
// |
44 | 1264 |
bool IAUpdateEngine::DoPossibleApplicationClose() |
42
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
1265 |
{ |
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
1266 |
//exit from result view if there are no update left |
44 | 1267 |
bool toBeClosed = false; |
1268 |
if (iController->Nodes().Count() == 0 && iController->FwNodes().Count() |
|
1269 |
== 0) |
|
1270 |
{ |
|
1271 |
toBeClosed = true; |
|
1272 |
} |
|
1273 |
else if (mStartedFromApplication |
|
1274 |
&& iController->ResultsInfo().iCountCancelled == 0 |
|
1275 |
&& iController->ResultsInfo().iCountFailed == 0) |
|
1276 |
{ |
|
1277 |
toBeClosed = true; |
|
1278 |
} |
|
1279 |
if (toBeClosed) |
|
42
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
1280 |
{ |
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
1281 |
qApp->quit(); |
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
1282 |
} |
44 | 1283 |
return toBeClosed; |
42
d17dc5398051
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
1284 |
} |
44 | 1285 |