|
1 /* |
|
2 * Copyright (c) 2007-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: Camera engine controller event ids. |
|
15 * Used in MCamEngineObserver::HandleCameraEventL callbacks. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 #ifndef CAM_CAMERAEVENTS_H |
|
22 #define CAM_CAMERAEVENTS_H |
|
23 |
|
24 |
|
25 /** |
|
26 * Event ids |
|
27 */ |
|
28 enum TCamCameraEventId |
|
29 { |
|
30 ECamCameraEventNone, // Not an event id, but a marker. |
|
31 |
|
32 // ------------------------------------------------------- |
|
33 // Events of class ECamCameraEventClassBasicControl |
|
34 |
|
35 // If controller is given a sequence of requests, |
|
36 // this event notifies that the full sequence is completed, |
|
37 // and client may issue more requests. |
|
38 ECamCameraEventSequenceEnd, |
|
39 |
|
40 ECamCameraEventReserveGain, |
|
41 ECamCameraEventReserveLose, |
|
42 |
|
43 ECamCameraEventPowerOn, |
|
44 ECamCameraEventPowerOff, |
|
45 ECamCameraEventIveRecover, |
|
46 ECamCameraEventPowerOnRequested, |
|
47 |
|
48 // ------------------------------------------------------- |
|
49 // Events of class ECamCameraEventClassViewfinder |
|
50 ECamCameraEventVfStart, |
|
51 ECamCameraEventVfStop, |
|
52 ECamCameraEventVfRelease, |
|
53 // ------------------------------------------------------- |
|
54 // Event of class ECamCameraEventClassVfData |
|
55 // Associated event data for ECamCameraEventViewfinderFrameReady is the VF frame in CFbsBitmap. |
|
56 ECamCameraEventVfFrameReady, |
|
57 // ------------------------------------------------------- |
|
58 // Events of class ECamCameraEventClassSnapshot |
|
59 ECamCameraEventSsStart, |
|
60 ECamCameraEventSsStop, |
|
61 ECamCameraEventSsRelease, |
|
62 // ------------------------------------------------------- |
|
63 // Event of class ECamCameraEventClassSsData |
|
64 // Associated event data for ECamCameraEventSnapshotReady is the snapshot in CFbsBitmap. |
|
65 ECamCameraEventSsReady, |
|
66 // ------------------------------------------------------- |
|
67 // Events of class ECamCameraEventClassStillCapture |
|
68 ECamCameraEventImageInit, |
|
69 ECamCameraEventImageStart, // Capture started |
|
70 ECamCameraEventImageStop, // Capture stopped (normally or by cancel request) |
|
71 ECamCameraEventImageRelease, |
|
72 |
|
73 // Associated event data for ECamCameraEventImageData is CCamBufferShare pointer. |
|
74 // May be null, if errors occurred. |
|
75 ECamCameraEventImageData, |
|
76 |
|
77 // ------------------------------------------------------- |
|
78 // Events of class ECamCameraEventClassVideo |
|
79 ECamCameraEventVideoInit, |
|
80 ECamCameraEventVideoStart, |
|
81 ECamCameraEventVideoPause, |
|
82 ECamCameraEventVideoAsyncStop, |
|
83 ECamCameraEventVideoStop, |
|
84 ECamCameraEventVideoRelease, |
|
85 // ------------------------------------------------------- |
|
86 // Events of class ECamCameraEventClassVideoTimes |
|
87 ECamCameraEventVideoTimes, |
|
88 |
|
89 // ------------------------------------------------------- |
|
90 // Events of class ECamCameraEventClassSettings |
|
91 |
|
92 // Associated event data is TCamCameraSettingId of the |
|
93 // setting that was processed. |
|
94 ECamCameraEventSettingsSingle, |
|
95 // Associated event data is TCamCameraSettingId of the |
|
96 // last setting that was processed. |
|
97 ECamCameraEventSettingsDone, |
|
98 |
|
99 // ------------------------------------------------------- |
|
100 // Events of class ECamCameraEventClassAutofocus |
|
101 ECamCameraEventStartAutofocus, |
|
102 ECamCameraEventCancelAutofocus, |
|
103 ECamCameraEventAutofocusSuccessful, |
|
104 ECamCameraEventAutofocusFailed, |
|
105 ECamCameraEventSetAfRange, |
|
106 |
|
107 // ------------------------------------------------------- |
|
108 // Events of class ECamCameraEventClassOther |
|
109 ECamCameraEventFlashReady, |
|
110 ECamCameraEventFlashNotReady, |
|
111 |
|
112 // ------------------------------------------------------- |
|
113 // Not an event id, but a marker. |
|
114 ECamCameraEventCount |
|
115 }; |
|
116 |
|
117 |
|
118 /** |
|
119 * Camera event classes. |
|
120 */ |
|
121 enum TCamCameraEventClassId |
|
122 { |
|
123 ECamCameraEventClassNone = 0, |
|
124 |
|
125 ECamCameraEventClassBasicControl = 1<<0, |
|
126 |
|
127 ECamCameraEventClassImage = 1<<1, |
|
128 |
|
129 ECamCameraEventClassVideo = 1<<2, |
|
130 ECamCameraEventClassVideoTimes = 1<<3, |
|
131 |
|
132 ECamCameraEventClassVfControl = 1<<7, |
|
133 ECamCameraEventClassVfData = 1<<8, |
|
134 |
|
135 ECamCameraEventClassSsControl = 1<<10, |
|
136 ECamCameraEventClassSsData = 1<<11, |
|
137 |
|
138 ECamCameraEventClassSettings = 1<<12, |
|
139 |
|
140 ECamCameraEventClassAutofocus = 1<<13, |
|
141 |
|
142 ECamCameraEventClassFlashStatus = 1<<14, |
|
143 |
|
144 ECamCameraEventClassOther = 1<<30, |
|
145 |
|
146 ECamCameraEventClassAll = ~ECamCameraEventClassNone |
|
147 }; |
|
148 |
|
149 #ifdef _DEBUG |
|
150 |
|
151 static const TUint16* KCamCameraEventNames[] = |
|
152 { |
|
153 (const TUint16*)_S16("ECamCameraEventNone"), |
|
154 |
|
155 (const TUint16*)_S16("ECamCameraEventSequenceEnd"), |
|
156 |
|
157 (const TUint16*)_S16("ECamCameraEventReserveGain"), |
|
158 (const TUint16*)_S16("ECamCameraEventReserveLose"), |
|
159 (const TUint16*)_S16("ECamCameraEventPowerOn"), |
|
160 (const TUint16*)_S16("ECamCameraEventPowerOff"), |
|
161 (const TUint16*)_S16("ECamCameraEventIveRecover"), |
|
162 (const TUint16*)_S16("ECamCameraEventPowerOnRequested"), |
|
163 |
|
164 (const TUint16*)_S16("ECamCameraEventVfStart"), |
|
165 (const TUint16*)_S16("ECamCameraEventVfStop"), |
|
166 (const TUint16*)_S16("ECamCameraEventVfRelease"), |
|
167 (const TUint16*)_S16("ECamCameraEventVfFrameReady"), |
|
168 |
|
169 (const TUint16*)_S16("ECamCameraEventSsStart"), |
|
170 (const TUint16*)_S16("ECamCameraEventSsStop"), |
|
171 (const TUint16*)_S16("ECamCameraEventSsRelease"), |
|
172 (const TUint16*)_S16("ECamCameraEventSsReady"), |
|
173 |
|
174 (const TUint16*)_S16("ECamCameraEventImageInit"), |
|
175 (const TUint16*)_S16("ECamCameraEventImageStart"), |
|
176 (const TUint16*)_S16("ECamCameraEventImageStop"), |
|
177 (const TUint16*)_S16("ECamCameraEventImageRelease"), |
|
178 (const TUint16*)_S16("ECamCameraEventImageData"), |
|
179 |
|
180 (const TUint16*)_S16("ECamCameraEventVideoInit"), |
|
181 (const TUint16*)_S16("ECamCameraEventVideoStart"), |
|
182 (const TUint16*)_S16("ECamCameraEventVideoPause"), |
|
183 (const TUint16*)_S16("ECamCameraEventVideoAsyncStop"), |
|
184 (const TUint16*)_S16("ECamCameraEventVideoStop"), |
|
185 (const TUint16*)_S16("ECamCameraEventVideoRelease"), |
|
186 (const TUint16*)_S16("ECamCameraEventVideoTimes"), |
|
187 |
|
188 (const TUint16*)_S16("ECamCameraEventSettingsSingle"), |
|
189 (const TUint16*)_S16("ECamCameraEventSettingsDone"), |
|
190 |
|
191 (const TUint16*)_S16("ECamCameraEventStartAutofocus"), |
|
192 (const TUint16*)_S16("ECamCameraEventCancelAutofocus"), |
|
193 (const TUint16*)_S16("ECamCameraEventAutofocusSuccessful"), |
|
194 (const TUint16*)_S16("ECamCameraEventAutofocusFailed"), |
|
195 (const TUint16*)_S16("ECamCameraEventSetAfRange"), |
|
196 |
|
197 (const TUint16*)_S16("ECamCameraEventFlashReady"), |
|
198 (const TUint16*)_S16("ECamCameraEventFlashNotReady") |
|
199 }; |
|
200 |
|
201 __ASSERT_COMPILE( (sizeof(KCamCameraEventNames) / sizeof(TUint16*)) == ECamCameraEventCount ); |
|
202 #endif |
|
203 |
|
204 |
|
205 |
|
206 #endif // CAM_CAMERAEVENTS_H |
|
207 |
|
208 // end of file |