Modify the precondition about roi mode setting
[platform/core/api/camera.git] / include / camera.h
1 /*
2  * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 #ifndef __TIZEN_MULTIMEDIA_CAMERA_H__
18 #define __TIZEN_MULTIMEDIA_CAMERA_H__
19
20 #include <tizen.h>
21 #include <media_packet.h>
22
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26
27 /**
28  * @file camera.h
29  * @brief This file contains the Camera API, related structures and enumerations.
30  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
31  */
32
33 /**
34  * @addtogroup CAPI_MEDIA_CAMERA_MODULE
35  * @{
36  */
37
38 #define CAMERA_ERROR_CLASS          TIZEN_ERROR_CAMERA | 0x00
39
40 /**
41  * @brief Enumeration for the error codes of Camera.
42  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
43  */
44 typedef enum {
45         CAMERA_ERROR_NONE                   = TIZEN_ERROR_NONE,                     /**< Successful */
46         CAMERA_ERROR_INVALID_PARAMETER      = TIZEN_ERROR_INVALID_PARAMETER,        /**< Invalid parameter */
47         CAMERA_ERROR_INVALID_STATE          = CAMERA_ERROR_CLASS | 0x02,            /**< Invalid state */
48         CAMERA_ERROR_OUT_OF_MEMORY          = TIZEN_ERROR_OUT_OF_MEMORY,            /**< Out of memory */
49         CAMERA_ERROR_DEVICE                 = CAMERA_ERROR_CLASS | 0x04,            /**< Device error */
50         CAMERA_ERROR_INVALID_OPERATION      = TIZEN_ERROR_INVALID_OPERATION,        /**< Internal error */
51         CAMERA_ERROR_SOUND_POLICY           = CAMERA_ERROR_CLASS | 0x06,            /**< Blocked by Audio Session Manager (Deprecated since 3.0) */
52         CAMERA_ERROR_SECURITY_RESTRICTED    = CAMERA_ERROR_CLASS | 0x07,            /**< Restricted by security system policy */
53         CAMERA_ERROR_DEVICE_BUSY            = CAMERA_ERROR_CLASS | 0x08,            /**< The device is using another application or working on some operation */
54         CAMERA_ERROR_DEVICE_NOT_FOUND       = CAMERA_ERROR_CLASS | 0x09,            /**< No camera device */
55         CAMERA_ERROR_SOUND_POLICY_BY_CALL   = CAMERA_ERROR_CLASS | 0x0a,            /**< Blocked by Audio Session Manager - CALL (Deprecated since 3.0) */
56         CAMERA_ERROR_SOUND_POLICY_BY_ALARM  = CAMERA_ERROR_CLASS | 0x0b,            /**< Blocked by Audio Session Manager - ALARM (Deprecated since 3.0) */
57         CAMERA_ERROR_ESD                    = CAMERA_ERROR_CLASS | 0x0c,            /**< ESD situation */
58         CAMERA_ERROR_PERMISSION_DENIED      = TIZEN_ERROR_PERMISSION_DENIED,        /**< The access to the resources can not be granted*/
59         CAMERA_ERROR_NOT_SUPPORTED          = TIZEN_ERROR_NOT_SUPPORTED,            /**< The feature is not supported */
60         CAMERA_ERROR_RESOURCE_CONFLICT      = CAMERA_ERROR_CLASS | 0x0d,            /**< Blocked by resource conflict (Since 3.0) */
61         CAMERA_ERROR_SERVICE_DISCONNECTED   = CAMERA_ERROR_CLASS | 0x0e,            /**< Socket connection lost (Since 3.0) */
62 } camera_error_e;
63
64 /**
65  * @brief Enumeration for the camera state.
66  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
67  */
68 typedef enum {
69         CAMERA_STATE_NONE,       /**< Before creating */
70         CAMERA_STATE_CREATED,    /**< Created, but not initialized yet */
71         CAMERA_STATE_PREVIEW,    /**< Preview */
72         CAMERA_STATE_CAPTURING,  /**< While capturing */
73         CAMERA_STATE_CAPTURED    /**< After capturing */
74 } camera_state_e;
75
76 /**
77  * @brief Enumeration for the camera device state.
78  * @since_tizen 3.0
79  */
80 typedef enum {
81         CAMERA_DEVICE_STATE_NULL,       /**< Not opened */
82         CAMERA_DEVICE_STATE_OPENED,     /**< Opened */
83         CAMERA_DEVICE_STATE_WORKING     /**< Now previewing or capturing or is being used for video recording */
84 } camera_device_state_e;
85
86 /**
87  * @brief Enumeration for the camera device.
88  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
89  */
90 typedef enum {
91         CAMERA_DEVICE_CAMERA0 = 0, /**< Primary camera */
92         CAMERA_DEVICE_CAMERA1,     /**< Secondary camera */
93         CAMERA_DEVICE_CAMERA2,     /**< Third camera (Since 5.0) */
94         CAMERA_DEVICE_CAMERA3,     /**< 4th camera (Since 5.0) */
95         CAMERA_DEVICE_CAMERA4,     /**< 5th camera (Since 5.0) */
96         CAMERA_DEVICE_CAMERA5,     /**< 6th camera (Since 5.0) */
97         CAMERA_DEVICE_CAMERA6,     /**< 7th camera (Since 5.0) */
98         CAMERA_DEVICE_CAMERA7,     /**< 8th camera (Since 5.0) */
99         CAMERA_DEVICE_CAMERA8,     /**< 9th camera (Since 5.0) */
100         CAMERA_DEVICE_CAMERA9      /**< 10th camera (Since 5.0) */
101 } camera_device_e;
102
103 /**
104  * @brief Enumeration for the camera pixel format.
105  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
106  */
107 typedef enum {
108         CAMERA_PIXEL_FORMAT_INVALID = -1,   /**< Invalid pixel format */
109         CAMERA_PIXEL_FORMAT_NV12,           /**< NV12 pixel format */
110         CAMERA_PIXEL_FORMAT_NV12T,          /**< NV12 Tiled pixel format */
111         CAMERA_PIXEL_FORMAT_NV16,           /**< NV16 pixel format */
112         CAMERA_PIXEL_FORMAT_NV21,           /**< NV21 pixel format */
113         CAMERA_PIXEL_FORMAT_YUYV,           /**< YUYV(YUY2) pixel format */
114         CAMERA_PIXEL_FORMAT_UYVY,           /**< UYVY pixel format */
115         CAMERA_PIXEL_FORMAT_422P,           /**< YUV422(Y:U:V) planar pixel format */
116         CAMERA_PIXEL_FORMAT_I420,           /**< I420 pixel format */
117         CAMERA_PIXEL_FORMAT_YV12,           /**< YV12 pixel format */
118         CAMERA_PIXEL_FORMAT_RGB565,         /**< RGB565 pixel format */
119         CAMERA_PIXEL_FORMAT_RGB888,         /**< RGB888 pixel format */
120         CAMERA_PIXEL_FORMAT_RGBA,           /**< RGBA pixel format */
121         CAMERA_PIXEL_FORMAT_ARGB,           /**< ARGB pixel format */
122         CAMERA_PIXEL_FORMAT_JPEG,           /**< Encoded pixel format */
123         CAMERA_PIXEL_FORMAT_H264 = 15,      /**< Encoded pixel format : H264 (Since 3.0) */
124 } camera_pixel_format_e;
125
126 /**
127  * @brief Enumeration for the camera display type.
128  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
129  */
130 typedef enum {
131         CAMERA_DISPLAY_TYPE_OVERLAY = 0,        /**< Overlay surface display */
132         CAMERA_DISPLAY_TYPE_EVAS,               /**< Evas object surface display */
133         CAMERA_DISPLAY_TYPE_NONE                /**< This disposes off buffers */
134 } camera_display_type_e;
135
136 /**
137  * @brief Enumeration for the camera policy.
138  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
139  */
140 typedef enum {
141         CAMERA_POLICY_NONE = 0,         /**< None */
142         CAMERA_POLICY_SOUND,            /**< Sound policy (Deprecated since 3.0) */
143         CAMERA_POLICY_SOUND_BY_CALL,    /**< Sound policy by CALL (Deprecated since 3.0) */
144         CAMERA_POLICY_SOUND_BY_ALARM,   /**< Sound policy by ALARM (Deprecated since 3.0) */
145         CAMERA_POLICY_SECURITY,         /**< Security policy */
146         CAMERA_POLICY_RESOURCE_CONFLICT /**< Resource conflict (Since 3.0) */
147 } camera_policy_e;
148
149 /**
150  * @brief Enumeration for the camera rotation type.
151  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
152  */
153 typedef enum {
154         CAMERA_ROTATION_NONE,   /**< No rotation */
155         CAMERA_ROTATION_90,             /**< 90 degree rotation */
156         CAMERA_ROTATION_180,    /**< 180 degree rotation */
157         CAMERA_ROTATION_270,    /**< 270 degree rotation */
158 } camera_rotation_e;
159
160
161 /**
162  * @brief Enumeration for the camera flip type.
163  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
164  */
165 typedef enum {
166         CAMERA_FLIP_NONE,       /**< No Flip */
167         CAMERA_FLIP_HORIZONTAL, /**< Horizontal flip */
168         CAMERA_FLIP_VERTICAL,   /**< Vertical flip */
169         CAMERA_FLIP_BOTH        /** Horizontal and vertical flip */
170 } camera_flip_e;
171
172 /**
173  * @brief Enumeration for the camera focus state.
174  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
175  */
176 typedef enum {
177         CAMERA_FOCUS_STATE_RELEASED = 0, /**< Focus released */
178         CAMERA_FOCUS_STATE_ONGOING,      /**< Focus in progress */
179         CAMERA_FOCUS_STATE_FOCUSED,      /**< Focus succeeded */
180         CAMERA_FOCUS_STATE_FAILED,       /**< Focus failed */
181 } camera_focus_state_e;
182
183 /**
184  * @brief Enumeration for the facing direction of camera module
185  * @since_tizen 3.0
186  */
187 typedef enum {
188         CAMERA_FACING_DIRECTION_REAR = 0, /**< Rear */
189         CAMERA_FACING_DIRECTION_FRONT,    /**< Front */
190 } camera_facing_direction_e;
191
192 /**
193  * @brief Enumeration for the current flash state.
194  * @since_tizen 3.0
195  */
196 typedef enum {
197         CAMERA_FLASH_STATE_NOT_USED = 0,  /**< Flash is not used now through camera API */
198         CAMERA_FLASH_STATE_USED,          /**< Flash is used now through camera API */
199 } camera_flash_state_e;
200
201 /**
202  * @brief The structure type of the image data.
203  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
204  */
205 typedef struct {
206         unsigned char *data;            /**< The image buffer */
207         unsigned int size;              /**< The size of the buffer */
208         int width;                      /**< The width of the image */
209         int height;                     /**< The height of the image */
210         camera_pixel_format_e format;   /**< The format of the image pixel */
211         unsigned char *exif;            /**< The exif raw data */
212         unsigned int exif_size;         /**< The size of the exif data */
213 } camera_image_data_s;
214
215 /**
216  * @brief The structure type for face detection.
217  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
218  */
219 typedef struct {
220         int id;         /**< The ID of each face */
221         int score;      /**< The confidence level for the detection of the face */
222         int x;          /**< The x coordinates of the face */
223         int y;          /**< The y coordinates of the face */
224         int width;      /**< The width of the face */
225         int height;     /**< The height of the face */
226 } camera_detected_face_s;
227
228 /**
229  * @brief The structure type to preview stream data.
230  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
231  */
232 typedef struct {
233         camera_pixel_format_e format;   /**< The format of the frame pixel */
234         int width;                      /**< The width of the frame */
235         int height;                     /**< The height of the frame */
236         int num_of_planes;              /**< The number of planes */
237         unsigned int timestamp;         /**< The timestamp of the frame */
238         union {
239                 struct {
240                         unsigned char *yuv;     /**< The yuv data pointer */
241                         unsigned int size;      /**< The size of data */
242                 } single_plane;                 /**< single plane frame data */
243
244                 struct {
245                         unsigned char *y;       /**< The y data pointer */
246                         unsigned char *uv;      /**< The uv data pointer */
247                         unsigned int y_size;    /**< The size of y data */
248                         unsigned int uv_size;   /**< The size of uv data */
249                 } double_plane;                 /**< double plane frame data */
250
251                 struct {
252                         unsigned char *y;       /**< The y data pointer */
253                         unsigned char *u;       /**< The u data pointer */
254                         unsigned char *v;       /**< The v data pointer */
255                         unsigned int y_size;    /**< The size of y data */
256                         unsigned int u_size;    /**< The size of u data */
257                         unsigned int v_size;    /**< The size of v data */
258                 } triple_plane;                 /**< triple plane frame data */
259
260                 struct {
261                         unsigned char *data;    /**< The encoded data pointer */
262                         unsigned int size;              /**< The size of encoded data */
263                 } encoded_plane;
264         } data;
265 } camera_preview_data_s;
266
267 /**
268  * @brief The Camera handle.
269  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
270  * @see recorder_create_videorecorder()
271  */
272 typedef struct camera_cli_s *camera_h;
273
274 /**
275  * @brief The Camera display handle.
276  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
277  */
278 typedef void *camera_display_h;
279
280 #ifndef GET_DISPLAY
281
282 /**
283  * @brief Gets a display handle.
284  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
285  */
286 #define GET_DISPLAY(x) (void*)(x)
287
288 #endif
289
290 /**
291  * @}
292  */
293
294 /**
295  * @addtogroup CAPI_MEDIA_CAMERA_DISPLAY_MODULE
296  * @{
297  */
298
299 /**
300  * @brief Enumeration for the camera display mode.
301  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
302  */
303 typedef enum {
304         CAMERA_DISPLAY_MODE_LETTER_BOX = 0,       /**< Letter box */
305         CAMERA_DISPLAY_MODE_ORIGIN_SIZE,          /**< Origin size */
306         CAMERA_DISPLAY_MODE_FULL,                 /**< Full screen */
307         CAMERA_DISPLAY_MODE_CROPPED_FULL,         /**< Cropped full screen */
308         CAMERA_DISPLAY_MODE_ORIGIN_OR_LETTER_BOX, /**< Original size or letter box (Since 3.0) */
309         CAMERA_DISPLAY_MODE_CUSTOM_ROI,           /**< Custom ROI (Since 3.0) */
310 } camera_display_mode_e;
311
312 /**
313  * @}
314  */
315
316 /**
317  * @addtogroup CAPI_MEDIA_CAMERA_ATTRIBUTES_MODULE
318  * @{
319  */
320
321 /**
322  * @brief Enumeration for the color tone, which provides the impression of looking through a tinted glass.
323  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
324  */
325 typedef enum {
326         CAMERA_ATTR_EFFECT_NONE = 0,              /**< None */
327         CAMERA_ATTR_EFFECT_MONO,                  /**< Mono */
328         CAMERA_ATTR_EFFECT_SEPIA,                 /**< Sepia */
329         CAMERA_ATTR_EFFECT_NEGATIVE,              /**< Negative */
330         CAMERA_ATTR_EFFECT_BLUE,                  /**< Blue */
331         CAMERA_ATTR_EFFECT_GREEN,                 /**< Green */
332         CAMERA_ATTR_EFFECT_AQUA,                  /**< Aqua */
333         CAMERA_ATTR_EFFECT_VIOLET,                /**< Violet */
334         CAMERA_ATTR_EFFECT_ORANGE,                /**< Orange */
335         CAMERA_ATTR_EFFECT_GRAY,                  /**< Gray */
336         CAMERA_ATTR_EFFECT_RED,                   /**< Red */
337         CAMERA_ATTR_EFFECT_ANTIQUE,               /**< Antique */
338         CAMERA_ATTR_EFFECT_WARM,                  /**< Warm */
339         CAMERA_ATTR_EFFECT_PINK,                  /**< Pink */
340         CAMERA_ATTR_EFFECT_YELLOW,                /**< Yellow */
341         CAMERA_ATTR_EFFECT_PURPLE,                /**< Purple */
342         CAMERA_ATTR_EFFECT_EMBOSS,                /**< Emboss */
343         CAMERA_ATTR_EFFECT_OUTLINE,               /**< Outline */
344         CAMERA_ATTR_EFFECT_SOLARIZATION,          /**< Solarization */
345         CAMERA_ATTR_EFFECT_SKETCH,                /**< Sketch */
346         CAMERA_ATTR_EFFECT_WASHED,                /**< Washed */
347         CAMERA_ATTR_EFFECT_VINTAGE_WARM,          /**< Vintage warm  */
348         CAMERA_ATTR_EFFECT_VINTAGE_COLD,          /**< Vintage cold */
349         CAMERA_ATTR_EFFECT_POSTERIZATION,         /**< Posterization */
350         CAMERA_ATTR_EFFECT_CARTOON,               /**< Cartoon */
351         CAMERA_ATTR_EFFECT_SELECTIVE_RED,         /**< Selective color - Red */
352         CAMERA_ATTR_EFFECT_SELECTIVE_GREEN,       /**< Selective color - Green */
353         CAMERA_ATTR_EFFECT_SELECTIVE_BLUE,        /**< Selective color - Blue */
354         CAMERA_ATTR_EFFECT_SELECTIVE_YELLOW,      /**< Selective color - Yellow */
355         CAMERA_ATTR_EFFECT_SELECTIVE_RED_YELLOW,  /**< Selective color - Red and Yellow */
356         CAMERA_ATTR_EFFECT_OTHER_GRAPHICS,        /**< Other Graphic effects */
357 } camera_attr_effect_mode_e;
358
359 /**
360  * @brief Enumeration for the white balance levels of the camera.
361  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
362  */
363 typedef enum {
364         CAMERA_ATTR_WHITE_BALANCE_NONE = 0,     /**< None */
365         CAMERA_ATTR_WHITE_BALANCE_AUTOMATIC,    /**< Automatic */
366         CAMERA_ATTR_WHITE_BALANCE_DAYLIGHT,     /**< Daylight */
367         CAMERA_ATTR_WHITE_BALANCE_CLOUDY,       /**< Cloudy */
368         CAMERA_ATTR_WHITE_BALANCE_FLUORESCENT,  /**< Fluorescent */
369         CAMERA_ATTR_WHITE_BALANCE_INCANDESCENT, /**< Incandescent */
370         CAMERA_ATTR_WHITE_BALANCE_SHADE,        /**< Shade */
371         CAMERA_ATTR_WHITE_BALANCE_HORIZON,      /**< Horizon */
372         CAMERA_ATTR_WHITE_BALANCE_FLASH,        /**< Flash */
373         CAMERA_ATTR_WHITE_BALANCE_CUSTOM,       /**< Custom */
374 } camera_attr_whitebalance_e;
375
376 /**
377  * @brief Enumeration for the scene mode.
378  * @details The mode of operation can be in daylight, night, or back-light.
379  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
380  */
381 typedef enum {
382         CAMERA_ATTR_SCENE_MODE_NORMAL = 0,     /**< Normal */
383         CAMERA_ATTR_SCENE_MODE_PORTRAIT,       /**< Portrait */
384         CAMERA_ATTR_SCENE_MODE_LANDSCAPE,      /**< Landscape */
385         CAMERA_ATTR_SCENE_MODE_SPORTS,         /**< Sports */
386         CAMERA_ATTR_SCENE_MODE_PARTY_N_INDOOR, /**< Party & indoor */
387         CAMERA_ATTR_SCENE_MODE_BEACH_N_INDOOR, /**< Beach & indoor */
388         CAMERA_ATTR_SCENE_MODE_SUNSET,         /**< Sunset */
389         CAMERA_ATTR_SCENE_MODE_DUSK_N_DAWN,    /**< Dusk & dawn */
390         CAMERA_ATTR_SCENE_MODE_FALL_COLOR,     /**< Fall */
391         CAMERA_ATTR_SCENE_MODE_NIGHT_SCENE,    /**< Night scene */
392         CAMERA_ATTR_SCENE_MODE_FIREWORK,       /**< Firework */
393         CAMERA_ATTR_SCENE_MODE_TEXT,           /**< Text */
394         CAMERA_ATTR_SCENE_MODE_SHOW_WINDOW,    /**< Show window */
395         CAMERA_ATTR_SCENE_MODE_CANDLE_LIGHT,   /**< Candle light */
396         CAMERA_ATTR_SCENE_MODE_BACKLIGHT,      /**< Backlight */
397         CAMERA_ATTR_SCENE_MODE_AQUA,           /**< Aqua */
398 } camera_attr_scene_mode_e;
399
400 /**
401  * @brief Enumeration for the auto focus mode.
402  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
403  */
404 typedef enum {
405         CAMERA_ATTR_AF_NONE = 0,    /**< auto-focus is not set */
406         CAMERA_ATTR_AF_NORMAL,      /**< auto-focus in the normal mode  */
407         CAMERA_ATTR_AF_MACRO,       /**< auto-focus in the macro mode(close distance)  */
408         CAMERA_ATTR_AF_FULL,        /**< auto-focus in the full mode(all range scan, limited by device spec) */
409 } camera_attr_af_mode_e;
410
411 /**
412  * @brief Enumeration for the ISO levels of the camera.
413  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
414  */
415 typedef enum {
416         CAMERA_ATTR_ISO_AUTO = 0, /**< ISO auto mode */
417         CAMERA_ATTR_ISO_50,       /**< ISO 50 */
418         CAMERA_ATTR_ISO_100,      /**< ISO 100 */
419         CAMERA_ATTR_ISO_200,      /**< ISO 200 */
420         CAMERA_ATTR_ISO_400,      /**< ISO 400 */
421         CAMERA_ATTR_ISO_800,      /**< ISO 800 */
422         CAMERA_ATTR_ISO_1600,     /**< ISO 1600 */
423         CAMERA_ATTR_ISO_3200,     /**< ISO 3200 */
424 } camera_attr_iso_e;
425
426 /**
427  * @brief Enumeration for the camera exposure modes.
428  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
429  */
430 typedef enum {
431         CAMERA_ATTR_EXPOSURE_MODE_OFF = 0,   /**< Off */
432         CAMERA_ATTR_EXPOSURE_MODE_ALL,       /**< All mode */
433         CAMERA_ATTR_EXPOSURE_MODE_CENTER,    /**< Center mode */
434         CAMERA_ATTR_EXPOSURE_MODE_SPOT,      /**< Spot mode */
435         CAMERA_ATTR_EXPOSURE_MODE_CUSTOM,    /**< Custom mode */
436 } camera_attr_exposure_mode_e;
437
438 /**
439  * @brief Enumeration for the orientation values of tag.
440  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
441  */
442 typedef enum {
443         CAMERA_ATTR_TAG_ORIENTATION_TOP_LEFT = 1,      /**< Row #0 is at the top, Column #0 is to the left */
444         CAMERA_ATTR_TAG_ORIENTATION_TOP_RIGHT = 2,     /**< Row #0 is at the top, Column #0 is to the right (flipped) */
445         CAMERA_ATTR_TAG_ORIENTATION_BOTTOM_RIGHT = 3,  /**< Row #0 is at the bottom, Column #0 is to the right */
446         CAMERA_ATTR_TAG_ORIENTATION_BOTTOM_LEFT = 4,   /**< Row #0 is at the bottom, Column #0 is to the left (flipped) */
447         CAMERA_ATTR_TAG_ORIENTATION_LEFT_TOP = 5,      /**< Row #0 is to the left, Column #0 is at the top (flipped) */
448         CAMERA_ATTR_TAG_ORIENTATION_RIGHT_TOP = 6,     /**< Row #0 is to the right, Column #0 is at the top */
449         CAMERA_ATTR_TAG_ORIENTATION_RIGHT_BOTTOM = 7,  /**< Row #0 is to the right, Column #0 is at the bottom (flipped) */
450         CAMERA_ATTR_TAG_ORIENTATION_LEFT_BOTTOM = 8,   /**< Row #0 is to the left, Column #0 is at the bottom */
451 } camera_attr_tag_orientation_e;
452
453 /**
454  * @brief Enumeration for the flash mode.
455  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
456  */
457 typedef enum {
458         CAMERA_ATTR_FLASH_MODE_OFF = 0,          /**< Always off */
459         CAMERA_ATTR_FLASH_MODE_ON,               /**< Always splashes */
460         CAMERA_ATTR_FLASH_MODE_AUTO,             /**< Depending on intensity of light, strobe starts to flash */
461         CAMERA_ATTR_FLASH_MODE_REDEYE_REDUCTION, /**< Red eye reduction. Multiple flash before capturing */
462         CAMERA_ATTR_FLASH_MODE_SLOW_SYNC,        /**< Slow sync curtain synchronization */
463         CAMERA_ATTR_FLASH_MODE_FRONT_CURTAIN,    /**< Front curtain synchronization */
464         CAMERA_ATTR_FLASH_MODE_REAR_CURTAIN,     /**< Rear curtain synchronization */
465         CAMERA_ATTR_FLASH_MODE_PERMANENT,        /**< Keep turned on until turning off */
466 } camera_attr_flash_mode_e;
467
468 /**
469  * @brief Enumeration to preview FPS.
470  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
471  */
472 typedef enum {
473         CAMERA_ATTR_FPS_AUTO = 0, /**< AUTO FPS */
474         CAMERA_ATTR_FPS_7 = 7,    /**< 7 FPS */
475         CAMERA_ATTR_FPS_8 = 8,    /**< 8 FPS */
476         CAMERA_ATTR_FPS_15 = 15,  /**< 15 FPS */
477         CAMERA_ATTR_FPS_20 = 20,  /**< 20 FPS */
478         CAMERA_ATTR_FPS_24 = 24,  /**< 24 FPS */
479         CAMERA_ATTR_FPS_25 = 25,  /**< 25 FPS */
480         CAMERA_ATTR_FPS_30 = 30,  /**< 30 FPS */
481         CAMERA_ATTR_FPS_60 = 60,  /**< 60 FPS */
482         CAMERA_ATTR_FPS_90 = 90,  /**< 90 FPS */
483         CAMERA_ATTR_FPS_120 = 120 /**< 120 FPS */
484 } camera_attr_fps_e;
485
486 /**
487  * @brief Enumeration for the theater mode.
488  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
489  */
490 typedef enum {
491         CAMERA_ATTR_THEATER_MODE_DISABLE = 0, /**< Disable theater mode - External display shows same image as device display */
492         CAMERA_ATTR_THEATER_MODE_ENABLE = 2,  /**< Enable theater mode - Preview image is displayed on external display with full screen mode, but preview image is not shown on device display */
493         CAMERA_ATTR_THEATER_MODE_CLONE = 1    /**< Clone mode - Preview image is displayed on external display with full screen mode. Also preview image is shown by the UI on device display */
494 } camera_attr_theater_mode_e;
495
496 /**
497  * @brief Enumeration for HDR capture mode.
498  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
499  */
500 typedef enum {
501         CAMERA_ATTR_HDR_MODE_DISABLE = 0,  /**< Disable HDR capture */
502         CAMERA_ATTR_HDR_MODE_ENABLE,       /**< Enable HDR capture */
503         CAMERA_ATTR_HDR_MODE_KEEP_ORIGINAL /**< Enable HDR capture and keep original image data */
504 } camera_attr_hdr_mode_e;
505
506 /**
507  * @brief Enumeration for PTZ(Pan Tilt Zoom) type.
508  * @since_tizen 3.0
509  */
510 typedef enum {
511         CAMERA_ATTR_PTZ_TYPE_MECHANICAL = 0,  /**< Move the camera device physically */
512         CAMERA_ATTR_PTZ_TYPE_ELECTRONIC       /**< Zoom digitally and move into portion of the image */
513 } camera_attr_ptz_type_e;
514
515 /**
516  * @brief Enumeration for PTZ(Pan Tilt Zoom) movement type.
517  * @since_tizen 3.0
518  */
519 typedef enum {
520         CAMERA_ATTR_PTZ_MOVE_ABSOLUTE = 0,  /**< Move to a specific coordinate position */
521         CAMERA_ATTR_PTZ_MOVE_RELATIVE       /**< Move a specific distance from the current position */
522 } camera_attr_ptz_move_type_e;
523
524
525 /**
526  * @}
527  */
528
529 /**
530  * @addtogroup CAPI_MEDIA_CAMERA_MODULE
531  * @{
532  */
533
534 /**
535  * @brief Called when the camera state is changed.
536  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
537  * @param[in] previous The previous state of the camera
538  * @param[in] current The current state of the camera
539  * @param[in] by_policy If @c true the state is changed by policy, otherwise @c false
540  * @param[in] user_data The user data passed from the callback registration function
541  * @pre camera_start_preview(), camera_start_capture() or camera_stop_preview()
542  *      will invoke this callback if you register this callback using camera_set_state_changed_cb().
543  * @see camera_set_state_changed_cb()
544  */
545 typedef void (*camera_state_changed_cb)(camera_state_e previous, camera_state_e current, bool by_policy, void *user_data);
546
547 /**
548  * @brief Called when the camera device state is changed.
549  * @since_tizen 3.0
550  * @param[in] device The hardware camera type
551  * @param[in] state The state of the camera device
552  * @param[in] user_data The user data passed from the callback registration function
553  * @see camera_add_device_state_changed_cb()
554  */
555 typedef void (*camera_device_state_changed_cb)(camera_device_e device, camera_device_state_e state, void *user_data);
556
557 /**
558  * @brief Called when the camera is interrupted by policy.
559  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
560  * @remarks This callback is called after interrupt handling is completed.
561  * @param[in] policy The policy that interrupted the camera
562  * @param[in] previous The previous state of the camera
563  * @param[in] current The current state of the camera
564  * @param[in] user_data The user data passed from the callback registration function
565  * @see camera_set_interrupted_cb()
566  */
567 typedef void (*camera_interrupted_cb)(camera_policy_e policy, camera_state_e previous, camera_state_e current, void *user_data);
568
569 /**
570  * @brief Called when the camera interrupt is started by policy.
571  * @since_tizen 4.0
572  * @remarks This callback is called before interrupt handling is started.
573  * @param[in] policy The policy that is interrupting the camera
574  * @param[in] state The current state of the camera
575  * @param[in] user_data The user data passed from the callback registration function
576  * @see camera_set_interrupt_started_cb()
577  */
578 typedef void (*camera_interrupt_started_cb)(camera_policy_e policy, camera_state_e state, void *user_data);
579
580 /**
581  * @brief Called when the camera focus state is changed.
582  * @details When the camera auto focus completes or a change to the focus state occurs,
583  *          this callback is invoked. \n \n
584  *          Changes of focus state are as follows: \n
585  *          #CAMERA_FOCUS_STATE_RELEASED -> start focusing -> #CAMERA_FOCUS_STATE_ONGOING -> working ->
586  *          #CAMERA_FOCUS_STATE_FOCUSED or #CAMERA_FOCUS_STATE_FAILED.
587  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
588  *
589  * @param[in] state The current state of the auto-focus
590  * @param[in] user_data The user data passed from the callback registration function
591  * @pre camera_start_focusing() will invoke this callback if you register it using camera_set_focus_changed_cb().
592  * @see camera_set_focus_changed_cb()
593  * @see camera_unset_focus_changed_cb()
594  * @see camera_start_focusing()
595  * @see camera_cancel_focusing()
596  */
597 typedef void (*camera_focus_changed_cb)(camera_focus_state_e state, void *user_data);
598
599 /**
600  * @brief Called to register for notifications about delivering a copy of the new preview frame when every preview frame is displayed.
601  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
602  *
603  * @remarks This function is issued in the context of internal framework so the UI update code should not be directly invoked.\n
604  *          If the camera is used as a recorder then this callback function won't be called.
605  *
606  * @param[in] frame The reference pointer to preview stream data
607  * @param[in] user_data The user data passed from the callback registration function
608  * @pre camera_start_preview() will invoke this callback function if you register this callback using camera_set_preview_cb().
609  * @see camera_start_preview()
610  * @see camera_set_preview_cb()
611  * @see camera_unset_preview_cb()
612  */
613 typedef void (*camera_preview_cb)(camera_preview_data_s *frame, void *user_data);
614
615 /**
616  * @brief Called to register for notifications about delivering media packet when every preview frame is displayed.
617  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
618  *
619  * @remarks This function is issued in the context of internal framework so the UI update code should not be directly invoked.\n
620  *          If the camera is used as a recorder then this callback function won't be called.\n
621  *          and the packet should be released by media_packet_destroy() after use.
622  *
623  * @param[in] pkt Reference pointer to media packet
624  * @param[in] user_data The user data passed from the callback registration function
625  * @pre camera_start_preview() will invoke this callback function if you register this callback using camera_set_media_packet_preview_cb().
626  * @see camera_start_preview()
627  * @see camera_set_media_packet_preview_cb()
628  * @see camera_unset_media_packet_preview_cb()
629  */
630 typedef void (*camera_media_packet_preview_cb)(media_packet_h pkt, void *user_data);
631
632 /**
633  * @brief Called to get information about image data taken by the camera once per frame while capturing.
634  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
635  *
636  * @remarks This function is issued in the context of internal framework so the UI update code should not be directly invoked.
637  *          You must not call camera_start_preview() within this callback.
638  *
639  * @param[in] image The image data of the captured picture
640  * @param[in] postview The image data of the postview
641  * @param[in] thumbnail The image data of the thumbnail (it should be @c NULL if the available thumbnail data does not exist)
642  * @param[in] user_data The user data passed from the callback registration function
643  * @pre camera_start_capture() or camera_start_continuous_capture() will invoke this callback function if it is registered using camera_start_capture() or camera_start_continuous_capture().
644  * @see camera_start_capture()
645  * @see camera_start_continuous_capture()
646  * @see camera_capture_completed_cb()
647  */
648 typedef void (*camera_capturing_cb)(camera_image_data_s *image, camera_image_data_s *postview, camera_image_data_s *thumbnail, void *user_data);
649
650 /**
651  * @brief Called when the camera capturing completes.
652  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
653  *
654  * @remarks The callback is called after camera_capturing_cb() is completed.\n
655  *          If you want to show the user a preview after capturing is finished, \n
656  *          an application can use camera_start_preview() after calling this callback.
657  * @param[in] user_data The user data passed from the callback registration function
658  * @pre This callback function is invoked if it is registered using camera_start_capture() or camera_start_continuous_capture().
659  * @see camera_start_capture()
660  * @see camera_start_continuous_capture()
661  * @see camera_capturing_cb()
662  */
663 typedef void (*camera_capture_completed_cb)(void *user_data);
664
665 /**
666  * @brief Called when an error occurs.
667  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
668  *
669  * @remarks This callback informs about a critical error situation.\n
670  *          When this callback is invoked, the user should release the resource and terminate the application.\n
671  *          In case of errors, one of these codes occur:\n
672  * #CAMERA_ERROR_DEVICE,\n
673  * #CAMERA_ERROR_INVALID_OPERATION,\n
674  * #CAMERA_ERROR_OUT_OF_MEMORY.
675  * @param[in] error The error code
676  * @param[in] current_state The current state of the camera
677  * @param[in] user_data The user data passed from the callback registration function
678  * @pre This callback function is invoked if it is registered using camera_set_error_cb().
679  * @see camera_set_error_cb()
680  * @see camera_unset_error_cb()
681  */
682 typedef void (*camera_error_cb)(camera_error_e error, camera_state_e current_state, void *user_data);
683
684 /**
685  * @brief Called when a face is detected in the preview frame.
686  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
687  * @param[in] faces The detected face array
688  * @param[in] count The length of the array
689  * @param[in] user_data The user data passed from the callback registration function
690  * @see camera_start_face_detection()
691  */
692 typedef void (*camera_face_detected_cb)(camera_detected_face_s *faces, int count, void *user_data);
693
694 /**
695  * @}
696  */
697
698 /**
699  * @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
700  * @{
701  */
702
703 /**
704  * @brief Called once for each supported preview resolution.
705  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
706  * @param[in] width The preview image width
707  * @param[in] height The preview image height
708  * @param[in] user_data The user data passed from the foreach function
709  * @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop
710  * @pre camera_foreach_supported_preview_resolution() will invoke this callback.
711  * @see camera_foreach_supported_preview_resolution()
712  */
713 typedef bool (*camera_supported_preview_resolution_cb)(int width, int height, void *user_data);
714
715 /**
716  * @brief Called once for each supported capture resolution.
717  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
718  * @param[in] width The capture resolution width
719  * @param[in] height The capture resolution height
720  * @param[in] user_data The user data passed from the foreach function
721  * @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop
722  * @pre camera_foreach_supported_capture_resolution() will invoke this callback.
723  * @see camera_foreach_supported_capture_resolution()
724  */
725 typedef bool (*camera_supported_capture_resolution_cb)(int width, int height, void *user_data);
726
727 /**
728  * @brief Called once for the pixel format of each supported capture format.
729  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
730  * @param[in] format The supported pixel format
731  * @param[in] user_data The user data passed from the foreach function
732  * @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop
733  * @pre camera_foreach_supported_capture_format() will invoke this callback.
734  * @see camera_foreach_supported_capture_format()
735  */
736 typedef bool (*camera_supported_capture_format_cb)(camera_pixel_format_e format, void *user_data);
737
738 /**
739  * @brief Called once for the pixel format of each supported preview format.
740  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
741  * @param[in] format The supported preview data format
742  * @param[in] user_data The user data passed from the foreach function
743  * @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop
744  * @pre camera_foreach_supported_preview_format() will invoke this callback.
745  * @see camera_foreach_supported_preview_format()
746  */
747 typedef bool (*camera_supported_preview_format_cb)(camera_pixel_format_e format, void *user_data);
748
749 /**
750  * @}
751  */
752
753 /**
754  * @addtogroup CAPI_MEDIA_CAMERA_MODULE
755  * @{
756  */
757
758 /**
759  * @brief Creates a new camera handle for controlling a camera.
760  *
761  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
762  * @remarks Multiple handles on a context at the same time are allowed to be created. However,
763  *          camera cannot guarantee proper operation because of limited resources, such as
764  *          camera device, audio device, and display device.\n.
765  *          A @a camera must be released using camera_destroy().
766  * @remarks The privilege %http://tizen.org/privilege/camera is not required since 4.0,\n
767  *          but it is required in all earlier versions.
768  * @param[in] device The hardware camera to access
769  * @param[out] camera A newly returned handle to the camera
770  * @return @c 0 on success, otherwise a negative error value
771  * @retval #CAMERA_ERROR_NONE Successful
772  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
773  * @retval #CAMERA_ERROR_OUT_OF_MEMORY Out of memory
774  * @retval #CAMERA_ERROR_SOUND_POLICY Sound policy error
775  * @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
776  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
777  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
778  * @post If it succeeds, the camera state will be #CAMERA_STATE_CREATED.
779  *
780  * @see camera_destroy()
781  */
782 int camera_create(camera_device_e device, camera_h *camera);
783
784 /**
785  * @brief Changes the camera device.
786  *
787  * @since_tizen 3.0
788  * @remarks This function can be used to change camera device simply without camera_destroy() and camera_create().\n
789  *          If display reuse hint is set by camera_set_display_reuse_hint() before stopping the preview,\n
790  *          display handle will be reused and last frame on display can be kept even though camera device is changed.
791  * @param[in] camera The handle to the camera
792  * @param[in] device The hardware camera to access
793  * @return @c 0 on success, otherwise a negative error value
794  * @retval #CAMERA_ERROR_NONE Successful
795  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
796  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
797  * @retval #CAMERA_ERROR_OUT_OF_MEMORY Out of memory
798  * @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
799  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
800  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
801  * @pre    The camera state must be set to #CAMERA_STATE_CREATED.
802  * @post   If it succeeds, the camera attributes and settings will be reset.
803  *
804  * @see camera_set_display_reuse_hint()
805  * @see camera_get_display_reuse_hint()
806  */
807 int camera_change_device(camera_h camera, camera_device_e device);
808
809 /**
810  * @brief Destroys the camera handle and releases all its resources.
811  *
812  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
813  * @param[in] camera The handle to the camera
814  * @return @c 0 on success, otherwise a negative error value
815  * @retval #CAMERA_ERROR_NONE Successful
816  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
817  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
818  * @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
819  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
820  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
821  * @see camera_create()
822  */
823 int camera_destroy(camera_h camera);
824
825 /**
826  * @brief Starts capturing and drawing preview frames on the screen.
827  *
828  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
829  * @privlevel public
830  * @privilege %http://tizen.org/privilege/camera
831  * @param[in] camera The handle to the camera
832  * @return @c 0 on success, otherwise a negative error value
833  * @retval #CAMERA_ERROR_NONE Successful
834  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
835  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
836  * @retval #CAMERA_ERROR_SOUND_POLICY Sound policy error
837  * @retval #CAMERA_ERROR_RESOURCE_CONFLICT Resource conflict error
838  * @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
839  * @retval #CAMERA_ERROR_DEVICE_BUSY The device is being used in another application or is performing other operations
840  * @retval #CAMERA_ERROR_DEVICE_NOT_FOUND No camera device
841  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
842  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
843  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
844  * @pre    The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_CAPTURED.\n
845  *         You must set the display handle. \n
846  *         If needed, modify preview FPS(camera_attr_set_preview_fps()),
847  *         preview resolution(camera_set_preview_resolution()), or preview format(camera_set_preview_format()).
848  * @post   If it succeeds, the camera state will be #CAMERA_STATE_PREVIEW.\n
849  *         camera_preview_cb() will be called when preview image data becomes available.
850  *
851  * @see camera_stop_preview()
852  * @see camera_set_display()
853  * @see camera_set_preview_cb()
854  * @see camera_set_media_packet_preview_cb()
855  * @see camera_foreach_supported_preview_resolution()
856  * @see camera_set_preview_resolution()
857  * @see camera_get_preview_resolution()
858  * @see camera_foreach_supported_preview_format()
859  * @see camera_set_preview_format()
860  * @see camera_get_preview_format()
861  * @see camera_attr_foreach_supported_fps()
862  * @see camera_attr_set_preview_fps()
863  * @see camera_attr_get_preview_fps()
864  */
865 int camera_start_preview(camera_h camera);
866
867 /**
868  * @brief Stops capturing and drawing preview frames.
869  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
870  * @privlevel public
871  * @privilege %http://tizen.org/privilege/camera
872  * @param[in] camera The handle to the camera
873  * @return @c 0 on success, otherwise a negative error value
874  * @retval #CAMERA_ERROR_NONE Successful
875  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
876  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
877  * @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
878  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
879  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
880  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
881  * @pre The camera state must be set to #CAMERA_STATE_PREVIEW.
882  * @post The camera state will be #CAMERA_STATE_CREATED.
883  * @see camera_start_preview()
884  * @see camera_unset_preview_cb()
885  * @see camera_unset_media_packet_preview_cb()
886  */
887 int camera_stop_preview(camera_h camera);
888
889 /**
890  * @brief Starts capturing of still images.
891  *
892  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
893  * @privlevel public
894  * @privilege %http://tizen.org/privilege/camera
895  * @remarks This function causes the transition of the camera state from #CAMERA_STATE_CAPTURING to #CAMERA_STATE_CAPTURED automatically\n
896  *          and the corresponding callback function camera_capturing_cb() and camera_capture_completed_cb() will be invoked\n
897  *          The captured image will be delivered through camera_capturing_cb().\n
898  *          camera_capture_completed_cb() callback notifies about completion of camera_capturing_cb(). \n
899  *          The camera's preview should be restarted by calling camera_start_preview().
900  * @param[in] camera The handle to the camera
901  * @param[in] capturing_cb The callback for capturing data
902  * @param[in] completed_cb The callback for notification of completion
903  * @param[in] user_data The user data
904  * @return @c 0 on success, otherwise a negative error value
905  * @retval #CAMERA_ERROR_NONE Successful
906  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
907  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
908  * @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
909  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
910  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
911  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
912  * @pre The camera state must be set to #CAMERA_STATE_PREVIEW. \n
913  *      If needed, modify capture resolution(camera_set_capture_resolution()),
914  *      capture format(camera_set_capture_format()), or image quality(camera_attr_set_image_quality()).
915  * @post If it succeeds the camera state will be #CAMERA_STATE_CAPTURED.
916  *
917  * @see camera_start_preview()
918  * @see camera_start_continuous_capture();
919  * @see camera_foreach_supported_capture_resolution()
920  * @see camera_set_capture_resolution()
921  * @see camera_get_capture_resolution()
922  * @see camera_foreach_supported_capture_format()
923  * @see camera_set_capture_format()
924  * @see camera_get_capture_format()
925  * @see camera_attr_set_image_quality()
926  * @see camera_attr_get_image_quality()
927  */
928 int camera_start_capture(camera_h camera, camera_capturing_cb capturing_cb, camera_capture_completed_cb completed_cb, void *user_data);
929
930 /**
931  * @brief Starts continuously capturing still images.
932  *
933  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
934  * @privlevel public
935  * @privilege %http://tizen.org/privilege/camera
936  * @remarks If this is not supported zero shutter lag occurs. The capture resolution could be changed to the preview resolution.\n
937  *          This function causes the transition of the camera state from #CAMERA_STATE_CAPTURING to #CAMERA_STATE_CAPTURED automatically\n
938  *          and the corresponding callback function camera_capturing_cb() and camera_capture_completed_cb() will be invoked\n
939  *          Each Captured image will be delivered through camera_capturing_cb().\n
940  *          The camera_capture_completed_cb() callback notifies about the completion of an entire capture.\n
941  *          The camera's preview should be restarted by calling camera_start_preview().\n.
942  * @param[in] camera The handle to the camera
943  * @param[in] count The number of still images
944  * @param[in] interval The interval of the capture (millisecond)
945  * @param[in] capturing_cb The callback for capturing data
946  * @param[in] completed_cb The callback for notification of completion
947  * @param[in] user_data The user data
948  * @return @c 0 on success, otherwise a negative error value
949  * @retval #CAMERA_ERROR_NONE Successful
950  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
951  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
952  * @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
953  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
954  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
955  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
956  * @post   If it succeeds the camera state will be #CAMERA_STATE_CAPTURED.
957  *
958  * @see camera_start_preview()
959  * @see camera_start_capture();
960  * @see camera_stop_continuous_capture()
961  * @see camera_is_supported_zero_shutter_lag()
962  */
963 int camera_start_continuous_capture(camera_h camera, int count, int interval, camera_capturing_cb capturing_cb, camera_capture_completed_cb completed_cb, void *user_data);
964
965 /**
966  * @brief Aborts continuous capturing.
967  *
968  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
969  * @privlevel public
970  * @privilege %http://tizen.org/privilege/camera
971  * @remarks The camera state will be changed to #CAMERA_STATE_CAPTURED.
972  * @param[in] camera The handle to the camera
973  * @return @c 0 on success, otherwise a negative error value
974  * @retval #CAMERA_ERROR_NONE Successful
975  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
976  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
977  * @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
978  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
979  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
980  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
981  * @pre The camera state must be set to #CAMERA_STATE_PREVIEW.
982  *
983  * @see camera_start_continuous_capture()
984  */
985 int camera_stop_continuous_capture(camera_h camera);
986
987 /**
988  * @brief Gets the state of the camera.
989  *
990  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
991  * @param[in] camera The handle to the camera
992  * @param[out] state The current state of the camera
993  * @return @c 0 on success, otherwise a negative error value
994  * @retval #CAMERA_ERROR_NONE Successful
995  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
996  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
997  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
998  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
999  * @see camera_create()
1000  * @see camera_start_preview()
1001  * @see camera_stop_preview()
1002  * @see camera_start_capture()
1003  */
1004 int camera_get_state(camera_h camera, camera_state_e *state);
1005
1006 /**
1007  * @brief Starts camera auto-focusing, asynchronously.
1008  *
1009  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1010  * @privlevel public
1011  * @privilege %http://tizen.org/privilege/camera
1012  * @remarks If continuous status is @c true, the camera continuously tries to focus.
1013  * @param[in] camera The handle to the camera
1014  * @param[in] continuous The status of continuous focusing
1015  * @return @c 0 on success, otherwise a negative error value
1016  * @retval #CAMERA_ERROR_NONE Successful
1017  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1018  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
1019  * @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
1020  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1021  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1022  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
1023  * @pre The camera state must be set to #CAMERA_STATE_PREVIEW.
1024  * @post The camera focus state will be #CAMERA_FOCUS_STATE_ONGOING.
1025  *
1026  * @see camera_cancel_focusing()
1027  * @see camera_set_focus_changed_cb()
1028  * @see camera_focus_changed_cb()
1029  * @see camera_attr_set_af_mode()
1030  */
1031 int camera_start_focusing(camera_h camera, bool continuous);
1032
1033 /**
1034  * @brief Stops camera auto focusing.
1035  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1036  * @privlevel public
1037  * @privilege %http://tizen.org/privilege/camera
1038  * @param[in] camera The handle to the camera
1039  * @return @c 0 on success, otherwise a negative error value
1040  * @retval #CAMERA_ERROR_NONE Successful
1041  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1042  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
1043  * @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
1044  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1045  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1046  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
1047  * @pre The camera state must be set to #CAMERA_STATE_PREVIEW.
1048  *
1049  * @see camera_start_focusing()
1050  * @see camera_focus_changed_cb()
1051  */
1052 int camera_cancel_focusing(camera_h camera);
1053
1054 /**
1055  * @brief Sets the display handle to show preview images.
1056  *
1057  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1058  * @remarks This function must be called before previewing (see camera_start_preview()).
1059  *          In Custom ROI display mode, camera_attr_set_display_roi_area() function must be called before calling this function.
1060  * @param[in] camera The handle to the camera
1061  * @param[in] type The display type
1062  * @param[in] display The display handle from #GET_DISPLAY
1063  * @return @c 0 on success, otherwise a negative error value
1064  * @retval #CAMERA_ERROR_NONE Successful
1065  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1066  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
1067  * @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
1068  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1069  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1070  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
1071  * @pre The camera state must be set to #CAMERA_STATE_CREATED.
1072  *
1073  * @see camera_start_preview()
1074  * @see #GET_DISPLAY
1075  */
1076 int camera_set_display(camera_h camera, camera_display_type_e type, camera_display_h display);
1077
1078 /**
1079  * @brief Sets the resolution of the preview.
1080  *
1081  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1082  * @remarks This function should be called before previewing (camera_start_preview()).
1083  * @param[in] camera The handle to the camera
1084  * @param[in] width The preview width
1085  * @param[in] height The preview height
1086  * @return @c 0 on success, otherwise a negative error value
1087  * @retval #CAMERA_ERROR_NONE Successful
1088  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1089  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
1090  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1091  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1092  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
1093  * @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
1094  *
1095  * @see camera_start_preview()
1096  * @see camera_get_preview_resolution()
1097  * @see camera_foreach_supported_preview_resolution()
1098  */
1099 int camera_set_preview_resolution(camera_h camera, int width, int height);
1100
1101 /**
1102  * @brief Gets the resolution of the preview.
1103  *
1104  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1105  * @param[in] camera The handle to the camera
1106  * @param[out] width The preview width
1107  * @param[out] height The preview height
1108  * @return @c 0 on success, otherwise a negative error value
1109  * @retval #CAMERA_ERROR_NONE Successful
1110  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1111  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1112  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1113  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
1114  * @see camera_set_preview_resolution()
1115  * @see camera_foreach_supported_preview_resolution()
1116  */
1117 int camera_get_preview_resolution(camera_h camera, int *width, int *height);
1118
1119 /**
1120  * @brief Gets the recommended preview resolution.
1121  *
1122  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1123  * @remarks Depending on the capture resolution aspect ratio and display resolution, the recommended preview resolution is determined.
1124  * @param[in] camera The handle to the camera
1125  * @param[out] width The preview width
1126  * @param[out] height The preview height
1127  * @return @c 0 on success, otherwise a negative error value
1128  * @retval #CAMERA_ERROR_NONE Successful
1129  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1130  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1131  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1132  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
1133  * @see camera_set_preview_resolution()
1134  * @see camera_foreach_supported_preview_resolution()
1135  */
1136 int camera_get_recommended_preview_resolution(camera_h camera, int *width, int *height);
1137
1138 /**
1139  * @brief Starts face detection.
1140  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1141  * @privlevel public
1142  * @privilege %http://tizen.org/privilege/camera
1143  * @remarks This should be called after the preview is started.\n
1144  *          This callback will be invoked when the face is detected in the preview frame.\n
1145  *          Internally it starts continuous focus and focusing on the detected face.\n
1146  *          When face detection is running, the camera_start_focusing(), camera_cancel_focusing(), camera_attr_set_af_mode(), camera_attr_set_af_area(), camera_attr_set_exposure_mode(), and camera_attr_set_whitebalance() settings are ignored.\n
1147  *          If camera_stop_preview() is invoked, face detection is stopped and then preview is resumed using camera_start_preview(), this method should be called again to resume face detection.
1148  * @param[in] camera The handle to the camera
1149  * @param[in] callback The callback to notify face detection
1150  * @param[in] user_data The user data to be passed to the callback function
1151  *
1152  * @return @c 0 on success, otherwise a negative error value
1153  * @retval #CAMERA_ERROR_NONE Successful
1154  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1155  * @retval #CAMERA_ERROR_INVALID_STATE Not preview state
1156  * @retval #CAMERA_ERROR_INVALID_OPERATION Not supported this feature
1157  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1158  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1159  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
1160  * @pre The camera state must be #CAMERA_STATE_PREVIEW.
1161  *
1162  * @see camera_stop_face_detection()
1163  * @see camera_face_detected_cb()
1164  * @see camera_is_supported_face_detection()
1165  */
1166 int camera_start_face_detection(camera_h camera, camera_face_detected_cb callback, void *user_data);
1167
1168 /**
1169  * @brief Stops face detection.
1170  *
1171  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1172  * @privlevel public
1173  * @privilege %http://tizen.org/privilege/camera
1174  * @param[in] camera The handle to the camera
1175  * @return @c 0 on success, otherwise a negative error value
1176  * @retval #CAMERA_ERROR_NONE Successful
1177  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1178  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1179  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1180  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
1181  * @pre This should be called after face detection is started.
1182  *
1183  * @see camera_start_face_detection()
1184  * @see camera_is_supported_face_detection()
1185  */
1186 int camera_stop_face_detection(camera_h camera);
1187
1188 /**
1189  * @}
1190  */
1191
1192 /**
1193  * @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
1194  * @{
1195  */
1196
1197 /**
1198  * @brief Gets continuous capture feature's supported state.
1199  * @ingroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
1200  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1201  * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
1202  * @param[in] camera The handle to the camera
1203  * @return @c true on supported, otherwise false
1204  * @exception #CAMERA_ERROR_NONE Successful
1205  * @exception #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1206  * @exception #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1207  * @exception #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1208  *
1209  */
1210 bool camera_is_supported_continuous_capture(camera_h camera);
1211
1212 /**
1213  * @brief Retrieves all supported camera preview resolutions by invoking the callback function once for each supported camera preview resolution.
1214  *
1215  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1216  * @param[in] camera The handle to the camera
1217  * @param[in] callback The callback function to be invoked
1218  * @param[in] user_data The user data to be passed to the callback function
1219  * @return @c 0 on success, otherwise a negative error value
1220  * @retval #CAMERA_ERROR_NONE Successful
1221  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1222  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1223  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1224  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
1225  * @post This function invokes camera_supported_preview_resolution_cb() repeatedly to retrieve each supported preview resolution.
1226  *
1227  * @see camera_set_preview_resolution()
1228  * @see camera_get_preview_resolution()
1229  * @see camera_supported_preview_resolution_cb()
1230  */
1231 int camera_foreach_supported_preview_resolution(camera_h camera, camera_supported_preview_resolution_cb callback, void *user_data);
1232
1233 /**
1234  * @}
1235  */
1236
1237 /**
1238  * @addtogroup CAPI_MEDIA_CAMERA_MODULE
1239  * @{
1240  */
1241
1242 /**
1243  * @ingroup CAPI_MEDIA_CAMERA_DISPLAY_MODULE
1244  * @brief Sets the display rotation.
1245  *
1246  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1247  * @remarks This function should be called before previewing (see camera_start_preview())
1248  * @param[in] camera The handle to the camera
1249  * @param[in] rotation The display rotation
1250  * @return @c 0 on success, otherwise a negative error value
1251  * @retval #CAMERA_ERROR_NONE Successful
1252  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1253  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
1254  * @retval #CAMERA_ERROR_INVALID_OPERATION Display type is incorrect
1255  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1256  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1257  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
1258  * @see camera_start_preview()
1259  * @see camera_get_display_rotation()
1260  */
1261 int camera_set_display_rotation(camera_h camera, camera_rotation_e rotation);
1262
1263 /**
1264  * @ingroup CAPI_MEDIA_CAMERA_DISPLAY_MODULE
1265  * @brief Gets the display rotation.
1266  *
1267  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1268  * @param[in] camera The handle to the camera
1269  * @param[out] rotation The display rotation
1270  * @return @c 0 on success, otherwise a negative error value
1271  * @retval #CAMERA_ERROR_NONE Successful
1272  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1273  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1274  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1275  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
1276  * @see camera_set_display_rotation()
1277  */
1278 int camera_get_display_rotation(camera_h camera, camera_rotation_e *rotation);
1279
1280 /**
1281  * @ingroup CAPI_MEDIA_CAMERA_DISPLAY_MODULE
1282  * @brief Sets the display flip.
1283  *
1284  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1285  * @param[in] camera The handle to the camera
1286  * @param[in] flip The display flip
1287  * @return @c 0 on success, otherwise a negative error value
1288  * @retval #CAMERA_ERROR_NONE Successful
1289  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1290  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
1291  * @retval #CAMERA_ERROR_INVALID_OPERATION Display type is incorrect
1292  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1293  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1294  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
1295  * @see camera_get_display_flip()
1296  */
1297 int camera_set_display_flip(camera_h camera, camera_flip_e flip);
1298
1299 /**
1300  * @ingroup CAPI_MEDIA_CAMERA_DISPLAY_MODULE
1301  * @brief Gets the display flip.
1302  *
1303  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1304  * @param[in] camera The handle to the camera
1305  * @param[out] flip The display flip
1306  * @return @c 0 on success, otherwise a negative error value
1307  * @retval #CAMERA_ERROR_NONE Successful
1308  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1309  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1310  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1311  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
1312  * @see camera_set_display_flip()
1313  */
1314 int camera_get_display_flip(camera_h camera, camera_flip_e *flip);
1315
1316 /**
1317  * @ingroup CAPI_MEDIA_CAMERA_DISPLAY_MODULE
1318  * @brief Sets the visible property for display.
1319  *
1320  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1321  * @param[in] camera The handle to the camera
1322  * @param[in] visible The display visibility property
1323  *
1324  * @return @c 0 on success, otherwise a negative error value
1325  * @retval #CAMERA_ERROR_NONE Successful
1326  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1327  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1328  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1329  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
1330  * @see camera_is_display_visible()
1331  */
1332 int camera_set_display_visible(camera_h camera, bool visible);
1333
1334 /**
1335  * @ingroup CAPI_MEDIA_CAMERA_DISPLAY_MODULE
1336  * @brief Gets the visible property of display.
1337  *
1338  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1339  * @param[in] camera The handle to the camera
1340  * @param[out] visible @c true if camera display is visible, otherwise @c false
1341  *
1342  * @return @c 0 on success, otherwise a negative error value
1343  * @retval #CAMERA_ERROR_NONE Successful
1344  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1345  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1346  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1347  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
1348  * @see camera_set_display_visible()
1349  */
1350 int camera_is_display_visible(camera_h camera, bool *visible);
1351
1352 /**
1353  * @ingroup CAPI_MEDIA_CAMERA_DISPLAY_MODULE
1354  * @brief Sets the display mode.
1355  *
1356  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1357  * @param[in] camera The handle to the camera
1358  * @param[in] mode The display mode
1359  *
1360  * @return @c 0 on success, otherwise a negative error value
1361  * @retval #CAMERA_ERROR_NONE Successful
1362  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1363  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1364  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1365  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
1366  * @see camera_get_display_mode()
1367  */
1368 int camera_set_display_mode(camera_h camera, camera_display_mode_e mode);
1369
1370 /**
1371  * @ingroup CAPI_MEDIA_CAMERA_DISPLAY_MODULE
1372  * @brief Gets the display mode.
1373  *
1374  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1375  * @param[in] camera The handle to the camera
1376  * @param[out] mode The display mode
1377  *
1378  * @return @c 0 on success, otherwise a negative error value
1379  * @retval #CAMERA_ERROR_NONE Successful
1380  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1381  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1382  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1383  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
1384  * @see camera_set_display_mode()
1385  */
1386 int camera_get_display_mode(camera_h camera, camera_display_mode_e *mode);
1387
1388 /**
1389  * @brief Sets the hint for display reuse.
1390  * @since_tizen 3.0
1391  * @details If the hint is set to true, the display will be reused when the camera device is changed with camera_change_device().
1392  * @remarks If the current display type is #CAMERA_DISPLAY_TYPE_NONE, this function will return #CAMERA_ERROR_INVALID_OPERATION.
1393  * @param[in] camera The handle to the camera
1394  * @param[in] hint The hint for display reuse; true - reuse the display, false - do not reuse
1395  * @return @c 0 on success, otherwise a negative error value
1396  * @retval #CAMERA_ERROR_NONE Successful
1397  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1398  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
1399  * @retval #CAMERA_ERROR_INVALID_OPERATION Internal error
1400  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
1401  * @pre    The camera state must be set to #CAMERA_STATE_PREVIEW.
1402  * @see camera_get_display_reuse_hint()
1403  * @see camera_change_device()
1404  */
1405 int camera_set_display_reuse_hint(camera_h camera, bool hint);
1406
1407 /**
1408  * @brief Gets the hint for display reuse.
1409  * @since_tizen 3.0
1410  * @remarks If the current display type is #CAMERA_DISPLAY_TYPE_NONE, this function will return #CAMERA_ERROR_INVALID_OPERATION.
1411  * @param[in] camera The handle to the camera
1412  * @param[out] hint The hint for display reuse; true - reuse the display, false - do not reuse
1413  * @return @c 0 on success, otherwise a negative error value
1414  * @retval #CAMERA_ERROR_NONE Successful
1415  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1416  * @retval #CAMERA_ERROR_INVALID_OPERATION Internal error
1417  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
1418  * @see camera_get_display_reuse_hint()
1419  * @see camera_change_device()
1420  */
1421 int camera_get_display_reuse_hint(camera_h camera, bool *hint);
1422
1423 /**
1424  * @brief Sets the resolution of the captured image.
1425  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1426  * @param[in] camera The handle to the camera
1427  * @param[in] width The capture width
1428  * @param[in] height The capture height
1429  * @return @c 0 on success, otherwise a negative error value
1430  * @retval #CAMERA_ERROR_NONE Successful
1431  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1432  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
1433  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1434  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1435  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
1436  * @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
1437  * @see camera_start_capture()
1438  * @see camera_get_capture_resolution()
1439  * @see camera_foreach_supported_capture_resolution()
1440  */
1441 int camera_set_capture_resolution(camera_h camera, int width, int height);
1442
1443 /**
1444  * @brief Gets the resolution of the captured image.
1445  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1446  * @param[in] camera The handle to the camera
1447  * @param[out] width The capture width
1448  * @param[out] height The capture height
1449  * @return @c 0 on success, otherwise a negative error value
1450  * @retval #CAMERA_ERROR_NONE Successful
1451  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1452  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1453  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1454  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
1455  * @see camera_set_capture_resolution()
1456  * @see camera_foreach_supported_capture_resolution()
1457  */
1458 int camera_get_capture_resolution(camera_h camera, int *width, int *height);
1459
1460 /**
1461  * @}
1462  */
1463
1464 /**
1465  * @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
1466  * @{
1467  */
1468
1469 /**
1470  * @brief Retrieves all supported camera captured resolutions by invoking the callback function once for each supported camera capture resolution.
1471  *
1472  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1473  * @param[in] camera The handle to the camera
1474  * @param[in] callback The callback function to register
1475  * @param[in] user_data The user data to be passed to the callback function
1476  * @return @c 0 on success, otherwise a negative error value
1477  * @retval #CAMERA_ERROR_NONE Successful
1478  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1479  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1480  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1481  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
1482  * @post This function invokes camera_supported_capture_resolution_cb() repeatedly to retrieve each supported capture resolution.
1483  * @see camera_set_capture_resolution()
1484  * @see camera_get_capture_resolution()
1485  * @see camera_supported_capture_resolution_cb()
1486  */
1487 int camera_foreach_supported_capture_resolution(camera_h camera, camera_supported_capture_resolution_cb callback, void *user_data);
1488
1489 /**
1490  * @}
1491  */
1492
1493 /**
1494  * @addtogroup CAPI_MEDIA_CAMERA_MODULE
1495  * @{
1496  */
1497
1498 /**
1499  * @brief Sets the format of an image to be captured.
1500  *
1501  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1502  * @remarks This function should be called before capturing (see camera_start_capture()).
1503  * @param[in] camera The handle to the camera
1504  * @param[out] format The format of the image to be captured
1505  * @return @c 0 on success, otherwise a negative error value
1506  * @retval #CAMERA_ERROR_NONE Successful
1507  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1508  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
1509  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1510  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1511  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
1512  * @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
1513  * @see camera_start_capture()
1514  * @see camera_get_capture_format()
1515  * @see camera_foreach_supported_capture_format()
1516  */
1517 int camera_set_capture_format(camera_h camera, camera_pixel_format_e format);
1518
1519 /**
1520  * @brief Gets the format of the image to be captured.
1521  *
1522  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1523  * @param[in] camera The handle to the camera
1524  * @param[out] format The format of the image to be captured
1525  * @return @c 0 on success, otherwise a negative error value
1526  * @retval #CAMERA_ERROR_NONE Successful
1527  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1528  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1529  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1530  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
1531  * @see camera_set_capture_format()
1532  * @see camera_foreach_supported_capture_format()
1533  */
1534 int camera_get_capture_format(camera_h camera, camera_pixel_format_e *format);
1535
1536 /**
1537  * @}
1538  */
1539
1540 /**
1541  * @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
1542  * @{
1543  */
1544
1545 /**
1546  * @brief Retrieves all supported camera capture formats by invoking the callback function once for each supported camera capture format.
1547  *
1548  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1549  * @param[in] camera The handle to the camera
1550  * @param[in] callback The callback function to be invoked
1551  * @param[in] user_data The user data to be passed to the callback function
1552  * @return @c 0 on success, otherwise a negative error value
1553  * @retval #CAMERA_ERROR_NONE Successful
1554  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1555  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1556  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1557  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
1558  * @post This function invokes camera_supported_capture_format_cb() repeatedly to retrieve each supported capture format.
1559  * @see camera_set_capture_format()
1560  * @see camera_get_capture_format()
1561  * @see camera_supported_capture_format_cb()
1562  */
1563 int camera_foreach_supported_capture_format(camera_h camera, camera_supported_capture_format_cb callback, void *user_data);
1564
1565 /**
1566  * @}
1567  */
1568
1569 /**
1570  * @addtogroup CAPI_MEDIA_CAMERA_MODULE
1571  * @{
1572  */
1573
1574 /**
1575  * @brief Sets the preview data format.
1576  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1577  * @remarks This function should be called before previewing (see camera_start_preview()).
1578  * @param[in] camera The handle to the camera
1579  * @param[in] format The preview data format
1580  * @return @c 0 on success, otherwise a negative error value
1581  * @retval #CAMERA_ERROR_NONE Successful
1582  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1583  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
1584  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1585  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1586  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
1587  * @pre The camera state must be set to #CAMERA_STATE_CREATED.
1588  * @see camera_start_preview()
1589  * @see camera_get_preview_format()
1590  * @see camera_foreach_supported_preview_format()
1591  */
1592 int camera_set_preview_format(camera_h camera, camera_pixel_format_e format);
1593
1594 /**
1595  * @brief Gets the format of the preview stream.
1596  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1597  * @param[in] camera The handle to the camera
1598  * @param[out] format The preview data format
1599  * @return @c 0 on success, otherwise a negative error value
1600  * @retval #CAMERA_ERROR_NONE Successful
1601  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1602  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1603  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1604  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
1605  * @see camera_set_preview_format()
1606  * @see camera_foreach_supported_preview_format()
1607  */
1608 int camera_get_preview_format(camera_h camera, camera_pixel_format_e *format);
1609
1610 /**
1611  * @brief Gets the facing direction of camera module.
1612  * @since_tizen 3.0
1613  * @param[in] camera The handle to the camera
1614  * @param[out] facing_direction The facing direction of camera module
1615  * @return @c 0 on success, otherwise a negative error value
1616  * @retval #CAMERA_ERROR_NONE Successful
1617  * @retval #CAMERA_ERROR_INVALID_OPERATION Internal error
1618  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1619  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1620  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
1621  */
1622 int camera_get_facing_direction(camera_h camera, camera_facing_direction_e *facing_direction);
1623
1624 /**
1625  * @brief Gets the camera's flash state.
1626  * @since_tizen 3.0
1627  * @param[in] device The hardware camera to access
1628  * @param[out] state The current flash state
1629  * @return @c 0 on success, otherwise a negative error value
1630  * @retval #CAMERA_ERROR_NONE Successful
1631  * @retval #CAMERA_ERROR_INVALID_OPERATION Internal error
1632  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1633  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1634  * @see camera_attr_set_flash_mode()
1635  * @see camera_attr_get_flash_mode()
1636  */
1637 int camera_get_flash_state(camera_device_e device, camera_flash_state_e *state);
1638
1639 /**
1640  * @}
1641  */
1642
1643 /**
1644  * @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
1645  * @{
1646  */
1647
1648 /**
1649  * @brief Retrieves all supported camera preview formats by invoking the callback function once for each supported camera preview format.
1650  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1651  * @param[in] camera The handle to the camera
1652  * @param[in] callback The callback function to be invoked
1653  * @param[in] user_data The user data to be passed to the callback function
1654  * @return @c 0 on success, otherwise a negative error value
1655  * @retval #CAMERA_ERROR_NONE Successful
1656  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1657  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1658  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1659  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
1660  * @post This function invokes camera_supported_preview_format_cb() repeatedly to retrieve each supported preview format.
1661  * @see camera_set_preview_format()
1662  * @see camera_get_preview_format()
1663  * @see camera_supported_preview_format_cb()
1664  */
1665 int camera_foreach_supported_preview_format(camera_h camera, camera_supported_preview_format_cb callback, void *user_data);
1666
1667 /**
1668  * @ingroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
1669  * @brief Gets the face detection feature's supported state.
1670  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1671  * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
1672  * @param[in] camera The handle to the camera
1673  * @return @c true if supported, otherwise @c false
1674  * @see camera_start_face_detection()
1675  * @see camera_stop_face_detection()
1676  * @exception #CAMERA_ERROR_NONE Successful
1677  * @exception #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1678  * @exception #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1679  * @exception #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1680  */
1681 bool camera_is_supported_face_detection(camera_h camera);
1682
1683 /**
1684  * @brief Gets the zero shutter lag feature's supported state.
1685  * @ingroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
1686  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1687  * @remarks If supporting zero shutter lag, continuous shot can be done with full capture size. \n
1688  *                The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
1689  * @param[in] camera The handle to the camera
1690  * @return @c true if supported, otherwise @c false
1691  * @exception #CAMERA_ERROR_NONE Successful
1692  * @exception #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1693  * @exception #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1694  * @exception #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1695  */
1696 bool camera_is_supported_zero_shutter_lag(camera_h camera);
1697
1698 /**
1699  * @ingroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
1700  * @brief Gets the camera device count.
1701  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1702  * @remarks If the device supports primary and secondary camera, this returns @c 2. If @c 1 is returned, the device only supports primary camera.
1703  * @param[in] camera The handle to the camera
1704  * @param[out] device_count The device count
1705  * @return @c 0 on success, otherwise a negative error value
1706  * @retval #CAMERA_ERROR_NONE Successful
1707  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1708  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1709  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1710  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
1711  */
1712 int camera_get_device_count(camera_h camera, int *device_count);
1713
1714 /**
1715  * @brief Gets the media packet preview callback feature's supported state.
1716  * @ingroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
1717  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1718  * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
1719  * @param[in] camera The handle to the camera
1720  * @return @c true if supported, otherwise @c false
1721  * @exception #CAMERA_ERROR_NONE Successful
1722  * @exception #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1723  * @exception #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1724  * @exception #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1725  *
1726  */
1727 bool camera_is_supported_media_packet_preview_cb(camera_h camera);
1728
1729 /**
1730  * @}
1731  */
1732
1733 /**
1734  * @addtogroup CAPI_MEDIA_CAMERA_MODULE
1735  * @{
1736  */
1737
1738 /**
1739  * @brief Registers a callback function to be called once per frame when previewing.
1740  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1741  * @remarks This callback does not work in the video recorder mode.\n
1742  *          Before 4.0, the only allowed state for calling this function was #CAMERA_STATE_CREATED.\n
1743  *          Since 4.0, #CAMERA_STATE_PREVIEW has been added as an allowed state,\n
1744  *          so that this function could be called before previewing or even while previewing.\n
1745  *          A registered callback is called on the internal thread of the camera.\n
1746  *          A video frame can be retrieved using a registered callback,\n
1747  *          and the buffer is only available in a registered callback.\n
1748  *          Since tizen 3.0, if you change the buffer in a registered callback,\n
1749  *          it could not be displayed on the device in case of copied buffer.\n
1750  *          and if camera_is_supported_media_packet_preview_cb() returns false,\n
1751  *          it's copied buffer case.
1752  * @param[in] camera The handle to the camera
1753  * @param[in] callback The callback function to be registered
1754  * @param[in] user_data The user data to be passed to the callback function
1755  * @return @c 0 on success, otherwise a negative error value
1756  * @retval #CAMERA_ERROR_NONE Successful
1757  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1758  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1759  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1760  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
1761  * @pre Before 4.0 : The camera state must be set to #CAMERA_STATE_CREATED.\n
1762  *      Since  4.0 : The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
1763  * @see camera_start_preview()
1764  * @see camera_unset_preview_cb()
1765  * @see camera_preview_cb()
1766  */
1767 int camera_set_preview_cb(camera_h camera, camera_preview_cb callback, void *user_data);
1768
1769 /**
1770  * @brief Unregisters the callback function.
1771  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1772  * @param[in] camera The handle to the camera
1773  * @return @c 0 on success, otherwise a negative error value
1774  * @retval #CAMERA_ERROR_NONE Successful
1775  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1776  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1777  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1778  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
1779  * @see camera_set_preview_cb()
1780  */
1781 int camera_unset_preview_cb(camera_h camera);
1782
1783 /**
1784  * @brief Registers a media packet callback function to be called once per frame when previewing.
1785  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1786  * @remarks This callback does not work in video recorder mode.\n
1787  *          This function should be called before previewing (see camera_start_preview())\n
1788  *          A registered callback is called on the internal thread of the camera.\n
1789  *          A video frame can be retrieved using a registered callback as a media packet.\n
1790  *          The callback function holds the same buffer that will be drawn on the display device.\n
1791  *          So if you change the media packet in a registered callback, it will be displayed on the device\n
1792  *          and the media packet is available until it's destroyed by media_packet_destroy().
1793  * @param[in] camera The handle to the camera
1794  * @param[in] callback The callback function to be registered
1795  * @param[in] user_data The user data to be passed to the callback function
1796  * @return 0 on success, otherwise a negative error value
1797  * @retval #CAMERA_ERROR_NONE Successful
1798  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1799  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1800  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1801  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
1802  * @pre The camera's state should be #CAMERA_STATE_CREATED.
1803  * @see camera_start_preview()
1804  * @see camera_unset_media_packet_preview_cb()
1805  * @see camera_media_packet_preview_cb()
1806  */
1807 int camera_set_media_packet_preview_cb(camera_h camera, camera_media_packet_preview_cb callback, void *user_data);
1808
1809 /**
1810  * @brief Unregisters the media packet callback function.
1811  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1812  * @param[in] camera The handle to the camera
1813  * @return @c 0 on success, otherwise a negative error value
1814  * @retval #CAMERA_ERROR_NONE Successful
1815  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1816  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1817  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1818  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
1819  * @see camera_set_media_packet_preview_cb()
1820  */
1821 int camera_unset_media_packet_preview_cb(camera_h camera);
1822
1823 /**
1824  * @brief Registers a callback function to be called when the camera state changes.
1825  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1826  * @param[in] camera The handle to the camera
1827  * @param[in] callback The callback function to register
1828  * @param[in] user_data The user data to be passed to the callback function
1829  * @return @c 0 on success, otherwise a negative error value
1830  * @retval #CAMERA_ERROR_NONE Successful
1831  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1832  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1833  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1834  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
1835  * @post This function will invoke camera_state_changed_cb() when the camera state changes.
1836  * @see camera_unset_state_changed_cb()
1837  * @see camera_state_changed_cb()
1838  */
1839 int camera_set_state_changed_cb(camera_h camera, camera_state_changed_cb callback, void *user_data);
1840
1841 /**
1842  * @brief Unregisters the callback function.
1843  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1844  * @param[in] camera The handle to the camera
1845  * @return @c 0 on success, otherwise a negative error value
1846  * @retval #CAMERA_ERROR_NONE Successful
1847  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1848  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1849  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1850  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
1851  * @see camera_set_state_changed_cb()
1852  */
1853 int camera_unset_state_changed_cb(camera_h camera);
1854
1855 /**
1856  * @brief Registers a callback function to be called when the camera is interrupted by policy.
1857  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1858  * @param[in] camera The handle to the camera
1859  * @param[in] callback The callback function to register
1860  * @param[in] user_data The user data to be passed to the callback function
1861  * @return @c 0 on success, otherwise a negative error value
1862  * @retval #CAMERA_ERROR_NONE Successful
1863  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1864  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1865  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1866  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
1867  * @see camera_unset_interrupted_cb()
1868  * @see camera_interrupted_cb()
1869  */
1870 int camera_set_interrupted_cb(camera_h camera, camera_interrupted_cb callback, void *user_data);
1871
1872 /**
1873  * @brief Unregisters the callback function.
1874  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1875  * @param[in] camera The handle to the camera
1876  * @return @c 0 on success, otherwise a negative error value
1877  * @retval #CAMERA_ERROR_NONE Successful
1878  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1879  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1880  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1881  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
1882  * @see camera_set_interrupted_cb()
1883  */
1884 int camera_unset_interrupted_cb(camera_h camera);
1885
1886 /**
1887  * @brief Registers a callback function to be called when the camera interrupt is started by policy.
1888  * @since_tizen 4.0
1889  * @param[in] camera The handle to the camera
1890  * @param[in] callback The callback function to register
1891  * @param[in] user_data The user data to be passed to the callback function
1892  * @return @c 0 on success, otherwise a negative error value
1893  * @retval #CAMERA_ERROR_NONE Successful
1894  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1895  * @see camera_unset_interrupt_started_cb()
1896  * @see camera_interrupt_started_cb()
1897  */
1898 int camera_set_interrupt_started_cb(camera_h camera, camera_interrupt_started_cb callback, void *user_data);
1899
1900 /**
1901  * @brief Unregisters the callback function.
1902  * @since_tizen 4.0
1903  * @param[in] camera The handle to the camera
1904  * @return @c 0 on success, otherwise a negative error value
1905  * @retval #CAMERA_ERROR_NONE Successful
1906  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1907  * @see camera_set_interrupt_started_cb()
1908  */
1909 int camera_unset_interrupt_started_cb(camera_h camera);
1910
1911 /**
1912  * @brief Registers a callback function to be called when the auto-focus state changes.
1913  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1914  * @param[in] camera The handle to the camera
1915  * @param[in] callback The callback function to register
1916  * @param[in] user_data The user data to be passed to the callback function
1917  * @return @c 0 on success, otherwise a negative error value
1918  * @retval #CAMERA_ERROR_NONE Successful
1919  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1920  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1921  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1922  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
1923  * @post This function will invoke camera_focus_changed_cb() when the auto-focus state changes.
1924  * @see camera_start_focusing()
1925  * @see camera_cancel_focusing()
1926  * @see camera_unset_focus_changed_cb()
1927  * @see camera_focus_changed_cb()
1928  */
1929 int camera_set_focus_changed_cb(camera_h camera, camera_focus_changed_cb callback, void *user_data);
1930
1931 /**
1932  * @brief Unregisters the callback function.
1933  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1934  * @param[in] camera The handle to the camera
1935  * @return @c 0 on success, otherwise a negative error value
1936  * @retval #CAMERA_ERROR_NONE Successful
1937  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1938  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1939  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1940  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
1941  * @see camera_set_focus_changed_cb()
1942  */
1943 int camera_unset_focus_changed_cb(camera_h camera);
1944
1945 /**
1946  * @brief Registers a callback function to be called when an asynchronous operation error occurs.
1947  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1948  * @remarks This callback informs about a critical error situation.\n
1949  *          When this callback is invoked, the user should release the resource and terminate the application.\n
1950  *          In case of errors, one of the following codes will occur:\n
1951  *          #CAMERA_ERROR_DEVICE,\n
1952  *          #CAMERA_ERROR_INVALID_OPERATION,\n
1953  *          #CAMERA_ERROR_OUT_OF_MEMORY.
1954  * @param[in] camera The handle to the camera
1955  * @param[in] callback The callback function to register
1956  * @param[in] user_data The user data to be passed to the callback function
1957  * @return @c 0 on success, otherwise a negative error value
1958  * @retval #CAMERA_ERROR_NONE Successful
1959  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1960  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1961  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1962  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
1963  * @post This function will invoke camera_error_cb() when an asynchronous operation error occurs.
1964
1965  * @see camera_unset_error_cb()
1966  * @see camera_error_cb()
1967  */
1968 int camera_set_error_cb(camera_h camera, camera_error_cb callback, void *user_data);
1969
1970 /**
1971  * @brief Unregisters the callback function.
1972  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1973  * @param[in] camera The handle to the camera
1974  * @return @c 0 on success, otherwise a negative error value
1975  * @retval #CAMERA_ERROR_NONE Successful
1976  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1977  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1978  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1979  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
1980  * @see camera_set_error_cb()
1981  */
1982 int camera_unset_error_cb(camera_h camera);
1983
1984 /**
1985  * @brief Gets the state of camera device.
1986  * @since_tizen 3.0
1987  * @param[in] device The hardware camera type
1988  * @param[out] state The current state of the device
1989  * @return @c 0 on success, otherwise a negative error value
1990  * @retval #CAMERA_ERROR_NONE Successful
1991  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1992  * @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
1993  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1994  */
1995 int camera_get_device_state(camera_device_e device, camera_device_state_e *state);
1996
1997 /**
1998  * @brief Registers a callback function to be called when the camera device state changes.
1999  * @since_tizen 3.0
2000  * @param[in] callback The callback function to register
2001  * @param[in] user_data The user data to be passed to the callback function
2002  * @param[out] cb_id The id of registered callback
2003  * @return @c 0 on success, otherwise a negative error value
2004  * @retval #CAMERA_ERROR_NONE Successful
2005  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2006  * @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
2007  * @retval #CAMERA_ERROR_OUT_OF_MEMORY Out of memory
2008  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2009  * @post This function will invoke camera_device_state_changed_cb() when the camera device's state changes.
2010  * @see camera_remove_device_state_changed_cb()
2011  * @see camera_device_state_changed_cb()
2012  */
2013 int camera_add_device_state_changed_cb(camera_device_state_changed_cb callback, void *user_data, int *cb_id);
2014
2015 /**
2016  * @brief Unregisters the callback function.
2017  * @since_tizen 3.0
2018  * @param[in] cb_id The id of registered callback
2019  * @return @c 0 on success, otherwise a negative error value
2020  * @retval #CAMERA_ERROR_NONE Successful
2021  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2022  * @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
2023  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2024  * @see camera_add_device_state_changed_cb()
2025  */
2026 int camera_remove_device_state_changed_cb(int cb_id);
2027
2028 /**
2029  * @}
2030  */
2031
2032 /**
2033  * @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
2034  * @{
2035  */
2036
2037 /**
2038  * @brief Called to get each supported auto-focus mode.
2039  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2040  * @param[in] mode The supported auto-focus mode
2041  * @param[in] user_data The user data passed from the foreach function
2042  * @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop
2043  * @pre camera_attr_foreach_supported_af_mode() will invoke this callback.
2044  * @see camera_attr_foreach_supported_af_mode()
2045  */
2046 typedef bool (*camera_attr_supported_af_mode_cb)(camera_attr_af_mode_e mode, void *user_data);
2047
2048 /**
2049  * @brief Called to get each supported exposure mode.
2050  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2051  * @param[in] mode The supported exposure mode
2052  * @param[in] user_data The user data passed from the foreach function
2053  * @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop
2054  * @pre camera_attr_foreach_supported_exposure_mode() will invoke this callback.
2055  * @see camera_attr_foreach_supported_exposure_mode()
2056  * @see #camera_attr_exposure_mode_e
2057  */
2058 typedef bool (*camera_attr_supported_exposure_mode_cb)(camera_attr_exposure_mode_e mode, void *user_data);
2059
2060 /**
2061  * @brief Called to get each supported ISO mode.
2062  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2063  * @param[in] iso The supported ISO mode
2064  * @param[in] user_data The user data passed from the foreach function
2065  * @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop
2066  * @pre camera_attr_foreach_supported_iso() will invoke this callback.
2067  * @see camera_attr_foreach_supported_iso()
2068  */
2069 typedef bool (*camera_attr_supported_iso_cb)(camera_attr_iso_e iso, void *user_data);
2070
2071 /**
2072  * @brief Called to get each supported white balance.
2073  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2074  * @param[in] wb The supported white balance mode
2075  * @param[in] user_data The user data passed from the foreach function
2076  * @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop
2077  * @pre camera_attr_foreach_supported_whitebalance() will invoke this callback.
2078  * @see camera_attr_foreach_supported_whitebalance()
2079  * @see #camera_attr_whitebalance_e
2080  */
2081 typedef bool (*camera_attr_supported_whitebalance_cb)(camera_attr_whitebalance_e wb, void *user_data);
2082
2083 /**
2084  * @brief Called to get each supported effect mode.
2085  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2086  * @param[in] effect The supported effect mode
2087  * @param[in] user_data The user data passed from the foreach function
2088  * @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop
2089  * @pre camera_attr_foreach_supported_effect() will invoke this callback.
2090  * @see camera_attr_foreach_supported_effect()
2091  */
2092 typedef bool (*camera_attr_supported_effect_cb)(camera_attr_effect_mode_e effect, void *user_data);
2093
2094 /**
2095  * @brief Called to get each supported scene mode.
2096  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2097  * @param[in] mode The supported scene mode
2098  * @param[in] user_data The user data passed from the foreach function
2099  * @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop
2100  * @pre camera_attr_foreach_supported_scene_mode() will invoke this callback.
2101  * @see camera_attr_foreach_supported_scene_mode()
2102  * @see #camera_attr_scene_mode_e
2103  */
2104 typedef bool (*camera_attr_supported_scene_mode_cb)(camera_attr_scene_mode_e mode, void *user_data);
2105
2106 /**
2107  * @brief Called to get each supported flash mode.
2108  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2109  * @param[in] mode The supported flash mode
2110  * @param[in] user_data The user data passed from the foreach function
2111  * @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop
2112  * @pre camera_attr_foreach_supported_flash_mode() will invoke this callback.
2113  * @see camera_attr_foreach_supported_flash_mode()
2114  */
2115 typedef bool (*camera_attr_supported_flash_mode_cb)(camera_attr_flash_mode_e mode, void *user_data);
2116
2117 /**
2118  * @brief Called to get each supported FPS mode.
2119  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2120  * @param[in] mode The supported FPS mode
2121  * @param[in] user_data The user data passed from the foreach function
2122  * @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop
2123  * @pre camera_attr_foreach_supported_fps() will invoke this callback.
2124  * @see camera_attr_foreach_supported_fps()
2125  */
2126 typedef bool (*camera_attr_supported_fps_cb)(camera_attr_fps_e fps, void *user_data);
2127
2128 /**
2129  * @brief Called to get each supported stream flip mode.
2130  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2131  * @param[in] mode The supported stream flip mode
2132  * @param[in] user_data The user data passed from the foreach function
2133  * @return @c true to continue with the next iteration of the loop, \n @c false to break out of the loop
2134  * @pre camera_attr_foreach_supported_stream_flip() will invoke this callback.
2135  * @see camera_attr_foreach_supported_stream_flip()
2136  */
2137 typedef bool (*camera_attr_supported_stream_flip_cb)(camera_flip_e flip, void *user_data);
2138
2139 /**
2140  * @brief Called to get each supported stream rotation mode.
2141  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2142  * @param[in] mode The supported stream rotation mode
2143  * @param[in] user_data The user data passed from the foreach function
2144  * @return @c true to continue with the next iteration of the loop, \n @c false to break out of the loop
2145  * @pre camera_attr_foreach_supported_stream_rotation() will invoke this callback.
2146  * @see camera_attr_foreach_supported_stream_rotation()
2147  */
2148 typedef bool (*camera_attr_supported_stream_rotation_cb)(camera_rotation_e rotation, void *user_data);
2149
2150 /**
2151  * @brief Called to get each supported theater mode.
2152  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2153  * @param[in] mode The supported theater mode
2154  * @param[in] user_data The user data passed from the foreach function
2155  * @return @c true to continue with the next iteration of the loop, \n @c false to break out of the loop
2156  * @pre camera_attr_foreach_supported_theater_mode() will invoke this callback.
2157  * @see camera_attr_foreach_supported_theater_mode()
2158  */
2159 typedef bool (*camera_attr_supported_theater_mode_cb)(camera_attr_theater_mode_e mode, void *user_data);
2160
2161 /**
2162  * @brief Called to get each supported PTZ(Pan Tilt Zoom) type.
2163  * @since_tizen 3.0
2164  * @param[in] type The supported ptz type
2165  * @param[in] user_data The user data passed from the foreach function
2166  * @return @c true to continue with the next iteration of the loop, \n @c false to break out of the loop
2167  * @pre camera_attr_foreach_supported_ptz_mode() will invoke this callback.
2168  * @see camera_attr_foreach_supported_ptz_mode()
2169  */
2170 typedef bool (*camera_attr_supported_ptz_type_cb)(camera_attr_ptz_type_e type, void *user_data);
2171
2172
2173 /**
2174  * @}
2175  */
2176
2177 /**
2178  * @addtogroup CAPI_MEDIA_CAMERA_ATTRIBUTES_MODULE
2179  * @{
2180  */
2181
2182 /**
2183  * @brief Sets the preview frame rate.
2184  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2185  * @remarks This function should be called before previewing (see camera_start_preview()).
2186  * @param[in] camera The handle to the camera
2187  * @param[in] fps The frame rate
2188  * @return @c 0 on success, otherwise a negative error value
2189  * @retval #CAMERA_ERROR_NONE Successful
2190  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2191  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
2192  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2193  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2194  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
2195  * @pre The camera state must be set to #CAMERA_STATE_CREATED.
2196  * @see camera_start_preview()
2197  * @see camera_attr_get_preview_fps()
2198  * @see camera_attr_foreach_supported_fps()
2199  */
2200 int camera_attr_set_preview_fps(camera_h camera, camera_attr_fps_e fps);
2201
2202 /**
2203  * @brief Gets the frames per second of a preview video stream.
2204  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2205  * @param[in] camera The handle to the camera
2206  * @param[out] fps The frames per second of the preview video stream
2207  * @return @c 0 on success, otherwise a negative error value
2208  * @retval #CAMERA_ERROR_NONE Successful
2209  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2210  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2211  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2212  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
2213  * @see camera_attr_set_preview_fps()
2214  * @see camera_attr_foreach_supported_fps()
2215  */
2216 int camera_attr_get_preview_fps(camera_h camera, camera_attr_fps_e *fps);
2217
2218 /**
2219  * @}
2220  */
2221
2222 /**
2223  * @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
2224  * @{
2225  */
2226
2227 /**
2228  * @brief Retrieves all supported FPS modes by invoking the callback function once for each supported FPS mode.
2229  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2230  * @param[in] camera The handle to the camera
2231  * @param[in] callback The callback function to invoke
2232  * @param[in] user_data The user data to be passed to the callback function
2233  * @return @c 0 on success, otherwise a negative error value
2234  * @retval #CAMERA_ERROR_NONE Successful
2235  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2236  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2237  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2238  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
2239  * @post This function invokes camera_attr_supported_fps_cb() repeatedly to get each supported FPS mode.
2240  * @see camera_attr_set_preview_fps()
2241  * @see camera_attr_get_preview_fps()
2242  * @see camera_attr_supported_fps_cb()
2243  */
2244 int camera_attr_foreach_supported_fps(camera_h camera, camera_attr_supported_fps_cb callback, void *user_data);
2245
2246 /**
2247  * @brief Retrieves all supported FPS modes by invoking the callback function once for each supported FPS mode.
2248  * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
2249  * @param[in] camera The handle to the camera
2250  * @param[in] width Required preview resolution's width
2251  * @param[in] height Required preview resolution's height
2252  * @param[in] callback The callback function to invoke
2253  * @param[in] user_data The user data to be passed to the callback function
2254  * @return @c 0 on success, otherwise a negative error value
2255  * @retval #CAMERA_ERROR_NONE Successful
2256  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2257  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2258  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2259  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
2260  * @post This function invokes camera_attr_supported_fps_cb() repeatedly to get each supported FPS mode.
2261  * @see camera_attr_set_preview_fps()
2262  * @see camera_attr_get_preview_fps()
2263  * @see camera_attr_supported_fps_cb()
2264  */
2265 int camera_attr_foreach_supported_fps_by_resolution(camera_h camera, int width, int height, camera_attr_supported_fps_cb callback, void *user_data);
2266
2267 /**
2268  * @}
2269  */
2270
2271 /**
2272  * @addtogroup CAPI_MEDIA_CAMERA_ATTRIBUTES_MODULE
2273  * @{
2274  */
2275
2276 /**
2277  * @brief Sets quality of the image.
2278  * @details The range for image quality is 1 to 100. If @a quality is out of range, #CAMERA_ERROR_INVALID_PARAMETER error occurred.
2279  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2280  * @param[in] camera The handle to the camera
2281  * @param[in] quality The quality of image (1 ~ 100)
2282  * @return @c 0 on success, otherwise a negative error value
2283  * @retval #CAMERA_ERROR_NONE Successful
2284  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2285  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
2286  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2287  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2288  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
2289  * @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
2290  * @see camera_start_preview()
2291  * @see camera_attr_get_image_quality()
2292  */
2293 int camera_attr_set_image_quality(camera_h camera, int quality);
2294
2295 /**
2296  * @brief Gets the quality of a still image, which is captured.
2297  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2298  * @param[in] camera The handle to the camera
2299  * @param[out] quality The quality of the image(1 ~ 100)
2300  * @return @c 0 on success, otherwise a negative error value
2301  * @retval #CAMERA_ERROR_NONE Successful
2302  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2303  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2304  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2305  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
2306  * @see camera_attr_set_image_quality()
2307  */
2308 int camera_attr_get_image_quality(camera_h camera, int *quality);
2309
2310 /**
2311  * @brief Gets the bit rate of encoded preview.
2312  * @since_tizen 3.0
2313  * @param[in] camera The handle to the camera
2314  * @param[out] bitrate The bit rate of encoded preview
2315  * @return @c 0 on success, otherwise a negative error value
2316  * @retval #CAMERA_ERROR_NONE Successful
2317  * @retval #CAMERA_ERROR_INVALID_OPERATION Internal error
2318  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2319  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2320  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
2321  * @see camera_attr_set_encoded_preview_bitrate()
2322  */
2323 int camera_attr_get_encoded_preview_bitrate(camera_h camera, int *bitrate);
2324
2325 /**
2326  * @brief Sets the bit rate of encoded preview.
2327  * @since_tizen 3.0
2328  * @param[in] camera The handle to the camera
2329  * @param[in] bitrate The bit rate of encoded preview
2330  * @return @c 0 on success, otherwise a negative error value
2331  * @retval #CAMERA_ERROR_NONE Successful
2332  * @retval #CAMERA_ERROR_INVALID_OPERATION Internal error
2333  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2334  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2335  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
2336  * @see camera_attr_get_encoded_preview_bitrate()
2337  */
2338 int camera_attr_set_encoded_preview_bitrate(camera_h camera, int bitrate);
2339
2340 /**
2341  * @brief Gets the GOP(Group Of Pictures) interval of encoded preview.
2342  * @since_tizen 3.0
2343  * @param[in] camera The handle to the camera
2344  * @param[out] interval the GOP interval of encoded preview (millisecond)
2345  * @return @c 0 on success, otherwise a negative error value
2346  * @retval #CAMERA_ERROR_NONE Successful
2347  * @retval #CAMERA_ERROR_INVALID_OPERATION Internal error
2348  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2349  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2350  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
2351  * @see camera_attr_get_encoded_preview_gop_interval()
2352  */
2353 int camera_attr_get_encoded_preview_gop_interval(camera_h camera, int *interval);
2354
2355 /**
2356  * @brief Sets the GOP(Group Of Pictures) interval of encoded preview.
2357  * @since_tizen 3.0
2358  * @param[in] camera The handle to the camera
2359  * @param[in] interval the GOP interval of encoded preview (millisecond)
2360  * @return @c 0 on success, otherwise a negative error value
2361  * @retval #CAMERA_ERROR_NONE Successful
2362  * @retval #CAMERA_ERROR_INVALID_OPERATION Internal error
2363  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2364  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2365  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
2366  * @see camera_attr_set_encoded_preview_gop_interval()
2367  */
2368 int camera_attr_set_encoded_preview_gop_interval(camera_h camera, int interval);
2369
2370 /**
2371  * @brief Sets the zoom level.
2372  * @details The range for the zoom level is received from camera_attr_get_zoom_range(). If @a zoom is out of range, the #CAMERA_ERROR_INVALID_PARAMETER error occurs.
2373  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2374  * @param[in] camera The handle to the camera
2375  * @param[in] zoom The zoom level
2376  * @return @c 0 on success, otherwise a negative error value
2377  * @retval #CAMERA_ERROR_NONE Successful
2378  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2379  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
2380  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2381  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2382  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
2383  * @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
2384  * @see camera_attr_get_zoom()
2385  * @see camera_attr_get_zoom_range()
2386  */
2387 int camera_attr_set_zoom(camera_h camera, int zoom);
2388
2389 /**
2390  * @brief Gets the zoom level.
2391  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2392  * @param[in] camera The handle to the camera
2393  * @param[out] zoom The zoom level
2394  * @return @c 0 on success, otherwise a negative error value
2395  * @retval #CAMERA_ERROR_NONE Successful
2396  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2397  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2398  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2399  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
2400  * @see camera_attr_set_zoom()
2401  * @see camera_attr_get_zoom_range()
2402  */
2403 int camera_attr_get_zoom(camera_h camera, int *zoom);
2404
2405 /**
2406  * @brief Gets the available zoom level.
2407  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2408  * @remarks If the min value is greater than the max value, it means that this feature is not supported.
2409  * @param[in] camera The handle to the camera
2410  * @param[out] min The minimum zoom level
2411  * @param[out] max The maximum zoom level
2412  * @return @c 0 on success, otherwise a negative error value
2413  * @retval #CAMERA_ERROR_NONE Successful
2414  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2415  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2416  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2417  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
2418  * @see camera_attr_set_zoom()
2419  * @see camera_attr_get_zoom()
2420  */
2421 int camera_attr_get_zoom_range(camera_h camera, int *min, int *max);
2422
2423
2424 /**
2425  * @brief Sets the auto focus mode.
2426  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2427  * @param[in] camera The handle to the camera
2428  * @param[in] mode The auto focus mode
2429  * @return @c 0 on success, otherwise a negative error value
2430  * @retval #CAMERA_ERROR_NONE Successful
2431  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2432  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
2433  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2434  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2435  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
2436  * @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
2437  * @see camera_attr_get_af_mode()
2438  * @see camera_attr_foreach_supported_af_mode()
2439  * @see #camera_attr_af_mode_e
2440  */
2441 int camera_attr_set_af_mode(camera_h camera, camera_attr_af_mode_e mode);
2442
2443 /**
2444  * @brief Gets the auto focus mode.
2445  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2446  * @param[in] camera The handle to the camera
2447  * @param[out] mode The auto focus mode
2448  * @return @c 0 on success, otherwise a negative error value
2449  * @retval #CAMERA_ERROR_NONE Successful
2450  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2451  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2452  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2453  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
2454  * @see camera_attr_foreach_supported_af_mode()
2455  * @see camera_attr_set_af_mode()
2456  * @see #camera_attr_af_mode_e
2457  */
2458 int camera_attr_get_af_mode(camera_h camera, camera_attr_af_mode_e *mode);
2459
2460 /**
2461  * @brief Sets auto focus area.
2462  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2463  * @remarks This API is invalid in the #CAMERA_ATTR_AF_NONE mode.\n
2464  *          The coordinates are mapped to preview area.
2465  * @param[in] camera The handle to the camera
2466  * @param[in] x The x coordinates of the focus area
2467  * @param[in] y The y coordinates of the focus area
2468  * @return @c 0 on success, otherwise a negative error value
2469  * @retval #CAMERA_ERROR_NONE Successful
2470  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2471  * @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
2472  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
2473  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2474  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2475  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
2476  * @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
2477  * @see camera_attr_set_af_mode()
2478  * @see camera_attr_clear_af_area()
2479  */
2480 int camera_attr_set_af_area(camera_h camera, int x, int y);
2481
2482 /**
2483  * @brief Clears the auto focus area.
2484  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2485  * @remarks The focusing area is set to the center.
2486  * @param[in] camera The handle to the camera
2487  * @return @c 0 on success, otherwise a negative error value
2488  * @retval #CAMERA_ERROR_NONE Successful
2489  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2490  * @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
2491  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2492  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2493  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
2494  * @see camera_attr_set_af_mode()
2495  * @see camera_attr_set_af_area()
2496  */
2497 int camera_attr_clear_af_area(camera_h camera);
2498
2499 /**
2500  * @}
2501  */
2502
2503 /**
2504  * @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
2505  * @{
2506  */
2507
2508 /**
2509  * @brief Retrieves all supported auto focus modes by invoking the callback function once for each supported auto focus mode.
2510  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2511  * @param[in] camera The handle to the camera
2512  * @param[in] callback The callback function to invoke
2513  * @param[in] user_data The user data to be passed to the callback function
2514  * @return @c 0 on success, otherwise a negative error value
2515  * @retval #CAMERA_ERROR_NONE Successful
2516  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2517  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2518  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2519  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
2520  * @post This function invokes camera_attr_supported_af_mode_cb() to get all the supported auto focus modes.
2521  * @see camera_attr_set_af_mode()
2522  * @see camera_attr_get_af_mode()
2523  * @see camera_attr_supported_af_mode_cb()
2524  */
2525 int camera_attr_foreach_supported_af_mode(camera_h camera, camera_attr_supported_af_mode_cb callback, void *user_data);
2526
2527 /**
2528  * @}
2529  */
2530
2531 /**
2532  * @addtogroup CAPI_MEDIA_CAMERA_ATTRIBUTES_MODULE
2533  * @{
2534  */
2535
2536 /**
2537  * @brief Sets the exposure mode.
2538  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2539  * @param[in] camera The handle to the camera
2540  * @param[in] mode The exposure mode
2541  * @return @c 0 on success, otherwise a negative error value
2542  * @retval #CAMERA_ERROR_NONE Successful
2543  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2544  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
2545  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2546  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2547  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
2548  * @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
2549  * @see camera_attr_get_exposure_mode()
2550  * @see camera_attr_foreach_supported_exposure_mode()
2551  */
2552 int camera_attr_set_exposure_mode(camera_h camera, camera_attr_exposure_mode_e mode);
2553
2554 /**
2555  * @brief Gets the exposure mode.
2556  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2557  * @param[in] camera The handle to the camera
2558  * @param[out] mode The exposure mode
2559  * @return @c 0 on success, otherwise a negative error value
2560  * @retval #CAMERA_ERROR_NONE Successful
2561  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2562  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2563  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2564  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
2565  * @see camera_attr_set_exposure_mode()
2566  * @see camera_attr_foreach_supported_exposure_mode()
2567  */
2568 int camera_attr_get_exposure_mode(camera_h camera, camera_attr_exposure_mode_e *mode);
2569
2570 /**
2571  * @}
2572  */
2573
2574 /**
2575  * @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
2576  * @{
2577  */
2578
2579 /**
2580  * @brief Retrieves all supported exposure modes by invoking the callback function once for each supported exposure mode.
2581  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2582  * @param[in] camera The handle to the camera
2583  * @param[in] callback The callback function to be invoked
2584  * @param[in] user_data The user data to be passed to the callback function
2585  * @return @c 0 on success, otherwise a negative error value
2586  * @retval #CAMERA_ERROR_NONE Successful
2587  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2588  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2589  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2590  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
2591  * @post This function invokes camera_attr_supported_exposure_mode_cb() to get all the supported exposure modes.
2592  * @see camera_attr_set_exposure_mode()
2593  * @see camera_attr_get_exposure_mode()
2594  * @see camera_attr_supported_exposure_mode_cb()
2595  */
2596 int camera_attr_foreach_supported_exposure_mode(camera_h camera, camera_attr_supported_exposure_mode_cb callback, void *user_data);
2597
2598 /**
2599  * @}
2600  */
2601
2602 /**
2603  * @addtogroup CAPI_MEDIA_CAMERA_ATTRIBUTES_MODULE
2604  * @{
2605  */
2606
2607 /**
2608  * @brief Sets the exposure value.
2609  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2610  * @param[in] camera The handle to the camera
2611  * @param[in] value The exposure value
2612  * @return @c 0 on success, otherwise a negative error value
2613  * @retval #CAMERA_ERROR_NONE Successful
2614  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2615  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2616  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2617  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
2618  * @see camera_attr_get_exposure()
2619  */
2620 int camera_attr_set_exposure(camera_h camera, int value);
2621
2622 /**
2623  * @brief Gets the exposure value.
2624  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2625  * @param[in] camera The handle to the camera
2626  * @param[out] value The exposure value
2627  * @return @c 0 on success, otherwise a negative error value
2628  * @retval #CAMERA_ERROR_NONE Successful
2629  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2630  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2631  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2632  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
2633  * @see camera_attr_set_exposure()
2634  */
2635 int camera_attr_get_exposure(camera_h camera, int *value);
2636
2637 /**
2638  * @brief Gets the available exposure value.
2639  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2640  * @remarks If the min value is greater than the max value, it means that this feature is not supported.
2641  * @param[in] camera The handle to the camera
2642  * @param[out] min The minimum exposure value
2643  * @param[out] max The maximum exposure value
2644  * @return @c 0 on success, otherwise a negative error value
2645  * @retval #CAMERA_ERROR_NONE Successful
2646  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2647  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2648  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2649  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
2650  * @see camera_attr_set_exposure()
2651  */
2652 int camera_attr_get_exposure_range(camera_h camera, int *min, int *max);
2653
2654 /**
2655  * @brief Sets the ISO level.
2656  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2657  * @param[in] camera The handle to the camera
2658  * @param[in] iso The ISO level
2659  * @return @c 0 on success, otherwise a negative error value
2660  * @retval #CAMERA_ERROR_NONE Successful
2661  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2662  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
2663  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2664  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2665  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
2666  * @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
2667  * @see camera_attr_get_iso()
2668  * @see camera_attr_foreach_supported_iso()
2669  */
2670 int camera_attr_set_iso(camera_h camera, camera_attr_iso_e iso);
2671
2672 /**
2673  * @brief Gets the ISO level.
2674  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2675  * @param[in] camera The handle to the camera
2676  * @param[out] iso The ISO level
2677  * @return @c 0 on success, otherwise a negative error value
2678  * @retval #CAMERA_ERROR_NONE Successful
2679  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2680  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2681  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2682  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
2683  * @see camera_attr_set_iso()
2684  * @see camera_attr_foreach_supported_iso()
2685  */
2686 int camera_attr_get_iso(camera_h camera, camera_attr_iso_e *iso);
2687
2688 /**
2689  * @}
2690  */
2691
2692 /**
2693  * @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
2694  * @{
2695  */
2696
2697 /**
2698  * @brief Retrieves all supported ISO levels by invoking the callback function once for each supported ISO level.
2699  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2700  * @param[in] camera The handle to the camera
2701  * @param[in] callback The callback function to be invoked
2702  * @param[in] user_data The user data to be passed to the callback function
2703  * @return @c 0 on success, otherwise a negative error value
2704  * @retval #CAMERA_ERROR_NONE Successful
2705  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2706  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2707  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2708  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
2709  * @post This function invokes camera_attr_supported_iso_cb() to get all the supported ISO levels.
2710  * @see camera_attr_set_iso()
2711  * @see camera_attr_get_iso()
2712  * @see camera_attr_supported_iso_cb()
2713  */
2714 int camera_attr_foreach_supported_iso(camera_h camera, camera_attr_supported_iso_cb callback, void *user_data);
2715
2716 /**
2717  * @}
2718  */
2719
2720 /**
2721  * @addtogroup CAPI_MEDIA_CAMERA_ATTRIBUTES_MODULE
2722  * @{
2723  */
2724
2725 /**
2726  * @brief Sets the theater mode.
2727  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2728  * @remarks If you want to display the preview image on the external display with the full screen mode, use this function.
2729  * @param[in] camera The handle to the camera
2730  * @param[in] mode The mode to change
2731  * @return @c 0 on success, otherwise a negative error value
2732  * @retval #CAMERA_ERROR_NONE Successful
2733  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2734  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2735  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2736  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
2737  * @pre This function is valid only when the external display is connected.
2738  * @see camera_attr_get_theater_mode()
2739  */
2740 int camera_attr_set_theater_mode(camera_h camera, camera_attr_theater_mode_e mode);
2741
2742 /**
2743  * @brief Gets the theater mode.
2744  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2745  * @param[in] camera The handle to the camera
2746  * @param[in] mode Current theater mode
2747  * @return @c 0 on success, otherwise a negative error value
2748  * @retval #CAMERA_ERROR_NONE Successful
2749  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2750  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2751  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2752  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
2753  * @see camera_attr_get_theater_mode()
2754  */
2755 int camera_attr_get_theater_mode(camera_h camera, camera_attr_theater_mode_e *mode);
2756
2757 /**
2758  * @}
2759  */
2760
2761 /**
2762  * @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
2763  * @{
2764  */
2765
2766 /**
2767  * @brief Retrieves all supported theater modes by invoking callback function once for each supported theater modes.
2768  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2769  * @param[in] camera The handle to the camera
2770  * @param[in] callback The callback function to be invoked
2771  * @param[in] user_data The user data to be passed to the callback function
2772  * @return @c 0 on success, otherwise a negative error value
2773  * @retval #CAMERA_ERROR_NONE Successful
2774  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2775  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2776  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2777  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
2778  * @post This function invokes camera_attr_supported_theater_mode_cb() to get all supported theater modes.
2779  * @see camera_attr_set_theater_mode()
2780  * @see camera_attr_get_theater_mode()
2781  * @see camera_attr_supported_theater_mode_cb()
2782  */
2783 int camera_attr_foreach_supported_theater_mode(camera_h camera, camera_attr_supported_theater_mode_cb callback, void *user_data);
2784
2785 /**
2786  * @}
2787  */
2788
2789
2790 /**
2791  * @addtogroup CAPI_MEDIA_CAMERA_ATTRIBUTES_MODULE
2792  * @{
2793  */
2794
2795 /**
2796  * @brief Sets the brightness level.
2797  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2798  * @remarks If the min value is greater than the max value from camera_attr_get_brightness_range(), \n
2799  *          it means that this feature is not supported.
2800  * @param[in] camera The handle to the camera
2801  * @param[in] level The brightness level
2802  * @return @c 0 on success, otherwise a negative error value
2803  * @retval #CAMERA_ERROR_NONE Successful
2804  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2805  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
2806  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2807  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2808  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
2809  * @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
2810  * @see camera_attr_get_brightness()
2811  * @see camera_attr_get_brightness_range()
2812  */
2813 int camera_attr_set_brightness(camera_h camera, int level);
2814
2815 /**
2816  * @brief Gets the brightness level.
2817  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2818  * @param[in] camera The handle to the camera
2819  * @param[out] level The brightness level
2820  * @return @c 0 on success, otherwise a negative error value
2821  * @retval #CAMERA_ERROR_NONE Successful
2822  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2823  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2824  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2825  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
2826  * @see camera_attr_set_brightness()
2827  * @see camera_attr_get_brightness_range()
2828  */
2829 int camera_attr_get_brightness(camera_h camera, int *level);
2830
2831 /**
2832  * @brief Gets the available brightness level.
2833  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2834  * @remarks If the min value is greater than the max value, it means that this feature is not supported.
2835  * @param[in] camera The handle to the camera
2836  * @param[out] min The minimum brightness level
2837  * @param[out] max The maximum brightness level
2838  * @return @c 0 on success, otherwise a negative error value
2839  * @retval #CAMERA_ERROR_NONE Successful
2840  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2841  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2842  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2843  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
2844  * @see camera_attr_set_brightness()
2845  * @see camera_attr_get_brightness()
2846  */
2847 int camera_attr_get_brightness_range(camera_h camera, int *min, int *max);
2848
2849 /**
2850  * @brief Sets the contrast level.
2851  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2852  * @param[in] camera The handle to the camera
2853  * @param[in] level The contrast level
2854  * @return @c 0 on success, otherwise a negative error value
2855  * @retval #CAMERA_ERROR_NONE Successful
2856  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2857  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
2858  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2859  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2860  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
2861  * @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
2862  * @see camera_attr_get_contrast()
2863  * @see camera_attr_get_contrast_range()
2864  */
2865 int camera_attr_set_contrast(camera_h camera, int level);
2866
2867 /**
2868  * @brief Gets the contrast level.
2869  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2870  * @param[in] camera The handle to the camera
2871  * @param[out] level The contrast level
2872  * @return @c 0 on success, otherwise a negative error value
2873  * @retval #CAMERA_ERROR_NONE Successful
2874  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2875  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2876  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2877  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
2878  * @see camera_attr_set_contrast()
2879  * @see camera_attr_get_contrast_range()
2880  */
2881 int camera_attr_get_contrast(camera_h camera, int *level);
2882
2883 /**
2884  * @brief Gets the available contrast level.
2885  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2886  * @remarks If the min value is greater than the max value, it means that this feature is not supported.
2887  * @param[in] camera The handle to the camera
2888  * @param[out] min The minimum contrast level
2889  * @param[out] max The maximum contrast level
2890  * @return @c 0 on success, otherwise a negative error value
2891  * @retval #CAMERA_ERROR_NONE Successful
2892  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2893  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2894  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2895  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
2896  * @see camera_attr_set_contrast()
2897  * @see camera_attr_get_contrast()
2898  */
2899 int camera_attr_get_contrast_range(camera_h camera, int *min, int *max);
2900
2901 /**
2902  * @brief Sets the hue level.
2903  * @since_tizen 5.0
2904  * @param[in] camera The handle to the camera
2905  * @param[in] level The hue level
2906  * @return @c 0 on success, otherwise a negative error value
2907  * @retval #CAMERA_ERROR_NONE Successful
2908  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2909  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2910  * @see camera_attr_get_hue()
2911  * @see camera_attr_get_hue_range()
2912  */
2913 int camera_attr_set_hue(camera_h camera, int level);
2914
2915 /**
2916  * @brief Gets the hue level.
2917  * @since_tizen 5.0
2918  * @param[in] camera The handle to the camera
2919  * @param[out] level The hue level
2920  * @return @c 0 on success, otherwise a negative error value
2921  * @retval #CAMERA_ERROR_NONE Successful
2922  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2923  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2924  * @see camera_attr_set_hue()
2925  * @see camera_attr_get_hue_range()
2926  */
2927 int camera_attr_get_hue(camera_h camera, int *level);
2928
2929 /**
2930  * @brief Gets the available hue level.
2931  * @since_tizen 5.0
2932  * @remarks If the min value is greater than the max value, it means that this feature is not supported.
2933  * @param[in] camera The handle to the camera
2934  * @param[out] min The minimum hue level
2935  * @param[out] max The maximum hue level
2936  * @return @c 0 on success, otherwise a negative error value
2937  * @retval #CAMERA_ERROR_NONE Successful
2938  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2939  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2940  * @see camera_attr_set_hue()
2941  * @see camera_attr_get_hue()
2942  */
2943 int camera_attr_get_hue_range(camera_h camera, int *min, int *max);
2944
2945 /**
2946  * @brief Sets the white balance mode.
2947  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2948  * @param[in] camera The handle to the camera
2949  * @param[in] whitebalance The white balance mode
2950  * @return @c 0 on success, otherwise a negative error value
2951  * @retval #CAMERA_ERROR_NONE Successful
2952  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2953  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
2954  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2955  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2956  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
2957  * @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
2958  * @see camera_attr_foreach_supported_whitebalance()
2959  * @see camera_attr_get_whitebalance()
2960  */
2961 int camera_attr_set_whitebalance(camera_h camera, camera_attr_whitebalance_e whitebalance);
2962
2963 /**
2964  * @brief Gets the white balance mode.
2965  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2966  * @param[in] camera The handle to the camera
2967  * @param[out] whitebalance The white balance mode
2968  * @return @c 0 on success, otherwise a negative error value
2969  * @retval #CAMERA_ERROR_NONE Successful
2970  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2971  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2972  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2973  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
2974  * @see camera_attr_foreach_supported_whitebalance()
2975  * @see camera_attr_set_whitebalance()
2976  */
2977 int camera_attr_get_whitebalance(camera_h camera, camera_attr_whitebalance_e *whitebalance);
2978
2979 /**
2980  * @}
2981  */
2982
2983 /**
2984  * @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
2985  * @{
2986  */
2987
2988 /**
2989  * @brief Retrieves all supported white balances by invoking the callback function once for each supported white balance.
2990  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2991  * @param[in] camera The handle to the camera
2992  * @param[in] callback The callback function to be invoked
2993  * @param[in] user_data The user data to be passed to the callback function
2994  * @return @c 0 on success, otherwise a negative error value
2995  * @retval #CAMERA_ERROR_NONE Successful
2996  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2997  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2998  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2999  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3000  * @post This function invokes camera_attr_supported_whitebalance_cb() to get all the supported white balances.
3001  * @see camera_attr_set_whitebalance()
3002  * @see camera_attr_get_whitebalance()
3003  * @see camera_attr_supported_whitebalance_cb()
3004  */
3005 int camera_attr_foreach_supported_whitebalance(camera_h camera, camera_attr_supported_whitebalance_cb callback, void *user_data);
3006
3007 /**
3008  * @}
3009  */
3010
3011 /**
3012  * @addtogroup CAPI_MEDIA_CAMERA_ATTRIBUTES_MODULE
3013  * @{
3014  */
3015
3016 /**
3017  * @brief Sets the camera effect mode.
3018  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3019  * @param[in] camera The handle to the camera
3020  * @param[in] effect The camera effect mode
3021  * @return @c 0 on success, otherwise a negative error value
3022  * @retval #CAMERA_ERROR_NONE Successful
3023  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3024  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
3025  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3026  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3027  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3028  * @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
3029  * @see camera_attr_foreach_supported_effect()
3030  * @see camera_attr_get_effect()
3031  */
3032 int camera_attr_set_effect(camera_h camera, camera_attr_effect_mode_e effect);
3033
3034
3035 /**
3036  * @brief Gets the camera effect mode.
3037  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3038  * @param[in] camera The handle to the camera
3039  * @param[out] effect The camera effect mode
3040  * @return @c 0 on success, otherwise a negative error value
3041  * @retval #CAMERA_ERROR_NONE Successful
3042  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3043  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3044  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3045  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3046  * @see camera_attr_foreach_supported_effect()
3047  * @see camera_attr_set_effect()
3048  */
3049 int camera_attr_get_effect(camera_h camera, camera_attr_effect_mode_e *effect);
3050
3051 /**
3052  * @}
3053  */
3054
3055 /**
3056  * @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
3057  * @{
3058  */
3059
3060 /**
3061  * @brief Retrieves all supported effect modes by invoking the callback function once for each supported effect mode.
3062  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3063  * @param[in] camera The handle to the camera
3064  * @param[in] callback The callback function to invoke
3065  * @param[in] user_data The user data to be passed to the callback function
3066  * @return @c 0 on success, otherwise a negative error value
3067  * @retval #CAMERA_ERROR_NONE Successful
3068  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3069  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3070  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3071  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3072  * @post This function invokes camera_attr_supported_effect_cb() to get all the supported effect modes.
3073  * @see camera_attr_set_effect()
3074  * @see camera_attr_get_effect()
3075  * @see camera_attr_supported_effect_cb()
3076  */
3077 int camera_attr_foreach_supported_effect(camera_h camera, camera_attr_supported_effect_cb callback, void *user_data);
3078
3079 /**
3080  * @}
3081  */
3082
3083 /**
3084  * @addtogroup CAPI_MEDIA_CAMERA_ATTRIBUTES_MODULE
3085  * @{
3086  */
3087
3088 /**
3089  * @brief Sets the scene mode.
3090  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3091  * @param[in] camera The handle to the camera
3092  * @param[in] mode The scene mode
3093  * @return @c 0 on success, otherwise a negative error value
3094  * @retval #CAMERA_ERROR_NONE Successful
3095  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3096  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
3097  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3098  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3099  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3100  * @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
3101  * @see camera_attr_foreach_supported_scene_mode()
3102  * @see camera_attr_get_scene_mode()
3103  */
3104 int camera_attr_set_scene_mode(camera_h camera, camera_attr_scene_mode_e mode);
3105
3106 /**
3107  * @brief Gets the scene mode.
3108  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3109  * @param[in] camera The handle to the camera
3110  * @param[out] mode The scene mode
3111  * @return @c 0 on success, otherwise a negative error value
3112  * @retval #CAMERA_ERROR_NONE Successful
3113  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3114  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3115  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3116  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3117  * @see camera_attr_foreach_supported_scene_mode()
3118  * @see camera_attr_set_scene_mode()
3119  */
3120 int camera_attr_get_scene_mode(camera_h camera, camera_attr_scene_mode_e *mode);
3121
3122 /**
3123  * @}
3124  */
3125
3126 /**
3127  * @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
3128  * @{
3129  */
3130
3131 /**
3132  * @brief Retrieves all supported scene modes by invoking the callback function once for each supported scene mode.
3133  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3134  * @param[in] camera The handle to the camera
3135  * @param[in] callback The callback function to invoke
3136  * @param[in] user_data The user data to be passed to the callback function
3137  * @return @c 0 on success, otherwise a negative error value
3138  * @retval #CAMERA_ERROR_NONE Successful
3139  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3140  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3141  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3142  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3143  * @post This function invokes camera_attr_supported_scene_mode_cb() to get all the supported scene modes.
3144  * @see camera_attr_set_scene_mode()
3145  * @see camera_attr_get_scene_mode()
3146  * @see camera_attr_supported_scene_mode_cb()
3147  */
3148 int camera_attr_foreach_supported_scene_mode(camera_h camera, camera_attr_supported_scene_mode_cb callback, void *user_data);
3149
3150 /**
3151  * @}
3152  */
3153
3154 /**
3155  * @addtogroup CAPI_MEDIA_CAMERA_ATTRIBUTES_MODULE
3156  * @{
3157  */
3158
3159 /**
3160  * @brief Enables to write EXIF(Exchangeable image file format) tags in a JPEG file.
3161  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3162  * @param[in] camera The handle to the camera
3163  * @param[in] enable If @c true writing EXIF tags in a JPEG file is enabled, otherwise @c false
3164  * @return @c 0 on success, otherwise a negative error value
3165  * @retval #CAMERA_ERROR_NONE Successful
3166  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3167  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3168  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3169  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3170  * @see         camera_attr_is_enabled_tag()
3171  */
3172 int camera_attr_enable_tag(camera_h camera, bool enable);
3173
3174 /**
3175  * @brief Gets the value that indicates whether writing EXIF(Exchangeable image file format) tags in a JPEG file is enabled.
3176  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3177  * @param[in] camera The handle to the camera
3178  * @param[out] enabled  If @c true camera information is enabled, otherwise @c false
3179  * @return @c 0 on success, otherwise a negative error value
3180  * @retval #CAMERA_ERROR_NONE Successful
3181  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3182  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3183  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3184  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3185  * @see         camera_attr_enable_tag()
3186  */
3187 int camera_attr_is_enabled_tag(camera_h camera, bool *enabled);
3188
3189 /**
3190  * @brief Sets the camera image description in the EXIF(Exchangeable image file format) tag.
3191  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3192  * @param[in] camera The handle to the camera
3193  * @param[in] description The string with description
3194  * @return @c 0 on success, otherwise a negative error value
3195  * @retval #CAMERA_ERROR_NONE Successful
3196  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3197  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3198  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3199  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3200  * @see camera_attr_get_tag_image_description()
3201  */
3202 int camera_attr_set_tag_image_description(camera_h camera, const char *description);
3203
3204 /**
3205  * @brief Gets the camera image description in EXIF(Exchangeable image file format) tag.
3206  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3207  * @remarks You must release @a description using free().
3208  * @param[in] camera The handle to the camera
3209  * @param[out] description A pointer to a string
3210  * @return @c 0 on success, otherwise a negative error value
3211  * @retval #CAMERA_ERROR_NONE Successful
3212  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3213  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3214  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3215  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3216  * @see camera_attr_set_tag_image_description()
3217  */
3218 int camera_attr_get_tag_image_description(camera_h camera, char **description);
3219
3220 /**
3221  * @brief Sets the camera orientation in the EXIF(Exchangeable image file format) tag.
3222  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3223  * @param[in] camera The handle to the camera
3224  * @param[in] orientation The camera orientation
3225  * @return @c 0 on success, otherwise a negative error value
3226  * @retval #CAMERA_ERROR_NONE Successful
3227  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3228  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3229  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3230  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3231  * @see camera_attr_get_tag_orientation()
3232  */
3233 int camera_attr_set_tag_orientation(camera_h camera, camera_attr_tag_orientation_e orientation);
3234
3235 /**
3236  * @brief Gets the camera orientation in the EXIF(Exchangeable image file format) tag.
3237  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3238  * @param[in] camera The handle to the camera
3239  * @param[out] orientation The camera orientation
3240  * @return @c 0 on success, otherwise a negative error value
3241  * @retval #CAMERA_ERROR_NONE Successful
3242  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3243  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3244  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3245  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3246  * @see camera_attr_set_tag_orientation()
3247  */
3248 int camera_attr_get_tag_orientation(camera_h camera, camera_attr_tag_orientation_e *orientation);
3249
3250 /**
3251  * @brief Sets the software information in the EXIF(Exchangeable image file format) tag.
3252  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3253  * @param[in] camera The handle to the camera
3254  * @param[in] software The software information tag
3255  * @return @c 0 on success, otherwise a negative error value
3256  * @retval #CAMERA_ERROR_NONE Successful
3257  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3258  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3259  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3260  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3261  * @see camera_attr_get_tag_software()
3262  */
3263 int camera_attr_set_tag_software(camera_h camera, const char *software);
3264
3265 /**
3266  * @brief Gets the software information in the EXIF(Exchangeable image file format) tag.
3267  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3268  * @remarks You must release @a software using free().
3269  * @param[in] camera The handle to the camera
3270  * @param[out] software A pointer to a string
3271  * @return @c 0 on success, otherwise a negative error value
3272  * @retval #CAMERA_ERROR_NONE Successful
3273  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3274  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3275  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3276  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3277  * @see camera_attr_set_tag_software()
3278  */
3279 int camera_attr_get_tag_software(camera_h camera, char **software);
3280
3281 /**
3282  * @brief Sets the geotag(GPS data) in the EXIF(Exchangeable image file format) tag.
3283  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3284  * @param[in] camera The handle to the camera
3285  * @param[in] latitude The latitude data
3286  * @param[in] longitude The longitude data
3287  * @param[in] altitude The altitude data
3288  * @return @c 0 on success, otherwise a negative error value
3289  * @retval #CAMERA_ERROR_NONE Successful
3290  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3291  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
3292  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3293  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3294  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3295  * @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
3296  * @see camera_attr_get_geotag()
3297  * @see camera_attr_remove_geotag()
3298  */
3299 int camera_attr_set_geotag(camera_h camera, double latitude, double longitude, double altitude);
3300
3301 /**
3302  * @brief Gets the geotag(GPS data) in the EXIF(Exchangeable image file format) tag.
3303  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3304  * @param[in] camera The handle to the camera
3305  * @param[out] latitude The latitude data
3306  * @param[out] longitude The longitude data
3307  * @param[out] altitude The altitude data
3308  * @return @c 0 on success, otherwise a negative error value
3309  * @retval #CAMERA_ERROR_NONE Successful
3310  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3311  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3312  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3313  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3314  * @see camera_attr_set_geotag()
3315  * @see camera_attr_remove_geotag()
3316  */
3317 int camera_attr_get_geotag(camera_h camera, double *latitude, double *longitude, double *altitude);
3318
3319 /**
3320  * @brief Removes the geotag(GPS data) in the EXIF(Exchangeable image file format) tag.
3321  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3322  * @param[in] camera The handle to the camera
3323  * @return @c 0 on success, otherwise a negative error value
3324  * @retval #CAMERA_ERROR_NONE Successful
3325  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3326  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
3327  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3328  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3329  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3330  * @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
3331  * @see camera_attr_set_geotag()
3332  * @see camera_attr_get_geotag()
3333  */
3334 int camera_attr_remove_geotag(camera_h camera);
3335
3336 /**
3337  * @brief Sets the camera's flash mode.
3338  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3339  * @remarks Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif, while setting the flash mode, if the flash was preempted by other APIs,\n
3340  *          then this function returns #CAMERA_ERROR_DEVICE_BUSY error.
3341  * @param[in] camera The handle to the camera
3342  * @param[in] mode The flash mode
3343  * @return @c 0 on success, otherwise a negative error value
3344  * @retval #CAMERA_ERROR_NONE Successful
3345  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3346  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
3347  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3348  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3349  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3350  * @retval #CAMERA_ERROR_DEVICE_BUSY The flash was preempted by other API
3351  * @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
3352  * @see camera_attr_foreach_supported_flash_mode()
3353  * @see camera_attr_get_flash_mode()
3354  */
3355 int camera_attr_set_flash_mode(camera_h camera, camera_attr_flash_mode_e mode);
3356
3357 /**
3358  * @brief Gets the camera's flash mode.
3359  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3360  * @param[in] camera The handle to the camera
3361  * @param[out] mode The flash mode
3362  * @return @c 0 on success, otherwise a negative error value
3363  * @retval #CAMERA_ERROR_NONE Successful
3364  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3365  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3366  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3367  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3368  * @see camera_attr_foreach_supported_flash_mode()
3369  * @see camera_attr_set_flash_mode()
3370  */
3371 int camera_attr_get_flash_mode(camera_h camera, camera_attr_flash_mode_e *mode);
3372
3373 /**
3374  * @}
3375  */
3376
3377 /**
3378  * @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
3379  * @{
3380  */
3381
3382 /**
3383  * @brief Retrieves all supported flash modes by invoking the callback function once for each supported flash mode.
3384  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3385  * @param[in] camera The handle to the camera
3386  * @param[in] callback The callback function to invoke
3387  * @param[in] user_data The user data passed to the callback registration function
3388  * @return @c 0 on success, otherwise a negative error value
3389  * @retval #CAMERA_ERROR_NONE Successful
3390  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3391  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3392  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3393  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3394  * @post This function invokes camera_attr_supported_flash_mode_cb() to get all supported flash modes.
3395  * @see camera_attr_set_flash_mode()
3396  * @see camera_attr_get_flash_mode()
3397  * @see camera_attr_supported_flash_mode_cb()
3398  */
3399 int camera_attr_foreach_supported_flash_mode(camera_h camera, camera_attr_supported_flash_mode_cb callback, void *user_data);
3400
3401 /**
3402  * @}
3403  */
3404
3405 /**
3406  * @addtogroup CAPI_MEDIA_CAMERA_ATTRIBUTES_MODULE
3407  * @{
3408  */
3409
3410 /**
3411  * @brief Gets the camera len's orientation angle.
3412  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3413  * @param[in] camera The handle to the camera
3414  * @param[out] angle The orientation angle
3415  * @return @c 0 on success, otherwise a negative error value
3416  * @retval #CAMERA_ERROR_NONE Successful
3417  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3418  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3419  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3420  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3421  * @see camera_set_display_rotation()
3422  */
3423 int camera_attr_get_lens_orientation(camera_h camera, int *angle);
3424
3425 /**
3426  * @brief Sets the stream rotation.
3427  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3428  * @param[in] camera The handle to the camera
3429  * @param[in] rotation The stream rotation
3430  * @return @c 0 on success, otherwise a negative error value
3431  * @retval #CAMERA_ERROR_NONE Successful
3432  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3433  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3434  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3435  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3436  * @pre The camera state must be set to #CAMERA_STATE_CREATED.
3437  * @see camera_attr_get_stream_rotation()
3438  */
3439 int camera_attr_set_stream_rotation(camera_h camera, camera_rotation_e rotation);
3440
3441 /**
3442  * @brief Gets the stream rotation.
3443  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3444  * @param[in] camera The handle to the camera
3445  * @param[out] rotation The stream rotation
3446  * @return @c 0 on success, otherwise a negative error value
3447  * @retval #CAMERA_ERROR_NONE Successful
3448  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3449  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3450  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3451  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3452  * @pre The camera state must be set to #CAMERA_STATE_CREATED.
3453  * @see camera_attr_set_stream_rotation()
3454  */
3455 int camera_attr_get_stream_rotation(camera_h camera, camera_rotation_e *rotation);
3456
3457 /**
3458  * @}
3459  */
3460
3461 /**
3462  * @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
3463  * @{
3464  */
3465
3466 /**
3467  * @brief Retrieves all supported stream rotation modes by invoking callback function once for each supported stream rotation mode.
3468  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3469  * @param[in] camera The handle to the camera
3470  * @param[in] callback The callback function to invoke
3471  * @param[in] user_data The user data to be passed to the callback function
3472  * @return @c 0 on success, otherwise a negative error value
3473  * @retval #CAMERA_ERROR_NONE Successful
3474  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3475  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3476  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3477  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3478  * @post This function invokes camera_attr_supported_stream_rotation_cb() to get all supported stream rotation mode.
3479  * @see camera_attr_set_stream_rotation()
3480  * @see camera_attr_get_stream_rotation()
3481  * @see camera_attr_supported_stream_rotation_cb()
3482  */
3483 int camera_attr_foreach_supported_stream_rotation(camera_h camera, camera_attr_supported_stream_rotation_cb callback, void *user_data);
3484
3485 /**
3486  * @}
3487  */
3488
3489 /**
3490  * @addtogroup CAPI_MEDIA_CAMERA_ATTRIBUTES_MODULE
3491  * @{
3492  */
3493
3494 /**
3495  * @brief Sets the stream flip.
3496  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3497  * @param[in] camera The handle to the camera
3498  * @param[in] flip The stream flip
3499  * @return @c 0 on success, otherwise a negative error value
3500  * @retval #CAMERA_ERROR_NONE Successful
3501  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3502  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
3503  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3504  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3505  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3506  * @pre The camera state must be set to #CAMERA_STATE_CREATED.
3507  * @see camera_attr_set_stream_rotation()
3508  */
3509 int camera_attr_set_stream_flip(camera_h camera, camera_flip_e flip);
3510
3511 /**
3512  * @brief Gets the stream flip.
3513  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3514  * @param[in] camera The handle to the camera
3515  * @param[out] flip  The stream flip
3516  * @return @c 0 on success, otherwise a negative error value
3517  * @retval #CAMERA_ERROR_NONE Successful
3518  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3519  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3520  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3521  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3522  * @pre The camera state must be set to #CAMERA_STATE_CREATED.
3523  * @see camera_attr_set_stream_rotation()
3524  */
3525 int camera_attr_get_stream_flip(camera_h camera, camera_flip_e *flip);
3526
3527 /**
3528  * @}
3529  */
3530
3531 /**
3532  * @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
3533  * @{
3534  */
3535
3536 /**
3537  * @brief Retrieves all supported stream flip modes by invoking callback function once for each supported stream flip mode.
3538  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3539  * @param[in] camera The handle to the camera
3540  * @param[in] callback The callback function to invoke
3541  * @param[in] user_data The user data to be passed to the callback function
3542  * @return @c 0 on success, otherwise a negative error value
3543  * @retval #CAMERA_ERROR_NONE Successful
3544  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3545  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3546  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3547  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3548  * @post This function invokes camera_attr_supported_stream_flip_cb() to get all supported stream flip mode.
3549  * @see camera_attr_set_stream_flip()
3550  * @see camera_attr_get_stream_flip()
3551  * @see camera_attr_supported_stream_flip_cb()
3552  */
3553 int camera_attr_foreach_supported_stream_flip(camera_h camera, camera_attr_supported_stream_flip_cb callback, void *user_data);
3554
3555 /**
3556  * @}
3557  */
3558
3559 /**
3560  * @addtogroup CAPI_MEDIA_CAMERA_ATTRIBUTES_MODULE
3561  * @{
3562  */
3563
3564 /**
3565  * @brief Called when the HDR capture process is updated.
3566  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3567  * @param[in] percent The progress percentage of HDR capture
3568  * @param[in] user_data The user data passed from the callback registration function
3569  * @pre camera_start_capture() will invoke this callback if you register it using camera_attr_set_hdr_capture_progress_cb().
3570  * @see camera_attr_get_hdr_mode()
3571  * @see camera_attr_set_hdr_capture_progress_cb()
3572  * @see camera_attr_unset_hdr_capture_progress_cb()
3573  * @see camera_attr_is_supported_hdr_capture()
3574  */
3575 typedef void (*camera_attr_hdr_progress_cb)(int percent, void *user_data);
3576
3577 /**
3578  * @brief Sets the mode of HDR(High dynamic range) capture.
3579  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3580  * @remarks Taking multiple pictures at different exposure levels and intelligently stitching them together so that we eventually arrive at a picture that is representative in both dark and bright areas.\n
3581  *          If this attribute is set to @c true. camera_attr_hdr_progress_cb() is invoked during capture.\n
3582  *          If you set #CAMERA_ATTR_HDR_MODE_KEEP_ORIGINAL, the capturing callback is invoked twice. The first callback is delivering origin image data. The second callback is delivering improved image data.
3583  * @param[in] camera The handle to the camera
3584  * @param[in] mode The mode of HDR capture
3585  * @return @c 0 on success, otherwise a negative error value
3586  * @retval #CAMERA_ERROR_NONE Successful
3587  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3588  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
3589  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3590  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3591  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3592  * @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
3593  * @see camera_attr_get_hdr_mode()
3594  * @see camera_attr_set_hdr_capture_progress_cb()
3595  * @see camera_attr_unset_hdr_capture_progress_cb()
3596  * @see camera_attr_is_supported_hdr_capture()
3597  *
3598  */
3599 int camera_attr_set_hdr_mode(camera_h camera, camera_attr_hdr_mode_e mode);
3600
3601 /**
3602  * @brief Gets the mode of HDR(High dynamic range) capture.
3603  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3604  * @param[in] camera The handle to the camera
3605  * @param[out] mode The mode of HDR capture
3606  * @return @c 0 on success, otherwise a negative error value
3607  * @retval #CAMERA_ERROR_NONE Successful
3608  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3609  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3610  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3611  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3612  * @see camera_attr_set_hdr_mode()
3613  * @see camera_attr_set_hdr_capture_progress_cb()
3614  * @see camera_attr_unset_hdr_capture_progress_cb()
3615  * @see camera_attr_is_supported_hdr_capture()
3616  */
3617 int camera_attr_get_hdr_mode(camera_h camera, camera_attr_hdr_mode_e *mode);
3618
3619 /**
3620  * @brief Registers a callback function to be called when HDR capture is progressing.
3621  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3622  * @remarks This callback notifies progress of the HDR process.
3623  * @param[in] camera The handle to the camera
3624  * @param[in] callback The callback function to invoke
3625  * @param[in] user_data The user data passed to the callback registration function
3626  * @return @c 0 on success, otherwise a negative error value
3627  * @retval #CAMERA_ERROR_NONE Successful
3628  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3629  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3630  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3631  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3632  * @see camera_attr_set_hdr_mode()
3633  * @see camera_attr_get_hdr_mode()
3634  * @see camera_attr_unset_hdr_capture_progress_cb()
3635  * @see camera_attr_is_supported_hdr_capture()
3636  */
3637 int camera_attr_set_hdr_capture_progress_cb(camera_h camera, camera_attr_hdr_progress_cb callback, void* user_data);
3638
3639 /**
3640  * @brief Unregisters the callback function.
3641  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3642  * @param[in] camera The handle to the camera
3643  * @return @c 0 on success, otherwise a negative error value
3644  * @retval #CAMERA_ERROR_NONE Successful
3645  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3646  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3647  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3648  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3649  * @see camera_attr_set_hdr_mode()
3650  * @see camera_attr_get_hdr_mode()
3651  * @see camera_attr_set_hdr_capture_progress_cb()
3652  * @see camera_attr_is_supported_hdr_capture()
3653  */
3654 int camera_attr_unset_hdr_capture_progress_cb(camera_h camera);
3655
3656 /**
3657  * @ingroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
3658  * @brief Gets the support state of HDR capture.
3659  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3660  * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
3661  * @param[in] camera The handle to the camera
3662  * @return @c true if supported, otherwise @c false
3663  * @exception #CAMERA_ERROR_NONE Successful
3664  * @exception #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3665  * @exception #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3666  * @exception #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3667  * @see camera_attr_set_hdr_mode()
3668  * @see camera_attr_get_hdr_mode()
3669  * @see camera_attr_set_hdr_capture_progress_cb()
3670  * @see camera_attr_unset_hdr_capture_progress_cb()
3671  */
3672 bool camera_attr_is_supported_hdr_capture(camera_h camera);
3673
3674 /**
3675  * @brief Enables/Disables the anti-shake feature.
3676  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3677  * @remarks This feature is used for image capture.
3678  * @param[in] camera The handle to the camera
3679  * @param[in] enable If @c true the anti-shake feature is enabled, otherwise @c false
3680  * @return @c 0 on success, otherwise a negative error value
3681  * @retval #CAMERA_ERROR_NONE Successful
3682  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3683  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3684  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3685  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3686  * @see camera_attr_is_enabled_anti_shake()
3687  * @see camera_attr_is_supported_anti_shake()
3688  *
3689  */
3690 int camera_attr_enable_anti_shake(camera_h camera, bool enable);
3691
3692 /**
3693  * @brief Gets the state of the anti-shake feature.
3694  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3695  * @param[in] camera The handle to the camera
3696  * @param[out] enabled The state of anti-shake
3697  * @return @c 0 on success, otherwise a negative error value
3698  * @retval #CAMERA_ERROR_NONE Successful
3699  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3700  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3701  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3702  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3703  * @see camera_attr_enable_anti_shake()
3704  * @see camera_attr_is_supported_anti_shake()
3705  */
3706 int camera_attr_is_enabled_anti_shake(camera_h camera, bool *enabled);
3707
3708 /**
3709  * @ingroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
3710  * @brief Gets the support state of the anti-shake feature.
3711  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3712  * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
3713  * @param[in] camera The handle to the camera
3714  * @return @c true if supported, otherwise @c false
3715  * @exception #CAMERA_ERROR_NONE Successful
3716  * @exception #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3717  * @exception #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3718  * @exception #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3719  * @see camera_attr_enable_anti_shake()
3720  * @see camera_attr_is_enabled_anti_shake()
3721  */
3722 bool camera_attr_is_supported_anti_shake(camera_h camera);
3723
3724 /**
3725  * @brief Enables/Disables the video stabilization feature.
3726  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3727  * @remarks If video stabilization is enabled, zero shutter lag is disabled.\n
3728  *          This feature is used to record a video.
3729  * @param[in] camera The handle to the camera
3730  * @param[in] enable If @c true video stabilization is enabled, otherwise @c false
3731  * @return @c 0 on success, otherwise a negative error value
3732  * @retval #CAMERA_ERROR_NONE Successful
3733  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3734  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3735  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3736  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3737  * @see camera_attr_is_enabled_video_stabilization()
3738  * @see camera_attr_is_supported_video_stabilization()
3739  *
3740  */
3741 int camera_attr_enable_video_stabilization(camera_h camera, bool enable);
3742
3743 /**
3744  * @brief Gets the state of the video stabilization feature.
3745  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3746  * @param[in] camera The handle to the camera
3747  * @param[out] enabled The state of video stabilization
3748  * @return @c 0 on success, otherwise a negative error value
3749  * @retval #CAMERA_ERROR_NONE Successful
3750  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3751  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3752  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3753  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3754  * @see camera_attr_enable_video_stabilization()
3755  * @see camera_attr_is_supported_video_stabilization()
3756  */
3757 int camera_attr_is_enabled_video_stabilization(camera_h camera, bool *enabled);
3758
3759 /**
3760  * @ingroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
3761  * @brief Gets the support state of the video stabilization feature.
3762  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3763  * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
3764  * @param[in] camera The handle to the camera
3765  * @return @c true if supported, otherwise @c false
3766  * @exception #CAMERA_ERROR_NONE Successful
3767  * @exception #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3768  * @exception #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3769  * @exception #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3770  * @see camera_attr_enable_video_stabilization()
3771  * @see camera_attr_is_enabled_video_stabilization()
3772  */
3773 bool camera_attr_is_supported_video_stabilization(camera_h camera);
3774
3775 /**
3776  * @brief Enables/Disables auto contrast.
3777  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3778  * @param[in] camera The handle to the camera
3779  * @param[in] enable If @c true auto contrast is enabled, otherwise @c false
3780  * @return @c 0 on success, otherwise a negative error value
3781  * @retval #CAMERA_ERROR_NONE Successful
3782  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3783  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
3784  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3785  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3786  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3787  * @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
3788  * @see camera_attr_is_enabled_auto_contrast()
3789  */
3790 int camera_attr_enable_auto_contrast(camera_h camera, bool enable);
3791
3792 /**
3793  * @brief Gets the state of auto contrast.
3794  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3795  * @param[in] camera The handle to the camera
3796  * @param[out] enabled The state of auto contrast
3797  * @return @c 0 on success, otherwise a negative error value
3798  * @retval #CAMERA_ERROR_NONE Successful
3799  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3800  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3801  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3802  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3803  * @see camera_attr_enable_auto_contrast()
3804  */
3805 int camera_attr_is_enabled_auto_contrast(camera_h camera, bool *enabled);
3806
3807 /**
3808  * @}
3809  */
3810
3811 /**
3812  * @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
3813  * @{
3814  */
3815
3816 /**
3817  * @brief Gets state of support of auto contrast feature.
3818  * @ingroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
3819  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3820  * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
3821  * @param[in] camera The handle to the camera
3822  * @return true on supported, otherwise false
3823  * @exception #CAMERA_ERROR_NONE Successful
3824  * @exception #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3825  * @exception #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3826  * @exception #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3827  * @see camera_attr_enable_auto_contrast()
3828  * @see camera_attr_is_enabled_auto_contrast()
3829  */
3830 bool camera_attr_is_supported_auto_contrast(camera_h camera);
3831
3832 /**
3833  * @}
3834  */
3835
3836 /**
3837  * @addtogroup CAPI_MEDIA_CAMERA_ATTRIBUTES_MODULE
3838  * @{
3839  */
3840
3841 /**
3842  * @brief Disables shutter sound.
3843  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3844  * @remarks In some countries, this operation is not permitted.
3845  * @param[in] camera The handle to the camera
3846  * @param[in] disable If @c true shutter sound is disabled, otherwise @c false
3847  * @return @c 0 on success, otherwise a negative error value
3848  * @retval #CAMERA_ERROR_NONE Successful
3849  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3850  * @retval #CAMERA_ERROR_INVALID_OPERATION Disabling shutter sound is not permitted
3851  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3852  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3853  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3854  */
3855 int camera_attr_disable_shutter_sound(camera_h camera, bool disable);
3856
3857 /**
3858  * @brief Sets the position to move horizontally.
3859  * @since_tizen 3.0
3860  * @param[in] camera The handle to the camera
3861  * @param[in] move_type The PTZ(Pan Tilt Zoom) move type
3862  * @param[in] pan_step The step to move the camera
3863  * @return @c 0 on success, otherwise a negative error value
3864  * @retval #CAMERA_ERROR_NONE Successful
3865  * @retval #CAMERA_ERROR_INVALID_OPERATION Internal error
3866  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3867  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
3868  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3869  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3870  * @pre The camera state must be set to #CAMERA_STATE_PREVIEW.
3871  * @see camera_attr_get_pan()
3872  * @see camera_attr_get_pan_range()
3873  */
3874 int camera_attr_set_pan(camera_h camera, camera_attr_ptz_move_type_e move_type, int pan_step);
3875
3876 /**
3877  * @brief Gets the current position of the camera.
3878  * @since_tizen 3.0
3879  * @param[in] camera The handle to the camera
3880  * @param[out] pan_step The current horizontal distance from the starting point.
3881  * @return @c 0 on success, otherwise a negative error value
3882  * @retval #CAMERA_ERROR_NONE Successful
3883  * @retval #CAMERA_ERROR_INVALID_OPERATION Internal error
3884  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3885  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3886  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3887  * @see camera_attr_set_pan()
3888  * @see camera_attr_get_pan_range()
3889  */
3890 int camera_attr_get_pan(camera_h camera, int *pan_step);
3891
3892 /**
3893  * @brief Gets lower limit and upper limit for pan position.
3894  * @since_tizen 3.0
3895  * @remarks If the min value is greater than the max value, it means that this feature is not supported.
3896  * @param[in] camera The handle to the camera
3897  * @param[out] min The lower limit for pan
3898  * @param[out] max The upper limit for pan
3899  * @return @c 0 on success, otherwise a negative error value
3900  * @retval #CAMERA_ERROR_NONE Successful
3901  * @retval #CAMERA_ERROR_INVALID_OPERATION Internal error
3902  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3903  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3904  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3905  * @see camera_attr_set_pan()
3906  * @see camera_attr_get_pan()
3907  */
3908 int camera_attr_get_pan_range(camera_h camera, int *min, int *max);
3909
3910 /**
3911  * @brief Sets the position to move vertically.
3912  * @since_tizen 3.0
3913  * @param[in] camera The handle to the camera
3914  * @param[in] move_type The PTZ(Pan Tilt Zoom) move type
3915  * @param[in] tilt_step The step to move the camera
3916  * @return @c 0 on success, otherwise a negative error value
3917  * @retval #CAMERA_ERROR_NONE Successful
3918  * @retval #CAMERA_ERROR_INVALID_OPERATION Internal error
3919  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3920  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
3921  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3922  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3923  * @pre The camera state must be set to #CAMERA_STATE_PREVIEW.
3924  * @see camera_attr_get_tilt()
3925  * @see camera_attr_get_tilt_range()
3926  */
3927 int camera_attr_set_tilt(camera_h camera, camera_attr_ptz_move_type_e move_type, int tilt_step);
3928
3929 /**
3930  * @brief Gets the current position of the camera.
3931  * @since_tizen 3.0
3932  * @param[in] camera The handle to the camera
3933  * @param[out] tilt_step The current vertical distance from the starting point.
3934  * @return @c 0 on success, otherwise a negative error value
3935  * @retval #CAMERA_ERROR_NONE Successful
3936  * @retval #CAMERA_ERROR_INVALID_OPERATION Internal error
3937  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3938  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3939  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3940  * @see camera_attr_set_tilt()
3941  * @see camera_attr_get_tilt_range()
3942  */
3943 int camera_attr_get_tilt(camera_h camera, int *tilt_step);
3944
3945 /**
3946  * @brief Gets lower limit and upper limit for tilt position.
3947  * @since_tizen 3.0
3948  * @remarks If the min value is greater than the max value, it means that this feature is not supported.
3949  * @param[in] camera The handle to the camera
3950  * @param[out] min The lower limit for tilt
3951  * @param[out] max The upper limit for tilt
3952  * @return @c 0 on success, otherwise a negative error value
3953  * @retval #CAMERA_ERROR_NONE Successful
3954  * @retval #CAMERA_ERROR_INVALID_OPERATION Internal error
3955  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3956  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3957  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3958  * @see camera_attr_set_tilt()
3959  * @see camera_attr_get_tilt()
3960  */
3961 int camera_attr_get_tilt_range(camera_h camera, int *min, int *max);
3962
3963 /**
3964  * @brief Sets the type of PTZ(Pan Tilt Zoom).
3965  * @since_tizen 3.0
3966  * @param[in] camera The handle to the camera
3967  * @param[in] ptz_type PTZ type
3968  * @return @c 0 on success, otherwise a negative error value
3969  * @retval #CAMERA_ERROR_NONE Successful
3970  * @retval #CAMERA_ERROR_INVALID_OPERATION Internal error
3971  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3972  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
3973  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3974  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3975  * @pre The camera state must be set to #CAMERA_STATE_PREVIEW.
3976  * @see camera_attr_get_pan()
3977  * @see camera_attr_set_pan()
3978  * @see camera_attr_get_pan_range()
3979  * @see camera_attr_get_tilt()
3980  * @see camera_attr_set_tilt()
3981  * @see camera_attr_get_tilt_range()
3982  * @see camera_attr_foreach_supported_ptz_type()
3983  */
3984 int camera_attr_set_ptz_type(camera_h camera, camera_attr_ptz_type_e ptz_type);
3985
3986 /**
3987  * @}
3988  */
3989
3990 /**
3991  * @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
3992  * @{
3993  */
3994
3995 /**
3996  * @brief Retrieves all supported PTZ(Pan Tilt Zoom) types by invoking callback function once for each supported ptz type.
3997  * @since_tizen 3.0
3998  * @param[in] camera The handle to the camera
3999  * @param[in] callback The callback function to invoke
4000  * @param[in] user_data The user data to be passed to the callback function
4001  * @return @c 0 on success, otherwise a negative error value
4002  * @retval #CAMERA_ERROR_NONE Successful
4003  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
4004  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
4005  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
4006  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
4007  * @post This function invokes camera_attr_supported_ptz_type_cb() to get all supported ptz type.
4008  * @see camera_attr_set_ptz_type()
4009  */
4010 int camera_attr_foreach_supported_ptz_type(camera_h camera, camera_attr_supported_ptz_type_cb callback, void *user_data);
4011
4012 /**
4013  * @}
4014  */
4015
4016 /**
4017  * @addtogroup CAPI_MEDIA_CAMERA_ATTRIBUTES_MODULE
4018  * @{
4019  */
4020
4021 /**
4022  * @brief Sets the ROI(Region Of Interest) area of display.
4023  * @since_tizen 3.0
4024  * @remarks If no display is set, no operation is performed and
4025  *          the ROI area is valid only in #CAMERA_DISPLAY_MODE_CUSTOM_ROI display mode.
4026  * @remarks The minimum value of width and height are 1.
4027  * @remarks ROI area can be set before setting ROI display mode. (since 4.0)
4028  * @param[in] camera The handle to the camera
4029  * @param[in] x X coordinate of area
4030  * @param[in] y Y coordinate of area
4031  * @param[in] width Width of area
4032  * @param[in] height Height of area
4033  * @return @c 0 on success, otherwise a negative error value
4034  * @retval #CAMERA_ERROR_NONE Successful
4035  * @retval #CAMERA_ERROR_INVALID_OPERATION Internal error
4036  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
4037  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
4038  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
4039  * @see camera_attr_get_display_roi_area()
4040  */
4041 int camera_attr_set_display_roi_area(camera_h camera, int x, int y, int width, int height);
4042
4043 /**
4044  * @brief Gets the ROI(Region Of Interest) area of display.
4045  * @since_tizen 3.0
4046  * @param[in] camera The handle to the camera
4047  * @param[out] x X coordinate of area
4048  * @param[out] y Y coordinate of area
4049  * @param[out] width Width of area
4050  * @param[out] height Height of area
4051  * @return @c 0 on success, otherwise a negative error value
4052  * @retval #CAMERA_ERROR_NONE Successful
4053  * @retval #CAMERA_ERROR_INVALID_OPERATION Internal error
4054  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
4055  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
4056  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
4057  * @see camera_attr_set_display_roi_area()
4058  */
4059 int camera_attr_get_display_roi_area(camera_h camera, int *x, int *y, int *width, int *height);
4060
4061 /**
4062  * @}
4063  */
4064 #ifdef __cplusplus
4065 }
4066 #endif
4067
4068 #endif /* __TIZEN_MULTIMEDIA_CAMERA_H__ */