CMTPTypeObjectPropList Class Reference

class CMTPTypeObjectPropList : public CBase

Defines the MTP ObjectPropList dataset. The ObjectPropList dataset provides optimised access to object properties without needing to individually query each object/property pair. It also provides a more flexible querying mechanism for object properties in general. This dataset is used in the GetObjectPropList, SetObjectPropList, and SendObjectPropList requests.

Inherits from

Public Member Functions
~CMTPTypeObjectPropList ()
IMPORT_C void AppendObjectPropListL (const CMTPTypeObjectPropList &)
IMPORT_C MMTPType * CommitChunkL ( TPtr8 &)
IMPORT_C void CommitPropElemL ( CMTPTypeObjectPropListElement &)
IMPORT_C TBool CommitRequired ()
IMPORT_C TInt FirstReadChunk ( TPtrC8 &)
IMPORT_C TInt FirstWriteChunk ( TPtr8 &)
IMPORT_C TInt FirstWriteChunk ( TPtr8 &, TUint )
IMPORT_C CMTPTypeObjectPropListElement & GetNextElementL ()
IMPORT_C CMTPTypeObjectPropList * NewL ()
IMPORT_C CMTPTypeObjectPropList * NewLC ()
IMPORT_C TInt NextReadChunk ( TPtrC8 &)
IMPORT_C TInt NextWriteChunk ( TPtr8 &)
IMPORT_C TInt NextWriteChunk ( TPtr8 &, TUint )
IMPORT_C TUint32 NumberOfElements ()
IMPORT_C CMTPTypeObjectPropListElement & ReservePropElemL ( TUint32 , TUint16 )
IMPORT_C TBool ReserveTransportHeader ( TUint , TPtr8 &)
IMPORT_C void ResetCursor ()
IMPORT_C TUint64 Size ()
IMPORT_C TUint Type ()
IMPORT_C TInt Validate ()
Private Member Functions
CMTPTypeObjectPropList ()
TUint ArrayElemWidth ( TUint16 &)
void ConstructL ()
void IncreaseIndexL ( TUint &, TUint &, TUint , TBool )
void MemoryCopyL ( TAny *, TUint , TUint , TUint )
void MemoryCopyL ( TUint , TUint , const TAny *, TUint )
void ReserveNewPage ()
TBool ValueAddressAligned ( TUint , TUint )
TBool ValueBufferConsistent ( TUint , TUint , TUint )
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
Private Attributes
TUint iChunkIndex
CMTPTypeObjectPropListElement * iCurrentElement
RArray < RBuf8 > iIOPages
TUint32 iNumberOfElements
TBool iReservedElemCommitted
CMTPTypeObjectPropListElement * iReservedElement
TBool iResetCursor
TUint iRevDataEnd
TUint iRevPageEnd
TUint iTransportHeaderIndex

Constructor & Destructor Documentation

CMTPTypeObjectPropList()

CMTPTypeObjectPropList ( ) [private]

~CMTPTypeObjectPropList()

IMPORT_C ~CMTPTypeObjectPropList ( ) [virtual]

Destructor.

Member Functions Documentation

AppendObjectPropListL(const CMTPTypeObjectPropList &)

IMPORT_C void AppendObjectPropListL ( const CMTPTypeObjectPropList & aSource )

Append all object property elements from another object property list.

Parameters

const CMTPTypeObjectPropList & aSource

ArrayElemWidth(TUint16 &)

TUint ArrayElemWidth ( TUint16 & aDataType ) const [private]

Parameters

TUint16 & aDataType

CommitChunkL(TPtr8 &)

IMPORT_C MMTPType * CommitChunkL ( TPtr8 & aChunk )

Parameters

TPtr8 & aChunk

CommitPropElemL(CMTPTypeObjectPropListElement &)

IMPORT_C void CommitPropElemL ( CMTPTypeObjectPropListElement & aElem )

Commit the reverved object property element in buffer page.

Parameters

CMTPTypeObjectPropListElement & aElem The object property element to be committed.

CommitRequired()

IMPORT_C TBool CommitRequired ( ) const

ConstructL()

void ConstructL ( ) [private]

FirstReadChunk(TPtrC8 &)

IMPORT_C TInt FirstReadChunk ( TPtrC8 & aChunk ) const

Parameters

TPtrC8 & aChunk

FirstWriteChunk(TPtr8 &)

IMPORT_C TInt FirstWriteChunk ( TPtr8 & aChunk )

Parameters

TPtr8 & aChunk

FirstWriteChunk(TPtr8 &, TUint)

IMPORT_C TInt FirstWriteChunk ( TPtr8 & aChunk,
TUint aDataLength
)

Parameters

TPtr8 & aChunk
TUint aDataLength

GetNextElementL()

IMPORT_C CMTPTypeObjectPropListElement & GetNextElementL ( ) const

Get the next object property element in the object property list.

IncreaseIndexL(TUint &, TUint &, TUint, TBool)

void IncreaseIndexL ( TUint & aPageIndex,
TUint & aBufIndex,
TUint aLength,
TBool aReserveNewPage
) const [private]

Parameters

TUint & aPageIndex
TUint & aBufIndex
TUint aLength
TBool aReserveNewPage

MemoryCopyL(TAny *, TUint, TUint, TUint)

void MemoryCopyL ( TAny * aTrg,
TUint aSrcPageIndex,
TUint aSrcBufIndex,
TUint aLength
) const [private]

Copy data from Element to buffer page.

Parameters

TAny * aTrg
TUint aSrcPageIndex
TUint aSrcBufIndex
TUint aLength

MemoryCopyL(TUint, TUint, const TAny *, TUint)

void MemoryCopyL ( TUint aTrgPageIndex,
TUint aTrgBufIndex,
const TAny * aSrc,
TUint aLength
) [private]

Copy data from buffer page to Element.

Parameters

TUint aTrgPageIndex
TUint aTrgBufIndex
const TAny * aSrc
TUint aLength

NewL()

IMPORT_C CMTPTypeObjectPropList * NewL ( ) [static]
MTP ObjectPropList dataset factory method. This method is used to create an empty MTP ObjectPropList dataset.
leave
One of the system wide error codes, if unsuccessful.

NewLC()

IMPORT_C CMTPTypeObjectPropList * NewLC ( ) [static]
MTP ObjectPropList dataset factory method. This method is used to create an empty MTP ObjectPropList dataset. A pointer to the data type is placed on the cleanup stack.
leave
One of the system wide error codes, if unsuccessful.

NextReadChunk(TPtrC8 &)

IMPORT_C TInt NextReadChunk ( TPtrC8 & aChunk ) const

Parameters

TPtrC8 & aChunk

NextWriteChunk(TPtr8 &)

IMPORT_C TInt NextWriteChunk ( TPtr8 & aChunk )

Parameters

TPtr8 & aChunk

NextWriteChunk(TPtr8 &, TUint)

IMPORT_C TInt NextWriteChunk ( TPtr8 & aChunk,
TUint aDataLength
)

Parameters

TPtr8 & aChunk
TUint aDataLength

NumberOfElements()

IMPORT_C TUint32 NumberOfElements ( ) const

Get the number of element in the object property list.

ReserveNewPage()

void ReserveNewPage ( ) [private]

ReservePropElemL(TUint32, TUint16)

IMPORT_C CMTPTypeObjectPropListElement & ReservePropElemL ( TUint32 aHandle,
TUint16 aPropCode
)

Reserve an object property element in buffer page. After setting the element's values, the element should be committed, otherwise the new element will be discarded without commitment.

Parameters

TUint32 aHandle The object handle of the object property element.
TUint16 aPropCode The property code of the object property element.

ReserveTransportHeader(TUint, TPtr8 &)

IMPORT_C TBool ReserveTransportHeader ( TUint aHeaderLength,
TPtr8 & aHeader
)

Parameters

TUint aHeaderLength
TPtr8 & aHeader

ResetCursor()

IMPORT_C void ResetCursor ( ) const

Reset the element cursor, so GetNextElementL() will return the first object property element in the object property list.

Size()

IMPORT_C TUint64 Size ( ) const

Get the size of the object property list.

Type()

IMPORT_C TUint Type ( ) const

Validate()

IMPORT_C TInt Validate ( ) const

ValueAddressAligned(TUint, TUint)

TBool ValueAddressAligned ( TUint aPageIdx,
TUint aBufferIdx
) const [private]

Parameters

TUint aPageIdx
TUint aBufferIdx

ValueBufferConsistent(TUint, TUint, TUint)

TBool ValueBufferConsistent ( TUint aPageIdx,
TUint aBufferIdx,
TUint aValueSize
) const [private]

Parameters

TUint aPageIdx
TUint aBufferIdx
TUint aValueSize

Member Data Documentation

TUint iChunkIndex

TUint iChunkIndex [private]

CMTPTypeObjectPropListElement * iCurrentElement

CMTPTypeObjectPropListElement * iCurrentElement [private]

RArray< RBuf8 > iIOPages

RArray < RBuf8 > iIOPages [private]

TUint32 iNumberOfElements

TUint32 iNumberOfElements [private]

TBool iReservedElemCommitted

TBool iReservedElemCommitted [private]

CMTPTypeObjectPropListElement * iReservedElement

CMTPTypeObjectPropListElement * iReservedElement [private]

TBool iResetCursor

TBool iResetCursor [private]

TUint iRevDataEnd

TUint iRevDataEnd [private]

TUint iRevPageEnd

TUint iRevPageEnd [private]

TUint iTransportHeaderIndex

TUint iTransportHeaderIndex [private]