|
1 /* |
|
2 * Copyright (c) 2007 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: SUPL PSY Positioner header file |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef SUPLPSYPOSITIONER_H |
|
21 #define SUPLPSYPOSITIONER_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <lbs/epos_cpositioner.h> // CPositioner |
|
25 #include "suplpsyrequestcompletelistener.h" |
|
26 |
|
27 // FORWARD DECLARATIONS |
|
28 class CSuplPsyRequestManager; |
|
29 |
|
30 // CLASS DECLARATION |
|
31 |
|
32 /** |
|
33 * This class implements S60 Positioning Plug-in API for SUPL PSY |
|
34 * |
|
35 * This class provides the interface to Location Framework as specified by |
|
36 * Positioning Plug-in API. Each client connection to SUPL PSY makes an |
|
37 * instance of this class. |
|
38 * |
|
39 * @lib nlaapesuplpsy.dll |
|
40 * @since S60 3.1 |
|
41 */ |
|
42 class CSuplPsyPositioner : public CPositioner, private MSuplPsyRequestCompleteListener |
|
43 { |
|
44 public: // Constructors and destructor |
|
45 |
|
46 /** |
|
47 * Two - phased constructor. |
|
48 */ |
|
49 static CSuplPsyPositioner* NewL( TAny* aConstructionParameters ); |
|
50 |
|
51 /** |
|
52 * Destructor. |
|
53 */ |
|
54 ~CSuplPsyPositioner(); |
|
55 |
|
56 |
|
57 public: // Functions from base classes |
|
58 |
|
59 /** |
|
60 * From CPositioner See Positioning Plug-in API |
|
61 * @since S60 3.1 |
|
62 */ |
|
63 void NotifyPositionUpdate( |
|
64 TPositionInfoBase& aPosInfo, |
|
65 TRequestStatus& aStatus ); |
|
66 |
|
67 |
|
68 /** |
|
69 * From CPositioner See Positioning Plug-in API. |
|
70 * @since S60 3.1 |
|
71 */ |
|
72 void CancelNotifyPositionUpdate(); |
|
73 |
|
74 |
|
75 private: //From base class |
|
76 /** |
|
77 * From MSuplPsyRequestCompleteListener |
|
78 */ |
|
79 TBool RequestComplete( |
|
80 TInt aErr, |
|
81 const HPositionGenericInfo& aPosInfo ); |
|
82 |
|
83 private: |
|
84 |
|
85 /** |
|
86 * C++default constructor. |
|
87 */ |
|
88 CSuplPsyPositioner(); |
|
89 |
|
90 /** |
|
91 * By default Symbian 2nd phase constructor is private. |
|
92 */ |
|
93 void ConstructL( TAny* aConstructionParameters ); |
|
94 |
|
95 /** |
|
96 * Clear position info data |
|
97 * @return KErrNotSupport if the class tyep is not supported |
|
98 */ |
|
99 TInt ClearPositionInfoData( |
|
100 TPositionInfoBase& aPosInfo ); |
|
101 |
|
102 /** |
|
103 * Fill position info data |
|
104 * @return KErrPositionBufferOverflow if there is not enough buffer allocated |
|
105 */ |
|
106 TInt FillPositionInfoData( |
|
107 const HPositionGenericInfo& aSrcPosInfo, |
|
108 TPositionInfoBase& aDesPosInfo ); |
|
109 |
|
110 private: // Data |
|
111 // Pointer to SUPL PSY singleton component |
|
112 CSuplPsyRequestManager* iRequestManager; |
|
113 |
|
114 // Pointer to request status |
|
115 TRequestStatus* iRequestStatus; |
|
116 |
|
117 // Pointer to position info |
|
118 TPositionInfoBase* iPositionInfo; |
|
119 |
|
120 // Allowed accuracy |
|
121 TInt iAllowedAccr; |
|
122 }; |
|
123 |
|
124 #endif // SUPLPSYPOSITIONER_H |
|
125 |
|
126 // End of File |