3
|
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 __IEENGINE_H__
|
|
19 |
#define __IEENGINE_H__
|
|
20 |
|
|
21 |
#define _FACEBROWSING
|
|
22 |
|
|
23 |
// Include files
|
|
24 |
#include <e32base.h>
|
|
25 |
#include <fbs.h>
|
|
26 |
|
|
27 |
#include "ImagicConsts.h"
|
|
28 |
#include "debug.h"
|
|
29 |
#include "IEImage.h"
|
|
30 |
#include "IEImageProcessing.h" //thumbnail client
|
|
31 |
#include "IESensorMonitor.h"
|
|
32 |
#include "IEImageList.h"
|
|
33 |
|
|
34 |
#ifdef _S60_5x_ACCELEROMETER_
|
|
35 |
#include <sensrvorientationsensor.h>
|
|
36 |
#endif
|
|
37 |
|
|
38 |
//Structures
|
|
39 |
|
|
40 |
// Class declaration, AppUI class implements
|
|
41 |
class MIEEngineObserver
|
|
42 |
{
|
|
43 |
public:
|
|
44 |
virtual void ImagesLoadedL(TInt aError) = 0;
|
|
45 |
virtual void TNCreationCompleteL(TThumbSize aTnRes) = 0;
|
|
46 |
virtual void SingleTNCreationCompletedL(TInt index, TThumbSize aTnRes) = 0;
|
|
47 |
virtual void FaceDetectionComplete() = 0;
|
|
48 |
virtual void SingleFaceDetectionComplete() = 0;
|
|
49 |
virtual TInt GetImageIndex() = 0;
|
|
50 |
virtual void AllFilesScanned() = 0;
|
|
51 |
virtual void ImageListChanged(TInt aIndex, TBool bAdded) = 0;
|
|
52 |
#ifdef _ACCELEROMETER_SUPPORTED_
|
|
53 |
virtual void ImageRotated(TImagicDeviceOrientation aDeviceOrientation) = 0;
|
|
54 |
#endif
|
|
55 |
virtual TInt GetGleMaxRes() = 0;
|
|
56 |
|
|
57 |
};
|
|
58 |
|
|
59 |
class CIEEngine : public CBase
|
|
60 |
{
|
|
61 |
public:
|
|
62 |
|
|
63 |
IMPORT_C static CIEEngine* NewL(MIEEngineObserver& aObserver);
|
|
64 |
IMPORT_C virtual ~CIEEngine();
|
|
65 |
IMPORT_C virtual TInt GetTotalNumOfImages() = 0;
|
|
66 |
IMPORT_C virtual void GetTotalNumOfImages(TInt& aNumOfImages, TInt& aNumOfFaces) = 0;
|
|
67 |
IMPORT_C virtual TInt DeleteFile(TInt aIndex) = 0;
|
|
68 |
IMPORT_C virtual TInt GetImageName(const TInt aIndex, TFileName& aFileName, TThumbSize aThumbRes) = 0;
|
|
69 |
IMPORT_C virtual void GetBitmapL(CImageData* aImageData, CFbsBitmap* aBitmap, TThumbSize aThumbRes) = 0;
|
|
70 |
IMPORT_C virtual void AppUIReady() = 0;
|
|
71 |
IMPORT_C virtual void CancelFullSizeLoading() = 0;
|
|
72 |
#ifdef _ACCELEROMETER_SUPPORTED_
|
|
73 |
IMPORT_C virtual TImagicDeviceOrientation GetDeviceOrientation() = 0;
|
|
74 |
IMPORT_C virtual void SetDeviceOrientation(TImagicDeviceOrientation aOrientation) = 0;
|
|
75 |
IMPORT_C virtual void StartAccSensorMonitoring() = 0;
|
|
76 |
IMPORT_C virtual void StopAccSensorMonitoring() = 0;
|
|
77 |
#endif
|
|
78 |
IMPORT_C virtual TBool IsAccelerometerExists() = 0;
|
|
79 |
IMPORT_C virtual void SensorDataAvailable(TImagicDeviceOrientation aOrientation, TBool aValue) = 0;
|
|
80 |
IMPORT_C virtual void SetImageRotation(TInt aIndex) = 0;
|
|
81 |
IMPORT_C virtual void SetDBChanged(CImageData* aImageData) = 0;
|
|
82 |
|
|
83 |
//New functions for handling UI access to Filename array
|
|
84 |
IMPORT_C virtual CImageData* GetImageData(TInt aIndex/*, TImageArrayMode aMode*/) = 0;
|
|
85 |
IMPORT_C virtual void SetImageData(TInt aIndex, CImageData* aGridData) = 0;
|
|
86 |
IMPORT_C virtual TBool IsScanningFiles() const = 0;
|
|
87 |
IMPORT_C virtual CIEImageList& GetImageList() = 0;
|
|
88 |
|
|
89 |
// TN related functions
|
|
90 |
IMPORT_C virtual void GetFileNameL(const TInt aIndex, TThumbSize aThumbRes, TFileName& aFilename) = 0;
|
|
91 |
IMPORT_C virtual void StopTNGeneration(TInt &aValue) = 0;
|
|
92 |
IMPORT_C virtual TReal GetAspectRatio(TInt aIndex) = 0;
|
|
93 |
IMPORT_C virtual TReal GetFacesAspectRatio(TInt aIndex) = 0;
|
|
94 |
IMPORT_C virtual void GenerateThumbNailL(const TDes &aOrgFile, TThumbSize aTNResolution) = 0;
|
|
95 |
|
|
96 |
// Newly added face Detection functions
|
|
97 |
IMPORT_C virtual void GetFaceCoordinates(const TFileName a128x128TNFileName, RArray<TRect>& aFaceCoordinateArray) = 0;
|
|
98 |
IMPORT_C virtual void GetSingleFaceCoordinates(TInt aIndex, const TFileName aTNFileName, RArray<TRect>& aFaceCoordinateArray) = 0;
|
|
99 |
IMPORT_C virtual void SetImageDataMode(TImageArrayMode aMode) = 0;
|
|
100 |
|
|
101 |
IMPORT_C virtual void Stop() = 0;
|
|
102 |
IMPORT_C virtual TBool IsRunning() = 0;
|
|
103 |
};
|
|
104 |
|
|
105 |
#endif // __IEENGINE_H__
|