#include <LbsPositionInfo.h>
Link against:
lbs.lib
Link against:
lbsselflocate.lib
Class HPositionGenericInfo
class HPositionGenericInfo : public TPositionInfo;
Description
Class for getting arbitrary positioning related information back from the location server. The client can set upto KPositionMaxRequestedFields
as the number of requested fields. The definitions of the fields are given in the enum _TPositionFieldId
. The client must know what data type will be returned for each of the fields. The server will make a best attempt to fill
in the requested fields.
The client needs to allocate a big enough buffer to store the information it is requesting. In order to be sure of getting
back all the information the client must know and allocate memory considering the return value for each requested field.
Derivation
TPositionInfoBase
- This class provides the interface used by RPositioner to get a location fix, and...
TPositionInfo
- Standard class for getting a TPosition location fix from the location server.
HPositionGenericInfo
- Class for getting arbitrary positioning related information back from the locati...
Members
Defined in HPositionGenericInfo
:
Inherited from TPositionClassTypeBase
:
Inherited from TPositionInfo
:
Inherited from TPositionInfoBase
:
Construction and destruction
IMPORT_C static HPositionGenericInfo* NewL(TInt aBufferSize=KPositionGenericInfoDefaultBufferSize, TInt aMaxFields=KPositionGenericInfoDefaultMaxFields);
Description
Leaving constructor that allocs a HPositionGenericInfo on the heap.
Parameters
TInt aBufferSize |
Sets the size of the buffer that the HPositionGenericInfo will have.
|
TInt aMaxFields |
Sets the maximum number of fields that the HPositionGenericInfo will have.
|
|
Return value
IMPORT_C static HPositionGenericInfo* NewLC(TInt aBufferSize=KPositionGenericInfoDefaultBufferSize, TInt aMaxFields=KPositionGenericInfoDefaultMaxFields);
Description
Leaving constructor that allocs a HPositionGenericInfo on the heap and leaves a pointer to the object on the cleanup stack.
Parameters
TInt aBufferSize |
Sets the size of the buffer that the HPositionGenericInfo will have.
|
TInt aMaxFields |
Sets the maximum number of fields that the HPositionGenericInfo will have.
|
|
Return value
IMPORT_C static HPositionGenericInfo* New(TInt aBufferSize=KPositionGenericInfoDefaultBufferSize, TInt aMaxFields=KPositionGenericInfoDefaultMaxFields);
Description
Non-leaving constructor that allocs a HPositionGenericInfo on the heap.
Parameters
TInt aBufferSize |
Sets the size of the buffer that the HPositionGenericInfo will have.
|
TInt aMaxFields |
Sets the maximum number of fields that the HPositionGenericInfo will have.
|
|
Return value
HPositionGenericInfo *
|
position information in HPositionGenericInfo structure. NULL if heap allocation failed. Pointer to a HPositionGenericInfo
instance if alloc was successful.
|
|
IMPORT_C void ClearRequestedFields();
Description
Clears all the requested fields.
SetRequestedField(TPositionFieldId)
IMPORT_C TInt SetRequestedField(TPositionFieldId aFieldId);
Description
Method sets a field as requested.
Parameters
Return value
TInt
|
a symbian OS error code. KErrNone if aFieldId was successfully set as requested. KErrArgument if aFieldId is not strictly
between EPositionFieldNone and EPositionFieldIdLast . KErrOverflow if KPositionMaxRequestedFields requested fields have already been set.
|
|
SetRequestedFields(const TPositionFieldIdList)
IMPORT_C TInt SetRequestedFields(const TPositionFieldIdList aFieldIdList);
Description
Sets multiple TPositionFieldId objects as requested.
Parameters
Return value
TInt
|
a symbian OS error code. KErrNone if all Field Ids were successfully set as requested. KErrArgument if a filed Id is not strictly
between EPositionFieldNone and EPositionFieldIdLast . KErrOverflow if > KPositionMaxRequestedFields requested fields are attempted to be set.
|
|
IsRequestedField(TPositionFieldId)const
IMPORT_C TInt IsRequestedField(TPositionFieldId aFieldId) const;
Description
Returns whether a field has been set as requested.
Parameters
Return value
TInt
|
If the requested field has been set or not. ETrue if aFieldId has been set as requested. EFalse if aFieldId has not been set
as requested.
|
|
FirstRequestedFieldId()const
IMPORT_C TPositionFieldId FirstRequestedFieldId() const;
Description
Looks through the list of requested fields for the lowest valued field Id.
Return value
NextRequestedFieldId(TPositionFieldId)const
IMPORT_C TPositionFieldId NextRequestedFieldId(TPositionFieldId aFieldId) const;
Description
Looks for the next field Id in the list greater than aFieldId.
Parameters
TPositionFieldId aFieldId |
Function will return next field Id in the list greater than this Id.
|
|
Return value
IsFieldAvailable(TPositionFieldId)const
IMPORT_C TBool IsFieldAvailable(TPositionFieldId aFieldId) const;
Description
Looks through the available fields and returns whether aFieldId is in the list.
Parameters
Return value
TBool
|
If the requested field is available or not. ETrue if the field is available. EFalse if the field is not available.
|
|
IMPORT_C void ClearPositionData();
Description
Resets the object to clear all info to that as it was on construction except the requested fields. Use in the server to clear
the info before putting together a new location fix and passing it back to the client.
IMPORT_C TInt BufferSize() const;
Description
Method returns the size of the buffer set in the constructor
Return value
TInt
|
The size of the buffer that was set in the constructor.
|
|
IMPORT_C TInt MaxFields() const;
Description
Return value
TInt
|
The maximum field that is requestable/returnable that was set in the constructor.
|
|
SetValue(TPositionFieldId,const TType &)
inline TInt SetValue(TPositionFieldId aFieldId, const TType &aValue);
Description
Used to store position information.
Parameters
TPositionFieldId aFieldId |
Standard position field identifier. See _TPositionFieldId
|
const TType &aValue |
|
|
Return value
TInt
|
a symbian OS error code. KErrNone on successful operation. KErrPositionBufferOverflow if the data contained in the parameter
aValue cannot be added to the class due to the buffer being too small.
|
|
GetValue(TPositionFieldId,TType &)const
inline TInt GetValue(TPositionFieldId aFieldId, TType &aValue) const;
Description
Used to retrieve position information.
Parameters
TPositionFieldId aFieldId |
Standard position field identifier. See _TPositionFieldId
|
TType &aValue |
|
|
Return value