Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
<!-- This component and the accompanying materials are made available under the terms of the License
"Eclipse Public License v1.0" which accompanies this distribution,
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
<!-- Initial Contributors:
Nokia Corporation - initial contribution.
Contributors:
-->
<!DOCTYPE concept
PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<concept id="GUID-30647807-A0D2-4D96-975A-BF1800749977" xml:lang="en"><title>Configuring the application’s
platform security settings in the emulator</title><prolog><metadata><keywords/></metadata></prolog><conbody>
<p>You can adjust certain security settings in the emulator. The emulator's
platform security settings are all enabled by default.</p>
<p>Typical use cases include: </p>
<ul>
<li><p>Turning platform security diagnostics on or off</p></li>
<li><p>Turning platform security enforcement on or off</p></li>
<li><p>Disabling a set of capabilities</p></li>
</ul>
<p>Important implementation considerations include:</p>
<ul>
<li><p>You need to use the emulator to set platform security settings.
The feature is not available on production mobile devices.</p></li>
</ul>
<section id="GUID-25876C58-7EE1-46F3-8800-E0CD398170B6"><title>Configuring the settings in the emulator</title>
<p>You can enable or disable platform security settings in the emulator
through the <b>Tools > Preferences</b> menu or by editing the <codeph>epoc.ini</codeph> file.
The following illustration shows the options you have in the <b>Platform security</b> tab
of the Preferences window.</p>
<fig id="GUID-F4DDFC46-AF97-45B5-816C-D4F94182BA2C"><title>Preferences window in the emulator</title><image href="GUID-11E35C60-12DF-4014-AB3F-0314D8536AC0_d0e11022_href.png"/></fig>
<p>To set the platform security settings:</p>
<ol>
<li id="GUID-6ECF89E5-CCF5-431D-9A38-3A472F3B628F"><p>In the emulator,
open the <b>Tools > Preferences</b> menu and go to the <b>Platform Security</b> tab.</p>
<p>Alternatively, open the <codeph>epoc.ini</codeph> file which is located
in the <codeph>...\Epoc32\Data\</codeph> folder on your computer.</p></li>
<li id="GUID-26508845-D52B-476F-96AC-BE3AB0F64124"><p>Modify the
desired settings:</p>
<ul>
<li><p>To allow platform security to emit a diagnostics message
when a check fails, tick the <b>Enable security debug messages</b> checkbox
in the Platform Security tab. </p><p>To enable this setting in the <codeph>Epoc.ini</codeph> file,
include the line <codeph>PlatSecDiagnostics ON</codeph>. To disable this setting,
modify the line to <codeph>PlatSecDiagnostics OFF</codeph>. </p><p>When
the settings is enabled, the diagnostics messages are logged to <xref format="" href="http://wiki.forum.nokia.com/index.php/Epocwind.out" scope="external"><codeph>epocwind.out</codeph></xref> in
a Windows temporary directory. The following is an example of a diagnostics
message:</p>
<codeblock id="GUID-FE9A46AF-D0A4-40D7-847D-9BF67FE1BFBD" xml:space="preserve">153.600 *PlatSec* WARNING - Capability check would have failed - A
Message (function number=0x00000000) from Thread
Screenshot[20000555]0002::screenshot, sent to Server !MsvServer, was checked by
Thread !MsvServer[1000484b]0001::!MsvServer and was found to be missing the
capability: ReadUserData.</codeblock>
</li>
<li><p>To enable platform security to take action after a check
fails and a diagnostics message is sent, tick the <b>Perform capability checks</b> checkbox
in the Platform Security tab.</p><p>To enable this setting in the <codeph>Epoc.ini</codeph> file,
include the line <codeph>PlatSecEnforcement ON</codeph>. To disable this setting,
modify the line to <codeph>PlatSecEnforcement OFF</codeph>.</p></li>
<li><p>To disable a check for specific capabilities, choose the
ones you wish to disable in the <b>Granted capabilities for all applications:</b> list
in the Platform Security tab.</p><p>To disable a check in the <codeph>Epoc.ini</codeph> file,
include <codeph>PlatSecDisabledCaps</codeph>, followed by the capabilities
to be disabled. For example, <codeph>PlatSecDisabledCaps ReadUserData+WriteUserData+UserEnvironment</codeph>.</p>
</li>
</ul>
</li>
</ol>
<p>For more details on the settings you can determine, see <xref href="jar:GUID-35228542-8C95-4849-A73F-2B4F082F0C44.jar!/html/SDL_93/doc_source/ToolsAndUtilities93/Emulator/emulator-ref/EpocIniSyntax.guide.html#Emulator%2dref%2esyntax%2dini%2eplatsec" format="application/java-archive">Emulator configuration file: epoc.ini</xref>.</p>
</section>
<section id="GUID-BFB4DE7F-AC98-42AB-8763-FBA6D390D92A"><title>Additional information on platform security settings in the
emulator</title>
<p>For information on troubleshooting options, see <xref href="http://wiki.forum.nokia.com/index.php/How_to_troubleshoot_Platform_Security_issues" scope="external">How to troubleshoot Platform Security issues</xref>.</p>
<p>For more information on the emulator, see the <xref href="jar:GUID-35228542-8C95-4849-A73F-2B4F082F0C44.jar!/html/SDL_93/doc_source/ToolsAndUtilities93/Emulator/emulator/index.html#emulator%2etoc" format="application/java-archive">Emulator
guide</xref>.</p>
</section>
</conbody></concept>