Using PTP-IP Controller

Introduction

The PTP-IP Controller provides the RPTPIPFramework and MPTPIPController classes. The framework class handles the controller using RPTPIPFramework::Controller().

RPTPIPFramework

The following lists the functionality of RPTPIPFramework class:

  • Instantiate: Use the resource class RPTPIPFramework::OpenL() to instantiate the PTP-IP Controller. This class returns an instance of the PTP-IP Controller.

  • Destruct: Use the resource class RPTPIPFramework::Close() to remove the instance of PTP-IP controller. This class deletes any instance of Listener().

  • Cancel/Stop: Use StopTransport() to stop the Listener and PTP-IP Controller process. StopTransport() closes all the sockets that the PTP-IP Controller process owns, and also closes the client-side session with the MTP server. Use PTPIPListener::StopL() to cancel the outstanding APIs.

MPTPIPController

The following lists the functionality of MPTPIPController class:

  • New blank socket: Use RSocket& NewSocketL() for accepting the incoming connection request.

  • Accept socket: Use SocketAccepted(TRequestStatus& aStatus) to notify the PTP-IP Controller that there is an incoming connection request. It hands over the command or Event Sockets to the appropriate Socket Handlers.

  • Set Device GUID: Use SetDeviceGUID(TDesC8& aDeviceGUID) to save the Device Globally Unique Identifier (GUID).

  • Set Device Friendly Name: Use SetDeviceFriendlyName(TDesC16* aDeviceFriendlyName) to save the current Device Friendly Name.