epoc32/include/lbsfields.h
branchSymbian2
changeset 2 2fe1408b6811
child 4 837f303aceeb
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/epoc32/include/lbsfields.h	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -0,0 +1,635 @@
     1.4 +/*
     1.5 +* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.6 +* All rights reserved.
     1.7 +* This component and the accompanying materials are made available
     1.8 +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
     1.9 +* which accompanies this distribution, and is available
    1.10 +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
    1.11 +*
    1.12 +* Initial Contributors:
    1.13 +* Nokia Corporation - initial contribution.
    1.14 +*
    1.15 +* Contributors:
    1.16 +*
    1.17 +* Description:
    1.18 +* Name        : LbsFields.h
    1.19 +* Part of     : Mobile Location Framework/Location FW
    1.20 +* Interface   : Location Acquisition API
    1.21 +* Position data Fields manager
    1.22 +* Version     :
    1.23 +*
    1.24 +*/
    1.25 +
    1.26 +
    1.27 +
    1.28 +#ifndef __LBSFIELDS_H__
    1.29 +#define __LBSFIELDS_H__
    1.30 +
    1.31 +#include <e32std.h>
    1.32 +#include <lbsfieldids.h>
    1.33 +
    1.34 +/*
    1.35 + * This header file defines the helper classes used by HPositionGenericInfo
    1.36 + * The client should not use this class to access any positioning related information.
    1.37 + * Instead the cleitn should use the methods provided by HGenericPositionInfo.
    1.38 + */
    1.39 +
    1.40 +/**
    1.41 + * Standard position field identifiers. It takes one of the enumerated  values of _TPositionFieldId
    1.42 + * @publishedAll
    1.43 + * @released
    1.44 +*/
    1.45 +typedef TUint16 TPositionFieldId;
    1.46 +
    1.47 +/**
    1.48 + * Array of standard position field identifiers
    1.49 + * @publishedAll
    1.50 + * @released
    1.51 + */
    1.52 +typedef TPositionFieldId TPositionFieldIdList[];
    1.53 +class HPositionGenericInfo;
    1.54 +
    1.55 +
    1.56 +/**
    1.57 + * This is an internal class to provide the interface for the
    1.58 + * HPositionGenericInfo::GetValue() and HPositionGenericInfo::SetValue()
    1.59 + * methods. Methods in this class are not intended to be called directly.
    1.60 + * Clients should use HPositionGenericInfo::GetValue() and
    1.61 + * HPositionGenericInfo::SetValue() methods.
    1.62 + * @internalTechnology
    1.63 + * @released
    1.64 + */
    1.65 +class PositionFieldManager
    1.66 +	{
    1.67 +public:
    1.68 +	/**
    1.69 +	 * Supported data types
    1.70 +	 */
    1.71 +	enum TFieldType
    1.72 +		{
    1.73 +		/// Undefined data type. This value should not be used.
    1.74 +		EUndefined,
    1.75 +		/// TInt8 datatype
    1.76 +		ETInt8,
    1.77 +		/// TInt16 datatype
    1.78 +		ETInt16,
    1.79 +		/// TInt32 datatype
    1.80 +		ETInt32,
    1.81 +		/// TInt64 datatype
    1.82 +		ETInt64,
    1.83 +		/// TUint8 datatype
    1.84 +		ETUint8,
    1.85 +		/// TUint16 datatype
    1.86 +		ETUint16,
    1.87 +		/// TUint32 datatype
    1.88 +		ETUint32,
    1.89 +		/// TReal32 datatype
    1.90 +		ETReal32,
    1.91 +		/// TReal64 datatype
    1.92 +		ETReal64,
    1.93 +		/// TTime datatype
    1.94 +		ETTime,
    1.95 +		/// Time specified in microseconds
    1.96 +		ETTimeIntervalMicroSeconds,
    1.97 +		/// 8-bit descriptor datatype
    1.98 +		ETDesC8,
    1.99 +		/// 16-bit descriptor datatype
   1.100 +		ETDesC16
   1.101 +		};
   1.102 +
   1.103 +friend class HPositionGenericInfo;
   1.104 +private:
   1.105 +    /**
   1.106 +     * Set the value for a location field of data type TInt8 in the
   1.107 +     * HPositionGenericInfo.
   1.108 +     * @param aFieldId Id of the field to be copied into the HPositionGenericInfo.
   1.109 +     * @param aValue Value to be copied into the HPositionGenericInfo.
   1.110 +     * @param aInfo The HPositionGenericInfo object where this field needs to
   1.111 +     * be added.
   1.112 +     * @return KErrArgument if aFieldId is EPositionFieldNone.
   1.113 +     * @return KErrPositionBufferOverflow if aValue will not fit in the HPositionGenericInfo
   1.114 +     * object.
   1.115 +     * @return KErrOverflow if there are already KPositionMaxReturnableFields set in the
   1.116 +     * HPositionGenericInfo object.
   1.117 +     * @return KErrNone if the SetValue was successful.
   1.118 +     */
   1.119 +	IMPORT_C static TInt SetValue(TPositionFieldId aFieldId,
   1.120 +	                              TInt8 aValue,
   1.121 +	                              HPositionGenericInfo& aInfo);
   1.122 +
   1.123 +    /**
   1.124 +     * Get the value for a location field of data type TInt8 from the
   1.125 +     * HPositionGenericInfo.
   1.126 +     * @param aFieldId Id of the field for which the value should be read from
   1.127 +     * HPositionGenericInfo.
   1.128 +     * @param[out] aValue The object where the data from the
   1.129 +     * HPositionGenericInfo is returned.
   1.130 +     * @param[in] aInfo The HPositionGenericInfo object from where this field needs
   1.131 +     * to be read.
   1.132 +     * @return KErrNone is the operation was successful.
   1.133 +     * @return KErrNotFound if an object with aFieldId cannot be found in aInfo.
   1.134 +     */
   1.135 +	IMPORT_C static TInt GetValue(TPositionFieldId aFieldId,
   1.136 +	                              TInt8& aValue,
   1.137 +	                              const HPositionGenericInfo& aInfo);
   1.138 +
   1.139 +    /**
   1.140 +     * Set the value for a location field of data type TInt16 in the
   1.141 +     * HPositionGenericInfo.
   1.142 +     * @param aFieldId Id of the field to be copied into the HPositionGenericInfo.
   1.143 +     * @param aValue Value to be copied into the HPositionGenericInfo.
   1.144 +     * @param aInfo The HPositionGenericInfo object where this field needs to
   1.145 +     * be added.
   1.146 +     * @return KErrArgument if aFieldId is EPositionFieldNone.
   1.147 +     * @return KErrPositionBufferOverflow if aValue will not fit in the HPositionGenericInfo
   1.148 +     * object.
   1.149 +     * @return KErrOverflow if there are already KPositionMaxReturnableFields set in the
   1.150 +     * HPositionGenericInfo object.
   1.151 +     * @return KErrNone if the SetValue was successful.
   1.152 +     */
   1.153 +	IMPORT_C static TInt SetValue(TPositionFieldId aFieldId,
   1.154 +	                              TInt16 aValue,
   1.155 +	                              HPositionGenericInfo& aInfo);
   1.156 +
   1.157 +    /**
   1.158 +     * Get the value for a location field of data type TInt16 from the
   1.159 +     * HPositionGenericInfo.
   1.160 +     * @param aFieldId Id of the field for which the value should be read from
   1.161 +     * HPositionGenericInfo.
   1.162 +     * @param[in] aValue The object where the data from the
   1.163 +     * HPositionGenericInfo is returned.
   1.164 +     * @param aInfo The HPositionGenericInfo object from where this field needs
   1.165 +     * to be read.
   1.166 +     * @return KErrNone is the operation was successful.
   1.167 +     * @return KErrNotFound if an object with aFieldId cannot be found in aInfo.
   1.168 +     */
   1.169 +	IMPORT_C static TInt GetValue(TPositionFieldId aFieldId,
   1.170 +	                              TInt16& aValue,
   1.171 +	                              const HPositionGenericInfo& aInfo);
   1.172 +
   1.173 +    /**
   1.174 +     * Set the value for a location field of data type TInt32 in the
   1.175 +     * HPositionGenericInfo.
   1.176 +     * @param aFieldId Id of the field to be copied into the HPositionGenericInfo.
   1.177 +     * @param aValue Value to be copied into the HPositionGenericInfo.
   1.178 +     * @param aInfo The HPositionGenericInfo object where this field needs to
   1.179 +     * be added.
   1.180 +     * @return KErrArgument if aFieldId is EPositionFieldNone.
   1.181 +     * @return KErrPositionBufferOverflow if aValue will not fit in the HPositionGenericInfo
   1.182 +     * object.
   1.183 +     * @return KErrOverflow if there are already KPositionMaxReturnableFields set in the
   1.184 +     * HPositionGenericInfo object.
   1.185 +     * @return KErrNone if the SetValue was successful.
   1.186 +     */
   1.187 +	IMPORT_C static TInt SetValue(TPositionFieldId aFieldId,
   1.188 +	                              TInt32 aValue,
   1.189 +	                              HPositionGenericInfo& aInfo);
   1.190 +
   1.191 +    /**
   1.192 +     * Get the value for a location field of data type TInt32 from the
   1.193 +     * HPositionGenericInfo.
   1.194 +     * @param aFieldId Id of the field for which the value should be read from
   1.195 +     * HPositionGenericInfo.
   1.196 +     * @param[out] aValue The object where the data from the
   1.197 +     * HPositionGenericInfo is returned.
   1.198 +     * @param aInfo The HPositionGenericInfo object from where this field needs
   1.199 +     * to be read.
   1.200 +     * @return KErrNone is the operation was successful.
   1.201 +     * @return KErrNotFound if an object with aFieldId cannot be found in aInfo.
   1.202 +     */
   1.203 +	IMPORT_C static TInt GetValue(TPositionFieldId aFieldId,
   1.204 +	                              TInt32& aValue,
   1.205 +	                              const HPositionGenericInfo& aInfo);
   1.206 +
   1.207 +    /**
   1.208 +     * Set the value for a location field of data type TInt64 in the
   1.209 +     * HPositionGenericInfo.
   1.210 +     * @param aFieldId Id of the field to be copied into the HPositionGenericInfo.
   1.211 +     * @param aValue Value to be copied into the HPositionGenericInfo.
   1.212 +     * @param aInfo The HPositionGenericInfo object where this field needs to
   1.213 +     * be added.
   1.214 +     * @return KErrArgument if aFieldId is EPositionFieldNone.
   1.215 +     * @return KErrPositionBufferOverflow if aValue will not fit in the HPositionGenericInfo
   1.216 +     * object.
   1.217 +     * @return KErrOverflow if there are already KPositionMaxReturnableFields set in the
   1.218 +     * HPositionGenericInfo object.
   1.219 +     * @return KErrNone if the SetValue was successful.
   1.220 +     */
   1.221 +	IMPORT_C static TInt SetValue(TPositionFieldId aFieldId,
   1.222 +	                              const TInt64& aValue,
   1.223 +	                              HPositionGenericInfo& aInfo);
   1.224 +
   1.225 +    /**
   1.226 +     * Get the value for a location field of data type TInt64 from the
   1.227 +     * HPositionGenericInfo.
   1.228 +     * @param aFieldId Id of the field for which the value should be read from
   1.229 +     * HPositionGenericInfo.
   1.230 +     * @param[out] aValue The object where the data from the
   1.231 +     * HPositionGenericInfo is returned.
   1.232 +     * @param aInfo The HPositionGenericInfo object from where this field needs
   1.233 +     * to be read.
   1.234 +     * @return KErrNone is the operation was successful.
   1.235 +     * @return KErrNotFound if an object with aFieldId cannot be found in aInfo.
   1.236 +     */
   1.237 +	IMPORT_C static TInt GetValue(TPositionFieldId aFieldId,
   1.238 +	                              TInt64& aValue,
   1.239 +	                              const HPositionGenericInfo& aInfo);
   1.240 +
   1.241 +    /**
   1.242 +     * Set the value for a location field of data type TUint8 in the
   1.243 +     * HPositionGenericInfo.
   1.244 +     * @param aFieldId Id of the field to be copied into the HPositionGenericInfo.
   1.245 +     * @param aValue Value to be copied into the HPositionGenericInfo.
   1.246 +     * @param aInfo The HPositionGenericInfo object where this field needs to
   1.247 +     * be added.
   1.248 +     * @return KErrArgument if aFieldId is EPositionFieldNone.
   1.249 +     * @return KErrPositionBufferOverflow if aValue will not fit in the HPositionGenericInfo
   1.250 +     * object.
   1.251 +     * @return KErrOverflow if there are already KPositionMaxReturnableFields set in the
   1.252 +     * HPositionGenericInfo object.
   1.253 +     * @return KErrNone if the SetValue was successful.
   1.254 +     */
   1.255 +	IMPORT_C static TInt SetValue(TPositionFieldId aFieldId,
   1.256 +	                              TUint8 aValue,
   1.257 +	                              HPositionGenericInfo& aInfo);
   1.258 +
   1.259 +    /**
   1.260 +     * Get the value for a location field of data type TUint8 from the
   1.261 +     * HPositionGenericInfo.
   1.262 +     * @param aFieldId Id of the field for which the value should be read from
   1.263 +     * HPositionGenericInfo.
   1.264 +     * @param[out] aValue The object where the data from the
   1.265 +     * HPositionGenericInfo is returned.
   1.266 +     * @param aInfo The HPositionGenericInfo object from where this field needs
   1.267 +     * to be read.
   1.268 +     * @return KErrNone is the operation was successful.
   1.269 +     * @return KErrNotFound if an object with aFieldId cannot be found in aInfo.
   1.270 +     */
   1.271 +	IMPORT_C static TInt GetValue(TPositionFieldId aFieldId,
   1.272 +	                              TUint8& aValue,
   1.273 +	                              const HPositionGenericInfo& aInfo);
   1.274 +
   1.275 +    /**
   1.276 +     * Set the value for a location field of data type TUint16 in the
   1.277 +     * HPositionGenericInfo.
   1.278 +     * @param aFieldId Id of the field to be copied into the HPositionGenericInfo.
   1.279 +     * @param aValue Value to be copied into the HPositionGenericInfo.
   1.280 +     * @param aInfo The HPositionGenericInfo object where this field needs to
   1.281 +     * be added.
   1.282 +     * @return KErrArgument if aFieldId is EPositionFieldNone.
   1.283 +     * @return KErrPositionBufferOverflow if aValue will not fit in the HPositionGenericInfo
   1.284 +     * object.
   1.285 +     * @return KErrOverflow if there are already KPositionMaxReturnableFields set in the
   1.286 +     * HPositionGenericInfo object.
   1.287 +     * @return KErrNone if the SetValue was successful.
   1.288 +     */
   1.289 +	IMPORT_C static TInt SetValue(TPositionFieldId aFieldId,
   1.290 +	                              TUint16 aValue,
   1.291 +	                              HPositionGenericInfo& aInfo);
   1.292 +
   1.293 +    /**
   1.294 +     * Get the value for a location field of data type TUint16 from the
   1.295 +     * HPositionGenericInfo.
   1.296 +     * @param aFieldId Id of the field for which the value should be read from
   1.297 +     * HPositionGenericInfo.
   1.298 +     * @param[out] aValue The object where the data from the
   1.299 +     * HPositionGenericInfo is returned.
   1.300 +     * @param aInfo The HPositionGenericInfo object from where this field needs
   1.301 +     * to be read.
   1.302 +     * @return KErrNone is the operation was successful.
   1.303 +     * @return KErrNotFound if an object with aFieldId cannot be found in aInfo.
   1.304 +     */
   1.305 +	IMPORT_C static TInt GetValue(TPositionFieldId aFieldId,
   1.306 +	                              TUint16& aValue,
   1.307 +	                              const HPositionGenericInfo& aInfo);
   1.308 +
   1.309 +    /**
   1.310 +     * Set the value for a location field of data type TUint32 in the
   1.311 +     * HPositionGenericInfo.
   1.312 +     * @param aFieldId Id of the field to be copied into the HPositionGenericInfo.
   1.313 +     * @param aValue Value to be copied into the HPositionGenericInfo.
   1.314 +     * @param aInfo The HPositionGenericInfo object where this field needs to
   1.315 +     * be added.
   1.316 +     * @return KErrArgument if aFieldId is EPositionFieldNone.
   1.317 +     * @return KErrPositionBufferOverflow if aValue will not fit in the HPositionGenericInfo
   1.318 +     * object.
   1.319 +     * @return KErrOverflow if there are already KPositionMaxReturnableFields set in the
   1.320 +     * HPositionGenericInfo object.
   1.321 +     * @return KErrNone if the SetValue was successful.
   1.322 +     */
   1.323 +	IMPORT_C static TInt SetValue(TPositionFieldId aFieldId,
   1.324 +	                              TUint32 aValue,
   1.325 +	                              HPositionGenericInfo& aInfo);
   1.326 +
   1.327 +    /**
   1.328 +     * Get the value for a location field of data type TUint32 from the
   1.329 +     * HPositionGenericInfo.
   1.330 +     * @param aFieldId Id of the field for which the value should be read from
   1.331 +     * HPositionGenericInfo.
   1.332 +     * @param[out] aValue The object where the data from the
   1.333 +     * HPositionGenericInfo is returned.
   1.334 +     * @param aInfo The HPositionGenericInfo object from where this field needs
   1.335 +     * to be read.
   1.336 +     * @return KErrNone is the operation was successful.
   1.337 +     * @return KErrNotFound if an object with aFieldId cannot be found in aInfo.
   1.338 +     */
   1.339 +	IMPORT_C static TInt GetValue(TPositionFieldId aFieldId,
   1.340 +	                              TUint32& aValue,
   1.341 +	                              const HPositionGenericInfo& aInfo);
   1.342 +
   1.343 +    /**
   1.344 +     * Set the value for a location field of data type TReal32 in the
   1.345 +     * HPositionGenericInfo.
   1.346 +     * @param aFieldId Id of the field to be copied into the HPositionGenericInfo.
   1.347 +     * @param aValue Value to be copied into the HPositionGenericInfo.
   1.348 +     * @param aInfo The HPositionGenericInfo object where this field needs to
   1.349 +     * be added.
   1.350 +     * @return KErrArgument if aFieldId is EPositionFieldNone.
   1.351 +     * @return KErrPositionBufferOverflow if aValue will not fit in the HPositionGenericInfo
   1.352 +     * object.
   1.353 +     * @return KErrOverflow if there are already KPositionMaxReturnableFields set in the
   1.354 +     * HPositionGenericInfo object.
   1.355 +     * @return KErrNone if the SetValue was successful.
   1.356 +     */
   1.357 +	IMPORT_C static TInt SetValue(TPositionFieldId aFieldId,
   1.358 +	                              TReal32 aValue,
   1.359 +	                              HPositionGenericInfo& aInfo);
   1.360 +
   1.361 +    /**
   1.362 +     * Get the value for a location field of data type TReal32 from the
   1.363 +     * HPositionGenericInfo.
   1.364 +     * @param aFieldId Id of the field for which the value should be read from
   1.365 +     * HPositionGenericInfo.
   1.366 +     * @param[out] aValue The object where the data from the
   1.367 +     * HPositionGenericInfo is returned.
   1.368 +     * @param aInfo The HPositionGenericInfo object from where this field needs
   1.369 +     * to be read.
   1.370 +     * @return KErrNone is the operation was successful.
   1.371 +     * @return KErrNotFound if an object with aFieldId cannot be found in aInfo.
   1.372 +     */
   1.373 +	IMPORT_C static TInt GetValue(TPositionFieldId aFieldId,
   1.374 +	                              TReal32& aValue,
   1.375 +	                              const HPositionGenericInfo& aInfo);
   1.376 +
   1.377 +    /**
   1.378 +     * Set the value for a location field of data type TReal64 in the
   1.379 +     * HPositionGenericInfo.
   1.380 +     * @param aFieldId Id of the field to be copied into the HPositionGenericInfo.
   1.381 +     * @param aValue Value to be copied into the HPositionGenericInfo.
   1.382 +     * @param aInfo The HPositionGenericInfo object where this field needs to
   1.383 +     * be added.
   1.384 +     * @return KErrArgument if aFieldId is EPositionFieldNone.
   1.385 +     * @return KErrPositionBufferOverflow if aValue will not fit in the HPositionGenericInfo
   1.386 +     * object.
   1.387 +     * @return KErrOverflow if there are already KPositionMaxReturnableFields set in the
   1.388 +     * HPositionGenericInfo object.
   1.389 +     * @return KErrNone if the SetValue was successful.
   1.390 +     */
   1.391 +	IMPORT_C static TInt SetValue(TPositionFieldId aFieldId,
   1.392 +	                              const TReal64& aValue,
   1.393 +	                              HPositionGenericInfo& aInfo);
   1.394 +
   1.395 +    /**
   1.396 +     * Get the value for a location field of data type TReal64 from the
   1.397 +     * HPositionGenericInfo.
   1.398 +     * @param aFieldId Id of the field for which the value should be read from
   1.399 +     * HPositionGenericInfo.
   1.400 +     * @param[out] aValue The object where the data from the
   1.401 +     * HPositionGenericInfo is returned.
   1.402 +     * @param aInfo The HPositionGenericInfo object from where this field needs
   1.403 +     * to be read.
   1.404 +     * @return KErrNone is the operation was successful.
   1.405 +     * @return KErrNotFound if an object with aFieldId cannot be found in aInfo.
   1.406 +     */
   1.407 +	IMPORT_C static TInt GetValue(TPositionFieldId aFieldId,
   1.408 +	                              TReal64& aValue,
   1.409 +	                              const HPositionGenericInfo& aInfo);
   1.410 +
   1.411 +    /**
   1.412 +     * Set the value for a location field of data type TDesC8 & TDes8 in the
   1.413 +     * HPositionGenericInfo.
   1.414 +     * @param aFieldId Id of the field to be copied into the HPositionGenericInfo.
   1.415 +     * @param aValue Value to be copied into the HPositionGenericInfo.
   1.416 +     * @param aInfo The HPositionGenericInfo object where this field needs to
   1.417 +     * be added.
   1.418 +     * @return KErrArgument if aFieldId is EPositionFieldNone.
   1.419 +     * @return KErrPositionBufferOverflow if aValue will not fit in the HPositionGenericInfo
   1.420 +     * object.
   1.421 +     * @return KErrOverflow if there are already KPositionMaxReturnableFields set in the
   1.422 +     * HPositionGenericInfo object.
   1.423 +     * @return KErrNone if the SetValue was successful.
   1.424 +     */
   1.425 +	IMPORT_C static TInt SetValue(TPositionFieldId aFieldId,
   1.426 +	                              const TDesC8& aValue,
   1.427 +	                              HPositionGenericInfo& aInfo);
   1.428 +
   1.429 +    /**
   1.430 +     * Get the value for a location field of data type TDes8 from the
   1.431 +     * HPositionGenericInfo.
   1.432 +     * @param aFieldId Id of the field for which the value should be read from
   1.433 +     * HPositionGenericInfo.
   1.434 +     * @param[out] aValue The object where the data from the
   1.435 +     * HPositionGenericInfo is returned.
   1.436 +     * @param aInfo The HPositionGenericInfo object from where this field needs
   1.437 +     * to be read.
   1.438 +     * @return KErrNone is the operation was successful.
   1.439 +     * @return KErrNotFound if an object with aFieldId cannot be found in aInfo.
   1.440 +     */
   1.441 +	IMPORT_C static TInt GetValue(TPositionFieldId aFieldId,
   1.442 +	                              TDes8& aValue,
   1.443 +	                              const HPositionGenericInfo& aInfo);
   1.444 +
   1.445 +    /**
   1.446 +     * Set the value for a location field of data type TDesC16 & TDes16 in the
   1.447 +     * HPositionGenericInfo.
   1.448 +     * @param aFieldId Id of the field to be copied into the HPositionGenericInfo.
   1.449 +     * @param aValue Value to be copied into the HPositionGenericInfo.
   1.450 +     * @param aInfo The HPositionGenericInfo object where this field needs to
   1.451 +     * be added.
   1.452 +     * @return KErrArgument if aFieldId is EPositionFieldNone.
   1.453 +     * @return KErrPositionBufferOverflow if aValue will not fit in the HPositionGenericInfo
   1.454 +     * object.
   1.455 +     * @return KErrOverflow if there are already KPositionMaxReturnableFields set in the
   1.456 +     * HPositionGenericInfo object.
   1.457 +     * @return KErrNone if the SetValue was successful.
   1.458 +     */
   1.459 +	IMPORT_C static TInt SetValue(TPositionFieldId aFieldId,
   1.460 +	                              const TDesC16& aValue,
   1.461 +	                              HPositionGenericInfo& aInfo);
   1.462 +
   1.463 +    /**
   1.464 +     * Get the value for a location field of data type TDes16 from the
   1.465 +     * HPositionGenericInfo.
   1.466 +     * @param aFieldId Id of the field for which the value should be read from
   1.467 +     * HPositionGenericInfo.
   1.468 +     * @param[out] aValue The object where the data from the
   1.469 +     * HPositionGenericInfo is returned.
   1.470 +     * @param aInfo The HPositionGenericInfo object from where this field needs
   1.471 +     * to be read.
   1.472 +     * @return KErrNone is the operation was successful.
   1.473 +     * @return KErrNotFound if an object with aFieldId cannot be found in aInfo.
   1.474 +     */
   1.475 +	IMPORT_C static TInt GetValue(TPositionFieldId aFieldId,
   1.476 +	                              TDes16& aValue,
   1.477 +	                              const HPositionGenericInfo& aInfo);
   1.478 +
   1.479 +    /**
   1.480 +     * Get the value for a location field of data type TPtrC8 from the
   1.481 +     * HPositionGenericInfo.
   1.482 +     * @param aFieldId Id of the field for which the value should be read from
   1.483 +     * HPositionGenericInfo.
   1.484 +     * @param[out] aValue The object where the data from the
   1.485 +     * HPositionGenericInfo is returned.
   1.486 +     * @param aInfo The HPositionGenericInfo object from where this field needs
   1.487 +     * to be read.
   1.488 +     * @return KErrNone is the operation was successful.
   1.489 +     * @return KErrNotFound if an object with aFieldId cannot be found in aInfo.
   1.490 +     */
   1.491 +	IMPORT_C static TInt GetValue(TPositionFieldId aFieldId,
   1.492 +	                              TPtrC8& aValue,
   1.493 +	                              const HPositionGenericInfo& aInfo);
   1.494 +
   1.495 +    /**
   1.496 +     * Get the value for a location field of data type TPtrC16 from the
   1.497 +     * HPositionGenericInfo.
   1.498 +     * @param aFieldId Id of the field for which the value should be read from
   1.499 +     * HPositionGenericInfo.
   1.500 +     * @param[out] aValue The object where the data from the
   1.501 +     * HPositionGenericInfo is returned.
   1.502 +     * @param aInfo The HPositionGenericInfo object from where this field needs
   1.503 +     * to be read.
   1.504 +     * @return KErrNone is the operation was successful.
   1.505 +     * @return KErrNotFound if an object with aFieldId cannot be found in aInfo.
   1.506 +     */
   1.507 +	IMPORT_C static TInt GetValue(TPositionFieldId aFieldId,
   1.508 +	                              TPtrC16& aValue,
   1.509 +	                              const HPositionGenericInfo& aInfo);
   1.510 +
   1.511 +    /**
   1.512 +     * Set the value for a location field of data type TTime in the
   1.513 +     * HPositionGenericInfo.
   1.514 +     * @param aFieldId Id of the field to be copied into the HPositionGenericInfo.
   1.515 +     * @param aValue Value to be copied into the HPositionGenericInfo.
   1.516 +     * @param aInfo The HPositionGenericInfo object where this field needs to
   1.517 +     * be added.
   1.518 +     * @return KErrArgument if aFieldId is EPositionFieldNone.
   1.519 +     * @return KErrPositionBufferOverflow if aValue will not fit in the HPositionGenericInfo
   1.520 +     * object.
   1.521 +     * @return KErrOverflow if there are already KPositionMaxReturnableFields set in the
   1.522 +     * HPositionGenericInfo object.
   1.523 +     * @return KErrNone if the SetValue was successful.
   1.524 +     */
   1.525 +	IMPORT_C static TInt SetValue(TPositionFieldId aFieldId,
   1.526 +	                              const TTime& aValue,
   1.527 +	                              HPositionGenericInfo& aInfo);
   1.528 +
   1.529 +    /**
   1.530 +     * Get the value for a location field of data type TTime from the
   1.531 +     * HPositionGenericInfo.
   1.532 +     * @param aFieldId Id of the field for which the value should be read from
   1.533 +     * HPositionGenericInfo.
   1.534 +     * @param[out] aValue The object where the data from the
   1.535 +     * HPositionGenericInfo is returned.
   1.536 +     * @param aInfo The HPositionGenericInfo object from where this field needs
   1.537 +     * to be read.
   1.538 +     * @return KErrNone is the operation was successful.
   1.539 +     * @return KErrNotFound if an object with aFieldId cannot be found in aInfo.
   1.540 +     */
   1.541 +	IMPORT_C static TInt GetValue(TPositionFieldId aFieldId,
   1.542 +	                              TTime& aValue,
   1.543 +	                              const HPositionGenericInfo& aInfo);
   1.544 +
   1.545 +    /**
   1.546 +     * Set the value for a location field of data type TTimeIntervalMicroSeconds in the
   1.547 +     * HPositionGenericInfo.
   1.548 +     * @param aFieldId Id of the field to be copied into the HPositionGenericInfo.
   1.549 +     * @param aValue Value to be copied into the HPositionGenericInfo.
   1.550 +     * @param aInfo The HPositionGenericInfo object where this field needs to
   1.551 +     * be added.
   1.552 +     * @return KErrArgument if aFieldId is EPositionFieldNone.
   1.553 +     * @return KErrPositionBufferOverflow if aValue will not fit in the HPositionGenericInfo
   1.554 +     * object.
   1.555 +     * @return KErrOverflow if there are already KPositionMaxReturnableFields set in the
   1.556 +     * HPositionGenericInfo object.
   1.557 +     * @return KErrNone if the SetValue was successful.
   1.558 +     */
   1.559 +	IMPORT_C static TInt SetValue(TPositionFieldId aFieldId,
   1.560 +	                              const TTimeIntervalMicroSeconds& aValue,
   1.561 +	                              HPositionGenericInfo& aInfo);
   1.562 +
   1.563 +    /**
   1.564 +     * Get the value for a location field of data type TTimeIntervalMicroSeconds from the
   1.565 +     * HPositionGenericInfo.
   1.566 +     * @param aFieldId Id of the field for which the value should be read from
   1.567 +     * HPositionGenericInfo.
   1.568 +     * @param[out] aValue The object where the data from the
   1.569 +     * HPositionGenericInfo is returned.
   1.570 +     * @param aInfo The HPositionGenericInfo object from where this field needs
   1.571 +     * to be read.
   1.572 +     * @return KErrNone is the operation was successful.
   1.573 +     * @return KErrNotFound if an object with aFieldId cannot be found in aInfo.
   1.574 +     */
   1.575 +	IMPORT_C static TInt GetValue(TPositionFieldId aFieldId,
   1.576 +	                              TTimeIntervalMicroSeconds& aValue,
   1.577 +	                              const HPositionGenericInfo& aInfo);
   1.578 +	};
   1.579 +
   1.580 +/**
   1.581 + * This is an internal class used for indexing entries in HPositionGenericInfo.
   1.582 + * Methods in this class are not intended to be called directly. Clients should use
   1.583 + * HPositionGenericInfo::GetValue() and HPositionGenericInfo::SetValue() methods.
   1.584 + * @internalTechnology
   1.585 + * @released
   1.586 + */
   1.587 +class TPositionFieldIndex
   1.588 +	{
   1.589 +public:
   1.590 +    /** Constructor */
   1.591 +	inline TPositionFieldIndex();
   1.592 +
   1.593 +    /**
   1.594 +     * Get the field ID referred to by this object.
   1.595 +     * @return The Field Id. The Id is one of the enumerated values of
   1.596 +     * #_TPositionFieldId.
   1.597 +     */
   1.598 +	inline TPositionFieldId FieldId() const;
   1.599 +	/**
   1.600 +   	 * Get the offset in buffer where this field is contained.
   1.601 +	 * @return The offset in the buffer.
   1.602 +	 */
   1.603 +	inline TUint16 FieldStartPos() const;
   1.604 +	/**
   1.605 +     * Get the data type of this field.
   1.606 +	 * @return The data type of this field. The data type is one of the
   1.607 +	 * enumerated values of PositionFieldManager::TFieldType.
   1.608 +	 */
   1.609 +	inline PositionFieldManager::TFieldType FieldType() const;
   1.610 +    /**
   1.611 +     * Set the field ID referred to by this object.
   1.612 +     * @param aFieldId The Id of the field referred by this object. The Id is
   1.613 +     * one of the enumerated values of #_TPositionFieldId.
   1.614 +     */
   1.615 +	inline void SetFieldId(TPositionFieldId aFieldId);
   1.616 +	/**
   1.617 +	 * Set the offset in buffer where this field is contained.
   1.618 +	 * @param aFieldStartPos The offset in the buffer where this field is added.
   1.619 +	 */
   1.620 +	inline void SetFieldStartPos(TUint16 aFieldStartPos);
   1.621 +	/**
   1.622 +	 * Set the data type of this field.
   1.623 +	 * @param aFieldType The data type of this field. The data type is one of
   1.624 +	 * the enumerated values of PositionFieldManager::TFieldType.
   1.625 +	 */
   1.626 +	inline void SetFieldType(PositionFieldManager::TFieldType aFieldType);
   1.627 +
   1.628 +private:
   1.629 +	/** Id of the field that this index refers to. */
   1.630 +	TPositionFieldId iFieldId;
   1.631 +	/** Offset from HPositionGenericInfo::iBuffer that the object referred to by
   1.632 +	this index starts at. */
   1.633 +	TUint16 iFieldStartPos;
   1.634 +	/** Type of the data that this index refers to. */
   1.635 +	PositionFieldManager::TFieldType iFieldType;
   1.636 +	};
   1.637 +
   1.638 +#endif //__LBSFIELDS_H__