Symbian3/PDK/Source/GUID-AA5DEEB2-0B13-5FA8-8494-EC2F5C654FEF.dita
author Dominic Pinkman <dominic.pinkman@nokia.com>
Fri, 16 Jul 2010 17:23:46 +0100
changeset 12 80ef3a206772
parent 5 f345bda72bc4
permissions -rw-r--r--
Week 28 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 1897, Bug 344, Bug 2681, Bug 463, Bug 1522.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12
80ef3a206772 Week 28 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 1897, Bug 344, Bug 2681, Bug 463, Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
     1
<?xml version="1.0" encoding="utf-8"?>
80ef3a206772 Week 28 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 1897, Bug 344, Bug 2681, Bug 463, Bug 1522.
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. -->
80ef3a206772 Week 28 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 1897, Bug 344, Bug 2681, Bug 463, Bug 1522.
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 
80ef3a206772 Week 28 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 1897, Bug 344, Bug 2681, Bug 463, Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
     4
"Eclipse Public License v1.0" which accompanies this distribution, 
80ef3a206772 Week 28 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 1897, Bug 344, Bug 2681, Bug 463, Bug 1522.
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". -->
80ef3a206772 Week 28 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 1897, Bug 344, Bug 2681, Bug 463, Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
     6
<!-- Initial Contributors:
80ef3a206772 Week 28 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 1897, Bug 344, Bug 2681, Bug 463, Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
     7
    Nokia Corporation - initial contribution.
80ef3a206772 Week 28 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 1897, Bug 344, Bug 2681, Bug 463, Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
     8
Contributors: 
80ef3a206772 Week 28 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 1897, Bug 344, Bug 2681, Bug 463, Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
     9
-->
80ef3a206772 Week 28 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 1897, Bug 344, Bug 2681, Bug 463, Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    10
<!DOCTYPE concept
80ef3a206772 Week 28 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 1897, Bug 344, Bug 2681, Bug 463, Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    11
  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
80ef3a206772 Week 28 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 1897, Bug 344, Bug 2681, Bug 463, Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    12
<concept id="GUID-AA5DEEB2-0B13-5FA8-8494-EC2F5C654FEF" xml:lang="en"><title>CentRepExample: Using Central Repository for Persistent Storage</title><shortdesc>This example application demonstrates the usage of Central
80ef3a206772 Week 28 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 1897, Bug 344, Bug 2681, Bug 463, Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    13
Repository API for persistent storage.</shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
80ef3a206772 Week 28 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 1897, Bug 344, Bug 2681, Bug 463, Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    14
<section id="GUID-E2129D18-6FBB-55B9-8D79-420EB2CF2401"><title>Description</title> <p>Several Symbian platform components have state and settings information
80ef3a206772 Week 28 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 1897, Bug 344, Bug 2681, Bug 463, Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    15
that need to be persistent. There is also a global state that needs
80ef3a206772 Week 28 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 1897, Bug 344, Bug 2681, Bug 463, Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    16
to persist, for example, default filenames, locale settings, user
80ef3a206772 Week 28 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 1897, Bug 344, Bug 2681, Bug 463, Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    17
preferences. </p> <p>The CentRep example application first registers
80ef3a206772 Week 28 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 1897, Bug 344, Bug 2681, Bug 463, Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    18
a group of settings with the central repository server. It uses <filepath>E80000AD.txt</filepath>, a UTF-16 format text file to initialise
80ef3a206772 Week 28 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 1897, Bug 344, Bug 2681, Bug 463, Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    19
the repository. This text file contains access control structure and
80ef3a206772 Week 28 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 1897, Bug 344, Bug 2681, Bug 463, Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    20
the initial content of the repository. It is recommended to convert
80ef3a206772 Week 28 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 1897, Bug 344, Bug 2681, Bug 463, Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    21
the initialisation text file into a binary file using the central
80ef3a206772 Week 28 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 1897, Bug 344, Bug 2681, Bug 463, Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    22
repository converter tool to speed up the execution. </p> <p>The application
80ef3a206772 Week 28 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 1897, Bug 344, Bug 2681, Bug 463, Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    23
creates a <xref href="GUID-DEA618DF-D462-3B3E-A1E1-F21295AAFE78.dita"><apiname>CRepository</apiname></xref> object using the <xref href="GUID-DEA618DF-D462-3B3E-A1E1-F21295AAFE78.dita#GUID-DEA618DF-D462-3B3E-A1E1-F21295AAFE78/GUID-B8DD1F6F-5A03-30C7-A5B5-51053D9FBDD3"><apiname>CRepository::NewLC()</apiname></xref> method to access a repository using
80ef3a206772 Week 28 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 1897, Bug 344, Bug 2681, Bug 463, Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    24
its UID. It resets the whole repository using <xref href="GUID-DEA618DF-D462-3B3E-A1E1-F21295AAFE78.dita#GUID-DEA618DF-D462-3B3E-A1E1-F21295AAFE78/GUID-BA806B9D-C347-3722-886E-1290A4A0618A"><apiname>CRepository::Reset()</apiname></xref> method with the contents in the initialisation file. </p> <p>Each
80ef3a206772 Week 28 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 1897, Bug 344, Bug 2681, Bug 463, Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    25
setting stored in the repository will have a unique key to identify
80ef3a206772 Week 28 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 1897, Bug 344, Bug 2681, Bug 463, Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    26
the setting. This unique key is used to read and change the setting
80ef3a206772 Week 28 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 1897, Bug 344, Bug 2681, Bug 463, Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    27
by calling the <xref href="GUID-DEA618DF-D462-3B3E-A1E1-F21295AAFE78.dita#GUID-DEA618DF-D462-3B3E-A1E1-F21295AAFE78/GUID-AB3918A5-BA69-3EE8-89B4-51DD8A899AF5"><apiname>CRepository::Get()</apiname></xref> and <xref href="GUID-DEA618DF-D462-3B3E-A1E1-F21295AAFE78.dita#GUID-DEA618DF-D462-3B3E-A1E1-F21295AAFE78/GUID-114079A1-A8CA-3FE7-8FAD-F5E61453FF6B"><apiname>CRepository::Set()</apiname></xref> methods respectively. The application
80ef3a206772 Week 28 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 1897, Bug 344, Bug 2681, Bug 463, Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    28
moves these keys to a different location using <xref href="GUID-DEA618DF-D462-3B3E-A1E1-F21295AAFE78.dita#GUID-DEA618DF-D462-3B3E-A1E1-F21295AAFE78/GUID-4F005B5F-2664-3F7C-848D-B6F93462F2F4"><apiname>CRepository::Move()</apiname></xref> method and deletes them from their original location. </p> <p>The
80ef3a206772 Week 28 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 1897, Bug 344, Bug 2681, Bug 463, Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    29
application also creates another <codeph>CRepository</codeph> object
80ef3a206772 Week 28 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 1897, Bug 344, Bug 2681, Bug 463, Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    30
to demonstrate that, at any given point a repository cannot be opened
80ef3a206772 Week 28 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 1897, Bug 344, Bug 2681, Bug 463, Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    31
with <i>READ/WRITE</i> access by more than one client. In such situations,
80ef3a206772 Week 28 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 1897, Bug 344, Bug 2681, Bug 463, Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    32
it is recommended to start a transaction before a write operation
80ef3a206772 Week 28 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 1897, Bug 344, Bug 2681, Bug 463, Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    33
using <xref href="GUID-DEA618DF-D462-3B3E-A1E1-F21295AAFE78.dita#GUID-DEA618DF-D462-3B3E-A1E1-F21295AAFE78/GUID-1F14EB0C-89CF-3A76-A678-5F6F86F50B32"><apiname>CRepository::StartTransaction()</apiname></xref> method. A
80ef3a206772 Week 28 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 1897, Bug 344, Bug 2681, Bug 463, Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    34
transaction guarantees the consistency and persistence of all values
80ef3a206772 Week 28 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 1897, Bug 344, Bug 2681, Bug 463, Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    35
read and written during the transaction. </p> <p>Finally, the application
80ef3a206772 Week 28 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 1897, Bug 344, Bug 2681, Bug 463, Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    36
requests the central repository server to notify any changes to the
80ef3a206772 Week 28 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 1897, Bug 344, Bug 2681, Bug 463, Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    37
original settings. </p><p><b>Related APIs</b></p><ul>
80ef3a206772 Week 28 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 1897, Bug 344, Bug 2681, Bug 463, Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    38
<li><p><xref href="GUID-DEA618DF-D462-3B3E-A1E1-F21295AAFE78.dita"><apiname>CRepository</apiname></xref> - Provides access to a repository.</p></li>
80ef3a206772 Week 28 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 1897, Bug 344, Bug 2681, Bug 463, Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    39
<li><p><xref href="GUID-DEA618DF-D462-3B3E-A1E1-F21295AAFE78.dita#GUID-DEA618DF-D462-3B3E-A1E1-F21295AAFE78/GUID-AB3918A5-BA69-3EE8-89B4-51DD8A899AF5"><apiname>CRepository::Get()</apiname></xref></p></li>
80ef3a206772 Week 28 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 1897, Bug 344, Bug 2681, Bug 463, Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    40
<li><p><xref href="GUID-DEA618DF-D462-3B3E-A1E1-F21295AAFE78.dita#GUID-DEA618DF-D462-3B3E-A1E1-F21295AAFE78/GUID-4F005B5F-2664-3F7C-848D-B6F93462F2F4"><apiname>CRepository::Move()</apiname></xref></p></li>
80ef3a206772 Week 28 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 1897, Bug 344, Bug 2681, Bug 463, Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    41
<li><p><xref href="GUID-DEA618DF-D462-3B3E-A1E1-F21295AAFE78.dita#GUID-DEA618DF-D462-3B3E-A1E1-F21295AAFE78/GUID-B8DD1F6F-5A03-30C7-A5B5-51053D9FBDD3"><apiname>CRepository::NewLC()</apiname></xref></p></li>
80ef3a206772 Week 28 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 1897, Bug 344, Bug 2681, Bug 463, Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    42
<li><p><xref href="GUID-DEA618DF-D462-3B3E-A1E1-F21295AAFE78.dita#GUID-DEA618DF-D462-3B3E-A1E1-F21295AAFE78/GUID-BA806B9D-C347-3722-886E-1290A4A0618A"><apiname>CRepository::Reset()</apiname></xref></p></li>
80ef3a206772 Week 28 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 1897, Bug 344, Bug 2681, Bug 463, Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    43
<li><p><xref href="GUID-DEA618DF-D462-3B3E-A1E1-F21295AAFE78.dita#GUID-DEA618DF-D462-3B3E-A1E1-F21295AAFE78/GUID-114079A1-A8CA-3FE7-8FAD-F5E61453FF6B"><apiname>CRepository::Set()</apiname></xref></p></li>
80ef3a206772 Week 28 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 1897, Bug 344, Bug 2681, Bug 463, Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    44
<li><p><xref href="GUID-DEA618DF-D462-3B3E-A1E1-F21295AAFE78.dita#GUID-DEA618DF-D462-3B3E-A1E1-F21295AAFE78/GUID-1F14EB0C-89CF-3A76-A678-5F6F86F50B32"><apiname>CRepository::StartTransaction()</apiname></xref></p></li>
80ef3a206772 Week 28 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 1897, Bug 344, Bug 2681, Bug 463, Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    45
</ul> </section>
80ef3a206772 Week 28 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 1897, Bug 344, Bug 2681, Bug 463, Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    46
<section id="GUID-3B353EAA-5FE4-426B-A0A5-6800CE0BC9E3"><title>Download</title> <p>Click on the following link to download the example: <xref href="guid-6013a680-57f9-415b-8851-c4fa63356636/zips/guid-e78b3d2c-7205-45ca-abe0-163e33a0fcc3.zip" scope="external">CentRepExample.zip</xref></p><p>Click: <xref href="guid-6013a680-57f9-415b-8851-c4fa63356636/guid-e78b3d2c-7205-45ca-abe0-163e33a0fcc3.html" scope="peer">browse</xref> to view the example code.</p> </section>
80ef3a206772 Week 28 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 1897, Bug 344, Bug 2681, Bug 463, Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    47
<section id="GUID-DCCBE8DE-0BBD-5528-A460-E1645116DD4F"><title>Build</title> <p>The Symbian build process describes how to build an application. </p> <p>The <codeph>CentRepExample</codeph> builds an
80ef3a206772 Week 28 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 1897, Bug 344, Bug 2681, Bug 463, Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    48
executable called <filepath>CentRepExample.exe</filepath> in the standard
80ef3a206772 Week 28 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 1897, Bug 344, Bug 2681, Bug 463, Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    49
location (\epoc32\release\winscw\&lt;<i>build_variant</i> &gt; for CodeWarrior).
80ef3a206772 Week 28 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 1897, Bug 344, Bug 2681, Bug 463, Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    50
After launching the executable, depending on the emulator you are
80ef3a206772 Week 28 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 1897, Bug 344, Bug 2681, Bug 463, Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    51
using, you may need to task away from the app launcher/shell screen
80ef3a206772 Week 28 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 1897, Bug 344, Bug 2681, Bug 463, Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    52
to view the console. </p> </section>
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
    53
</conbody></concept>