Just change internal API name 63/134563/1
authorHaejeong Kim <backto.kim@samsung.com>
Mon, 19 Jun 2017 08:07:59 +0000 (17:07 +0900)
committerHaejeong Kim <backto.kim@samsung.com>
Mon, 19 Jun 2017 08:07:59 +0000 (17:07 +0900)
Change-Id: Id5adfa290188d467eb5f7c4ebb5846380beb01bd

lib/media-util-dcm.c

index 0101b24..b56bbd7 100755 (executable)
@@ -58,7 +58,7 @@ extern char MEDIA_IPC_PATH[][70];
 
 int __media_dcm_check_req_queue(const char *path);
 int __media_dcm_pop_manage_queue(const unsigned int request_id, const char *path);
-int _media_dcm_send_request();
+static int __media_dcm_send_request();
 
 gboolean __media_dcm_check_cancel(void)
 {
@@ -130,7 +130,7 @@ int __media_dcm_pop_req_queue(const char *path)
                req_len = g_queue_get_length(g_manage_queue);
 
                if (req_len > 0)
-                       _media_dcm_send_request();
+                       __media_dcm_send_request();
        }
 
        return MS_MEDIA_ERR_NONE;
@@ -265,14 +265,14 @@ int __media_dcm_pop_manage_queue(const unsigned int request_id, const char *path
        return MS_MEDIA_ERR_NONE;
 }
 
-int _media_dcm_send_request()
+static int __media_dcm_send_request()
 {
        int err = MS_MEDIA_ERR_NONE;
        int sock = -1;
        struct sockaddr_un serv_addr;
        dcmReq *req_manager = NULL;
 
-       MSAPI_DBG("_media_dcm_send_request start");
+       MSAPI_DBG("__media_dcm_send_request start");
 
        err = ms_ipc_create_client_socket(MS_TIMEOUT_SEC_10, &sock);
        if (err != MS_MEDIA_ERR_NONE) {
@@ -335,7 +335,7 @@ int _media_dcm_send_request()
 
        MSAPI_DBG("Sending msg to dcm service is successful");
 
-       if (req_manager->msg_type == DCM_MSG_REQUEST_MEDIA/*DCM_REQUEST_INSERT_FACE*/) {
+       if (req_manager->msg_type == DCM_MSG_REQUEST_MEDIA) {
                if (g_request_queue == NULL) {
                        g_request_queue = g_queue_new();
                }
@@ -427,7 +427,7 @@ int _media_dcm_request(int msg_type, const char *path, uid_t uid)
        return MS_MEDIA_ERR_NONE;
 }
 
-int _media_dcm_request_async(int msg_type, const unsigned int request_id, const char *path, faceUserData *userData, uid_t uid)
+static int __media_dcm_request_async(int msg_type, const unsigned int request_id, const char *path, faceUserData *userData, uid_t uid)
 {
        int err = MS_MEDIA_ERR_NONE;
 
@@ -458,7 +458,7 @@ int _media_dcm_request_async(int msg_type, const unsigned int request_id, const
                g_queue_push_tail(g_manage_queue, (gpointer)dcm_req);
 
                /* directly request at first time */
-               err = _media_dcm_send_request();
+               err = __media_dcm_send_request();
 
        } else {
                MSAPI_DBG("g_manage_queue is not NULL");
@@ -527,6 +527,8 @@ int dcm_request_extract_face_async(const unsigned int request_id, const char *pa
 
        MSAPI_RETVM_IF(!MS_STRING_VALID(path), MS_MEDIA_ERR_INVALID_PARAMETER, "Invalid path");
 
+       MSAPI_DBG_SLOG("Path : %s", path);
+
        exist = open(path, O_RDONLY);
        if (exist < 0) {
                MSAPI_DBG_ERR("The path(%s) doesn't exist.", path);
@@ -537,8 +539,6 @@ int dcm_request_extract_face_async(const unsigned int request_id, const char *pa
        }
        close(exist);
 
-       MSAPI_DBG_SLOG("Path : %s", path);
-
        ms_user_storage_type_t storage_type = -1;
        storage_type = ms_user_get_storage_type(uid, path, &storage_type);
 
@@ -557,7 +557,7 @@ int dcm_request_extract_face_async(const unsigned int request_id, const char *pa
        userData->user_data = user_data;
 
        /* Request for image file to the daemon "Dcm generator" */
-       err = _media_dcm_request_async(DCM_MSG_REQUEST_MEDIA/*DCM_REQUEST_INSERT_FACE*/, request_id, path, userData, uid);
+       err = __media_dcm_request_async(DCM_MSG_REQUEST_MEDIA, request_id, path, userData, uid);
        if (err != MS_MEDIA_ERR_NONE) {
                MSAPI_DBG_ERR("_media_dcm_request failed : %d", err);
                return err;
@@ -573,7 +573,7 @@ int dcm_request_cancel_face(const unsigned int request_id, const char *path)
        MSAPI_RETVM_IF(!MS_STRING_VALID(path), MS_MEDIA_ERR_INVALID_PARAMETER, "Invalid path");
 
        /* Request for image file to the daemon "Dcm generator" */
-       err = _media_dcm_request_async(DCM_MSG_REQUEST_CANCEL_FACE, request_id, path, NULL, request_id);
+       err = __media_dcm_request_async(DCM_MSG_REQUEST_CANCEL_FACE, request_id, path, NULL, request_id);
        if (err != MS_MEDIA_ERR_NONE) {
                MSAPI_DBG_ERR("_media_dcm_request failed : %d", err);
                return err;