CMTPTypeDevicePropDesc Class Reference

class CMTPTypeDevicePropDesc : public CMTPTypeCompoundBase

Defines the MTP DevicePropDesc dataset. The DevicePropDesc dataset describes an MTP device property, and is generated in response to a GetDevicePropDesc operation request.

Inherits from

Public Member Functions
~CMTPTypeDevicePropDesc ()
IMPORT_C MMTPType * CommitChunkL ( TPtr8 &)
IMPORT_C TBool CommitRequired ()
IMPORT_C TInt FirstWriteChunk ( TPtr8 &)
IMPORT_C CMTPTypeDevicePropDesc * NewL ( TUint16 )
IMPORT_C CMTPTypeDevicePropDesc * NewL ( TUint16 , const MMTPType &)
IMPORT_C CMTPTypeDevicePropDesc * NewL ( TUint16 , TUint8 , TUint8 , const MMTPType *)
IMPORT_C CMTPTypeDevicePropDesc * NewL ( TUint16 , const TPropertyInfo &, const MMTPType *)
IMPORT_C CMTPTypeDevicePropDesc * NewLC ( TUint16 )
IMPORT_C CMTPTypeDevicePropDesc * NewLC ( TUint16 , const MMTPType &)
IMPORT_C CMTPTypeDevicePropDesc * NewLC ( TUint16 , TUint8 , TUint8 , const MMTPType *)
IMPORT_C CMTPTypeDevicePropDesc * NewLC ( TUint16 , const TPropertyInfo &, const MMTPType *)
IMPORT_C TInt NextWriteChunk ( TPtr8 &)
void PropertyInfoL ( TUint16 , TPropertyInfo &)
IMPORT_C TUint Type ()
Private Member Functions
CMTPTypeDevicePropDesc ()
void ConstructL ( TUint16 , const MMTPType *)
void ConstructL ( TUint16 , const TPropertyInfo &, const MMTPType *)
const TElementInfo & ElementInfo ( TInt )
TBool HasFormField ( TUint8 )
CMTPTypeDevicePropDesc * NewLC ()
TBool ReadableElementL ( TInt )
TInt UpdateWriteSequenceErr ( TInt )
TBool WriteableElementL ( TInt )
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
CMTPTypeCompoundBase::CMTPTypeCompoundBase(TBool,TUint)
CMTPTypeCompoundBase::ChunkAppendL(const MMTPType &)
CMTPTypeCompoundBase::ChunkCount()const
CMTPTypeCompoundBase::ChunkRemove(TUint)
CMTPTypeCompoundBase::FirstReadChunk(TPtrC8 &)const
CMTPTypeCompoundBase::GetL(TInt,MMTPType &)const
CMTPTypeCompoundBase::Int16L(TInt)const
CMTPTypeCompoundBase::Int32L(TInt)const
CMTPTypeCompoundBase::Int64L(TInt)const
CMTPTypeCompoundBase::Int8L(TInt)const
CMTPTypeCompoundBase::NextReadChunk(TPtrC8 &)const
CMTPTypeCompoundBase::NextWriteChunk(TPtr8 &,TUint)
CMTPTypeCompoundBase::Reset()
CMTPTypeCompoundBase::SetExpectedChunkCount(TUint)
CMTPTypeCompoundBase::SetInt16L(TInt,TInt16)
CMTPTypeCompoundBase::SetInt32L(TInt,TInt32)
CMTPTypeCompoundBase::SetInt64L(TInt,TInt64)
CMTPTypeCompoundBase::SetInt8L(TInt,TInt8)
CMTPTypeCompoundBase::SetL(TInt,const MMTPType &)
CMTPTypeCompoundBase::SetStringL(TInt,const TDesC &)
CMTPTypeCompoundBase::SetUint16L(TInt,TUint16)
CMTPTypeCompoundBase::SetUint32L(TInt,TUint32)
CMTPTypeCompoundBase::SetUint64L(TInt,TUint64)
CMTPTypeCompoundBase::SetUint8L(TInt,TUint8)
CMTPTypeCompoundBase::Size()const
CMTPTypeCompoundBase::StringCharsL(TInt)const
CMTPTypeCompoundBase::StringNumCharsL(TInt)const
CMTPTypeCompoundBase::Uint16L(TInt)const
CMTPTypeCompoundBase::Uint32L(TInt)const
CMTPTypeCompoundBase::Uint64L(TInt)const
CMTPTypeCompoundBase::Uint8L(TInt)const
CMTPTypeCompoundBase::Validate()const
CMTPTypeCompoundBase::ValidateChunkCount()const
CMTPTypeCompoundBase::~CMTPTypeCompoundBase()
Public Member Enumerations
enum TMTPDevicePropDescElement {
EDevicePropertyCode , EDatatype , EGetSet , EFactoryDefaultValue , ECurrentValue , EFormFlag , EForm , ENumElements
}
enum TMTPDevicePropDescFormFlag { ENone  = 0x00, ERangeForm  = 0x01, EEnumerationForm  = 0x02 }
enum TMTPDevicePropDescGetSet { EReadOnly  = 0x00, EReadWrite  = 0x01 }
Private Member Enumerations
enum TChunkIds {
EIdFlat1Chunk , EIdDefaultValueChunk , EIdCurrentValueChunk , EIdFormFlagChunk , EIdFormChunk , EIdNumChunks
}
enum TWriteSequenceState {
EWriteIdle , EWriteFlat1Chunk , EWriteDefaultValueChunk , EWriteCurrentValueChunk , EWriteFormFlagChunk , EWriteFormChunk
}
Inherited Enumerations
CMTPTypeCompoundBase:TReadWriteSequenceState
Private Attributes
const TUint KFlat1ChunkSize
const TUint KNumChunksWithForm
const TUint KNumChunksWithoutForm
RMTPType iChunkCurrentValue
RMTPType iChunkDefaultValue
RMTPTypeCompoundFlatChunk iChunkFlat1
RMTPTypeDevicePropDescForm iChunkForm
TMTPTypeUint8 iChunkFormFlag
const TFixedArray < TElementInfo , ENumElements > iElementInfo
const CMTPTypeCompoundBase::TElementInfo iElementMetaData
TBool iInitialised
TUint iWriteSequenceCompletionState
TUint iWriteSequenceErr
TUint iWriteSequenceState
Inherited Attributes
CMTPTypeCompoundBase::KJustInTimeConstruction
CMTPTypeCompoundBase::KMTPNotApplicable
CMTPTypeCompoundBase::KVariableChunkCount
CMTPTypeCompoundBase::iChunks
CMTPTypeCompoundBase::iWriteChunk

Constructor & Destructor Documentation

CMTPTypeDevicePropDesc()

CMTPTypeDevicePropDesc ( ) [private]

~CMTPTypeDevicePropDesc()

IMPORT_C ~CMTPTypeDevicePropDesc ( ) [virtual]

Destructor.

Member Functions Documentation

CommitChunkL(TPtr8 &)

IMPORT_C MMTPType * CommitChunkL ( TPtr8 & aChunk ) [virtual]

Parameters

TPtr8 & aChunk

CommitRequired()

IMPORT_C TBool CommitRequired ( ) const [virtual]

ConstructL(TUint16, const MMTPType *)

void ConstructL ( TUint16 aPropertyCode,
const MMTPType * aForm
) [private]

Parameters

TUint16 aPropertyCode
const MMTPType * aForm

ConstructL(TUint16, const TPropertyInfo &, const MMTPType *)

void ConstructL ( TUint16 aPropertyCode,
const TPropertyInfo & aInfo,
const MMTPType * aForm
) [private]

Parameters

TUint16 aPropertyCode
const TPropertyInfo & aInfo
const MMTPType * aForm

ElementInfo(TInt)

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

Provides the TElementInfo data for the specified element.

Parameters

TInt aElementId The identifier of the requested element.

FirstWriteChunk(TPtr8 &)

IMPORT_C TInt FirstWriteChunk ( TPtr8 & aChunk ) [virtual]

Parameters

TPtr8 & aChunk

HasFormField(TUint8)

TBool HasFormField ( TUint8 aFormFlag ) const [private]

Parameters

TUint8 aFormFlag

NewL(TUint16)

IMPORT_C CMTPTypeDevicePropDesc * NewL ( TUint16 aPropertyCode ) [static]
MTP DevicePropDesc dataset factory method. This method is used to create an empty MTP DevicePropDesc dataset type with the default Datatype and Form Flag defined for the specified PropertyCode.
leave
One of the system wide error codes, if unsuccessful.

Parameters

TUint16 aPropertyCode The ObjectPropertyCode of the property being described by the DevicePropDesc dataset.

NewL(TUint16, const MMTPType &)

IMPORT_C CMTPTypeDevicePropDesc * NewL ( TUint16 aPropertyCode,
const MMTPType & aForm
) [static]
MTP DevicePropDesc dataset factory method. This method is used to create an MTP DevicePropDesc dataset type with the default Datatype and Form Flag defined for the specified PropertyCode, and the specified FORM.
leave
KErrNotSupported, if a FORM dataset is not defined for the property.
leave
One of the system wide error codes, if unsuccessful.

Parameters

TUint16 aPropertyCode The ObjectPropertyCode of the property being described by the DevicePropDesc dataset.
const MMTPType & aForm The optional DevicePropDesc FORM dataset.

NewL(TUint16, TUint8, TUint8, const MMTPType *)

IMPORT_C CMTPTypeDevicePropDesc * NewL ( TUint16 aPropertyCode,
TUint8 aGetSet,
TUint8 aFormFlag,
const MMTPType * aForm
) [static]
MTP DevicePropDesc dataset factory method. This method is used to create an MTP DevicePropDesc dataset type with the default Datatype defined for the specified PropertyCode, and the specified Form Flag and FORM.
leave
KErrNotSupported, if a FORM dataset is not defined for the property.
leave
One of the system wide error codes, if unsuccessful.

Parameters

TUint16 aPropertyCode The ObjectPropertyCode of the property being described by the DevicePropDesc dataset.
TUint8 aGetSet The Get/Set flag of the DevicePropDesc.
TUint8 aFormFlag The required Form Flag of the DevicePropDesc.
const MMTPType * aForm The optional DevicePropDesc FORM dataset.

NewL(TUint16, const TPropertyInfo &, const MMTPType *)

IMPORT_C CMTPTypeDevicePropDesc * NewL ( TUint16 aPropertyCode,
const TPropertyInfo & aInfo,
const MMTPType * aForm
) [static]
MTP DevicePropDesc dataset factory method. This method is used to create an MTP DevicePropDesc dataset type with the specified values.
leave
KErrNotSupported, if a FORM dataset is not defined for the property.
leave
One of the system wide error codes, if unsuccessful.

Parameters

TUint16 aPropertyCode The ObjectPropertyCode of the property being described by the DevicePropDesc dataset.
const TPropertyInfo & aInfo The MTP DevicePropDesc dataset characteristics (meta data).
const MMTPType * aForm The optional DevicePropDesc FORM dataset.

NewLC(TUint16)

IMPORT_C CMTPTypeDevicePropDesc * NewLC ( TUint16 aPropertyCode ) [static]
MTP DevicePropDesc dataset factory method. This method is used to create an empty MTP DevicePropDesc dataset type with the default Datatype and Form Flag defined for the specified PropertyCode. A pointer to the data type is placed on the cleanup stack.
leave
One of the system wide error codes, if unsuccessful.

Parameters

TUint16 aPropertyCode The ObjectPropertyCode of the property being described by the DevicePropDesc dataset.

NewLC(TUint16, const MMTPType &)

IMPORT_C CMTPTypeDevicePropDesc * NewLC ( TUint16 aPropertyCode,
const MMTPType & aForm
) [static]
MTP DevicePropDesc dataset factory method. This method is used to create an MTP DevicePropDesc dataset type with the default Datatype and Form Flag defined for the specified PropertyCode, and the specified FORM. A pointer to the data type is placed on the cleanup stack.
leave
KErrNotSupported, if a FORM dataset is not defined for the property.
leave
One of the system wide error codes, if unsuccessful.

Parameters

TUint16 aPropertyCode The ObjectPropertyCode of the property being described by the DevicePropDesc dataset.
const MMTPType & aForm The optional DevicePropDesc FORM dataset.

NewLC(TUint16, TUint8, TUint8, const MMTPType *)

IMPORT_C CMTPTypeDevicePropDesc * NewLC ( TUint16 aPropertyCode,
TUint8 aGetSet,
TUint8 aFormFlag,
const MMTPType * aForm
) [static]
MTP DevicePropDesc dataset factory method. This method is used to create an MTP DevicePropDesc dataset type with the default Datatype defined for the specified PropertyCode, and the specified Form Flag and FORM. A pointer to the data type is placed on the cleanup stack.
leave
KErrNotSupported, if a FORM dataset is not defined for the property.
leave
One of the system wide error codes, if unsuccessful.

Parameters

TUint16 aPropertyCode The ObjectPropertyCode of the property being described by the DevicePropDesc dataset.
TUint8 aGetSet The Get/Set flag of the DevicePropDesc.
TUint8 aFormFlag The required Form Flag of the DevicePropDesc.
const MMTPType * aForm The optional DevicePropDesc FORM dataset.

NewLC(TUint16, const TPropertyInfo &, const MMTPType *)

IMPORT_C CMTPTypeDevicePropDesc * NewLC ( TUint16 aPropertyCode,
const TPropertyInfo & aInfo,
const MMTPType * aForm
) [static]
MTP DevicePropDesc dataset factory method. This method is used to create an MTP DevicePropDesc dataset type with the specified values. A pointer to the data type is placed on the cleanup stack.
leave
KErrNotSupported, if a FORM dataset is not defined for the property.
leave
One of the system wide error codes, if unsuccessful.

Parameters

TUint16 aPropertyCode The ObjectPropertyCode of the property being described by the DevicePropDesc dataset.
const TPropertyInfo & aInfo The MTP DevicePropDesc dataset characteristics (meta data).
const MMTPType * aForm The optional DevicePropDesc FORM dataset.

NewLC()

CMTPTypeDevicePropDesc * NewLC ( ) [private, static]

NextWriteChunk(TPtr8 &)

IMPORT_C TInt NextWriteChunk ( TPtr8 & aChunk ) [virtual]

Parameters

TPtr8 & aChunk

PropertyInfoL(TUint16, TPropertyInfo &)

void PropertyInfoL ( TUint16 aPropertyCode,
TPropertyInfo & aInfo
) [static]

Parameters

TUint16 aPropertyCode
TPropertyInfo & aInfo

ReadableElementL(TInt)

TBool ReadableElementL ( TInt aElementId ) const [private, virtual]

Indicates if the specified element can be read from.

Parameters

TInt aElementId The identifier of the requested element.

Type()

IMPORT_C TUint Type ( ) const [virtual]

UpdateWriteSequenceErr(TInt)

TInt UpdateWriteSequenceErr ( TInt aErr ) [private]

Parameters

TInt aErr

WriteableElementL(TInt)

TBool WriteableElementL ( TInt aElementId ) const [private, virtual]

Indicates if the specified element can be written to.

Parameters

TInt aElementId The identifier of the requested element.

Member Enumerations Documentation

Enum TChunkIds

Data chunk identifiers.

Enumerators

EIdFlat1Chunk

The first flat data chunk ID.

EIdDefaultValueChunk

The EFactoryDefaultValue element data chunk ID.

EIdCurrentValueChunk

The ECurrentValue element data chunk ID.

EIdFormFlagChunk

The second flat data chunk ID.

EIdFormChunk

The EForm element data chunk ID.

EIdNumChunks

The number of data chunks.

Enum TMTPDevicePropDescElement

MTP DevicePropDesc dataset element identifiers.

Enumerators

EDevicePropertyCode

Property Code (read-only).

EDatatype

Datatype (read-only).

EGetSet

Get/Set.

EFactoryDefaultValue

Factory Default Value.

ECurrentValue

Factory Default Value.

EFormFlag

Form Flag (read-only).

EForm

FORM element. This element depends EFormFlag and is absent if EFormFlag is ENone.

ENumElements

The number of dataset elements.

Enum TMTPDevicePropDescFormFlag

MTP DevicePropDesc dataset FormFlag element values.

Enumerators

ENone = 0x00

None.

ERangeForm = 0x01

Range form.

EEnumerationForm = 0x02

Enumeration form.

Enum TMTPDevicePropDescGetSet

MTP DevicePropDesc dataset Get/Set element values.

Enumerators

EReadOnly = 0x00

Get.

EReadWrite = 0x01

Get/Set.

Enum TWriteSequenceState

The write data stream states.

Enumerators

EWriteIdle

Data stream is inactive.

EWriteFlat1Chunk

Streaming the first flat data chunk.

EWriteDefaultValueChunk

Streaming the EFactoryDefaultValue data chunk..

EWriteCurrentValueChunk

Streaming the ECurrentValue data chunk..

EWriteFormFlagChunk

Streaming the second flat data chunk.

EWriteFormChunk

Streaming the EForm data chunk.

Member Data Documentation

const TUint KFlat1ChunkSize

const TUint KFlat1ChunkSize [private, static]

The size in bytes of the first flat data chunk.

const TUint KNumChunksWithForm

const TUint KNumChunksWithForm [private, static]

The data chunk count of DevicePropDesc datasets with an EForm of other than ENone.

const TUint KNumChunksWithoutForm

const TUint KNumChunksWithoutForm [private, static]

The data chunk count of DevicePropDesc datasets with an EForm of ENone.

RMTPType iChunkCurrentValue

RMTPType iChunkCurrentValue [private]

The ECurrentValue element data chunk.

RMTPType iChunkDefaultValue

RMTPType iChunkDefaultValue [private]

The EFactoryDefaultValue element data chunk.

RMTPTypeCompoundFlatChunk iChunkFlat1

RMTPTypeCompoundFlatChunk iChunkFlat1 [private]

The flat data chunk comprising elements EPropertyCode to EGetSet.

RMTPTypeDevicePropDescForm iChunkForm

RMTPTypeDevicePropDescForm iChunkForm [private]

The EForm element data chunk.

TMTPTypeUint8 iChunkFormFlag

TMTPTypeUint8 iChunkFormFlag [private]

The EFormFlag data chunk.

const TFixedArray< TElementInfo, ENumElements > iElementInfo

const TFixedArray < TElementInfo , ENumElements > iElementInfo [private]

The dataset element metadata table.

const CMTPTypeCompoundBase::TElementInfo iElementMetaData

const CMTPTypeCompoundBase::TElementInfo iElementMetaData [private, static]

The dataset element metadata table content.

TBool iInitialised

TBool iInitialised [private]

The initialised flag indicating if construction is completeand that read-only elements can no longer be modified.

TUint iWriteSequenceCompletionState

TUint iWriteSequenceCompletionState [private]

The write data stream completion state. This will be set to EFlat2Chunk for DevicePropDesc datasets with an EForm of ENone, otherwise this will be EFormChunk.

TUint iWriteSequenceErr

TUint iWriteSequenceErr [private]

The write data stream error state.

TUint iWriteSequenceState

TUint iWriteSequenceState [private]

The write data stream state variable.