HPositionGenericInfo Class Reference

class HPositionGenericInfo : public TPositionInfo

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.

Public Member Functions
IMPORT_C TIntBufferSize()
IMPORT_C voidClearPositionData()
IMPORT_C voidClearRequestedFields()
IMPORT_C TPositionFieldIdFirstRequestedFieldId()
TInt GetValue(TPositionFieldId, TType &)
IMPORT_C TBoolIsFieldAvailable(TPositionFieldId)
IMPORT_C TIntIsRequestedField(TPositionFieldId)
IMPORT_C TIntMaxFields()
IMPORT_C HPositionGenericInfo *New(TInt, TInt)
IMPORT_C HPositionGenericInfo *NewL(TInt, TInt)
IMPORT_C HPositionGenericInfo *NewLC(TInt, TInt)
IMPORT_C TPositionFieldIdNextRequestedFieldId(TPositionFieldId)
IMPORT_C TIntSetRequestedField(TPositionFieldId)
IMPORT_C TIntSetRequestedFields(const TPositionFieldIdList)
TInt SetValue(TPositionFieldId, const TType &)
Private Member Functions
HPositionGenericInfo(TInt, TInt, TUint, TUint, TBool)
HPositionGenericInfo(const HPositionGenericInfo &)
TPositionFieldIndex *FieldIndexPtr()
const TPositionFieldIndex *FieldIndexPtr()
TInt FindEmptyRequestedFieldOffset(TInt &)
TPositionFieldId *RequestedFieldPtr()
const TPositionFieldId *RequestedFieldPtr()
HPositionGenericInfo &operator=(const HPositionGenericInfo &)
Inherited Functions
TPositionClassTypeBase::PositionClassSize()const
TPositionClassTypeBase::PositionClassType()const
TPositionClassTypeBase::TPositionClassTypeBase()
TPositionInfo::GetPosition(TPosition &)const
TPositionInfo::SetPosition(const TPosition &)
TPositionInfo::TPositionInfo()
TPositionInfoBase::ModuleId()const
TPositionInfoBase::PositionMode()const
TPositionInfoBase::PositionModeReason()const
TPositionInfoBase::SetModuleId(TPositionModuleId)
TPositionInfoBase::SetPositionMode(TPositionModuleInfo::TTechnologyType)
TPositionInfoBase::SetPositionModeReason(TPositionModeReason)
TPositionInfoBase::SetUpdateType(TPositionUpdateType)
TPositionInfoBase::TPositionInfoBase()
TPositionInfoBase::UpdateType()const
Private Attributes
TUint8 iBuffer
const TUintiDataStartPoint
const TUintiFieldIndexStartPoint
const TIntiMaxFields
const TIntiTotalBufferSize
Inherited Attributes
TPositionClassTypeBase::iPosClassSize
TPositionClassTypeBase::iPosClassType
TPositionInfo::iPosition
TPositionInfoBase::iModuleId
TPositionInfoBase::iPositionMode
TPositionInfoBase::iPositionModeReason
TPositionInfoBase::iUpdateType

Constructor & Destructor Documentation

HPositionGenericInfo(TInt, TInt, TUint, TUint, TBool)

HPositionGenericInfo(TIntaDataBufferSize,
TIntaMaxFields,
TUintaFieldIndexStartPoint,
TUintaDataStartPoint,
TBoolaResetRequestedFields
)[private]

private constructor. To be used within the class

Parameters

TInt aDataBufferSize
TInt aMaxFields
TUint aFieldIndexStartPoint
TUint aDataStartPoint
TBool aResetRequestedFields

HPositionGenericInfo(const HPositionGenericInfo &)

HPositionGenericInfo(const HPositionGenericInfo &)[private]

internal private method

Parameters

const HPositionGenericInfo &

Member Functions Documentation

BufferSize()

IMPORT_C TIntBufferSize()const

Method returns the size of the buffer set in the constructor

ClearPositionData()

IMPORT_C voidClearPositionData()

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.

ClearRequestedFields()

IMPORT_C voidClearRequestedFields()

Clears all the requested fields.

FieldIndexPtr()

TPositionFieldIndex *FieldIndexPtr()[private, inline]

Helper method. For internal usage only

FieldIndexPtr()

const TPositionFieldIndex *FieldIndexPtr()const [private, inline]

Helper method. For internal usage only

FindEmptyRequestedFieldOffset(TInt &)

TInt FindEmptyRequestedFieldOffset(TInt &aEmptyFieldOffset)const [private]

Helper method. For internal usage only

Parameters

TInt & aEmptyFieldOffset

FirstRequestedFieldId()

IMPORT_C TPositionFieldIdFirstRequestedFieldId()const

Looks through the list of requested fields for the lowest valued field Id.

GetValue(TPositionFieldId, TType &)

TInt GetValue(TPositionFieldIdaFieldId,
TType &aValue
)const [inline]

Used to retrieve position information.

Parameters

TPositionFieldId aFieldIdStandard position field identifier. See _TPositionFieldId
TType & aValueThe parameter aValue can be of the type TInt8, TInt16, TInt32, TInt64, TUint8, TUint16, TUint32, TReal32, TReal64, TTime, TTimeIntervalMicroSeconds, Des8, or Des16. Panics with EPositionGenericInfoMismatchDataType if there is a mismatch in the data type of a field.

IsFieldAvailable(TPositionFieldId)

IMPORT_C TBoolIsFieldAvailable(TPositionFieldIdaFieldId)const

Looks through the available fields and returns whether aFieldId is in the list.

Parameters

TPositionFieldId aFieldIdThis is the field Id that is searched for.

IsRequestedField(TPositionFieldId)

IMPORT_C TIntIsRequestedField(TPositionFieldIdaFieldId)const

Returns whether a field has been set as requested.

Parameters

TPositionFieldId aFieldIdField Id to search for.

MaxFields()

IMPORT_C TIntMaxFields()const

New(TInt, TInt)

IMPORT_C HPositionGenericInfo *New(TIntaBufferSize =  KPositionGenericInfoDefaultBufferSize ,
TIntaMaxFields =  KPositionGenericInfoDefaultMaxFields
)[static]

Non-leaving constructor that allocs a HPositionGenericInfo on the heap.

Parameters

TInt aBufferSize =  KPositionGenericInfoDefaultBufferSize Sets the size of the buffer that the HPositionGenericInfo will have.
TInt aMaxFields =  KPositionGenericInfoDefaultMaxFields Sets the maximum number of fields that the HPositionGenericInfo will have.

NewL(TInt, TInt)

IMPORT_C HPositionGenericInfo *NewL(TIntaBufferSize =  KPositionGenericInfoDefaultBufferSize ,
TIntaMaxFields =  KPositionGenericInfoDefaultMaxFields
)[static]

Leaving constructor that allocs a HPositionGenericInfo on the heap.

Parameters

TInt aBufferSize =  KPositionGenericInfoDefaultBufferSize Sets the size of the buffer that the HPositionGenericInfo will have.
TInt aMaxFields =  KPositionGenericInfoDefaultMaxFields Sets the maximum number of fields that the HPositionGenericInfo will have.

NewLC(TInt, TInt)

IMPORT_C HPositionGenericInfo *NewLC(TIntaBufferSize =  KPositionGenericInfoDefaultBufferSize ,
TIntaMaxFields =  KPositionGenericInfoDefaultMaxFields
)[static]

Leaving constructor that allocs a HPositionGenericInfo on the heap and leaves a pointer to the object on the cleanup stack.

Parameters

TInt aBufferSize =  KPositionGenericInfoDefaultBufferSize Sets the size of the buffer that the HPositionGenericInfo will have.
TInt aMaxFields =  KPositionGenericInfoDefaultMaxFields Sets the maximum number of fields that the HPositionGenericInfo will have.

NextRequestedFieldId(TPositionFieldId)

IMPORT_C TPositionFieldIdNextRequestedFieldId(TPositionFieldIdaFieldId)const

Looks for the next field Id in the list greater than aFieldId.

Parameters

TPositionFieldId aFieldIdFunction will return next field Id in the list greater than this Id.

RequestedFieldPtr()

TPositionFieldId *RequestedFieldPtr()[private, inline]

Helper method. For internal usage only

RequestedFieldPtr()

const TPositionFieldId *RequestedFieldPtr()const [private, inline]

Helper method. For internal usage only

SetRequestedField(TPositionFieldId)

IMPORT_C TIntSetRequestedField(TPositionFieldIdaFieldId)

Method sets a field as requested.

Parameters

TPositionFieldId aFieldIdField Id to be set as requested.

SetRequestedFields(const TPositionFieldIdList)

IMPORT_C TIntSetRequestedFields(const TPositionFieldIdListaFieldIdList)

Sets multiple TPositionFieldId objects as requested.

Parameters

const TPositionFieldIdList aFieldIdListList of field Id's to be set as requested. The list is terminated with a EPositionFieldNone entry.

SetValue(TPositionFieldId, const TType &)

TInt SetValue(TPositionFieldIdaFieldId,
const TType &aValue
)[inline]

Used to store position information.

Parameters

TPositionFieldId aFieldIdStandard position field identifier. See _TPositionFieldId
const TType & aValueThe parameter aValue can be of the type TInt8, TInt16, TInt32, TInt64, TUint8, TUint16, TUint32, TReal32, TReal64, TTime, TTimeIntervalMicroSeconds, Des8, or Des16.

operator=(const HPositionGenericInfo &)

HPositionGenericInfo &operator=(const HPositionGenericInfo &)[private]

internal private method

Parameters

const HPositionGenericInfo &

Member Data Documentation

TUint8 iBuffer

TUint8 iBuffer[private]

Start of the buffer. The heap cell allocated for an instance of this class has space for information up to iBuffer[iTotalBufferSize-1]

const TUint iDataStartPoint

const TUintiDataStartPoint[private]

Offset into iBuffer of the actual location data.

const TUint iFieldIndexStartPoint

const TUintiFieldIndexStartPoint[private]

Offset into iBuffer of the field index.

const TInt iMaxFields

const TIntiMaxFields[private]

Max number of requesable/returnable fields.

const TInt iTotalBufferSize

const TIntiTotalBufferSize[private]

Total size of the buffer