|
1 /* |
|
2 * Copyright (c) 2002-2005 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: Header file for providing SUPL 2.0 location id |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef C_COMASuplLocationIdVer2_H |
|
19 #define C_COMASuplLocationIdVer2_H |
|
20 |
|
21 #include<e32def.h> |
|
22 #include<e32std.h> |
|
23 #include<e32base.h> |
|
24 |
|
25 #include "epos_suplconstants.h" |
|
26 #include "epos_comasupllocationid.h" |
|
27 |
|
28 /** |
|
29 * Class for providing holding location data |
|
30 * @lib epos_comasuplasnplugin.lib |
|
31 * @since S60 S60_5.2 |
|
32 */ |
|
33 class TOMASuplLocationData |
|
34 { |
|
35 public: |
|
36 |
|
37 IMPORT_C TOMASuplLocationData(); |
|
38 |
|
39 /** |
|
40 * Getter method for location accuracy |
|
41 * @since S60 S60_5.2 |
|
42 * @param aLocationAccuracy location accuracy value is returned in this |
|
43 * @return Returns KErrNone if parameter was set before and are retrieved successfully |
|
44 * KErrOMASuplParamNotSet otherwise |
|
45 */ |
|
46 IMPORT_C TInt GetLocationAccuracy(TInt& aLocationAccuracy)const ; |
|
47 |
|
48 /** |
|
49 * Setter method for location accuracy |
|
50 * @since S60 S60_5.2 |
|
51 * @param aLocationAccuracy location accuracy value to be set |
|
52 * @return none |
|
53 */ |
|
54 IMPORT_C void SetLocationAccuracy(TInt aLocationAccuracy); |
|
55 /** |
|
56 * Getter method for location value |
|
57 * @since S60 S60_5.2 |
|
58 * @param aLocationValue location accuracy value is returned in this |
|
59 * @return none |
|
60 */ |
|
61 IMPORT_C void GetLocationValue(TDes8& aLocationValue) const ; |
|
62 /** |
|
63 * Setter method for location accuracy |
|
64 * @since S60 S60_5.2 |
|
65 * @param aLocationAccuracy location accuracy value to be set |
|
66 * @return none |
|
67 */ |
|
68 IMPORT_C void SetLocationValue(TDes8& aLocationValue); |
|
69 |
|
70 private: |
|
71 //flag to indicate if location accuracy is set or not |
|
72 TBool iIsLocationAccSet; |
|
73 // holds location accuracy value |
|
74 TInt iLocationAccuracy; |
|
75 //holds location values |
|
76 TBuf8<KMaxLocDataValueLen> iLocationValue; |
|
77 }; |
|
78 |
|
79 /** |
|
80 * Class for holding reported location |
|
81 * @lib epos_comasuplasnplugin.lib |
|
82 * @since S60 S60_5.2 |
|
83 */ |
|
84 class TOMASuplReportedLocation |
|
85 { |
|
86 public: |
|
87 |
|
88 /** |
|
89 * enum to indicate the type of location descriptor encoding present |
|
90 */ |
|
91 enum TOMASuplLocEncDescriptor |
|
92 { |
|
93 EOMASupLocEncDescUnknown = -1, |
|
94 EOMASupLocEncDescLCI = 0 , |
|
95 EOMASupLocEncDescASN1 = 1, |
|
96 }; |
|
97 /** |
|
98 * Getter method for location descriptor encoding type |
|
99 * @since S60 S60_5.2 |
|
100 * @param aLocationEncodingDescriptor location descriptor encoding type is returned in this |
|
101 * @return none |
|
102 */ |
|
103 IMPORT_C void GetLocationEncDescriptor(TOMASuplLocEncDescriptor& aLocationEncodingDescriptor) const ; |
|
104 |
|
105 /** |
|
106 * Getter method for location data |
|
107 * @since S60 S60_5.2 |
|
108 * @param aLocationData location data is returned in this |
|
109 * @return none |
|
110 */ |
|
111 IMPORT_C void GetLocationData(TOMASuplLocationData& aLocationData) const ; |
|
112 |
|
113 /** |
|
114 * Setter method for location descriptor encoding type |
|
115 * @since S60 S60_5.2 |
|
116 * @param aLocationEncodingDescriptor location descriptor encoding type to be set |
|
117 * @return none |
|
118 */ |
|
119 IMPORT_C void SetLocationEncDescriptor(const TOMASuplLocEncDescriptor aLocationEncodingDescriptor) ; |
|
120 |
|
121 /** |
|
122 * Setter method for location data |
|
123 * @since S60 S60_5.2 |
|
124 * @param aLocationData location data to be set |
|
125 * @return none |
|
126 */ |
|
127 IMPORT_C void SetLocationData(const TOMASuplLocationData aLocationData); |
|
128 |
|
129 private: |
|
130 |
|
131 TOMASuplLocEncDescriptor iLocationEncodingDescriptor; |
|
132 |
|
133 //location data field |
|
134 TOMASuplLocationData iLocationData; |
|
135 }; |
|
136 |
|
137 |
|
138 /** |
|
139 * Class containing cell info extension |
|
140 * |
|
141 * @lib eposomasuplasnconverter.lib |
|
142 * @since S60 S60_5.2 |
|
143 */ |
|
144 class TOMASuplVer2CellInfoExtn |
|
145 { |
|
146 public: |
|
147 /** |
|
148 * enum to indicate type present in the cell info extension |
|
149 */ |
|
150 enum TOMASuplCellInfoExtnType |
|
151 { |
|
152 EOMASuplCellInfoUnknown = -1, |
|
153 EOMASuplCellInfoHrpd = 0, |
|
154 EOMASuplCellInfoUmb, |
|
155 EOMASuplCellInfoLte, |
|
156 EOMASuplCellInfoWLANAP, |
|
157 EOMASuplCellInfoWimaxBiz |
|
158 }; |
|
159 /** |
|
160 * Constructor for TOMASuplVer2CellInfoExtn |
|
161 * |
|
162 */ |
|
163 IMPORT_C TOMASuplVer2CellInfoExtn(); |
|
164 |
|
165 /** |
|
166 * Getter method for Cell Info Extn Type |
|
167 * @since S60 S60_5.2 |
|
168 * @param aTypePresent Cell Info Extn Type is retrieved in this |
|
169 * @return none |
|
170 */ |
|
171 IMPORT_C void GetCellInfoExtnType(TOMASuplCellInfoExtnType& aTypePresent) const ; |
|
172 /** |
|
173 * Setter method for Cell Info Extn Type |
|
174 * @since S60 S60_5.2 |
|
175 * @param aTypePresent Cell Info Extn Type is retrieved in this |
|
176 * @return none |
|
177 */ |
|
178 IMPORT_C void SetCellInfoExtnType(TOMASuplCellInfoExtnType aTypePresent) ; |
|
179 |
|
180 private: |
|
181 //TOMASuplHrpdCellInformation iHrpdCellInfo; |
|
182 //TOMASuplUmbCellInformation iUmbCellInfo; |
|
183 //TOMASuplLteCellInformation iLteCellInfo; |
|
184 //TOMASuplWlanAPInformation iWLANAPInfo; |
|
185 //TOMASuplWimaxBSInfo iWimaxBSInfo; |
|
186 TOMASuplCellInfoExtnType iTypePresent; |
|
187 }; |
|
188 |
|
189 |
|
190 enum TOMASuplLocEncDescriptor |
|
191 { |
|
192 EOMASupLocEncDescUnknown = -1, |
|
193 EOMASupLocEncDescLCI = 0, |
|
194 EOMASupLocEncDescASN1 = 1, |
|
195 }; |
|
196 |
|
197 /** |
|
198 * Class containing location information |
|
199 * |
|
200 * @lib eposomasuplasnconverter.lib |
|
201 * @since S60 S60_5.2 |
|
202 */ |
|
203 |
|
204 class COMASuplLocationIdVer2 : public COMASuplLocationId |
|
205 { |
|
206 public: |
|
207 /** |
|
208 * Two phased constructor |
|
209 * @since S60 S60_5.2 |
|
210 * @param None |
|
211 * @return instance of COMASuplLocationIdVer2 |
|
212 */ |
|
213 |
|
214 IMPORT_C static COMASuplLocationIdVer2* NewL(); |
|
215 |
|
216 /** |
|
217 * Destructor |
|
218 * @since S60 S60_5.2 |
|
219 * @param None |
|
220 * @return None |
|
221 */ |
|
222 IMPORT_C ~COMASuplLocationIdVer2(); |
|
223 /** |
|
224 * Getter method Version 2 Cell Extension in E-CellID |
|
225 * @since S60 S60_5.2 |
|
226 * @param aTOMASuplVer2CellInfo, TOMASuplVer2CellInfoExtn |
|
227 * @return None |
|
228 */ |
|
229 IMPORT_C TInt Ver2CellInfo(TOMASuplVer2CellInfoExtn& aTOMASuplVer2CellInfo) const; |
|
230 /** |
|
231 * Setter method for GSM in E-CellID |
|
232 * @since S60 S60_5.2 |
|
233 * @param aTOMASuplVer2CellInfo TOMASuplVer2CellInfoExtn |
|
234 * @return None |
|
235 */ |
|
236 void SetVer2CellInfo(TOMASuplVer2CellInfoExtn aTOMASuplVer2CellInfo); |
|
237 |
|
238 /** |
|
239 * Clone Method for COMASuplLocationIdVer2 |
|
240 * @since S60 S60_5.2 |
|
241 * @return A clone of this location id object is returned |
|
242 * ownership of returned object is not with this object |
|
243 */ |
|
244 IMPORT_C COMASuplLocationIdVer2* CloneL(); |
|
245 |
|
246 private: // Construction |
|
247 |
|
248 IMPORT_C COMASuplLocationIdVer2(); |
|
249 |
|
250 void ConstructL(); |
|
251 |
|
252 private: |
|
253 |
|
254 TOMASuplVer2CellInfoExtn iOMASuplVer2CellInfoExtn; |
|
255 TBool iIsV2ExtnSet; |
|
256 }; |
|
257 |
|
258 #endif // C_COMASUPLLOCATIONID_H |