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 TInt BufferSize ()
IMPORT_C void ClearPositionData ()
IMPORT_C void ClearRequestedFields ()
IMPORT_C TPositionFieldId FirstRequestedFieldId ()
TInt GetValue ( TPositionFieldId , TType &)
IMPORT_C TBool IsFieldAvailable ( TPositionFieldId )
IMPORT_C TInt IsRequestedField ( TPositionFieldId )
IMPORT_C TInt MaxFields ()
IMPORT_C HPositionGenericInfo * New ( TInt , TInt )
IMPORT_C HPositionGenericInfo * NewL ( TInt , TInt )
IMPORT_C HPositionGenericInfo * NewLC ( TInt , TInt )
IMPORT_C TPositionFieldId NextRequestedFieldId ( TPositionFieldId )
IMPORT_C TInt SetRequestedField ( TPositionFieldId )
IMPORT_C TInt SetRequestedFields (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 TUint iDataStartPoint
const TUint iFieldIndexStartPoint
const TInt iMaxFields
const TInt iTotalBufferSize
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 ( TInt aDataBufferSize,
TInt aMaxFields,
TUint aFieldIndexStartPoint,
TUint aDataStartPoint,
TBool aResetRequestedFields
) [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 TInt BufferSize ( ) const

Method returns the size of the buffer set in the constructor

ClearPositionData()

IMPORT_C void ClearPositionData ( )

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 void ClearRequestedFields ( )

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 TPositionFieldId FirstRequestedFieldId ( ) const

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

GetValue(TPositionFieldId, TType &)

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

Used to retrieve position information.

Parameters

TPositionFieldId aFieldId Standard position field identifier. See _TPositionFieldId
TType & aValue The 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 TBool IsFieldAvailable ( TPositionFieldId aFieldId ) const

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

Parameters

TPositionFieldId aFieldId This is the field Id that is searched for.

IsRequestedField(TPositionFieldId)

IMPORT_C TInt IsRequestedField ( TPositionFieldId aFieldId ) const

Returns whether a field has been set as requested.

Parameters

TPositionFieldId aFieldId Field Id to search for.

MaxFields()

IMPORT_C TInt MaxFields ( ) const

New(TInt, TInt)

IMPORT_C HPositionGenericInfo * New ( TInt aBufferSize =  KPositionGenericInfoDefaultBufferSize ,
TInt aMaxFields =  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 ( TInt aBufferSize =  KPositionGenericInfoDefaultBufferSize ,
TInt aMaxFields =  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 ( TInt aBufferSize =  KPositionGenericInfoDefaultBufferSize ,
TInt aMaxFields =  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 TPositionFieldId NextRequestedFieldId ( TPositionFieldId aFieldId ) const

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.

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 TInt SetRequestedField ( TPositionFieldId aFieldId )

Method sets a field as requested.

Parameters

TPositionFieldId aFieldId Field Id to be set as requested.

SetRequestedFields(const TPositionFieldIdList)

IMPORT_C TInt SetRequestedFields ( const TPositionFieldIdList aFieldIdList )

Sets multiple TPositionFieldId objects as requested.

Parameters

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

SetValue(TPositionFieldId, const TType &)

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

Used to store position information.

Parameters

TPositionFieldId aFieldId Standard position field identifier. See _TPositionFieldId
const TType & aValue The 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 TUint iDataStartPoint [private]

Offset into iBuffer of the actual location data.

const TUint iFieldIndexStartPoint

const TUint iFieldIndexStartPoint [private]

Offset into iBuffer of the field index.

const TInt iMaxFields

const TInt iMaxFields [private]

Max number of requesable/returnable fields.

const TInt iTotalBufferSize

const TInt iTotalBufferSize [private]

Total size of the buffer