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.
Constructor & Destructor Documentation
CMTPTypeString()
CMTPTypeString | ( | ) | [private] |
~CMTPTypeString()
IMPORT_C | ~CMTPTypeString | ( | ) | |
Member Functions Documentation
CommitRequired()
IMPORT_C TBool | CommitRequired | ( | ) | const |
ConstructL(const TDesC &)
void | ConstructL | ( | const TDesC & | aString | ) | [private] |
NewL()
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 &)
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 & aString | The initial string value. |
NewLC()
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 &)
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 & aString | The initial string value. |
NumChars()
IMPORT_C TUint8 | NumChars | ( | ) | const |
Provides the number of unicode characters making up the MTP string.
ReAllocBufferL(TUint)
void | ReAllocBufferL | ( | TUint | aNumNullTerminatedChars | ) | [private] |
Parameters
TUint aNumNullTerminatedChars | |
SetL(const TDesC &)
IMPORT_C void | SetL | ( | 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 & aString | The type's new value. |
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 TUint | Type | ( | ) | const |
Validate()
IMPORT_C TInt | Validate | ( | ) | 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
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.
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.