Add new enums for get APIs and code optimization 11/95411/1 accepted/tizen/common/20161109.140310 accepted/tizen/ivi/20161109.002848 accepted/tizen/mobile/20161109.002602 accepted/tizen/tv/20161109.002718 accepted/tizen/wearable/20161109.002803 submit/tizen/20161108.054351
authorJeongmo Yang <jm80.yang@samsung.com>
Thu, 3 Nov 2016 06:50:50 +0000 (15:50 +0900)
committerJeongmo Yang <jm80.yang@samsung.com>
Thu, 3 Nov 2016 06:50:50 +0000 (15:50 +0900)
1. The previous mechanism for get APIs is extracting get value from received message.
But, received message could be overwritten by next message, so get API could lost the value from server.
To resolve it, this commit adds new enums and client can store the values to each independent space.
2. Replace some macros by function.

[Version] 0.2.55
[Profile] Common
[Issue Type] Update
[Dependency module] N/A
[Test] [M(T) - Boot=(OK), sdb=(OK), Home=(OK), Touch=(OK), Version=tizen-mobile_20161101.3]

Change-Id: I687b53b8cba6bb759feea5191320911409a8496b
Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
muse/include/muse_camera.h
muse/include/muse_camera_msg.h
muse/src/muse_camera_dispatcher.c
packaging/mmsvc-camera.spec

index c420d31..3de83f2 100644 (file)
@@ -243,6 +243,89 @@ typedef enum {
        MUSE_CAMERA_EVENT_CLASS_NUM
 } muse_camera_event_class_e;
 
+/**
+ * @brief Enumeration for the muse camera get type list.
+ */
+typedef enum {
+       MUSE_CAMERA_GET_TYPE_NONE,
+       MUSE_CAMERA_GET_TYPE_INT,
+       MUSE_CAMERA_GET_TYPE_INT_PAIR,
+       MUSE_CAMERA_GET_TYPE_ARRAY,
+       MUSE_CAMERA_GET_TYPE_STRING,
+       MUSE_CAMERA_GET_TYPE_POINTER,
+       MUSE_CAMERA_GET_TYPE
+} muse_camera_get_type_e;
+
+/**
+ * @brief Enumeration for the integer type list.
+ */
+typedef enum {
+       MUSE_CAMERA_GET_INT_STATE = 0,
+       MUSE_CAMERA_GET_INT_DEVICE_COUNT,
+       MUSE_CAMERA_GET_INT_FACING_DIRECTION,
+       MUSE_CAMERA_GET_INT_LENS_ORIENTATION,
+       MUSE_CAMERA_GET_INT_PREVIEW_RESOLUTION,
+       MUSE_CAMERA_GET_INT_PREVIEW_FORMAT,
+       MUSE_CAMERA_GET_INT_PREVIEW_FPS,
+       MUSE_CAMERA_GET_INT_RECOMMENDED_PREVIEW_RESOLUTION,
+       MUSE_CAMERA_GET_INT_CAPTURE_RESOLUTION,
+       MUSE_CAMERA_GET_INT_CAPTURE_FORMAT,
+       MUSE_CAMERA_GET_INT_DISPLAY_FLIP,
+       MUSE_CAMERA_GET_INT_DISPLAY_MODE,
+       MUSE_CAMERA_GET_INT_DISPLAY_REUSE_HINT,
+       MUSE_CAMERA_GET_INT_DISPLAY_ROTATION,
+       MUSE_CAMERA_GET_INT_DISPLAY_VISIBLE,
+       MUSE_CAMERA_GET_INT_THEATER_MODE,
+       MUSE_CAMERA_GET_INT_FLASH_MODE,
+       MUSE_CAMERA_GET_INT_AF_MODE,
+       MUSE_CAMERA_GET_INT_ISO,
+       MUSE_CAMERA_GET_INT_BRIGHTNESS,
+       MUSE_CAMERA_GET_INT_CONTRAST,
+       MUSE_CAMERA_GET_INT_EFFECT,
+       MUSE_CAMERA_GET_INT_SCENE_MODE,
+       MUSE_CAMERA_GET_INT_WHITE_BALANCE,
+       MUSE_CAMERA_GET_INT_EXPOSURE,
+       MUSE_CAMERA_GET_INT_EXPOSURE_MODE,
+       MUSE_CAMERA_GET_INT_HDR_MODE,
+       MUSE_CAMERA_GET_INT_IMAGE_QUALITY,
+       MUSE_CAMERA_GET_INT_STREAM_FLIP,
+       MUSE_CAMERA_GET_INT_STREAM_ROTATION,
+       MUSE_CAMERA_GET_INT_TAG_ORIENTATION,
+       MUSE_CAMERA_GET_INT_ZOOM,
+       MUSE_CAMERA_GET_INT_PAN,
+       MUSE_CAMERA_GET_INT_TILT,
+       MUSE_CAMERA_GET_INT_ENABLED_ANTI_SHAKE,
+       MUSE_CAMERA_GET_INT_ENABLED_AUTO_CONTRAST,
+       MUSE_CAMERA_GET_INT_ENABLED_TAG,
+       MUSE_CAMERA_GET_INT_ENABLED_VIDEO_STABILIZATION,
+       MUSE_CAMERA_GET_INT_ENCODED_PREVIEW_BITRATE,
+       MUSE_CAMERA_GET_INT_ENCODED_PREVIEW_GOP_INTERVAL,
+       MUSE_CAMERA_GET_INT_NUM
+} muse_camera_get_int_e;
+
+/**
+ * @brief Enumeration for the integer pair type list.
+ */
+typedef enum {
+       MUSE_CAMERA_GET_INT_PAIR_ZOOM_RANGE,
+       MUSE_CAMERA_GET_INT_PAIR_BRIGHTNESS_RANGE,
+       MUSE_CAMERA_GET_INT_PAIR_CONTRAST_RANGE,
+       MUSE_CAMERA_GET_INT_PAIR_EXPOSURE_RANGE,
+       MUSE_CAMERA_GET_INT_PAIR_PAN_RANGE,
+       MUSE_CAMERA_GET_INT_PAIR_TILT_RANGE,
+       MUSE_CAMERA_GET_INT_PAIR_NUM
+} muse_camera_get_int_pair_e;
+
+
+/**
+ * @brief Enumeration for the string type list.
+ */
+typedef enum {
+       MUSE_CAMERA_GET_STRING_TAG_IMAGE_DESCRIPTION,
+       MUSE_CAMERA_GET_STRING_TAG_SOFTWARE,
+       MUSE_CAMERA_GET_STRING_NUM
+} muse_camera_get_string_e;
+
 typedef struct {
        tbm_bo bo;
        int key;
index cecd91a..c356bb0 100644 (file)
@@ -40,6 +40,16 @@ extern "C" {
 #define PARAM_RET           "ret"
 
 /**
+ * @brief Definition for the get_type parameter.
+ */
+#define PARAM_GET_TYPE      "get_type"
+
+/**
+ * @brief Definition for the get_index parameter.
+ */
+#define PARAM_GET_INDEX     "get_index"
+
+/**
  * @brief Definition for the event parameter.
  */
 #define PARAM_EVENT         "event"
@@ -99,6 +109,7 @@ typedef double DOUBLE;
  */
 typedef const char* STRING;
 
+
 /**
  * @brief Query the specific value from the input message via ipc.
  * @param[in] param The key to query, the variable name should be matched to the message's one.
@@ -131,264 +142,6 @@ typedef const char* STRING;
 #define muse_camera_msg_get_pointer(param, buf) \
        muse_core_msg_json_deserialize(#param, buf, NULL, &param, NULL, MUSE_TYPE_POINTER)
 
-/**
- * @brief Query the specific 64bit integer type value from the input message via ipc.
- * @param[in] param The key to query, the variable name should be matched to the message's one.
- * @param[out] buf The string of message buffer.
- */
-#define muse_camera_msg_get_64bit(param, buf) \
-       muse_core_msg_json_deserialize(#param, buf, NULL, &param, NULL, MUSE_TYPE_INT64)
-
-/**
- * @brief Query the specific value with error return from the input message via ipc.
- * @param[in] param The key to query, the variable name should be matched to the message's one.
- * @param[out] buf The string of message buffer.
- * @param[out] e The error return from the core api.
- */
-#define muse_camera_msg_get_error_e(param, buf, e) \
-       muse_core_msg_json_deserialize(#param, buf, NULL, &param, &e, MUSE_TYPE_ANY)
-
-/**
- * @brief Returning the ack message from the server to client side.
- * @param[in] api The enumeration of the corresponding api.
- * @param[in] class The enumeration of the api class.
- * @param[out] ret The delivered return value from the module to proxy side.
- * @param[in] module The module info for the ipc transportation.
- */
-#define muse_camera_msg_return(api, class, ret, module) \
-       do {    \
-               char *__sndMsg__; \
-               int __len__; \
-               __sndMsg__ = muse_core_msg_json_factory_new(api, \
-                               MUSE_TYPE_INT, PARAM_API_CLASS, class, \
-                               MUSE_TYPE_INT, PARAM_RET, ret, \
-                               0); \
-               __len__ = muse_core_ipc_send_msg(muse_core_client_get_msg_fd(module), __sndMsg__); \
-               if (__len__ <= 0) { \
-                       LOGE("sending message failed"); \
-                       ret = CAMERA_ERROR_INVALID_OPERATION; \
-               } \
-               muse_core_msg_json_factory_free(__sndMsg__); \
-       } while (0)
-
-/**
- * @brief Returning the ack message from the server to client side.
- * @param[in] api The enumeration of the corresponding api.
- * @param[in] class The enumeration of the api class.
- * @param[out] ret The delivered return value from the module to proxy side.
- * @param[in] module The module info for the ipc transportation.
- * @param[in] type The data type of the parameter.
- * @param[in] param A parameter to be included in the message.
- */
-#define muse_camera_msg_return1(api, class, ret, module, type, param) \
-       do {    \
-               char *__sndMsg__; \
-               int __len__; \
-               type __value__ = (type)param; \
-               __sndMsg__ = muse_core_msg_json_factory_new(api, \
-                               MUSE_TYPE_INT, PARAM_API_CLASS, class, \
-                               MUSE_TYPE_INT, PARAM_RET, ret, \
-                               MUSE_TYPE_##type, #param, __value__, \
-                               0); \
-               __len__ = muse_core_ipc_send_msg(muse_core_client_get_msg_fd(module), __sndMsg__); \
-               if (__len__ <= 0) { \
-                       LOGE("sending message failed"); \
-                       ret = CAMERA_ERROR_INVALID_OPERATION; \
-               } \
-               muse_core_msg_json_factory_free(__sndMsg__); \
-       } while (0)
-
-/**
- * @brief Returning the ack message from the server to client side, adding 2 parameters.
- * @param[in] api The enumeration of the corresponding api.
- * @param[in] class The enumeration of the api class.
- * @param[out] ret The delivered return value from the module to proxy side.
- * @param[in] module The module info for the ipc transportation.
- * @param[in] type1 The data type of the parameter.
- * @param[in] param1 The 1st parameter to be included in the message.
- * @param[in] type2 The data type of the parameter.
- * @param[in] param2 The 2nd parameter to be included in the message.
- */
-#define muse_camera_msg_return2(api, class, ret, module, type1, param1, type2, param2) \
-       do {    \
-               char *__sndMsg__; \
-               int __len__; \
-               type1 __value1__ = (type1)param1; \
-               type2 __value2__ = (type2)param2; \
-               __sndMsg__ = muse_core_msg_json_factory_new(api, \
-                               MUSE_TYPE_INT, PARAM_API_CLASS, class, \
-                               MUSE_TYPE_INT, PARAM_RET, ret, \
-                               MUSE_TYPE_##type1, #param1, __value1__, \
-                               MUSE_TYPE_##type2, #param2, __value2__, \
-                               0); \
-               __len__ = muse_core_ipc_send_msg(muse_core_client_get_msg_fd(module), __sndMsg__); \
-               if (__len__ <= 0) { \
-                       LOGE("sending message failed"); \
-                       ret = CAMERA_ERROR_INVALID_OPERATION; \
-               } \
-               muse_core_msg_json_factory_free(__sndMsg__); \
-       } while (0)
-
-/**
- * @brief Returning the ack message from the server to client side, adding 3 parameters.
- * @param[in] api The enumeration of the corresponding api.
- * @param[in] class The enumeration of the api class.
- * @param[out] ret The delivered return value from the module to proxy side.
- * @param[in] module The module info for the ipc transportation.
- * @param[in] type1 The data type of the parameter.
- * @param[in] param1 The 1st parameter to be included in the message.
- * @param[in] type2 The data type of the parameter.
- * @param[in] param2 The 2nd parameter to be included in the message.
- * @param[in] type3 The data type of the parameter.
- * @param[in] param3 The 3rd parameter to be included in the message.
- */
-#define muse_camera_msg_return3(api, class, ret, module, type1, param1, type2, param2, type3, param3) \
-       do {    \
-               char *__sndMsg__; \
-               int __len__; \
-               type1 __value1__ = (type1)param1; \
-               type2 __value2__ = (type2)param2; \
-               type3 __value3__ = (type3)param3; \
-               __sndMsg__ = muse_core_msg_json_factory_new(api, \
-                               MUSE_TYPE_INT, PARAM_API_CLASS, class, \
-                               MUSE_TYPE_INT, PARAM_RET, ret, \
-                               MUSE_TYPE_##type1, #param1, __value1__, \
-                               MUSE_TYPE_##type2, #param2, __value2__, \
-                               MUSE_TYPE_##type3, #param3, __value3__, \
-                               0); \
-               __len__ = muse_core_ipc_send_msg(muse_core_client_get_msg_fd(module), __sndMsg__); \
-               if (__len__ <= 0) { \
-                       LOGE("sending message failed"); \
-                       ret = CAMERA_ERROR_INVALID_OPERATION; \
-               } \
-               muse_core_msg_json_factory_free(__sndMsg__); \
-       } while (0)
-
-/**
- * @brief Returning the ack message from the server to client side, adding array parameter.
- * @param[in] api The enumeration of the corresponding api.
- * @param[in] class The enumeration of the api class.
- * @param[out] ret The delivered return value from the module to proxy side.
- * @param[in] module The module info for the ipc transportation.
- * @param[in] param The array data parameter to be included in the message.
- * @param[in] length The length of the array.
- * @param[in] datum_size The size of the array.
- */
-#define muse_camera_msg_return_array(api, class, ret, module, param, length, datum_size) \
-       do {    \
-               char *__sndMsg__; \
-               int __len__; \
-               int *__value__ = (int *)param; \
-               __sndMsg__ = muse_core_msg_json_factory_new(api, \
-                               MUSE_TYPE_INT, PARAM_API_CLASS, class, \
-                               MUSE_TYPE_INT, PARAM_RET, ret, \
-                               MUSE_TYPE_ARRAY, #param, \
-                                       datum_size == sizeof(int) ? length / sizeof(int) :  \
-                                       length / sizeof(int) + (length % sizeof(int) ? 1 : 0), \
-                                       __value__, \
-                               0); \
-               __len__ = muse_core_ipc_send_msg(muse_core_client_get_msg_fd(module), __sndMsg__); \
-               if (__len__ <= 0) { \
-                       LOGE("sending message failed"); \
-                       ret = CAMERA_ERROR_INVALID_OPERATION; \
-               } \
-               muse_core_msg_json_factory_free(__sndMsg__); \
-       } while (0)
-
-/**
- * @brief Returning the event ack message from the server to client side, adding array parameter.
- * @param[in] api The enumeration of the corresponding api.
- * @param[in] event The enumeration of the event.
- * @param[in] class The enumeration of the event class.
- * @param[in] module The module info for the ipc transportation.
- */
-#define muse_camera_msg_event(api, event, class, module) \
-       do {    \
-               char *__sndMsg__; \
-               __sndMsg__ = muse_core_msg_json_factory_new(api, \
-                               MUSE_TYPE_INT, PARAM_EVENT, event, \
-                               MUSE_TYPE_INT, PARAM_EVENT_CLASS, class, \
-                               0); \
-               muse_core_ipc_send_msg(muse_core_client_get_msg_fd(module), __sndMsg__); \
-               muse_core_msg_json_factory_free(__sndMsg__); \
-       } while (0)
-
-/**
- * @brief Returning the event ack message from the server to client side, adding array parameter.
- * @param[in] api The enumeration of the corresponding api.
- * @param[in] event The enumeration of the event.
- * @param[in] class The enumeration of the event class.
- * @param[in] module The module info for the ipc transportation.
- * @param[in] type The data type of the parameter.
- * @param[in] param A parameter to be included in the message.
- */
-#define muse_camera_msg_event1(api, event, class, module, type, param) \
-       do {    \
-               char *__sndMsg__; \
-               type __value__ = (type)param; \
-               __sndMsg__ = muse_core_msg_json_factory_new(api, \
-                               MUSE_TYPE_INT, PARAM_EVENT, event, \
-                               MUSE_TYPE_INT, PARAM_EVENT_CLASS, class, \
-                               MUSE_TYPE_##type, #param, __value__, \
-                               0); \
-               muse_core_ipc_send_msg(muse_core_client_get_msg_fd(module), __sndMsg__); \
-               muse_core_msg_json_factory_free(__sndMsg__); \
-       } while (0)
-
-/**
- * @brief Returning the event ack message from the server to client side, adding array parameter.
- * @param[in] api The enumeration of the corresponding api.
- * @param[in] event The enumeration of the event.
- * @param[in] class The enumeration of the event class.
- * @param[in] module The module info for the ipc transportation.
- * @param[in] param1 The 1st parameter to be included in the message.
- * @param[in] type2 The data type of the parameter.
- * @param[in] param2 The 2nd parameter to be included in the message.
- */
-#define muse_camera_msg_event2(api, event, class, module, type1, param1, type2, param2) \
-       do {    \
-               char *__sndMsg__; \
-               type1 __value1__ = (type1)param1; \
-               type2 __value2__ = (type2)param2; \
-               __sndMsg__ = muse_core_msg_json_factory_new(api, \
-                               MUSE_TYPE_INT, PARAM_EVENT, event, \
-                               MUSE_TYPE_INT, PARAM_EVENT_CLASS, class, \
-                               MUSE_TYPE_##type1, #param1, __value1__, \
-                               MUSE_TYPE_##type2, #param2, __value2__, \
-                               0); \
-               muse_core_ipc_send_msg(muse_core_client_get_msg_fd(module), __sndMsg__); \
-               muse_core_msg_json_factory_free(__sndMsg__); \
-       } while (0)
-
-/**
- * @brief Returning the event ack message from the server to client side, adding array parameter.
- * @param[in] api The enumeration of the corresponding api.
- * @param[in] event The enumeration of the event.
- * @param[in] class The enumeration of the event class.
- * @param[in] module The module info for the ipc transportation.
- * @param[in] param1 The 1st parameter to be included in the message.
- * @param[in] type2 The data type of the parameter.
- * @param[in] param2 The 2nd parameter to be included in the message.
- * @param[in] type3 The data type of the parameter.
- * @param[in] param3 The 3rd parameter to be included in the message.
- */
-#define muse_camera_msg_event3(api, event, class, module, type1, param1, type2, param2, type3, param3) \
-       do {    \
-               char *__sndMsg__; \
-               type1 __value1__ = (type1)param1; \
-               type2 __value2__ = (type2)param2; \
-               type3 __value3__ = (type3)param3; \
-               __sndMsg__ = muse_core_msg_json_factory_new(api, \
-                               MUSE_TYPE_INT, PARAM_EVENT, event, \
-                               MUSE_TYPE_INT, PARAM_EVENT_CLASS, class, \
-                               MUSE_TYPE_##type1, #param1, __value1__, \
-                               MUSE_TYPE_##type2, #param2, __value2__, \
-                               MUSE_TYPE_##type3, #param3, __value3__, \
-                               0); \
-               muse_core_ipc_send_msg(muse_core_client_get_msg_fd(module), __sndMsg__); \
-               muse_core_msg_json_factory_free(__sndMsg__); \
-       } while (0)
-
 #ifdef __cplusplus
 }
 #endif
index 68a7525..d4b1c9e 100644 (file)
 
 static int _camera_remove_export_data(muse_module_h module, int key, int remove_all);
 
+static void __camera_dispatcher_send_msg(muse_module_h module, char *msg)
+{
+       int len = 0;
+
+       if (!msg) {
+               LOGE("NULL msg");
+               return;
+       }
+
+       if (!module) {
+               LOGE("NULL module");
+               goto _DONE;
+       }
+
+       /*LOGD("msg [%s]", msg);*/
+
+       len = muse_core_ipc_send_msg(muse_core_client_get_msg_fd(module), msg);
+       if (len <= 0)
+               LOGE("sending message[%s] failed. errno %d", msg, errno);
+
+_DONE:
+       muse_core_msg_json_factory_free(msg);
+
+       return;
+}
+
+static void muse_camera_msg_return(int api, int class, int ret, muse_module_h module)
+{
+       char *send_msg = muse_core_msg_json_factory_new(api,
+               MUSE_TYPE_INT, PARAM_API_CLASS, class,
+               MUSE_TYPE_INT, PARAM_RET, ret,
+               MUSE_TYPE_INT, PARAM_GET_TYPE, MUSE_CAMERA_GET_TYPE_NONE,
+               0);
+
+       __camera_dispatcher_send_msg(module, send_msg);
+
+       return;
+}
+
+static void muse_camera_msg_return1(int api, int class, int ret, muse_module_h module,
+       int get_type, int index, const char *name, int value_int, void *value_pointer)
+{
+       char *send_msg = NULL;
+
+       if (get_type == MUSE_CAMERA_GET_TYPE_INT) {
+               send_msg = muse_core_msg_json_factory_new(api,
+                       MUSE_TYPE_INT, PARAM_API_CLASS, class,
+                       MUSE_TYPE_INT, PARAM_RET, ret,
+                       MUSE_TYPE_INT, PARAM_GET_TYPE, get_type,
+                       MUSE_TYPE_INT, PARAM_GET_INDEX, index,
+                       MUSE_TYPE_INT, name, value_int,
+                       0);
+       } else if (get_type == MUSE_CAMERA_GET_TYPE_STRING) {
+               send_msg = muse_core_msg_json_factory_new(api,
+                       MUSE_TYPE_INT, PARAM_API_CLASS, class,
+                       MUSE_TYPE_INT, PARAM_RET, ret,
+                       MUSE_TYPE_INT, PARAM_GET_TYPE, get_type,
+                       MUSE_TYPE_INT, PARAM_GET_INDEX, index,
+                       MUSE_TYPE_STRING, name, value_pointer,
+                       0);
+       } else if (get_type == MUSE_CAMERA_GET_TYPE_POINTER) {
+               send_msg = muse_core_msg_json_factory_new(api,
+                       MUSE_TYPE_INT, PARAM_API_CLASS, class,
+                       MUSE_TYPE_INT, PARAM_RET, ret,
+                       MUSE_TYPE_INT, PARAM_GET_TYPE, get_type,
+                       MUSE_TYPE_INT, PARAM_GET_INDEX, index,
+                       MUSE_TYPE_POINTER, name, value_pointer,
+                       0);
+       } else {
+               LOGW("unknown type %d", get_type);
+       }
+
+       __camera_dispatcher_send_msg(module, send_msg);
+
+       return;
+}
+
+
+static void muse_camera_msg_return2(int api, int class, int ret, muse_module_h module,
+       int get_type, int index, int value0, int value1)
+{
+       char *send_msg = muse_core_msg_json_factory_new(api,
+               MUSE_TYPE_INT, PARAM_API_CLASS, class,
+               MUSE_TYPE_INT, PARAM_RET, ret,
+               MUSE_TYPE_INT, PARAM_GET_TYPE, get_type,
+               MUSE_TYPE_INT, PARAM_GET_INDEX, index,
+               MUSE_TYPE_INT, "get_value0", value0,
+               MUSE_TYPE_INT, "get_value1", value1,
+               0);
+
+       __camera_dispatcher_send_msg(module, send_msg);
+
+       return;
+}
+
+
+static void muse_camera_msg_event1(int api, int event, int class, muse_module_h module, const char *name, int value)
+{
+       char *send_msg = muse_core_msg_json_factory_new(api,
+               MUSE_TYPE_INT, PARAM_EVENT, event,
+               MUSE_TYPE_INT, PARAM_EVENT_CLASS, class,
+               MUSE_TYPE_INT, name, value,
+               0);
+
+       __camera_dispatcher_send_msg(module, send_msg);
+
+       return;
+}
+
+
+static void muse_camera_msg_event2(int api, int event, int class, muse_module_h module,
+       const char *name0, int value0, const char *name1, int value1)
+{
+       char *send_msg = muse_core_msg_json_factory_new(api,
+               MUSE_TYPE_INT, PARAM_EVENT, event,
+               MUSE_TYPE_INT, PARAM_EVENT_CLASS, class,
+               MUSE_TYPE_INT, name0, value0,
+               MUSE_TYPE_INT, name1, value1,
+               0);
+
+       __camera_dispatcher_send_msg(module, send_msg);
+
+       return;
+}
+
+
+static void muse_camera_msg_event3(int api, int event, int class, muse_module_h module,
+       const char *name0, int value0, const char *name1, int value1, const char *name2, int value2)
+{
+       char *send_msg = muse_core_msg_json_factory_new(api,
+               MUSE_TYPE_INT, PARAM_EVENT, event,
+               MUSE_TYPE_INT, PARAM_EVENT_CLASS, class,
+               MUSE_TYPE_INT, name0, value0,
+               MUSE_TYPE_INT, name1, value1,
+               MUSE_TYPE_INT, name2, value2,
+               0);
+
+       __camera_dispatcher_send_msg(module, send_msg);
+
+       return;
+}
+
 
 void _camera_dispatcher_callback_supported_theater_mode(int param1, void *user_data)
 {
@@ -48,8 +190,9 @@ void _camera_dispatcher_callback_supported_theater_mode(int param1, void *user_d
        muse_camera_msg_event1(MUSE_CAMERA_CB_EVENT,
                MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_THEATER_MODE,
                MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
-               module,
-               INT, param1);
+               module, "param1", param1);
+
+       return;
 }
 
 void _camera_dispatcher_callback_supported_af_mode(int param1, void *user_data)
@@ -59,8 +202,9 @@ void _camera_dispatcher_callback_supported_af_mode(int param1, void *user_data)
        muse_camera_msg_event1(MUSE_CAMERA_CB_EVENT,
                MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_AF_MODE,
                MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
-               module,
-               INT, param1);
+               module, "param1", param1);
+
+       return;
 }
 
 void _camera_dispatcher_callback_supported_exposure_mode(int param1, void *user_data)
@@ -70,8 +214,9 @@ void _camera_dispatcher_callback_supported_exposure_mode(int param1, void *user_
        muse_camera_msg_event1(MUSE_CAMERA_CB_EVENT,
                MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_EXPOSURE_MODE,
                MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
-               module,
-               INT, param1);
+               module, "param1", param1);
+
+       return;
 }
 
 void _camera_dispatcher_callback_supported_iso_mode(int param1, void *user_data)
@@ -81,8 +226,9 @@ void _camera_dispatcher_callback_supported_iso_mode(int param1, void *user_data)
        muse_camera_msg_event1(MUSE_CAMERA_CB_EVENT,
                MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_ISO,
                MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
-               module,
-               INT, param1);
+               module, "param1", param1);
+
+       return;
 }
 
 void _camera_dispatcher_callback_supported_whitebalance(int param1, void *user_data)
@@ -92,8 +238,9 @@ void _camera_dispatcher_callback_supported_whitebalance(int param1, void *user_d
        muse_camera_msg_event1(MUSE_CAMERA_CB_EVENT,
                MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_WHITEBALANCE,
                MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
-               module,
-               INT, param1);
+               module, "param1", param1);
+
+       return;
 }
 
 void _camera_dispatcher_callback_supported_effect(int param1, void *user_data)
@@ -103,8 +250,9 @@ void _camera_dispatcher_callback_supported_effect(int param1, void *user_data)
        muse_camera_msg_event1(MUSE_CAMERA_CB_EVENT,
                MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_EFFECT,
                MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
-               module,
-               INT, param1);
+               module, "param1", param1);
+
+       return;
 }
 
 void _camera_dispatcher_callback_supported_scene_mode(int param1, void *user_data)
@@ -114,8 +262,9 @@ void _camera_dispatcher_callback_supported_scene_mode(int param1, void *user_dat
        muse_camera_msg_event1(MUSE_CAMERA_CB_EVENT,
                MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_SCENE_MODE,
                MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
-               module,
-               INT, param1);
+               module, "param1", param1);
+
+       return;
 }
 
 void _camera_dispatcher_callback_supported_flash_mode(int param1, void *user_data)
@@ -125,8 +274,9 @@ void _camera_dispatcher_callback_supported_flash_mode(int param1, void *user_dat
        muse_camera_msg_event1(MUSE_CAMERA_CB_EVENT,
                MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_FLASH_MODE,
                MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
-               module,
-               INT, param1);
+               module, "param1", param1);
+
+       return;
 }
 
 int _camera_dispatcher_callback_supported_flash_mode2(int param1, void *user_data)
@@ -146,8 +296,9 @@ void _camera_dispatcher_callback_supported_fps(int param1, void *user_data)
        muse_camera_msg_event1(MUSE_CAMERA_CB_EVENT,
                MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_FPS,
                MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
-               module,
-               INT, param1);
+               module, "param1", param1);
+
+       return;
 }
 
 void _camera_dispatcher_callback_supported_fps_by_resolution(int param1, void *user_data)
@@ -157,8 +308,9 @@ void _camera_dispatcher_callback_supported_fps_by_resolution(int param1, void *u
        muse_camera_msg_event1(MUSE_CAMERA_CB_EVENT,
                MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_FPS_BY_RESOLUTION,
                MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
-               module,
-               INT, param1);
+               module, "param1", param1);
+
+       return;
 }
 
 void _camera_dispatcher_callback_supported_stream_flip(int param1, void *user_data)
@@ -168,8 +320,9 @@ void _camera_dispatcher_callback_supported_stream_flip(int param1, void *user_da
        muse_camera_msg_event1(MUSE_CAMERA_CB_EVENT,
                MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_STREAM_FLIP,
                MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
-               module,
-               INT, param1);
+               module, "param1", param1);
+
+       return;
 }
 
 void _camera_dispatcher_callback_supported_stream_rotation(int param1, void *user_data)
@@ -179,8 +332,9 @@ void _camera_dispatcher_callback_supported_stream_rotation(int param1, void *use
        muse_camera_msg_event1(MUSE_CAMERA_CB_EVENT,
                MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_STREAM_ROTATION,
                MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
-               module,
-               INT, param1);
+               module, "param1", param1);
+
+       return;
 }
 
 void _camera_dispatcher_callback_supported_capture_format(int param1, void *user_data)
@@ -190,8 +344,9 @@ void _camera_dispatcher_callback_supported_capture_format(int param1, void *user
        muse_camera_msg_event1(MUSE_CAMERA_CB_EVENT,
                MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_CAPTURE_FORMAT,
                MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
-               module,
-               INT, param1);
+               module, "param1", param1);
+
+       return;
 }
 
 void _camera_dispatcher_callback_supported_preview_format(int param1, void *user_data)
@@ -201,8 +356,9 @@ void _camera_dispatcher_callback_supported_preview_format(int param1, void *user
        muse_camera_msg_event1(MUSE_CAMERA_CB_EVENT,
                MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_PREVIEW_FORMAT,
                MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
-               module,
-               INT, param1);
+               module, "param1", param1);
+
+       return;
 }
 
 void _camera_dispatcher_callback_supported_preview_resolution(int param1, int param2, void *user_data)
@@ -212,9 +368,9 @@ void _camera_dispatcher_callback_supported_preview_resolution(int param1, int pa
        muse_camera_msg_event2(MUSE_CAMERA_CB_EVENT,
                MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_PREVIEW_RESOLUTION,
                MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
-               module,
-               INT, param1,
-               INT, param2);
+               module, "param1", param1, "param2", param2);
+
+       return;
 }
 
 void _camera_dispatcher_callback_supported_capture_resolution(int param1, int param2, void *user_data)
@@ -224,9 +380,9 @@ void _camera_dispatcher_callback_supported_capture_resolution(int param1, int pa
        muse_camera_msg_event2(MUSE_CAMERA_CB_EVENT,
                MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_CAPTURE_RESOLUTION,
                MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
-               module,
-               INT, param1,
-               INT, param2);
+               module, "param1", param1, "param2", param2);
+
+       return;
 }
 
 void _camera_dispatcher_callback_supported_ptz_type(int param1, void *user_data)
@@ -236,8 +392,9 @@ void _camera_dispatcher_callback_supported_ptz_type(int param1, void *user_data)
        muse_camera_msg_event1(MUSE_CAMERA_CB_EVENT,
                MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_PTZ_TYPE,
                MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
-               module,
-               INT, param1);
+               module, "param1", param1);
+
+       return;
 }
 
 static int _camera_remove_export_data(muse_module_h module, int key, int remove_all)
@@ -494,10 +651,7 @@ void _camera_dispatcher_capturing_cb(camera_image_data_s* image, camera_image_da
        muse_camera_msg_event3(MUSE_CAMERA_CB_EVENT,
                MUSE_CAMERA_EVENT_TYPE_CAPTURE,
                MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
-               module,
-               INT, tbm_key_main,
-               INT, tbm_key_post,
-               INT, tbm_key_thumb);
+               module, "tbm_key_main", tbm_key_main, "tbm_key_post", tbm_key_post, "tbm_key_thumb", tbm_key_thumb);
 
        /* wait for capture callback return */
        end_time = g_get_monotonic_time() + G_TIME_SPAN_SECOND * 3;
@@ -562,10 +716,7 @@ void _camera_dispatcher_state_changed_cb(camera_state_e previous, camera_state_e
        muse_camera_msg_event3(MUSE_CAMERA_CB_EVENT,
                MUSE_CAMERA_EVENT_TYPE_STATE_CHANGE,
                MUSE_CAMERA_EVENT_CLASS_THREAD_MAIN,
-               module,
-               INT, previous,
-               INT, current,
-               INT, by_policy);
+               module, "previous", previous, "current", current, "by_policy", by_policy);
 
        muse_camera = (muse_camera_handle_s *)muse_core_ipc_get_handle(module);
        if (!muse_camera) {
@@ -602,10 +753,7 @@ void _camera_dispatcher_interrupted_cb(camera_policy_e policy, camera_state_e pr
        muse_camera_msg_event3(MUSE_CAMERA_CB_EVENT,
                MUSE_CAMERA_EVENT_TYPE_INTERRUPTED,
                MUSE_CAMERA_EVENT_CLASS_THREAD_MAIN,
-               module,
-               INT, policy,
-               INT, previous,
-               INT, current);
+               module, "policy", policy, "previous", previous, "current", current);
 
        return;
 }
@@ -845,10 +993,11 @@ void _camera_dispatcher_capture_completed_cb(void *user_data)
 
        LOGD("Enter");
 
-       muse_camera_msg_event(MUSE_CAMERA_CB_EVENT,
+       muse_camera_msg_event1(MUSE_CAMERA_CB_EVENT,
                MUSE_CAMERA_EVENT_TYPE_CAPTURE_COMPLETE,
                MUSE_CAMERA_EVENT_CLASS_THREAD_MAIN,
-               module);
+               module, "none", 0);
+
        return;
 }
 
@@ -936,9 +1085,7 @@ void _camera_dispatcher_face_detected_cb(camera_detected_face_s *faces, int coun
                muse_camera_msg_event2(MUSE_CAMERA_CB_EVENT,
                        MUSE_CAMERA_EVENT_TYPE_FACE_DETECTION,
                        MUSE_CAMERA_EVENT_CLASS_THREAD_MAIN,
-                       module,
-                       INT, count,
-                       INT, tbm_key);
+                       module, "count", count, "tbm_key", tbm_key);
        } else {
                LOGW("invalid count for face detection - %d", count);
        }
@@ -955,8 +1102,7 @@ void _camera_dispatcher_focus_changed_cb(camera_focus_state_e state, void *user_
        muse_camera_msg_event1(MUSE_CAMERA_CB_EVENT,
                MUSE_CAMERA_EVENT_TYPE_FOCUS_CHANGE,
                MUSE_CAMERA_EVENT_CLASS_THREAD_MAIN,
-               module,
-               INT, state);
+               module, "state", state);
 
        return;
 }
@@ -970,9 +1116,7 @@ void _camera_dispatcher_error_cb(camera_error_e error, camera_state_e current_st
        muse_camera_msg_event2(MUSE_CAMERA_CB_EVENT,
                MUSE_CAMERA_EVENT_TYPE_ERROR,
                MUSE_CAMERA_EVENT_CLASS_THREAD_MAIN,
-               module,
-               INT, error,
-               INT, current_state);
+               module, "error", error, "current_state", current_state);
 
        return;
 }
@@ -986,8 +1130,8 @@ void _camera_dispatcher_hdr_progress_cb(int percent, void *user_data)
        muse_camera_msg_event1(MUSE_CAMERA_CB_EVENT,
                MUSE_CAMERA_EVENT_TYPE_HDR_PROGRESS,
                MUSE_CAMERA_EVENT_CLASS_THREAD_MAIN,
-               module,
-               INT, percent);
+               module, "percent", percent);
+
        return;
 }
 
@@ -999,7 +1143,6 @@ int camera_dispatcher_create(muse_module_h module)
        int client_fd = -1;
        int pid = 0;
        void *gdbus_connection = NULL;
-       intptr_t handle;
        muse_camera_handle_s *muse_camera = NULL;
        muse_camera_api_e api = MUSE_CAMERA_API_CREATE;
        muse_camera_api_class_e class = MUSE_CAMERA_API_CLASS_IMMEDIATE;
@@ -1078,9 +1221,8 @@ int camera_dispatcher_create(muse_module_h module)
        muse_camera->preview_cb_flag = 0;
 
        LOGD("handle : 0x%x", muse_camera);
-       handle = (intptr_t)muse_camera;
        muse_core_ipc_set_handle(module, (intptr_t)muse_camera);
-       muse_camera_msg_return1(api, class, ret, module, POINTER, handle);
+       muse_camera_msg_return1(api, class, ret, module, MUSE_CAMERA_GET_TYPE_POINTER, -1, "handle", 0, muse_camera);
 
        return MUSE_CAMERA_ERROR_NONE;
 
@@ -1339,7 +1481,7 @@ int camera_dispatcher_get_device_count(muse_module_h module)
 {
        int ret = CAMERA_ERROR_NONE;
        muse_camera_handle_s *muse_camera = NULL;
-       int get_device_count = 0;
+       int get_value = 0;
        muse_camera_api_e api = MUSE_CAMERA_API_GET_DEVICE_COUNT;
        muse_camera_api_class_e class = MUSE_CAMERA_API_CLASS_IMMEDIATE;
 
@@ -1347,9 +1489,10 @@ int camera_dispatcher_get_device_count(muse_module_h module)
 
        LOGD("handle : %p", muse_camera);
 
-       ret = legacy_camera_get_device_count(muse_camera->camera_handle, &get_device_count);
+       ret = legacy_camera_get_device_count(muse_camera->camera_handle, &get_value);
        if (ret == CAMERA_ERROR_NONE) {
-               muse_camera_msg_return1(api, class, ret, module, INT, get_device_count);
+               muse_camera_msg_return1(api, class, ret, module, MUSE_CAMERA_GET_TYPE_INT,
+                       MUSE_CAMERA_GET_INT_DEVICE_COUNT, "get_value", get_value, NULL);
        } else {
                muse_camera_msg_return(api, class, ret, module);
        }
@@ -1399,7 +1542,7 @@ int camera_dispatcher_get_state(muse_module_h module)
 {
        int ret = CAMERA_ERROR_NONE;
        muse_camera_handle_s *muse_camera = NULL;
-       camera_state_e get_state = CAMERA_STATE_NONE;
+       camera_state_e get_value = CAMERA_STATE_NONE;
        muse_camera_api_e api = MUSE_CAMERA_API_GET_STATE;
        muse_camera_api_class_e class = MUSE_CAMERA_API_CLASS_IMMEDIATE;
 
@@ -1407,9 +1550,10 @@ int camera_dispatcher_get_state(muse_module_h module)
 
        LOGD("handle : %p", muse_camera);
 
-       ret = legacy_camera_get_state(muse_camera->camera_handle, &get_state);
+       ret = legacy_camera_get_state(muse_camera->camera_handle, &get_value);
        if (ret == CAMERA_ERROR_NONE) {
-               muse_camera_msg_return1(api, class, ret, module, INT, get_state);
+               muse_camera_msg_return1(api, class, ret, module, MUSE_CAMERA_GET_TYPE_INT,
+                       MUSE_CAMERA_GET_INT_STATE, "get_value", get_value, NULL);
        } else {
                muse_camera_msg_return(api, class, ret, module);
        }
@@ -1607,6 +1751,7 @@ int camera_dispatcher_get_preview_resolution(muse_module_h module)
        muse_camera_handle_s *muse_camera = NULL;
        int get_width = 0;
        int get_height = 0;
+       int get_value = 0;
        muse_camera_api_e api = MUSE_CAMERA_API_GET_PREVIEW_RESOLUTION;
        muse_camera_api_class_e class = MUSE_CAMERA_API_CLASS_IMMEDIATE;
 
@@ -1616,7 +1761,9 @@ int camera_dispatcher_get_preview_resolution(muse_module_h module)
 
        ret = legacy_camera_get_preview_resolution(muse_camera->camera_handle, &get_width, &get_height);
        if (ret == CAMERA_ERROR_NONE) {
-               muse_camera_msg_return2(api, class, ret, module, INT, get_width, INT, get_height);
+               get_value = get_width << 16 | get_height;
+               muse_camera_msg_return1(api, class, ret, module, MUSE_CAMERA_GET_TYPE_INT,
+                       MUSE_CAMERA_GET_INT_PREVIEW_RESOLUTION, "get_value", get_value, NULL);
        } else {
                muse_camera_msg_return(api, class, ret, module);
        }
@@ -1649,7 +1796,7 @@ int camera_dispatcher_get_display_rotation(muse_module_h module)
 {
        int ret = CAMERA_ERROR_NONE;
        muse_camera_handle_s *muse_camera = NULL;
-       camera_rotation_e get_rotation = CAMERA_ROTATION_NONE;
+       camera_rotation_e get_value = CAMERA_ROTATION_NONE;
        muse_camera_api_e api = MUSE_CAMERA_API_GET_DISPLAY_ROTATION;
        muse_camera_api_class_e class = MUSE_CAMERA_API_CLASS_IMMEDIATE;
 
@@ -1657,9 +1804,10 @@ int camera_dispatcher_get_display_rotation(muse_module_h module)
 
        LOGD("handle : %p", muse_camera);
 
-       ret = legacy_camera_get_display_rotation(muse_camera->camera_handle, &get_rotation);
+       ret = legacy_camera_get_display_rotation(muse_camera->camera_handle, &get_value);
        if (ret == CAMERA_ERROR_NONE) {
-               muse_camera_msg_return1(api, class, ret, module, INT, get_rotation);
+               muse_camera_msg_return1(api, class, ret, module, MUSE_CAMERA_GET_TYPE_INT,
+                       MUSE_CAMERA_GET_INT_DISPLAY_ROTATION, "get_value", get_value, NULL);
        } else {
                muse_camera_msg_return(api, class, ret, module);
        }
@@ -1692,7 +1840,7 @@ int camera_dispatcher_get_display_flip(muse_module_h module)
 {
        int ret = CAMERA_ERROR_NONE;
        muse_camera_handle_s *muse_camera = NULL;
-       camera_flip_e get_flip = CAMERA_FLIP_NONE;
+       camera_flip_e get_value = CAMERA_FLIP_NONE;
        muse_camera_api_e api = MUSE_CAMERA_API_GET_DISPLAY_FLIP;
        muse_camera_api_class_e class = MUSE_CAMERA_API_CLASS_IMMEDIATE;
 
@@ -1700,9 +1848,10 @@ int camera_dispatcher_get_display_flip(muse_module_h module)
 
        LOGD("handle : %p", muse_camera);
 
-       ret = legacy_camera_get_display_flip(muse_camera->camera_handle, &get_flip);
+       ret = legacy_camera_get_display_flip(muse_camera->camera_handle, &get_value);
        if (ret == CAMERA_ERROR_NONE) {
-               muse_camera_msg_return1(api, class, ret, module, INT, get_flip);
+               muse_camera_msg_return1(api, class, ret, module, MUSE_CAMERA_GET_TYPE_INT,
+                       MUSE_CAMERA_GET_INT_DISPLAY_FLIP, "get_value", get_value, NULL);
        } else {
                muse_camera_msg_return(api, class, ret, module);
        }
@@ -1735,7 +1884,7 @@ int camera_dispatcher_is_display_visible(muse_module_h module)
 {
        int ret = CAMERA_ERROR_NONE;
        muse_camera_handle_s *muse_camera = NULL;
-       bool get_visible = true;
+       bool get_value = true;
        muse_camera_api_e api = MUSE_CAMERA_API_IS_DISPLAY_VISIBLE;
        muse_camera_api_class_e class = MUSE_CAMERA_API_CLASS_IMMEDIATE;
 
@@ -1743,9 +1892,10 @@ int camera_dispatcher_is_display_visible(muse_module_h module)
 
        LOGD("handle : %p", muse_camera);
 
-       ret = legacy_camera_is_display_visible(muse_camera->camera_handle, &get_visible);
+       ret = legacy_camera_is_display_visible(muse_camera->camera_handle, &get_value);
        if (ret == CAMERA_ERROR_NONE) {
-               muse_camera_msg_return1(api, class, ret, module, INT, get_visible);
+               muse_camera_msg_return1(api, class, ret, module, MUSE_CAMERA_GET_TYPE_INT,
+                       MUSE_CAMERA_GET_INT_DISPLAY_VISIBLE, "get_value", get_value, NULL);
        } else {
                muse_camera_msg_return(api, class, ret, module);
        }
@@ -1780,7 +1930,7 @@ int camera_dispatcher_get_display_mode(muse_module_h module)
 {
        int ret = CAMERA_ERROR_NONE;
        muse_camera_handle_s *muse_camera = NULL;
-       camera_display_mode_e get_mode = CAMERA_DISPLAY_MODE_LETTER_BOX;
+       camera_display_mode_e get_value = CAMERA_DISPLAY_MODE_LETTER_BOX;
        muse_camera_api_e api = MUSE_CAMERA_API_GET_DISPLAY_MODE;
        muse_camera_api_class_e class = MUSE_CAMERA_API_CLASS_IMMEDIATE;
 
@@ -1788,9 +1938,10 @@ int camera_dispatcher_get_display_mode(muse_module_h module)
 
        LOGD("handle : %p", muse_camera);
 
-       ret = legacy_camera_get_display_mode(muse_camera->camera_handle, &get_mode);
+       ret = legacy_camera_get_display_mode(muse_camera->camera_handle, &get_value);
        if (ret == CAMERA_ERROR_NONE) {
-               muse_camera_msg_return1(api, class, ret, module, INT, get_mode);
+               muse_camera_msg_return1(api, class, ret, module, MUSE_CAMERA_GET_TYPE_INT,
+                       MUSE_CAMERA_GET_INT_DISPLAY_MODE, "get_value", get_value, NULL);
        } else {
                muse_camera_msg_return(api, class, ret, module);
        }
@@ -1804,6 +1955,7 @@ int camera_dispatcher_get_capture_resolution(muse_module_h module)
        muse_camera_handle_s *muse_camera = NULL;
        int get_width = 0;
        int get_height = 0;
+       int get_value = 0;
        muse_camera_api_e api = MUSE_CAMERA_API_GET_CAPTURE_RESOLUTION;
        muse_camera_api_class_e class = MUSE_CAMERA_API_CLASS_IMMEDIATE;
 
@@ -1813,7 +1965,9 @@ int camera_dispatcher_get_capture_resolution(muse_module_h module)
 
        ret = legacy_camera_get_capture_resolution(muse_camera->camera_handle, &get_width, &get_height);
        if (ret == CAMERA_ERROR_NONE) {
-               muse_camera_msg_return2(api, class, ret, module, INT, get_width, INT, get_height);
+               get_value = get_width << 16 | get_height;
+               muse_camera_msg_return1(api, class, ret, module, MUSE_CAMERA_GET_TYPE_INT,
+                       MUSE_CAMERA_GET_INT_CAPTURE_RESOLUTION, "get_value", get_value, NULL);
        } else {
                muse_camera_msg_return(api, class, ret, module);
        }
@@ -1825,7 +1979,7 @@ int camera_dispatcher_get_capture_format(muse_module_h module)
 {
        int ret = CAMERA_ERROR_NONE;
        muse_camera_handle_s *muse_camera = NULL;
-       camera_pixel_format_e get_format = CAMERA_PIXEL_FORMAT_NV12;
+       camera_pixel_format_e get_value = CAMERA_PIXEL_FORMAT_NV12;
        muse_camera_api_e api = MUSE_CAMERA_API_GET_CAPTURE_FORMAT;
        muse_camera_api_class_e class = MUSE_CAMERA_API_CLASS_IMMEDIATE;
 
@@ -1833,9 +1987,10 @@ int camera_dispatcher_get_capture_format(muse_module_h module)
 
        LOGD("handle : %p", muse_camera);
 
-       ret = legacy_camera_get_capture_format(muse_camera->camera_handle, &get_format);
+       ret = legacy_camera_get_capture_format(muse_camera->camera_handle, &get_value);
        if (ret == CAMERA_ERROR_NONE) {
-               muse_camera_msg_return1(api, class, ret, module, INT, get_format);
+               muse_camera_msg_return1(api, class, ret, module, MUSE_CAMERA_GET_TYPE_INT,
+                       MUSE_CAMERA_GET_INT_CAPTURE_FORMAT, "get_value", get_value, NULL);
        } else {
                muse_camera_msg_return(api, class, ret, module);
        }
@@ -1847,7 +2002,7 @@ int camera_dispatcher_get_preview_format(muse_module_h module)
 {
        int ret = CAMERA_ERROR_NONE;
        muse_camera_handle_s *muse_camera = NULL;
-       camera_pixel_format_e get_format = CAMERA_PIXEL_FORMAT_NV12;
+       camera_pixel_format_e get_value = CAMERA_PIXEL_FORMAT_NV12;
        muse_camera_api_e api = MUSE_CAMERA_API_GET_PREVIEW_FORMAT;
        muse_camera_api_class_e class = MUSE_CAMERA_API_CLASS_IMMEDIATE;
 
@@ -1855,9 +2010,10 @@ int camera_dispatcher_get_preview_format(muse_module_h module)
 
        LOGD("handle : %p", muse_camera);
 
-       ret = legacy_camera_get_preview_format(muse_camera->camera_handle, &get_format);
+       ret = legacy_camera_get_preview_format(muse_camera->camera_handle, &get_value);
        if (ret == CAMERA_ERROR_NONE) {
-               muse_camera_msg_return1(api, class, ret, module, INT, get_format);
+               muse_camera_msg_return1(api, class, ret, module, MUSE_CAMERA_GET_TYPE_INT,
+                       MUSE_CAMERA_GET_INT_PREVIEW_FORMAT, "get_value", get_value, NULL);
        } else {
                muse_camera_msg_return(api, class, ret, module);
        }
@@ -1869,7 +2025,7 @@ int camera_dispatcher_get_facing_direction(muse_module_h module)
 {
        int ret = CAMERA_ERROR_NONE;
        muse_camera_handle_s *muse_camera = NULL;
-       camera_facing_direction_e get_facing_direction = CAMERA_FACING_DIRECTION_REAR;
+       camera_facing_direction_e get_value = CAMERA_FACING_DIRECTION_REAR;
        muse_camera_api_e api = MUSE_CAMERA_API_GET_FACING_DIRECTION;
        muse_camera_api_class_e class = MUSE_CAMERA_API_CLASS_IMMEDIATE;
 
@@ -1877,9 +2033,10 @@ int camera_dispatcher_get_facing_direction(muse_module_h module)
 
        LOGD("handle : %p", muse_camera);
 
-       ret = legacy_camera_get_facing_direction(muse_camera->camera_handle, &get_facing_direction);
+       ret = legacy_camera_get_facing_direction(muse_camera->camera_handle, &get_value);
        if (ret == CAMERA_ERROR_NONE) {
-               muse_camera_msg_return1(api, class, ret, module, INT, get_facing_direction);
+               muse_camera_msg_return1(api, class, ret, module, MUSE_CAMERA_GET_TYPE_INT,
+                       MUSE_CAMERA_GET_INT_FACING_DIRECTION, "get_value", get_value, NULL);
        } else {
                muse_camera_msg_return(api, class, ret, module);
        }
@@ -1913,7 +2070,7 @@ int camera_dispatcher_get_flash_state(muse_module_h module)
        if (ret != CAMERA_ERROR_NONE) {
                LOGE("failed to create camera handle 0x%x", ret);
 
-               muse_camera_msg_return1(api, class, ret, module, INT, get_flash_state);
+               muse_camera_msg_return(api, class, ret, module);
 
                return MUSE_CAMERA_ERROR_NONE;
        }
@@ -1929,7 +2086,7 @@ int camera_dispatcher_get_flash_state(muse_module_h module)
                LOGE("count[%d] of supported flash mode is too small, so return NOT_SUPPORTED", count);
 
                ret = CAMERA_ERROR_NOT_SUPPORTED;
-               muse_camera_msg_return1(api, class, ret, module, INT, get_flash_state);
+               muse_camera_msg_return(api, class, ret, module);
 
                return MUSE_CAMERA_ERROR_NONE;
        }
@@ -1939,7 +2096,8 @@ int camera_dispatcher_get_flash_state(muse_module_h module)
 
        LOGD("[%d] flash state : %d", device_type, get_flash_state);
 
-       muse_camera_msg_return1(api, class, ret, module, INT, get_flash_state);
+       muse_camera_msg_return1(api, class, ret, module, MUSE_CAMERA_GET_TYPE_INT,
+                       -1, "get_flash_state", get_flash_state, NULL);
 
        return MUSE_CAMERA_ERROR_NONE;
 }
@@ -2281,6 +2439,7 @@ int camera_dispatcher_get_recommended_preview_resolution(muse_module_h module)
        muse_camera_handle_s *muse_camera = NULL;
        int get_width = 0;
        int get_height = 0;
+       int get_value = 0;
        muse_camera_api_e api = MUSE_CAMERA_API_GET_RECOMMENDED_PREVIEW_RESOLUTION;
        muse_camera_api_class_e class = MUSE_CAMERA_API_CLASS_IMMEDIATE;
 
@@ -2290,7 +2449,9 @@ int camera_dispatcher_get_recommended_preview_resolution(muse_module_h module)
 
        ret = legacy_camera_get_recommended_preview_resolution(muse_camera->camera_handle, &get_width, &get_height);
        if (ret == CAMERA_ERROR_NONE) {
-               muse_camera_msg_return2(api, class, ret, module, INT, get_width, INT, get_height);
+               get_value = get_width << 16 | get_height;
+               muse_camera_msg_return1(api, class, ret, module, MUSE_CAMERA_GET_TYPE_INT,
+                       MUSE_CAMERA_GET_INT_RECOMMENDED_PREVIEW_RESOLUTION, "get_value", get_value, NULL);
        } else {
                muse_camera_msg_return(api, class, ret, module);
        }
@@ -2302,7 +2463,7 @@ int camera_dispatcher_attr_get_lens_orientation(muse_module_h module)
 {
        int ret = CAMERA_ERROR_NONE;
        muse_camera_handle_s *muse_camera = NULL;
-       int get_angle = 0;
+       int get_value = 0;
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_GET_LENS_ORIENTATION;
        muse_camera_api_class_e class = MUSE_CAMERA_API_CLASS_IMMEDIATE;
 
@@ -2310,9 +2471,10 @@ int camera_dispatcher_attr_get_lens_orientation(muse_module_h module)
 
        LOGD("handle : %p", muse_camera);
 
-       ret = legacy_camera_attr_get_lens_orientation(muse_camera->camera_handle, &get_angle);
+       ret = legacy_camera_attr_get_lens_orientation(muse_camera->camera_handle, &get_value);
        if (ret == CAMERA_ERROR_NONE) {
-               muse_camera_msg_return1(api, class, ret, module, INT, get_angle);
+               muse_camera_msg_return1(api, class, ret, module, MUSE_CAMERA_GET_TYPE_INT,
+                       MUSE_CAMERA_GET_INT_LENS_ORIENTATION, "get_value", get_value, NULL);
        } else {
                muse_camera_msg_return(api, class, ret, module);
        }
@@ -2345,7 +2507,7 @@ int camera_dispatcher_attr_get_theater_mode(muse_module_h module)
 {
        int ret = CAMERA_ERROR_NONE;
        muse_camera_handle_s *muse_camera = NULL;
-       camera_attr_theater_mode_e get_mode = CAMERA_ATTR_THEATER_MODE_DISABLE;
+       camera_attr_theater_mode_e get_value = CAMERA_ATTR_THEATER_MODE_DISABLE;
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_GET_THEATER_MODE;
        muse_camera_api_class_e class = MUSE_CAMERA_API_CLASS_IMMEDIATE;
 
@@ -2353,9 +2515,10 @@ int camera_dispatcher_attr_get_theater_mode(muse_module_h module)
 
        LOGD("handle : %p", muse_camera);
 
-       ret = legacy_camera_attr_get_theater_mode(muse_camera->camera_handle, &get_mode);
+       ret = legacy_camera_attr_get_theater_mode(muse_camera->camera_handle, &get_value);
        if (ret == CAMERA_ERROR_NONE) {
-               muse_camera_msg_return1(api, class, ret, module, INT, get_mode);
+               muse_camera_msg_return1(api, class, ret, module, MUSE_CAMERA_GET_TYPE_INT,
+                       MUSE_CAMERA_GET_INT_THEATER_MODE, "get_value", get_value, NULL);
        } else {
                muse_camera_msg_return(api, class, ret, module);
        }
@@ -2430,7 +2593,7 @@ int camera_dispatcher_attr_get_preview_fps(muse_module_h module)
 {
        int ret = CAMERA_ERROR_NONE;
        muse_camera_handle_s *muse_camera = NULL;
-       camera_attr_fps_e get_fps = CAMERA_ATTR_FPS_AUTO;
+       camera_attr_fps_e get_value = CAMERA_ATTR_FPS_AUTO;
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_GET_PREVIEW_FPS;
        muse_camera_api_class_e class = MUSE_CAMERA_API_CLASS_IMMEDIATE;
 
@@ -2438,9 +2601,10 @@ int camera_dispatcher_attr_get_preview_fps(muse_module_h module)
 
        LOGD("handle : %p", muse_camera);
 
-       ret = legacy_camera_attr_get_preview_fps(muse_camera->camera_handle, &get_fps);
+       ret = legacy_camera_attr_get_preview_fps(muse_camera->camera_handle, &get_value);
        if (ret == CAMERA_ERROR_NONE) {
-               muse_camera_msg_return1(api, class, ret, module, INT, get_fps);
+               muse_camera_msg_return1(api, class, ret, module, MUSE_CAMERA_GET_TYPE_INT,
+                       MUSE_CAMERA_GET_INT_PREVIEW_FPS, "get_value", get_value, NULL);
        } else {
                muse_camera_msg_return(api, class, ret, module);
        }
@@ -2452,7 +2616,7 @@ int camera_dispatcher_attr_get_image_quality(muse_module_h module)
 {
        int ret = CAMERA_ERROR_NONE;
        muse_camera_handle_s *muse_camera = NULL;
-       int get_quality = 0;
+       int get_value = 0;
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_GET_IMAGE_QUALITY;
        muse_camera_api_class_e class = MUSE_CAMERA_API_CLASS_IMMEDIATE;
 
@@ -2460,9 +2624,10 @@ int camera_dispatcher_attr_get_image_quality(muse_module_h module)
 
        LOGD("handle : %p", muse_camera);
 
-       ret = legacy_camera_attr_get_image_quality(muse_camera->camera_handle, &get_quality);
+       ret = legacy_camera_attr_get_image_quality(muse_camera->camera_handle, &get_value);
        if (ret == CAMERA_ERROR_NONE) {
-               muse_camera_msg_return1(api, class, ret, module, INT, get_quality);
+               muse_camera_msg_return1(api, class, ret, module, MUSE_CAMERA_GET_TYPE_INT,
+                       MUSE_CAMERA_GET_INT_IMAGE_QUALITY, "get_value", get_value, NULL);
        } else {
                muse_camera_msg_return(api, class, ret, module);
        }
@@ -2920,7 +3085,7 @@ int camera_dispatcher_attr_get_zoom(muse_module_h module)
 {
        int ret = CAMERA_ERROR_NONE;
        muse_camera_handle_s *muse_camera = NULL;
-       int get_zoom = 0;
+       int get_value = 0;
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_GET_ZOOM;
        muse_camera_api_class_e class = MUSE_CAMERA_API_CLASS_IMMEDIATE;
 
@@ -2928,9 +3093,10 @@ int camera_dispatcher_attr_get_zoom(muse_module_h module)
 
        LOGD("handle : %p", muse_camera);
 
-       ret = legacy_camera_attr_get_zoom(muse_camera->camera_handle, &get_zoom);
+       ret = legacy_camera_attr_get_zoom(muse_camera->camera_handle, &get_value);
        if (ret == CAMERA_ERROR_NONE) {
-               muse_camera_msg_return1(api, class, ret, module, INT, get_zoom);
+               muse_camera_msg_return1(api, class, ret, module, MUSE_CAMERA_GET_TYPE_INT,
+                       MUSE_CAMERA_GET_INT_ZOOM, "get_value", get_value, NULL);
        } else {
                muse_camera_msg_return(api, class, ret, module);
        }
@@ -2942,18 +3108,20 @@ int camera_dispatcher_attr_get_zoom_range(muse_module_h module)
 {
        int ret = CAMERA_ERROR_NONE;
        muse_camera_handle_s *muse_camera = NULL;
-       int get_min = 0;
-       int get_max = 0;
+       int get_value0 = 0;
+       int get_value1 = 0;
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_GET_ZOOM_RANGE;
        muse_camera_api_class_e class = MUSE_CAMERA_API_CLASS_IMMEDIATE;
+       muse_camera_get_type_e get_type = MUSE_CAMERA_GET_TYPE_INT_PAIR;
+       muse_camera_get_int_pair_e index = MUSE_CAMERA_GET_INT_PAIR_ZOOM_RANGE;
 
        muse_camera = (muse_camera_handle_s *)muse_core_ipc_get_handle(module);
 
        LOGD("handle : %p", muse_camera);
 
-       ret = legacy_camera_attr_get_zoom_range(muse_camera->camera_handle, &get_min, &get_max);
+       ret = legacy_camera_attr_get_zoom_range(muse_camera->camera_handle, &get_value0, &get_value1);
        if (ret == CAMERA_ERROR_NONE) {
-               muse_camera_msg_return2(api, class, ret, module, INT, get_min, INT, get_max);
+               muse_camera_msg_return2(api, class, ret, module, get_type, index, get_value0, get_value1);
        } else {
                muse_camera_msg_return(api, class, ret, module);
        }
@@ -2965,7 +3133,7 @@ int camera_dispatcher_attr_get_af_mode(muse_module_h module)
 {
        int ret = CAMERA_ERROR_NONE;
        muse_camera_handle_s *muse_camera = NULL;
-       camera_attr_af_mode_e get_mode = CAMERA_ATTR_AF_NONE;
+       camera_attr_af_mode_e get_value = CAMERA_ATTR_AF_NONE;
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_GET_AF_MODE;
        muse_camera_api_class_e class = MUSE_CAMERA_API_CLASS_IMMEDIATE;
 
@@ -2973,9 +3141,10 @@ int camera_dispatcher_attr_get_af_mode(muse_module_h module)
 
        LOGD("handle : %p", muse_camera);
 
-       ret = legacy_camera_attr_get_af_mode(muse_camera->camera_handle, &get_mode);
+       ret = legacy_camera_attr_get_af_mode(muse_camera->camera_handle, &get_value);
        if (ret == CAMERA_ERROR_NONE) {
-               muse_camera_msg_return1(api, class, ret, module, INT, get_mode);
+               muse_camera_msg_return1(api, class, ret, module, MUSE_CAMERA_GET_TYPE_INT,
+                       MUSE_CAMERA_GET_INT_AF_MODE, "get_value", get_value, NULL);
        } else {
                muse_camera_msg_return(api, class, ret, module);
        }
@@ -2987,7 +3156,7 @@ int camera_dispatcher_attr_get_exposure_mode(muse_module_h module)
 {
        int ret = CAMERA_ERROR_NONE;
        muse_camera_handle_s *muse_camera = NULL;
-       camera_attr_exposure_mode_e get_mode = CAMERA_ATTR_EXPOSURE_MODE_OFF;
+       camera_attr_exposure_mode_e get_value = CAMERA_ATTR_EXPOSURE_MODE_OFF;
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_GET_EXPOSURE_MODE;
        muse_camera_api_class_e class = MUSE_CAMERA_API_CLASS_IMMEDIATE;
 
@@ -2995,9 +3164,10 @@ int camera_dispatcher_attr_get_exposure_mode(muse_module_h module)
 
        LOGD("handle : %p", muse_camera);
 
-       ret = legacy_camera_attr_get_exposure_mode(muse_camera->camera_handle, &get_mode);
+       ret = legacy_camera_attr_get_exposure_mode(muse_camera->camera_handle, &get_value);
        if (ret == CAMERA_ERROR_NONE) {
-               muse_camera_msg_return1(api, class, ret, module, INT, get_mode);
+               muse_camera_msg_return1(api, class, ret, module, MUSE_CAMERA_GET_TYPE_INT,
+                       MUSE_CAMERA_GET_INT_EXPOSURE_MODE, "get_value", get_value, NULL);
        } else {
                muse_camera_msg_return(api, class, ret, module);
        }
@@ -3019,7 +3189,8 @@ int camera_dispatcher_attr_get_exposure(muse_module_h module)
 
        ret = legacy_camera_attr_get_exposure(muse_camera->camera_handle, &get_value);
        if (ret == CAMERA_ERROR_NONE) {
-               muse_camera_msg_return1(api, class, ret, module, INT, get_value);
+               muse_camera_msg_return1(api, class, ret, module, MUSE_CAMERA_GET_TYPE_INT,
+                       MUSE_CAMERA_GET_INT_EXPOSURE, "get_value", get_value, NULL);
        } else {
                muse_camera_msg_return(api, class, ret, module);
        }
@@ -3031,18 +3202,20 @@ int camera_dispatcher_attr_get_exposure_range(muse_module_h module)
 {
        int ret = CAMERA_ERROR_NONE;
        muse_camera_handle_s *muse_camera = NULL;
-       int get_min = 0;
-       int get_max = 0;
+       int get_value0 = 0;
+       int get_value1 = 0;
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_GET_EXPOSURE_RANGE;
        muse_camera_api_class_e class = MUSE_CAMERA_API_CLASS_IMMEDIATE;
+       muse_camera_get_type_e get_type = MUSE_CAMERA_GET_TYPE_INT_PAIR;
+       muse_camera_get_int_pair_e index = MUSE_CAMERA_GET_INT_PAIR_EXPOSURE_RANGE;
 
        muse_camera = (muse_camera_handle_s *)muse_core_ipc_get_handle(module);
 
        LOGD("handle : %p", muse_camera);
 
-       ret = legacy_camera_attr_get_exposure_range(muse_camera->camera_handle, &get_min, &get_max);
+       ret = legacy_camera_attr_get_exposure_range(muse_camera->camera_handle, &get_value0, &get_value1);
        if (ret == CAMERA_ERROR_NONE) {
-               muse_camera_msg_return2(api, class, ret, module, INT, get_min, INT, get_max);
+               muse_camera_msg_return2(api, class, ret, module, get_type, index, get_value0, get_value1);
        } else {
                muse_camera_msg_return(api, class, ret, module);
        }
@@ -3054,7 +3227,7 @@ int camera_dispatcher_attr_get_iso(muse_module_h module)
 {
        int ret = CAMERA_ERROR_NONE;
        muse_camera_handle_s *muse_camera = NULL;
-       camera_attr_iso_e get_iso = CAMERA_ATTR_ISO_AUTO;
+       camera_attr_iso_e get_value = CAMERA_ATTR_ISO_AUTO;
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_GET_ISO;
        muse_camera_api_class_e class = MUSE_CAMERA_API_CLASS_IMMEDIATE;
 
@@ -3062,9 +3235,10 @@ int camera_dispatcher_attr_get_iso(muse_module_h module)
 
        LOGD("handle : %p", muse_camera);
 
-       ret = legacy_camera_attr_get_iso(muse_camera->camera_handle, &get_iso);
+       ret = legacy_camera_attr_get_iso(muse_camera->camera_handle, &get_value);
        if (ret == CAMERA_ERROR_NONE) {
-               muse_camera_msg_return1(api, class, ret, module, INT, get_iso);
+               muse_camera_msg_return1(api, class, ret, module, MUSE_CAMERA_GET_TYPE_INT,
+                       MUSE_CAMERA_GET_INT_ISO, "get_value", get_value, NULL);
        } else {
                muse_camera_msg_return(api, class, ret, module);
        }
@@ -3076,7 +3250,7 @@ int camera_dispatcher_attr_get_brightness(muse_module_h module)
 {
        int ret = CAMERA_ERROR_NONE;
        muse_camera_handle_s *muse_camera = NULL;
-       int get_level = 0;
+       int get_value = 0;
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_GET_BRIGHTNESS;
        muse_camera_api_class_e class = MUSE_CAMERA_API_CLASS_IMMEDIATE;
 
@@ -3084,9 +3258,10 @@ int camera_dispatcher_attr_get_brightness(muse_module_h module)
 
        LOGD("handle : %p", muse_camera);
 
-       ret = legacy_camera_attr_get_brightness(muse_camera->camera_handle, &get_level);
+       ret = legacy_camera_attr_get_brightness(muse_camera->camera_handle, &get_value);
        if (ret == CAMERA_ERROR_NONE) {
-               muse_camera_msg_return1(api, class, ret, module, INT, get_level);
+               muse_camera_msg_return1(api, class, ret, module, MUSE_CAMERA_GET_TYPE_INT,
+                       MUSE_CAMERA_GET_INT_BRIGHTNESS, "get_value", get_value, NULL);
        } else {
                muse_camera_msg_return(api, class, ret, module);
        }
@@ -3098,18 +3273,20 @@ int camera_dispatcher_attr_get_brightness_range(muse_module_h module)
 {
        int ret = CAMERA_ERROR_NONE;
        muse_camera_handle_s *muse_camera = NULL;
-       int get_min = 0;
-       int get_max = 0;
+       int get_value0 = 0;
+       int get_value1 = 0;
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_GET_BRIGHTNESS_RANGE;
        muse_camera_api_class_e class = MUSE_CAMERA_API_CLASS_IMMEDIATE;
+       muse_camera_get_type_e get_type = MUSE_CAMERA_GET_TYPE_INT_PAIR;
+       muse_camera_get_int_pair_e index = MUSE_CAMERA_GET_INT_PAIR_BRIGHTNESS_RANGE;
 
        muse_camera = (muse_camera_handle_s *)muse_core_ipc_get_handle(module);
 
        LOGD("handle : %p", muse_camera);
 
-       ret = legacy_camera_attr_get_brightness_range(muse_camera->camera_handle, &get_min, &get_max);
+       ret = legacy_camera_attr_get_brightness_range(muse_camera->camera_handle, &get_value0, &get_value1);
        if (ret == CAMERA_ERROR_NONE) {
-               muse_camera_msg_return2(api, class, ret, module, INT, get_min, INT, get_max);
+               muse_camera_msg_return2(api, class, ret, module, get_type, index, get_value0, get_value1);
        } else {
                muse_camera_msg_return(api, class, ret, module);
        }
@@ -3121,7 +3298,7 @@ int camera_dispatcher_attr_get_contrast(muse_module_h module)
 {
        int ret = CAMERA_ERROR_NONE;
        muse_camera_handle_s *muse_camera = NULL;
-       int get_level = 0;
+       int get_value = 0;
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_GET_CONTRAST;
        muse_camera_api_class_e class = MUSE_CAMERA_API_CLASS_IMMEDIATE;
 
@@ -3129,9 +3306,10 @@ int camera_dispatcher_attr_get_contrast(muse_module_h module)
 
        LOGD("handle : %p", muse_camera);
 
-       ret = legacy_camera_attr_get_contrast(muse_camera->camera_handle, &get_level);
+       ret = legacy_camera_attr_get_contrast(muse_camera->camera_handle, &get_value);
        if (ret == CAMERA_ERROR_NONE) {
-               muse_camera_msg_return1(api, class, ret, module, INT, get_level);
+               muse_camera_msg_return1(api, class, ret, module, MUSE_CAMERA_GET_TYPE_INT,
+                       MUSE_CAMERA_GET_INT_CONTRAST, "get_value", get_value, NULL);
        } else {
                muse_camera_msg_return(api, class, ret, module);
        }
@@ -3143,18 +3321,20 @@ int camera_dispatcher_attr_get_contrast_range(muse_module_h module)
 {
        int ret = CAMERA_ERROR_NONE;
        muse_camera_handle_s *muse_camera = NULL;
-       int get_min = 0;
-       int get_max = 0;
+       int get_value0 = 0;
+       int get_value1 = 0;
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_GET_CONTRAST_RANGE;
        muse_camera_api_class_e class = MUSE_CAMERA_API_CLASS_IMMEDIATE;
+       muse_camera_get_type_e get_type = MUSE_CAMERA_GET_TYPE_INT_PAIR;
+       muse_camera_get_int_pair_e index = MUSE_CAMERA_GET_INT_PAIR_CONTRAST_RANGE;
 
        muse_camera = (muse_camera_handle_s *)muse_core_ipc_get_handle(module);
 
        LOGD("handle : %p", muse_camera);
 
-       ret = legacy_camera_attr_get_contrast_range(muse_camera->camera_handle, &get_min, &get_max);
+       ret = legacy_camera_attr_get_contrast_range(muse_camera->camera_handle, &get_value0, &get_value1);
        if (ret == CAMERA_ERROR_NONE) {
-               muse_camera_msg_return2(api, class, ret, module, INT, get_min, INT, get_max);
+               muse_camera_msg_return2(api, class, ret, module, get_type, index, get_value0, get_value1);
        } else {
                muse_camera_msg_return(api, class, ret, module);
        }
@@ -3166,7 +3346,7 @@ int camera_dispatcher_attr_get_whitebalance(muse_module_h module)
 {
        int ret = CAMERA_ERROR_NONE;
        muse_camera_handle_s *muse_camera = NULL;
-       camera_attr_whitebalance_e get_wb = CAMERA_ATTR_WHITE_BALANCE_NONE;
+       camera_attr_whitebalance_e get_value = CAMERA_ATTR_WHITE_BALANCE_NONE;
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_GET_WHITEBALANCE;
        muse_camera_api_class_e class = MUSE_CAMERA_API_CLASS_IMMEDIATE;
 
@@ -3174,9 +3354,10 @@ int camera_dispatcher_attr_get_whitebalance(muse_module_h module)
 
        LOGD("handle : %p", muse_camera);
 
-       ret = legacy_camera_attr_get_whitebalance(muse_camera->camera_handle, &get_wb);
+       ret = legacy_camera_attr_get_whitebalance(muse_camera->camera_handle, &get_value);
        if (ret == CAMERA_ERROR_NONE) {
-               muse_camera_msg_return1(api, class, ret, module, INT, get_wb);
+               muse_camera_msg_return1(api, class, ret, module, MUSE_CAMERA_GET_TYPE_INT,
+                       MUSE_CAMERA_GET_INT_WHITE_BALANCE, "get_value", get_value, NULL);
        } else {
                muse_camera_msg_return(api, class, ret, module);
        }
@@ -3188,7 +3369,7 @@ int camera_dispatcher_attr_get_effect(muse_module_h module)
 {
        int ret = CAMERA_ERROR_NONE;
        muse_camera_handle_s *muse_camera = NULL;
-       camera_attr_effect_mode_e get_effect = CAMERA_ATTR_EFFECT_NONE;
+       camera_attr_effect_mode_e get_value = CAMERA_ATTR_EFFECT_NONE;
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_GET_EFFECT;
        muse_camera_api_class_e class = MUSE_CAMERA_API_CLASS_IMMEDIATE;
 
@@ -3196,9 +3377,10 @@ int camera_dispatcher_attr_get_effect(muse_module_h module)
 
        LOGD("handle : %p", muse_camera);
 
-       ret = legacy_camera_attr_get_effect(muse_camera->camera_handle, &get_effect);
+       ret = legacy_camera_attr_get_effect(muse_camera->camera_handle, &get_value);
        if (ret == CAMERA_ERROR_NONE) {
-               muse_camera_msg_return1(api, class, ret, module, INT, get_effect);
+               muse_camera_msg_return1(api, class, ret, module, MUSE_CAMERA_GET_TYPE_INT,
+                       MUSE_CAMERA_GET_INT_EFFECT, "get_value", get_value, NULL);
        } else {
                muse_camera_msg_return(api, class, ret, module);
        }
@@ -3210,7 +3392,7 @@ int camera_dispatcher_attr_get_scene_mode(muse_module_h module)
 {
        int ret = CAMERA_ERROR_NONE;
        muse_camera_handle_s *muse_camera = NULL;
-       camera_attr_scene_mode_e get_mode = CAMERA_ATTR_SCENE_MODE_NORMAL;
+       camera_attr_scene_mode_e get_value = CAMERA_ATTR_SCENE_MODE_NORMAL;
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_GET_SCENE_MODE;
        muse_camera_api_class_e class = MUSE_CAMERA_API_CLASS_IMMEDIATE;
 
@@ -3218,9 +3400,10 @@ int camera_dispatcher_attr_get_scene_mode(muse_module_h module)
 
        LOGD("handle : %p", muse_camera);
 
-       ret = legacy_camera_attr_get_scene_mode(muse_camera->camera_handle, &get_mode);
+       ret = legacy_camera_attr_get_scene_mode(muse_camera->camera_handle, &get_value);
        if (ret == CAMERA_ERROR_NONE) {
-               muse_camera_msg_return1(api, class, ret, module, INT, get_mode);
+               muse_camera_msg_return1(api, class, ret, module, MUSE_CAMERA_GET_TYPE_INT,
+                       MUSE_CAMERA_GET_INT_SCENE_MODE, "get_value", get_value, NULL);
        } else {
                muse_camera_msg_return(api, class, ret, module);
        }
@@ -3232,7 +3415,7 @@ int camera_dispatcher_attr_is_enabled_tag(muse_module_h module)
 {
        int ret = CAMERA_ERROR_NONE;
        muse_camera_handle_s *muse_camera = NULL;
-       bool get_enabled = false;
+       bool get_value = false;
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_IS_ENABLED_TAG;
        muse_camera_api_class_e class = MUSE_CAMERA_API_CLASS_IMMEDIATE;
 
@@ -3240,9 +3423,10 @@ int camera_dispatcher_attr_is_enabled_tag(muse_module_h module)
 
        LOGD("handle : %p", muse_camera);
 
-       ret = legacy_camera_attr_is_enabled_tag(muse_camera->camera_handle, &get_enabled);
+       ret = legacy_camera_attr_is_enabled_tag(muse_camera->camera_handle, &get_value);
        if (ret == CAMERA_ERROR_NONE) {
-               muse_camera_msg_return1(api, class, ret, module, INT, get_enabled);
+               muse_camera_msg_return1(api, class, ret, module, MUSE_CAMERA_GET_TYPE_INT,
+                       MUSE_CAMERA_GET_INT_ENABLED_TAG, "get_value", get_value, NULL);
        } else {
                muse_camera_msg_return(api, class, ret, module);
        }
@@ -3256,21 +3440,22 @@ int camera_dispatcher_attr_get_tag_image_description(muse_module_h module)
        muse_camera_handle_s *muse_camera = NULL;
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_GET_TAG_IMAGE_DESCRIPTION;
        muse_camera_api_class_e class = MUSE_CAMERA_API_CLASS_IMMEDIATE;
-       char *get_description = NULL;
+       char *get_value = NULL;
 
        muse_camera = (muse_camera_handle_s *)muse_core_ipc_get_handle(module);
 
-       ret = legacy_camera_attr_get_tag_image_description(muse_camera->camera_handle, &get_description);
+       ret = legacy_camera_attr_get_tag_image_description(muse_camera->camera_handle, &get_value);
        if (ret == CAMERA_ERROR_NONE) {
-               LOGD("get_description : %s", muse_camera, get_description);
-               muse_camera_msg_return1(api, class, ret, module, STRING, get_description);
+               LOGD("get_description : %s", muse_camera, get_value);
+               muse_camera_msg_return1(api, class, ret, module, MUSE_CAMERA_GET_TYPE_STRING,
+                       MUSE_CAMERA_GET_STRING_TAG_IMAGE_DESCRIPTION, "get_value", 0, get_value);
        } else {
                muse_camera_msg_return(api, class, ret, module);
        }
 
-       if (get_description) {
-               free(get_description);
-               get_description = NULL;
+       if (get_value) {
+               free(get_value);
+               get_value = NULL;
        }
 
        return MUSE_CAMERA_ERROR_NONE;
@@ -3280,7 +3465,7 @@ int camera_dispatcher_attr_get_tag_orientation(muse_module_h module)
 {
        int ret = CAMERA_ERROR_NONE;
        muse_camera_handle_s *muse_camera = NULL;
-       camera_attr_tag_orientation_e get_orientation = CAMERA_ATTR_TAG_ORIENTATION_TOP_LEFT;
+       camera_attr_tag_orientation_e get_value = CAMERA_ATTR_TAG_ORIENTATION_TOP_LEFT;
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_GET_TAG_ORIENTATION;
        muse_camera_api_class_e class = MUSE_CAMERA_API_CLASS_IMMEDIATE;
 
@@ -3288,9 +3473,10 @@ int camera_dispatcher_attr_get_tag_orientation(muse_module_h module)
 
        LOGD("handle : %p", muse_camera);
 
-       ret = legacy_camera_attr_get_tag_orientation(muse_camera->camera_handle, &get_orientation);
+       ret = legacy_camera_attr_get_tag_orientation(muse_camera->camera_handle, &get_value);
        if (ret == CAMERA_ERROR_NONE) {
-               muse_camera_msg_return1(api, class, ret, module, INT, get_orientation);
+               muse_camera_msg_return1(api, class, ret, module, MUSE_CAMERA_GET_TYPE_INT,
+                       MUSE_CAMERA_GET_INT_TAG_ORIENTATION, "get_value", get_value, NULL);
        } else {
                muse_camera_msg_return(api, class, ret, module);
        }
@@ -3304,21 +3490,22 @@ int camera_dispatcher_attr_get_tag_software(muse_module_h module)
        muse_camera_handle_s *muse_camera = NULL;
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_GET_TAG_SOFTWARE;
        muse_camera_api_class_e class = MUSE_CAMERA_API_CLASS_IMMEDIATE;
-       char *get_software = NULL;
+       char *get_value = NULL;
 
        muse_camera = (muse_camera_handle_s *)muse_core_ipc_get_handle(module);
 
-       ret = legacy_camera_attr_get_tag_software(muse_camera->camera_handle, &get_software);
+       ret = legacy_camera_attr_get_tag_software(muse_camera->camera_handle, &get_value);
        if (ret == CAMERA_ERROR_NONE) {
-               LOGD("get_software : %s", get_software);
-               muse_camera_msg_return1(api, class, ret, module, STRING, get_software);
+               LOGD("get_software : %s", get_value);
+               muse_camera_msg_return1(api, class, ret, module, MUSE_CAMERA_GET_TYPE_STRING,
+                       MUSE_CAMERA_GET_STRING_TAG_SOFTWARE, "get_value", 0, get_value);
        } else {
                muse_camera_msg_return(api, class, ret, module);
        }
 
-       if (get_software) {
-               free(get_software);
-               get_software = NULL;
+       if (get_value) {
+               free(get_value);
+               get_value = NULL;
        }
 
        return MUSE_CAMERA_ERROR_NONE;
@@ -3330,15 +3517,26 @@ int camera_dispatcher_attr_get_geotag(muse_module_h module)
        muse_camera_handle_s *muse_camera = NULL;
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_GET_GEOTAG;
        muse_camera_api_class_e class = MUSE_CAMERA_API_CLASS_IMMEDIATE;
-       double get_geotag[3] = {0.0, 0.0, 0.0};
+       double get_value[3] = {0.0, 0.0, 0.0};
+       char *send_msg = NULL;
+       int msg_array_size = 0;
 
        muse_camera = (muse_camera_handle_s *)muse_core_ipc_get_handle(module);
 
        LOGD("handle : %p", muse_camera);
 
-       ret = legacy_camera_attr_get_geotag(muse_camera->camera_handle, &get_geotag[0], &get_geotag[1], &get_geotag[2]);
+       ret = legacy_camera_attr_get_geotag(muse_camera->camera_handle, &get_value[0], &get_value[1], &get_value[2]);
        if (ret == CAMERA_ERROR_NONE) {
-               muse_camera_msg_return_array(api, class, ret, module, get_geotag, sizeof(get_geotag), sizeof(double));
+               msg_array_size = sizeof(get_value) / sizeof(int) + (sizeof(get_value) % sizeof(int) ? 1 : 0);
+
+               send_msg = muse_core_msg_json_factory_new(api,
+                       MUSE_TYPE_INT, PARAM_API_CLASS, class,
+                       MUSE_TYPE_INT, PARAM_RET, ret,
+                       MUSE_TYPE_INT, PARAM_GET_TYPE, MUSE_CAMERA_GET_TYPE_ARRAY,
+                       MUSE_TYPE_ARRAY, "get_value", msg_array_size, get_value,
+                       0);
+
+               __camera_dispatcher_send_msg(module, send_msg);
        } else {
                muse_camera_msg_return(api, class, ret, module);
        }
@@ -3350,7 +3548,7 @@ int camera_dispatcher_attr_get_flash_mode(muse_module_h module)
 {
        int ret = CAMERA_ERROR_NONE;
        muse_camera_handle_s *muse_camera = NULL;
-       camera_attr_flash_mode_e get_mode = CAMERA_ATTR_FLASH_MODE_OFF;
+       camera_attr_flash_mode_e get_value = CAMERA_ATTR_FLASH_MODE_OFF;
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_GET_FLASH_MODE;
        muse_camera_api_class_e class = MUSE_CAMERA_API_CLASS_IMMEDIATE;
 
@@ -3358,9 +3556,10 @@ int camera_dispatcher_attr_get_flash_mode(muse_module_h module)
 
        LOGD("handle : %p", muse_camera);
 
-       ret = legacy_camera_attr_get_flash_mode(muse_camera->camera_handle, &get_mode);
+       ret = legacy_camera_attr_get_flash_mode(muse_camera->camera_handle, &get_value);
        if (ret == CAMERA_ERROR_NONE) {
-               muse_camera_msg_return1(api, class, ret, module, INT, get_mode);
+               muse_camera_msg_return1(api, class, ret, module, MUSE_CAMERA_GET_TYPE_INT,
+                       MUSE_CAMERA_GET_INT_FLASH_MODE, "get_value", get_value, NULL);
        } else {
                muse_camera_msg_return(api, class, ret, module);
        }
@@ -3648,15 +3847,16 @@ int camera_dispatcher_attr_get_stream_rotation(muse_module_h module)
        muse_camera_handle_s *muse_camera = NULL;
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_GET_STREAM_ROTATION;
        muse_camera_api_class_e class = MUSE_CAMERA_API_CLASS_IMMEDIATE;
-       camera_rotation_e get_rotation = CAMERA_ROTATION_NONE;
+       camera_rotation_e get_value = CAMERA_ROTATION_NONE;
 
        muse_camera = (muse_camera_handle_s *)muse_core_ipc_get_handle(module);
 
        LOGD("handle : %p", muse_camera);
 
-       ret = legacy_camera_attr_get_stream_rotation(muse_camera->camera_handle, &get_rotation);
+       ret = legacy_camera_attr_get_stream_rotation(muse_camera->camera_handle, &get_value);
        if (ret == CAMERA_ERROR_NONE) {
-               muse_camera_msg_return1(api, class, ret, module, INT, get_rotation);
+               muse_camera_msg_return1(api, class, ret, module, MUSE_CAMERA_GET_TYPE_INT,
+                       MUSE_CAMERA_GET_INT_STREAM_ROTATION, "get_value", get_value, NULL);
        } else {
                muse_camera_msg_return(api, class, ret, module);
        }
@@ -3693,15 +3893,16 @@ int camera_dispatcher_attr_get_stream_flip(muse_module_h module)
        muse_camera_handle_s *muse_camera = NULL;
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_GET_STREAM_FLIP;
        muse_camera_api_class_e class = MUSE_CAMERA_API_CLASS_IMMEDIATE;
-       camera_flip_e get_flip = CAMERA_FLIP_NONE;
+       camera_flip_e get_value = CAMERA_FLIP_NONE;
 
        muse_camera = (muse_camera_handle_s *)muse_core_ipc_get_handle(module);
 
        LOGD("handle : %p", muse_camera);
 
-       ret = legacy_camera_attr_get_stream_flip(muse_camera->camera_handle, &get_flip);
+       ret = legacy_camera_attr_get_stream_flip(muse_camera->camera_handle, &get_value);
        if (ret == CAMERA_ERROR_NONE) {
-               muse_camera_msg_return1(api, class, ret, module, INT, get_flip);
+               muse_camera_msg_return1(api, class, ret, module, MUSE_CAMERA_GET_TYPE_INT,
+                       MUSE_CAMERA_GET_INT_STREAM_FLIP, "get_value", get_value, NULL);
        } else {
                muse_camera_msg_return(api, class, ret, module);
        }
@@ -3738,15 +3939,16 @@ int camera_dispatcher_attr_get_hdr_mode(muse_module_h module)
        muse_camera_handle_s *muse_camera = NULL;
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_GET_HDR_MODE;
        muse_camera_api_class_e class = MUSE_CAMERA_API_CLASS_IMMEDIATE;
-       camera_attr_hdr_mode_e get_mode = CAMERA_ATTR_HDR_MODE_DISABLE;
+       camera_attr_hdr_mode_e get_value = CAMERA_ATTR_HDR_MODE_DISABLE;
 
        muse_camera = (muse_camera_handle_s *)muse_core_ipc_get_handle(module);
 
        LOGD("handle : %p", muse_camera);
 
-       ret = legacy_camera_attr_get_hdr_mode(muse_camera->camera_handle, &get_mode);
+       ret = legacy_camera_attr_get_hdr_mode(muse_camera->camera_handle, &get_value);
        if (ret == CAMERA_ERROR_NONE) {
-               muse_camera_msg_return1(api, class, ret, module, INT, get_mode);
+               muse_camera_msg_return1(api, class, ret, module, MUSE_CAMERA_GET_TYPE_INT,
+                       MUSE_CAMERA_GET_INT_HDR_MODE, "get_value", get_value, NULL);
        } else {
                muse_camera_msg_return(api, class, ret, module);
        }
@@ -3845,15 +4047,16 @@ int camera_dispatcher_attr_is_enabled_anti_shake(muse_module_h module)
        muse_camera_handle_s *muse_camera = NULL;
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_IS_ENABLED_ANTI_SHAKE;
        muse_camera_api_class_e class = MUSE_CAMERA_API_CLASS_IMMEDIATE;
-       bool get_enabled = false;
+       bool get_value = false;
 
        muse_camera = (muse_camera_handle_s *)muse_core_ipc_get_handle(module);
 
        LOGD("handle : %p", muse_camera);
 
-       ret = legacy_camera_attr_is_enabled_anti_shake(muse_camera->camera_handle, &get_enabled);
+       ret = legacy_camera_attr_is_enabled_anti_shake(muse_camera->camera_handle, &get_value);
        if (ret == CAMERA_ERROR_NONE) {
-               muse_camera_msg_return1(api, class, ret, module, INT, get_enabled);
+               muse_camera_msg_return1(api, class, ret, module, MUSE_CAMERA_GET_TYPE_INT,
+                       MUSE_CAMERA_GET_INT_ENABLED_ANTI_SHAKE, "get_value", get_value, NULL);
        } else {
                muse_camera_msg_return(api, class, ret, module);
        }
@@ -3910,15 +4113,16 @@ int camera_dispatcher_attr_is_enabled_video_stabilization(muse_module_h module)
        muse_camera_handle_s *muse_camera = NULL;
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_IS_ENABLED_VIDEO_STABILIZATION;
        muse_camera_api_class_e class = MUSE_CAMERA_API_CLASS_IMMEDIATE;
-       bool get_enabled = false;
+       bool get_value = false;
 
        muse_camera = (muse_camera_handle_s *)muse_core_ipc_get_handle(module);
 
        LOGD("handle : %p", muse_camera);
 
-       ret = legacy_camera_attr_is_enabled_video_stabilization(muse_camera->camera_handle, &get_enabled);
+       ret = legacy_camera_attr_is_enabled_video_stabilization(muse_camera->camera_handle, &get_value);
        if (ret == CAMERA_ERROR_NONE) {
-               muse_camera_msg_return1(api, class, ret, module, INT, get_enabled);
+               muse_camera_msg_return1(api, class, ret, module, MUSE_CAMERA_GET_TYPE_INT,
+                       MUSE_CAMERA_GET_INT_ENABLED_VIDEO_STABILIZATION, "get_value", get_value, NULL);
        } else {
                muse_camera_msg_return(api, class, ret, module);
        }
@@ -3975,15 +4179,16 @@ int camera_dispatcher_attr_is_enabled_auto_contrast(muse_module_h module)
        muse_camera_handle_s *muse_camera = NULL;
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_IS_ENABLED_AUTO_CONTRAST;
        muse_camera_api_class_e class = MUSE_CAMERA_API_CLASS_IMMEDIATE;
-       bool get_enabled = false;
+       bool get_value = false;
 
        muse_camera = (muse_camera_handle_s *)muse_core_ipc_get_handle(module);
 
        LOGD("handle : %p", muse_camera);
 
-       ret = legacy_camera_attr_is_enabled_auto_contrast(muse_camera->camera_handle, &get_enabled);
+       ret = legacy_camera_attr_is_enabled_auto_contrast(muse_camera->camera_handle, &get_value);
        if (ret == CAMERA_ERROR_NONE) {
-               muse_camera_msg_return1(api, class, ret, module, INT, get_enabled);
+               muse_camera_msg_return1(api, class, ret, module, MUSE_CAMERA_GET_TYPE_INT,
+                       MUSE_CAMERA_GET_INT_ENABLED_AUTO_CONTRAST, "get_value", get_value, NULL);
        } else {
                muse_camera_msg_return(api, class, ret, module);
        }
@@ -4038,7 +4243,7 @@ int camera_dispatcher_attr_get_encoded_preview_bitrate(muse_module_h module)
 {
        int ret = CAMERA_ERROR_NONE;
        muse_camera_handle_s *muse_camera = NULL;
-       int get_bitrate;
+       int get_value = 0;
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_GET_ENCODED_PREVIEW_BITRATE;
        muse_camera_api_class_e class = MUSE_CAMERA_API_CLASS_IMMEDIATE;
 
@@ -4046,9 +4251,10 @@ int camera_dispatcher_attr_get_encoded_preview_bitrate(muse_module_h module)
 
        LOGD("handle : %p", muse_camera);
 
-       ret = legacy_camera_attr_get_encoded_preview_bitrate(muse_camera->camera_handle, &get_bitrate);
+       ret = legacy_camera_attr_get_encoded_preview_bitrate(muse_camera->camera_handle, &get_value);
        if (ret == CAMERA_ERROR_NONE) {
-               muse_camera_msg_return1(api, class, ret, module, INT, get_bitrate);
+               muse_camera_msg_return1(api, class, ret, module, MUSE_CAMERA_GET_TYPE_INT,
+                       MUSE_CAMERA_GET_INT_ENCODED_PREVIEW_BITRATE, "get_value", get_value, NULL);
        } else {
                muse_camera_msg_return(api, class, ret, module);
        }
@@ -4083,7 +4289,7 @@ int camera_dispatcher_attr_get_encoded_preview_gop_interval(muse_module_h module
 {
        int ret = CAMERA_ERROR_NONE;
        muse_camera_handle_s *muse_camera = NULL;
-       int get_gop_interval;
+       int get_value;
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_GET_ENCODED_PREVIEW_GOP_INTERVAL;
        muse_camera_api_class_e class = MUSE_CAMERA_API_CLASS_IMMEDIATE;
 
@@ -4091,9 +4297,10 @@ int camera_dispatcher_attr_get_encoded_preview_gop_interval(muse_module_h module
 
        LOGD("handle : %p", muse_camera);
 
-       ret = legacy_camera_attr_get_encoded_preview_gop_interval(muse_camera->camera_handle, &get_gop_interval);
+       ret = legacy_camera_attr_get_encoded_preview_gop_interval(muse_camera->camera_handle, &get_value);
        if (ret == CAMERA_ERROR_NONE) {
-               muse_camera_msg_return1(api, class, ret, module, INT, get_gop_interval);
+               muse_camera_msg_return1(api, class, ret, module, MUSE_CAMERA_GET_TYPE_INT,
+                       MUSE_CAMERA_GET_INT_ENCODED_PREVIEW_GOP_INTERVAL, "get_value", get_value, NULL);
        } else {
                muse_camera_msg_return(api, class, ret, module);
        }
@@ -4156,7 +4363,7 @@ int camera_dispatcher_attr_get_pan(muse_module_h module)
 {
        int ret = CAMERA_ERROR_NONE;
        muse_camera_handle_s *muse_camera = NULL;
-       int get_pan_step = 0;
+       int get_value = 0;
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_GET_PAN;
        muse_camera_api_class_e class = MUSE_CAMERA_API_CLASS_IMMEDIATE;
 
@@ -4164,9 +4371,10 @@ int camera_dispatcher_attr_get_pan(muse_module_h module)
 
        LOGD("handle : %p", muse_camera);
 
-       ret = legacy_camera_attr_get_pan(muse_camera->camera_handle, &get_pan_step);
+       ret = legacy_camera_attr_get_pan(muse_camera->camera_handle, &get_value);
        if (ret == CAMERA_ERROR_NONE) {
-               muse_camera_msg_return1(api, class, ret, module, INT, get_pan_step);
+               muse_camera_msg_return1(api, class, ret, module, MUSE_CAMERA_GET_TYPE_INT,
+                       MUSE_CAMERA_GET_INT_PAN, "get_value", get_value, NULL);
        } else {
                muse_camera_msg_return(api, class, ret, module);
        }
@@ -4178,18 +4386,20 @@ int camera_dispatcher_attr_get_pan_range(muse_module_h module)
 {
        int ret = CAMERA_ERROR_NONE;
        muse_camera_handle_s *muse_camera = NULL;
-       int get_min = 0;
-       int get_max = 0;
+       int get_value0 = 0;
+       int get_value1 = 0;
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_GET_PAN_RANGE;
        muse_camera_api_class_e class = MUSE_CAMERA_API_CLASS_IMMEDIATE;
+       muse_camera_get_type_e get_type = MUSE_CAMERA_GET_TYPE_INT_PAIR;
+       muse_camera_get_int_pair_e index = MUSE_CAMERA_GET_INT_PAIR_PAN_RANGE;
 
        muse_camera = (muse_camera_handle_s *)muse_core_ipc_get_handle(module);
 
        LOGD("handle : %p", muse_camera);
 
-       ret = legacy_camera_attr_get_pan_range(muse_camera->camera_handle, &get_min, &get_max);
+       ret = legacy_camera_attr_get_pan_range(muse_camera->camera_handle, &get_value0, &get_value1);
        if (ret == CAMERA_ERROR_NONE) {
-               muse_camera_msg_return2(api, class, ret, module, INT, get_min, INT, get_max);
+               muse_camera_msg_return2(api, class, ret, module, get_type, index, get_value0, get_value1);
        } else {
                muse_camera_msg_return(api, class, ret, module);
        }
@@ -4229,7 +4439,7 @@ int camera_dispatcher_attr_get_tilt(muse_module_h module)
 {
        int ret = CAMERA_ERROR_NONE;
        muse_camera_handle_s *muse_camera = NULL;
-       int get_tilt_step = 0;
+       int get_value = 0;
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_GET_TILT;
        muse_camera_api_class_e class = MUSE_CAMERA_API_CLASS_IMMEDIATE;
 
@@ -4237,9 +4447,10 @@ int camera_dispatcher_attr_get_tilt(muse_module_h module)
 
        LOGD("handle : %p", muse_camera);
 
-       ret = legacy_camera_attr_get_tilt(muse_camera->camera_handle, &get_tilt_step);
+       ret = legacy_camera_attr_get_tilt(muse_camera->camera_handle, &get_value);
        if (ret == CAMERA_ERROR_NONE) {
-               muse_camera_msg_return1(api, class, ret, module, INT, get_tilt_step);
+               muse_camera_msg_return1(api, class, ret, module, MUSE_CAMERA_GET_TYPE_INT,
+                       MUSE_CAMERA_GET_INT_TILT, "get_value", get_value, NULL);
        } else {
                muse_camera_msg_return(api, class, ret, module);
        }
@@ -4251,18 +4462,20 @@ int camera_dispatcher_attr_get_tilt_range(muse_module_h module)
 {
        int ret = CAMERA_ERROR_NONE;
        muse_camera_handle_s *muse_camera = NULL;
-       int get_min = 0;
-       int get_max = 0;
+       int get_value0 = 0;
+       int get_value1 = 0;
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_GET_TILT_RANGE;
        muse_camera_api_class_e class = MUSE_CAMERA_API_CLASS_IMMEDIATE;
+       muse_camera_get_type_e get_type = MUSE_CAMERA_GET_TYPE_INT_PAIR;
+       muse_camera_get_int_pair_e index = MUSE_CAMERA_GET_INT_PAIR_TILT_RANGE;
 
        muse_camera = (muse_camera_handle_s *)muse_core_ipc_get_handle(module);
 
        LOGD("handle : %p", muse_camera);
 
-       ret = legacy_camera_attr_get_tilt_range(muse_camera->camera_handle, &get_min, &get_max);
+       ret = legacy_camera_attr_get_tilt_range(muse_camera->camera_handle, &get_value0, &get_value1);
        if (ret == CAMERA_ERROR_NONE) {
-               muse_camera_msg_return2(api, class, ret, module, INT, get_min, INT, get_max);
+               muse_camera_msg_return2(api, class, ret, module, get_type, index, get_value0, get_value1);
        } else {
                muse_camera_msg_return(api, class, ret, module);
        }
@@ -4343,17 +4556,25 @@ int camera_dispatcher_attr_get_display_roi_area(muse_module_h module)
 {
        int ret = CAMERA_ERROR_NONE;
        muse_camera_handle_s *muse_camera = NULL;
-       int get_display_roi_area[4] = {0,};
+       int get_value[4] = {0,};
        muse_camera_api_e api = MUSE_CAMERA_API_GET_DISPLAY_ROI_AREA;
        muse_camera_api_class_e class = MUSE_CAMERA_API_CLASS_IMMEDIATE;
+       char *send_msg = NULL;
 
        muse_camera = (muse_camera_handle_s *)muse_core_ipc_get_handle(module);
 
        LOGD("handle : %p", muse_camera);
 
-       ret = legacy_camera_attr_get_display_roi_area(muse_camera->camera_handle, get_display_roi_area);
+       ret = legacy_camera_attr_get_display_roi_area(muse_camera->camera_handle, get_value);
        if (ret == CAMERA_ERROR_NONE) {
-               muse_camera_msg_return_array(api, class, ret, module, get_display_roi_area, sizeof(get_display_roi_area), sizeof(int));
+               send_msg = muse_core_msg_json_factory_new(api,
+                       MUSE_TYPE_INT, PARAM_API_CLASS, class,
+                       MUSE_TYPE_INT, PARAM_RET, ret,
+                       MUSE_TYPE_INT, PARAM_GET_TYPE, MUSE_CAMERA_GET_TYPE_ARRAY,
+                       MUSE_TYPE_ARRAY, "get_value", 4, get_value,
+                       0);
+
+               __camera_dispatcher_send_msg(module, send_msg);
        } else {
                muse_camera_msg_return(api, class, ret, module);
        }
@@ -4427,17 +4648,18 @@ int camera_dispatcher_set_display_reuse_hint(muse_module_h module)
 int camera_dispatcher_get_display_reuse_hint(muse_module_h module)
 {
        int ret = CAMERA_ERROR_NONE;
-       int get_hint = 0;
+       int get_value = 0;
        muse_camera_handle_s *muse_camera = NULL;
        muse_camera_api_e api = MUSE_CAMERA_API_GET_DISPLAY_REUSE_HINT;
        muse_camera_api_class_e class = MUSE_CAMERA_API_CLASS_IMMEDIATE;
 
        muse_camera = (muse_camera_handle_s *)muse_core_ipc_get_handle(module);
 
-       ret = legacy_camera_get_display_reuse_hint(muse_camera->camera_handle, &get_hint);
+       ret = legacy_camera_get_display_reuse_hint(muse_camera->camera_handle, &get_value);
        if (ret == CAMERA_ERROR_NONE) {
-               LOGD("get hint : %d", get_hint);
-               muse_camera_msg_return1(api, class, ret, module, INT, get_hint);
+               LOGD("hint : %d", get_value);
+               muse_camera_msg_return1(api, class, ret, module, MUSE_CAMERA_GET_TYPE_INT,
+                       MUSE_CAMERA_GET_INT_DISPLAY_REUSE_HINT, "get_value", get_value, NULL);
        } else {
                muse_camera_msg_return(api, class, ret, module);
        }
@@ -4483,7 +4705,8 @@ int camera_dispatcher_get_device_state(muse_module_h module)
 
        LOGD("device[%d] state : %d", device_type, get_device_state);
 
-       muse_camera_msg_return1(api, class, ret, module, INT, get_device_state);
+       muse_camera_msg_return1(api, class, ret, module, MUSE_CAMERA_GET_TYPE_INT,
+                       -1, "get_device_state", get_device_state, NULL);
 
        return MUSE_CAMERA_ERROR_NONE;
 }
index ff1b6ef..1277f04 100644 (file)
@@ -1,6 +1,6 @@
 Name:       mmsvc-camera
 Summary:    A Camera module for muse server
-Version:    0.2.54
+Version:    0.2.55
 Release:    0
 Group:      Multimedia/Libraries
 License:    Apache-2.0