merge with master
[framework/api/face.git] / src / face_priv.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 #ifndef __TIZEN_UIX_FACE_PRIV_H__
17 #define __TIZEN_UIX_FACE_PRIV_H__
18
19 #include "face-debug.h"
20
21 #undef __in
22 #define __in
23
24 #undef __out
25 #define __out
26
27 #undef __inout
28 #define __inout
29
30 #define FACE_COMPONENT_MAGIC    (0x4e3f2e1f)
31 #define FACE_FEATURE_MAGIC              (0x09090909)
32 #define FACE_IMAGE_MAGIC                (0x1a2b3c4d)
33 #define FACE_INVALID_MAGIC              (0xDEADBEAF)
34
35 typedef struct face_component_s {
36         face_rect_s face;       // 16
37
38         face_point_s lefteye;   // 8
39         face_point_s righteye;  // 8
40
41         face_rect_s mouth;      // 16
42
43         bool valid;
44         unsigned int magic;
45 } FaceComponent;
46
47 typedef struct face_image_s {
48         unsigned char *pixel;            /**< pixel data */
49
50         int width;                                       /**< image data's width */
51         int height;                                      /**< image data's height */
52
53         unsigned int size;
54
55         face_image_colorspace_e colorspace;     /**< color space */
56
57         unsigned int magic;
58 } FaceImage;
59
60 typedef struct face_feature_s {
61         unsigned char *data;    /**< result data of face information */
62         unsigned int len;               /**< size of result data */// in byte unit
63
64         unsigned int magic;
65 } FaceFeature;
66
67 const char *_face_convert_error(int err);
68
69
70 // Internal APIs
71 int face_component_create(face_component_h *face_component);
72
73 #endif  // __TIZEN_UIX_FACE_PRIV_H__
74