0
|
1 |
/*
|
|
2 |
* Copyright (c) 2005-2009 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 the License "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:
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
/**
|
|
19 |
@test
|
|
20 |
@internalComponent
|
|
21 |
|
|
22 |
This contains CTestFileSystem
|
|
23 |
*/
|
|
24 |
|
|
25 |
#if (!defined __T_TEST_FSY_H__)
|
|
26 |
#define __T_TEST_FSY_H__
|
|
27 |
|
|
28 |
// EPOC includes
|
|
29 |
#include <f32fsys.h>
|
|
30 |
|
|
31 |
class CTestMountCB : public CMountCB
|
|
32 |
{
|
|
33 |
public:
|
|
34 |
CTestMountCB() {}
|
|
35 |
~CTestMountCB() {}
|
|
36 |
virtual void MountL(TBool /*aForceMount*/) {}
|
|
37 |
virtual TInt ReMount() { return KErrNone; }
|
|
38 |
virtual void Dismounted() {}
|
|
39 |
virtual void VolumeL(TVolumeInfo& /*aVolume*/) const {}
|
|
40 |
virtual void SetVolumeL(TDes& /*aName*/) {}
|
|
41 |
virtual void MkDirL(const TDesC& /*aName*/) {}
|
|
42 |
virtual void RmDirL(const TDesC& /*aName*/) {}
|
|
43 |
virtual void DeleteL(const TDesC& /*aName*/) {}
|
|
44 |
virtual void RenameL(const TDesC& /*anOldName*/,const TDesC& /*anNewName*/) {}
|
|
45 |
virtual void ReplaceL(const TDesC& /*anOldName*/,const TDesC& /*anNewName*/) {}
|
|
46 |
virtual void EntryL(const TDesC& /*aName*/,TEntry& /*anEntry*/) const {}
|
|
47 |
virtual void SetEntryL(const TDesC& /*aName*/,const TTime& /*aTime*/,TUint /*aSetAttMask*/,TUint /*aClearAttMask*/) {}
|
|
48 |
virtual void FileOpenL(const TDesC& /*aName*/,TUint /*aMode*/,TFileOpen /*anOpen*/,CFileCB* /*aFile*/) {}
|
|
49 |
virtual void DirOpenL(const TDesC& /*aName*/,CDirCB* /*aDir*/) {}
|
|
50 |
virtual void RawReadL(TInt64 /*aPos*/,TInt /*aLength*/,const TAny* /*aTrg*/,TInt /*anOffset*/,const RMessagePtr2& /*aMessage*/) const {}
|
|
51 |
virtual void RawWriteL(TInt64 /*aPos*/,TInt /*aLength*/,const TAny* /*aSrc*/,TInt /*anOffset*/,const RMessagePtr2& /*aMessage*/) {}
|
|
52 |
virtual void ReadUidL(const TDesC& /*aName*/,TEntry& /*anEntry*/) const {}
|
|
53 |
virtual void GetShortNameL(const TDesC& /*aLongName*/,TDes& /*aShortName*/) {}
|
|
54 |
virtual void GetLongNameL(const TDesC& /*aShortName*/,TDes& /*aLongName*/) {}
|
|
55 |
virtual void IsFileInRom(const TDesC& /*aFileName*/,TUint8*& /*aFileStart*/) {}
|
|
56 |
virtual void ReadSectionL(const TDesC& /*aName*/,TInt /*aPos*/,TAny* /*aTrg*/,TInt /*aLength*/,const RMessagePtr2& /*aMessage*/) {}
|
|
57 |
};
|
|
58 |
|
|
59 |
class CTestFileCB : public CFileCB
|
|
60 |
{
|
|
61 |
public:
|
|
62 |
CTestFileCB() {}
|
|
63 |
~CTestFileCB() {}
|
|
64 |
virtual void RenameL(const TDesC& /*aNewName*/) {}
|
|
65 |
virtual void ReadL(TInt /*aPos*/,TInt& /*aLength*/,const TAny* /*aDes*/,const RMessagePtr2& /*aMessage*/) {}
|
|
66 |
virtual void WriteL(TInt /*aPos*/,TInt& /*aLength*/,const TAny* /*aDes*/,const RMessagePtr2& /*aMessage*/) {}
|
|
67 |
virtual TInt Address(TInt& /*aPos*/) const {return 0;}
|
|
68 |
virtual void SetSizeL(TInt /*aSize*/) {}
|
|
69 |
virtual void SetEntryL(const TTime& /*aTime*/,TUint /*aSetAttMask*/,TUint /*aClearAttMask*/) {}
|
|
70 |
virtual void FlushDataL() {}
|
|
71 |
virtual void FlushAllL() {}
|
|
72 |
virtual void CheckPos(TInt /*aPos*/) {}
|
|
73 |
};
|
|
74 |
|
|
75 |
class CTestDirCB : public CDirCB
|
|
76 |
{
|
|
77 |
public:
|
|
78 |
CTestDirCB() {}
|
|
79 |
~CTestDirCB() {}
|
|
80 |
virtual void ReadL(TEntry& /*anEntry*/) {}
|
|
81 |
};
|
|
82 |
|
|
83 |
class CTestFormatCB : public CFormatCB
|
|
84 |
{
|
|
85 |
public:
|
|
86 |
CTestFormatCB() {}
|
|
87 |
~CTestFormatCB() {}
|
|
88 |
virtual void DoFormatStepL() {}
|
|
89 |
};
|
|
90 |
|
|
91 |
class CTestFileSystem : public CFileSystem
|
|
92 |
{
|
|
93 |
public:
|
|
94 |
TInt DefaultPath(TDes& aPath) const;
|
|
95 |
void DriveInfo(TDriveInfo& anInfo, TInt aDriveNumber) const;
|
|
96 |
TBusLocalDrive& DriveNumberToLocalDrive(TInt aDriveNumber) const;
|
|
97 |
CMountCB* NewMountL() const;
|
|
98 |
CFileCB* NewFileL() const;
|
|
99 |
CDirCB* NewDirL() const;
|
|
100 |
CFormatCB* NewFormatL() const;
|
|
101 |
|
|
102 |
protected:
|
|
103 |
CTestFileSystem();
|
|
104 |
};
|
|
105 |
|
|
106 |
#endif /* __T_TEST_FSY_H__ */
|