CMTPTypeString Class Reference

class CMTPTypeString : public CBase

Defines the MTP string data type. MTP strings consist of standard 2-byte Unicode characters and are null-terminated. Strings are prepended with a single 8-bit unsigned integer that identifies the number of characters (NOT bytes) to follow and includes the terminating null value. Strings are limited to 255 characters (including the null value). An empty string would consist of a single 8-bit integer containing the value 0x00.

MTP strings are stored in a flat buffer to optimise streaming performance to/from the MTP transport connection.

Inherits from

Constructor & Destructor Documentation

CMTPTypeString()

CMTPTypeString()[private]

~CMTPTypeString()

IMPORT_C~CMTPTypeString()

Destructor

Member Functions Documentation

CommitChunkL(TPtr8 &)

IMPORT_C MMTPType *CommitChunkL(TPtr8 &aChunk)

Parameters

TPtr8 & aChunk

CommitRequired()

IMPORT_C TBoolCommitRequired()const

ConstructL(const TDesC &)

voidConstructL(const TDesC &aString)[private]

Parameters

const TDesC & aString

FirstReadChunk(TPtrC8 &)

IMPORT_C TIntFirstReadChunk(TPtrC8 &aChunk)const

Parameters

TPtrC8 & aChunk

FirstWriteChunk(TPtr8 &)

IMPORT_C TIntFirstWriteChunk(TPtr8 &aChunk)

Parameters

TPtr8 & aChunk

NewL()

IMPORT_C CMTPTypeString *NewL()[static]
MTP string data type factory method. This method is used to create a zero-length MTP string.
leave
One of the system wide error codes, if unsuccessful.

NewL(const TDesC &)

IMPORT_C CMTPTypeString *NewL(const TDesC &aString)[static]
MTP string data type factory method. This method is used to create an MTP string with the specified value.
leave
One of the system wide error codes, if unsuccessful.

Parameters

const TDesC & aStringThe initial string value.

NewLC()

IMPORT_C CMTPTypeString *NewLC()[static]
MTP string data type factory method. This method is used to create a zero-length MTP string. A pointer to the MTP string data type is placed on the cleanup stack.
leave
One of the system wide error codes, if unsuccessful.

NewLC(const TDesC &)

IMPORT_C CMTPTypeString *NewLC(const TDesC &aString)[static]
MTP string data type factory method. This method is used to create an MTP string with the specified value. A pointer to the MTP string data type is placed on the cleanup stack.
leave
One of the system wide error codes, if unsuccessful.

Parameters

const TDesC & aStringThe initial string value.

NextReadChunk(TPtrC8 &)

IMPORT_C TIntNextReadChunk(TPtrC8 &aChunk)const

Parameters

TPtrC8 & aChunk

NextWriteChunk(TPtr8 &)

IMPORT_C TIntNextWriteChunk(TPtr8 &aChunk)

Parameters

TPtr8 & aChunk

NumChars()

IMPORT_C TUint8NumChars()const

Provides the number of unicode characters making up the MTP string.

ReAllocBufferL(TUint)

voidReAllocBufferL(TUintaNumNullTerminatedChars)[private]

Parameters

TUint aNumNullTerminatedChars

SetL(const TDesC &)

IMPORT_C voidSetL(const TDesC &aString)
Sets the MTP string data type to the specified value.
leave
One of the system wide error codes, if a processing error occurs.

Parameters

const TDesC & aStringThe type's new value.

Size()

IMPORT_C TUint64Size()const

StringChars()

IMPORT_C const TDesC &StringChars()const

Provides a non-modifiable reference to the MTP String Characters data. The data provided does not include the terminating null character.

Type()

IMPORT_C TUintType()const

Validate()

IMPORT_C TIntValidate()const

Member Enumerations Documentation

Enum TWriteSequenceState

The write data stream states.

Enumerators

EIdle

Write data stream inactive.

ENumChars

Streaming the NumChars data chunk.

EStringChars

Streaming the String Characters data chunk.

Member Data Documentation

RBuf8 iBuffer

RBuf8 iBuffer[private]

The data buffer.

TPtr iStringChars

TPtr iStringChars[private]

The String Characters data pointer.

TInt iValidationState

TInt iValidationState[private]

The String type's validation state.

TUint iWriteSequenceState

TUint iWriteSequenceState[private]

The write data stream state variable.