7 Nokia Corporation - initial contribution. |
7 Nokia Corporation - initial contribution. |
8 Contributors: |
8 Contributors: |
9 --> |
9 --> |
10 <!DOCTYPE concept |
10 <!DOCTYPE concept |
11 PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd"> |
11 PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd"> |
12 <concept xml:lang="en" id="GUID-39C9DD69-504A-529C-ABD3-A73DCAD3F8E9"><title>How to connect to the security manager</title><prolog><metadata><keywords/></metadata></prolog><conbody><p>To use the security manager, a client must:</p> <ol id="GUID-55BB4F8C-4F70-57B0-9A2B-C1E674C9E8A6"><li id="GUID-3CABDB0B-F343-5C34-9B6C-F9AAC9CB585C"><p>Create a session to the security manager, <xref href="GUID-B7CBABF9-93A1-3275-9CB0-CDF8A6606BB1.dita"><apiname>RBTMan</apiname></xref>, and open a connection.</p> </li> <li id="GUID-1A0A7EFB-40E0-577F-926E-22C4A8C38201"><p>Create a subsession to the security manager, <xref href="GUID-D536FA83-2535-3BF2-AC0D-EA0C7CA806BA.dita"><apiname>RBTSecuritySettings</apiname></xref>, and open it. A client can have multiple subsessions open if required. (Sessions and subsessions are part of Symbian OS's architecture for interprocess communication: see <xref href="GUID-D0D27AEA-FDDB-5F6F-94F6-ADDF5910DC47.dita">Client/Server Overview</xref>).</p> </li> <li id="GUID-972EB63B-4DCB-5589-8755-5C1EFC5D4977"><p>Close subsessions and sessions when they are no longer needed.</p> </li> </ol> <p><b>Example</b> </p> <p>The following example shows how to connect to the security manager:</p> <codeblock id="GUID-5BC3C01F-C320-5853-8F24-5126145B778C" xml:space="preserve"> |
12 <concept id="GUID-39C9DD69-504A-529C-ABD3-A73DCAD3F8E9" xml:lang="en"><title>How |
|
13 to connect to the security manager</title><prolog><metadata><keywords/></metadata></prolog><conbody> |
|
14 <p>To use the security manager, a client must:</p> |
|
15 <ol id="GUID-55BB4F8C-4F70-57B0-9A2B-C1E674C9E8A6"> |
|
16 <li id="GUID-3CABDB0B-F343-5C34-9B6C-F9AAC9CB585C"><p>Create a session to |
|
17 the security manager, <xref href="GUID-B7CBABF9-93A1-3275-9CB0-CDF8A6606BB1.dita"><apiname>RBTMan</apiname></xref>, and open a connection.</p> </li> |
|
18 <li id="GUID-1A0A7EFB-40E0-577F-926E-22C4A8C38201"><p>Create a subsession |
|
19 to the security manager, <xref href="GUID-D536FA83-2535-3BF2-AC0D-EA0C7CA806BA.dita"><apiname>RBTSecuritySettings</apiname></xref>, and open |
|
20 it. A client can have multiple subsessions open if required. (Sessions and |
|
21 subsessions are part of Symbian platform's architecture for interprocess communication: |
|
22 see <xref href="GUID-D0D27AEA-FDDB-5F6F-94F6-ADDF5910DC47.dita">Client/Server Overview</xref>).</p> </li> |
|
23 <li id="GUID-972EB63B-4DCB-5589-8755-5C1EFC5D4977"><p>Close subsessions and |
|
24 sessions when they are no longer needed.</p> </li> |
|
25 </ol> |
|
26 |
|
27 |
|
28 <p><b>Example</b> </p> |
|
29 <p>The following example shows how to connect to the security manager:</p> |
|
30 <codeblock id="GUID-5BC3C01F-C320-5853-8F24-5126145B778C" xml:space="preserve"> |
13 // 1. Create and open session to the security manager |
31 // 1. Create and open session to the security manager |
14 RBTMan secMan; |
32 RBTMan secMan; |
15 User::LeaveIfError(secMan.Connect()); |
33 User::LeaveIfError(secMan.Connect()); |
16 |
34 |
17 // 2. Create and open a subsession |
35 // 2. Create and open a subsession |