|
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 ctlbsdoposupd.h |
|
24 */ |
|
25 #ifndef __CT_LBS_DOPOS_UPDATE_H__ |
|
26 #define __CT_LBS_DOPOS_UPDATE_H__ |
|
27 |
|
28 #include <e32base.h> |
|
29 #include <lbs.h> |
|
30 |
|
31 |
|
32 _LIT(KCT_LbsDoPosUpdate, "CT_LbsDoPosUpdate"); |
|
33 |
|
34 |
|
35 // Async callbacks |
|
36 class MT_LbsDoPosUpdateObserver |
|
37 { |
|
38 public: |
|
39 virtual void MT_LbsDoPosUpdateCallback(TRequestStatus& aStatus) = 0; // do we need the aStatus... |
|
40 }; |
|
41 |
|
42 |
|
43 class CT_LbsDoPosUpdate: public CActive |
|
44 { |
|
45 public: |
|
46 ~CT_LbsDoPosUpdate(); |
|
47 static CT_LbsDoPosUpdate* NewL(MT_LbsDoPosUpdateObserver* aObserver, TPositionModuleInfo::TTechnologyType aTechnologyType = TPositionModuleInfo::ETechnologyUnknown); |
|
48 static CT_LbsDoPosUpdate* NewL(MT_LbsDoPosUpdateObserver* aObserver, const TPositionCriteriaBase& aCriteria); |
|
49 TInt SetOptions(const TPositionUpdateOptionsBase& aPosOption); |
|
50 void StartL(TPositionInfo& aPosInfo); |
|
51 void CancelRequest(); |
|
52 void OpenPositioner(TPositionModuleInfo::TTechnologyType aTechnologyType = TPositionModuleInfo::ETechnologyUnknown); |
|
53 void ClosePositioner(void); |
|
54 void ConnectServer(void); |
|
55 void CloseServer(void); |
|
56 TInt CompleteRequest(TInt aRequestId); |
|
57 |
|
58 protected: |
|
59 // Functions from CActive: |
|
60 virtual void DoCancel(); |
|
61 virtual void RunL(); |
|
62 virtual TInt RunError(TInt aError); |
|
63 |
|
64 private: |
|
65 enum TOpenSubSessionType |
|
66 { |
|
67 EOpenSubSessionByModuleId, //Open subsession with the location server by module id |
|
68 EOpenSubSessionByCriteria //Open subsession with the location server by criteria |
|
69 }; |
|
70 |
|
71 CT_LbsDoPosUpdate(MT_LbsDoPosUpdateObserver* aObserver); |
|
72 |
|
73 void CT_LbsDoPosUpdate::ConstructL(TOpenSubSessionType aOpenSubSessionType,TPositionModuleInfo::TTechnologyType aTechnologyType, const TPositionCriteriaBase& aCriteria); |
|
74 |
|
75 // caller |
|
76 MT_LbsDoPosUpdateObserver* iObserver; |
|
77 |
|
78 // Self locate server. |
|
79 RPositionServer iServer; |
|
80 RPositioner iPositioner; |
|
81 }; |
|
82 |
|
83 #endif // __CT_LBS_DOPOS_UPDATE_H__ |