Tizen 2.0 Release
[framework/osp/media.git] / inc / FMediaCamera.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 //     http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17
18 /**
19  * @file                        FMediaCamera.h
20  * @brief                       This is the header file for the %Camera class.
21  *
22  * This header file contains the declarations of the %Camera class.
23  */
24
25 #ifndef _FMEDIA_CAMERA_H_
26 #define _FMEDIA_CAMERA_H_
27
28 #include <FBase.h>
29 #include <FGraphics.h>
30 #include <FMediaCameraTypes.h>
31 #include <FMediaICameraEventListener.h>
32
33 namespace Tizen { namespace Media
34 {
35
36 class _CameraImpl;
37
38 /**
39  * @class       Camera
40  * @brief       This class controls the camera device.
41  *
42  * @since               2.0
43  *
44  *
45  * The %Camera class controls the camera device.
46  * The supported properties are device-dependent. The list of the properties available can be retrieved using the methods of %Camera and MediaCapability classes.
47  * All the other methods, except SetAutoFocus(), StartPreview(), and Capture() work synchronously.
48  * The previewed or captured data are passed through ICameraEventListener. @n
49  *
50  * For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/media/capturing_still_images.htm">Capturing Still Images</a>.
51  *
52  * The following example demonstrates how to use the %Camera class.
53  *
54  * @code
55  * #include <FBase.h>
56  * #include <FGraphics.h>
57  * #include <FUi.h>
58  * #include <FMedia.h>
59  *
60  * using namespace Tizen::Graphics;
61  * using namespace Tizen::Ui;
62  * using namespace Tizen::Ui::Controls;
63  * using namespace Tizen::Media;
64  *
65  * class CameraSample
66  *     : public Tizen::Ui::Controls::Form
67  *     , public Tizen::Media::ICameraEventListener
68  * {
69  * public:
70  *     CameraSample(void);
71  *     result Start(void);
72  *     void Stop(void);
73  *
74  * protected:
75  *     virtual void OnCameraAutoFocused(bool completeCondition) {}
76  *     virtual void OnCameraPreviewed( Tizen::Base::ByteBuffer& previewedData, result r) {}
77  *     virtual void OnCameraCaptured( Tizen::Base::ByteBuffer& capturedData, result r) {}
78  *     virtual void OnCameraErrorOccurred(CameraErrorReason r ) {}
79  *
80  * private:
81  *     Camera __camera;
82  *     OverlayRegion * __pOverlay;
83  * };
84  *
85  * CameraSample::CameraSample(void)
86  * {
87  *     __pOverlay = null;
88  * }
89  *
90  * result
91  * CameraSample::Start(void)
92  * {
93  *     result r = E_SUCCESS;
94  *     Rectangle rect(0, 0, 320, 240);
95  *     bool modified = false;
96  *     bool isValid = false;
97  *     BufferInfo bufferInfo;
98  *
99  *     r = __camera.Construct(*this, CAMERA_PRIMARY);
100  *     if (IsFailed(r))
101  *     {
102  *         return r;
103  *     }
104  *
105  *     r = __camera.PowerOn();
106  *     if (IsFailed(r))
107  *     {
108  *         return r;
109  *     }
110  *
111  *     isValid = OverlayRegion::EvaluateBounds(OVERLAY_REGION_EVALUATION_OPTION_LESS_THAN, rect, modified);
112  *     if (isValid != true)
113  *     {
114  *         return GetLastResult();
115  *     }
116  *
117  *     // Gets OverlayRegion from this Form
118  *     __pOverlay = GetOverlayRegionN(rect, OVERLAY_REGION_TYPE_PRIMARY_CAMERA);
119  *     if (__pOverlay == null)
120  *     {
121  *         return GetLastResult();
122  *     }
123  *
124  *     __pOverlay->GetBackgroundBufferInfo(bufferInfo);
125  *
126  *     r = __camera.StartPreview(&bufferInfo, true);
127  *     if (IsFailed(r))
128  *     {
129  *         goto CATCH;
130  *     }
131  *
132  *     return E_SUCCESS;
133  * CATCH:
134  *     if (__pOverlay)
135  *     {
136  *         delete __pOverlay;
137  *         __pOverlay = null;
138  *     }
139  *     return r;
140  *  }
141  *
142  * void
143  * CameraSample::Stop(void)
144  * {
145  *     __camera.StopPreview();
146  *     __camera.PowerOff();
147  *     if (__pOverlay)
148  *     {
149  *         delete __pOverlay;
150  *         __pOverlay = null;
151  *     }
152  * }
153  *
154  * @endcode
155  *
156  *
157  */
158 class _OSP_EXPORT_ Camera
159         : public Tizen::Base::Object
160 {
161 public:
162         /**
163          * This is the default constructor for this class.
164          *
165          * @since               2.0
166          *
167          * @remarks         The object is not fully constructed after this constructor is called. For full construction,
168          * the Construct() method must be called right after calling this constructor.
169          */
170         Camera(void);
171
172         /**
173          * This is the destructor for this class. @n
174          * All allocated resources are deallocated by this method. This method must be called in the same thread
175          * where the Construct() method is called.This polymorphic destructor should be overridden if required.
176          * This way, the destructors of the derived classes are called when the destructor of this interface is called.
177          *
178          * @since               2.0
179          *
180          */
181         virtual ~Camera(void);
182
183         /**
184         * Initializes this instance of %Camera with the specified parameters. @n
185         * The %Construct() method creates an instance of %Camera in the subsystem. Only one instance is created at a given time.
186         *
187         * @since                2.0
188         *
189         * @return               An error code
190         * @param[in]    listener                                An instance of ICameraEventListener
191         * @param[in]    camSel                                  The %Camera to power on
192         * @exception    E_SUCCESS                               The method is successful.
193         * @exception    E_SYSTEM                                A system error has occurred.
194         * @exception    E_DEVICE_BUSY                   The camera is under use by other application or already used in this application.
195         * @exception    E_DEVICE_UNAVAILABLE    The camera is unavailable.
196         * @exception    E_UNSUPPORTED_OPERATION The camera usage is not supported.
197         * @exception    E_OUT_OF_MEMORY The memory is insufficient.
198         */
199         result Construct(ICameraEventListener& listener, CameraSelection camSel = CAMERA_PRIMARY);
200
201         /**
202         * Powers the camera on.
203         *
204         * @since                2.0
205         * @privilege    %http://tizen.org/privilege/camera
206         *
207         * @return               An error code
208         * @exception    E_SUCCESS                               The method is successful.
209         * @exception    E_INVALID_STATE                 This instance is in an invalid state for this method.
210         * @exception    E_DEVICE_BUSY                   The camera is under use by other application.
211         * @exception    E_DEVICE_UNAVAILABLE    The camera becomes unavailable.
212         * @exception    E_DEVICE_FAILED                 The device operation has failed.
213         * @exception    E_OUT_OF_MEMORY                 The memory is insufficient.
214         * @exception    E_PRIVILEGE_DENIED              The application does not have the privilege to call this method.
215         * @remarks              The reserved configurations are set in this method.
216         * @see                  PowerOff()
217         */
218         result PowerOn(void);
219
220         /**
221         * Powers the camera off.
222         *
223         * @since                2.0
224         * @privilege    %http://tizen.org/privilege/camera
225         *
226         * @return               An error code
227         * @exception    E_SUCCESS                               The method is successful.
228         * @exception    E_INVALID_STATE                 This instance is in an invalid state for this method.
229         * @exception    E_DEVICE_BUSY                   The camera is under use by other application.
230         * @exception    E_DEVICE_UNAVAILABLE    The camera becomes unavailable.
231         * @exception    E_DEVICE_FAILED                 The device operation has failed.
232         * @exception    E_OUT_OF_MEMORY                 The memory is insufficient.
233         * @exception    E_PRIVILEGE_DENIED              The application does not have the privilege to call this method.
234         * @see                  PowerOn()
235         */
236         result PowerOff(void);
237
238         /**
239         * Checks whether the camera is powered on.
240         *
241         * @since                2.0
242         *
243         * @return               @c true if the camera is powered on, @n
244         *                               else @c false
245         * @see                  PowerOn(), PowerOff()
246         */
247         bool IsPoweredOn(void) const;
248
249         /**
250         * Starts displaying the preview image on the camera device. @n
251         * If the value of @c pBufferInfo is @c null, no preview image is displayed. In this case, the application can
252         * draw the preview image with the data passed on by the ICameraEventListener::OnCameraPreviewed() method.
253         *
254         * If the value of @c previewedData is @c true, the previewed image data is passed to the
255         * ICameraEventListener::OnCameraPreviewed() method periodically based on the frame-rate, otherwise the
256         * callback is not invoked. The default value of @c previewedData is @c false.
257         *
258         * @since                2.0
259         * @privilege    %http://tizen.org/privilege/camera
260         *
261         * @return               An error code
262         * @param[in]    pBufferInfo                             The buffer information for the camera preview display
263         * @param[in]    previewedData                   Set to @c true if the previewed data is delivered to the callback method, @n
264         *                                                                               else @c false
265         * @exception    E_SUCCESS                               The method is successful.
266         * @exception    E_INVALID_STATE                 This instance is in an invalid state for this method.
267         * @exception    E_UNSUPPORTED_FORMAT    The specified format is not supported.
268         * @exception    E_DEVICE_BUSY                   The camera is under use by other application.
269         * @exception    E_DEVICE_UNAVAILABLE    The camera becomes unavailable.
270         * @exception    E_DEVICE_FAILED                 The device operation has failed.
271         * @exception    E_OUT_OF_MEMORY                 The memory is insufficient.
272         * @exception    E_PRIVILEGE_DENIED              The application does not have the privilege to call this method.
273         * @remarks              The overlay region retrieved by the buffer information must be the topmost window when this method is
274         *                               called.
275         * @remarks              The ICameraEventListener::OnCameraPreviewed() method can be delayed or dropped depending on
276         *                               the system's performance. @n
277         *                               For more information on the relationship between this method and the PowerOn() method, and the
278         *               state transition caused by this method, see <a href="../org.tizen.native.appprogramming/html/guide/media/launching_camera.htm
279         ">here</a>.
280         * @see                  StopPreview()
281         * @see          ICameraEventListener::OnCameraPreviewed()
282         */
283         result StartPreview(const Tizen::Graphics::BufferInfo* pBufferInfo, bool previewedData = false);
284
285         /**
286         * Stops displaying the preview image on the camera device.
287         *
288         * @since                2.0
289         * @privilege    %http://tizen.org/privilege/camera
290         *
291         * @return               An error code
292         * @exception    E_SUCCESS                               The method is successful.
293         * @exception    E_INVALID_STATE                 This instance is in an invalid state for this method.
294         * @exception    E_DEVICE_BUSY                   The camera is under use by other application.
295         * @exception    E_DEVICE_UNAVAILABLE    The camera becomes unavailable.
296         * @exception    E_DEVICE_FAILED                 The device operation has failed.
297         * @exception    E_OUT_OF_MEMORY                 The memory is insufficient.
298         * @exception    E_PRIVILEGE_DENIED              The application does not have the privilege to call this method.
299         * @remarks      For more information on the relationship between this method and the PowerOn() method, and the
300         *               state transition caused by this method, see <a href="../org.tizen.native.appprogramming/html/guide/media/launching_camera.htm
301         ">here</a>.
302         * @see                  StartPreview()
303         */
304         result StopPreview(void);
305
306         /**
307         * Captures the current image data from the camera sensor. @n
308         * After capturing the image, the camera's state changes to ::CAMERA_STATE_CAPTURED. @n
309         * The camera's preview must be restarted by calling the StartPreview() method. @n
310         * In a zero-shutter-lag camera, after capturing the image, the state changes to ::CAMERA_STATE_PREVIEW. @n
311         * The camera does not need to restart the preview in this case. @n
312         * The captured image is passed through ICameraEventListener::OnCameraCaptured().
313         *
314         * @since                2.0
315         * @privilege    %http://tizen.org/privilege/camera
316         *
317         * @return               An error code
318         * @exception    E_SUCCESS                                       The method is successful.
319         * @exception    E_INVALID_STATE                         This instance is in an invalid state for this method.
320         * @exception    E_DEVICE_BUSY                           The camera is under use by other application.
321         * @exception    E_DEVICE_UNAVAILABLE            The camera becomes unavailable.
322         * @exception    E_DEVICE_FAILED                         The device operation has failed.
323         * @exception    E_UNSUPPORTED_OPERATION     The target device does not support capture feature.
324         * @exception    E_OUT_OF_MEMORY                         The memory is insufficient.
325         * @exception    E_PRIVILEGE_DENIED                      The application does not have the privilege to call this method.
326         * @remarks      For more information on the relationship between this method and the PowerOn() method, and the
327         *               state transition caused by this method, see <a href="../org.tizen.native.appprogramming/html/guide/media/launching_camera.htm
328         ">here</a>.
329         * @remarks              In a zero-shutter-lag camera, the state changes to ::CAMERA_STATE_PREVIEW after capturing.
330         * @remarks              The zero-shutter-lag capability can be checked using MediaCapability::GetValue(const Tizen::Base::String& key, bool& value) with
331         *                               ::CAMERA_PRIMARY_SUPPORT_ZERO_SHUTTER_LAG, ::CAMERA_SECONDARY_SUPPORT_ZERO_SHUTTER_LAG keys.
332         * @see                  ICameraEventListener::OnCameraCaptured()
333         */
334         result Capture(void);
335
336         /**
337         * Gets the state of the camera in CameraState.
338         *
339         * @since                2.0
340         *
341         * @return           The current state of the camera
342         * @see          StopPreview()
343         * @see          SetAutoFocus()
344         * @see          Capture()
345         */
346         CameraState GetState(void) const;
347
348         /**
349         * Sets the brightness level of the camera input data.
350         *
351         * @since                2.0
352         * @privilege    %http://tizen.org/privilege/camera
353         *
354         * @return               An error code
355         * @param[in]    brightness                                      The brightness level to set @n
356         *                                                                                       The range of this parameter is from @c 0 to @c 9.
357         * @exception    E_SUCCESS                                       The method is successful.
358         * @exception    E_INVALID_STATE                         This instance is in an invalid state for this method.
359         * @exception    E_OUT_OF_RANGE                          The specified @c brightness is out of range.
360         * @exception    E_DEVICE_BUSY                           The camera is under use by other application.
361         * @exception    E_DEVICE_UNAVAILABLE            The camera becomes unavailable.
362         * @exception    E_DEVICE_FAILED                         The device operation has failed.
363         * @exception    E_UNSUPPORTED_OPERATION     The target device does not support brightness configuration feature.
364         * @exception    E_OUT_OF_MEMORY                         The memory is insufficient.
365         * @exception    E_PRIVILEGE_DENIED                      The application does not have the privilege to call this method.
366         * @remarks              The default brightness level is @c 5. @n
367         *                               The device's supported range for the brightness level is from @c 0 to @c 9. @n
368         *                               This method works correctly when PowerOn() is executed. @n@n
369         *                               For more information on the relationship between this method and the PowerOn() method, and the
370         *               state transition caused by this method, see <a href="../org.tizen.native.appprogramming/html/guide/media/launching_camera.htm
371         ">here</a>.
372         * @see                  GetBrightness()
373         */
374         result SetBrightness(int brightness);
375
376         /**
377         * Gets the brightness level of the camera input data.
378         *
379         * @since                2.0
380         *
381         * @return               The current brightness level @n
382         *                               The returned value ranges from @c 0 to @c 9.
383         * @remarks              The device's supported range for the brightness level is from @c 0 to @c 9.
384         * @see                  SetBrightness()
385         */
386         int GetBrightness(void) const;
387
388         /**
389         * Sets the contrast level of the %Camera input data.
390         *
391         * @since                2.0
392         * @privilege    %http://tizen.org/privilege/camera
393         *
394         * @return           An error code
395         * @param[in]    contrast                                        The contrast level to set @n
396         *                                                                                       The range of this parameter is from @c 0 to @c 9.
397         * @exception    E_SUCCESS                                       The method is successful.
398         * @exception    E_INVALID_STATE                         This instance is in an invalid state for this method.
399         * @exception    E_OUT_OF_RANGE                          The specified contrast is out of range.
400         * @exception    E_DEVICE_BUSY                           The camera is under use by other application.
401         * @exception    E_DEVICE_UNAVAILABLE            The camera becomes unavailable.
402         * @exception    E_DEVICE_FAILED                         The device operation has failed.
403         * @exception    E_UNSUPPORTED_OPERATION     The target device does not support contrast configuration feature.
404         * @exception    E_OUT_OF_MEMORY                         The memory is insufficient.
405         * @exception    E_PRIVILEGE_DENIED                      The application does not have the privilege to call this method.
406         * @remarks              The default contrast level is @c 5. @n
407         *                               The device's supported range for the contrast level is from @c 0 to @c 9. @n
408         *                               This method works correctly when PowerOn() is executed. @n@n
409         *                               For more information on the relationship between this method and the PowerOn() method, and the
410         *               state transition caused by this method, see <a href="../org.tizen.native.appprogramming/html/guide/media/launching_camera.htm
411         ">here</a>.
412         * @see                  GetContrast()
413         */
414         result SetContrast(int contrast);
415
416         /**
417         * Gets the contrast level of the camera input data.
418         *
419         * @since                2.0
420         *
421         * @return               The current contrast level @n
422         *                               The returned value ranges from @c 0 to @c 9.
423         * @remarks              The device's supported range for the contrast level is from @c 0 to @c 9.
424         * @see                  SetContrast()
425         */
426         int GetContrast(void) const;
427
428         /**
429         * Zooms in the camera.
430         *
431         * @since                2.0
432         * @privilege    %http://tizen.org/privilege/camera
433         *
434         * @return               An error code
435         * @exception    E_SUCCESS                                       The method is successful.
436         * @exception    E_INVALID_STATE                         This instance is in an invalid state for this method.
437         * @exception    E_DEVICE_BUSY                           The camera is under use by other application.
438         * @exception    E_DEVICE_UNAVAILABLE            The camera becomes unavailable.
439         * @exception    E_DEVICE_FAILED                         The device operation has failed.
440         * @exception    E_UNSUPPORTED_OPERATION     The target device does not support zooming feature.
441         * @exception    E_OUT_OF_MEMORY                         The memory is insufficient.
442         * @exception    E_PRIVILEGE_DENIED                      The application does not have the privilege to call this method.
443         * @remarks              This method returns E_UNSUPPORTED_OPERATION in the Emulator.
444         *                               If Camera supports only ::CAMERA_ZOOM_TYPE_SMART, the zoom ratio can differ according
445         *                               to the preview, capture, and recording resolutions.
446         *                               The supported zoom types can be obtained by using the
447         *                               MediaCapability::GetValueN(CAMERA_PRIMARY_ZOOM_TYPE) method. @n@n
448         *               For more information on the relationship between this method and the PowerOn() method, and the
449         *               state transition caused by this method, see <a href="../org.tizen.native.appprogramming/html/guide/media/launching_camera.htm
450         ">here</a>.
451         * @see                  ZoomOut()
452         * @see          GetZoomLevel()
453         * @see          GetMaxZoomLevel()
454         */
455         result ZoomIn(void);
456
457         /**
458         * Zooms out the camera.
459         *
460         * @since                2.0
461         * @privilege    %http://tizen.org/privilege/camera
462         *
463         * @return               An error code
464         * @exception    E_SUCCESS                                       The method is successful.
465         * @exception    E_INVALID_STATE                         This instance is in an invalid state for this method.
466         * @exception    E_DEVICE_BUSY                           The camera is under use by other application.
467         * @exception    E_DEVICE_UNAVAILABLE            The camera becomes unavailable.
468         * @exception    E_DEVICE_FAILED                         The device operation has failed.
469         * @exception    E_UNSUPPORTED_OPERATION     The target device does not support zooming feature.
470         * @exception    E_OUT_OF_MEMORY                         The memory is insufficient.
471         * @exception    E_PRIVILEGE_DENIED                      The application does not have the privilege to call this method.
472         * @remarks              This method returns E_UNSUPPORTED_OPERATION in the Emulator.
473         *                               If CameraZoomType supports only ::CAMERA_ZOOM_TYPE_SMART, zoom ratio can differ according to
474         *                               the preview, capture, and recording resolutions.
475         *                               The supported zoom types can be obtained by using the
476         *                               MediaCapability::GetValueN(CAMERA_PRIMARY_ZOOM_TYPE) method. @n@n
477         *               For more information on the relationship between this method and the PowerOn() method, and the
478         *               state transition caused by this method, see <a href="../org.tizen.native.appprogramming/html/guide/media/launching_camera.htm
479         ">here</a>.
480         * @see                  ZoomIn()
481         * @see          GetZoomLevel()
482         * @see          GetMaxZoomLevel()
483         */
484         result ZoomOut(void);
485
486         /**
487         * Gets the zoom level of the camera.
488         *
489         * @since                2.0
490         *
491         * @return               The current zoom level
492         * @remarks              The zoom level is different for each camera device.
493         * @see                  ZoomIn()
494         * @see              ZoomOut()
495         * @see          GetMaxZoomLevel()
496         */
497         int GetZoomLevel(void) const;
498
499         /**
500         * Gets the maximum zoom level supported by this %Camera.
501         *
502         * @since                2.0
503         *
504         * @return               The maximum zoom level
505         * @remarks              The zoom level is different for each camera device.
506         * @see                  ZoomIn()
507         * @see          ZoomOut()
508         * @see          GetZoomLevel()
509         */
510         int GetMaxZoomLevel(void) const;
511
512         /**
513         * Sets the current resolution of the preview.
514         *
515         * @since                2.0
516         * @privilege    %http://tizen.org/privilege/camera
517         *
518         * @return               An error code
519         * @param[in]    resolution                  The preview resolution @n
520         *                                                                       It must be one of the listed dimensions that are extracted using GetSupportedPreviewResolutionListN().
521         * @exception    E_SUCCESS                                       The method is successful.
522         * @exception    E_INVALID_STATE                         This instance is in an invalid state for this method.
523         * @exception    E_OUT_OF_RANGE                          The position or size is out of range.
524         * @exception    E_OUT_OF_MEMORY                         The memory is insufficient.
525         * @exception    E_DEVICE_BUSY                           The camera is under use by other application.
526         * @exception    E_DEVICE_UNAVAILABLE            The camera becomes unavailable.
527         * @exception    E_UNSUPPORTED_OPERATION         The target device does not support preview resolution configuration feature.
528         * @exception    E_DEVICE_FAILED                         The device operation has failed.
529         * @exception    E_PRIVILEGE_DENIED                      The application does not have the privilege to call this method.
530         * @remarks              This method works in the ::CAMERA_STATE_INITIALIZED state. @n@n
531         *                               For more information on the relationship between this method and the PowerOn() method, and the
532         *               state transition caused by this method, see <a href="../org.tizen.native.appprogramming/html/guide/media/launching_camera.htm
533         ">here</a>.
534         * @see                  GetPreviewResolution()
535         */
536         result SetPreviewResolution(const Tizen::Graphics::Dimension& resolution);
537
538         /**
539         * Gets the current resolution of the preview.
540         *
541         * @since                2.0
542         *
543         * @return               The current preview resolution
544         * @see                  SetPreviewResolution()
545         */
546         Tizen::Graphics::Dimension GetPreviewResolution(void) const;
547
548         /**
549         * Gets the supported preview resolution list of the %Camera class. @n
550         * Each item in the returned list contains a pointer of Tizen::Graphics::Dimension value.
551         *
552         * @since                2.0
553         *
554         * @return       A list of dimensions that represent the preview resolutions supported by the %Camera class, @n
555         *                               else @c null if no preview resolution is supported or an exception occurs
556         * @exception    E_SUCCESS                               The method is successful.
557         * @exception    E_SYSTEM                                A system error has occurred.
558         * @exception    E_OUT_OF_MEMORY                 The memory is insufficient.
559         * @remarks              The specific error code can be accessed using the GetLastResult() method. @n
560         *                               The return value and each item in the list must be deleted by the caller.
561         * @see                  SetPreviewResolution()
562         * @see          GetPreviewResolution()
563         */
564         Tizen::Base::Collection::IList* GetSupportedPreviewResolutionListN(void) const;
565
566
567         /**
568         * Sets the capturing resolution of the camera. @n
569         * Initially, the default resolution is set using the internal configuration.
570         *
571         * @since                2.0
572         * @privilege    %http://tizen.org/privilege/camera
573         *
574         * @return               An error code
575         * @param[in]    resolution                                      The display resolution @n
576         *                                                                       The display resolution must be one of the values extracted using GetSupportedCaptureResolutionListN().
577         * @exception    E_SUCCESS                                       The method is successful.
578         * @exception    E_INVALID_STATE                         This instance is in an invalid state for this method.
579         * @exception    E_SYSTEM                                        A system error has occurred.
580         * @exception    E_OUT_OF_RANGE                          The specified resolution is out of range.
581         * @exception    E_DEVICE_BUSY                           The camera is under use by other application.
582         * @exception    E_DEVICE_UNAVAILABLE            The camera becomes unavailable.
583         * @exception    E_DEVICE_FAILED                         The device operation has failed.
584         * @exception    E_UNSUPPORTED_OPERATION     The target device does not support capture resolution configuration feature.
585         * @exception    E_OUT_OF_MEMORY                         The memory is insufficient.
586         * @exception    E_PRIVILEGE_DENIED                      The application does not have the privilege to call this method.
587         * @remarks                      For more information on the relationship between this method and the PowerOn() method, and the
588         *               state transition caused by this method, see <a href="../org.tizen.native.appprogramming/html/guide/media/launching_camera.htm
589         ">here</a>.
590         * @remarks              In a zero-shutter-lag camera, the default preview format applies this feature correctly. The other preview formats are not guaranteed.
591         * @remarks              The zero-shutter-lag capability can be checked using MediaCapability::GetValue(const Tizen::Base::String& key, bool& value) with
592         *                               ::CAMERA_PRIMARY_SUPPORT_ZERO_SHUTTER_LAG, ::CAMERA_SECONDARY_SUPPORT_ZERO_SHUTTER_LAG keys.
593         * @see                  GetCaptureResolution()
594         */
595         result SetCaptureResolution(const Tizen::Graphics::Dimension& resolution);
596
597         /**
598         * Gets the resolution for capturing the data of the camera.
599         *
600         * @since                2.0
601         *
602         * @return               The current resolution for capturing the data of the camera
603         * @see                  SetCaptureResolution()
604         * @see          GetSupportedCaptureResolutionListN()
605         */
606         Tizen::Graphics::Dimension GetCaptureResolution(void) const;
607
608         /**
609         * Gets a list of the capturing resolutions supported by the %Camera class. @n
610         * Each item of the list has a pointer of the Tizen::Graphics::Dimension value.
611         *
612         * @since                2.0
613         *
614         * @return               A list of the capture resolutions supported by the %Camera class @n
615         *                               else @c null if no capture resolution is supported or an exception occurs
616         * @exception    E_SUCCESS                               The method is successful.
617         * @exception    E_SYSTEM                                A system error has occurred.
618         * @exception    E_OUT_OF_MEMORY                 The memory is insufficient.
619         * @remarks              The specific error code can be accessed using the GetLastResult() method. @n
620         *                               The return value and each item in the list must be deleted by the caller.
621         * @see                  SetCaptureResolution()
622         * @see          GetCaptureResolution()
623         */
624         Tizen::Base::Collection::IList* GetSupportedCaptureResolutionListN(void) const;
625
626         /**
627         * Sets the effect for the input data of the camera.
628         *
629         * @since                2.0
630         * @privilege    %http://tizen.org/privilege/camera
631         *
632         * @return               An error code
633         * @param[in]    effect                                          The effect for the input data of the camera
634         * @exception    E_SUCCESS                                       The method is successful.
635         * @exception    E_INVALID_STATE                         This instance is in an invalid state for this method.
636         * @exception    E_INVALID_ARG                           The specified input parameter is invalid.
637         * @exception    E_DEVICE_BUSY                           The camera is under use by other application.
638         * @exception    E_DEVICE_UNAVAILABLE            The camera becomes unavailable.
639         * @exception    E_DEVICE_FAILED                         The device operation has failed.
640         * @exception    E_UNSUPPORTED_OPERATION     The target device does not support effect configuration feature.
641         * @exception    E_UNSUPPORTED_TYPE          The specified @c effect is not supported.
642         * @exception    E_OUT_OF_MEMORY                         The memory is insufficient.
643         * @exception    E_PRIVILEGE_DENIED                      The application does not have the privilege to call this method.
644         * @remarks              The default effect is ::CAMERA_EFFECT_NONE.
645         *                               This method returns E_UNSUPPORTED_OPERATION in the Emulator.
646         *                               This method works correctly when PowerOn() is executed. @n@n
647         *                               For more information on the relationship between this method and the PowerOn() method, and the
648         *               state transition caused by this method, see <a href="../org.tizen.native.appprogramming/html/guide/media/launching_camera.htm
649         ">here</a>.
650         * @see                  GetEffect()
651         */
652         result SetEffect(CameraEffect effect);
653
654         /**
655         * Gets the effect for the input data of the camera.
656         *
657         * @since                2.0
658         *
659         * @return               The effect for the input data of the camera
660         * @see                  SetEffect()
661         */
662         CameraEffect GetEffect(void) const;
663
664         /**
665         * @if OSPDEPREC
666         * Sets the camera's flash.
667         *
668         * @brief <i> [Deprecated]  </i>
669         * @deprecated   This method is deprecated. @n
670         * Instead of using this method, use the SetFlashMode() method.
671         * @since                2.0
672         * @privilege    %http://tizen.org/privilege/camera
673         *
674         * @return               An error code
675         * @param[in]    flashOn                                         Set to @c true to switch on the flash light, @n
676         *                                                                                       else @c false
677         * @exception    E_SUCCESS                                       The method is successful.
678         * @exception    E_INVALID_STATE                         This instance is in an invalid state for this method.
679         * @exception    E_DEVICE_BUSY                           The camera is under use by other application.
680         * @exception    E_DEVICE_UNAVAILABLE            The camera becomes unavailable.
681         * @exception    E_DEVICE_FAILED                         The device operation has failed.
682         * @exception    E_OUT_OF_MEMORY                         The memory is insufficient.
683         * @exception    E_UNSUPPORTED_OPERATION     The target device does not support flash configuration feature.
684         * @exception    E_PRIVILEGE_DENIED                      The application does not have the privilege to call this method.
685         * @remarks              The flash is switched on when the camera captures a picture. If the value of @c flashOn is
686         *                               set to @c true, this method returns E_UNSUPPORTED_OPERATION in the Emulator. @n
687         *                               SetFlash(true) works same as SetFlashMode(CAMERA_FLASH_MODE_ON) and SetFlash(false) works same as SetFlashMode(CAMERA_FLASH_MODE_OFF). @n
688         *                               For more information on the relationship between this method and the PowerOn() method, and the
689         *               state transition caused by this method, see <a href="../org.tizen.native.appprogramming/html/guide/media/launching_camera.htm
690         ">here</a>.
691         * @remarks              In a zero-shutter-lag camera, only the default preview format applies this feature.
692         * @see                  IsFlashOn()
693         * @see          SetFlashMode()
694         * @see          CameraFlashMode
695         *
696         */
697         result SetFlash(bool flashOn)
698         {
699                 CameraFlashMode flashMode = CAMERA_FLASH_MODE_ON;
700                 if (!flashOn)
701                 {
702                         flashMode = CAMERA_FLASH_MODE_OFF;
703                 }
704                 return SetFlashMode(flashMode);
705         }
706
707         /**
708         * @if OSPDEPREC
709         * Checks whether the camera's flash is switched on.
710         *
711         * @brief <i> [Deprecated]  </i>
712         * @deprecated   This method is deprecated. @n
713         * Instead of using this method, use the GetFlashMode() method.
714         * @since                2.0
715         *
716         * @return               @c true if the flash light is on, @n
717         *                               else @c false
718         * @remarks              This method works same as return (GetFlashMode()!=CAMERA_FLASH_MODE_OFF).
719         * @see                  SetFlash()
720         * @see          GetFlashMode()
721         * @see          CameraFlashMode
722         * @endif
723         */
724         bool IsFlashOn(void) const
725         {
726                 return (GetFlashMode() != CAMERA_FLASH_MODE_OFF);
727         }
728
729         /**
730         * Sets the camera's flash mode.
731         *
732         * @since                2.0
733         * @privilege    %http://tizen.org/privilege/camera
734         *
735         * @return               An error code
736         * @param[in]    flashMode                                       flash mode to switch on the flash light.
737         * @exception    E_SUCCESS                                       The method is successful.
738         * @exception    E_INVALID_STATE                         This instance is in an invalid state for this method.
739         * @exception    E_INVALID_ARG                           The specified flash mode is invalid.
740         * @exception    E_DEVICE_BUSY                           The camera is under use by other application.
741         * @exception    E_DEVICE_UNAVAILABLE            The camera becomes unavailable.
742         * @exception    E_DEVICE_FAILED                         The device operation has failed.
743         * @exception    E_OUT_OF_MEMORY                         The memory is insufficient.
744         * @exception    E_UNSUPPORTED_OPERATION     The target device does not support flash configuration feature.
745         * @exception    E_UNSUPPORTED_TYPE          The specified @c flashMode is not supported.
746         * @exception    E_PRIVILEGE_DENIED                      The application does not have the privilege to call this method.
747         * @remarks              Normally the flash splashes before the camera captures a picture. @n
748         *                               ::CAMERA_FLASH_MODE_CONTINUOUS keeps the flash turned on after the method is called until ::CAMERA_FLASH_MODE_OFF is set. @n
749         *                               This method returns E_UNSUPPORTED_OPERATION in the Emulator.
750         * @remarks              In a zero-shutter-lag camera, the default preview format applies this feature correctly. The other preview formats are not guaranteed.
751         * @remarks              The zero-shutter-lag capability can be checked using MediaCapability::GetValue(const Tizen::Base::String& key, bool& value) with
752         *                               ::CAMERA_PRIMARY_SUPPORT_ZERO_SHUTTER_LAG, ::CAMERA_SECONDARY_SUPPORT_ZERO_SHUTTER_LAG keys.
753         * @see                  GetFlashMode()
754         */
755         result SetFlashMode(CameraFlashMode flashMode);
756
757         /**
758         * Gets the flash mode of the camera.
759         *
760         * @since                2.0
761         *
762         * @return               The flash mode of the camera
763         * @remarks              If the %Camera doesn't support the flash mode, this method always returns ::CAMERA_FLASH_MODE_OFF.
764         * @see                  SetFlashMode()
765         */
766         CameraFlashMode GetFlashMode(void) const;
767
768         /**
769         * Sets the exposure level of the camera.
770         *
771         * @since                2.0
772         * @privilege    %http://tizen.org/privilege/camera
773         *
774         * @return               An error code
775         * @param[in]    exposure                                        The camera exposure level @n
776         *                                                                                       The range of this parameter is from @c 0 to @c 9.
777         * @exception    E_SUCCESS                                       The method is successful.
778         * @exception    E_INVALID_STATE                         This instance is in an invalid state for this method.
779         * @exception    E_OUT_OF_RANGE                          The specified exposure level is out of range.
780         * @exception    E_DEVICE_BUSY                           The camera is under use by other application.
781         * @exception    E_DEVICE_UNAVAILABLE            The camera becomes unavailable.
782         * @exception    E_DEVICE_FAILED                         The device operation has failed.
783         * @exception    E_UNSUPPORTED_OPERATION     The target device does not support exposure configuration feature.
784         * @exception    E_OUT_OF_MEMORY                         The memory is insufficient.
785         * @exception    E_PRIVILEGE_DENIED                      The application does not have the privilege to call this method.
786         * @remarks              The default exposure level is @c 5.
787         *                               The supported range for exposure level is from @c 0 to @c 9.
788         *                               This method returns E_UNSUPPORTED_OPERATION in the Emulator.
789         *                               This method works correctly when PowerOn() is executed. @n@n
790         *                               For more information on the relationship between this method and the PowerOn() method, and the
791         *               state transition caused by this method, see <a href="../org.tizen.native.appprogramming/html/guide/media/launching_camera.htm
792         ">here</a>.
793         * @see                  GetExposure()
794         */
795         result SetExposure(int exposure);
796
797         /**
798         * Gets the exposure level of the camera.
799         *
800         * @since                2.0
801         *
802         * @return               An integer value representing the exposure level of the camera @n
803         *                               The returned value ranges from @c 0 to @c 9.
804         * @remarks              The supported range for exposure level is from @c 0 to @c 9.
805         * @see                  SetExposure()
806         */
807         int GetExposure(void) const;
808
809         /**
810         * Sets the white balance level of the camera.
811         *
812         * @since                2.0
813         * @privilege    %http://tizen.org/privilege/camera
814         *
815         * @return               An error code
816         * @param[in]    whiteBalance                            The camera white balance level
817         * @exception    E_SUCCESS                                       The method is successful.
818         * @exception    E_INVALID_STATE                         This instance is in an invalid state for this method.
819         * @exception    E_INVALID_ARG                           The specified input parameter is invalid.
820         * @exception    E_DEVICE_BUSY                           The camera is under use by other application.
821         * @exception    E_DEVICE_UNAVAILABLE            The camera becomes unavailable.
822         * @exception    E_DEVICE_FAILED                         The device operation has failed.
823         * @exception    E_UNSUPPORTED_OPERATION     The target device does not support white balance configuration feature.
824         * @exception    E_UNSUPPORTED_TYPE          The specified @c whiteBalance is not supported.
825         * @exception    E_OUT_OF_MEMORY                         The memory is insufficient.
826         * @exception    E_PRIVILEGE_DENIED                      The application does not have the privilege to call this method.
827         * @remarks              The default white balance is ::CAMERA_WHITE_BALANCE_AUTO.
828         *                               This method returns E_UNSUPPORTED_OPERATION in the Emulator.
829         *                               This method works correctly when PowerOn() is executed. @n@n
830         *                               For more information on the relationship between this method and the PowerOn() method, and the
831         *               state transition caused by this method, see <a href="../org.tizen.native.appprogramming/html/guide/media/launching_camera.htm
832         ">here</a>.
833         * @see                  GetWhiteBalance()
834         */
835         result SetWhiteBalance(CameraWhiteBalance whiteBalance);
836
837         /**
838         * Gets the white balance level of the camera.
839         *
840         * @since                2.0
841         *
842         * @return               The white balance level of the camera
843         * @see                  SetWhiteBalance()
844         */
845         CameraWhiteBalance GetWhiteBalance(void) const;
846
847         /**
848         * Sets the capturing quality of the camera.
849         *
850         * @since                2.0
851         * @privilege    %http://tizen.org/privilege/camera
852         *
853         * @return               An error code
854         * @param[in]    quality                                         The camera's quality level
855         * @exception    E_SUCCESS                                       The method is successful.
856         * @exception    E_INVALID_STATE                         This instance is in an invalid state for this method.
857         * @exception    E_INVALID_ARG                           The specified @c quality is not supported.
858         * @exception    E_DEVICE_BUSY                           The camera is under use by other application.
859         * @exception    E_DEVICE_UNAVAILABLE            The camera becomes unavailable.
860         * @exception    E_DEVICE_FAILED                         The device operation has failed.
861         * @exception    E_UNSUPPORTED_OPERATION         The target device does not support capturing quality configuration feature.
862         * @exception    E_OUT_OF_MEMORY                         The memory is insufficient.
863         * @exception    E_PRIVILEGE_DENIED                      The application does not have the privilege to call this method.
864         * @remarks              The default quality is ::CAMERA_QUALITY_NORMAL.
865         *                               This method works correctly when PowerOn() is executed. @n@n
866         *                               For more information on the relationship between this method and the PowerOn() method, and the
867         *               state transition caused by this method, see <a href="../org.tizen.native.appprogramming/html/guide/media/launching_camera.htm
868         ">here</a>.
869         * @see                  GetQuality()
870         */
871         result SetQuality(CameraQuality quality);
872
873         /**
874         * Gets the capturing quality of the camera.
875         *
876         * @since                2.0
877         *
878         * @return               The %Camera quality level
879         * @see                  SetQuality()
880         */
881         CameraQuality GetQuality(void) const;
882
883         /**
884         * Sets the focus mode of the camera.
885         *
886         * @since                2.0
887         * @privilege    %http://tizen.org/privilege/camera
888         *
889         * @return               An error code
890         * @param[in]    focusMode                               focus mode
891         * @exception    E_SUCCESS                                       The method is successful.
892         * @exception    E_INVALID_STATE                         This instance is in an invalid state for this method.
893         * @exception    E_DEVICE_BUSY                           The camera is under use by other application.
894         * @exception    E_DEVICE_UNAVAILABLE            The camera becomes unavailable.
895         * @exception    E_DEVICE_FAILED                         The device operation has failed.
896         * @exception    E_INVALID_ARG                           The specified focus mode is invalid.
897         * @exception    E_UNSUPPORTED_OPERATION  The target device does not support focus mode configuration feature.
898         * @exception    E_UNSUPPORTED_TYPE                The specified @c focusMode is not supported.
899         * @exception    E_OUT_OF_MEMORY                         The memory is insufficient.
900         * @exception    E_PRIVILEGE_DENIED                      The application does not have the privilege to call this method.
901         * @remarks      ::CAMERA_FOCUS_MODE_NONE always throws E_INVALID_ARG.
902         * @see          GetFocusMode()
903         */
904         result SetFocusMode(CameraFocusMode focusMode);
905
906         /**
907         * Gets the focus mode of the camera.
908         *
909         * @since                2.0
910         *
911         * @return               The %Camera focus mode
912         * @remarks      If the %Camera does not support the focus mode, this method always returns ::CAMERA_FOCUS_MODE_NONE.
913         * @see          SetFocusMode()
914         */
915         CameraFocusMode GetFocusMode(void) const;
916
917         /**
918         * Sets the auto focus point list.
919         *
920         * @since                2.0
921         * @privilege    %http://tizen.org/privilege/camera
922         *
923         * @return               An error code
924         * @param[in]    pointList                               The auto focus point list which consists of Tizen::Graphics::Point pointers
925         * @exception    E_SUCCESS                                       The method is successful.
926         * @exception    E_INVALID_STATE                         This instance is in an invalid state for this method.
927         * @exception    E_DEVICE_BUSY                           The camera is under use by other application.
928         * @exception    E_DEVICE_UNAVAILABLE            The camera becomes unavailable.
929         * @exception    E_DEVICE_FAILED                         The device operation has failed.
930         * @exception    E_INVALID_ARG                           The specified input parameter is invalid.
931         * @exception    E_UNSUPPORTED_OPERATION  The target device does not support focus pointing feature.
932         * @exception    E_UNSUPPORTED_TYPE                      This method is not supported for the current focus mode.
933         * @exception    E_OUT_OF_MEMORY                         The memory is insufficient.
934         * @exception    E_PRIVILEGE_DENIED                      The application does not have the privilege to call this method.
935         * @remarks      This method works fine when the current focus mode is @c CAMERA_FOCUS_MODE_NORMAL or @c CAMERA_FOCUS_MODE_MACRO.@n
936         *                       If the input parameter has a empty list, the focus area is changed to the center.
937         * @see          GetAutoFocusPointN()
938         */
939         result SetAutoFocusPoint(const Tizen::Base::Collection::IList& pointList);
940
941         /**
942         * Gets the auto focus point list. @n
943         * Each item of the list has a pointer of the Tizen::Graphics::Point value.
944         *
945         * @since                2.0
946         *
947         * @return               The %Camera auto focus point list @n
948         *               A list of points that represent the auto focus point, @n
949         *                               else @c null if no auto focus point is set or if an exception occurs.
950         * @exception    E_SUCCESS                                       The method is successful.
951         * @exception    E_OUT_OF_MEMORY                         The memory is insufficient.
952         * @remarks      The specific error code can be accessed using the GetLastResult() method. @n
953         *                       The return value and each item in the list must be deleted by the caller.
954         * @see          SetAutoFocusPoint()
955         */
956         Tizen::Base::Collection::IList* GetAutoFocusPointN(void) const;
957
958         /**
959         * Sets the auto focus mode of the camera.
960         *
961         * @since                2.0
962         * @privilege    %http://tizen.org/privilege/camera
963         *
964         * @return               An error code
965         * @param[in]    callback                                        Set to @c true to enable auto focus callback, @n
966         *                                                                                       else @c false
967         * @exception    E_SUCCESS                                       The method is successful.
968         * @exception    E_INVALID_STATE                         This instance is in an invalid state for this method.
969         * @exception    E_DEVICE_BUSY                           The camera is under use by other application.
970         * @exception    E_DEVICE_UNAVAILABLE            The camera becomes unavailable.
971         * @exception    E_DEVICE_FAILED                         The device operation has failed.
972         * @exception    E_UNSUPPORTED_OPERATION     The target device does not support auto focus feature.
973         * @exception    E_OUT_OF_MEMORY                         The memory is insufficient.
974         * @exception    E_PRIVILEGE_DENIED                      The application does not have the privilege to call this method.
975         * @remarks              If @c callback is set to @c false, the ICameraEventListener::OnCameraAutoFocused() method is not called.
976         *                               This method throws @c E_UNSUPPORTED_OPERATION in the emulator. @n
977         *               For more information on the relationship between this method and the PowerOn() method, and the
978         *               state transition caused by this method, see <a href="../org.tizen.native.appprogramming/html/guide/media/launching_camera.htm
979         ">here</a>.
980         */
981         result SetAutoFocus(bool callback);
982
983         /**
984         * Sets the capturing format of the camera. @n
985         * Initially, the default format is set using the internal configuration.
986         *
987         * @since                2.0
988         * @privilege    %http://tizen.org/privilege/camera
989         *
990         * @return               An error code
991         * @param[in]    format                                          The camera's capture format @n
992         *                                                                                       It must be one of the pixel formats extracted using GetSupportedCaptureFormatListN().
993         * @exception    E_SUCCESS                                       The method is successful.
994         * @exception    E_INVALID_STATE                         This instance is in an invalid state for this method.
995         * @exception    E_SYSTEM                                        A system error has occurred.
996         * @exception    E_UNSUPPORTED_FORMAT            The specified format is not supported.
997         * @exception    E_DEVICE_BUSY                           The camera is under use by other application.
998         * @exception    E_DEVICE_UNAVAILABLE            The camera becomes unavailable.
999         * @exception    E_DEVICE_FAILED                         The device operation has failed.
1000         * @exception    E_UNSUPPORTED_OPERATION     The target device does not support capture format configuration feature.
1001         * @exception    E_OUT_OF_MEMORY                         The memory is insufficient.
1002         * @exception    E_PRIVILEGE_DENIED                      The application does not have the privilege to call this method.
1003         * @remarks              This method works correctly when PowerOn() is executed.
1004         * @see                  GetCaptureFormat()
1005         */
1006         result SetCaptureFormat(const Tizen::Graphics::PixelFormat format);
1007
1008         /**
1009         * Gets the capturing format of the camera.
1010         *
1011         * @since                2.0
1012         *
1013         * @return               The capturing format of the camera
1014         * @see                  SetCaptureFormat()
1015         * @see          GetSupportedCaptureFormatListN()
1016         */
1017         Tizen::Graphics::PixelFormat GetCaptureFormat(void) const;
1018
1019         /**
1020         * Gets the supported capturing format list for the %Camera class. @n
1021         * Each list item has a Tizen::Graphics::PixelFormat value.
1022         *
1023         * @since                2.0
1024         *
1025         * @return               A list of the formats supported by the %Camera class, @n
1026         *                               else @c null if no capture format is supported or an exception occurs
1027         * @exception    E_SUCCESS                               The method is successful.
1028         * @exception    E_SYSTEM                                A system error has occurred.
1029         * @exception    E_OUT_OF_MEMORY                 The memory is insufficient.
1030         * @remarks              The specific error code can be accessed using the GetLastResult() method. @n
1031         *                               The return value must be deleted.
1032         * @see                  SetCaptureFormat()
1033         * @see          GetCaptureFormat()
1034         */
1035         Tizen::Base::Collection::IListT <Tizen::Graphics::PixelFormat>* GetSupportedCaptureFormatListN(void) const;
1036
1037         /**
1038         * Sets the preview format of the camera. @n
1039         * Initially, the default format is set using the internal configuration.
1040         *
1041         * @since                2.0
1042         * @privilege    %http://tizen.org/privilege/camera
1043         *
1044         * @return               An error code
1045         * @param[in]    format                                          The camera's preview format @n
1046         *                                                                                       It must be one of the pixel formats extracted using GetSupportedPreviewFormatListN().
1047         * @exception    E_SUCCESS                                       The method is successful.
1048         * @exception    E_INVALID_STATE                         This instance is in an invalid state for this method.
1049         * @exception    E_SYSTEM                                        A system error has occurred.
1050         * @exception    E_UNSUPPORTED_FORMAT            The specified format is not supported.
1051         * @exception    E_DEVICE_BUSY                           The camera is under use by other application.
1052         * @exception    E_DEVICE_UNAVAILABLE            The camera becomes unavailable.
1053         * @exception    E_DEVICE_FAILED                         The device operation has failed.
1054         * @exception    E_UNSUPPORTED_OPERATION     The target device does not support preview format configuration feature.
1055         * @exception    E_OUT_OF_MEMORY                         The memory is insufficient.
1056         * @exception    E_PRIVILEGE_DENIED                      The application does not have the privilege to call this method.
1057         * @remarks              This method works in ::CAMERA_STATE_INITIALIZED state. @n@n
1058         *                               For more information on the relationship between this method and the PowerOn() method, and the
1059         *               state transition caused by this method, see <a href="../org.tizen.native.appprogramming/html/guide/media/launching_camera.htm
1060         ">here</a>.
1061         * @see                  GetPreviewFormat()
1062         * @see          GetSupportedPreviewFormatListN()
1063         */
1064         result SetPreviewFormat(const Tizen::Graphics::PixelFormat format);
1065
1066         /**
1067         * Gets the preview format of the camera.
1068         *
1069         * @since                2.0
1070         *
1071         * @return               The preview format of the camera
1072         * @see                  SetPreviewFormat()
1073         * @see          GetSupportedPreviewFormatListN()
1074         */
1075         Tizen::Graphics::PixelFormat GetPreviewFormat(void) const;
1076
1077         /**
1078         * Gets the supported preview format list for the %Camera class. @n
1079         * Each list item has a Tizen::Graphics::PixelFormat value.
1080         *
1081         * @since                2.0
1082         *
1083         * @return               A list of the preview format supported by the %Camera class, @n
1084         *                               else @c null if no preview format is supported or an exception occurs
1085         * @exception    E_SUCCESS                               The method is successful.
1086         * @exception    E_SYSTEM                                A system error has occurred.
1087         * @exception    E_OUT_OF_MEMORY                 The memory is insufficient.
1088         * @remarks              The specific error code can be accessed using the GetLastResult() method. @n
1089         *                               The return value must be deleted.
1090         * @see                  SetPreviewFormat()
1091         * @see          GetPreviewFormat()
1092         */
1093         Tizen::Base::Collection::IListT <Tizen::Graphics::PixelFormat>* GetSupportedPreviewFormatListN(void) const;
1094
1095
1096         /**
1097         * Sets the ISO level of the camera.
1098         *
1099         * @since                2.0
1100         * @privilege    %http://tizen.org/privilege/camera
1101         *
1102         * @return               An error code
1103         * @param[in]    isoLevel                                        The camera's ISO level @n
1104         *                                                                                       The default ISO level is set from the internal configuration.
1105         * @exception    E_SUCCESS                                       The method is successful.
1106         * @exception    E_INVALID_STATE                         This instance is in an invalid state for this method.
1107         * @exception    E_OUT_OF_RANGE                          The specified ISO level is out of range.
1108         * @exception    E_DEVICE_BUSY                           The camera is under use by other application.
1109         * @exception    E_DEVICE_UNAVAILABLE            The camera becomes unavailable.
1110         * @exception    E_DEVICE_FAILED                         The device operation has failed.
1111         * @exception    E_UNSUPPORTED_OPERATION         The target device does not support iso level configuration feature.
1112         * @exception    E_UNSUPPORTED_TYPE          The specified @c isoLevel is not supported.
1113         * @exception    E_OUT_OF_MEMORY                         The memory is insufficient.
1114         * @exception    E_PRIVILEGE_DENIED                      The application does not have the privilege to call this method.
1115         * @remarks              In some devices this method works in the ::CAMERA_STATE_PREVIEW state.
1116         *                               This method throws E_UNSUPPORTED_OPERATION in the Emulator. @n@n
1117         *                               For more information on the relationship between this method and the PowerOn() method, and the
1118         *               state transition caused by this method, see <a href="../org.tizen.native.appprogramming/html/guide/media/launching_camera.htm
1119         ">here</a>.
1120         * @see                  GetIsoLevel()
1121         */
1122         result SetIsoLevel(CameraIsoLevel isoLevel);
1123
1124         /**
1125         * Gets the ISO level of the camera.
1126         *
1127         * @since                2.0
1128         *
1129         * @return               The ISO level of the camera
1130         * @see                  SetIsoLevel()
1131         */
1132         CameraIsoLevel GetIsoLevel(void) const;
1133
1134         /**
1135         * Sets the preview frame rate of the camera. @n
1136         * Initially, the default frame rate is set using the internal configuration.
1137         *
1138         * @since                2.0
1139         * @privilege    %http://tizen.org/privilege/camera
1140         *
1141         * @return               An error code
1142         * @param[in]    fps                                                     The frame rate per second
1143         * @exception    E_SUCCESS                                       The method is successful.
1144         * @exception    E_INVALID_STATE                         This instance is in an invalid state for this method.
1145         * @exception    E_OUT_OF_RANGE                          The specified @c fps is out of range on this device.
1146         * @exception    E_DEVICE_BUSY                           The camera is under use by other application.
1147         * @exception    E_DEVICE_UNAVAILABLE            The camera becomes unavailable.
1148         * @exception    E_DEVICE_FAILED                         The device operation has failed.
1149         * @exception    E_UNSUPPORTED_OPERATION         The target device does not support preview frame rate configuration feature.
1150         * @exception    E_OUT_OF_MEMORY                         The memory is insufficient.
1151         * @exception    E_PRIVILEGE_DENIED                      The application does not have the privilege to call this method.
1152         * @remarks              This method works in ::CAMERA_STATE_INITIALIZED state. @n@n
1153         *                               For more information on the relationship between this method and the PowerOn() method, and the
1154         *               state transition caused by this method, see <a href="../org.tizen.native.appprogramming/html/guide/media/launching_camera.htm
1155         ">here</a>.
1156         * @see                  GetPreviewFrameRate()
1157         * @see          GetSupportedPreviewFrameRateListN()
1158         * @see          FRAME_RATE_AUTO
1159         */
1160         result SetPreviewFrameRate(int fps);
1161
1162         /**
1163         * Gets the frame rate of the camera.
1164         *
1165         * @since                2.0
1166         *
1167         * @return               The frame rate of the camera @n
1168         *               If the frame rate is not set using SetPreviewFrameRate(), the system-dependent default frame rate is returned.
1169         * @see                  GetSupportedPreviewFrameRateListN()
1170         */
1171         int GetPreviewFrameRate(void) const;
1172
1173         /**
1174         * Gets the supported preview frame rate list for the %Camera class. @n
1175         * Each list item has an integer value.
1176         *
1177         * @since                2.0
1178         *
1179         * @return               A list of the preview frame rate supported by the %Camera class, @n
1180         *                               else @c null if no frame rate is supported or an exception occurs
1181         * @exception    E_SUCCESS                               The method is successful.
1182         * @exception    E_SYSTEM                                A system error has occurred.
1183         * @exception    E_OUT_OF_MEMORY                 The memory is insufficient.
1184         * @remarks              The specific error code can be accessed using the GetLastResult() method. @n
1185         *                               The return value must be deleted by the caller. @n
1186         *                               This method returns fps list that can be supported by all resolutions.
1187         * @see                  SetPreviewFrameRate()
1188         * @see          GetPreviewFrameRate()
1189         * @see          FRAME_RATE_AUTO
1190         * @see                  GetSupportedPreviewFrameRateListN(const Tizen::Graphics::Dimension& dim) const
1191         */
1192         Tizen::Base::Collection::IListT <int>* GetSupportedPreviewFrameRateListN(void) const;
1193
1194         /**
1195         * Gets the supported preview frame rate list of the input resolution of the %Camera class. @n
1196         * Each item of the list has an integer value.
1197         *
1198         * @since                2.0
1199         *
1200         * @return               A list of the preview frame rate of the input preview resolution, @n
1201         *                               else @c null if no frame rate is supported or if an exception occurs
1202         * @param[in]    dim                                             The preview resolution of the camera
1203         * @exception    E_SUCCESS                               The method is successful.
1204         * @exception    E_INVALID_ARG                   The specified input resolution is invalid.
1205         * @exception    E_SYSTEM                                A system error has occurred.
1206         * @exception    E_OUT_OF_MEMORY                 The memory is insufficient.
1207         * @remarks              The specific error code can be accessed using the GetLastResult() method. @n
1208         *                               The return value must be deleted by the caller. @n
1209         * @see                  SetPreviewFrameRate()
1210         * @see          GetPreviewFrameRate()
1211         * @see                  GetSupportedPreviewFrameRateListN(void) const
1212         */
1213         Tizen::Base::Collection::IListT <int>* GetSupportedPreviewFrameRateListN(const Tizen::Graphics::Dimension& dim) const;
1214
1215         /**
1216         * Sets the orientation value in the Exchangeable Image File Format (EXIF) field of the captured data.
1217         *
1218         * @since                2.0
1219         * @privilege    %http://tizen.org/privilege/camera
1220         *
1221         * @return               An error code
1222         * @param[in]    orientation                                     The orientation value to set in EXIF
1223         * @exception    E_SUCCESS                                       The method is successful.
1224         * @exception    E_PRIVILEGE_DENIED                      The application does not have the privilege to call this method.
1225         * @exception    E_INVALID_STATE                         This instance is in an invalid state for this method.
1226         * @exception    E_OUT_OF_RANGE                          The input value is out of range.
1227         * @exception    E_UNSUPPORTED_OPERATION         The target device does not support exif orientation configuration feature.
1228         * @exception    E_SYSTEM                                        A system error has occurred.
1229         * @remarks              The default value of orientation is @c CAMERA_EXIF_ORIENTATION_TOP_LEFT. @n
1230         *                               This method works correctly when PowerOn() is executed. The orientation value set by this method can be obtained using the
1231         *                               Tizen::Content::ImageData::GetOrientation() method after writing the captured data to a file.
1232         */
1233         result SetExifOrientation(CameraExifOrientation orientation);
1234
1235         /**
1236         * Sets the GPS coordinates in the Exchangeable %Image File Format (EXIF) field for the captured data.
1237         *
1238         * @since                2.0
1239         * @privilege    %http://tizen.org/privilege/camera
1240         *
1241         * @return               An error code
1242         * @param[in]    latitude                                        The latitude value to set in EXIF @n
1243         *                                                                                       The valid range is [-90.0, 90.0].
1244         * @param[in]    longitude                                       The longitude value to set in EXIF @n
1245         *                                                                                       The valid range is [-180.0, 180.0]
1246         * @param[in]    altitude                                        The altitude value to set in EXIF
1247         * @exception    E_SUCCESS                                       The method is successful.
1248         * @exception    E_PRIVILEGE_DENIED                      The application does not have the privilege to call this method.
1249         * @exception    E_INVALID_STATE                         This instance is in an invalid state for this method.
1250         * @exception    E_OUT_OF_RANGE                          The input value is out of range.
1251         * @exception    E_UNSUPPORTED_OPERATION         The target device does not support exif gps coordinates configuration feature.
1252         * @exception    E_SYSTEM                                        A system error has occurred.
1253         * @remarks              This method sets the GPS coordinates and enables entering the coordinates into the Exchangeable Image File Format (EXIF).
1254         * @remarks              By default, the GPS coordinates are not entered in JPEG's EXIF.
1255         * @remarks              The GPS coordinates that are set using this method are entered in every call to the
1256         *                               Capture() method, until DisableExifGpsCoordinates() is called or this instance is destroyed. @n
1257         *                               This method works correctly when PowerOn() is executed. @n
1258         *                               The values set by this method can result in an error as compared to the values stored in the Exchangeable Image File Format (EXIF) field.
1259         */
1260         result SetExifGpsCoordinates(double latitude, double longitude, float altitude);
1261
1262         /**
1263         * Disables the insertion of the GPS coordinates in the Exchangeable %Image File Format (EXIF) field for the captured data.
1264         *
1265         * @since                2.0
1266         * @privilege    %http://tizen.org/privilege/camera
1267         *
1268         * @return               An error code
1269         * @exception    E_SUCCESS                                       The method is successful.
1270         * @exception    E_PRIVILEGE_DENIED                      The application does not have the privilege to call this method.
1271         * @exception    E_INVALID_STATE                         This instance is in an invalid state for this method.
1272         * @exception    E_OUT_OF_RANGE                          The input value is out of range.
1273         * @exception    E_UNSUPPORTED_OPERATION         The target device does not support exif gps coordinates configuration feature.
1274         * @exception    E_SYSTEM                                        A system error has occurred.
1275         * @see          SetExifGpsCoordinates()
1276         */
1277         result DisableExifGpsCoordinates(void);
1278
1279         /**
1280         * Sets the flip type for the previewed and captured data.
1281         *
1282         * @since                2.0
1283         * @privilege    %http://tizen.org/privilege/camera
1284         *
1285         * @return               An error code
1286         * @param[in]    flip                                            The camera flip type
1287         * @exception    E_SUCCESS                                       The method is successful.
1288         * @exception    E_PRIVILEGE_DENIED                      The application does not have the privilege to call this method.
1289         * @exception    E_INVALID_STATE                         This instance is in an invalid state for this method.
1290         * @exception    E_INVALID_ARG                           The input value is out of range.
1291         * @exception    E_UNSUPPORTED_OPERATION         The target device does not support flip configuration feature.
1292         * @exception    E_UNSUPPORTED_TYPE          The specified @c flip is not supported.
1293         * @exception    E_SYSTEM                                        A system error has occurred.
1294         * @remarks              This method works in the ::CAMERA_STATE_INITIALIZED state.
1295         * @remarks              Finally the last specified type is applied even with the several types applicable.
1296         * @remarks              In a zero-shutter-lag camera, the default preview format is not guaranteed to apply this feature correctly.
1297         * @remarks              The zero-shutter-lag capability can be checked using MediaCapability::GetValue(const Tizen::Base::String& key, bool& value) with
1298         *                               ::CAMERA_PRIMARY_SUPPORT_ZERO_SHUTTER_LAG, ::CAMERA_SECONDARY_SUPPORT_ZERO_SHUTTER_LAG keys.
1299         * @see          GetFlip()
1300         */
1301         result SetFlip(CameraFlipType flip);
1302
1303         /**
1304         * Gets the flip type for the previewed and captured data.
1305         *
1306         * @since                2.0
1307         *
1308         * @return               The camera flip type
1309         * @see      SetFlip()
1310         */
1311         CameraFlipType GetFlip(void) const;
1312
1313         /**
1314         * Sets the rotation for the previewed data.
1315         *
1316         * @since                2.0
1317         * @privilege    %http://tizen.org/privilege/camera
1318         *
1319         * @return           An error code
1320         * @param[in] rotation                                      The camera rotation
1321         * @exception E_SUCCESS                               The method is successful.
1322         * @exception E_PRIVILEGE_DENIED         The application does not have the privilege to call this method.
1323         * @exception E_INVALID_STATE                         This instance is in an invalid state for this method.
1324         * @exception E_INVALID_ARG                    The input value is out of range.
1325         * @exception E_UNSUPPORTED_OPERATION            The target device does not support preview rotation configuration feature.
1326         * @exception E_UNSUPPORTED_TYPE               The specified @c rotation is not supported.
1327         * @exception E_SYSTEM                                A system error has occurred.
1328         * @remarks   This method works in the ::CAMERA_STATE_INITIALIZED state.
1329         * @remarks   The last specified type is applied even with the several types applicable.
1330         * @remarks   This method rotates the preview and recording data but not the captured image. @n
1331         *            The captured image's orientation is always following the physical rotation.
1332         * @remarks   When the preview is rotated, the preview callback data's width and height can be changed. @n
1333         *            Thus the application must recognize these changes when it uses the preview data in ICameraEventListener::OnCameraPreviewed() callback.
1334         * @remarks   For the intended view of preview, Tizen::Ui::Controls::OverlayRegion::OVERLAY_REGION_TYPE_NORMAL must be selected when Tizen::Ui::Controls::OverlayRegion is created.
1335         * @remarks              In a zero-shutter-lag camera, the default preview format is not guaranteed to apply this feature correctly.
1336         * @remarks              The zero-shutter-lag capability can be checked using MediaCapability::GetValue(const Tizen::Base::String& key, bool& value) with
1337         *                               ::CAMERA_PRIMARY_SUPPORT_ZERO_SHUTTER_LAG, ::CAMERA_SECONDARY_SUPPORT_ZERO_SHUTTER_LAG keys.
1338         * @see                     GetPreviewRotation()
1339         *
1340         */
1341         result SetPreviewRotation(CameraRotation rotation);
1342
1343         /**
1344         *
1345         * Gets the rotation for the previewed data.
1346         *
1347         * @since                2.0
1348         *
1349         * @return           The camera rotation
1350         * @see              SetPreviewRotation()
1351         *
1352         */
1353         CameraRotation GetPreviewRotation(void) const;
1354
1355         /**
1356         * Sets the metering mode of the camera.
1357         *
1358         * @since                2.0
1359         * @privilege    %http://tizen.org/privilege/camera
1360         *
1361         * @return               An error code
1362         * @param[in]    meteringMode                            The metering mode
1363         * @exception    E_SUCCESS                                       The method is successful.
1364         * @exception    E_INVALID_STATE                         This instance is in an invalid state for this method.
1365         * @exception    E_DEVICE_BUSY                           The camera is under use by other application.
1366         * @exception    E_DEVICE_UNAVAILABLE            The camera becomes unavailable.
1367         * @exception    E_DEVICE_FAILED                         The device operation has failed.
1368         * @exception    E_INVALID_ARG                           The specified metering mode is invalid.
1369         * @exception    E_UNSUPPORTED_OPERATION  The target device does not support metering mode configuration feature.
1370         * @exception    E_UNSUPPORTED_TYPE                The specified @c meteringMode is not supported.
1371         * @exception    E_OUT_OF_MEMORY                         The memory is insufficient.
1372         * @exception    E_PRIVILEGE_DENIED                      The application does not have the privilege to call this method.
1373         * @remarks      ::CAMERA_METERING_MODE_NONE always throws E_INVALID_ARG.
1374         * @see          GetMeteringMode()
1375         */
1376         result SetMeteringMode(CameraMeteringMode meteringMode);
1377
1378         /**
1379         * Gets the metering mode of the camera.
1380         *
1381         * @since                2.0
1382         *
1383         * @return               The %Camera metering mode
1384         * @remarks      If the %Camera does not support the metering mode, this method always returns ::CAMERA_METERING_MODE_NONE.
1385         * @see          SetMeteringMode()
1386         */
1387         CameraMeteringMode GetMeteringMode(void) const;
1388
1389         /**
1390          * This value can be used to set the preview frame rate by using the SetPreviewFrameRate() method. @n
1391          * If the preview frame rate is set using this value, the frame rate during the preview is automatically adjusted as per the light condition.
1392          *
1393          * @since               2.0
1394          */
1395         static const int FRAME_RATE_AUTO = 0xFFFFFFFF;
1396
1397 private:
1398         /**
1399          * This is the copy constructor for this class.
1400          *
1401          * @since               2.0
1402          *
1403          * @remarks         The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
1404          * @see                 Construct()
1405          */
1406         Camera(const Camera& rhs);
1407
1408         /**
1409          * This is the copy assignment operator for this class.
1410          *
1411          * @since               2.0
1412          *
1413          * @remarks         The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
1414          *
1415          */
1416         Camera& operator =(const Camera& rhs);
1417
1418         friend class _CameraImpl;
1419         _CameraImpl* __pImpl;
1420
1421 };
1422
1423 }}// Tizen::Media
1424
1425 #endif