|
1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // ao wrapper around the a-gps mgr function NotifyPositionUpdate |
|
15 // |
|
16 // |
|
17 |
|
18 /** |
|
19 @file ctlbsx3pdummyao.cpp |
|
20 */ |
|
21 |
|
22 #include <lbs/lbsx3p.h> |
|
23 #include "ctlbsx3pdummyao.h" |
|
24 |
|
25 |
|
26 CT_LbsX3PDummyAO* CT_LbsX3PDummyAO::NewL(MT_LbsX3PDummyObserver* aObserver) |
|
27 /** |
|
28 * 'public constructor' may leave |
|
29 */ |
|
30 { |
|
31 CT_LbsX3PDummyAO* dummyAO = new(ELeave)CT_LbsX3PDummyAO(aObserver); |
|
32 return dummyAO; |
|
33 } |
|
34 |
|
35 |
|
36 CT_LbsX3PDummyAO::CT_LbsX3PDummyAO(MT_LbsX3PDummyObserver* aObserver) : iObserver(aObserver), CActive(EPriorityStandard) |
|
37 /** |
|
38 * Constructor - will not leave |
|
39 */ |
|
40 { |
|
41 CActiveScheduler::Add(this); |
|
42 //Since it is dummy active object, Set it active now so that active scheduler can start it immediately. |
|
43 SetActive(); |
|
44 } |
|
45 |
|
46 CT_LbsX3PDummyAO::~CT_LbsX3PDummyAO() |
|
47 /** |
|
48 * Destructor |
|
49 */ |
|
50 { |
|
51 DoCancel(); |
|
52 |
|
53 } |
|
54 |
|
55 void CT_LbsX3PDummyAO::DoCancel() |
|
56 { |
|
57 Cancel(); //Not sure about this...might have to change |
|
58 |
|
59 } |
|
60 |
|
61 |
|
62 void CT_LbsX3PDummyAO::RunL() |
|
63 { |
|
64 TInt err = iStatus.Int(); |
|
65 User::LeaveIfError(err); // remove if we wish to process the err |
|
66 |
|
67 // iStatus will contain error code |
|
68 // async request completed. Notify caller via callback: |
|
69 if (iObserver) |
|
70 { |
|
71 iObserver->MT_LbsX3PDummyCallbackHandler(iStatus); |
|
72 } |
|
73 } |
|
74 |
|
75 TInt CT_LbsX3PDummyAO::RunError(TInt aError) |
|
76 { |
|
77 return aError; |
|
78 } |
|
79 |