0
|
1 |
// Copyright (c) 2004-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".
|
|
7 |
//
|
|
8 |
// Initial Contributors:
|
|
9 |
// Nokia Corporation - initial contribution.
|
|
10 |
//
|
|
11 |
// Contributors:
|
|
12 |
//
|
|
13 |
// Description:
|
|
14 |
// Class declaration for CMassStorageMountCB.
|
|
15 |
//
|
|
16 |
//
|
|
17 |
|
|
18 |
/**
|
|
19 |
@file
|
|
20 |
@internalTechnology
|
|
21 |
*/
|
|
22 |
|
|
23 |
#ifndef __CMASSSTORAGEMOUNTCB_H__
|
|
24 |
#define __CMASSSTORAGEMOUNTCB_H__
|
|
25 |
|
|
26 |
|
|
27 |
/**
|
|
28 |
Mass Storage Mount.
|
|
29 |
Only the MountL, Dismounted and Unlock methods are supported. All other methods
|
|
30 |
leave with KErrNotReady.
|
|
31 |
ControlIO is also supported for debug builds and returns KErrNotSupported for Release builds.
|
|
32 |
@internalTechnology
|
|
33 |
*/
|
|
34 |
class CMassStorageMountCB : public CLocDrvMountCB
|
|
35 |
{
|
|
36 |
public:
|
|
37 |
static CMassStorageMountCB* NewL(const RArray<TInt>& aDriveMapping);
|
|
38 |
void MountL(TBool aForceMount);
|
|
39 |
TInt ReMount();
|
|
40 |
void Dismounted();
|
|
41 |
void VolumeL(TVolumeInfo& aVolume) const;
|
|
42 |
void SetVolumeL(TDes& aName);
|
|
43 |
void MkDirL(const TDesC& aName);
|
|
44 |
void RmDirL(const TDesC& aName);
|
|
45 |
void DeleteL(const TDesC& aName);
|
|
46 |
void RenameL(const TDesC& anOldName,const TDesC& anNewName);
|
|
47 |
void ReplaceL(const TDesC& anOldName,const TDesC& anNewName);
|
|
48 |
void EntryL(const TDesC& aName,TEntry& anEntry) const;
|
|
49 |
void SetEntryL(const TDesC& aName,const TTime& aTime,TUint aSetAttMask,TUint aClearAttMask);
|
|
50 |
void FileOpenL(const TDesC& aName,TUint aMode,TFileOpen anOpen,CFileCB* aFile);
|
|
51 |
void DirOpenL(const TDesC& aName,CDirCB* aDir);
|
|
52 |
void RawReadL(TInt64 aPos, TInt aLength, const TAny* aTrg, TInt anOffset, const RMessagePtr2& aMessage) const;
|
|
53 |
void RawWriteL(TInt64 aPos, TInt aLength, const TAny* aTrg, TInt anOffset, const RMessagePtr2& aMessage);
|
|
54 |
void ReadSectionL(const TDesC& aName, TInt aPos, TAny* aTrg, TInt aLength, const RMessagePtr2& aMessage);
|
|
55 |
void GetShortNameL(const TDesC& aLongName,TDes& aShortName);
|
|
56 |
void GetLongNameL(const TDesC& aShorName,TDes& aLongName);
|
|
57 |
TInt ControlIO(const RMessagePtr2& aMessage,TInt aCommand,TAny* aParam1,TAny* aParam2);
|
|
58 |
TInt Unlock(TMediaPassword& aPassword, TBool aStore);
|
|
59 |
|
|
60 |
private:
|
|
61 |
CMassStorageMountCB(const RArray<TInt>& aDriveMapping);
|
|
62 |
void WritePasswordData();
|
|
63 |
TInt DriveNumberToLun(TInt aDriveNumber);
|
|
64 |
TInt CheckDriveNumberL();
|
|
65 |
|
|
66 |
private:
|
|
67 |
const RArray<TInt>& iDriveMapping;
|
|
68 |
};
|
|
69 |
|
|
70 |
|
|
71 |
#endif //__CMASSSTORAGEMOUNTCB_H__
|