summaryrefslogtreecommitdiffstats
path: root/serial
diff options
context:
space:
mode:
authorAlok Barsode <alok.barsode@azingo.com>2008-07-09 18:12:19 +0530
committerLuiz Augusto von Dentz <luiz.dentz@indt.org.br>2008-07-28 10:36:35 -0300
commit555fcc9b4bf67e923708af8de46aa91b7077f050 (patch)
treeb8da503d323c7a33d2db61badfa4e16823eb747b /serial
parentea245383ac6650cbf34c327ed095d956b84ac5fb (diff)
Renaming device to btd_device and making the
necessary changes in plugins. Signed-off-by: Alok Barsode <alok.barsode@azingo.com>
Diffstat (limited to 'serial')
-rw-r--r--serial/main.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/serial/main.c b/serial/main.c
index 20aea93a..518649e0 100644
--- a/serial/main.c
+++ b/serial/main.c
@@ -51,15 +51,16 @@ static DBusMessage *serial_connect(DBusConnection *conn,
DBusMessage *msg, void *user_data)
{
struct btd_device *device = user_data;
+ struct adapter *adapter = device_get_adapter(device);
const char *target;
- char src[18], dst[18];
+ const gchar *src, *dst;
if (dbus_message_get_args(msg, NULL, DBUS_TYPE_STRING, &target,
DBUS_TYPE_INVALID) == FALSE)
return NULL;
- ba2str(&device->src, src);
- ba2str(&device->dst, dst);
+ src = device_get_address(device);
+ dst = adapter->address;
service_connect(conn, msg, src, dst, target);
@@ -98,9 +99,10 @@ static DBusConnection *conn;
static int serial_probe(struct btd_device *device)
{
- DBG("path %s", device->path);
+ const gchar *path = device_get_path(device);
+ DBG("path %s", path);
- if (g_dbus_register_interface(conn, device->path, SERIAL_INTERFACE,
+ if (g_dbus_register_interface(conn, path, SERIAL_INTERFACE,
serial_methods, NULL, NULL,
device, NULL) == FALSE)
return -1;
@@ -110,9 +112,10 @@ static int serial_probe(struct btd_device *device)
static void serial_remove(struct btd_device *device)
{
- DBG("path %s", device->path);
+ const gchar *path = device_get_path(device);
+ DBG("path %s", path);
- g_dbus_unregister_interface(conn, device->path, SERIAL_INTERFACE);
+ g_dbus_unregister_interface(conn, path, SERIAL_INTERFACE);
}
static struct btd_device_driver serial_driver = {