--- a/locationmgmt/locationcore/LbsClient/LbsApi/src/LbsPositionInfo.cpp Fri Jun 11 16:28:26 2010 +0100
+++ b/locationmgmt/locationcore/LbsClient/LbsApi/src/LbsPositionInfo.cpp Tue Jun 15 14:56:45 2010 +0100
@@ -110,12 +110,12 @@
EXPORT_C TPositionModeReason TPositionInfoBase::PositionModeReason() const
/**
@return Returns why the positioning mode used to calculate the position fix was different
-from the prefered mode. For example, this could indicate that the phone is out of
-network coverage.
+from the prefered mode. For example, this could indicate that the phone is out of
+network coverage.
see PositionMode
see _TPositionModeReason
-
+
@return The method returns a bit mask the reasons why the position module was unable
calculate the position in the prefered mode.
@return EPositionModeReasonNone is returned if the mode used was the preferred.
@@ -149,7 +149,7 @@
EXPORT_C void TPositionInfo::SetPosition(const TPosition& aPosition)
/**
-Sets the TPosition stored in this class
+Sets the TPosition stored in this class
@param aPosition The TPosition stored in this class is set to aPosition
*/
{
@@ -182,7 +182,7 @@
EXPORT_C void TPositionCourseInfo::GetCourse(TCourse& aCourse) const
/**
-Gets the TCourse stored in this class
+Gets the TCourse stored in this class
@param aCourse The TCourse stored in this class is copied into aCourse.
*/
{
@@ -191,7 +191,7 @@
EXPORT_C void TPositionCourseInfo::SetCourse(const TCourse& aCourse)
/**
-Sets the TCourse stored in this class
+Sets the TCourse stored in this class
@param aCourse The TCourse stored in this class is set to aCourse.
*/
{
@@ -205,7 +205,7 @@
EXPORT_C HPositionGenericInfo* HPositionGenericInfo::NewLC(TInt aBufferSize,
TInt aMaxFields)
/**
-Leaving constructor that allocs a HPositionGenericInfo on the heap and leaves a
+Leaving constructor that allocs a HPositionGenericInfo on the heap and leaves a
pointer to the object on the cleanup stack.
@param aBufferSize Sets the size of the buffer that the HPositionGenericInfo will have.
@param aMaxFields Sets the maximum number of fields that the HPositionGenericInfo will have.
@@ -249,24 +249,24 @@
__ASSERT_ALWAYS(aMaxFields>0, User::Panic(KPosClientFault, EPositionGenericInfoZeroMaxFields));
TUint fieldIndexStartPos = aMaxFields*sizeof(TPositionFieldId);
- if(_FOFF(HPositionGenericInfo, iBuffer[fieldIndexStartPos])&3)
+ if(_FOFF_DYNAMIC(HPositionGenericInfo, iBuffer[fieldIndexStartPos])&3)
{//Adjust fieldIndexStartPos such that iBuffer[fieldIndexStartPos] is 4-byte aligned.
- fieldIndexStartPos += 4 - (_FOFF(HPositionGenericInfo, iBuffer[fieldIndexStartPos])&3);
+ fieldIndexStartPos += 4 - (_FOFF_DYNAMIC(HPositionGenericInfo, iBuffer[fieldIndexStartPos])&3);
}
TUint dataStartPos = fieldIndexStartPos+aMaxFields*sizeof(TPositionFieldIndex);
-
+
//iBuffer[0] must be 2 byte aligned since it is to be cast to a TPositionFieldId
//array
- __ASSERT_DEBUG(!(_FOFF(HPositionGenericInfo, iBuffer[0])&1),
+ __ASSERT_DEBUG(!(_FOFF(HPositionGenericInfo, iBuffer[0])&1),
User::Panic(KPositionInternalFault, EBufferPosNotAligned));
- //Since fieldIndexStartPos will be 4-byte aligned into iBuffer, and
+ //Since fieldIndexStartPos will be 4-byte aligned into iBuffer, and
//sizeof(TPositionFieldIndex)==8, dataStartPos should be 4-byte aligned.
- __ASSERT_DEBUG(!(_FOFF(HPositionGenericInfo, iBuffer[dataStartPos])&3),
+ __ASSERT_DEBUG(!(_FOFF_DYNAMIC(HPositionGenericInfo, iBuffer[dataStartPos])&3),
User::Panic(KPositionInternalFault, EBufferPosNotAligned));
- return new(User::Alloc(_FOFF(HPositionGenericInfo, iBuffer[aDataBufferSize+dataStartPos])))
+ return new(User::Alloc(_FOFF_DYNAMIC(HPositionGenericInfo, iBuffer[aDataBufferSize+dataStartPos])))
HPositionGenericInfo(aDataBufferSize, aMaxFields, fieldIndexStartPos, dataStartPos, ETrue);
}
@@ -278,12 +278,12 @@
iDataStartPoint(aDataStartPoint),
iTotalBufferSize(aDataBufferSize+aDataStartPoint)
/**
-private constructor. To be used within the class
+private constructor. To be used within the class
*/
{
- iPosClassSize = _FOFF(HPositionGenericInfo, iBuffer[iTotalBufferSize]);
- iPosClassType |= EPositionGenericInfoClass;
-
+ iPosClassSize = _FOFF_DYNAMIC(HPositionGenericInfo, iBuffer[iTotalBufferSize]);
+ iPosClassType |= EPositionGenericInfoClass;
+
if(aResetRequestedFields)
{
ClearRequestedFields();
@@ -369,7 +369,7 @@
EXPORT_C TInt HPositionGenericInfo::SetRequestedFields(const TPositionFieldIdList aFieldIdList)
/**
Sets multiple TPositionFieldId objects as requested.
-@param aFieldIdList List of field Id's to be set as requested. The list is terminated
+@param aFieldIdList List of field Id's to be set as requested. The list is terminated
with a ::EPositionFieldNone entry.
@return a symbian OS error code.
@return KErrNone if all Field Ids were successfully set as requested.
@@ -423,7 +423,7 @@
EXPORT_C TPositionFieldId HPositionGenericInfo::NextRequestedFieldId(TPositionFieldId aFieldId) const
/**
-Looks for the next field Id in the list greater than aFieldId.
+Looks for the next field Id in the list greater than aFieldId.
@param aFieldId Function will return next field Id in the list greater than this Id.
@return Next field Id in the list greater than aFieldId.
@return ::EPositionFieldNone if there are no field Id's in the list greater than aFieldId
@@ -469,7 +469,7 @@
TInt HPositionGenericInfo::FindEmptyRequestedFieldOffset(TInt& aEmptyFieldOffset) const
/**
-Helper method. For internal usage only
+Helper method. For internal usage only
*/
{
TInt err = KErrOverflow;
--- a/locationmgmt/locationcore/LbsClient/LbsApi/src/lbsfields.cpp Fri Jun 11 16:28:26 2010 +0100
+++ b/locationmgmt/locationcore/LbsClient/LbsApi/src/lbsfields.cpp Tue Jun 15 14:56:45 2010 +0100
@@ -24,7 +24,7 @@
#define __ASSERT_ALIGNED_2BYTE(aPtr) __ASSERT_DEBUG(!(TUint(aPtr)&1),User::Panic(KPositionInternalFault, EBadAlignment))
#define __ASSERT_ALIGNED_4BYTE(aPtr) __ASSERT_DEBUG(!(TUint(aPtr)&3),User::Panic(KPositionInternalFault, EBadAlignment))
#define __DATA_OFFSET_INTO_HPOS(aOffset) \
- (_FOFF(HPositionGenericInfo, iBuffer[(aOffset+iInfo.iDataStartPoint)]))
+ (_FOFF_DYNAMIC(HPositionGenericInfo, iBuffer[(aOffset+iInfo.iDataStartPoint)]))
const TInt KSizeOfTInt8 = sizeof(TInt8);
const TInt KSizeOfTInt16 = sizeof(TInt16);
@@ -42,7 +42,7 @@
*
* @param aFieldIndex Field index for the object whos size we're interested in
*
- * @return The size of the field pointed at by aFieldIndex. The size is the number of 8-bit
+ * @return The size of the field pointed at by aFieldIndex. The size is the number of 8-bit
* quantities occupied by the object.
*/
TInt TPositionFieldSetter::FieldLength(TInt aFieldIndexId) const
@@ -76,13 +76,13 @@
{
const TUint8* address = &(iInfo.iBuffer[fieldIndex.FieldStartPos()]);
TUint lengthOfString = reinterpret_cast<const SPackedTDesC16*>(address)->iLength;
- return _FOFF(SPackedTDesC16, iBuf[lengthOfString]);
+ return _FOFF_DYNAMIC(SPackedTDesC16, iBuf[lengthOfString]);
}
case PositionFieldManager::ETDesC8:
{
const TUint8* address = &(iInfo.iBuffer[fieldIndex.FieldStartPos()]);
TUint lengthOfString = reinterpret_cast<const SPackedTDesC8*>(address)->iLength;
- return _FOFF(SPackedTDesC8, iBuf[lengthOfString]);
+ return _FOFF_DYNAMIC(SPackedTDesC8, iBuf[lengthOfString]);
}
default:
User::Panic(KPositionInternalFault, EUnknownDataType);
@@ -92,7 +92,7 @@
/**
* This function rounds up aOffset so that HPositionGenericInfo::iBuffer[aOffset] will
- * be suitable aligned for data of aFieldType, such that the copy operator for this
+ * be suitable aligned for data of aFieldType, such that the copy operator for this
* data type will be able to be used at &HPositionGenericInfo::iBuffer[aOffset].
*
* @param aOffset Offset to be rounded up for alignment reasons.
@@ -134,16 +134,16 @@
* the buffer as the contents of the buffer can only be accessed via the index anyway.
* Then we find a empty slot in the index. This will be the first field in the index marked
* with the field type PositionFieldManager::EUndefined. Then we look at where the previous
- * field ended and pretend we're going to stick this new field onto the end of that. If it
- * fits then we do the copy. If it doesn't fit then we try compressing the contents of the
+ * field ended and pretend we're going to stick this new field onto the end of that. If it
+ * fits then we do the copy. If it doesn't fit then we try compressing the contents of the
* buffer and seeing if we can get the field to fit then. If we still can't get it to fit
* we return an error. Otherwise we copy the data into the buffer.
*
* @param aFieldId Id of the field to be copied into the buffer.
- * @param aData a wrapper round the object to be copied into the buffer. It contains
+ * @param aData a wrapper round the object to be copied into the buffer. It contains
* information about the data type/size and a pointer to a copy method.
* @return KErrNone if the operation was successful.
- * @return KErrPositionBufferOverflow if aData will not fit in the HPositionGenericInfo
+ * @return KErrPositionBufferOverflow if aData will not fit in the HPositionGenericInfo
* object's buffer.
* @return KErrOverflow if there are already KPositionMaxReturnableFields set in the
* HPositionGenericInfo object.
@@ -167,7 +167,7 @@
{
return err;
}
-
+
TInt offsetOfNewData;
TPositionFieldIndex* const fieldIndex = iInfo.FieldIndexPtr();
@@ -184,7 +184,7 @@
}
AlignOffset(offsetOfNewData, aData.Type());
-
+
TBool enoughSpace = EFalse;
if(offsetOfNewData+aData.Size() <= iInfo.iTotalBufferSize) //bounds check
{
@@ -202,7 +202,7 @@
+ FieldLength(indexToInsertAt-1);
AlignOffset(offsetOfNewData, aData.Type());
-
+
if(offsetOfNewData+aData.Size() <= iInfo.iTotalBufferSize) //bounds check
{
enoughSpace = ETrue;
@@ -243,7 +243,7 @@
* @return KErrNone is the operation was successful.
* @return KErrNotFound if an object with aFieldId cannot be found in aInfo.
* @return KErrArgument if aFieldId is EPositionFieldNone.
- * @panic "LocationClient EHPositionGenericInfoMismatchDataType(0)" if aFieldId's data type
+ * @panic "LocationClient EHPositionGenericInfoMismatchDataType(0)" if aFieldId's data type
* doesn't match that pointed at by aData.
*/
TInt TPositionFieldGetter::DoGetValue(TPositionFieldId aFieldId,
@@ -417,7 +417,7 @@
* @param aInfo The HPositionGenericInfo object to copy the data into.
*
* @return KErrArgument if aFieldId is EPositionFieldNone.
- * @return KErrPositionBufferOverflow if aValue will not fit in the HPositionGenericInfo
+ * @return KErrPositionBufferOverflow if aValue will not fit in the HPositionGenericInfo
* object.
* @return KErrOverflow if there are already KPositionMaxReturnableFields set in the
* HPositionGenericInfo object.
@@ -459,7 +459,7 @@
* @param aInfo The HPositionGenericInfo object to copy the data into.
*
* @return KErrArgument if aFieldId is EPositionFieldNone.
- * @return KErrPositionBufferOverflow if aValue will not fit in the HPositionGenericInfo
+ * @return KErrPositionBufferOverflow if aValue will not fit in the HPositionGenericInfo
* object.
* @return KErrOverflow if there are already KPositionMaxReturnableFields set in the
* HPositionGenericInfo object.
@@ -501,7 +501,7 @@
* @param aInfo The HPositionGenericInfo object to copy the data into.
*
* @return KErrArgument if aFieldId is EPositionFieldNone.
- * @return KErrPositionBufferOverflow if aValue will not fit in the HPositionGenericInfo
+ * @return KErrPositionBufferOverflow if aValue will not fit in the HPositionGenericInfo
* object.
* @return KErrOverflow if there are already KPositionMaxReturnableFields set in the
* HPositionGenericInfo object.
@@ -543,7 +543,7 @@
* @param aInfo The HPositionGenericInfo object to copy the data into.
*
* @return KErrArgument if aFieldId is EPositionFieldNone.
- * @return KErrPositionBufferOverflow if aValue will not fit in the HPositionGenericInfo
+ * @return KErrPositionBufferOverflow if aValue will not fit in the HPositionGenericInfo
* object.
* @return KErrOverflow if there are already KPositionMaxReturnableFields set in the
* HPositionGenericInfo object.
@@ -587,7 +587,7 @@
* @param aInfo The HPositionGenericInfo object to copy the data into.
*
* @return KErrArgument if aFieldId is EPositionFieldNone.
- * @return KErrPositionBufferOverflow if aValue will not fit in the HPositionGenericInfo
+ * @return KErrPositionBufferOverflow if aValue will not fit in the HPositionGenericInfo
* object.
* @return KErrOverflow if there are already KPositionMaxReturnableFields set in the
* HPositionGenericInfo object.
@@ -631,7 +631,7 @@
* @param aInfo The HPositionGenericInfo object to copy the data into.
*
* @return KErrArgument if aFieldId is EPositionFieldNone.
- * @return KErrPositionBufferOverflow if aValue will not fit in the HPositionGenericInfo
+ * @return KErrPositionBufferOverflow if aValue will not fit in the HPositionGenericInfo
* object.
* @return KErrOverflow if there are already KPositionMaxReturnableFields set in the
* HPositionGenericInfo object.
@@ -675,7 +675,7 @@
* @param aInfo The HPositionGenericInfo object to copy the data into.
*
* @return KErrArgument if aFieldId is EPositionFieldNone.
- * @return KErrPositionBufferOverflow if aValue will not fit in the HPositionGenericInfo
+ * @return KErrPositionBufferOverflow if aValue will not fit in the HPositionGenericInfo
* object.
* @return KErrOverflow if there are already KPositionMaxReturnableFields set in the
* HPositionGenericInfo object.
@@ -719,7 +719,7 @@
* @param aInfo The HPositionGenericInfo object to copy the data into.
*
* @return KErrArgument if aFieldId is EPositionFieldNone.
- * @return KErrPositionBufferOverflow if aValue will not fit in the HPositionGenericInfo
+ * @return KErrPositionBufferOverflow if aValue will not fit in the HPositionGenericInfo
* object.
* @return KErrOverflow if there are already KPositionMaxReturnableFields set in the
* HPositionGenericInfo object.
@@ -763,7 +763,7 @@
* @param aInfo The HPositionGenericInfo object to copy the data into.
*
* @return KErrArgument if aFieldId is EPositionFieldNone.
- * @return KErrPositionBufferOverflow if aValue will not fit in the HPositionGenericInfo
+ * @return KErrPositionBufferOverflow if aValue will not fit in the HPositionGenericInfo
* object.
* @return KErrOverflow if there are already KPositionMaxReturnableFields set in the
* HPositionGenericInfo object.
@@ -808,7 +808,7 @@
* @param aInfo The HPositionGenericInfo object to copy the data into.
*
* @return KErrArgument if aFieldId is EPositionFieldNone.
- * @return KErrPositionBufferOverflow if aValue will not fit in the HPositionGenericInfo
+ * @return KErrPositionBufferOverflow if aValue will not fit in the HPositionGenericInfo
* object.
* @return KErrOverflow if there are already KPositionMaxReturnableFields set in the
* HPositionGenericInfo object.
@@ -817,8 +817,8 @@
EXPORT_C TInt PositionFieldManager::SetValue(TPositionFieldId aFieldId,
const TDesC8& aValue,
HPositionGenericInfo& aInfo)
- {
- const TDataWrapperC wrapper(ETDesC8, _FOFF(SPackedTDesC8, iBuf[aValue.Length()]), &aValue, CopyFromTDesC8);
+ {
+ const TDataWrapperC wrapper(ETDesC8, _FOFF_DYNAMIC(SPackedTDesC8, iBuf[aValue.Length()]), &aValue, CopyFromTDesC8);
TPositionFieldSetter fieldSetter(aInfo);
return fieldSetter.DoSetValue(aFieldId, wrapper);
}
@@ -851,7 +851,7 @@
* @param aInfo The HPositionGenericInfo object to copy the data into.
*
* @return KErrArgument if aFieldId is EPositionFieldNone.
- * @return KErrPositionBufferOverflow if aValue will not fit in the HPositionGenericInfo
+ * @return KErrPositionBufferOverflow if aValue will not fit in the HPositionGenericInfo
* object.
* @return KErrOverflow if there are already KPositionMaxReturnableFields set in the
* HPositionGenericInfo object.
@@ -861,7 +861,7 @@
const TDesC16& aValue,
HPositionGenericInfo& aInfo)
{
- const TDataWrapperC wrapper(ETDesC16, _FOFF(SPackedTDesC16, iBuf[aValue.Length()]), &aValue, CopyFromTDesC16);
+ const TDataWrapperC wrapper(ETDesC16, _FOFF_DYNAMIC(SPackedTDesC16, iBuf[aValue.Length()]), &aValue, CopyFromTDesC16);
TPositionFieldSetter fieldSetter(aInfo);
return fieldSetter.DoSetValue(aFieldId, wrapper);
}
@@ -932,7 +932,7 @@
* @param aInfo The HPositionGenericInfo object to copy the data into.
*
* @return KErrArgument if aFieldId is EPositionFieldNone.
- * @return KErrPositionBufferOverflow if aValue will not fit in the HPositionGenericInfo
+ * @return KErrPositionBufferOverflow if aValue will not fit in the HPositionGenericInfo
* object.
* @return KErrOverflow if there are already KPositionMaxReturnableFields set in the
* HPositionGenericInfo object.
@@ -976,7 +976,7 @@
* @param aInfo The HPositionGenericInfo object to copy the data into.
*
* @return KErrArgument if aFieldId is EPositionFieldNone.
- * @return KErrPositionBufferOverflow if aValue will not fit in the HPositionGenericInfo
+ * @return KErrPositionBufferOverflow if aValue will not fit in the HPositionGenericInfo
* object.
* @return KErrOverflow if there are already KPositionMaxReturnableFields set in the
* HPositionGenericInfo object.