|
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 the License "Symbian Foundation License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 /** |
|
23 @file ctlbsclientnotifyposupdao.h |
|
24 */ |
|
25 #if (!defined __CT_LBS_CLIENT_NOTIFY_POS_UPD_AO_H__) |
|
26 #define __CT_LBS_CLIENT_NOTIFY_POS_UPD_AO_H__ |
|
27 |
|
28 #include <e32base.h> |
|
29 #include <lbs.h> |
|
30 |
|
31 |
|
32 class MT_NotifyPosUpdateObserver |
|
33 { |
|
34 public: |
|
35 virtual void NotifyPositionUpdateCallback(TRequestStatus& aStatus) = 0; |
|
36 }; |
|
37 |
|
38 |
|
39 class CT_LbsClientNotifyPosUpdAO: public CActive |
|
40 { |
|
41 public: |
|
42 // destructor |
|
43 ~CT_LbsClientNotifyPosUpdAO(); |
|
44 |
|
45 // constructor |
|
46 static CT_LbsClientNotifyPosUpdAO* NewL(MT_NotifyPosUpdateObserver& aCaller); |
|
47 |
|
48 // wrapper for async positioner function NotifyPositionUpdate() |
|
49 void CT_LbsClientNotifyPosUpdAO::NotifyPosUpdateL(RPositioner& aPositioner, TPositionInfo& aPosInfo); |
|
50 |
|
51 protected: |
|
52 // CActive: |
|
53 // Redeclares the base class CActive::DoCancel(). |
|
54 virtual void DoCancel(); |
|
55 // Redeclares the base class CActive::RunL(). |
|
56 virtual void RunL(); |
|
57 // Redeclares the base class CActive::RunError(). |
|
58 virtual TInt RunError(TInt aError); |
|
59 |
|
60 private: |
|
61 // our status, so we know when request completes: |
|
62 // positioner currently in use: |
|
63 RPositioner iPositioner; |
|
64 // type of request outstanding: |
|
65 TInt iRequestId; |
|
66 // caller |
|
67 MT_NotifyPosUpdateObserver& iCaller; |
|
68 |
|
69 CT_LbsClientNotifyPosUpdAO(MT_NotifyPosUpdateObserver& aCaller); |
|
70 }; |
|
71 |
|
72 #endif // __CT_LBS_CLIENT_NOTIFY_POS_UPD_AO_H__ |