Just remove unused code 43/53743/1
authorHaejeong Kim <backto.kim@samsung.com>
Wed, 9 Dec 2015 05:35:11 +0000 (14:35 +0900)
committerHaejeong Kim <backto.kim@samsung.com>
Wed, 9 Dec 2015 05:38:52 +0000 (14:38 +0900)
Change-Id: I1c8105a25bd7bf256f50ca7bae6d4bcf1888a398

lib/media-util-noti.c

index 661fc82..62a4a87 100755 (executable)
@@ -268,82 +268,3 @@ int media_db_update_send(int pid, /* mandatory */
        /* Return TRUE to tell the event loop we want to be called again */
        return MS_MEDIA_ERR_NONE;
 }
-
-int media_db_update_send_v2(int pid, /* mandatory */
-                                                       media_item_type_e item, /* mandatory */
-                                                       media_item_update_type_e update_type, /* mandatory */
-                                                       char* path, /* mandatory */
-                                                       char* uuid, /* optional */
-                                                       media_type_e media_type, /* optional */
-                                                       char *mime_type /* optional */
-                                                       )
-{
-       GVariant *message = NULL;
-       GDBusConnection *bus = NULL;
-       GError *error = NULL;
-
-       bus = g_bus_get_sync(G_BUS_TYPE_SYSTEM, NULL, &error);
-       if (!bus) {
-               MSAPI_DBG("Failed to get gdbus connection: %s", error->message);
-               g_error_free(error);
-               return MS_MEDIA_ERR_INTERNAL;
-       }
-
-       if (item == MS_MEDIA_ITEM_FILE) {
-               MSAPI_DBG("FILE CHANGED");
-               if (uuid != NULL && mime_type != NULL) {
-                       /* fill all datas */
-                       message = g_variant_new("(iiissis)", item, pid, update_type, path, uuid, media_type, mime_type);
-               } else {
-                       MSAPI_DBG_ERR("uuid or mime_type is NULL");
-                       return MS_MEDIA_ERR_INVALID_PARAMETER;
-               }
-       } else if (item == MS_MEDIA_ITEM_DIRECTORY) {
-               MSAPI_DBG("DIRECTORY CHANGED");
-               /* fill all datas */
-               if (uuid != NULL) {
-                       message = g_variant_new("(iiiss)", item, pid, update_type, path, uuid);
-               } else {
-                       message = g_variant_new("(iiis)", item, pid, update_type, path);
-               }
-       } else {
-               MSAPI_DBG("this request is wrong");
-       }
-
-       gboolean emmiting = g_dbus_connection_emit_signal(
-                                       bus,
-                                       NULL,
-                                       MS_MEDIA_DBUS_PATH,
-                                       MS_MEDIA_DBUS_INTERFACE,
-                                       MS_MEDIA_DBUS_NAME,
-                                       message,
-                                       &error);
-       if (!emmiting) {
-               MSAPI_DBG_ERR("g_dbus_connection_emit_signal failed : %s", error ? error->message : "none");
-               if (error) {
-                       MSAPI_DBG_ERR("Error in g_dbus_connection_emit_signal");
-                       g_object_unref(bus);
-                       g_error_free(error);
-               }
-               return MS_MEDIA_ERR_INTERNAL;
-       }
-       MSAPI_DBG("success send notification");
-
-       gboolean flush = FALSE;
-       flush = g_dbus_connection_flush_sync(bus, NULL, &error);
-       if (!flush) {
-               MSAPI_DBG_ERR("g_dbus_connection_flush_sync failed");
-               if (error) {
-                       MSAPI_DBG_ERR("error : [%s]", error->message);
-                       g_object_unref(bus);
-                       g_error_free(error);
-                       return MS_MEDIA_ERR_INTERNAL;
-               }
-       }
-
-       g_object_unref(bus);
-
-       /* Return TRUE to tell the event loop we want to be called again */
-       return MS_MEDIA_ERR_NONE;
-}
-