Symbian3/PDK/Source/GUID-4F0C4B9D-AA42-59C4-900A-7045FEAAF2F4.dita
author Graeme Price <GRAEME.PRICE@NOKIA.COM>
Fri, 15 Oct 2010 14:32:18 +0100
changeset 15 307f4279f433
parent 14 578be2adaf3e
permissions -rw-r--r--
Initial contribution of the Adaptation Documentation.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
14
578be2adaf3e Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
     1
<?xml version="1.0" encoding="utf-8"?>
578be2adaf3e Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
     2
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
578be2adaf3e Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
     3
<!-- This component and the accompanying materials are made available under the terms of the License 
578be2adaf3e Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
     4
"Eclipse Public License v1.0" which accompanies this distribution, 
578be2adaf3e Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
     5
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
578be2adaf3e Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
     6
<!-- Initial Contributors:
578be2adaf3e Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
     7
    Nokia Corporation - initial contribution.
578be2adaf3e Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
     8
Contributors: 
578be2adaf3e Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
     9
-->
578be2adaf3e Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    10
<!DOCTYPE concept
578be2adaf3e Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    11
  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
578be2adaf3e Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    12
<concept xml:lang="en" id="GUID-4F0C4B9D-AA42-59C4-900A-7045FEAAF2F4"><title>Using security on outgoing sockets</title><prolog><metadata><keywords/></metadata></prolog><conbody><p>For an outgoing connection, the Bluetooth stack will not, by default, enforce any particular Bluetooth security. If the remote device requires authentication/encryption to connect, then this will be handled by the stack transparently to the application. </p> <section><title>How to use security on outgoing sockets</title> <p>It may occasionally be necessary for the local application to insist on authenticating or encrypting the link. In this case, there are control operations (<codeph>ioctls</codeph>) that can be issued on a connected <xref href="GUID-D4F08503-F1EF-3531-9C3C-4AF24A6255F0.dita"><apiname>RSocket</apiname></xref> that will authenticate (<codeph>ioctl
578be2adaf3e Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    13
        </codeph> <xref href="GUID-429D5401-3C12-38B8-BC41-A0917BF74EF8.dita"><apiname>KHCIAuthRequestIoctl</apiname></xref>) or encrypt (<xref href="GUID-01EFBA4B-E35C-3EFE-9678-60EC887CD93D.dita"><apiname>KHCIEncryptIoctl</apiname></xref>) the link. </p> <p><b>Issuing Authentication Requests </b> </p> <p>The following example shows the authentication request <codeph>ioctl</codeph> being issued. </p> <codeblock id="GUID-3C82D4B6-0D15-537B-A4C4-F0666BF7DA5A" xml:space="preserve">// Assume you have an opened L2CAP RSocket object, socket
578be2adaf3e Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    14
socket.Ioctl(KHCIAuthRequestIoctl, status, NULL, KSolBtHCI);
578be2adaf3e Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    15
User::WaitForRequest(status);
578be2adaf3e Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    16
if (status==KErrNone)
578be2adaf3e Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    17
    {
1
25a17d01db0c Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    18
    \\ Success...</codeblock> </section> <section><title>Where Next?</title> <p>This tutorial set takes you through all the steps involved in setting up and communicating over a Bluetooth connection. </p> <ul><li id="GUID-3816B7B8-8792-55B0-BE28-AA4DFE3B3E24"><p> <xref href="GUID-301488F8-B6D8-569A-B05E-19B740FE4C00.dita">Selecting a Remote Device</xref> </p> </li> <li id="GUID-632D24D8-7B74-5AAA-92B3-EB3857B60D44"><p> <xref href="GUID-CED041C8-D68D-55D1-957E-1A48EEFFF851.dita">Inquiring About Remote Devices</xref>  </p> </li> <li id="GUID-65DA0494-5ACC-5613-B818-8A0CA1CC8123"><p> <xref href="GUID-A13494B9-C1E4-506A-B236-8AE0A6D6D557.dita">Inquiring About Services on a Remote Device</xref> </p> </li> <li id="GUID-606F93E4-87C9-5B52-B683-4CBB88270BB4"><p> <xref href="GUID-A24D2CEF-88C9-5C63-A14D-85EFFBEF3C92.dita">Connecting and Transferring Data to a Remote Device</xref> </p> </li> <li id="GUID-B429E0B8-3D35-539B-B88F-CC841F94FF4F"><p> <b>Using security on outgoing sockets</b> - This document </p> </li> </ul> </section> </conbody></concept>