1 /* |
|
2 * Copyright (c) 2007 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: Setting conversion utility class declaration |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CAM_SETTINGCONVERSION_H |
|
20 #define CAM_SETTINGCONVERSION_H |
|
21 |
|
22 #include "camcameracontrollerflags.hrh" // Keep first |
|
23 |
|
24 #include <gdi.h> |
|
25 #include <e32std.h> |
|
26 |
|
27 #include <ecam.h> |
|
28 #include <ecamadvsettings.h> |
|
29 #include <ECamOrientationCustomInterface2.h> |
|
30 |
|
31 #include "CamSettings.hrh" |
|
32 #include "CamSettingsInternal.hrh" |
|
33 #include "camcameracontrollersettings.h" |
|
34 |
|
35 |
|
36 // =========================================================================== |
|
37 |
|
38 /** |
|
39 * CCamSettingConversion utility class |
|
40 * |
|
41 * Convert the value used in UI side settings to values suitable for CCamera |
|
42 * or Camera Controller |
|
43 */ |
|
44 class CCamSettingConversion : public CBase |
|
45 { |
|
46 public: |
|
47 static CCamera::TWhiteBalance |
|
48 Map2CameraWb( const TCamWhiteBalanceId& aWbId ); |
|
49 |
|
50 static CCamera::TFlash |
|
51 Map2CameraFlash( const TCamFlashId& aFlashId ); |
|
52 |
|
53 static TCamFlashId |
|
54 Map2FlashId( const CCamera::TFlash& aCameraFlash ); |
|
55 |
|
56 static CCamera::TFormat |
|
57 Map2CameraFormat( const TDisplayMode& aDisplayMode ); |
|
58 |
|
59 static CCamera::TExposure |
|
60 Map2CameraExposureMode( const TCamSceneAEMode& aExpModeId ); |
|
61 |
|
62 #ifdef CAMERAAPP_CAPI_V2_IP |
|
63 /** |
|
64 * Map2CameraEffect |
|
65 * Map colour effect id from UI to Image Processing effect id. |
|
66 */ |
|
67 static CCamera::CCameraImageProcessing::TEffect |
|
68 Map2CameraEffect( const TCamColourFilterId& aColourFilterId ); |
|
69 #endif |
|
70 |
|
71 /** |
|
72 * Map UI Setting Model setting id to Camera Controller setting id. |
|
73 */ |
|
74 static NCamCameraController::TCamCameraSettingId |
|
75 Map2CameraControllerSettingId( const TCamSettingItemIds& aUiSettingId ); |
|
76 |
|
77 #if defined( CAMERAAPP_CAPI_V2_ADV ) || defined( CAMERAAPP_CAPI_V2_IP ) |
|
78 /** |
|
79 * Map Camera Controller setting id to ECAM event UID value. |
|
80 * @see Map2CameraSetting |
|
81 */ |
|
82 static TInt |
|
83 Map2EventUidValue( |
|
84 const NCamCameraController::TCamCameraSettingId& aSettingId ); |
|
85 |
|
86 /** |
|
87 * Map ECAM event UID value to Camera Controller setting id. |
|
88 * @see Map2EventUidValue |
|
89 */ |
|
90 static NCamCameraController::TCamCameraSettingId |
|
91 Map2CameraSetting( TInt aUidValue ); |
|
92 |
|
93 /** |
|
94 * Converts autofocus range from camera ui TCamSceneAFMode type |
|
95 * to CCamera TFocusRange type |
|
96 * @param aAfMode Autofocus mode in camera ui type |
|
97 * @return Autofocus range in TFocusRange type |
|
98 */ |
|
99 static CCamera::CCameraAdvancedSettings::TFocusRange |
|
100 Map2CameraAutofocus( const TCamSceneAFMode& aAfMode ); |
|
101 |
|
102 #endif // defined( CAMERAAPP_CAPI_V2_ADV ) || defined( CAMERAAPP_CAPI_V2_IP ) |
|
103 |
|
104 /** |
|
105 * Convert UI orienation setting value of type TCamImageOrientation |
|
106 * to MCameraOrientation TOrientation value. |
|
107 */ |
|
108 static MCameraOrientation::TOrientation |
|
109 Map2CameraOrientation( const TCamImageOrientation& aSettingOrientation ); |
|
110 }; |
|
111 |
|
112 |
|
113 #endif // CAM_SETTINGCONVERSION_H |
|
114 |
|
115 // =========================================================================== |
|
116 // end of file |
|