summaryrefslogtreecommitdiff
path: root/tools/obexctl.c
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2013-09-30 10:01:48 +0300
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2013-10-15 16:50:20 +0300
commitfe22983f433d927768c6e343640881ae211573e6 (patch)
tree03fa3e76efe3b2f2c25c809717d44e3fcde249b4 /tools/obexctl.c
parent0998328a5b7679ff647052e842bc5f11210ad389 (diff)
downloadbluez-fe22983f433d927768c6e343640881ae211573e6.tar.gz
tools/obexctl: Add proxy handling for org.bluez.obex.PhonebookAccess1
This adds proxy handling for org.bluez.obex.PhonebookAccess1 so changes to the proxy are printed in the output.
Diffstat (limited to 'tools/obexctl.c')
-rw-r--r--tools/obexctl.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/tools/obexctl.c b/tools/obexctl.c
index b943fbb18..bab9ad8cf 100644
--- a/tools/obexctl.c
+++ b/tools/obexctl.c
@@ -54,6 +54,7 @@
#define OBEX_CLIENT_INTERFACE "org.bluez.obex.Client1"
#define OBEX_OPP_INTERFACE "org.bluez.obex.ObjectPush1"
#define OBEX_FTP_INTERFACE "org.bluez.obex.FileTransfer1"
+#define OBEX_PBAP_INTERFACE "org.bluez.obex.PhonebookAccess1"
static GMainLoop *main_loop;
static DBusConnection *dbus_conn;
@@ -61,6 +62,7 @@ static GDBusProxy *default_session;
static GSList *sessions = NULL;
static GSList *opps = NULL;
static GSList *ftps = NULL;
+static GSList *pbaps = NULL;
static GSList *transfers = NULL;
static GDBusProxy *client = NULL;
@@ -1438,6 +1440,13 @@ static void ftp_added(GDBusProxy *proxy)
print_proxy(proxy, "FileTransfer", COLORED_NEW);
}
+static void pbap_added(GDBusProxy *proxy)
+{
+ pbaps = g_slist_append(pbaps, proxy);
+
+ print_proxy(proxy, "PhonebookAccess", COLORED_NEW);
+}
+
static void proxy_added(GDBusProxy *proxy, void *user_data)
{
const char *interface;
@@ -1454,6 +1463,8 @@ static void proxy_added(GDBusProxy *proxy, void *user_data)
opp_added(proxy);
else if (!strcmp(interface, OBEX_FTP_INTERFACE))
ftp_added(proxy);
+ else if (!strcmp(interface, OBEX_PBAP_INTERFACE))
+ pbap_added(proxy);
}
static void client_removed(GDBusProxy *proxy)
@@ -1495,6 +1506,13 @@ static void ftp_removed(GDBusProxy *proxy)
ftps = g_slist_remove(ftps, proxy);
}
+static void pbap_removed(GDBusProxy *proxy)
+{
+ print_proxy(proxy, "PhonebookAccess", COLORED_DEL);
+
+ pbaps = g_slist_remove(pbaps, proxy);
+}
+
static void proxy_removed(GDBusProxy *proxy, void *user_data)
{
const char *interface;
@@ -1511,6 +1529,8 @@ static void proxy_removed(GDBusProxy *proxy, void *user_data)
opp_removed(proxy);
else if (!strcmp(interface, OBEX_FTP_INTERFACE))
ftp_removed(proxy);
+ else if (!strcmp(interface, OBEX_PBAP_INTERFACE))
+ pbap_removed(proxy);
}
static void session_property_changed(GDBusProxy *proxy, const char *name,