Remove unused fuction 23/236923/1
authorYunmi Ha <yunmi.ha@samsung.com>
Tue, 23 Jun 2020 09:08:54 +0000 (18:08 +0900)
committerYunmi Ha <yunmi.ha@samsung.com>
Tue, 23 Jun 2020 09:08:54 +0000 (18:08 +0900)
Change-Id: I83f019623515374400ec083665062c1ddc1b7a0f
Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
src/dbus.c
src/dbus.h

index d315962..7899c71 100644 (file)
@@ -18,7 +18,6 @@
 
 
 #include <stdio.h>
-#include <stdlib.h>
 #include <stdint.h>
 #include <stdbool.h>
 #include <errno.h>
@@ -75,54 +74,6 @@ static int g_dbus_error_to_errno(int code)
        return -ECOMM;
 }
 
-static GVariant *append_g_variant(const char *sig, const char *param[])
-{
-       GVariantBuilder builder;
-       char *ch;
-       int i;
-       struct dbus_byte *bytes;
-
-       if (!sig || !param)
-               return NULL;
-
-       g_variant_builder_init(&builder, G_VARIANT_TYPE_TUPLE);
-
-       for (ch = (char *)sig, i = 0; *ch != '\0'; ++i, ++ch) {
-               switch (*ch) {
-               case 'i':
-                       g_variant_builder_add(&builder, "i", atoi(param[i]));
-                       break;
-               case 'u':
-                       g_variant_builder_add(&builder, "u", strtoul(param[i], NULL, 10));
-                       break;
-               case 't':
-                       g_variant_builder_add(&builder, "t", atoll(param[i]));
-                       break;
-               case 's':
-                       g_variant_builder_add(&builder, "s", param[i]);
-                       break;
-               case 'a':
-                       ++ch;
-                       switch (*ch) {
-                       case 'y':
-                               ++i;
-                               bytes = (struct dbus_byte *)param[i];
-                               g_variant_builder_add(&builder, "@ay",
-                                       g_variant_new_from_data(G_VARIANT_TYPE("ay"),
-                                       bytes->data, bytes->size, TRUE, NULL, NULL));
-                               break;
-                       default:
-                               break;
-                       }
-                       break;
-               default:
-                       return NULL;
-               }
-       }
-
-       return g_variant_builder_end(&builder);
-}
-
 static struct proxy_node *find_matched_proxy_node(const char *dest,
                const char *path,
                const char *interface)
@@ -322,17 +273,6 @@ int dbus_method_sync_var(const char *dest, const char *path,
        return result;
 }
 
-int dbus_method_sync(const char *dest, const char *path,
-               const char *interface, const char *method,
-               const char *sig, const char *param[])
-{
-       return dbus_method_sync_var(dest,
-                       path,
-                       interface,
-                       method,
-                       append_g_variant(sig, param));
-}
-
 //LCOV_EXCL_START Not called Callback
 static void feedback_signal_callback(GDBusConnection *conn,
                const gchar *sender,
index d714ba0..f573c43 100644 (file)
@@ -46,9 +46,6 @@ struct dbus_byte {
 
 int dbus_method_sync_var(const char *dest, const char *path,
                const char *interface, const char *method, GVariant *param);
-int dbus_method_sync(const char *dest, const char *path,
-               const char *interface, const char *method,
-               const char *sig, const char *param[]);
 
 /**
  * If result is NULL, err is set.