|
1 /** |
|
2 * Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * This contains the header file for Get last known position |
|
16 * |
|
17 * |
|
18 */ |
|
19 |
|
20 |
|
21 |
|
22 /** |
|
23 @file ctlbsclientgetlastknownposao.h |
|
24 */ |
|
25 #if (!defined __CT_LBS_CLIENT_LAST_KNOWN_POS_AO_H__) |
|
26 #define __CT_LBS_CLIENT_LAST_KNOWN_POS_AO_H__ |
|
27 |
|
28 #include <e32base.h> |
|
29 #include <lbs.h> |
|
30 |
|
31 class MT_GetLastKnownPosObserver |
|
32 { |
|
33 public: |
|
34 virtual void GetLastKnownPositionCallback(TRequestStatus& aStatus) = 0; |
|
35 }; |
|
36 |
|
37 |
|
38 class CT_LbsClientGetLastKnownPosAO: public CActive |
|
39 { |
|
40 public: |
|
41 ~CT_LbsClientGetLastKnownPosAO(); |
|
42 static CT_LbsClientGetLastKnownPosAO* NewL(MT_GetLastKnownPosObserver& aUser); |
|
43 // wrapper for async positioner function GetLastKnownPosition() |
|
44 void GetLastKnownPosL(RPositioner& aPositioner, TPositionInfo& aPosInfo); |
|
45 |
|
46 protected: |
|
47 // CActive: |
|
48 // Redeclares the base class CActive::DoCancel(). |
|
49 virtual void DoCancel(); |
|
50 // Redeclares the base class CActive::RunL(). |
|
51 virtual void RunL(); |
|
52 // Redeclares the base class CActive::RunError(). |
|
53 virtual TInt RunError(TInt aError); |
|
54 |
|
55 private: |
|
56 // our status, so we know when request completes: |
|
57 // positioner currently in use: |
|
58 RPositioner iPositioner; |
|
59 // type of request outstanding: |
|
60 TInt iRequestId; |
|
61 // caller |
|
62 MT_GetLastKnownPosObserver& iCaller; |
|
63 |
|
64 CT_LbsClientGetLastKnownPosAO(MT_GetLastKnownPosObserver& aCaller); |
|
65 }; |
|
66 |
|
67 #endif // _CT_LBS_CLIENT_LAST_KNOWN_POS_AO_H_ |