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]

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

ClearPositionData()

IMPORT_C voidClearPositionData()

ClearRequestedFields()

IMPORT_C voidClearRequestedFields()

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]

Parameters

TInt & aEmptyFieldOffset

FirstRequestedFieldId()

IMPORT_C TPositionFieldIdFirstRequestedFieldId()const

GetValue(TPositionFieldId, TType &)

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

Used to retrieve position information. a symbian OS error code.

KErrNone on successful operation.

KErrOverflow if the supplied descriptor is too short to contain the requested field. This method must use the same data type as that assigned by SetValue() .

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

Parameters

TPositionFieldId aFieldId

IsRequestedField(TPositionFieldId)

IMPORT_C TIntIsRequestedField(TPositionFieldIdaFieldId)const

Parameters

TPositionFieldId aFieldId

MaxFields()

IMPORT_C TIntMaxFields()const

New(TInt, TInt)

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

NewL(TInt, TInt)

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

NewLC(TInt, TInt)

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

NextRequestedFieldId(TPositionFieldId)

IMPORT_C TPositionFieldIdNextRequestedFieldId(TPositionFieldIdaFieldId)const

Parameters

TPositionFieldId aFieldId

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)

Parameters

TPositionFieldId aFieldId

SetRequestedFields(const TPositionFieldIdList)

IMPORT_C TIntSetRequestedFields(const TPositionFieldIdListaFieldIdList)

Parameters

const TPositionFieldIdList aFieldIdList

SetValue(TPositionFieldId, const TType &)

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

Used to store position information. 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.

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