MMTPDataProviderFramework Class Reference

class MMTPDataProviderFramework

Defines the MTP data provider framework layer application programming interface.

Member Functions Documentation

DataCodeGenerator()

MMTPDataCodeGenerator & DataCodeGenerator ( ) const [pure virtual]

Provides a handle to the MTP datacode generator, which generate the datacode of service properties , formats and methods etc.

DataProviderConfig()

const MMTPDataProviderConfig & DataProviderConfig ( ) const [pure virtual]

Provides a handle to the configurability data specified in the data provider's configuration file.

DataProviderId()

TUint DataProviderId ( ) const [pure virtual]

Provides the unique identifier of the calling data provider.

FrameworkConfig()

const MMTPFrameworkConfig & FrameworkConfig ( ) const [pure virtual]

Provides a handle to the data provider framework configurability parameter data.

Fs()

RFs & Fs ( ) const [pure virtual]

Provides a handle to the MTP data provider framework RFs session.

Mode()

TMTPOperationalMode Mode ( ) const [pure virtual]

Provides the current MTP operational mode.

NotifyFrameworkL(TMTPNotificationToFramework, const TAny *)

void NotifyFrameworkL ( TMTPNotificationToFramework aNotification,
const TAny * aParams
) [pure virtual]
Issues the specified notification to framework.
leave
One of the system wide error code if a processing failure occurs in the framework.

Parameters

TMTPNotificationToFramework aNotification The notification type identifier.
const TAny * aParams The notification type specific parameter block

ObjectEnumerationCompleteL(TUint32)

void ObjectEnumerationCompleteL ( TUint32 aStorageId ) [pure virtual]

Signals the completion of the data provider's object store enumeration sequence that was previously initiated by a StartObjectEnumerationL signal made to the MTP data provider interface. MMTPDataProvider::StartObjectEnumerationL

Parameters

TUint32 aStorageId The MTP StorageID of the enumerated storage. This should match the value specified in the preceding StartObjectEnumerationL.

ObjectMgr()

MMTPObjectMgr & ObjectMgr ( ) const [pure virtual]

Provides a handle to the MTP object manager, which manages the assignment of MTP object handles and their mapping to actual data objects on behalf of the data provider.

ReceiveDataL(MMTPType &, const TMTPTypeRequest &, MMTPConnection &)

void ReceiveDataL ( MMTPType & aData,
const TMTPTypeRequest & aRequest,
MMTPConnection & aConnection
) [pure virtual]
Initiates a data object receive sequence in the MTP data provider framework layer. This method should only be invoked when processing the ERequestPhase of an MTP transaction (CMTPDataProviderPlugin::ProcessRequestPhaseL), and causes the MTP session transaction state to transition to the EDataIToRPhase . The data object receive sequence is completed when the MTP data provider framework layer initiates the EResponsePhase of the MTP transaction (CMTPDataProviderPlugin::ProcessRequestPhaseL). CMTPDataProviderPlugin::ProcessRequestPhaseL
leave
KErrNotReady, if invoked when the current MTP transaction phase is not ERequestPhase.

Parameters

MMTPType & aData The MTP data object sink buffer.
const TMTPTypeRequest & aRequest The MTP request dataset of the active MTP transaction.
MMTPConnection & aConnection The handle of the MTP connection on which the transaction is being processed.

ReferenceMgr()

MMTPReferenceMgr & ReferenceMgr ( ) const [pure virtual]

Provides a handle to the MTP object reference manager, to which data providers can delegate the handling of the MTP persistent, abstract object referencing mechanism.

RegisterPendingRequest(TUint)

void RegisterPendingRequest ( TUint aTimeOut = 0 ) [pure virtual]

Register the current request as pending request. The pending request will be handled after enumeration done.

Parameters

TUint aTimeOut = 0

RouteRequestRegisterL(const TMTPTypeRequest &, MMTPConnection &)

void RouteRequestRegisterL ( const TMTPTypeRequest & aRequest,
MMTPConnection & aConnection
) [pure virtual]

Registers the calling data provider to receive one or more occurrences of the specified request dataset that are received on the specified connection. This method should be used to register the calling data provider to receive the following request types:

1. Follow-on requests of an MTP operation that can span multiple transaction cycles. The following request types are recognised by the framework as follow-on requests:

i) SendObject (preceded by SendObjectInfo or SendObjectPropList). ii) TerminateOpenCapture (preceded by InitiateOpenCapture).

2. MTP vendor extension requests.

Note that:

1. The request dataset being registered must minimally specify the Operation Code of the expected operation and the SessionID on which the operation request is expected to be received.

Follow-on request registrations MUST specify a specific SessionID. Registrations of non follow-on requests may optionally specify a SessionID of KMTPSessionAll to receive matching requests from any active MTP session.2. With the exception of the TransactionID element, registered request datasets must exactly match all data elements of the expected request dataset in order to be successfully routed.

3. Duplicate RouteRequestRegisterL registrations are not permitted. A request dataset that matches that of a previous registration by this or any other data provider on the same MTP session will result in the previous registration being superceded.

4. Pending RouteRequestRegisterL registrations can be withdrawn at any time using the RouteRequestUnregisterL method.5. RouteRequestRegisterL registrations of MTP request types which ARE recognised by the framework as MTP follow-on requests (SendObject, TerminateOpenCapture) will result in at most one matching request occurence being routed to the data provider. To receive another request dataset of the same type, a new RouteRequestRegisterL registration must be made.6 RouteRequestRegisterL registrations of MTP request types which ARE NOT recognised by the framework as MTP follow-on requests will result in all matching requests which are subsequently received being routed to the data provider. This will continue until such time as the RouteRequestRegisterL registration is withdrawn using the RouteRequestUnregisterL method.7. RouteRequestRegisterL registrations request datasets which specify an SessionID value of KMTPSessionAll , will result in matching requests which are subsequently received on any active MTP session being routed to the data provider.
leave
KErrArgument, if the request dataset does meet the minimal registration requirements specified above.
leave
One of the system wide error codes, if a general processing error occurs.
RouteRequestUnregisterL

Parameters

const TMTPTypeRequest & aRequest The operation request dataset being registered.
MMTPConnection & aConnection The handle of the MTP connection on which the operation request is expected to be received.

RouteRequestUnregisterL(const TMTPTypeRequest &, MMTPConnection &)

void RouteRequestUnregisterL ( const TMTPTypeRequest & aRequest,
MMTPConnection & aConnection
) [pure virtual]
Cancels a pending RouteRequestRegisterL registration.
leave
One of the system wide error codes, if a general processing error occurs.
RouteRequestRegisterL

Parameters

const TMTPTypeRequest & aRequest The registered operation request dataset.
MMTPConnection & aConnection The handle of the MTP connection for which the operation request was registered.

SendDataL(const MMTPType &, const TMTPTypeRequest &, MMTPConnection &)

void SendDataL ( const MMTPType & aData,
const TMTPTypeRequest & aRequest,
MMTPConnection & aConnection
) [pure virtual]
Initiates a data object send sequence in the MTP data provider framework layer. This method should only be invoked when processing the ERequestPhase of an MTP transaction (CMTPDataProviderPlugin::ProcessRequestPhaseL), and causes the MTP session transaction state to transition to the EDataRToIPhase . The data object send sequence is completed when the MTP data provider framework layer initiates the EResponsePhase of the MTP transaction (CMTPDataProviderPlugin::ProcessRequestPhaseL). CMTPDataProviderPlugin::ProcessRequestPhaseL
leave
KErrNotReady, if invoked when the current MTP transaction phase is not ERequestPhase.

Parameters

const MMTPType & aData The MTP data object source buffer.
const TMTPTypeRequest & aRequest The MTP request dataset of the active MTP transaction.
MMTPConnection & aConnection The handle of the MTP connection on which the transaction is being processed.

SendEventL(const TMTPTypeEvent &, MMTPConnection &)

void SendEventL ( const TMTPTypeEvent & aEvent,
MMTPConnection & aConnection
) [pure virtual]
Signals the MTP data provider framework layer to send an asynchronous event dataset on the specified MTP connection.
leave
KErrArgument, if the event data is not valid.

Parameters

const TMTPTypeEvent & aEvent The MTP event dataset source buffer.
MMTPConnection & aConnection The handle of the MTP connection on which the event is to be sent.

SendEventL(const TMTPTypeEvent &)

void SendEventL ( const TMTPTypeEvent & aEvent ) [pure virtual]
Signals the MTP data provider framework layer to send an asynchronous event dataset on all active MTP connections.
leave
KErrArgument, if the event data is invalid.

Parameters

const TMTPTypeEvent & aEvent The MTP event dataset source, this should always target all open sessions, i.e. SessionID should be set to KMTPAllSessions.

SendResponseL(const TMTPTypeResponse &, const TMTPTypeRequest &, MMTPConnection &)

void SendResponseL ( const TMTPTypeResponse & aResponse,
const TMTPTypeRequest & aRequest,
MMTPConnection & aConnection
) [pure virtual]
Initiates an MTP response dataset send sequence in the MTP data provider framework layer. This method should only be invoked when processing either the ERequestPhase or EResponsePhase of an MTP transaction, (CMTPDataProviderPlugin::ProcessRequestPhaseL) and causes the MTP session transaction state to transition to the ECompletingPhase . The MTP response dataset send sequence is completed when the MTP data provider framework layer initiates the ECompletingPhase of the MTP transaction (CMTPDataProviderPlugin::ProcessRequestPhaseL). CMTPDataProviderPlugin::ProcessRequestPhaseL
leave
KErrNotReady, if invoked when the current MTP transaction phase is not ERequestPhase or EResponsePhase.

Parameters

const TMTPTypeResponse & aResponse The MTP aResponse dataset source buffer.
const TMTPTypeRequest & aRequest
MMTPConnection & aConnection The handle of the MTP connection on which the transaction is being processed.

StorageEnumerationCompleteL()

void StorageEnumerationCompleteL ( ) [pure virtual]

Signals the completion of the data provider's storage enumeration sequence that was previously initiated by a StartStorageEnumerationL signal made to the MTP data provider interface. MMTPDataProvider::StartStorageEnumerationL

StorageMgr()

MMTPStorageMgr & StorageMgr ( ) const [pure virtual]

Provides a handle to the MTP storage manager, which manages the assignment of MTP storage identifiers on behalf of the data provider.

TransactionCompleteL(const TMTPTypeRequest &, MMTPConnection &)

void TransactionCompleteL ( const TMTPTypeRequest & aRequest,
MMTPConnection & aConnection
) [pure virtual]
Signals to the MTP data provider framework layer that all processing related to the current transaction has been completed. This method should only be invoked when processing the ECompletingPhase of the MTP transaction (CMTPDataProviderPlugin::ProcessRequestPhaseL), and causes the MTP session transaction state to transition to the EIdle state. CMTPDataProviderPlugin::ProcessRequestPhaseL
leave
KErrNotReady If invoked when the current MTP transaction phase is invalid.

Parameters

const TMTPTypeRequest & aRequest The MTP request dataset of the active MTP transaction.
MMTPConnection & aConnection The handle of the MTP connection on which the transaction is being processed.