Symbian3/SDK/Source/GUID-33241691-7362-5FA1-A3B0-C3FA550E5E09.dita
changeset 7 51a74ef9ed63
child 8 ae94777fff8f
equal deleted inserted replaced
6:43e37759235e 7:51a74ef9ed63
       
     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-33241691-7362-5FA1-A3B0-C3FA550E5E09" xml:lang="en"><title>Store
       
    13 Overview</title><shortdesc>Provides structured data storage, using networks of streams. </shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
       
    14 <section id="GUID-D38A0EFA-4D87-406B-AD87-CF79E61F2A08"><title>Purpose</title> <p>It
       
    15 is often necessary to persist a data structure such as an object by writing
       
    16 it to memory as a sequence of bytes called a stream. A complex object is persisted
       
    17 as multiple streams collectively known as a store. The Store component provides
       
    18 access to stores in Symbian platform. </p> </section>
       
    19 <section id="GUID-6E2C9766-E106-4A63-81CC-453B64C51DCC"><title>Required background</title> <p>The
       
    20 Store component requires no specific background apart from C++ and Symbian
       
    21 platform. </p> </section>
       
    22 <section id="GUID-597F91DD-2AA3-443C-BC98-C1E8A74BF505"><title>Key concepts
       
    23 and terms</title> <p>The API has the following key concepts. </p> <dl>
       
    24 <dlentry>
       
    25 <dt>stream store</dt>
       
    26 <dd><p>a store consisting of streams, implemented by <xref href="GUID-30726D8E-E18D-3A3A-8EFB-CCA4F04C984D.dita"><apiname>CStreamStore</apiname></xref>  </p> </dd>
       
    27 </dlentry>
       
    28 <dlentry>
       
    29 <dt>persistent store</dt>
       
    30 <dd><p>a store which persists beyond the lifetime of the application which
       
    31 creates it, implemented by <xref href="GUID-21637329-EC49-39AD-8986-A22289D8CFE8.dita"><apiname>CPersistentStore</apiname></xref>  </p> </dd>
       
    32 </dlentry>
       
    33 <dlentry>
       
    34 <dt>embedded store</dt>
       
    35 <dd><p>a store which can itself be stored as a stream in another store, implemented
       
    36 by <xref href="GUID-F2EC3A9D-5F4B-3C98-98DC-44394C54B6DE.dita"><apiname>CEmbeddedStore</apiname></xref>  </p> </dd>
       
    37 </dlentry>
       
    38 <dlentry>
       
    39 <dt>memory store</dt>
       
    40 <dd><p>a store which resides in memory and exists only for the life of the
       
    41 store object, implemented by <xref href="GUID-5EC5199D-50F2-3BFA-BA45-4C5C017281DD.dita"><apiname>CBufStore</apiname></xref>  </p> </dd>
       
    42 </dlentry>
       
    43 <dlentry>
       
    44 <dt>dictionary store base and streams</dt>
       
    45 <dd><p>a sequence of streams accessed by a UID, implemented by <xref href="GUID-9899DA2C-DB1B-3D67-8719-B7E13658B4D7.dita"><apiname>CDictionaryStore</apiname></xref>  </p> </dd>
       
    46 </dlentry>
       
    47 </dl> </section>
       
    48 <section id="GUID-8B3C967B-ED78-4756-8162-80EB1261433C"><title>Architecture</title> <p>A
       
    49 stream is a representation of a data structure (such as an object) as a sequence
       
    50 of bytes. Structures as complex as most applications require multiple streams
       
    51 to store their state. This is termed a store. Stream types that work with
       
    52 stores are provided by the <xref href="GUID-66ACFC54-5671-5B72-9DBC-A76F7A112D63.dita">Store
       
    53 Streams</xref> API. </p> <p>The Stores API defines both base classes that
       
    54 define store abstractions without specifying the storage medium, and some
       
    55 concrete store types. </p> <p>The abstract classes are used as the base classes
       
    56 of separate APIs which use particular storage media. In particular the <xref href="GUID-21CF1D5F-44C5-5407-B3C9-8BC103C97079.dita">File Stores</xref> API defines
       
    57 further concrete stores which use file storage. Its base class, <xref href="GUID-9CBA8AB1-5BFC-3719-82AF-22A9BD93C306.dita"><apiname>CFileStore</apiname></xref> extends <xref href="GUID-21637329-EC49-39AD-8986-A22289D8CFE8.dita"><apiname>CPersistentStore</apiname></xref> and
       
    58 has its own subclasses such as <xref href="GUID-8B713854-7858-3E02-8A1C-B3E6C1C9EA85.dita"><apiname>CDirectFileStore</apiname></xref>. Concrete
       
    59 store types do not have to provide all the stream manipulation functionality
       
    60 defined by the base class interfaces: for example, direct file stores do not
       
    61 support individual deletion of streams within a store. </p> <p>Dictionary
       
    62 stores are accessed by a UID whereas stream stores are accessed by a stream
       
    63 ID. Persistent stores persist beyond the lifetime of the application that
       
    64 created them: they have a root stream from which the other streams in the
       
    65 store can be found. Embedded stores can be stored as streams in other stores:
       
    66 once written they cannot be modified. </p> <p>Stores are integrated with the
       
    67 application architecture as defined in the Uikon Core API. That expects file-based
       
    68 and embedded applications to handle their data storage through stores. </p> <p>Stores
       
    69 are also the basis of the relational database provided by <xref href="GUID-13C95985-D16F-5A9E-A7F8-CAB637C4C6ED.dita">DBMS</xref>. </p> <fig id="GUID-39DD7576-D335-5CD2-92A6-E0B81EF2160A">
       
    70 <title>Store inheritance diagram</title>
       
    71 <image href="GUID-09A58B23-68EA-58D7-BBC9-E7F4C4BF55D7_d0e360224_href.png" placement="inline"/>
       
    72 </fig> </section>
       
    73 <section id="GUID-CBBE7C0F-6999-4FCE-9793-C71B61130C75"><title>APIs</title> <table id="GUID-6D27BADC-7CA7-5E39-8308-29CAA1858CAB">
       
    74 <tgroup cols="2"><colspec colname="col0"/><colspec colname="col1"/>
       
    75 <thead>
       
    76 <row>
       
    77 <entry>API</entry>
       
    78 <entry>Description</entry>
       
    79 </row>
       
    80 </thead>
       
    81 <tbody>
       
    82 <row>
       
    83 <entry><p> <xref href="GUID-30726D8E-E18D-3A3A-8EFB-CCA4F04C984D.dita"><apiname>CStreamStore</apiname></xref>  </p> </entry>
       
    84 <entry><p>Provides the core abstract framework for stores allowing streams
       
    85 to be created and manipulated </p> </entry>
       
    86 </row>
       
    87 <row>
       
    88 <entry><p> <xref href="GUID-21637329-EC49-39AD-8986-A22289D8CFE8.dita"><apiname>CPersistentStore</apiname></xref>  </p> </entry>
       
    89 <entry><p>Persistent store abstract base class </p> </entry>
       
    90 </row>
       
    91 <row>
       
    92 <entry><p> <xref href="GUID-F2EC3A9D-5F4B-3C98-98DC-44394C54B6DE.dita"><apiname>CEmbeddedStore</apiname></xref>  </p> </entry>
       
    93 <entry><p>Encapsulates an embedded store </p> </entry>
       
    94 </row>
       
    95 <row>
       
    96 <entry><p> <xref href="GUID-5EC5199D-50F2-3BFA-BA45-4C5C017281DD.dita"><apiname>CBufStore</apiname></xref>  </p> </entry>
       
    97 <entry><p>In-memory non-persistent store </p> </entry>
       
    98 </row>
       
    99 <row>
       
   100 <entry><p> <xref href="GUID-9899DA2C-DB1B-3D67-8719-B7E13658B4D7.dita"><apiname>CDictionaryStore</apiname></xref>  </p> </entry>
       
   101 <entry><p>Dictionary store interface </p> </entry>
       
   102 </row>
       
   103 <row>
       
   104 <entry><p> <xref href="GUID-4FA6EE6C-5B4E-39E0-B888-ABDE19985976.dita"><apiname>RStoreReadStream</apiname></xref>  </p> </entry>
       
   105 <entry><p>Supports the opening and manipulation of an existing stream in a
       
   106 store </p> </entry>
       
   107 </row>
       
   108 <row>
       
   109 <entry><p> <xref href="GUID-346D4908-15C7-3F15-945F-D561E774022D.dita"><apiname>RStoreWriteStream</apiname></xref>  </p> </entry>
       
   110 <entry><p>Supports the writing of a stream to a store </p> </entry>
       
   111 </row>
       
   112 <row>
       
   113 <entry><p> <xref href="GUID-418E7956-BE91-39A2-A26D-F1CA88B458AA.dita"><apiname>RFileBuf</apiname></xref>  </p> </entry>
       
   114 <entry><p>A stream buffer hosted by a file </p> </entry>
       
   115 </row>
       
   116 </tbody>
       
   117 </tgroup>
       
   118 </table> </section>
       
   119 <section id="GUID-4B0C731E-F9CB-4406-8DD4-C8C325B08257"><title>Typical uses</title> <p>A
       
   120 typical use of stores is to write files to memory without using the file server.
       
   121 This is a good thing to do when an application uses embedded documents. </p> </section>
       
   122 </conbody><related-links>
       
   123 <link href="GUID-F4875493-6501-56FC-90E5-5EEAA89A72C3.dita"><linktext>Persistent
       
   124 Storage Overview</linktext></link>
       
   125 <link href="GUID-21CF1D5F-44C5-5407-B3C9-8BC103C97079.dita"><linktext>File Stores
       
   126 Overview</linktext></link>
       
   127 <link href="GUID-66ACFC54-5671-5B72-9DBC-A76F7A112D63.dita"><linktext>Store Streams
       
   128                 Overview</linktext></link>
       
   129 <link href="GUID-744ACF2C-963B-5E2F-A6B3-220AB899FD23.dita"><linktext>Streaming
       
   130 Overview</linktext></link>
       
   131 </related-links></concept>