Update contrib.
1 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of the License "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // f32test\fsstress\t_remfsy.cpp
25 #define WIN32_LEAN_AND_MEAN
26 #pragma warning( disable : 4201 ) // nonstandard extension used : nameless struct/union
28 #pragma warning( default : 4201 ) // nonstandard extension used : nameless struct/union
39 const TInt KMajorVersionNumber=1;
40 const TInt KMinorVersionNumber=0;
42 //const TInt KKiloBytes=0x400;
43 //const TBuf<4> KUidName=_L(":UID");
44 //const TInt KUidNameLength=4;
46 //LOCAL_D TBuf8<0x1000> buf;
47 //LOCAL_D RConsole theConsole;
50 //////////////////////////////////////////////////////////////////////////
52 //////////////////////////////////////////////////////////////////////////
60 __DECLARE_NAME(_S("CRemote"));
65 TInt CRemote::Install()
67 // Install the file system.
71 // SetErrorMode(SEM_FAILCRITICALERRORS);
72 RDebug::Print(_L("BASH in CRemote::Install"));
73 iVersion=TVersion(KMajorVersionNumber,KMinorVersionNumber,KF32BuildVersionNumber);
74 TPtrC name=_L("T_REMFSY");
75 return(SetName(&name));
79 //???JCS: Removed all aSession parameters to get the code to compile
83 CMountCB* CRemote::NewMountL(/*CSessionFs* aSession*/) const
85 // Create a new mount control block.
89 return(new(ELeave) CRemoteMountCB);
92 CFileCB* CRemote::NewFileL(/*CSessionFs* aSession*/) const
98 return(new(ELeave) CRemoteFileCB);
101 CDirCB* CRemote::NewDirL(/*CSessionFs* aSession*/) const
103 // Create a new directory lister.
107 return(new(ELeave) CRemoteDirCB(/*aSession*/));
110 CFormatCB* CRemote::NewFormatL(/*CSessionFs* aSession*/) const
112 // Create a new media formatter.
116 return(new(ELeave) CRemoteFormatCB(/*aSession*/));
119 TInt CRemote::DefaultPath(TDes& aPath) const
121 // Return the initial default path.
130 CFileSystem* CRemote::NewL()
135 CFileSystem* remoteFsy=new(ELeave) CRemote();
140 void CRemote::DriveInfo(TDriveInfo& anInfo,TInt aDriveNumber) const
142 // Return the drive info, iDriveAtt already set
147 d.Format(_L("%c:\\"),aDriveNumber+'A');
148 if (MapDriveInfo(anInfo,aDriveNumber))
150 if (MapDriveAttributes(anInfo.iDriveAtt,aDriveNumber))
156 // UINT r=GetDriveType((_STRC)d.PtrZ());
162 case DRIVE_REMOVABLE:
163 anInfo.iMediaAtt|=KMediaAttDualDensity;
166 case DRIVE_NO_ROOT_DIR: t=EMediaNotPresent; break;
167 case DRIVE_FIXED: t=EMediaHardDisk; break;
168 case DRIVE_REMOTE: t=EMediaRemote; break;
169 case DRIVE_CDROM: t=EMediaCdRom; break;
170 case DRIVE_RAMDISK: t=EMediaRam; break;
183 EXPORT_C CFileSystem* CreateFileSystem()
185 // Create a new file system
188 return(CRemote::NewL());
189 // return(new CRemote);