|
1 <?xml version="1.0" encoding="utf-8"?> |
|
2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. --> |
|
3 <!-- This component and the accompanying materials are made available under the terms of the License |
|
4 "Eclipse Public License v1.0" which accompanies this distribution, |
|
5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". --> |
|
6 <!-- Initial Contributors: |
|
7 Nokia Corporation - initial contribution. |
|
8 Contributors: |
|
9 --> |
|
10 <!DOCTYPE concept |
|
11 PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd"> |
|
12 <concept id="GUID-143DAD71-9BCA-52D3-8BC8-AE80DBF05636" xml:lang="en"><title>Using |
|
13 PTP-IP Controller</title><prolog><metadata><keywords/></metadata></prolog><conbody> |
|
14 <section><title>Introduction</title><p>The PTP-IP Controller provides the <xref href="GUID-44FEC8DA-8C77-3A2B-B1CF-C0AAD854CDED.dita"><apiname>RPTPIPFramework</apiname></xref> and <xref href="GUID-E5CB0731-9BFC-32F2-951B-5F1C1C41D781.dita"><apiname>MPTPIPController</apiname></xref> classes. The framework class handles the controller using <codeph>RPTPIPFramework::Controller()</codeph>.</p></section> |
|
15 <section><title>RPTPIPFramework </title><p> The following lists the functionality |
|
16 of <xref href="GUID-44FEC8DA-8C77-3A2B-B1CF-C0AAD854CDED.dita"><apiname>RPTPIPFramework</apiname></xref> class: </p><ul> |
|
17 <li><p><b>Instantiate</b>: Use the resource class <codeph>RPTPIPFramework::OpenL()</codeph> to |
|
18 instantiate the PTP-IP Controller. This class returns an instance of the PTP-IP |
|
19 Controller. </p></li> |
|
20 <li><p><b>Destruct</b>: Use the resource class <codeph>RPTPIPFramework::Close()</codeph> to |
|
21 remove the instance of PTP-IP controller. This class deletes any instance |
|
22 of <codeph>Listener()</codeph>. </p></li> |
|
23 <li><p><b>Cancel/Stop</b>: Use <codeph>StopTransport()</codeph> to stop the |
|
24 Listener and PTP-IP Controller process. <codeph>StopTransport()</codeph> closes |
|
25 all the sockets that the PTP-IP Controller process owns, and also closes the |
|
26 client-side session with the MTP server. Use <codeph>PTPIPListener::StopL()</codeph> to |
|
27 cancel the outstanding APIs. </p></li> |
|
28 </ul> </section> |
|
29 <section><title>MPTPIPController</title><p> The following lists the functionality |
|
30 of <xref href="GUID-E5CB0731-9BFC-32F2-951B-5F1C1C41D781.dita"><apiname>MPTPIPController</apiname></xref> class: </p><ul> |
|
31 <li><p><b>New blank socket</b>: Use<codeph> RSocket& NewSocketL()</codeph> for |
|
32 accepting the incoming connection request.</p></li> |
|
33 <li><p><b>Accept socket</b>: Use <codeph>SocketAccepted(TRequestStatus& |
|
34 aStatus)</codeph> to notify the PTP-IP Controller that there is an incoming |
|
35 connection request. It hands over the command or Event Sockets to the appropriate |
|
36 Socket Handlers. </p></li> |
|
37 <li><p><b>Set Device GUID</b>: Use <codeph>SetDeviceGUID(TDesC8& aDeviceGUID)</codeph> to |
|
38 save the Device Globally Unique Identifier (GUID). </p></li> |
|
39 <li><p><b>Set Device Friendly Name</b>: Use <codeph>SetDeviceFriendlyName(TDesC16* |
|
40 aDeviceFriendlyName)</codeph> to save the current Device Friendly Name.</p></li> |
|
41 </ul> </section> |
|
42 </conbody><related-links> |
|
43 <link href="GUID-2D872656-7FD3-56D2-B084-8CC84E8453A4.dita"><linktext>MTP over |
|
44 PTP-IP Overview</linktext></link> |
|
45 <link href="GUID-7CFE584D-B605-5A3E-9294-84A28003000B.dita"><linktext>Implementing |
|
46 a Filter</linktext></link> |
|
47 <link href="GUID-24CF2B94-5F10-57D9-B0D4-E56A80266595.dita"><linktext>Implementing |
|
48 a Listener</linktext></link> |
|
49 </related-links></concept> |