Symbian3/PDK/Source/GUID-983F0ABD-470C-51C3-B6AE-1B1AA55AB4A2.dita
changeset 1 25a17d01db0c
child 3 46218c8b8afa
equal deleted inserted replaced
0:89d6a7a84779 1:25a17d01db0c
       
     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-983F0ABD-470C-51C3-B6AE-1B1AA55AB4A2" xml:lang="en"><title>File
       
    13 Server Extensions</title><shortdesc>This document provides an overview of the file server extension
       
    14 architecture, and of the APIs that allows file server extensions to be developed
       
    15 and used. </shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
       
    16 <p>A file server extension is a library that allows the functionality of a
       
    17 file server logical drive and its corresponding file system to be extended
       
    18 or modified. </p>
       
    19 <p>The Symbian platform uses a file server extension to implement its Flash
       
    20 Transition Layer (FTL) that allows a FAT file system to run on a NAND flash
       
    21 device. Because this layer is not needed when using FAT on a RAM disk or a
       
    22 MultiMediaCard, it is not necessary to add this functionality to the FAT file
       
    23 system itself. So the FTL is implemented as a file server extension and is
       
    24 only used on NAND local drives. </p>
       
    25 <p>The file server uses libraries called file systems, which implement support
       
    26 for particular file system formats, such as FAT and LFFS. These file system
       
    27 libraries in turn make calls to the media sub-system, which provides device
       
    28 drivers that handles interaction with the actual storage hardware. </p>
       
    29 <p>A file server extension is an additional layer that intercepts all calls
       
    30 from a file system to the media sub-system, as shown below: </p>
       
    31 <fig id="GUID-5034F500-1CC7-5A8A-B1C0-DB99FAF8FE93">
       
    32 <title>           File server extension architecture          </title>
       
    33 <image href="GUID-E36B0B87-7948-5288-9F4D-9A1F1EBDF972_d0e357270_href.png" placement="inline"/>
       
    34 </fig>
       
    35 <p>All calls to the media sub-system from a mounted file system go through
       
    36 a "proxy" drive interface provided by the loaded extension (or extensions),
       
    37 before the call is passed on to the media sub-system interface. </p>
       
    38 <p>An extension has the same lifetime as its corresponding file system object.
       
    39 This is usually a <xref href="GUID-FADDE053-CC1C-39BC-A52D-27093041BE20.dita"><apiname>CMountCB</apiname></xref> object but can also be a subsession
       
    40 object (for example <xref href="GUID-63DF657C-434D-353D-A536-8AF9D97C8260.dita"><apiname>CFileCB</apiname></xref>). On removable drives, if a
       
    41 mount with an extension is destroyed when the media is removed, then when
       
    42 the same media is reinserted, the mount object and extension should be created
       
    43 at the same time. </p>
       
    44 <p>Extensions can be referred to as being <i>primary</i> or <i>secondary</i>: </p>
       
    45 <ul>
       
    46 <li id="GUID-58C4DAEE-22E3-506E-81C2-4D5C9B69C7F8"><p>An extension is called
       
    47 primary if it is required for the file system to be used. Such extensions
       
    48 must be mounted before or at the same time as a file system is mounted on
       
    49 a drive. This can be done by modifying the initial mounting of the local file
       
    50 system in the <xref href="GUID-80698E62-E310-59CA-A524-5CF44C437BE4.dita">Base
       
    51 Starter</xref> component. The file system mounted on the drive must be dismounted
       
    52 before a primary extension can be dismounted. </p> <p>Only one primary extension
       
    53 is permitted to be mounted on a drive at a time. </p> </li>
       
    54 <li id="GUID-DB65DE20-5F80-5FC6-A847-EAE74F544A8C"><p>Secondary extensions
       
    55 can be added after a file system is mounted. The maximum number of extensions
       
    56 allowed is two. </p> <p>When two extensions are loaded, calls are passed through
       
    57 both extensions in turn. This is referred to as <i>chaining</i>. The order
       
    58 of chaining is determined by the order that extensions are mounted on the
       
    59 drive. The extension mounted first is closest to the media sub-system interface.
       
    60 Therefore the primary extension is always closest to the media sub-system
       
    61 interface. </p> </li>
       
    62 </ul>
       
    63 </conbody></concept>