Tizen 2.1 base
[platform/core/api/camera.git] / include / camera_private.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
18
19
20
21 #ifndef __TIZEN_MULTIMEDIA_CAMERA_PRIVATE_H__
22 #define __TIZEN_MULTIMEDIA_CAMERA_PRIVATE_H__
23 #include <camera.h>
24 #include <mm_camcorder.h>
25
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29
30 #define MAX_DETECTED_FACE 20
31
32 typedef enum {
33         _CAMERA_EVENT_TYPE_STATE_CHANGE,
34         _CAMERA_EVENT_TYPE_FOCUS_CHANGE,
35         _CAMERA_EVENT_TYPE_CAPTURE_COMPLETE,
36         _CAMERA_EVENT_TYPE_PREVIEW,
37         _CAMERA_EVENT_TYPE_CAPTURE,
38         _CAMERA_EVENT_TYPE_ERROR,
39         _CAMERA_EVENT_TYPE_HDR_PROGRESS,
40         _CAMERA_EVENT_TYPE_INTERRUPTED,
41         _CAMERA_EVENT_TYPE_FACE_DETECTION,
42         _CAMERA_EVENT_TYPE_NUM
43 }_camera_event_e;
44
45 typedef struct _camera_s{
46         MMHandleType mm_handle;
47
48         void* user_cb[_CAMERA_EVENT_TYPE_NUM];
49         void* user_data[_CAMERA_EVENT_TYPE_NUM];
50         void* display_handle;
51         camera_display_type_e display_type;
52         int state;
53
54         MMMessageCallback relay_message_callback;
55         void* relay_user_data;
56         int capture_count;
57         int capture_width;
58         int capture_height;
59         bool is_continuous_shot_break;
60         bool is_capture_completed;
61         int current_capture_count;
62         int current_capture_complete_count;
63         bool capture_resolution_modified;
64         camera_detected_face_s faceinfo[MAX_DETECTED_FACE];
65         int num_of_faces;
66         bool hdr_keep_mode;
67         bool focus_area_valid;
68         bool is_used_in_recorder;
69         bool on_continuous_focusing;
70         int cached_focus_mode;
71 } camera_s;
72
73 int _camera_get_mm_handle(camera_h camera , MMHandleType *handle);
74 int _camera_set_relay_mm_message_callback(camera_h camera, MMMessageCallback callback, void *user_data);
75 int __camera_start_continuous_focusing(camera_h camera);
76 int _camera_set_use(camera_h camera, bool used);
77 bool _camera_is_used(camera_h camera);
78
79 #ifdef __cplusplus
80 }
81 #endif
82
83 #endif //__TIZEN_MULTIMEDIA_CAMERA_PRIVATE_H__
84