obexd: Remove unused source/header files for dbus 23/204923/1
authorERAMOTO Masaya <eramoto.masaya@jp.fujitsu.com>
Thu, 1 Mar 2018 04:27:16 +0000 (13:27 +0900)
committerAmit Purwar <amit.purwar@samsung.com>
Fri, 26 Apr 2019 10:27:41 +0000 (15:57 +0530)
Due to using g_dbus_emit_property_changed() and g_dbus_get_properties(),
obex_dbus_signal_property_changed() is unused since commit 96063756
("obex-client: Rename org.bluez.obex.Transfer to Transfer1"), and
OBC_PROPERTIES_ARRAY_SIGNATURE macro is unused since commit 3eadc034
("obex-client: Make use of g_dbus_get_properties to get transfer properties").

Change-Id: If237f40dea006c9b96e16dc3e446dff80e591aed
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
Makefile.obexd
obexd/client/dbus.c [deleted file]
obexd/client/dbus.h [deleted file]
obexd/client/ftp.c
obexd/client/map.c
obexd/client/transfer.c

index ca0a72c..3ad8780 100755 (executable)
@@ -79,7 +79,6 @@ obexd_src_obexd_SOURCES = $(btio_sources) $(gobex_sources) \
                        obexd/client/map-event.h obexd/client/map-event.c \
                        obexd/client/transfer.h obexd/client/transfer.c \
                        obexd/client/transport.h obexd/client/transport.c \
-                       obexd/client/dbus.h obexd/client/dbus.c \
                        obexd/client/driver.h obexd/client/driver.c \
                        obexd/src/map_ap.h
 obexd_src_obexd_LDADD = lib/libbluetooth-internal.la \
diff --git a/obexd/client/dbus.c b/obexd/client/dbus.c
deleted file mode 100755 (executable)
index bfe5c49..0000000
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- *
- *  OBEX Client
- *
- *  Copyright (C) 2008-2011  Intel Corporation. All rights reserved.
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License version 2 as
- *  published by the Free Software Foundation.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- *
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <glib.h>
-
-#include "gdbus/gdbus.h"
-
-#include "obexd/src/log.h"
-#include "dbus.h"
-
-static void append_variant(DBusMessageIter *iter,
-                               int type, void *value)
-{
-       char sig[2];
-       DBusMessageIter valueiter;
-
-       sig[0] = type;
-       sig[1] = 0;
-
-       dbus_message_iter_open_container(iter, DBUS_TYPE_VARIANT,
-                                               sig, &valueiter);
-
-       dbus_message_iter_append_basic(&valueiter, type, value);
-
-       dbus_message_iter_close_container(iter, &valueiter);
-}
-
-void obex_dbus_dict_append(DBusMessageIter *dict,
-                       const char *key, int type, void *value)
-{
-       DBusMessageIter keyiter;
-
-       if (type == DBUS_TYPE_STRING) {
-               const char *str = *((const char **) value);
-               if (str == NULL)
-                       return;
-       }
-
-       dbus_message_iter_open_container(dict, DBUS_TYPE_DICT_ENTRY,
-                                                       NULL, &keyiter);
-
-       dbus_message_iter_append_basic(&keyiter, DBUS_TYPE_STRING, &key);
-
-       append_variant(&keyiter, type, value);
-
-       dbus_message_iter_close_container(dict, &keyiter);
-}
-
-int obex_dbus_signal_property_changed(DBusConnection *conn,
-                                       const char *path,
-                                       const char *interface,
-                                       const char *name,
-                                       int type, void *value)
-{
-       DBusMessage *signal;
-       DBusMessageIter iter;
-
-       signal = dbus_message_new_signal(path, interface, "PropertyChanged");
-       if (signal == NULL) {
-               error("Unable to allocate new %s.PropertyChanged signal",
-                               interface);
-               return -1;
-       }
-
-       dbus_message_iter_init_append(signal, &iter);
-
-       dbus_message_iter_append_basic(&iter, DBUS_TYPE_STRING, &name);
-
-       append_variant(&iter, type, value);
-
-       return g_dbus_send_message(conn, signal);
-}
diff --git a/obexd/client/dbus.h b/obexd/client/dbus.h
deleted file mode 100755 (executable)
index 6136bf5..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- *
- *  OBEX Client
- *
- *  Copyright (C) 2008-2011  Intel Corporation. All rights reserved.
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License version 2 as
- *  published by the Free Software Foundation.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- *
- */
-
-#ifndef __OBEX_DBUS_H
-#define __OBEX_DBUS_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <dbus/dbus.h>
-
-/* Essentially a{sv} */
-#define OBC_PROPERTIES_ARRAY_SIGNATURE DBUS_DICT_ENTRY_BEGIN_CHAR_AS_STRING \
-                                       DBUS_TYPE_STRING_AS_STRING \
-                                       DBUS_TYPE_VARIANT_AS_STRING \
-                                       DBUS_DICT_ENTRY_END_CHAR_AS_STRING
-
-void obex_dbus_dict_append(DBusMessageIter *dict, const char *key, int type,
-                               void *value);
-
-int obex_dbus_signal_property_changed(DBusConnection *conn, const char *path,
-                                       const char *interface, const char *name,
-                                       int type, void *value);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __OBEX_DBUS_H */
index 55641e2..8be3341 100755 (executable)
@@ -31,7 +31,6 @@
 #include "gdbus/gdbus.h"
 
 #include "obexd/src/log.h"
-#include "dbus.h"
 #include "transfer.h"
 #include "session.h"
 #include "driver.h"
index af8c61d..9cf3dac 100755 (executable)
@@ -40,7 +40,6 @@
 
 #include "obexd/src/log.h"
 #include "obexd/src/map_ap.h"
-#include "dbus.h"
 #include "map-event.h"
 
 #include "map.h"
index c7f27c3..807f0f7 100755 (executable)
@@ -41,7 +41,6 @@
 #include "gobex/gobex.h"
 
 #include "obexd/src/log.h"
-#include "dbus.h"
 #include "transfer.h"
 
 #define TRANSFER_INTERFACE "org.bluez.obex.Transfer1"