TMTPTypeFlatBase Class Reference

class TMTPTypeFlatBase : public MMTPType

Defines the MTP flat data types base class. Flat data types are used to represent MTP datasets comprising a single contiguous sequence of data elements, each of a known type and length. This class implements generic flat data type storage management capabilities and is intended for derivation by concrete classes which implement specific MTP datasets.

Inherits from

Nested Classes and Structures

Constructor & Destructor Documentation

TMTPTypeFlatBase()

IMPORT_CTMTPTypeFlatBase()

Default constructor.

Member Functions Documentation

DataBuffer()

TPtr8 &DataBuffer()[inline]

ElementInfo(TInt)

const TElementInfo &ElementInfo(TIntaElementId)const [protected, pure virtual]

Provides the meta data for the specified element.

Parameters

TInt aElementIdThe identifier of the requested element.

FirstReadChunk(TPtrC8 &)

IMPORT_C TIntFirstReadChunk(TPtrC8 &aChunk)const [virtual]

Initiates a data read sequence on the type by providing a const pointer to the first in the sequence of data chunks that make up the type's data stream. Subsequent chunks in the sequence can be sequentially retrieved using NextReadChunk. NextReadChunk.

Parameters

TPtrC8 & aChunkThe const pointer to be set to point to the start of the first data chunk. This pointer's length is set to zero if no data chunk exists or a processing error occurs.

FirstWriteChunk(TPtr8 &)

IMPORT_C TIntFirstWriteChunk(TPtr8 &aChunk)[virtual]

Initiates a data write sequence on the type by providing a non-const pointer to the first in the sequence of data chunks that make up the type's data stream. Subsequent chunks in the sequence can be sequentially retrieved using NextWriteChunk. NextWriteChunk.

Parameters

TPtr8 & aChunkThe non-const pointer to be set to point to the start of the first data chunk. If successful, the pointer's Length is set to zero, and MaxLength is set to the available capacity of the data chunk. If not successful, the pointer's MaxLength is set to zero.

GetL(TInt, MMTPType &)

IMPORT_C voidGetL(TIntaElementId,
MMTPType &aElement
)const [virtual]
Provides a copy of the specified element.
leave
One of the system wide error code, if a processing error occurs.
panic
MTPDataTypes 3, if the target buffer type does not match the requested element.

Parameters

TInt aElementIdThe identifier of the requested element.
MMTPType & aElementThe MMTPType target data buffer.

Int16(TInt)

IMPORT_C TInt16Int16(TIntaElementId)const [virtual]
Provides the value of the specified element.
panic
MTPDataTypes 3, if the source buffer type does not match the requested element.

Parameters

TInt aElementIdThe identifier of the requested element.

Int32(TInt)

IMPORT_C TInt32Int32(TIntaElementId)const [virtual]
Provides the value of the specified element.
panic
MTPDataTypes 3, if the source buffer type does not match the requested element.

Parameters

TInt aElementIdThe identifier of the requested element.

Int64(TInt)

IMPORT_C TInt64Int64(TIntaElementId)const [virtual]
Provides the value of the specified element.
panic
MTPDataTypes 3, if the source buffer type does not match the requested element.

Parameters

TInt aElementIdThe identifier of the requested element.

Int8(TInt)

IMPORT_C TInt8Int8(TIntaElementId)const [virtual]
Provides the value of the specified element.
panic
MTPDataTypes 3, if the source buffer type does not match the requested element.

Parameters

TInt aElementIdThe identifier of the requested element.

NextReadChunk(TPtrC8 &)

IMPORT_C TIntNextReadChunk(TPtrC8 &aChunk)const [virtual]

Continues a data read sequence on the type by providing a const pointer to the next in the sequence of data chunks that make up the type's data stream. This data read sequence should have been previously initiated by invoking FirstReadChunk. FirstReadChunk.

Parameters

TPtrC8 & aChunkThe const pointer to be set to point to the start of the next data chunk. This pointer's length is set to zero if no data chunk exists or a processing error occurs.

NextWriteChunk(TPtr8 &)

IMPORT_C TIntNextWriteChunk(TPtr8 &aChunk)[virtual]

Continues a data write sequence on the type by providing a non-const pointer to the next in the sequence of data chunks that make up the type's data stream. This data write sequence should have been previously initiated by invoking FirstWriteChunk. FirstReadChunk.

Parameters

TPtr8 & aChunkThe non-const pointer to be set to point to the start of the next data chunk. If successful, the pointer's Length is set to zero, and MaxLength is set to the available capacity of the data chunk. If not successful, the pointer's MaxLength is set to zero..

Reset()

IMPORT_C voidReset()[virtual]

Resets the dataset by zero filling it..

SetBuffer(const TDes8 &)

IMPORT_C voidSetBuffer(const TDes8 &aBuffer)[protected, virtual]

Sets the MTP dataset buffer to be managed.

Parameters

const TDes8 & aBufferThe MTP dataset buffer to be managed.

SetInt16(TInt, TInt16)

IMPORT_C voidSetInt16(TIntaElementId,
TInt16aData
)[virtual]
Updates the specified element.
panic
MTPDataTypes 3, if the source data type does not match the requested element.

Parameters

TInt aElementIdThe identifier of the element to update.
TInt16 aData

SetInt32(TInt, TInt32)

IMPORT_C voidSetInt32(TIntaElementId,
TInt32aData
)[virtual]
Updates the specified element.
panic
MTPDataTypes 3, if the source data type does not match the requested element.

Parameters

TInt aElementIdThe identifier of the element to update.
TInt32 aData

SetInt64(TInt, TInt64)

IMPORT_C voidSetInt64(TIntaElementId,
TInt64aData
)[virtual]
Updates the specified element.
panic
MTPDataTypes 3, if the source data type does not match the requested element.

Parameters

TInt aElementIdThe identifier of the element to update.
TInt64 aData

SetInt8(TInt, TInt8)

IMPORT_C voidSetInt8(TIntaElementId,
TInt8aData
)[virtual]
Updates the specified element.
panic
MTPDataTypes 3, if the source data type does not match the requested element.

Parameters

TInt aElementIdThe identifier of the element to update.
TInt8 aData

SetL(TInt, const MMTPType &)

IMPORT_C voidSetL(TIntaElementId,
const MMTPType &aElement
)[virtual]
Updates the specified element.
leave
One of the system wide error code, if a processing error occurs.
panic
MTPDataTypes 3, if the source buffer type does not match the requested element.
panic
MTPDataTypes 4, if the source buffer size does not match the requested element.

Parameters

TInt aElementIdThe identifier of the element to update.
const MMTPType & aElementThe MMTPType source data buffer.

SetUint16(TInt, TUint16)

IMPORT_C voidSetUint16(TIntaElementId,
TUint16aData
)[virtual]
Updates the specified element.
panic
MTPDataTypes 3, if the source data type does not match the requested element.

Parameters

TInt aElementIdThe identifier of the element to update.
TUint16 aData

SetUint32(TInt, TUint32)

IMPORT_C voidSetUint32(TIntaElementId,
TUint32aData
)[virtual]
Updates the specified element.
panic
MTPDataTypes 3, if the source data type does not match the requested element.

Parameters

TInt aElementIdThe identifier of the element to update.
TUint32 aData

SetUint64(TInt, TUint64)

IMPORT_C voidSetUint64(TIntaElementId,
TUint64aData
)[virtual]
Updates the specified element.
panic
MTPDataTypes 3, if the source data type does not match the requested element.

Parameters

TInt aElementIdThe identifier of the element to update.
TUint64 aData

SetUint8(TInt, TUint8)

IMPORT_C voidSetUint8(TIntaElementId,
TUint8aData
)[virtual]
Updates the specified element.
panic
MTPDataTypes 3, if the source data type does not match the requested element.

Parameters

TInt aElementIdThe identifier of the element to update.
TUint8 aData

Size()

IMPORT_C TUint64Size()const [virtual]

Provides the size in bytes of the MTP data type.

Type()

IMPORT_C TUintType()const [virtual]

Provides the MTP data type identification datacode.

Uint16(TInt)

IMPORT_C TUint16Uint16(TIntaElementId)const [virtual]
Provides the value of the specified element.
panic
MTPDataTypes 3, if the source buffer type does not match the requested element.

Parameters

TInt aElementIdThe identifier of the requested element.

Uint32(TInt)

IMPORT_C TUint32Uint32(TIntaElementId)const [virtual]
Provides the value of the specified element.
panic
MTPDataTypes 3, if the source buffer type does not match the requested element.

Parameters

TInt aElementIdThe identifier of the requested element.

Uint64(TInt)

IMPORT_C TUint64Uint64(TIntaElementId)const [virtual]
Provides the value of the specified element.
panic
MTPDataTypes 3, if the source buffer type does not match the requested element.

Parameters

TInt aElementIdThe identifier of the requested element.

Uint8(TInt)

IMPORT_C TUint8Uint8(TIntaElementId)const [virtual]
Provides the value of the specified element.
panic
MTPDataTypes 3, if the source buffer type does not match the requested element.

Parameters

TInt aElementIdThe identifier of the requested element.

Member Data Documentation

TPtr8 iBuffer

TPtr8 iBuffer[protected]

The managed MTP dataset buffer.