Update muse-camera by the splited muse library
[platform/core/multimedia/mmsvc-camera.git] / muse / include / muse_camera_msg.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 __CAMERA_MSG_PRIVATE_H__
18 #define __CAMERA_MSG_PRIVATE_H__
19
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23
24 #include <stdint.h>
25 #include <muse_core.h>
26
27 /**
28  * @file muse_camera_msg.h
29  * @brief This file contains the muse_camera message APIs, related structures, defines and macros.
30  */
31
32 /**
33  * @brief Definition for the handle parameter.
34  */
35 #define PARAM_HANDLE        "handle"
36
37 /**
38  * @brief Definition for the ret parameter.
39  */
40 #define PARAM_RET           "ret"
41
42 /**
43  * @brief Definition for the get_type parameter.
44  */
45 #define PARAM_GET_TYPE      "get_type"
46
47 /**
48  * @brief Definition for the get_index parameter.
49  */
50 #define PARAM_GET_INDEX     "get_index"
51
52 /**
53  * @brief Definition for the event parameter.
54  */
55 #define PARAM_EVENT         "event"
56
57 /**
58  * @brief Definition for the api class parameter.
59  */
60 #define PARAM_API_CLASS     "api_class"
61
62 /**
63  * @brief Definition for the event class parameter.
64  */
65 #define PARAM_EVENT_CLASS   "event_class"
66
67 /**
68  * @brief Definition for the error parameter.
69  */
70 #define PARAM_ERROR         "error"
71
72 /**
73  * @brief Definition for the tbm key parameter.
74  */
75 #define PARAM_TBM_KEY       "t_key"
76
77 /**
78  * @brief Definition for the display mode parameter.
79  */
80 #define PARAM_DISPLAY_MODE  "display_mode"
81
82 /**
83  * @brief Definition for the device type parameter.
84  */
85 #define PARAM_DEVICE_TYPE   "device_type"
86
87 /**
88  * @brief Definition for the INTEGER type.
89  */
90 typedef int32_t INT;
91
92 /**
93  * @brief Definition for the 64 bit INTEGER type.
94  */
95 typedef int64_t INT64;
96
97 /**
98  * @brief Definition for the 64 bit integer pointer type.
99  */
100 typedef intptr_t POINTER;
101
102 /**
103  * @brief Definition for the 64 bit DOUBLE type.
104  */
105 typedef double DOUBLE;
106
107 /**
108  * @brief Definition for the 64 bit STRING type.
109  */
110 typedef const char* STRING;
111
112
113 /**
114  * @brief Query the specific value from the input message via ipc.
115  * @param[in] param The key to query, the variable name should be matched to the message's one.
116  * @param[out] buf The string of message buffer.
117  */
118 #define muse_camera_msg_get(param, buf) \
119         muse_core_msg_deserialize(#param, buf, NULL, NULL, MUSE_TYPE_ANY, &param)
120
121 /**
122  * @brief Query the specific string type value from the input message via ipc.
123  * @param[in] param The key to query, the variable name should be matched to the message's one.
124  * @param[out] buf The string of message buffer.
125  */
126 #define muse_camera_msg_get_string(param, buf) \
127         muse_core_msg_deserialize(#param, buf, NULL, NULL, MUSE_TYPE_STRING, param)
128
129 /**
130  * @brief Query the specific array type value from the input message via ipc.
131  * @param[in] param The key to query, the variable name should be matched to the message's one.
132  * @param[out] buf The string of message buffer.
133  */
134 #define muse_camera_msg_get_array(param, buf) \
135         muse_core_msg_deserialize(#param, buf, NULL, NULL, MUSE_TYPE_ARRAY, param)
136
137 /**
138  * @brief Query the specific pointer type value from the input message via ipc.
139  * @param[in] param The key to query, the variable name should be matched to the message's one.
140  * @param[out] buf The string of message buffer.
141  */
142 #define muse_camera_msg_get_pointer(param, buf) \
143         muse_core_msg_deserialize(#param, buf, NULL, NULL, MUSE_TYPE_POINTER, &param)
144
145 #ifdef __cplusplus
146 }
147 #endif
148
149 #endif /*__CAMERA_MSG_PRIVATE_H__*/