MMTPDataProvider Class Reference

class MMTPDataProvider

Defines the MTP data provider Service Provider Interface (SPI).

Public Member Functions
voidCancel()
IMPORT_C TAny *GetExtendedInterface(TUid)
voidProcessEventL(const TMTPTypeEvent &, MMTPConnection &)
voidProcessNotificationL(TMTPNotification, const TAny *)
voidProcessRequestPhaseL(TMTPTransactionPhase, const TMTPTypeRequest &, MMTPConnection &)
IMPORT_C voidStartObjectEnumerationL(TUint32)
IMPORT_C voidStartObjectEnumerationL(TUint32, TBool)
voidStartStorageEnumerationL()
voidSupported(TMTPSupportCategory, RArray< TUint > &)
IMPORT_C voidSupportedL(TMTPSupportCategory, CDesCArray &)
Protected Member Functions
MMTPDataProviderFramework &Framework()

Member Functions Documentation

Cancel()

voidCancel()[pure virtual]

Cancels the most recent outstanding request made to the MTP data provider service provider interface. If there is no such request outstanding, then no action is taken.

Framework()

MMTPDataProviderFramework &Framework()const [protected, pure virtual]

Provides a handle to the MTP data provider framework layer interface.

GetExtendedInterface(TUid)

IMPORT_C TAny *GetExtendedInterface(TUidaInterfaceUid)[virtual]

Provides an MTP data provider extension interface implementation for the specified interface Uid.

Parameters

TUid aInterfaceUidThe unique identifier for the extension interface being requested.

ProcessEventL(const TMTPTypeEvent &, MMTPConnection &)

voidProcessEventL(const TMTPTypeEvent &aEvent,
MMTPConnection &aConnection
)[pure virtual]
Notifies the data provider that an asynchronous event dataset has been received on the specified MTP connection.
leave
One of the system wide error code, if a processing failure occurs in the data provider.

Parameters

const TMTPTypeEvent & aEventThe MTP event dataset.
MMTPConnection & aConnectionThe MTP connection on which the event was received.

ProcessNotificationL(TMTPNotification, const TAny *)

voidProcessNotificationL(TMTPNotificationaNotification,
const TAny *aParams
)[pure virtual]
Notifies the data provider of a significant event which has been detected. Additional details regarding the event may optionally be provided in the accompanying notification parameter block.
leave
One of the system wide error code if a processing failure occurs in the data provider.

Parameters

TMTPNotification aNotificationThe notification type identifier.
const TAny * aParamsThe notification type specific parameter block

ProcessRequestPhaseL(TMTPTransactionPhase, const TMTPTypeRequest &, MMTPConnection &)

voidProcessRequestPhaseL(TMTPTransactionPhaseaPhase,
const TMTPTypeRequest &aRequest,
MMTPConnection &aConnection
)[pure virtual]

Initiates an MTP transaction phase processing sequence in the data provider. The data provider must respond by issuing a signal to the MTP data provider framework layer interface that is appropriate for the request type and current phase (as specified by aPhase) of the MTP transaction being processed, as follows:

MTP Transaction Phase Valid MMTPDataProviderFramework Signal --------------------- -------------------------------------- ERequestPhase ReceiveDataL, SendDataL, SendResponseL EResponsePhase SendResponseL ECompletingPhase TransactionCompleteL

Parameters

TMTPTransactionPhase aPhaseThe MTP transaction phase to be processed.
const TMTPTypeRequest & aRequestThe MTP request dataset of the active MTP transaction.
MMTPConnection & aConnectionThe MTP connection on which the transaction is being processed.

StartObjectEnumerationL(TUint32)

IMPORT_C voidStartObjectEnumerationL(TUint32aStorageId)[virtual]
. Initiates an object store enumeration sequence to enumerate all MTP data objects which reside on the specified storage and for which the data provider is responsible. The data provider is expected to invoke the appropriate MMTPObjectMgr methods to enumerate all MTP data objects for which it is responsible and which it wishes to have presented to a connected MTP initiator. The data provider must complete the sequence by signalling ObjectEnumerationCompleteL to the data provider framework layer interface.
leave
One of the system wide error code if a processing failure occurs in the data provider.
MMTPDataProviderFramework::ObjectEnumerationCompleteL

Parameters

TUint32 aStorageIdThe MTP StorageID of the storage to be enumerated. A value of KMTPStorageAll indicates that all storages should be enumerated.

StartObjectEnumerationL(TUint32, TBool)

IMPORT_C voidStartObjectEnumerationL(TUint32aStorageId,
TBoolaPersistentFullEnumeration
)[virtual]
Initiates an object store enumeration sequence to enumerate all MTP data objects which reside on the specified storage and for which the data provider is responsible. The data provider is expected to invoke the appropriate MMTPObjectMgr methods to enumerate all MTP data objects for which it is responsible and which it wishes to have presented to a connected MTP initiator. The data provider must complete the sequence by signalling ObjectEnumerationCompleteL to the data provider framework layer interface.
leave
One of the system wide error code if a processing failure occurs in the data provider.
MMTPDataProviderFramework::ObjectEnumerationCompleteL

Parameters

TUint32 aStorageIdThe MTP StorageID of the storage to be enumerated. A value of KMTPStorageAll indicates that all storages should be enumerated.
TBool aPersistentFullEnumerationIt is used by only persistent data providers, it indicates whether the persistent data providers should do the object full-enumreation or not.

StartStorageEnumerationL()

voidStartStorageEnumerationL()[pure virtual]
Initiates a storage enumeration sequence. The data provider is expected to invoke the appropriate MMTPStorageMgr methods to enumerate all MTP storages for which it is responsible and which it wishes to have presented to a connected MTP initiator. The data provider must complete the sequence by signalling StorageEnumerationCompleteL to the data provider framework layer interface.
leave
One of the system wide error code if a processing failure occurs in the data provider.
MMTPDataProviderFramework::StorageEnumerationCompleteL

Supported(TMTPSupportCategory, RArray< TUint > &)

voidSupported(TMTPSupportCategoryaCategory,
RArray< TUint > &aCodes
)const [pure virtual]

Provides the set of MTP datacodes of the specified category that are supported by the data provider.

Parameters

TMTPSupportCategory aCategoryThe requested MTP datacode category.
RArray< TUint > & aCodes

SupportedL(TMTPSupportCategory, CDesCArray &)

IMPORT_C voidSupportedL(TMTPSupportCategoryaCategory,
CDesCArray &aStrings
)const [virtual]
Provides the MTP string values of the specified category that is supported by the data provider.
leave
One of the system wide error code if a processing failure occurs in the data provider.

Parameters

TMTPSupportCategory aCategoryThe requested MTP datacode category.
CDesCArray & aStringsOn successful completion, the set of string data that are supported by the data provider.