author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Tue, 11 May 2010 17:01:36 +0300 | |
branch | RCL_3 |
changeset 58 | ea43c23d28d2 |
parent 19 | 989d2f495d90 |
child 65 | 0b68a1b0c15e |
permissions | -rw-r--r-- |
19 | 1 |
/* |
2 |
* Copyright (c) 2007-2007 Nokia Corporation and/or its subsidiary(-ies). |
|
3 |
* All rights reserved. |
|
4 |
* This component and the accompanying materials are made available |
|
5 |
* under the terms of the License "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 Class is observer for the Launching Application |
|
15 |
* |
|
16 |
*/ |
|
17 |
||
18 |
||
19 |
#include <e32const.h> |
|
20 |
#include "tprovidertestobserver.h" |
|
21 |
_LIT8(KResponse,"ReturnValue"); |
|
22 |
_LIT8(KErrorCode,"ErrorCode"); |
|
23 |
||
24 |
// ----------------------------------------------------------------------------- |
|
25 |
// CProviderObserver::NewL |
|
26 |
// Returns the instance of CLauncherObserver. |
|
27 |
// ----------------------------------------------------------------------------- |
|
28 |
CProviderObserver* CProviderObserver::NewL() |
|
29 |
{ |
|
30 |
CProviderObserver* self = new( ELeave ) CProviderObserver(); |
|
31 |
return self; |
|
32 |
} |
|
33 |
||
34 |
||
35 |
// --------------------------------------------------------------------------- |
|
36 |
// call back |
|
37 |
// --------------------------------------------------------------------------- |
|
38 |
// |
|
39 |
TInt CProviderObserver :: HandleNotifyL( TInt /*aCmdId*/, TInt aEventId, CLiwGenericParamList& aEventParamList,const CLiwGenericParamList& /*aInParamList*/) |
|
40 |
||
41 |
{ |
|
42 |
||
43 |
iCancel = EFalse; |
|
44 |
if ( aEventId == KLiwEventCanceled ) |
|
45 |
{ |
|
46 |
iCancel = ETrue; |
|
47 |
||
48 |
} |
|
49 |
||
50 |
if ( aEventId == KLiwEventCompleted ) |
|
51 |
{ |
|
52 |
const TLiwGenericParam* p= NULL; |
|
53 |
TInt pos = 0; |
|
54 |
||
55 |
p = aEventParamList.FindFirst(pos, KErrorCode ); // Finding Error Code |
|
56 |
||
57 |
if(p) |
|
58 |
{ |
|
59 |
iErrorReturn = p->Value().AsTInt32(); |
|
60 |
} |
|
61 |
else |
|
62 |
{ |
|
63 |
iErrorReturn = KErrGeneral; |
|
64 |
} |
|
65 |
||
66 |
} |
|
67 |
||
68 |
if(iWait) |
|
69 |
iWait->AsyncStop(); |
|
70 |
||
71 |
if (iLeave) |
|
72 |
{ |
|
73 |
||
74 |
User::Leave(KErrGeneral); |
|
75 |
iLeave = EFalse; |
|
76 |
} |
|
58
ea43c23d28d2
Revision: 201016
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
77 |
return 0; |
19 | 78 |
} |
79 |
||
80 |
||
81 |
||
82 |
||
83 |
// --------------------------------------------------------------------------- |
|
84 |
// consturctor |
|
85 |
// --------------------------------------------------------------------------- |
|
86 |
// |
|
87 |
CProviderObserver::CProviderObserver( ) |
|
88 |
{ |
|
89 |
iWait= NULL; |
|
90 |
} |
|
91 |
// --------------------------------------------------------------------------- |
|
92 |
// consturctor |
|
93 |
// --------------------------------------------------------------------------- |
|
94 |
// |
|
95 |
void CProviderObserver::SetWait(CActiveSchedulerWait *aWait ) |
|
96 |
{ |
|
97 |
iWait = aWait; |
|
98 |
} |