diff -r e1e28b0273b0 -r 93fff7023be8 EngInc/IEThreadEngine.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/EngInc/IEThreadEngine.h Fri Oct 15 10:18:29 2010 +0900 @@ -0,0 +1,101 @@ +/* +* 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 __FILEFINDERTHREAD_H__ +#define __FILEFINDERTHREAD_H__ + +// INCLUDES +#include +#include +#include +#include +#include + +// FORWARD DECLARATIONS +class IEImageFinderAO; +class CImageData; +class CIEFileLoader; + + +// CLASS DECLARATION + +class CMediator: public CBase +{ +public: + RArray* iFileNameData; + RArray* iFaceFileNameData; + TBool* iAll128x128TNsDone; + TBool* iAll640x480TNsDone; + TBool* iAll320x320TNsDone; + CIEFileLoader* iFileLoader; + RCriticalSection* iCritical; + TFileName iFileName; +}; + + +/** +* CFileFinderThread application engine class. +*/ +class CFileFinderThread: public CBase + { +public: + + static CFileFinderThread* NewL(CIEFileLoader* aFileLoader, + RArray& aFileNameData, + RArray& aFaceFileNameData, + RCriticalSection* aCritical, TDesC& aFileName); + + static CFileFinderThread* NewLC(CIEFileLoader* aFileLoader, + RArray& aFileNameData, + RArray& aFaceFileNameData, + RCriticalSection* aCritical, TDesC& aFileName); + + CFileFinderThread(CIEFileLoader* aFileLoader, + RArray& aFileNameData, + RArray& aFaceFileNameData, + RCriticalSection* aCritical, TDesC& aFileName); + + ~CFileFinderThread(void); + + void StartL(); + void Stop(); + static TInt ExecuteThreadOne(TAny *aPtr); + static void CreateFileFinderL(CMediator* aMediator); + +private: //functions + void CreateThreadsL(); + +private: // Basic two-phase Symbian OS constructors + void ConstructL(); + CFileFinderThread(); + +private: // data members + + // a handle for thread1 + RThread iThreadOne; + TBool iCreatedThreads; + CMediator* iSMediator; + RArray& iFileNameData; + RArray& iFaceFileNameData; + CIEFileLoader* iFileLoader; + RCriticalSection* iCritical; + TBufC iRootPath; + TBufC iSearchName; + TFileName iFilename; + }; + +#endif // __FILEFINDERTHREAD_H__