This section describes the steps to enable MTP over USB using a user application.
You can write your own application to enable MTP over USB. The application must call the MTP Client API to start the MTP server (in the MTP framework). The MTP Framework then loads the USB MTP Transport plug-in.
RMTPClient mtp; const TUid KUSBStillImage = { 0x102827B2 }; TInt err = mtp.Connect(); if( err != KErrNone ) { // Error in starting the MTP Framework } else( err = mtp.StartTransport( KUSBStillImage ) ) { if( err != KErrNone ) { // Error in starting the USB transport. } } ... err = mtp.StopTransport( KUSBstillImage ); if( err != KErrNone ) { // Error in stopping the USB transport } mtp.Close();
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.