diff --git a/obexd/client/bluetooth.c b/obexd/client/bluetooth.c
new file mode 100644
index 0000000..5bde9be
--- /dev/null
+++ b/obexd/client/bluetooth.c
+/*
+ *
+ * OBEX Client
+ *
+ * Copyright (C) 2012 Intel Corporation
+ *
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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 <errno.h>
+#include <inttypes.h>
+
+#include <glib.h>
+
+#include "log.h"
+#include "transport.h"
+#include "bluetooth.h"
+
+static guint bluetooth_connect(const char *source, const char *destination,
+ const char *service, uint16_t port,
+ obc_transport_func func, void *user_data)
+{
+ DBG("");
+
+ return 0;
+}
+
+static void bluetooth_disconnect(guint id)
+{
+ DBG("");
+}
+
+static struct obc_transport bluetooth = {
+ .name = "Bluetooth",
+ .connect = bluetooth_connect,
+ .disconnect = bluetooth_disconnect,
+};
+
+int bluetooth_init(void)
+{
+ DBG("");
+
+ return obc_transport_register(&bluetooth);
+}
+
+void bluetooth_exit(void)
+{
+ DBG("");
+
+ obc_transport_unregister(&bluetooth);
+}
diff --git a/obexd/client/bluetooth.h b/obexd/client/bluetooth.h
new file mode 100644
index 0000000..968e131
--- /dev/null
+++ b/obexd/client/bluetooth.h
+/*
+ *
+ * OBEX Client
+ *
+ * Copyright (C) 2011 Intel Corporation
+ *
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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
+ *
+ */
+
+int bluetooth_init(void);
+void bluetooth_exit(void);
diff --git a/obexd/client/manager.c b/obexd/client/manager.c
index 7841753..2e01e54 100644
--- a/obexd/client/manager.c
+++ b/obexd/client/manager.c
#include "log.h"
#include "session.h"
#include "manager.h"
+#include "bluetooth.h"
#include "opp.h"
#include "ftp.h"
#include "pbap.h"
static DBusConnection *conn = NULL;
-static struct target_module {
+static struct obc_module {
const char *name;
int (*init) (void);
void (*exit) (void);
-} targets[] = {
+} modules[] = {
+ { "bluetooth", bluetooth_init, bluetooth_exit },
{ "opp", opp_init, opp_exit },
{ "ftp", ftp_init, ftp_exit },
{ "pbap", pbap_init, pbap_exit },
int manager_init(void)
{
DBusError derr;
- struct target_module *target;
+ struct obc_module *module;
dbus_error_init(&derr);
return -1;
}
- for (target = targets; target && target->init; target++) {
- if (target->init() < 0)
+ for (module = modules; module && module->init; module++) {
+ if (module->init() < 0)
continue;
- DBG("Target %s loaded", target->name);
+ DBG("Module %s loaded", module->name);
}
return 0;
void manager_exit(void)
{
- struct target_module *target;
+ struct obc_module *module;
if (conn == NULL)
return;
- for (target = targets; target && target->exit; target++)
- target->exit();
+ for (module = modules; module && module->exit; module++)
+ module->exit();
g_dbus_unregister_interface(conn, CLIENT_PATH, CLIENT_INTERFACE);
dbus_connection_unref(conn);