remotestoragefw/remotefilesystemplugin/inc/rsfwfsdircb.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 CRSFWFSDIRCB_H
       
    20 #define CRSFWFSDIRCB_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include <f32fsys.h>
       
    24 #include <s32file.h>
       
    25 //#include "rsfwsession.h"
       
    26 #include "rsfwinterface.h"
       
    27 
       
    28 // CONSTANTS
       
    29 
       
    30 // DATA TYPES
       
    31 
       
    32 // FORWARD DECLARATIONS
       
    33 
       
    34 // CLASS DECLARATIONS
       
    35 
       
    36 /**
       
    37  *  Classes that a plug-in file system must implement. A plug-in 
       
    38  *  filesystem must implement CFileSystem, which is a factory class for 
       
    39  *  a file system. That class must create objects derived from CMountCB, 
       
    40  *  CFileCB, CDirCB and CFormatCB. These are defined in f32fsys.h
       
    41  *
       
    42  *  @lib eremotefs.fsy
       
    43  *  @since Series 60 3.2
       
    44  */
       
    45 class CRsfwFsDirCB : public CDirCB
       
    46     {
       
    47 public:   // Constructors and destructor
       
    48     
       
    49     /**
       
    50      * Static constructor.
       
    51      */      
       
    52     static CRsfwFsDirCB* NewL();
       
    53         
       
    54     /**
       
    55      * Destructor.
       
    56      */
       
    57     ~CRsfwFsDirCB();
       
    58     
       
    59 public:   // New functions
       
    60     
       
    61     /**
       
    62      * Prepares the class to read directory entries from a local cache container file
       
    63      * @since Series 60 3.2
       
    64      * @param aPath path of the directory container in the local cache
       
    65      * @param aName the entries to be read from the directory, for example, "*"
       
    66      * @return 
       
    67      */
       
    68     void SetDirL( const TDesC& aPath, 
       
    69                   const TDesC& aName );
       
    70     
       
    71 public:   // Functions from base classes
       
    72     
       
    73     /**
       
    74      * From CDirCB Gets information from the first suitable entry in the directory,
       
    75      *             starting from the current read position.
       
    76      * @since Series 60 3.2
       
    77      * @param anEntry Entry information object.
       
    78      * @return 
       
    79      */
       
    80     void ReadL( TEntry& anEntry );
       
    81         
       
    82 private:
       
    83     
       
    84     /**
       
    85      * C++ default constructor.
       
    86      */
       
    87     CRsfwFsDirCB();
       
    88         
       
    89 public:     // Data
       
    90 
       
    91     // the Fid of this dir 
       
    92     TFid iThisFid; 
       
    93 
       
    94 private:    // Data
       
    95     
       
    96     // stream attached to the local cache container file
       
    97     RFileReadStream iDirContReadStream;
       
    98         
       
    99     // the entries to be read from the directory, for example, "*"
       
   100     HBufC* iMatch;
       
   101         
       
   102     // whether the cache container includes the contents the directory
       
   103     TBool iHasBeenFetched;
       
   104         
       
   105     // which entry position to read next
       
   106     TInt iEntryPos;   
       
   107           
       
   108     // at which stream position to read next
       
   109     TStreamPos iStreamPos;   
       
   110         
       
   111     // where to read if we must re-read the last entry to be read
       
   112     TStreamPos iPendingPos;
       
   113         
       
   114     }; 
       
   115 
       
   116 #endif // CRSFWFSDIRCB_H
       
   117 
       
   118 // End of File
       
   119