os/kernelhwsrv/userlibandfileserver/fileserver/sfat/sl_disk.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/kernelhwsrv/userlibandfileserver/fileserver/sfat/sl_disk.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,123 @@
     1.4 +// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of the License "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +// f32\sfat\inc\sl_disk.h
    1.18 +// 
    1.19 +//
    1.20 +
    1.21 +/**
    1.22 + @file
    1.23 + @internalTechnology
    1.24 +*/
    1.25 +
    1.26 +//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    1.27 +//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    1.28 +//!!
    1.29 +//!! WARNING!! DO NOT edit this file !! '\sfat' component is obsolete and is not being used. '\sfat32'replaces it
    1.30 +//!!
    1.31 +//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    1.32 +//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    1.33 +
    1.34 +
    1.35 +#if !defined(__SL_DISK_H__)
    1.36 +#define __SL_DISK_H__
    1.37 +
    1.38 +#include "sl_std.h"
    1.39 +
    1.40 +//---------------------------------------------------------------------------------------------------------------------------------
    1.41 +
    1.42 +class MWTCacheInterface;
    1.43 +
    1.44 +
    1.45 +class CAtaDisk : public CRawDisk
    1.46 +    {
    1.47 +public:
    1.48 +    static CAtaDisk* NewL(CFatMountCB& aFatMount);
    1.49 +    
    1.50 +     CAtaDisk(CFatMountCB& aFatMount);
    1.51 +    ~CAtaDisk();
    1.52 +
    1.53 +    void ConstructL();  
    1.54 +    void InitializeL();
    1.55 +
    1.56 +public:
    1.57 +    void ReadCachedL(TInt64 aPos,TInt aLength,TDes8& aDes) const; 
    1.58 +    void WriteCachedL(TInt64 aPos,const TDesC8& aDes);
    1.59 +
    1.60 +    void InvalidateUidCache();
    1.61 +    virtual void InvalidateUidCachePage(TUint64 aPos);
    1.62 +
    1.63 +    
    1.64 +    void ReadL(TInt64 aPos,TInt aLength,const TAny* aTrg,const RMessagePtr2 &aMessage,TInt anOffset) const;
    1.65 +    void WriteL(TInt64 aPos,TInt aLength,const TAny* aSrc,const RMessagePtr2 &aMessage,TInt anOffset);
    1.66 +    virtual TInt GetLastErrorInfo(TDes8& aErrorInfo) const;
    1.67 +
    1.68 +    MWTCacheInterface* DirCacheInterface();
    1.69 +
    1.70 +    
    1.71 +
    1.72 +
    1.73 +private:
    1.74 +
    1.75 +    TFatDriveInterface& iDrive;     ///< Driver's interface to access the media
    1.76 +    MWTCacheInterface*  ipDirCache; ///< pointer to the FAT Directory cache object
    1.77 +    MWTCacheInterface*  iUidCache;  ///< pointer to the UID cache object
    1.78 +
    1.79 +    };
    1.80 +
    1.81 +
    1.82 +//---------------------------------------------------------------------------------------------------------------------------------
    1.83 +
    1.84 +class CRamDisk : public CRawDisk
    1.85 +    {
    1.86 +public:
    1.87 +    
    1.88 +    static CRamDisk* NewL(CFatMountCB& aFatMount);
    1.89 +    CRamDisk(CFatMountCB& aFatMount);
    1.90 +
    1.91 +    void InitializeL();
    1.92 +public:
    1.93 +    void ReadCachedL(TInt64 aPos,TInt aLength,TDes8& aDes) const;
    1.94 +    void WriteCachedL(TInt64 aPos,const TDesC8& aDes);
    1.95 +    void ReadL(TInt64 aPos,TInt aLength,const TAny* aTrg,const RMessagePtr2 &aMessage,TInt anOffset) const;
    1.96 +    void WriteL(TInt64 aPos,TInt aLength,const TAny* aSrc,const RMessagePtr2 &aMessage,TInt anOffset);
    1.97 +
    1.98 +    
    1.99 +
   1.100 +private:
   1.101 +    inline TUint8 *RamDiskBase() const;
   1.102 +
   1.103 +private:
   1.104 +    TUint8* iRamDiskBase; ///< pointer to the beginning of the RAM disk memory area
   1.105 +    };
   1.106 +
   1.107 +
   1.108 +//---------------------------------------------------------------------------------------------------------------------------------
   1.109 +
   1.110 +#include "sl_disk.inl"
   1.111 +
   1.112 +#endif //__SL_DISK_H__
   1.113 +
   1.114 +
   1.115 +
   1.116 +
   1.117 +
   1.118 +
   1.119 +
   1.120 +
   1.121 +
   1.122 +
   1.123 +
   1.124 +
   1.125 +
   1.126 +