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: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef XACAMERAITF_H |
|
19 #define XACAMERAITF_H |
|
20 |
|
21 #include "xaadptbasectx.h" |
|
22 /** MACROS **/ |
|
23 |
|
24 /** TYPES **/ |
|
25 |
|
26 /** ENUMERATIONS **/ |
|
27 |
|
28 /** STRUCTURES **/ |
|
29 /* Definition of XACameraItf implementation */ |
|
30 typedef struct XACameraItfImpl_ |
|
31 { |
|
32 /* parent interface */ |
|
33 struct XACameraItf_ itf; |
|
34 /* pointer to self */ |
|
35 struct XACameraItfImpl_* self; |
|
36 |
|
37 /* variables */ |
|
38 XAuint32 flashMode; |
|
39 XAboolean flashReady; |
|
40 XAuint32 focusMode; |
|
41 XAuint32 focusStatus; |
|
42 XAmillimeter focusManualSetting; |
|
43 XAboolean macroEnabled; |
|
44 XAuint32 focusPattern; |
|
45 XAuint32 activePoints1; |
|
46 XAuint32 activePoints2; |
|
47 XAuint32 meteringMode; |
|
48 XAuint32 exposureMode; |
|
49 XAuint32 compensation; |
|
50 XAuint32 isoSensitivity; |
|
51 XAuint32 isoManualSetting; |
|
52 XAuint32 aperture; |
|
53 XAuint32 apertureManualSetting; |
|
54 XAuint32 shutterSpeed; |
|
55 XAmicrosecond shutterManualSetting; |
|
56 XAuint32 whiteBalance; |
|
57 XAuint32 whiteBalManualSetting; |
|
58 XAuint32 locks; |
|
59 XApermille zoom; |
|
60 XAboolean digitalEnabled; |
|
61 XAuint32 speed; |
|
62 XAuint32 async; |
|
63 |
|
64 xaCameraCallback callback; |
|
65 void *context; |
|
66 XACameraItf cbPtrToSelf; |
|
67 |
|
68 /*Adaptation variables*/ |
|
69 XAAdaptationBaseCtx *adapCtx; |
|
70 } XACameraItfImpl; |
|
71 |
|
72 /** METHODS **/ |
|
73 |
|
74 /* Base interface XACameraItf implementation |
|
75 *See API Specification for method documentation |
|
76 */ |
|
77 XAresult XACameraItfImpl_RegisterCallback( XACameraItf self, |
|
78 xaCameraCallback callback, |
|
79 void *pContext ); |
|
80 |
|
81 XAresult XACameraItfImpl_SetFlashMode( XACameraItf self, XAuint32 flashMode ); |
|
82 |
|
83 XAresult XACameraItfImpl_GetFlashMode( XACameraItf self, XAuint32 *pFlashMode ); |
|
84 |
|
85 XAresult XACameraItfImpl_IsFlashReady( XACameraItf self, XAboolean *pReady ); |
|
86 |
|
87 XAresult XACameraItfImpl_SetFocusMode( XACameraItf self, XAuint32 focusMode, |
|
88 XAmillimeter manualSetting, |
|
89 XAboolean macroEnabled ); |
|
90 |
|
91 XAresult XACameraItfImpl_GetFocusMode( XACameraItf self, |
|
92 XAuint32 *pFocusMode, |
|
93 XAmillimeter *pManualSetting, |
|
94 XAboolean *pMacroEnabled ); |
|
95 |
|
96 XAresult XACameraItfImpl_SetFocusRegionPattern( XACameraItf self, |
|
97 XAuint32 focusPattern, |
|
98 XAuint32 activePoints1, |
|
99 XAuint32 activePoints2 ); |
|
100 |
|
101 XAresult XACameraItfImpl_GetFocusRegionPattern( XACameraItf self, |
|
102 XAuint32 *pFocusPattern, |
|
103 XAuint32 *pActivePoints1, |
|
104 XAuint32 *pActivePoints2 ); |
|
105 |
|
106 XAresult XACameraItfImpl_GetFocusRegionPositions( XACameraItf self, |
|
107 XAuint32 *pNumPositionEntries, |
|
108 XAFocusPointPosition *pFocusPosition ); |
|
109 |
|
110 XAresult XACameraItfImpl_GetFocusModeStatus( XACameraItf self, |
|
111 XAuint32 *pFocusStatus, |
|
112 XAuint32 *pRegionStatus1, |
|
113 XAuint32 *pRegionStatus2 ); |
|
114 |
|
115 XAresult XACameraItfImpl_SetMeteringMode( XACameraItf self, XAuint32 meteringMode ); |
|
116 |
|
117 XAresult XACameraItfImpl_GetMeteringMode( XACameraItf self, XAuint32 *pMeteringMode ); |
|
118 |
|
119 XAresult XACameraItfImpl_SetExposureMode( XACameraItf self, XAuint32 exposure, |
|
120 XAuint32 compensation ); |
|
121 |
|
122 XAresult XACameraItfImpl_GetExposureMode( XACameraItf self, XAuint32 *pExposure, |
|
123 XAuint32 *pCompensation ); |
|
124 |
|
125 XAresult XACameraItfImpl_SetISOSensitivity( XACameraItf self, XAuint32 isoSensitivity, |
|
126 XAuint32 manualSetting ); |
|
127 |
|
128 XAresult XACameraItfImpl_GetISOSensitivity( XACameraItf self, XAuint32 *pIsoSensitivity, |
|
129 XAuint32 *pManualSetting ); |
|
130 |
|
131 XAresult XACameraItfImpl_SetAperture( XACameraItf self, XAuint32 aperture, |
|
132 XAuint32 manualSetting ); |
|
133 |
|
134 XAresult XACameraItfImpl_GetAperture( XACameraItf self, XAuint32 *pAperture, |
|
135 XAuint32 *pManualSetting ); |
|
136 |
|
137 XAresult XACameraItfImpl_SetShutterSpeed( XACameraItf self, XAuint32 shutterSpeed, |
|
138 XAmicrosecond manualSetting ); |
|
139 |
|
140 XAresult XACameraItfImpl_GetShutterSpeed( XACameraItf self, XAuint32 *pShutterSpeed, |
|
141 XAmicrosecond *pManualSetting ); |
|
142 |
|
143 XAresult XACameraItfImpl_SetWhiteBalance( XACameraItf self, XAuint32 whiteBalance, |
|
144 XAuint32 manualSetting ); |
|
145 |
|
146 XAresult XACameraItfImpl_GetWhiteBalance( XACameraItf self, XAuint32 *pWhiteBalance, |
|
147 XAuint32 *pManualSetting ); |
|
148 |
|
149 XAresult XACameraItfImpl_SetAutoLocks( XACameraItf self, XAuint32 locks ); |
|
150 |
|
151 XAresult XACameraItfImpl_GetAutoLocks( XACameraItf self, XAuint32 *locks ); |
|
152 |
|
153 XAresult XACameraItfImpl_SetZoom( XACameraItf self, XApermille zoom, |
|
154 XAboolean digitalEnabled, XAuint32 speed, |
|
155 XAboolean async ); |
|
156 |
|
157 XAresult XACameraItfImpl_GetZoom( XACameraItf self, XApermille *pZoom, |
|
158 XAboolean *pDigital ); |
|
159 |
|
160 /* XACameraItfImpl -specific methods */ |
|
161 XACameraItfImpl* XACameraItfImpl_Create( XAAdaptationBaseCtx *adapCtx ); |
|
162 void XACameraItfImp_AdaptCb( void *pHandlerCtx, XAAdaptEvent *event ); |
|
163 void XACameraItfImpl_Free(XACameraItfImpl* self); |
|
164 |
|
165 #endif /* XACAMERAITF_H */ |
|