EngInc/IEImageFinderAO.h
changeset 3 93fff7023be8
equal deleted inserted replaced
2:e1e28b0273b0 3:93fff7023be8
       
     1 /*
       
     2 * Copyright (c) 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 "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: Juha Kauppinen, Mika Hokkanen
       
    13 * 
       
    14 * Description: Photo Browser
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef __IEIMAGEFINDER_H_
       
    19 #define __IEIMAGEFINDER_H_
       
    20 
       
    21 // INCLUDES
       
    22 #include <e32base.h>
       
    23 #include <f32file.h>
       
    24 #include <IEEngine.h>
       
    25 #include <bautils.h>
       
    26 
       
    27 #include "IEFileLoader.h"
       
    28 #include <ExifUtility.h> 
       
    29 #include <ICLExif.h> 
       
    30 
       
    31 
       
    32 // FORWARD DECLARATIONS
       
    33 
       
    34 class CIEImageFinder : public CBase
       
    35     {
       
    36     public:
       
    37         static CIEImageFinder* NewL(CIEFileLoader* aCallback, RArray<TImageData*>& aFileNameData,TBool& aAll128x128TNsDone, 
       
    38                                      TBool& aAll640x480TNsDone, TBool& aAll320x320TNsDone, RCriticalSection* aCritical);
       
    39         
       
    40         static CIEImageFinder* NewLC(CIEFileLoader* aCallback, RArray<TImageData*>& aFileNameData,TBool& aAll128x128TNsDone, 
       
    41                                       TBool& aAll640x480TNsDone, TBool& aAll320x320TNsDone, RCriticalSection* aCritical);
       
    42         
       
    43         CIEImageFinder(CIEFileLoader* callback, RArray<TImageData*>& aFileNameData, TBool& aAll128x128TNsDone,
       
    44                         TBool& aAll640x480TNsDone, TBool& aAll320x320TNsDone, RCriticalSection* aCritical);
       
    45         void ConstructL();
       
    46         ~CIEImageFinder();
       
    47         void ScanDirL(CDir* dir, const TDesC& aDir, const TDesC& aWild);
       
    48         //void ScanDirL(const TDesC& aDir, const TDesC& aWild);
       
    49         void SearchFilesL(const TDesC& aRootPath, const TDesC& aSearchName);
       
    50         void IEImageFinderStartL(const TDesC& aRootPath, const TDesC& aSearchName);
       
    51         TInt CheckIfFileExist(TFileName& aFileName);
       
    52         float ReadAspectRatioL(TFileName& aFileName);
       
    53   
       
    54     private:
       
    55         TBool IsFileExist(const TDesC &aFileName);
       
    56         void CheckForTNFiles(TImageData &aImageData);
       
    57         float ReadExifDataL(const TDes &aFileName);        
       
    58      
       
    59         
       
    60     private:
       
    61         RFs                     iFileServer;
       
    62         CIEFileLoader*          iCallback;
       
    63         RArray<TImageData*>&    iFileNameData;
       
    64         TBool&                  iAll640x480TNsDone; 
       
    65         TBool&                  iAll128x128TNsDone;
       
    66         TBool&                  iAll320x320TNsDone;
       
    67         TBufC<KMaxFileName>     iRootPath;
       
    68         TBufC<KMaxFileName>     iSearchName;
       
    69         RCriticalSection*       iCritical;
       
    70         TExifReaderUtility*     iExifReader;
       
    71 //        CImageDecoder*          iImageDecoder;
       
    72         TBool                   iTnFoldersCreated;
       
    73     };
       
    74 
       
    75 #endif //__IEIMAGEFINDER_H_
       
    76 
       
    77 // End of File