|
1 /* |
|
2 * Copyright (c) 2000-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 #ifndef __CT_LBS_POS_CLIENT_H__ |
|
21 #define __CT_LBS_POS_CLIENT_H__ |
|
22 |
|
23 // INCLUDES |
|
24 #include <LbsPositionInfo.h> |
|
25 #include <e32base.h> |
|
26 #include <lbs.h> |
|
27 |
|
28 // CONSTANTS |
|
29 |
|
30 // FUNCTION TYPES |
|
31 |
|
32 // FORWARD DECLARATIONS |
|
33 class CPositioner; |
|
34 class CT_LbsPosClientHolder; |
|
35 |
|
36 // CLASS DECLARATION |
|
37 |
|
38 /** |
|
39 * Active object used to make position requests |
|
40 * |
|
41 */ |
|
42 class CT_LbsPosClient : public CActive |
|
43 { |
|
44 public: // Constructors and destructor |
|
45 |
|
46 static CT_LbsPosClient* NewL(CT_LbsPosClientHolder* aParent, TUid aPsy); |
|
47 |
|
48 static CT_LbsPosClient* NewL(CT_LbsPosClientHolder* aParent, TUid aPsy, RPositionServer& aPositionServer); |
|
49 |
|
50 /** |
|
51 * Destructor. |
|
52 */ |
|
53 ~CT_LbsPosClient(); |
|
54 |
|
55 private: |
|
56 |
|
57 /** |
|
58 * C++ default constructor. |
|
59 */ |
|
60 CT_LbsPosClient(CT_LbsPosClientHolder* aParent); |
|
61 |
|
62 void ConstructL(TUid aPsy); |
|
63 |
|
64 void ConstructL(TUid aPsy, RPositionServer& aPositionServer); |
|
65 |
|
66 public: // Functions from base classes |
|
67 |
|
68 /** |
|
69 * Starts a position request |
|
70 */ |
|
71 void MakeRequest(); |
|
72 |
|
73 /** |
|
74 * Get result |
|
75 */ |
|
76 void GetResult( |
|
77 TInt& aStatus, |
|
78 TPositionInfo& aModuleInfo, |
|
79 TTimeIntervalMicroSeconds& aRequestTime |
|
80 ); |
|
81 |
|
82 private: |
|
83 |
|
84 void RunL(); |
|
85 |
|
86 void DoCancel(); |
|
87 |
|
88 private: |
|
89 RPositioner iPositioner; |
|
90 RPositionServer iPosServer; |
|
91 TBool iSameClient; |
|
92 TPositionInfo iModuleInfo; |
|
93 TTime iStartTime; |
|
94 TTimeIntervalMicroSeconds iRequestTime; |
|
95 CT_LbsPosClientHolder* iParent; |
|
96 }; |
|
97 |
|
98 #endif // __CT_LBS_POS_CLIENT_H__ |
|
99 |
|
100 // End of File |