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 |
||
20 |
#include <e32const.h> |
|
21 |
#include "tprovidertestobserver.h" |
|
22 |
_LIT8(KResponse,"ReturnValue"); |
|
23 |
_LIT8(KErrorCode,"ErrorCode"); |
|
24 |
||
25 |
// ----------------------------------------------------------------------------- |
|
26 |
// CProviderObserver::NewL |
|
27 |
// Returns the instance of CLauncherObserver. |
|
28 |
// ----------------------------------------------------------------------------- |
|
29 |
CProviderObserver* CProviderObserver::NewL() |
|
30 |
{ |
|
31 |
CProviderObserver* self = new( ELeave ) CProviderObserver(); |
|
32 |
return self; |
|
33 |
} |
|
34 |
||
35 |
||
36 |
// --------------------------------------------------------------------------- |
|
37 |
// call back |
|
38 |
// --------------------------------------------------------------------------- |
|
39 |
// |
|
40 |
TInt CProviderObserver :: HandleNotifyL( TInt /*aCmdId*/, TInt aEventId, CLiwGenericParamList& aEventParamList,const CLiwGenericParamList& /*aInParamList*/) |
|
41 |
||
42 |
{ |
|
43 |
||
44 |
iCancel = EFalse; |
|
45 |
if ( aEventId == KLiwEventCanceled ) |
|
46 |
{ |
|
47 |
iCancel = ETrue; |
|
48 |
||
49 |
} |
|
50 |
||
51 |
if ( aEventId == KLiwEventCompleted ) |
|
52 |
{ |
|
53 |
const TLiwGenericParam* p= NULL; |
|
54 |
TInt pos = 0; |
|
55 |
||
56 |
p = aEventParamList.FindFirst(pos, KErrorCode ); // Finding Error Code |
|
57 |
||
58 |
if(p) |
|
59 |
{ |
|
60 |
iErrorReturn = p->Value().AsTInt32(); |
|
61 |
} |
|
62 |
else |
|
63 |
{ |
|
64 |
iErrorReturn = KErrGeneral; |
|
65 |
} |
|
66 |
||
67 |
} |
|
68 |
||
69 |
if(iWait) |
|
70 |
iWait->AsyncStop(); |
|
58
ea43c23d28d2
Revision: 201016
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
71 |
return 0; |
19 | 72 |
} |
73 |
||
74 |
||
75 |
||
76 |
||
77 |
// --------------------------------------------------------------------------- |
|
78 |
// consturctor |
|
79 |
// --------------------------------------------------------------------------- |
|
80 |
// |
|
81 |
CProviderObserver::CProviderObserver( ) |
|
82 |
{ |
|
83 |
iWait= NULL; |
|
84 |
} |
|
85 |
// --------------------------------------------------------------------------- |
|
86 |
// consturctor |
|
87 |
// --------------------------------------------------------------------------- |
|
88 |
// |
|
89 |
void CProviderObserver::SetWait(CActiveSchedulerWait *aWait ) |
|
90 |
{ |
|
91 |
iWait = aWait; |
|
92 |
} |