MTP Framework Overview

The Symbian MTP implementation defines a transport layer, an MTP layer and a storage layer. The MTP Framework is the MTP layer, which is the core component of the implementation. It manages and works with data providers and transports for MTP requests and operations.

Required background

You must have a general understanding of the MTP enhanced specification and the Symbian implementation of the Media Transfer Protocol to use the MTP Framework component.

Architecture

The following diagram shows the Symbian MTP implementation including the MTP Framework, the MTP Data Providers and the MTP Transports.

Figure 1. Symbian MTP Architecture

MTP Framework performs the following functions:

  • Provides a standard Symbian client/server interface to start and stop MTP services with a transport protocol binding, for example MTP USB Transport.

  • Manages MTP transport connections.

  • Maintains the core MTP protocol connection, session and transaction states.

  • Manages data providers which determine the MTP media data formats supported by a device.

  • Routes MTP operation requests and event datasets to data providers for processing.

  • Efficiently manages the flow of potentially very large volumes of media object data, for example files over 4GB.

  • Maintains a set of MTP data object metadata storages that collectively manage the set of MTP data objects on the device. These objects are enumerated to a connected MTP initiator.

  • Provides the MTP Data Provider API for device creators to extend the data providers.

APIs

The MTP Framework exports the following key APIs:

MTP Client API (mtpclient.dll)

API Description

RMTPClient

The MTP client interface for starting and stopping MTP services, and for specifying the transport protocol.

MTP Data Provider API (mtpdataproviderapi.dll)

API Description

CMTPDataProviderPlugin

The data provider ECom plug-in interface. Each ECOM plug-in data provider must be derived from this class.

CMTPMetaData

The MTP meta-data base class.

CMTPObjectMetaData

Represents MTP object meta-data.

CMTPStorageMetaData

Represents MTP storage meta-data.

MTP Framework Library (mtpframework.dll)

API Description

MMTPDataCodeGenerator

Provides functions to generate a set of unique datacodes for a data provider service. For more information about datacode generation, refer to Creating an MTP Data Provider Plug-in.

MMTPDataProviderFramework

Can be used to get a reference of MMTPDataCodeGenerator.

MTP Data Types Library

The MTP Data Types Library implements the MTP standard data types and dataset. It also allows device creators to write extended data types. For the MTP data types and their relationships, refer to the MTP Data Types Overview.

Typical uses

Device creators can use the MTP Framework in the following ways:

  • To write MTP client applications which start and stop an MTP service.

  • To create additional data providers to support various data types.

  • To configure the Framework to support Picture Transfer Protocol (PTP) or PictBridge data in addition to MTP data.