} while (0)
#define mc_debug_fleave() do { \
- LOGD(FONT_COLOR_YELLOW"<Leave>"FONT_COLOR_RESET); \
+ LOGD(FONT_COLOR_YELLOW"<LEAVE>"FONT_COLOR_RESET); \
+ } while (0)
+
+#define mc_info_fenter() do { \
+ LOGI(FONT_COLOR_GREEN"<ENTER>"FONT_COLOR_RESET); \
+ } while (0)
+
+#define mc_info_fleave() do { \
+ LOGI(FONT_COLOR_GREEN"<LEAVE>"FONT_COLOR_RESET); \
} while (0)
#define mc_retm_if_failed(expr) do { \
Name: capi-media-controller
Summary: A media controller library in Tizen Native API
-Version: 0.2.20
+Version: 0.2.21
Release: 1
Group: Multimedia/API
License: Apache-2.0
int ret = MEDIA_CONTROLLER_ERROR_NONE;
media_controller_client_s *mc_client = NULL;
- mc_debug_fenter();
+ mc_info_fenter();
mc_retvm_if(client == NULL, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER, "Handle is NULL");
*client = (mc_client_h)mc_client;
- mc_debug_fleave();
+ mc_info_fleave();
return MEDIA_CONTROLLER_ERROR_NONE;
}
media_controller_client_s *mc_client = (media_controller_client_s *)client;
int idx = 0;
- mc_debug_fenter();
+ mc_info_fenter();
mc_retvm_if(mc_client == NULL, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER, "Handle is NULL");
ret = __mc_client_destroy(mc_client);
- mc_debug_fleave();
+ mc_info_fleave();
return ret;
}
gchar *message = NULL;
gchar *request_id = NULL;
- mc_debug_fenter();
+ mc_info_fenter();
g_variant_get(parameters, "(&s&s)", &request_id, &message);
mc_retm_if_failed(message);
mc_secure_debug("Received: [%s] (id: %s) from %s.%s", message, request_id, interface_name, signal_name);
listener->callback(interface_name, signal_name, message, request_id, listener->user_data);
- mc_debug_fleave();
+ mc_info_fleave();
}
static void __free_dbus_listener(gpointer data)
mc_retvm_if(!MC_STRING_VALID(signal_name), MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER, "Invalid signal_name");
mc_retvm_if(!MC_STRING_VALID(message), MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER, "Invalid message");
+ mc_info_fenter();
mc_secure_debug("emit signal - interface_name [%s], signal_name [%s]", interface_name, signal_name);
emmiting = g_dbus_connection_emit_signal(
return MEDIA_CONTROLLER_ERROR_INVALID_OPERATION;
}
+ mc_info_fleave();
+
return MEDIA_CONTROLLER_ERROR_NONE;
}
int ret = MEDIA_CONTROLLER_ERROR_NONE;
media_controller_server_s *mc_server = NULL;
- mc_debug_fenter();
+ mc_info_fenter();
mc_retvm_if(server == NULL, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER, "Handle is null");
*server = (mc_server_h)mc_server;
- mc_debug_fleave();
+ mc_info_fleave();
return MEDIA_CONTROLLER_ERROR_NONE;
}
int ret = MEDIA_CONTROLLER_ERROR_NONE;
media_controller_server_s *mc_server = (media_controller_server_s *)server;
- mc_debug_fenter();
+ mc_info_fenter();
mc_retvm_if(mc_server == NULL, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER, "Handle is NULL");
if (ret != MEDIA_CONTROLLER_ERROR_NONE)
mc_error("fail __mc_server_destoy [%d]", ret);
- mc_debug_fleave();
+ mc_info_fleave();
return ret;
}
ret = tzplatform_context_create(&ctx);
if (ret != 0) {
- mc_secure_error("Fail tzplatform_context_create");
+ mc_error("Fail tzplatform_context_create");
goto ERROR;
}
ret = tzplatform_context_set_user(ctx, uid);
if (ret != 0) {
- mc_secure_error("Fail tzplatform_context_set_user");
+ mc_error("Fail tzplatform_context_set_user");
goto ERROR;
}
path = g_strdup(tzplatform_context_mkpath(ctx, TZ_USER_DB, MC_DB_NAME));
if (!MC_STRING_VALID(path))
- mc_secure_error("Fail to get the path");
+ mc_error("Fail to get the path");
ERROR:
if (ctx != NULL)
{
MC_MILLISEC_SLEEP(50);
- mc_debug("__mc_db_busy_handler called : %d", count);
+ mc_error("[No-Error]__mc_db_busy_handler called : %d", count);
return 100 - count;
}
if (priv_type == MC_PRIV_TYPE_SERVER) {
ret = __mc_db_activate_server(db_handle, app_id);
if (ret != MEDIA_CONTROLLER_ERROR_NONE) {
- mc_secure_error("__mc_db_activate_server_table failed (%d)", ret);
+ mc_error("__mc_db_activate_server failed [%d]", ret);
__mc_db_delete_from_list(db_handle, app_id, priv_type);
}
}
/* Delete application from app list */
ret = __mc_db_delete_from_list(db_handle, app_id, priv_type);
if (ret != MEDIA_CONTROLLER_ERROR_NONE)
- mc_secure_error("__mc_db_delete_from_list error : %d", ret);
+ mc_error("__mc_db_delete_from_list failed [%d]", ret);
/* Update application information if it is latest server */
if ((priv_type == MC_PRIV_TYPE_SERVER) && (__mc_db_is_latest(db_handle, app_id))) {
mc_retvm_if(list == NULL, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER, "invalid list");
mc_retvm_if(index < 0 || index >= (int)g_list_length(*list), MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER, "invalid index");
- mc_secure_error("[No-error] index : %d", index);
+ mc_info("index : %d", index);
found = g_list_nth(*list, index);
if (!found) {
- mc_secure_debug("app_data has been already removed.");
+ mc_error("[No-Error] already removed.");
return MEDIA_CONTROLLER_ERROR_NONE;
}
mc_error("[No-error] increased connection count [%d]", g_connection_cnt);
- mc_debug_fleave();
-
return MEDIA_CONTROLLER_ERROR_NONE;
}
g_connection_cnt--;
mc_error("[No-error] decreased connection count [%d]", g_connection_cnt);
- mc_debug_fleave();
-
return MEDIA_CONTROLLER_ERROR_NONE;
}
/* Delete and update information of dead application on database */
if (MEDIA_CONTROLLER_ERROR_NONE != mc_db_remove_application(_app_data->uid, _app_data->app_id, _app_data->priv_type))
- mc_secure_error("Fail to remove dead application");
+ mc_error("Fail to remove dead application");
/* Sends notification for deactivated server via dbus */
if (_app_data->priv_type == MC_PRIV_TYPE_SERVER) {
if (MEDIA_CONTROLLER_ERROR_NONE != __mc_notify_server_updated(_app_data->app_id, MC_SERVER_STATE_DEACTIVATE))
- mc_secure_error("Fail to notify deactivated server");
+ mc_error("Fail to notify deactivated server");
}
_service_data->connected_apps = g_list_remove_link(_service_data->connected_apps, iter);
g_list_free_full(iter, __mc_destroy_connected_apps);
- mc_secure_error("[No-error] decreased connection count [%d]", --g_connection_cnt);
+ mc_error("[No-error] decreased connection count [%d]", --g_connection_cnt);
}
return AUL_R_OK;
GQueue *request_queue = _service_data->request->queue;
length_of_queue = g_queue_get_length(request_queue);
- mc_debug("Queue Length : %d", length_of_queue);
+ mc_info("Queue Length : %d", length_of_queue);
if (length_of_queue <= 0) {
mc_debug("There is no request job in the queue");
goto ERROR;
}
+ mc_info("msg_type : [%d]", request_msg->msg_type);
+
switch (request_msg->msg_type) {
case MC_MSG_DB_UPDATE:
send_msg = mc_db_request(request_msg->uid, request_msg->msg, request_msg->msg_size);
mc_service_t *_service_data = (mc_service_t*)data;
GQueue *request_queue = _service_data->request->queue;
- mc_debug_fenter();
+ mc_info_fenter();
sock = g_io_channel_unix_get_fd(src);
if (sock < 0) {
goto ERROR;
}
- mc_debug("msg(%d) is queued", req->req_msg->msg_type);
+ mc_info("msg(%d) is queued", req->req_msg->msg_type);
g_queue_push_tail(request_queue, (gpointer)req);
/* push received message to queue */