diff -r e1e28b0273b0 -r 93fff7023be8 EngInc/IEImageList.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/EngInc/IEImageList.h Fri Oct 15 10:18:29 2010 +0900 @@ -0,0 +1,89 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: Juha Kauppinen, Mika Hokkanen +* +* Description: Photo Browser +* +*/ + +#ifndef __IEIMAGELIST_H_ +#define __IEIMAGELIST_H_ + +// INCLUDES +#include +#include +#include +#include +#include +#include +#include + +#include "IEImageProcessing.h" +#include "IEEngineUtils.h" + +class CIEFileLoader; + +enum TGridMode { + EGridModeTime, + EGridModeFolder, + EGridModePeople +}; + +class CIEImageList + { +public: + IMPORT_C static CIEImageList* NewL(RArray& aImageData, CIEFileLoader* aCallback); + IMPORT_C ~CIEImageList(); + IMPORT_C TBool IsImageViewableL(TDesC& aFileName, RFs& aFs) const; + IMPORT_C void ReadDatabaseL(); + IMPORT_C void WriteDatabaseL(); + IMPORT_C CImageData* CreateImageDataL( + const TFileName& aFileName, + const TTime& aCreatedTime, + TReal orientation); + IMPORT_C void AddImage(CImageData* aImageData); + IMPORT_C void Remove(TInt aIndex, RFs& aFs); + IMPORT_C void RemoveNonExistImagesL(TDesC* aPath, RFs& aFs); + IMPORT_C TInt GetImageIndex(CImageData* aImageData); + IMPORT_C CImageData* GetImageData(const TFileName& aFileName); + IMPORT_C void SetChanged(TDesC& aPath); + IMPORT_C void SetGridMode(TGridMode aGridMode); + IMPORT_C TGridMode GetGridMode() const; + +private: + enum TImageListDrive { + EImageListDriveC = 0, + EImageListDriveE = 1, + EImageListDriveF = 2, + }; + + CIEImageList(RArray& aImageData, CIEFileLoader* aCallback); + void ConstructL(); + CImageData* ReadImageDataL(RFileReadStream& readStream, RFs& aFs); + void WriteDatabaseL(TImageListDrive aDrive, RFs& aFs); + void GetDatabaseFileName(TFileName& aFileName, TImageListDrive aDrive); + TBool IsImageBefore(CImageData* aImageData1, TInt aIndex) const; + TInt GetNewImageIndex(CImageData* aImageData) const; + void Rearrange(TInt aStartIndex); + void SetChanged(CImageData* aImageData); + static TImageListDrive GetPathDriveL(TDesC& aPath); + + CIEFileLoader* iCallback; + TBool iDatabaseChanged[3]; + RArray& iImageDataList; + TGridMode iGridMode; + RCriticalSection iCritical; + }; + +#endif //__IEIMAGELIST_H_ + +// End of File