Symbian3/PDK/Source/GUID-A9EA16CE-2F80-5344-827D-0C2ED5812788.dita
changeset 5 f345bda72bc4
parent 3 46218c8b8afa
child 14 578be2adaf3e
equal deleted inserted replaced
4:4816d766a08a 5:f345bda72bc4
     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-A9EA16CE-2F80-5344-827D-0C2ED5812788"><title>File store type and layout</title><prolog><metadata><keywords/></metadata></prolog><conbody><p>File stores can be given a unique identity, known as the file store type, in order to differentiate them from each other.</p> <p>The file store type is defined as a <codeph>TUidType</codeph> which can be constructed from one, two or three UIDs, i.e. <codeph>TUid</codeph> components.</p> <p>The first UID component identifies the layout of the file store; i.e. it identifies the file store as either a direct file store or a permanent file store. The second and/or the third UID components are application dependent.</p> <p>After creating a new file store, an application must set the type of the file store using the file store's <codeph>SetTypeL()</codeph> member function.</p> <p>As a minimum requirement, the first UID component of the <codeph>TUidType</codeph>, which identifies the layout of the file store, must be specified. This component takes one of the values:</p> <ul><li id="GUID-0BFB4EDE-6C99-586F-BEE4-2F85BF338512"><p><codeph>KPermanentFileStoreLayout</codeph> to identify a permanent file store.</p> </li> <li id="GUID-32FD6BB3-1D1B-5CC4-BC3C-903655E08E86"><p><codeph>KDirectFileStoreLayout</codeph> to identify a direct file store.</p> </li> </ul> <p>The following code fragment is typical:</p> <codeblock id="GUID-DA3A8804-C597-522E-8AB4-2D971F3085CB" xml:space="preserve">...
    12 <concept id="GUID-A9EA16CE-2F80-5344-827D-0C2ED5812788" xml:lang="en"><title>File
       
    13 Store Type and Layout</title><shortdesc>File stores can be given a unique identity, known as the file store
       
    14 type, in order to differentiate them from each other.</shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
       
    15 <p>The file store type is defined as a <codeph>TUidType</codeph> which can
       
    16 be constructed from one, two or three UIDs, i.e. <codeph>TUid</codeph> components.</p>
       
    17 <p>The first UID component identifies the layout of the file store; i.e. it
       
    18 identifies the file store as either a direct file store or a permanent file
       
    19 store. The second and/or the third UID components are application dependent.</p>
       
    20 <p>After creating a new file store, an application must set the type of the
       
    21 file store using the file store's <codeph>SetTypeL()</codeph> member function.</p>
       
    22 <p>As a minimum requirement, the first UID component of the <codeph>TUidType</codeph>,
       
    23 which identifies the layout of the file store, must be specified. This component
       
    24 takes one of the values:</p>
       
    25 <ul>
       
    26 <li id="GUID-0BFB4EDE-6C99-586F-BEE4-2F85BF338512"><p><codeph>KPermanentFileStoreLayout</codeph> to
       
    27 identify a permanent file store.</p> </li>
       
    28 <li id="GUID-32FD6BB3-1D1B-5CC4-BC3C-903655E08E86"><p><codeph>KDirectFileStoreLayout</codeph> to
       
    29 identify a direct file store.</p> </li>
       
    30 </ul>
       
    31 <p>The following code fragment is typical:</p>
       
    32 <codeblock id="GUID-DA3A8804-C597-522E-8AB4-2D971F3085CB" xml:space="preserve">...
    13 CFileStore* store = CDirectFileStore::ReplaceLC(...,...,...);
    33 CFileStore* store = CDirectFileStore::ReplaceLC(...,...,...);
    14 store-&gt;SetTypeL(KDirectFileStoreLayoutUid);
    34 store-&gt;SetTypeL(KDirectFileStoreLayoutUid);
    15 ...</codeblock> <p>If an application needs to explicitly set the second or the third UID component, then the <codeph>TUidType</codeph> object must be constructed explicitly and passed to <codeph>SetTypeL()</codeph>; for example:</p> <codeblock id="GUID-0389703A-8AAD-5716-863C-9121B26097DE" xml:space="preserve"> ...
    35 ...</codeblock>
       
    36 <p>If an application needs to explicitly set the second or the third UID component,
       
    37 then the <codeph>TUidType</codeph> object must be constructed explicitly and
       
    38 passed to <codeph>SetTypeL()</codeph>; for example:</p>
       
    39 <codeblock id="GUID-0389703A-8AAD-5716-863C-9121B26097DE" xml:space="preserve"> ...
    16  CFileStore* store = CDirectFileStore::ReplaceLC(...,...,...);
    40  CFileStore* store = CDirectFileStore::ReplaceLC(...,...,...);
    17  TUidType thetype(KDirectFileStoreLayoutUid,...,...);
    41  TUidType thetype(KDirectFileStoreLayoutUid,...,...);
    18  store-&gt;SetTypeL(thetype);
    42  store-&gt;SetTypeL(thetype);
    19  ...</codeblock> <p>The file store's type can be retrieved by calling the file store’s <codeph>Type(</codeph>) member function.</p> <p>The file store's layout can be retrieved by calling the file store’s <codeph>Layout()</codeph> member function.</p> <section><title>See also</title> <p><xref href="GUID-95DF676F-F9BA-56E0-A4DE-E68B42C06932.dita">UID manipulation</xref> </p> </section> </conbody></concept>
    43  ...</codeblock>
       
    44 <p>The file store's type can be retrieved by calling the file store’s <codeph>Type(</codeph>)
       
    45 member function.</p>
       
    46 <p>The file store's layout can be retrieved by calling the file store’s <codeph>Layout()</codeph> member
       
    47 function.</p>
       
    48 </conbody><related-links>
       
    49 <link href="GUID-95DF676F-F9BA-56E0-A4DE-E68B42C06932.dita"><linktext>UID manipulation</linktext>
       
    50 </link>
       
    51 </related-links></concept>