epoc32/include/lbsfields.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
parent 2 2fe1408b6811
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
williamr@2
     1
/*
williamr@2
     2
* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
williamr@2
     3
* All rights reserved.
williamr@2
     4
* This component and the accompanying materials are made available
williamr@4
     5
* under the terms of "Eclipse Public License v1.0"
williamr@2
     6
* which accompanies this distribution, and is available
williamr@4
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
williamr@2
     8
*
williamr@2
     9
* Initial Contributors:
williamr@2
    10
* Nokia Corporation - initial contribution.
williamr@2
    11
*
williamr@2
    12
* Contributors:
williamr@2
    13
*
williamr@2
    14
* Description:
williamr@2
    15
* Name        : LbsFields.h
williamr@2
    16
* Part of     : Mobile Location Framework/Location FW
williamr@2
    17
* Interface   : Location Acquisition API
williamr@2
    18
* Position data Fields manager
williamr@2
    19
* Version     :
williamr@2
    20
*
williamr@2
    21
*/
williamr@2
    22
williamr@2
    23
williamr@2
    24
williamr@2
    25
#ifndef __LBSFIELDS_H__
williamr@2
    26
#define __LBSFIELDS_H__
williamr@2
    27
williamr@2
    28
#include <e32std.h>
williamr@2
    29
#include <lbsfieldids.h>
williamr@2
    30
williamr@2
    31
/*
williamr@2
    32
 * This header file defines the helper classes used by HPositionGenericInfo
williamr@2
    33
 * The client should not use this class to access any positioning related information.
williamr@2
    34
 * Instead the cleitn should use the methods provided by HGenericPositionInfo.
williamr@2
    35
 */
williamr@2
    36
williamr@2
    37
/**
williamr@2
    38
 * Standard position field identifiers. It takes one of the enumerated  values of _TPositionFieldId
williamr@2
    39
 * @publishedAll
williamr@2
    40
 * @released
williamr@2
    41
*/
williamr@2
    42
typedef TUint16 TPositionFieldId;
williamr@2
    43
williamr@2
    44
/**
williamr@2
    45
 * Array of standard position field identifiers
williamr@2
    46
 * @publishedAll
williamr@2
    47
 * @released
williamr@2
    48
 */
williamr@2
    49
typedef TPositionFieldId TPositionFieldIdList[];
williamr@2
    50
class HPositionGenericInfo;
williamr@2
    51
williamr@2
    52
williamr@2
    53
/**
williamr@2
    54
 * This is an internal class to provide the interface for the
williamr@2
    55
 * HPositionGenericInfo::GetValue() and HPositionGenericInfo::SetValue()
williamr@2
    56
 * methods. Methods in this class are not intended to be called directly.
williamr@2
    57
 * Clients should use HPositionGenericInfo::GetValue() and
williamr@2
    58
 * HPositionGenericInfo::SetValue() methods.
williamr@4
    59
 * @publishedAll
williamr@2
    60
 * @released
williamr@2
    61
 */
williamr@2
    62
class PositionFieldManager
williamr@2
    63
	{
williamr@2
    64
public:
williamr@2
    65
	/**
williamr@2
    66
	 * Supported data types
williamr@2
    67
	 */
williamr@2
    68
	enum TFieldType
williamr@2
    69
		{
williamr@2
    70
		/// Undefined data type. This value should not be used.
williamr@2
    71
		EUndefined,
williamr@2
    72
		/// TInt8 datatype
williamr@2
    73
		ETInt8,
williamr@2
    74
		/// TInt16 datatype
williamr@2
    75
		ETInt16,
williamr@2
    76
		/// TInt32 datatype
williamr@2
    77
		ETInt32,
williamr@2
    78
		/// TInt64 datatype
williamr@2
    79
		ETInt64,
williamr@2
    80
		/// TUint8 datatype
williamr@2
    81
		ETUint8,
williamr@2
    82
		/// TUint16 datatype
williamr@2
    83
		ETUint16,
williamr@2
    84
		/// TUint32 datatype
williamr@2
    85
		ETUint32,
williamr@2
    86
		/// TReal32 datatype
williamr@2
    87
		ETReal32,
williamr@2
    88
		/// TReal64 datatype
williamr@2
    89
		ETReal64,
williamr@2
    90
		/// TTime datatype
williamr@2
    91
		ETTime,
williamr@2
    92
		/// Time specified in microseconds
williamr@2
    93
		ETTimeIntervalMicroSeconds,
williamr@2
    94
		/// 8-bit descriptor datatype
williamr@2
    95
		ETDesC8,
williamr@2
    96
		/// 16-bit descriptor datatype
williamr@2
    97
		ETDesC16
williamr@2
    98
		};
williamr@2
    99
williamr@2
   100
friend class HPositionGenericInfo;
williamr@2
   101
private:
williamr@2
   102
    /**
williamr@2
   103
     * Set the value for a location field of data type TInt8 in the
williamr@2
   104
     * HPositionGenericInfo.
williamr@2
   105
     * @param aFieldId Id of the field to be copied into the HPositionGenericInfo.
williamr@2
   106
     * @param aValue Value to be copied into the HPositionGenericInfo.
williamr@2
   107
     * @param aInfo The HPositionGenericInfo object where this field needs to
williamr@2
   108
     * be added.
williamr@2
   109
     * @return KErrArgument if aFieldId is EPositionFieldNone.
williamr@2
   110
     * @return KErrPositionBufferOverflow if aValue will not fit in the HPositionGenericInfo
williamr@2
   111
     * object.
williamr@2
   112
     * @return KErrOverflow if there are already KPositionMaxReturnableFields set in the
williamr@2
   113
     * HPositionGenericInfo object.
williamr@2
   114
     * @return KErrNone if the SetValue was successful.
williamr@2
   115
     */
williamr@2
   116
	IMPORT_C static TInt SetValue(TPositionFieldId aFieldId,
williamr@2
   117
	                              TInt8 aValue,
williamr@2
   118
	                              HPositionGenericInfo& aInfo);
williamr@2
   119
williamr@2
   120
    /**
williamr@2
   121
     * Get the value for a location field of data type TInt8 from the
williamr@2
   122
     * HPositionGenericInfo.
williamr@2
   123
     * @param aFieldId Id of the field for which the value should be read from
williamr@2
   124
     * HPositionGenericInfo.
williamr@4
   125
     * @param [out] aValue The object where the data from the
williamr@2
   126
     * HPositionGenericInfo is returned.
williamr@4
   127
     * @param [in] aInfo The HPositionGenericInfo object from where this field needs
williamr@2
   128
     * to be read.
williamr@2
   129
     * @return KErrNone is the operation was successful.
williamr@2
   130
     * @return KErrNotFound if an object with aFieldId cannot be found in aInfo.
williamr@2
   131
     */
williamr@2
   132
	IMPORT_C static TInt GetValue(TPositionFieldId aFieldId,
williamr@2
   133
	                              TInt8& aValue,
williamr@2
   134
	                              const HPositionGenericInfo& aInfo);
williamr@2
   135
williamr@2
   136
    /**
williamr@2
   137
     * Set the value for a location field of data type TInt16 in the
williamr@2
   138
     * HPositionGenericInfo.
williamr@2
   139
     * @param aFieldId Id of the field to be copied into the HPositionGenericInfo.
williamr@2
   140
     * @param aValue Value to be copied into the HPositionGenericInfo.
williamr@2
   141
     * @param aInfo The HPositionGenericInfo object where this field needs to
williamr@2
   142
     * be added.
williamr@2
   143
     * @return KErrArgument if aFieldId is EPositionFieldNone.
williamr@2
   144
     * @return KErrPositionBufferOverflow if aValue will not fit in the HPositionGenericInfo
williamr@2
   145
     * object.
williamr@2
   146
     * @return KErrOverflow if there are already KPositionMaxReturnableFields set in the
williamr@2
   147
     * HPositionGenericInfo object.
williamr@2
   148
     * @return KErrNone if the SetValue was successful.
williamr@2
   149
     */
williamr@2
   150
	IMPORT_C static TInt SetValue(TPositionFieldId aFieldId,
williamr@2
   151
	                              TInt16 aValue,
williamr@2
   152
	                              HPositionGenericInfo& aInfo);
williamr@2
   153
williamr@2
   154
    /**
williamr@2
   155
     * Get the value for a location field of data type TInt16 from the
williamr@2
   156
     * HPositionGenericInfo.
williamr@2
   157
     * @param aFieldId Id of the field for which the value should be read from
williamr@2
   158
     * HPositionGenericInfo.
williamr@4
   159
     * @param [in] aValue The object where the data from the
williamr@2
   160
     * HPositionGenericInfo is returned.
williamr@2
   161
     * @param aInfo The HPositionGenericInfo object from where this field needs
williamr@2
   162
     * to be read.
williamr@2
   163
     * @return KErrNone is the operation was successful.
williamr@2
   164
     * @return KErrNotFound if an object with aFieldId cannot be found in aInfo.
williamr@2
   165
     */
williamr@2
   166
	IMPORT_C static TInt GetValue(TPositionFieldId aFieldId,
williamr@2
   167
	                              TInt16& aValue,
williamr@2
   168
	                              const HPositionGenericInfo& aInfo);
williamr@2
   169
williamr@2
   170
    /**
williamr@2
   171
     * Set the value for a location field of data type TInt32 in the
williamr@2
   172
     * HPositionGenericInfo.
williamr@2
   173
     * @param aFieldId Id of the field to be copied into the HPositionGenericInfo.
williamr@2
   174
     * @param aValue Value to be copied into the HPositionGenericInfo.
williamr@2
   175
     * @param aInfo The HPositionGenericInfo object where this field needs to
williamr@2
   176
     * be added.
williamr@2
   177
     * @return KErrArgument if aFieldId is EPositionFieldNone.
williamr@2
   178
     * @return KErrPositionBufferOverflow if aValue will not fit in the HPositionGenericInfo
williamr@2
   179
     * object.
williamr@2
   180
     * @return KErrOverflow if there are already KPositionMaxReturnableFields set in the
williamr@2
   181
     * HPositionGenericInfo object.
williamr@2
   182
     * @return KErrNone if the SetValue was successful.
williamr@2
   183
     */
williamr@2
   184
	IMPORT_C static TInt SetValue(TPositionFieldId aFieldId,
williamr@2
   185
	                              TInt32 aValue,
williamr@2
   186
	                              HPositionGenericInfo& aInfo);
williamr@2
   187
williamr@2
   188
    /**
williamr@2
   189
     * Get the value for a location field of data type TInt32 from the
williamr@2
   190
     * HPositionGenericInfo.
williamr@2
   191
     * @param aFieldId Id of the field for which the value should be read from
williamr@2
   192
     * HPositionGenericInfo.
williamr@4
   193
     * @param [out] aValue The object where the data from the
williamr@2
   194
     * HPositionGenericInfo is returned.
williamr@2
   195
     * @param aInfo The HPositionGenericInfo object from where this field needs
williamr@2
   196
     * to be read.
williamr@2
   197
     * @return KErrNone is the operation was successful.
williamr@2
   198
     * @return KErrNotFound if an object with aFieldId cannot be found in aInfo.
williamr@2
   199
     */
williamr@2
   200
	IMPORT_C static TInt GetValue(TPositionFieldId aFieldId,
williamr@2
   201
	                              TInt32& aValue,
williamr@2
   202
	                              const HPositionGenericInfo& aInfo);
williamr@2
   203
williamr@2
   204
    /**
williamr@2
   205
     * Set the value for a location field of data type TInt64 in the
williamr@2
   206
     * HPositionGenericInfo.
williamr@2
   207
     * @param aFieldId Id of the field to be copied into the HPositionGenericInfo.
williamr@2
   208
     * @param aValue Value to be copied into the HPositionGenericInfo.
williamr@2
   209
     * @param aInfo The HPositionGenericInfo object where this field needs to
williamr@2
   210
     * be added.
williamr@2
   211
     * @return KErrArgument if aFieldId is EPositionFieldNone.
williamr@2
   212
     * @return KErrPositionBufferOverflow if aValue will not fit in the HPositionGenericInfo
williamr@2
   213
     * object.
williamr@2
   214
     * @return KErrOverflow if there are already KPositionMaxReturnableFields set in the
williamr@2
   215
     * HPositionGenericInfo object.
williamr@2
   216
     * @return KErrNone if the SetValue was successful.
williamr@2
   217
     */
williamr@2
   218
	IMPORT_C static TInt SetValue(TPositionFieldId aFieldId,
williamr@2
   219
	                              const TInt64& aValue,
williamr@2
   220
	                              HPositionGenericInfo& aInfo);
williamr@2
   221
williamr@2
   222
    /**
williamr@2
   223
     * Get the value for a location field of data type TInt64 from the
williamr@2
   224
     * HPositionGenericInfo.
williamr@2
   225
     * @param aFieldId Id of the field for which the value should be read from
williamr@2
   226
     * HPositionGenericInfo.
williamr@4
   227
     * @param [out] aValue The object where the data from the
williamr@2
   228
     * HPositionGenericInfo is returned.
williamr@2
   229
     * @param aInfo The HPositionGenericInfo object from where this field needs
williamr@2
   230
     * to be read.
williamr@2
   231
     * @return KErrNone is the operation was successful.
williamr@2
   232
     * @return KErrNotFound if an object with aFieldId cannot be found in aInfo.
williamr@2
   233
     */
williamr@2
   234
	IMPORT_C static TInt GetValue(TPositionFieldId aFieldId,
williamr@2
   235
	                              TInt64& aValue,
williamr@2
   236
	                              const HPositionGenericInfo& aInfo);
williamr@2
   237
williamr@2
   238
    /**
williamr@2
   239
     * Set the value for a location field of data type TUint8 in the
williamr@2
   240
     * HPositionGenericInfo.
williamr@2
   241
     * @param aFieldId Id of the field to be copied into the HPositionGenericInfo.
williamr@2
   242
     * @param aValue Value to be copied into the HPositionGenericInfo.
williamr@2
   243
     * @param aInfo The HPositionGenericInfo object where this field needs to
williamr@2
   244
     * be added.
williamr@2
   245
     * @return KErrArgument if aFieldId is EPositionFieldNone.
williamr@2
   246
     * @return KErrPositionBufferOverflow if aValue will not fit in the HPositionGenericInfo
williamr@2
   247
     * object.
williamr@2
   248
     * @return KErrOverflow if there are already KPositionMaxReturnableFields set in the
williamr@2
   249
     * HPositionGenericInfo object.
williamr@2
   250
     * @return KErrNone if the SetValue was successful.
williamr@2
   251
     */
williamr@2
   252
	IMPORT_C static TInt SetValue(TPositionFieldId aFieldId,
williamr@2
   253
	                              TUint8 aValue,
williamr@2
   254
	                              HPositionGenericInfo& aInfo);
williamr@2
   255
williamr@2
   256
    /**
williamr@2
   257
     * Get the value for a location field of data type TUint8 from the
williamr@2
   258
     * HPositionGenericInfo.
williamr@2
   259
     * @param aFieldId Id of the field for which the value should be read from
williamr@2
   260
     * HPositionGenericInfo.
williamr@4
   261
     * @param [out] aValue The object where the data from the
williamr@2
   262
     * HPositionGenericInfo is returned.
williamr@2
   263
     * @param aInfo The HPositionGenericInfo object from where this field needs
williamr@2
   264
     * to be read.
williamr@2
   265
     * @return KErrNone is the operation was successful.
williamr@2
   266
     * @return KErrNotFound if an object with aFieldId cannot be found in aInfo.
williamr@2
   267
     */
williamr@2
   268
	IMPORT_C static TInt GetValue(TPositionFieldId aFieldId,
williamr@2
   269
	                              TUint8& aValue,
williamr@2
   270
	                              const HPositionGenericInfo& aInfo);
williamr@2
   271
williamr@2
   272
    /**
williamr@2
   273
     * Set the value for a location field of data type TUint16 in the
williamr@2
   274
     * HPositionGenericInfo.
williamr@2
   275
     * @param aFieldId Id of the field to be copied into the HPositionGenericInfo.
williamr@2
   276
     * @param aValue Value to be copied into the HPositionGenericInfo.
williamr@2
   277
     * @param aInfo The HPositionGenericInfo object where this field needs to
williamr@2
   278
     * be added.
williamr@2
   279
     * @return KErrArgument if aFieldId is EPositionFieldNone.
williamr@2
   280
     * @return KErrPositionBufferOverflow if aValue will not fit in the HPositionGenericInfo
williamr@2
   281
     * object.
williamr@2
   282
     * @return KErrOverflow if there are already KPositionMaxReturnableFields set in the
williamr@2
   283
     * HPositionGenericInfo object.
williamr@2
   284
     * @return KErrNone if the SetValue was successful.
williamr@2
   285
     */
williamr@2
   286
	IMPORT_C static TInt SetValue(TPositionFieldId aFieldId,
williamr@2
   287
	                              TUint16 aValue,
williamr@2
   288
	                              HPositionGenericInfo& aInfo);
williamr@2
   289
williamr@2
   290
    /**
williamr@2
   291
     * Get the value for a location field of data type TUint16 from the
williamr@2
   292
     * HPositionGenericInfo.
williamr@2
   293
     * @param aFieldId Id of the field for which the value should be read from
williamr@2
   294
     * HPositionGenericInfo.
williamr@4
   295
     * @param [out] aValue The object where the data from the
williamr@2
   296
     * HPositionGenericInfo is returned.
williamr@2
   297
     * @param aInfo The HPositionGenericInfo object from where this field needs
williamr@2
   298
     * to be read.
williamr@2
   299
     * @return KErrNone is the operation was successful.
williamr@2
   300
     * @return KErrNotFound if an object with aFieldId cannot be found in aInfo.
williamr@2
   301
     */
williamr@2
   302
	IMPORT_C static TInt GetValue(TPositionFieldId aFieldId,
williamr@2
   303
	                              TUint16& aValue,
williamr@2
   304
	                              const HPositionGenericInfo& aInfo);
williamr@2
   305
williamr@2
   306
    /**
williamr@2
   307
     * Set the value for a location field of data type TUint32 in the
williamr@2
   308
     * HPositionGenericInfo.
williamr@2
   309
     * @param aFieldId Id of the field to be copied into the HPositionGenericInfo.
williamr@2
   310
     * @param aValue Value to be copied into the HPositionGenericInfo.
williamr@2
   311
     * @param aInfo The HPositionGenericInfo object where this field needs to
williamr@2
   312
     * be added.
williamr@2
   313
     * @return KErrArgument if aFieldId is EPositionFieldNone.
williamr@2
   314
     * @return KErrPositionBufferOverflow if aValue will not fit in the HPositionGenericInfo
williamr@2
   315
     * object.
williamr@2
   316
     * @return KErrOverflow if there are already KPositionMaxReturnableFields set in the
williamr@2
   317
     * HPositionGenericInfo object.
williamr@2
   318
     * @return KErrNone if the SetValue was successful.
williamr@2
   319
     */
williamr@2
   320
	IMPORT_C static TInt SetValue(TPositionFieldId aFieldId,
williamr@2
   321
	                              TUint32 aValue,
williamr@2
   322
	                              HPositionGenericInfo& aInfo);
williamr@2
   323
williamr@2
   324
    /**
williamr@2
   325
     * Get the value for a location field of data type TUint32 from the
williamr@2
   326
     * HPositionGenericInfo.
williamr@2
   327
     * @param aFieldId Id of the field for which the value should be read from
williamr@2
   328
     * HPositionGenericInfo.
williamr@4
   329
     * @param [out] aValue The object where the data from the
williamr@2
   330
     * HPositionGenericInfo is returned.
williamr@2
   331
     * @param aInfo The HPositionGenericInfo object from where this field needs
williamr@2
   332
     * to be read.
williamr@2
   333
     * @return KErrNone is the operation was successful.
williamr@2
   334
     * @return KErrNotFound if an object with aFieldId cannot be found in aInfo.
williamr@2
   335
     */
williamr@2
   336
	IMPORT_C static TInt GetValue(TPositionFieldId aFieldId,
williamr@2
   337
	                              TUint32& aValue,
williamr@2
   338
	                              const HPositionGenericInfo& aInfo);
williamr@2
   339
williamr@2
   340
    /**
williamr@2
   341
     * Set the value for a location field of data type TReal32 in the
williamr@2
   342
     * HPositionGenericInfo.
williamr@2
   343
     * @param aFieldId Id of the field to be copied into the HPositionGenericInfo.
williamr@2
   344
     * @param aValue Value to be copied into the HPositionGenericInfo.
williamr@2
   345
     * @param aInfo The HPositionGenericInfo object where this field needs to
williamr@2
   346
     * be added.
williamr@2
   347
     * @return KErrArgument if aFieldId is EPositionFieldNone.
williamr@2
   348
     * @return KErrPositionBufferOverflow if aValue will not fit in the HPositionGenericInfo
williamr@2
   349
     * object.
williamr@2
   350
     * @return KErrOverflow if there are already KPositionMaxReturnableFields set in the
williamr@2
   351
     * HPositionGenericInfo object.
williamr@2
   352
     * @return KErrNone if the SetValue was successful.
williamr@2
   353
     */
williamr@2
   354
	IMPORT_C static TInt SetValue(TPositionFieldId aFieldId,
williamr@2
   355
	                              TReal32 aValue,
williamr@2
   356
	                              HPositionGenericInfo& aInfo);
williamr@2
   357
williamr@2
   358
    /**
williamr@2
   359
     * Get the value for a location field of data type TReal32 from the
williamr@2
   360
     * HPositionGenericInfo.
williamr@2
   361
     * @param aFieldId Id of the field for which the value should be read from
williamr@2
   362
     * HPositionGenericInfo.
williamr@4
   363
     * @param [out] aValue The object where the data from the
williamr@2
   364
     * HPositionGenericInfo is returned.
williamr@2
   365
     * @param aInfo The HPositionGenericInfo object from where this field needs
williamr@2
   366
     * to be read.
williamr@2
   367
     * @return KErrNone is the operation was successful.
williamr@2
   368
     * @return KErrNotFound if an object with aFieldId cannot be found in aInfo.
williamr@2
   369
     */
williamr@2
   370
	IMPORT_C static TInt GetValue(TPositionFieldId aFieldId,
williamr@2
   371
	                              TReal32& aValue,
williamr@2
   372
	                              const HPositionGenericInfo& aInfo);
williamr@2
   373
williamr@2
   374
    /**
williamr@2
   375
     * Set the value for a location field of data type TReal64 in the
williamr@2
   376
     * HPositionGenericInfo.
williamr@2
   377
     * @param aFieldId Id of the field to be copied into the HPositionGenericInfo.
williamr@2
   378
     * @param aValue Value to be copied into the HPositionGenericInfo.
williamr@2
   379
     * @param aInfo The HPositionGenericInfo object where this field needs to
williamr@2
   380
     * be added.
williamr@2
   381
     * @return KErrArgument if aFieldId is EPositionFieldNone.
williamr@2
   382
     * @return KErrPositionBufferOverflow if aValue will not fit in the HPositionGenericInfo
williamr@2
   383
     * object.
williamr@2
   384
     * @return KErrOverflow if there are already KPositionMaxReturnableFields set in the
williamr@2
   385
     * HPositionGenericInfo object.
williamr@2
   386
     * @return KErrNone if the SetValue was successful.
williamr@2
   387
     */
williamr@2
   388
	IMPORT_C static TInt SetValue(TPositionFieldId aFieldId,
williamr@2
   389
	                              const TReal64& aValue,
williamr@2
   390
	                              HPositionGenericInfo& aInfo);
williamr@2
   391
williamr@2
   392
    /**
williamr@2
   393
     * Get the value for a location field of data type TReal64 from the
williamr@2
   394
     * HPositionGenericInfo.
williamr@2
   395
     * @param aFieldId Id of the field for which the value should be read from
williamr@2
   396
     * HPositionGenericInfo.
williamr@4
   397
     * @param [out] aValue The object where the data from the
williamr@2
   398
     * HPositionGenericInfo is returned.
williamr@2
   399
     * @param aInfo The HPositionGenericInfo object from where this field needs
williamr@2
   400
     * to be read.
williamr@2
   401
     * @return KErrNone is the operation was successful.
williamr@2
   402
     * @return KErrNotFound if an object with aFieldId cannot be found in aInfo.
williamr@2
   403
     */
williamr@2
   404
	IMPORT_C static TInt GetValue(TPositionFieldId aFieldId,
williamr@2
   405
	                              TReal64& aValue,
williamr@2
   406
	                              const HPositionGenericInfo& aInfo);
williamr@2
   407
williamr@2
   408
    /**
williamr@2
   409
     * Set the value for a location field of data type TDesC8 & TDes8 in the
williamr@2
   410
     * HPositionGenericInfo.
williamr@2
   411
     * @param aFieldId Id of the field to be copied into the HPositionGenericInfo.
williamr@2
   412
     * @param aValue Value to be copied into the HPositionGenericInfo.
williamr@2
   413
     * @param aInfo The HPositionGenericInfo object where this field needs to
williamr@2
   414
     * be added.
williamr@2
   415
     * @return KErrArgument if aFieldId is EPositionFieldNone.
williamr@2
   416
     * @return KErrPositionBufferOverflow if aValue will not fit in the HPositionGenericInfo
williamr@2
   417
     * object.
williamr@2
   418
     * @return KErrOverflow if there are already KPositionMaxReturnableFields set in the
williamr@2
   419
     * HPositionGenericInfo object.
williamr@2
   420
     * @return KErrNone if the SetValue was successful.
williamr@2
   421
     */
williamr@2
   422
	IMPORT_C static TInt SetValue(TPositionFieldId aFieldId,
williamr@2
   423
	                              const TDesC8& aValue,
williamr@2
   424
	                              HPositionGenericInfo& aInfo);
williamr@2
   425
williamr@2
   426
    /**
williamr@2
   427
     * Get the value for a location field of data type TDes8 from the
williamr@2
   428
     * HPositionGenericInfo.
williamr@2
   429
     * @param aFieldId Id of the field for which the value should be read from
williamr@2
   430
     * HPositionGenericInfo.
williamr@4
   431
     * @param [out] aValue The object where the data from the
williamr@2
   432
     * HPositionGenericInfo is returned.
williamr@2
   433
     * @param aInfo The HPositionGenericInfo object from where this field needs
williamr@2
   434
     * to be read.
williamr@2
   435
     * @return KErrNone is the operation was successful.
williamr@2
   436
     * @return KErrNotFound if an object with aFieldId cannot be found in aInfo.
williamr@2
   437
     */
williamr@2
   438
	IMPORT_C static TInt GetValue(TPositionFieldId aFieldId,
williamr@2
   439
	                              TDes8& aValue,
williamr@2
   440
	                              const HPositionGenericInfo& aInfo);
williamr@2
   441
williamr@2
   442
    /**
williamr@2
   443
     * Set the value for a location field of data type TDesC16 & TDes16 in the
williamr@2
   444
     * HPositionGenericInfo.
williamr@2
   445
     * @param aFieldId Id of the field to be copied into the HPositionGenericInfo.
williamr@2
   446
     * @param aValue Value to be copied into the HPositionGenericInfo.
williamr@2
   447
     * @param aInfo The HPositionGenericInfo object where this field needs to
williamr@2
   448
     * be added.
williamr@2
   449
     * @return KErrArgument if aFieldId is EPositionFieldNone.
williamr@2
   450
     * @return KErrPositionBufferOverflow if aValue will not fit in the HPositionGenericInfo
williamr@2
   451
     * object.
williamr@2
   452
     * @return KErrOverflow if there are already KPositionMaxReturnableFields set in the
williamr@2
   453
     * HPositionGenericInfo object.
williamr@2
   454
     * @return KErrNone if the SetValue was successful.
williamr@2
   455
     */
williamr@2
   456
	IMPORT_C static TInt SetValue(TPositionFieldId aFieldId,
williamr@2
   457
	                              const TDesC16& aValue,
williamr@2
   458
	                              HPositionGenericInfo& aInfo);
williamr@2
   459
williamr@2
   460
    /**
williamr@2
   461
     * Get the value for a location field of data type TDes16 from the
williamr@2
   462
     * HPositionGenericInfo.
williamr@2
   463
     * @param aFieldId Id of the field for which the value should be read from
williamr@2
   464
     * HPositionGenericInfo.
williamr@4
   465
     * @param [out] aValue The object where the data from the
williamr@2
   466
     * HPositionGenericInfo is returned.
williamr@2
   467
     * @param aInfo The HPositionGenericInfo object from where this field needs
williamr@2
   468
     * to be read.
williamr@2
   469
     * @return KErrNone is the operation was successful.
williamr@2
   470
     * @return KErrNotFound if an object with aFieldId cannot be found in aInfo.
williamr@2
   471
     */
williamr@2
   472
	IMPORT_C static TInt GetValue(TPositionFieldId aFieldId,
williamr@2
   473
	                              TDes16& aValue,
williamr@2
   474
	                              const HPositionGenericInfo& aInfo);
williamr@2
   475
williamr@2
   476
    /**
williamr@2
   477
     * Get the value for a location field of data type TPtrC8 from the
williamr@2
   478
     * HPositionGenericInfo.
williamr@2
   479
     * @param aFieldId Id of the field for which the value should be read from
williamr@2
   480
     * HPositionGenericInfo.
williamr@4
   481
     * @param [out] aValue The object where the data from the
williamr@2
   482
     * HPositionGenericInfo is returned.
williamr@2
   483
     * @param aInfo The HPositionGenericInfo object from where this field needs
williamr@2
   484
     * to be read.
williamr@2
   485
     * @return KErrNone is the operation was successful.
williamr@2
   486
     * @return KErrNotFound if an object with aFieldId cannot be found in aInfo.
williamr@2
   487
     */
williamr@2
   488
	IMPORT_C static TInt GetValue(TPositionFieldId aFieldId,
williamr@2
   489
	                              TPtrC8& aValue,
williamr@2
   490
	                              const HPositionGenericInfo& aInfo);
williamr@2
   491
williamr@2
   492
    /**
williamr@2
   493
     * Get the value for a location field of data type TPtrC16 from the
williamr@2
   494
     * HPositionGenericInfo.
williamr@2
   495
     * @param aFieldId Id of the field for which the value should be read from
williamr@2
   496
     * HPositionGenericInfo.
williamr@4
   497
     * @param [out] aValue The object where the data from the
williamr@2
   498
     * HPositionGenericInfo is returned.
williamr@2
   499
     * @param aInfo The HPositionGenericInfo object from where this field needs
williamr@2
   500
     * to be read.
williamr@2
   501
     * @return KErrNone is the operation was successful.
williamr@2
   502
     * @return KErrNotFound if an object with aFieldId cannot be found in aInfo.
williamr@2
   503
     */
williamr@2
   504
	IMPORT_C static TInt GetValue(TPositionFieldId aFieldId,
williamr@2
   505
	                              TPtrC16& aValue,
williamr@2
   506
	                              const HPositionGenericInfo& aInfo);
williamr@2
   507
williamr@2
   508
    /**
williamr@2
   509
     * Set the value for a location field of data type TTime in the
williamr@2
   510
     * HPositionGenericInfo.
williamr@2
   511
     * @param aFieldId Id of the field to be copied into the HPositionGenericInfo.
williamr@2
   512
     * @param aValue Value to be copied into the HPositionGenericInfo.
williamr@2
   513
     * @param aInfo The HPositionGenericInfo object where this field needs to
williamr@2
   514
     * be added.
williamr@2
   515
     * @return KErrArgument if aFieldId is EPositionFieldNone.
williamr@2
   516
     * @return KErrPositionBufferOverflow if aValue will not fit in the HPositionGenericInfo
williamr@2
   517
     * object.
williamr@2
   518
     * @return KErrOverflow if there are already KPositionMaxReturnableFields set in the
williamr@2
   519
     * HPositionGenericInfo object.
williamr@2
   520
     * @return KErrNone if the SetValue was successful.
williamr@2
   521
     */
williamr@2
   522
	IMPORT_C static TInt SetValue(TPositionFieldId aFieldId,
williamr@2
   523
	                              const TTime& aValue,
williamr@2
   524
	                              HPositionGenericInfo& aInfo);
williamr@2
   525
williamr@2
   526
    /**
williamr@2
   527
     * Get the value for a location field of data type TTime from the
williamr@2
   528
     * HPositionGenericInfo.
williamr@2
   529
     * @param aFieldId Id of the field for which the value should be read from
williamr@2
   530
     * HPositionGenericInfo.
williamr@4
   531
     * @param [out] aValue The object where the data from the
williamr@2
   532
     * HPositionGenericInfo is returned.
williamr@2
   533
     * @param aInfo The HPositionGenericInfo object from where this field needs
williamr@2
   534
     * to be read.
williamr@2
   535
     * @return KErrNone is the operation was successful.
williamr@2
   536
     * @return KErrNotFound if an object with aFieldId cannot be found in aInfo.
williamr@2
   537
     */
williamr@2
   538
	IMPORT_C static TInt GetValue(TPositionFieldId aFieldId,
williamr@2
   539
	                              TTime& aValue,
williamr@2
   540
	                              const HPositionGenericInfo& aInfo);
williamr@2
   541
williamr@2
   542
    /**
williamr@2
   543
     * Set the value for a location field of data type TTimeIntervalMicroSeconds in the
williamr@2
   544
     * HPositionGenericInfo.
williamr@2
   545
     * @param aFieldId Id of the field to be copied into the HPositionGenericInfo.
williamr@2
   546
     * @param aValue Value to be copied into the HPositionGenericInfo.
williamr@2
   547
     * @param aInfo The HPositionGenericInfo object where this field needs to
williamr@2
   548
     * be added.
williamr@2
   549
     * @return KErrArgument if aFieldId is EPositionFieldNone.
williamr@2
   550
     * @return KErrPositionBufferOverflow if aValue will not fit in the HPositionGenericInfo
williamr@2
   551
     * object.
williamr@2
   552
     * @return KErrOverflow if there are already KPositionMaxReturnableFields set in the
williamr@2
   553
     * HPositionGenericInfo object.
williamr@2
   554
     * @return KErrNone if the SetValue was successful.
williamr@2
   555
     */
williamr@2
   556
	IMPORT_C static TInt SetValue(TPositionFieldId aFieldId,
williamr@2
   557
	                              const TTimeIntervalMicroSeconds& aValue,
williamr@2
   558
	                              HPositionGenericInfo& aInfo);
williamr@2
   559
williamr@2
   560
    /**
williamr@2
   561
     * Get the value for a location field of data type TTimeIntervalMicroSeconds from the
williamr@2
   562
     * HPositionGenericInfo.
williamr@2
   563
     * @param aFieldId Id of the field for which the value should be read from
williamr@2
   564
     * HPositionGenericInfo.
williamr@4
   565
     * @param [out] aValue The object where the data from the
williamr@2
   566
     * HPositionGenericInfo is returned.
williamr@2
   567
     * @param aInfo The HPositionGenericInfo object from where this field needs
williamr@2
   568
     * to be read.
williamr@2
   569
     * @return KErrNone is the operation was successful.
williamr@2
   570
     * @return KErrNotFound if an object with aFieldId cannot be found in aInfo.
williamr@2
   571
     */
williamr@2
   572
	IMPORT_C static TInt GetValue(TPositionFieldId aFieldId,
williamr@2
   573
	                              TTimeIntervalMicroSeconds& aValue,
williamr@2
   574
	                              const HPositionGenericInfo& aInfo);
williamr@2
   575
	};
williamr@2
   576
williamr@4
   577
williamr@4
   578
#ifndef SYMBIAN_ENABLE_SPLIT_HEADERS
williamr@2
   579
/**
williamr@2
   580
 * This is an internal class used for indexing entries in HPositionGenericInfo.
williamr@2
   581
 * Methods in this class are not intended to be called directly. Clients should use
williamr@2
   582
 * HPositionGenericInfo::GetValue() and HPositionGenericInfo::SetValue() methods.
williamr@2
   583
 * @internalTechnology
williamr@2
   584
 * @released
williamr@2
   585
 */
williamr@2
   586
class TPositionFieldIndex
williamr@2
   587
	{
williamr@2
   588
public:
williamr@2
   589
    /** Constructor */
williamr@2
   590
	inline TPositionFieldIndex();
williamr@2
   591
williamr@2
   592
    /**
williamr@2
   593
     * Get the field ID referred to by this object.
williamr@2
   594
     * @return The Field Id. The Id is one of the enumerated values of
williamr@2
   595
     * #_TPositionFieldId.
williamr@2
   596
     */
williamr@2
   597
	inline TPositionFieldId FieldId() const;
williamr@2
   598
	/**
williamr@2
   599
   	 * Get the offset in buffer where this field is contained.
williamr@2
   600
	 * @return The offset in the buffer.
williamr@2
   601
	 */
williamr@2
   602
	inline TUint16 FieldStartPos() const;
williamr@2
   603
	/**
williamr@2
   604
     * Get the data type of this field.
williamr@2
   605
	 * @return The data type of this field. The data type is one of the
williamr@2
   606
	 * enumerated values of PositionFieldManager::TFieldType.
williamr@2
   607
	 */
williamr@2
   608
	inline PositionFieldManager::TFieldType FieldType() const;
williamr@2
   609
    /**
williamr@2
   610
     * Set the field ID referred to by this object.
williamr@2
   611
     * @param aFieldId The Id of the field referred by this object. The Id is
williamr@2
   612
     * one of the enumerated values of #_TPositionFieldId.
williamr@2
   613
     */
williamr@2
   614
	inline void SetFieldId(TPositionFieldId aFieldId);
williamr@2
   615
	/**
williamr@2
   616
	 * Set the offset in buffer where this field is contained.
williamr@2
   617
	 * @param aFieldStartPos The offset in the buffer where this field is added.
williamr@2
   618
	 */
williamr@2
   619
	inline void SetFieldStartPos(TUint16 aFieldStartPos);
williamr@2
   620
	/**
williamr@2
   621
	 * Set the data type of this field.
williamr@2
   622
	 * @param aFieldType The data type of this field. The data type is one of
williamr@2
   623
	 * the enumerated values of PositionFieldManager::TFieldType.
williamr@2
   624
	 */
williamr@2
   625
	inline void SetFieldType(PositionFieldManager::TFieldType aFieldType);
williamr@2
   626
williamr@2
   627
private:
williamr@2
   628
	/** Id of the field that this index refers to. */
williamr@2
   629
	TPositionFieldId iFieldId;
williamr@2
   630
	/** Offset from HPositionGenericInfo::iBuffer that the object referred to by
williamr@2
   631
	this index starts at. */
williamr@2
   632
	TUint16 iFieldStartPos;
williamr@2
   633
	/** Type of the data that this index refers to. */
williamr@2
   634
	PositionFieldManager::TFieldType iFieldType;
williamr@2
   635
	};
williamr@4
   636
#endif // SYMBIAN_ENABLE_SPLIT_HEADERS
williamr@2
   637
williamr@2
   638
#endif //__LBSFIELDS_H__