PTP-IP is one of the supported MTP transport modes. This section describes the PTP-IP Transport plug-in and its sub-components (the PTP-IP Connection Controller and related APIs).
Before you start, you must be familiar with the following:
The data type, communication layers, and transport model of PTP-IP can be found in the PTP-IP specification.
Socket programming.
The diagram below shows the components and sub-components provided by the Symbian platform in green and those that a device creator must implement in blue. They run in two processes:
The PTP-IP Controller process is responsible for setting up the TCP/IP connection and PTP-IP connection. According to the PTP-IP specification, PTP-IP is the layer above the TCP/IP.
Note: Once a PTP-IP connection is established, the Listener rejects new connection requests until the current connection stops.
The MTP process loads the PTP-IP Transport plug-in and transfers MTP data over the Symbian TCP/IP Stack between a host PC and a device.
MTP over PTP-IP is initiated in the following way:
A Listener listens on a specific port to accept a PTP-IP connection (based on TCP/IP) request from a host PC. It calls the TCP/IP Stack to establish the TCP/IP connection between the host PC (initiator) and the Symbian device (responder).
A Listener must be implemented by a device creator. For more information about implementing a Listener, refer to Implementing a Listener.
Once the TCP/IP connection is established, the Listener calls the PTP-IP Connection Controller to set up the PTP-IP connection.
For more information about using PTP-IP Controller, refer to Using PTP-IP Controller.
The PTP-IP Connection Controller validates whether to accept the request for a PTP-IP connection by calling a Filter.
The Filter (MPTPIPHostFilter and CPTPIPHostFilterInterface) must be implemented by a device creator. For more information about implementing a Filter, refer to Implementing a Filter.
Once the PTP-IP connection request is accepted and the PTP-IP connection is established, the PTP-IP Connection Controller calls the MTP Client API to send the StartTransport command to the MTP Framework.
The MTP Framework loads the MTP PTP-IP Transport plug-in.
Requests and responses can be issued and MTP data can be transferred between the host PC and the Symbian device over the TCP/IP Stack.
The MTP PTP-IP Transport includes the following key APIs:
API | Description |
---|---|
Provides an ECom plug-in interface for the Connection Controller to load the right Filter implementation. |
|
Gets an instance of the MPTPIPController instance. |
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.