#include <lbspositioninfo.h>
class HPositionGenericInfo : public TPositionInfo |
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 &) |
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.
IMPORT_C TInt | BufferSize | ( | ) | const |
Method returns the size of the buffer set in the constructor
Returns: The size of the buffer that was set in the constructor.
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.
IMPORT_C TPositionFieldId | FirstRequestedFieldId | ( | ) | const |
Looks through the list of requested fields for the lowest valued field Id.
Returns: The lowest valued requested field if there are any. EPositionFieldNone if there are no requested fields.
TInt | GetValue | ( | TPositionFieldId | aFieldId, |
TType & | aValue | |||
) | const [inline] |
Used to retrieve position information.
Parameter | Description |
---|---|
aFieldId | Standard position field identifier. See _TPositionFieldId |
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. |
Returns: 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() .
IMPORT_C TBool | IsFieldAvailable | ( | TPositionFieldId | aFieldId | ) | const |
Looks through the available fields and returns whether aFieldId is in the list.
Parameter | Description |
---|---|
aFieldId | This is the field Id that is searched for. |
Returns: If the requested field is available or not. ETrue if the field is available. EFalse if the field is not available.
IMPORT_C TInt | IsRequestedField | ( | TPositionFieldId | aFieldId | ) | const |
Returns whether a field has been set as requested.
Parameter | Description |
---|---|
aFieldId | Field Id to search for. |
Returns: 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.
IMPORT_C TInt | MaxFields | ( | ) | const |
Returns: The maximum field that is requestable/returnable that was set in the constructor.
IMPORT_C HPositionGenericInfo * | New | ( | TInt | aBufferSize = KPositionGenericInfoDefaultBufferSize , |
TInt | aMaxFields = KPositionGenericInfoDefaultMaxFields | |||
) | [static] |
Non-leaving constructor that allocs a HPositionGenericInfo on the heap.
Parameter | Description |
---|---|
aBufferSize | Sets the size of the buffer that the HPositionGenericInfo will have. |
aMaxFields | Sets the maximum number of fields that the HPositionGenericInfo will have. |
Returns: position information in HPositionGenericInfo structure. NULL if heap allocation failed. Pointer to a HPositionGenericInfo instance if alloc was successful.
IMPORT_C HPositionGenericInfo * | NewL | ( | TInt | aBufferSize = KPositionGenericInfoDefaultBufferSize , |
TInt | aMaxFields = KPositionGenericInfoDefaultMaxFields | |||
) | [static] |
Leaving constructor that allocs a HPositionGenericInfo on the heap.
Parameter | Description |
---|---|
aBufferSize | Sets the size of the buffer that the HPositionGenericInfo will have. |
aMaxFields | Sets the maximum number of fields that the HPositionGenericInfo will have. |
Returns: Pointer to a HPositionGenericInfo instance.
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.
Parameter | Description |
---|---|
aBufferSize | Sets the size of the buffer that the HPositionGenericInfo will have. |
aMaxFields | Sets the maximum number of fields that the HPositionGenericInfo will have. |
Returns: Pointer to a HPositionGenericInfo instance.
IMPORT_C TPositionFieldId | NextRequestedFieldId | ( | TPositionFieldId | aFieldId | ) | const |
Looks for the next field Id in the list greater than aFieldId.
Parameter | Description |
---|---|
aFieldId | Function will return next field Id in the list greater than this Id. |
Returns: Next field Id in the list greater than aFieldId. EPositionFieldNone if there are no field Id's in the list greater than aFieldId
IMPORT_C TInt | SetRequestedField | ( | TPositionFieldId | aFieldId | ) |
Method sets a field as requested.
Parameter | Description |
---|---|
aFieldId | Field Id to be set as requested. |
Returns: 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.
IMPORT_C TInt | SetRequestedFields | ( | const TPositionFieldIdList | aFieldIdList | ) |
Sets multiple TPositionFieldId objects as requested.
Parameter | Description |
---|---|
aFieldIdList | List of field Id's to be set as requested. The list is terminated with a EPositionFieldNone entry. |
Returns: 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.
TInt | SetValue | ( | TPositionFieldId | aFieldId, |
const TType & | aValue | |||
) | [inline] |
Used to store position information.
Parameter | Description |
---|---|
aFieldId | Standard position field identifier. See _TPositionFieldId |
aValue | The parameter aValue can be of the type TInt8, TInt16, TInt32, TInt64, TUint8, TUint16, TUint32, TReal32, TReal64, TTime, TTimeIntervalMicroSeconds, Des8, or Des16. |
Returns: 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.