|
1 /* |
|
2 * Copyright (c) 2009-2010 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: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 #ifndef CXECAMERADEVICE_H |
|
18 #define CXECAMERADEVICE_H |
|
19 |
|
20 // Include Files |
|
21 |
|
22 #include <QObject> |
|
23 #include <ecam.h> // CCamera |
|
24 #include <ecam/camerasnapshot.h> |
|
25 #include <ecamadvsettings.h> // CCamera::CCameraAdvancedSettings |
|
26 #include "cxeerror.h" |
|
27 #include "cxenamespace.h" |
|
28 |
|
29 class MCameraOrientation; |
|
30 class MCameraFaceTracking; |
|
31 class MCameraUseCaseHint; |
|
32 |
|
33 // Class Definitions |
|
34 class CxeCameraDevice : public QObject |
|
35 { |
|
36 Q_OBJECT |
|
37 |
|
38 public: |
|
39 CxeCameraDevice(); |
|
40 virtual ~CxeCameraDevice(); |
|
41 |
|
42 CCamera* camera(); |
|
43 CCamera::CCameraAdvancedSettings *advancedSettings(); |
|
44 CCamera::CCameraImageProcessing *imageProcessor(); |
|
45 MCameraOrientation *cameraOrientation(); |
|
46 CCamera::CCameraSnapshot *cameraSnapshot(); |
|
47 MCameraFaceTracking *faceTracking(); |
|
48 MCameraUseCaseHint *useCaseHintApi(); |
|
49 |
|
50 virtual void setCamera( CCamera *aCamera ); |
|
51 virtual void deleteCamera(); |
|
52 virtual void releaseCamera(); |
|
53 virtual void reserveCamera(); |
|
54 virtual CxeError::Id newCamera(Cxe::CameraIndex cameraIndex, MCameraObserver2 *observer); |
|
55 |
|
56 protected: |
|
57 |
|
58 signals: |
|
59 void prepareForCameraDelete(); |
|
60 void cameraAllocated(CxeError::Id error); |
|
61 void prepareForRelease(); |
|
62 void aboutToReserve(); |
|
63 |
|
64 private: |
|
65 CxeError::Id initResources(); |
|
66 void releaseResources(); |
|
67 |
|
68 private: |
|
69 CCamera *mCamera; |
|
70 CCamera::CCameraAdvancedSettings *mAdvancedSettings; |
|
71 CCamera::CCameraImageProcessing *mImageProcessor; |
|
72 CCamera::CCameraSnapshot *mCameraSnapshot; |
|
73 MCameraOrientation *mCameraOrientation; // not owned |
|
74 MCameraFaceTracking *mFaceTracking; // not owned |
|
75 MCameraUseCaseHint *mUseCaseHintApi; // not owned |
|
76 |
|
77 friend class CxeCameraDeviceControlSymbian; |
|
78 }; |
|
79 |
|
80 |
|
81 #endif // CXECAMERADEVICE_H |
|
82 |