williamr@2: // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). williamr@2: // All rights reserved. williamr@2: // This component and the accompanying materials are made available williamr@4: // under the terms of "Eclipse Public License v1.0" williamr@2: // which accompanies this distribution, and is available williamr@4: // at the URL "http://www.eclipse.org/legal/epl-v10.html". williamr@2: // williamr@2: // Initial Contributors: williamr@2: // Nokia Corporation - initial contribution. williamr@2: // williamr@2: // Contributors: williamr@2: // williamr@2: // Description: williamr@2: // Contains declaration for BSUL class to cache drive information williamr@2: // williamr@2: // williamr@2: williamr@2: /** williamr@2: @file williamr@2: */ williamr@2: williamr@2: #ifndef CCACHEDDRIVEINFO_H williamr@2: #define CCACHEDDRIVEINFO_H williamr@2: williamr@2: #include williamr@2: #include williamr@2: williamr@2: namespace BSUL williamr@2: { williamr@2: /** williamr@2: Class used to cache F32 drive information. williamr@2: @see TDriveInfo williamr@2: @publishedAll williamr@2: @released williamr@2: */ williamr@2: NONSHARABLE_CLASS(CCachedDriveInfo) : public CBase williamr@2: { williamr@2: private: // private type declarations williamr@2: // Struct to hold drive and media attributes retrieved from a TDriveInfo. williamr@2: struct TDriveAndMediaAttributes williamr@2: { williamr@2: // bit-field of drive attributes williamr@2: TUint32 iDriveAttributes; williamr@2: // bit-field of media attributes williamr@2: TUint32 iMediaAttributes; williamr@2: // Media type of the drive williamr@2: TMediaType iMediaType; williamr@2: }; williamr@2: williamr@2: public: // public methods williamr@2: IMPORT_C static CCachedDriveInfo* NewL(RFs& aFs); williamr@2: IMPORT_C static CCachedDriveInfo* NewLC(RFs& aFs); williamr@2: IMPORT_C ~CCachedDriveInfo(); williamr@2: williamr@2: IMPORT_C TBool IsReadOnlyInternalL(const TDesC& aFullName) const; williamr@2: IMPORT_C TBool IsReadOnlyInternalL(TDriveUnit aDrive) const; williamr@2: IMPORT_C TBool IsFlagSetOnDriveL(TDriveUnit aDrive, TUint aFlags) const; williamr@2: IMPORT_C TBool MediaTypeL(TDriveUnit aDrive, TMediaType aTestValue, TMediaType* aActual = NULL) const; williamr@2: IMPORT_C TDriveUnit GetDefaultRemovableMemoryCardDriveL() const; williamr@2: williamr@2: private: // private methods williamr@2: CCachedDriveInfo(); williamr@2: void ConstructL(RFs& aFs); williamr@2: williamr@2: static TDriveUnit PathToDriveUnitL(const TDesC& aFullName); williamr@2: williamr@2: private: // private data williamr@2: // Array containing the cached attributes for every drive. williamr@2: TDriveAndMediaAttributes iDriveAndMediaAttributes[KMaxDrives]; williamr@2: }; williamr@2: } williamr@2: williamr@2: #endif // #ifndef CCACHEDDRIVEINFO_H