remotestoragefw/remotefilesystemplugin/inc/rsfwfilesystem.h
branchRCL_3
changeset 15 88ee4cf65e19
parent 12 87c71b25c937
child 16 1aa8c82cb4cb
equal deleted inserted replaced
12:87c71b25c937 15:88ee4cf65e19
     1 /*
       
     2 * Copyright (c) 2003-2006 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Remote File System Plug-in implementation
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CRSFWFILESYSTEM_H
       
    20 #define CRSFWFILESYSTEM_H
       
    21 
       
    22 #include <f32fsys.h>
       
    23 
       
    24 
       
    25 /**
       
    26  *  Classes that a plug-in file system must implement.
       
    27  *
       
    28  *  A plug-in filesystem must implement CFileSystem, which is a factory 
       
    29  *  class for a file system. That class must create objects derived from 
       
    30  *  CMountCB, CFileCB, CDirCB and CFormatCB. These are defined in f32fsys.h
       
    31  *
       
    32  *  @lib eremotefs.fsy
       
    33  *  @since Series 60 3.2
       
    34  */
       
    35 class CRsfwFileSystem : public CFileSystem
       
    36     {
       
    37 public: // Constructors and destructor
       
    38     /**
       
    39      * Static constructor.
       
    40      */
       
    41     static CRsfwFileSystem* New();
       
    42         
       
    43     /**
       
    44      * Constructor.
       
    45      */    
       
    46     CRsfwFileSystem();
       
    47         
       
    48     /**
       
    49      * Destructor.
       
    50      */      
       
    51     ~CRsfwFileSystem();
       
    52         
       
    53 public: // Functions from base class
       
    54     /**
       
    55      * From CFileSystem Installs the file system.
       
    56      * @since Series 60 3.2
       
    57      * @return
       
    58      */
       
    59     TInt Install();   
       
    60         
       
    61     /**
       
    62      * From CFileSystem Creates a new mount control block.
       
    63      * @since Series 60 3.2
       
    64      * @return A pointer to the new mount object.
       
    65      */    
       
    66     CMountCB* NewMountL() const;
       
    67         
       
    68     /**
       
    69      * From CFileSystem Creates a new file control block.
       
    70      * @since Series 60 3.2
       
    71      * @return A pointer to the new file object.
       
    72      */          
       
    73     CFileCB* NewFileL() const;
       
    74         
       
    75     /**
       
    76      * From CFileSystem Creates a new directory control block.
       
    77      * @since Series 60 3.2
       
    78      * @return A pointer to the new directory object.
       
    79      */            
       
    80     CDirCB* NewDirL() const;
       
    81         
       
    82     /**
       
    83      * From CFileSystem Creates a new volume format control block.
       
    84      * @since Series 60 3.2
       
    85      * @return  A pointer to the new volume format object.
       
    86      */        
       
    87     CFormatCB* NewFormatL() const;
       
    88         
       
    89     /**
       
    90      * From CFileSystem Retrieves drive information.
       
    91      * @since Series 60 3.2
       
    92      * @param anInfo       On return, contains the drive information.
       
    93      * @param aDriveNumber The drive number.
       
    94      * @return  
       
    95      */        
       
    96     void DriveInfo(TDriveInfo& anInfo,TInt aDriveNumber) const;
       
    97           
       
    98     /**
       
    99      * From CFileSystem Returns the default path for the file system. 
       
   100      * @since Series 60 3.2
       
   101      * @param aPath  On return, contains the default path.
       
   102      * @return KErrNone or an appropriate error code when the default path
       
   103      *         cannot be supplied.
       
   104      */              
       
   105     TInt DefaultPath(TDes& aPath) const;
       
   106 
       
   107 
       
   108     /**
       
   109      * From CFileSystem Does clean up before the filesystem is destroyed.
       
   110      * @since Series 60 3.2
       
   111      * @return  An error code.
       
   112      */        
       
   113     TInt Remove();
       
   114         
       
   115 private:
       
   116     /**
       
   117      * Creates a new mount control block.
       
   118      * @since Series 60 3.2
       
   119      * @return A pointer to the new mount object.
       
   120      */  
       
   121     CMountCB* NewRemoteFsMountL();
       
   122 
       
   123 public:   // Data       
       
   124     // unique id of the file system 
       
   125     TUint iUniqueID; 
       
   126 
       
   127     };
       
   128 
       
   129 #endif // CRSFWFILESYSTEM_H
       
   130 
       
   131