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_C TMTPTypeFlatBase ( )

Default constructor.

Member Functions Documentation

DataBuffer()

TPtr8 & DataBuffer ( ) [inline]

ElementInfo(TInt)

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

Provides the meta data for the specified element.

Parameters

TInt aElementId The identifier of the requested element.

FirstReadChunk(TPtrC8 &)

IMPORT_C TInt FirstReadChunk ( 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 & aChunk The 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 TInt FirstWriteChunk ( 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 & aChunk The 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 void GetL ( TInt aElementId,
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 aElementId The identifier of the requested element.
MMTPType & aElement The MMTPType target data buffer.

Int16(TInt)

IMPORT_C TInt16 Int16 ( TInt aElementId ) 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 aElementId The identifier of the requested element.

Int32(TInt)

IMPORT_C TInt32 Int32 ( TInt aElementId ) 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 aElementId The identifier of the requested element.

Int64(TInt)

IMPORT_C TInt64 Int64 ( TInt aElementId ) 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 aElementId The identifier of the requested element.

Int8(TInt)

IMPORT_C TInt8 Int8 ( TInt aElementId ) 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 aElementId The identifier of the requested element.

NextReadChunk(TPtrC8 &)

IMPORT_C TInt NextReadChunk ( 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 & aChunk The 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 TInt NextWriteChunk ( 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 & aChunk The 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 void Reset ( ) [virtual]

Resets the dataset by zero filling it..

SetBuffer(const TDes8 &)

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

Sets the MTP dataset buffer to be managed.

Parameters

const TDes8 & aBuffer The MTP dataset buffer to be managed.

SetInt16(TInt, TInt16)

IMPORT_C void SetInt16 ( TInt aElementId,
TInt16 aData
) [virtual]
Updates the specified element.
panic
MTPDataTypes 3, if the source data type does not match the requested element.

Parameters

TInt aElementId The identifier of the element to update.
TInt16 aData

SetInt32(TInt, TInt32)

IMPORT_C void SetInt32 ( TInt aElementId,
TInt32 aData
) [virtual]
Updates the specified element.
panic
MTPDataTypes 3, if the source data type does not match the requested element.

Parameters

TInt aElementId The identifier of the element to update.
TInt32 aData

SetInt64(TInt, TInt64)

IMPORT_C void SetInt64 ( TInt aElementId,
TInt64 aData
) [virtual]
Updates the specified element.
panic
MTPDataTypes 3, if the source data type does not match the requested element.

Parameters

TInt aElementId The identifier of the element to update.
TInt64 aData

SetInt8(TInt, TInt8)

IMPORT_C void SetInt8 ( TInt aElementId,
TInt8 aData
) [virtual]
Updates the specified element.
panic
MTPDataTypes 3, if the source data type does not match the requested element.

Parameters

TInt aElementId The identifier of the element to update.
TInt8 aData

SetL(TInt, const MMTPType &)

IMPORT_C void SetL ( TInt aElementId,
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 aElementId The identifier of the element to update.
const MMTPType & aElement The MMTPType source data buffer.

SetUint16(TInt, TUint16)

IMPORT_C void SetUint16 ( TInt aElementId,
TUint16 aData
) [virtual]
Updates the specified element.
panic
MTPDataTypes 3, if the source data type does not match the requested element.

Parameters

TInt aElementId The identifier of the element to update.
TUint16 aData

SetUint32(TInt, TUint32)

IMPORT_C void SetUint32 ( TInt aElementId,
TUint32 aData
) [virtual]
Updates the specified element.
panic
MTPDataTypes 3, if the source data type does not match the requested element.

Parameters

TInt aElementId The identifier of the element to update.
TUint32 aData

SetUint64(TInt, TUint64)

IMPORT_C void SetUint64 ( TInt aElementId,
TUint64 aData
) [virtual]
Updates the specified element.
panic
MTPDataTypes 3, if the source data type does not match the requested element.

Parameters

TInt aElementId The identifier of the element to update.
TUint64 aData

SetUint8(TInt, TUint8)

IMPORT_C void SetUint8 ( TInt aElementId,
TUint8 aData
) [virtual]
Updates the specified element.
panic
MTPDataTypes 3, if the source data type does not match the requested element.

Parameters

TInt aElementId The identifier of the element to update.
TUint8 aData

Size()

IMPORT_C TUint64 Size ( ) const [virtual]

Provides the size in bytes of the MTP data type.

Type()

IMPORT_C TUint Type ( ) const [virtual]

Provides the MTP data type identification datacode.

Uint16(TInt)

IMPORT_C TUint16 Uint16 ( TInt aElementId ) 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 aElementId The identifier of the requested element.

Uint32(TInt)

IMPORT_C TUint32 Uint32 ( TInt aElementId ) 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 aElementId The identifier of the requested element.

Uint64(TInt)

IMPORT_C TUint64 Uint64 ( TInt aElementId ) 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 aElementId The identifier of the requested element.

Uint8(TInt)

IMPORT_C TUint8 Uint8 ( TInt aElementId ) 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 aElementId The identifier of the requested element.

Member Data Documentation

TPtr8 iBuffer

TPtr8 iBuffer [protected]

The managed MTP dataset buffer.