CMTPTypeArray Class Reference
class CMTPTypeArray : public CBase |
Defines the MTP array data type. MTP arrays consist of a contiguous sequence of objects of the same fixed length type, and are zero based. MTP does not define variable length arrays, e.g. of string objects. Arrays are prepended with a single 32-bit unsigned integer that identifies the number of elements to follow. An empty array would consist of a single 32-bit integer containing the value 0x00000000.
MTP arrays are stored in a flat buffer to optimize streaming performance to/from the MTP transport connection.
Public Member Functions |
---|
| ~CMTPTypeArray() |
IMPORT_C void | AppendInt64L(TInt64) |
IMPORT_C void | AppendIntL(TInt) |
IMPORT_C void | AppendL(const MMTPType &) |
IMPORT_C void | AppendL(const RArray< TInt > &) |
IMPORT_C void | AppendL(const RArray< TUint > &) |
IMPORT_C void | AppendL(const RArray< TInt64 > &) |
IMPORT_C void | AppendL(const RArray< TUint64 > &) |
IMPORT_C void | AppendUint64L(TUint64) |
IMPORT_C void | AppendUintL(TUint) |
IMPORT_C void | Array(RArray< TInt > &) |
IMPORT_C void | Array(RArray< TUint > &) |
IMPORT_C void | Array(RArray< TInt64 > &) |
IMPORT_C void | Array(RArray< TUint64 > &) |
IMPORT_C MMTPType * | CommitChunkL(TPtr8 &) |
IMPORT_C TBool | CommitRequired() |
IMPORT_C TInt | ElementInt(TUint) |
IMPORT_C TInt64 | ElementInt64(TUint) |
IMPORT_C void | ElementL(TUint, MMTPType &) |
IMPORT_C TInt | ElementType() |
IMPORT_C TUint | ElementUint(TUint) |
IMPORT_C TUint64 | ElementUint64(TUint) |
IMPORT_C TInt | FirstReadChunk(TPtrC8 &) |
IMPORT_C TInt | FirstWriteChunk(TPtr8 &) |
IMPORT_C CMTPTypeArray * | NewL(TInt, TUint) |
IMPORT_C CMTPTypeArray * | NewL(TInt, TInt, TUint) |
IMPORT_C CMTPTypeArray * | NewL(TInt) |
IMPORT_C CMTPTypeArray * | NewL(TInt, const RArray< TInt > &) |
IMPORT_C CMTPTypeArray * | NewL(TInt, const RArray< TUint > &) |
IMPORT_C CMTPTypeArray * | NewL(const RArray< TInt64 > &) |
IMPORT_C CMTPTypeArray * | NewL(const RArray< TUint64 > &) |
IMPORT_C CMTPTypeArray * | NewLC(TInt, TUint) |
IMPORT_C CMTPTypeArray * | NewLC(TInt, TInt, TUint) |
IMPORT_C CMTPTypeArray * | NewLC(TInt) |
IMPORT_C CMTPTypeArray * | NewLC(TInt, const RArray< TInt > &) |
IMPORT_C CMTPTypeArray * | NewLC(TInt, const RArray< TUint > &) |
IMPORT_C CMTPTypeArray * | NewLC(const RArray< TInt64 > &) |
IMPORT_C CMTPTypeArray * | NewLC(const RArray< TUint64 > &) |
IMPORT_C TInt | NextReadChunk(TPtrC8 &) |
IMPORT_C TInt | NextWriteChunk(TPtr8 &) |
IMPORT_C TUint32 | NumElements() |
IMPORT_C void | SetByDesL(const TDesC8 &) |
IMPORT_C TUint64 | Size() |
IMPORT_C void | ToDes(TDes8 &) |
IMPORT_C TUint | Type() |
IMPORT_C TInt | Validate() |
Constructor & Destructor Documentation
CMTPTypeArray(TInt, TInt, TUint)
CMTPTypeArray | ( | TInt | aArrayType, |
| TInt | aElementType, |
| TUint | aElementSize |
| ) | [private] |
Member Functions Documentation
AppendInt64L(TInt64)
IMPORT_C void | AppendInt64L | ( | TInt64 | aElement | ) | |
Appends the specified element to the end of the MTP array. The array element type MUST be of the MTP INT64 type.
- leave
- One of the system wide error codes, if a processing failure occurs.
- panic
- MTPDataTypes 3, if aElement does not match the MTP array's element type.
Parameters
TInt64 aElement | The element to be appended to the MTP array. |
AppendIntL(TInt)
IMPORT_C void | AppendIntL | ( | TInt | aElement | ) | |
Appends the specified element to the end of the MTP array. The array element type MUST be one of the MTP INT8, INT16, or INT32 types.
- leave
- One of the system wide error codes, if a processing failure occurs.
- panic
- MTPDataTypes 3, if aElement does not match the MTP array's element type.
Parameters
TInt aElement | The element to be appended to the MTP array. |
AppendL(const MMTPType &)
IMPORT_C void | AppendL | ( | const MMTPType & | aElement | ) | |
Appends the specified element to the end of the MTP array.
- leave
- One of the system wide error codes, if a processing failure occurs.
- panic
- MTPDataTypes 3, if aElement does not match the MTP type of the elements contained in the array.
Parameters
const MMTPType & aElement | The element to be appended to the MTP array. |
AppendL(const RArray< TInt > &)
IMPORT_C void | AppendL | ( | const RArray< TInt > & | aElements | ) | |
Appends the specified elements to the end of the MTP array. The array element type MUST be one of the MTP INT8, INT16, or INT32 types.
- leave
- One of the system wide error codes, if a processing failure occurs.
- panic
- MTPDataTypes 3, if aElement does not match the MTP array's element type.
Parameters
const RArray< TInt > & aElements | The elements to be appended to the MTP array. |
AppendL(const RArray< TUint > &)
Appends the specified elements to the end of the MTP array. The array element type MUST be one of the MTP UINT8, UINT16, or UINT32 types.
- leave
- One of the system wide error codes, if a processing failure occurs.
- panic
- MTPDataTypes 3, if aElement does not match the MTP array's element type.
Parameters
const RArray< TUint > & aElements | The elements to be appended to the MTP array. |
AppendL(const RArray< TInt64 > &)
Appends the specified elements to the end of the MTP array. The array element type MUST be of the MTP INT64 type.
- leave
- One of the system wide error codes, if a processing failure occurs.
- panic
- MTPDataTypes 3, if aElement does not match the MTP array's element type.
Parameters
const RArray< TInt64 > & aElements | The elements to be appended to the MTP array. |
AppendL(const RArray< TUint64 > &)
Appends the specified elements to the end of the MTP array. The array element type MUST be of the MTP UINT64 type.
- leave
- One of the system wide error codes, if a processing failure occurs.
- panic
- MTPDataTypes 3, if aElement does not match the MTP array's element type.
Parameters
const RArray< TUint64 > & aElements | The elements to be appended to the MTP array. |
AppendL(const TAny *)
void | AppendL | ( | const TAny * | aElement | ) | [private] |
AppendUint64L(TUint64)
IMPORT_C void | AppendUint64L | ( | TUint64 | aElement | ) | |
Appends the specified element to the end of the MTP array. The array element type MUST be of the MTP UINT64 type.
- leave
- One of the system wide error codes, if a processing failure occurs.
- panic
- MTPDataTypes 3, if aElement does not match the MTP array's element type.
Parameters
TUint64 aElement | The element to be appended to the MTP array. |
AppendUintL(TUint)
IMPORT_C void | AppendUintL | ( | TUint | aElement | ) | |
Appends the specified element to the end of the MTP array. The array element type MUST be one of the MTP UINT8, UINT16, or UINT32 types.
- leave
- One of the system wide error codes, if a processing failure occurs.
- panic
- MTPDataTypes 3, if aElement does not match the MTP array's element type.
Parameters
TUint aElement | The element to be appended to the MTP array. |
Array(RArray< TInt > &)
IMPORT_C void | Array | ( | RArray< TInt > & | aElements | ) | const |
Provides a copy of the MTP array's element content. The array element type MUST be one of the MTP INT8, INT16, or INT32 types.
- panic
- MTPDataTypes 3, if aElement does not match the MTP array's element type.
Parameters
RArray< TInt > & aElements | On completion, a copy of the MTP array's element content. |
Array(RArray< TUint > &)
Provides a copy of the MTP array's element content. The array element type MUST be one of the MTP UINT8, UINT16, or UINT32 types.
- panic
- MTPDataTypes 3, if aElement does not match the MTP array's element type.
Parameters
RArray< TUint > & aElements | On completion, a copy of the MTP array's element content. |
Array(RArray< TInt64 > &)
Provides a copy of the MTP array's element content. The array element type MUST be of the MTP INT64 type.
- panic
- MTPDataTypes 3, if aElement does not match the MTP array's element type.
Parameters
RArray< TInt64 > & aElements | On completion, a copy of the MTP array's element content. |
Array(RArray< TUint64 > &)
Provides a copy of the MTP array's element content. The array element type MUST be of the MTP UINT64 type.
- panic
- MTPDataTypes 3, if aElement does not match the MTP array's element type.
Parameters
RArray< TUint64 > & aElements | On completion, a copy of the MTP array's element content. |
CommitRequired()
IMPORT_C TBool | CommitRequired | ( | ) | const |
ConstructL(TUint32)
void | ConstructL | ( | TUint32 | aNumElements | ) | [private] |
ConstructL(const RPointerArray< MMTPType > &)
Element(TUint, TAny *)
void | Element | ( | TUint | aIndex, |
| TAny * | aElement |
| ) | const [private] |
ElementInt(TUint)
Provides a copy of the MTP element at the specified array index. The array element type MUST be one of the MTP INT8, INT16, or INT32 types.
- panic
- MTPDataTypes 2, if aIndex is greater than or equal to the number of objects currently contained in the array.
- panic
- MTPDataTypes 3, if aElement does not match the MTP array's element type.
Parameters
TUint aIndex | The index in the MTP array of the required element. |
ElementInt64(TUint)
Provides a copy of the MTP element at the specified array index. The array element type MUST be of the MTP INT64 type.
- panic
- MTPDataTypes 2, if aIndex is greater than or equal to the number of objects currently contained in the array.
- panic
- MTPDataTypes 3, if aElement does not match the MTP array's element type.
Parameters
TUint aIndex | The index in the MTP array of the required element. |
ElementL(TUint, MMTPType &)
Provides a copy of the MTP element at the specified array index.
- leave
- One of the system wide error codes, if a processing failure occurs.
- panic
- MTPDataTypes 2, if aIndex is greater than or equal to the number of objects currently contained in the array.
- panic
- MTPDataTypes 3, if aElement does not match the MTP type of the elements contained in the array.
- panic
- MTPDataTypes 4, if aElement's size does not match that of the elements contained in the array.
Parameters
TUint aIndex | The index in the MTP array of the required element. |
MMTPType & aElement | On completion, a copy of the required element. |
ElementType()
IMPORT_C TInt | ElementType | ( | ) | const |
Provides the MTP identifier of the elements contained in the array.
ElementUint(TUint)
Provides a copy of the MTP element at the specified array index. The array element type MUST be one of the MTP UINT8, UINT16, or UINT32 types.
- panic
- MTPDataTypes 2, if aIndex is greater than or equal to the number of objects currently contained in the array.
- panic
- MTPDataTypes 3, if aElement does not match the MTP array's element type.
Parameters
TUint aIndex | The index in the MTP array of the required element. |
ElementUint64(TUint)
Provides a copy of the MTP element at the specified array index. The array element type MUST be of the MTP UINT64 type.
- panic
- MTPDataTypes 2, if aIndex is greater than or equal to the number of objects currently contained in the array.
- panic
- MTPDataTypes 3, if aElement does not match the MTP array's element type.
Parameters
TUint aIndex | The index in the MTP array of the required element. |
NewL(TInt, TUint)
MTP array data type factory method. This method is used to create an empty MTP array.
- leave
- One of the system wide error codes, if a processing failure occurs.
Parameters
TInt aElementType | The MTP type identifier of the elements contained in the array. |
TUint aElementSize | The size (in bytes) of the elements contained in the array. |
NewL(TInt, TInt, TUint)
MTP array data type factory method. This method is used to create an empty MTP array of the specified MTP array type.
- leave
- One of the system wide error codes, if a processing failure occurs.
Parameters
TInt aArrayType | The MTP type identifier to be assigned to the array. |
TInt aElementType | The MTP type identifier of the elements contained in the array. |
TUint aElementSize | The size (in bytes) of the elements contained in the array. |
NewL(TInt)
MTP simple data type array factory method. This method is used to create an empty MTP array of the specified MTP simple data type.
- leave
- KErrArgument, if aArrayType is not in the range EMTPTypeFirstSimpleArrayType ... EMTPTypeLastSimpleArrayType.
- leave
- One of the system wide error codes, if a processing failure occurs.
Parameters
TInt aArrayType | The array data type indentifier datacode. This must be in the range EMTPTypeFirstSimpleArrayType ... EMTPTypeLastSimpleArrayType. |
NewL(TInt, const RArray< TInt > &)
MTP simple data type array factory method. This method is used to create an MTP array of the specified MTP simple data type with the specified element content.
- leave
- KErrArgument, if aArrayType is not in the range EMTPTypeFirstSimpleArrayType ... EMTPTypeLastSimpleArrayType.
- leave
- One of the system wide error codes, if a processing failure occurs.
Parameters
TInt aArrayType | The array data type indentifier datacode. This must be in the range EMTPTypeFirstSimpleArrayType ... EMTPTypeLastSimpleArrayType. |
const RArray< TInt > & aElements | The initial set of element values. |
NewL(TInt, const RArray< TUint > &)
MTP simple data type array factory method. This method is used to create an MTP array of the specified MTP simple data type with the specified element content.
- leave
- KErrArgument, if aArrayType is not in the range EMTPTypeFirstSimpleArrayType ... EMTPTypeLastSimpleArrayType.
- leave
- One of the system wide error codes, if a processing failure occurs.
Parameters
TInt aArrayType | The array data type indentifier datacode. This must be in the range EMTPTypeFirstSimpleArrayType ... EMTPTypeLastSimpleArrayType. |
const RArray< TUint > & aElements | The initial set of element values. |
NewL(const RArray< TInt64 > &)
MTP AINT64 array factory method. This method is used to create an MTP AINT64 array with the specified element content.
- leave
- KErrArgument, if aArrayType is not in the range EMTPTypeFirstSimpleArrayType ... EMTPTypeLastSimpleArrayType.
- leave
- One of the system wide error codes, if a processing failure occurs.
Parameters
const RArray< TInt64 > & aElements | The initial set of element values. |
NewL(const RArray< TUint64 > &)
MTP AUINT64 array factory method. This method is used to create an MTP AINT64 array with the specified element content.
- leave
- KErrArgument, if aArrayType is not in the range EMTPTypeFirstSimpleArrayType ... EMTPTypeLastSimpleArrayType.
- leave
- One of the system wide error codes, if a processing failure occurs.
Parameters
const RArray< TUint64 > & aElements | The initial set of element values. |
NewLC(TInt, TUint)
MTP array data type factory method. This method is used to create an empty MTP array. A pointer to the MTP array data type is placed on the cleanup stack.
- leave
- One of the system wide error codes, if a processing failure occurs.
Parameters
TInt aElementType | The MTP type identifier of the elements contained in the array. |
TUint aElementSize | The size (in bytes) of the elements which contained in array. |
NewLC(TInt, TInt, TUint)
MTP array data type factory method. This method is used to create an empty MTP array of the specified MTP array type. A pointer to the MTP array data type is placed on the cleanup stack.
- leave
- One of the system wide error codes, if a processing failure occurs.
Parameters
TInt aArrayType | The MTP type identifier to be assigned to the array. |
TInt aElementType | The MTP type identifier of the elements contained in the array. |
TUint aElementSize | The size (in bytes) of the elements which contained in array. |
NewLC(TInt)
MTP simple data type array factory method. This method is used to create an empty MTP array of the specified MTP simple data type. A pointer to the MTP array data type is placed on the cleanup stack.
- leave
- KErrArgument, if aArrayType is not in the range EMTPTypeFirstSimpleArrayType ... EMTPTypeLastSimpleArrayType.
- leave
- One of the system wide error codes, if a processing failure occurs.
Parameters
TInt aArrayType | The array data type indentifier datacode. This must be in the range EMTPTypeFirstSimpleArrayType ... EMTPTypeLastSimpleArrayType. |
NewLC(TInt, const RArray< TInt > &)
MTP simple data type array factory method. This method is used to create an MTP array of the specified MTP simple data type with the specified element content. A pointer to the MTP array data type is placed on the cleanup stack.
- leave
- KErrArgument, if aArrayType is not in the range EMTPTypeFirstSimpleArrayType ... EMTPTypeLastSimpleArrayType.
- leave
- One of the system wide error codes, if a processing failure occurs.
Parameters
TInt aArrayType | The array data type indentifier datacode. This must be in the range EMTPTypeFirstSimpleArrayType ... EMTPTypeLastSimpleArrayType. |
const RArray< TInt > & aElements | The initial set of element values. |
NewLC(TInt, const RArray< TUint > &)
MTP simple data type array factory method. This method is used to create an MTP array of the specified MTP simple data type with the specified element content. A pointer to the MTP array data type is placed on the cleanup stack.
- leave
- KErrArgument, if aArrayType is not in the range EMTPTypeFirstSimpleArrayType ... EMTPTypeLastSimpleArrayType.
- leave
- One of the system wide error codes, if a processing failure occurs.
Parameters
TInt aArrayType | The array data type indentifier datacode. This must be in the range EMTPTypeFirstSimpleArrayType ... EMTPTypeLastSimpleArrayType. |
const RArray< TUint > & aElements | The initial set of element values. |
NewLC(const RArray< TInt64 > &)
MTP AINT64 array factory method. This method is used to create an MTP AINT64 array with the specified element content. A pointer to the MTP array data type is placed on the cleanup stack.
- leave
- KErrArgument, if aArrayType is not in the range EMTPTypeFirstSimpleArrayType ... EMTPTypeLastSimpleArrayType.
- leave
- One of the system wide error codes, if a processing failure occurs.
Parameters
const RArray< TInt64 > & aElements | The initial set of element values. |
NewLC(const RArray< TUint64 > &)
MTP AUINT64 array factory method. This method is used to create an MTP AUINT64 array with the specified element content. A pointer to the MTP array data type is placed on the cleanup stack.
- leave
- KErrArgument, if aArrayType is not in the range EMTPTypeFirstSimpleArrayType ... EMTPTypeLastSimpleArrayType.
- leave
- One of the system wide error codes, if a processing failure occurs.
Parameters
const RArray< TUint64 > & aElements | The initial set of element values. |
NumElements()
Provides the number of elements contained in the MTP array.
ReAllocBufferL(TUint32)
void | ReAllocBufferL | ( | TUint32 | aNumElements | ) | [private] |
SetByDesL(const TDesC8 &)
IMPORT_C void | SetByDesL | ( | const TDesC8 & | aDesc | ) | |
SetInvalidL()
void | SetInvalidL | ( | ) | [private] |
SetNumElements(TUint32)
void | SetNumElements | ( | TUint32 | aNumElements | ) | [private] |
SimpleArrayTypeMetaDataL(TInt, TInt &, TUint &)
void | SimpleArrayTypeMetaDataL | ( | TInt | aArrayType, |
| TInt & | aElementType, |
| TUint & | aElementSize |
| ) | [private, static] |
ToDes(TDes8 &)
IMPORT_C void | ToDes | ( | TDes8 & | aRetDes | ) | const |
Type()
IMPORT_C TUint | Type | ( | ) | const [virtual] |
Validate()
IMPORT_C TInt | Validate | ( | ) | const |
Member Enumerations Documentation
Enum TWriteSequenceState
The write data stream states.
Enumerators
EIdle |
Write data stream is inactive.
|
ENumElements |
Streaming the NumElements data chunk.
|
EElements |
Streaming the array Element chunks.
|
Member Data Documentation
TInt
iArrayType
The array type's MTP datatype code.
TUint64
iElementSize
The array element type's size in bytes.
TInt
iElementType
TInt
| iElementType | [private] |
The array element type's MTP datatype code.
TInt
iValidationState
TInt
| iValidationState | [private] |
The array 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.