diff -r 48780e181b38 -r 578be2adaf3e Symbian3/PDK/Source/GUID-FD4BD57B-99EE-41AE-BAB6-C422CA3B1E51.dita --- a/Symbian3/PDK/Source/GUID-FD4BD57B-99EE-41AE-BAB6-C422CA3B1E51.dita Tue Jul 20 12:00:49 2010 +0100 +++ b/Symbian3/PDK/Source/GUID-FD4BD57B-99EE-41AE-BAB6-C422CA3B1E51.dita Fri Aug 13 16:47:46 2010 +0100 @@ -1,81 +1,81 @@ - - - - - -Enabling -MTP over USB using the Symbian USB ManagerThis section describes the steps to enable MTP over USB using the -Symbian USB Manager. -

The USB Manager provides functions to enable MTP over USB.

-
- -In the user application which requests USB services, create a USB -Manager session by using the RUsb::Connect() function. -

- -Call the function RUsb::TryStart() and pass the personality ID -of the USB Still Image Class to the method. For more information about Personality -ID, see Discovering -details of USB personalities - -The USB Manager automatically loads the USB Still Image Class Controller -which is a client of the MTP server. The Controller starts the MTP server -and asks it to load the USB MTP Transport plug-in. - - -RUsb usb; -TInt err = usb.Connect(); -if( err != KErrNone) - { - // Error in connecting with the USB Manager - } - -// Find the personality that supports MTP USB SIC -TInt personalityId(KErrNotFound); -RArray<TInt> personalityIds; - -err = usb.GetPersonalityIds(personalityIds); -if ( err != KErrNone) - { - // Error handling - } - -TInt count = personalityIds.Count(); -for (TInt i(0); i < count; i++) - { - TBool supported(EFalse); - err = usb.ClassSupported(personalityIds[i], KUsbMTPUsbSicClassControllerUID, supported); - if (err != KErrNone) - { - // Error handling - } - - if (supported) - { - personalityId = personalityIds[i]; - break; - } - } -personalityIds.Close(); - -if (personalityId != KErrNotFound) - { - TRequestStatus status ; - usb.TryStart(personalityId, status); - User::WaitForRequest(status); - if(status.Int() != KErrNone) - { - // Error in trying to start the MTP service - } - } -... - -usb.Close(); - + + + + + +Enabling +MTP over USB using the Symbian USB ManagerThis section describes the steps to enable MTP over USB using the +Symbian USB Manager. +

The USB Manager provides functions to enable MTP over USB.

+ + +In the user application which requests USB services, create a USB +Manager session by using the RUsb::Connect() function. +

+ +Call the function RUsb::TryStart() and pass the personality ID +of the USB Still Image Class to the method. For more information about Personality +ID, see Discovering +details of USB personalities + +The USB Manager automatically loads the USB Still Image Class Controller +which is a client of the MTP server. The Controller starts the MTP server +and asks it to load the USB MTP Transport plug-in. + + +RUsb usb; +TInt err = usb.Connect(); +if( err != KErrNone) + { + // Error in connecting with the USB Manager + } + +// Find the personality that supports MTP USB SIC +TInt personalityId(KErrNotFound); +RArray<TInt> personalityIds; + +err = usb.GetPersonalityIds(personalityIds); +if ( err != KErrNone) + { + // Error handling + } + +TInt count = personalityIds.Count(); +for (TInt i(0); i < count; i++) + { + TBool supported(EFalse); + err = usb.ClassSupported(personalityIds[i], KUsbMTPUsbSicClassControllerUID, supported); + if (err != KErrNone) + { + // Error handling + } + + if (supported) + { + personalityId = personalityIds[i]; + break; + } + } +personalityIds.Close(); + +if (personalityId != KErrNotFound) + { + TRequestStatus status ; + usb.TryStart(personalityId, status); + User::WaitForRequest(status); + if(status.Int() != KErrNone) + { + // Error in trying to start the MTP service + } + } +... + +usb.Close(); + \ No newline at end of file