From 019231d23707c7436ed5119423f8dd2dd0df77d5 Mon Sep 17 00:00:00 2001 From: Jeongmo Yang Date: Tue, 26 Jul 2016 13:38:19 +0900 Subject: [Release version 0.2.22] Remove unused macro Change-Id: I5ab159cee09d478a07c7b344c76bcde4a75650a0 Signed-off-by: Jeongmo Yang --- muse/include/muse_recorder.h | 5 - muse/include/muse_recorder_msg.h | 200 --------------------------------------- packaging/mmsvc-recorder.spec | 2 +- 3 files changed, 1 insertion(+), 206 deletions(-) diff --git a/muse/include/muse_recorder.h b/muse/include/muse_recorder.h index 04024e9..81c11d7 100644 --- a/muse/include/muse_recorder.h +++ b/muse/include/muse_recorder.h @@ -166,11 +166,6 @@ typedef enum { */ #define MUSE_RECORDER_MSG_MAX_LENGTH 512 -/** - * @brief Definition for the wait time of the ipc callback. - */ -#define RECORDER_CALLBACK_TIME_OUT 3 - #ifdef __cplusplus } diff --git a/muse/include/muse_recorder_msg.h b/muse/include/muse_recorder_msg.h index e29798b..1bf47d3 100644 --- a/muse/include/muse_recorder_msg.h +++ b/muse/include/muse_recorder_msg.h @@ -158,139 +158,6 @@ typedef const char* STRING; #define muse_recorder_msg_get_error_e(param, buf, e) \ muse_core_msg_json_deserialize(#param, buf, NULL, ¶m, &e, MUSE_TYPE_ANY) -/** - * @brief Send the message from proxy to module via ipc. - * @param[in] api The enumeration of the corresponding api. - * @param[in] fd The socket fd that connected to the module via ipc. - * @param[in] cb_info The callback information, waiting for the ack from the module. - * @param[out] ret The delivered return value from the module to proxy side. - */ -#define muse_recorder_msg_send(api, fd, cb_info, ret) \ - do { \ - char *__sndMsg__; \ - int __len__; \ - __sndMsg__ = muse_core_msg_json_factory_new(api, 0); \ - __len__ = muse_core_ipc_send_msg(fd, __sndMsg__); \ - if (__len__ <= 0) { \ - LOGE("sending message failed"); \ - ret = RECORDER_ERROR_INVALID_OPERATION; \ - } else \ - ret = client_wait_for_cb_return(api, cb_info, RECORDER_CALLBACK_TIME_OUT); \ - muse_core_msg_json_factory_free(__sndMsg__); \ - } while (0) - - -/** - * @brief Send the message from proxy to module via ipc, adding 1 more parameter. - * @param[in] api The enumeration of the corresponding api. - * @param[in] fd The socket fd that connected to the module via ipc. - * @param[in] cb_info The callback information, waiting for the ack from the module. - * @param[out] ret The delivered return value from the module to proxy side. - * @param[in] type The data type of the parameter. - * @param[in] param A single parameter to be included in the message. - */ -#define muse_recorder_msg_send1(api, fd, cb_info, ret, type, param) \ - do { \ - char *__sndMsg__; \ - int __len__; \ - type __value__ = (type)param; \ - __sndMsg__ = muse_core_msg_json_factory_new(api, \ - MUSE_TYPE_##type, #param, __value__, \ - 0); \ - __len__ = muse_core_ipc_send_msg(fd, __sndMsg__); \ - if (__len__ <= 0) { \ - LOGE("sending message failed"); \ - ret = RECORDER_ERROR_INVALID_OPERATION; \ - } else \ - ret = client_wait_for_cb_return(api, cb_info, RECORDER_CALLBACK_TIME_OUT); \ - muse_core_msg_json_factory_free(__sndMsg__); \ - } while (0) - -/** - * @brief Send the message from proxy to module via ipc, adding 1 more parameter. - * @param[in] api The enumeration of the corresponding api. - * @param[in] fd The socket fd that connected to the module via ipc. - * @param[in] cb_info The callback information, waiting for the ack from the module. - * @param[in] type The data type of the parameter. - * @param[in] param A single parameter to be included in the message. - */ -#define muse_recorder_msg_send1_no_return(api, fd, cb_info, type, param) \ - do { \ - char *__sndMsg__; \ - int __len__; \ - type __value__ = (type)param; \ - __sndMsg__ = muse_core_msg_json_factory_new(api, \ - MUSE_TYPE_##type, #param, __value__, \ - 0); \ - __len__ = muse_core_ipc_send_msg(fd, __sndMsg__); \ - if (__len__ <= 0) { \ - LOGE("sending message failed"); \ - } \ - muse_core_msg_json_factory_free(__sndMsg__); \ - } while (0) - -/** - * @brief Send the message from proxy to module via ipc, adding 2 more parameters. - * @param[in] api The enumeration of the corresponding api. - * @param[in] fd The socket fd that connected to the module via ipc. - * @param[in] cb_info The callback information, waiting for the ack from the module. - * @param[out] ret The delivered return value from the module to proxy side. - * @param[in] type1 The data type of the parameter. - * @param[in] param1 The first 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_recorder_msg_send2(api, fd, cb_info, ret, 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_##type1, #param1, __value1__, \ - MUSE_TYPE_##type2, #param2, __value2__, \ - 0); \ - __len__ = muse_core_ipc_send_msg(fd, __sndMsg__); \ - if (__len__ <= 0) { \ - LOGE("sending message failed"); \ - ret = RECORDER_ERROR_INVALID_OPERATION; \ - } else \ - ret = client_wait_for_cb_return(api, cb_info, RECORDER_CALLBACK_TIME_OUT); \ - muse_core_msg_json_factory_free(__sndMsg__); \ - } while (0) - - -/** - * @brief Send the message from proxy to module via ipc, adding an array data. - * @param[in] api The enumeration of the corresponding api. - * @param[in] fd The socket fd that connected to the module via ipc. - * @param[in] cb_info The callback information, waiting for the ack from the module. - * @param[out] ret The delivered return value from the module to proxy side. - * @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_recorder_msg_send_array(api, fd, cb_info, ret, param, length, datum_size) \ - do { \ - char *__sndMsg__; \ - int __len__; \ - int *__value__ = (int *)param; \ - __sndMsg__ = muse_core_msg_json_factory_new(api, \ - MUSE_TYPE_INT, #length, length, \ - MUSE_TYPE_ARRAY, #param, \ - datum_size == sizeof(int) ? length : \ - length / sizeof(int) + (length % sizeof(int) ? 1 : 0), \ - __value__, \ - 0); \ - __len__ = muse_core_ipc_send_msg(fd, __sndMsg__); \ - if (__len__ <= 0) { \ - LOGE("sending message failed"); \ - ret = RECORDER_ERROR_INVALID_OPERATION; \ - } else \ - ret = client_wait_for_cb_return(api, cb_info, RECORDER_CALLBACK_TIME_OUT); \ - 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. @@ -372,73 +239,6 @@ typedef const char* STRING; 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_recorder_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 = RECORDER_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_recorder_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_INT, #length, length, \ - MUSE_TYPE_ARRAY, #param, \ - datum_size == sizeof(int) ? length : \ - 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 = RECORDER_ERROR_INVALID_OPERATION; \ - } \ - muse_core_msg_json_factory_free(__sndMsg__); \ - } while (0) - /** * @brief Returning the event ack message from the server to client side. * @param[in] api The enumeration of the corresponding api. diff --git a/packaging/mmsvc-recorder.spec b/packaging/mmsvc-recorder.spec index 1ae89f8..0d493e5 100644 --- a/packaging/mmsvc-recorder.spec +++ b/packaging/mmsvc-recorder.spec @@ -1,6 +1,6 @@ Name: mmsvc-recorder Summary: A Recorder module for muse server -Version: 0.2.21 +Version: 0.2.22 Release: 0 Group: Multimedia/Libraries License: Apache-2.0 -- cgit v1.2.3