* [PATCH BlueZ 1/4] obex-client: Port MAP module to use D-Bus properties interface
@ 2012-12-14 21:31 Luiz Augusto von Dentz
2012-12-14 21:31 ` [PATCH BlueZ 2/4] obex-client: Port session code " Luiz Augusto von Dentz
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Luiz Augusto von Dentz @ 2012-12-14 21:31 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
---
obexd/client/map.c | 315 ++++++++++++++++++++++++++++++-----------------------
1 file changed, 178 insertions(+), 137 deletions(-)
diff --git a/obexd/client/map.c b/obexd/client/map.c
index dcbcc8b..9cae20e 100644
--- a/obexd/client/map.c
+++ b/obexd/client/map.c
@@ -107,7 +107,7 @@ struct map_msg {
uint64_t size;
char *status;
uint8_t flags;
- DBusMessage *msg;
+ GDBusPendingPropertySet pending;
};
struct map_parser {
@@ -421,176 +421,205 @@ static void set_message_status_cb(struct obc_session *session,
GError *err, void *user_data)
{
struct map_msg *msg = user_data;
- DBusMessage *reply;
if (err != NULL) {
- reply = g_dbus_create_error(msg->msg,
+ g_dbus_pending_property_error(msg->pending,
ERROR_INTERFACE ".Failed",
"%s", err->message);
goto done;
}
- reply = dbus_message_new_method_return(msg->msg);
- if (reply == NULL) {
- reply = g_dbus_create_error(msg->msg,
- ERROR_INTERFACE ".Failed",
- "%s", err->message);
- }
+ g_dbus_pending_property_success(msg->pending);
done:
- g_dbus_send_message(conn, reply);
- dbus_message_unref(msg->msg);
- msg->msg = NULL;
+ msg->pending = 0;
}
-static DBusMessage *map_msg_set_property(DBusConnection *connection,
- DBusMessage *message,
- void *user_data)
+static gboolean get_subject(const GDBusPropertyTable *property,
+ DBusMessageIter *iter, void *data)
{
- struct map_msg *msg = user_data;
+ struct map_msg *msg = data;
+
+ dbus_message_iter_append_basic(iter, DBUS_TYPE_STRING, &msg->subject);
+
+ return TRUE;
+}
+
+static gboolean get_timestamp(const GDBusPropertyTable *property,
+ DBusMessageIter *iter, void *data)
+{
+ struct map_msg *msg = data;
+
+ dbus_message_iter_append_basic(iter, DBUS_TYPE_STRING, &msg->timestamp);
+
+ return TRUE;
+}
+
+static gboolean get_sender(const GDBusPropertyTable *property,
+ DBusMessageIter *iter, void *data)
+{
+ struct map_msg *msg = data;
+
+ dbus_message_iter_append_basic(iter, DBUS_TYPE_STRING, &msg->sender);
+
+ return TRUE;
+}
+
+static gboolean get_sender_address(const GDBusPropertyTable *property,
+ DBusMessageIter *iter, void *data)
+{
+ struct map_msg *msg = data;
+
+ dbus_message_iter_append_basic(iter, DBUS_TYPE_STRING,
+ &msg->sender_address);
+
+ return TRUE;
+}
+
+static gboolean get_replyto(const GDBusPropertyTable *property,
+ DBusMessageIter *iter, void *data)
+{
+ struct map_msg *msg = data;
+
+ dbus_message_iter_append_basic(iter, DBUS_TYPE_STRING, &msg->replyto);
+
+ return TRUE;
+}
+
+static gboolean get_recipient(const GDBusPropertyTable *property,
+ DBusMessageIter *iter, void *data)
+{
+ struct map_msg *msg = data;
+
+ dbus_message_iter_append_basic(iter, DBUS_TYPE_STRING, &msg->recipient);
+
+ return TRUE;
+}
+
+static gboolean get_recipient_address(const GDBusPropertyTable *property,
+ DBusMessageIter *iter, void *data)
+{
+ struct map_msg *msg = data;
+
+ dbus_message_iter_append_basic(iter, DBUS_TYPE_STRING,
+ &msg->recipient_address);
+
+ return TRUE;
+}
+
+static gboolean get_type(const GDBusPropertyTable *property,
+ DBusMessageIter *iter, void *data)
+{
+ struct map_msg *msg = data;
+
+ dbus_message_iter_append_basic(iter, DBUS_TYPE_STRING, &msg->type);
+
+ return TRUE;
+}
+
+static gboolean get_size(const GDBusPropertyTable *property,
+ DBusMessageIter *iter, void *data)
+{
+ struct map_msg *msg = data;
+
+ dbus_message_iter_append_basic(iter, DBUS_TYPE_UINT64, &msg->size);
+
+ return TRUE;
+}
+
+static gboolean get_flag(const GDBusPropertyTable *property,
+ DBusMessageIter *iter, uint8_t flag,
+ void *data)
+{
+ struct map_msg *msg = data;
+ dbus_bool_t value = (msg->flags & flag) != 0;
+
+ dbus_message_iter_append_basic(iter, DBUS_TYPE_BOOLEAN, &value);
+
+ return TRUE;
+}
+
+static gboolean get_priority(const GDBusPropertyTable *property,
+ DBusMessageIter *iter, void *data)
+{
+ return get_flag(property, iter, MAP_MSG_FLAG_PRIORITY, data);
+}
+
+static gboolean get_read(const GDBusPropertyTable *property,
+ DBusMessageIter *iter, void *data)
+{
+ return get_flag(property, iter, MAP_MSG_FLAG_READ, data);
+}
+
+static gboolean get_sent(const GDBusPropertyTable *property,
+ DBusMessageIter *iter, void *data)
+{
+ return get_flag(property, iter, MAP_MSG_FLAG_SENT, data);
+}
+
+static gboolean get_protected(const GDBusPropertyTable *property,
+ DBusMessageIter *iter, void *data)
+{
+ return get_flag(property, iter, MAP_MSG_FLAG_PROTECTED, data);
+}
+
+static void set_status(const GDBusPropertyTable *property,
+ DBusMessageIter *iter, GDBusPendingPropertySet id,
+ uint8_t status, void *data)
+{
+ struct map_msg *msg = data;
struct obc_transfer *transfer;
- char *property;
- gboolean status;
+ gboolean value;
GError *err = NULL;
- DBusMessage *reply;
GObexApparam *apparam;
char contents[2];
- int op;
- DBusMessageIter args, variant;
- dbus_message_iter_init(message, &args);
- if (dbus_message_iter_get_arg_type(&args) != DBUS_TYPE_STRING)
- return g_dbus_create_error(message,
- ERROR_INTERFACE ".InvalidArguments", NULL);
-
- dbus_message_iter_get_basic(&args, &property);
- dbus_message_iter_next(&args);
- if (dbus_message_iter_get_arg_type(&args) != DBUS_TYPE_VARIANT)
- return g_dbus_create_error(message,
- ERROR_INTERFACE ".InvalidArguments", NULL);
-
- dbus_message_iter_recurse(&args, &variant);
- if (dbus_message_iter_get_arg_type(&variant) != DBUS_TYPE_BOOLEAN)
- return g_dbus_create_error(message,
- ERROR_INTERFACE ".InvalidArguments", NULL);
+ if (dbus_message_iter_get_arg_type(iter) != DBUS_TYPE_BOOLEAN)
+ return g_dbus_pending_property_error(id,
+ ERROR_INTERFACE ".InvalidArguments",
+ "Invalid arguments in method call");
- dbus_message_iter_get_basic(&variant, &status);
-
- /* MAP supports modifying only these two properties. */
- if (property && strcasecmp(property, "Read") == 0) {
- op = STATUS_READ;
- if (status)
- msg->flags |= MAP_MSG_FLAG_READ;
- else
- msg->flags &= ~MAP_MSG_FLAG_READ;
- } else if (property && strcasecmp(property, "Deleted") == 0)
- op = STATUS_DELETE;
- else {
- return g_dbus_create_error(message,
- ERROR_INTERFACE ".InvalidArguments", NULL);
- }
+ dbus_message_iter_get_basic(iter, &value);
contents[0] = FILLER_BYTE;
contents[1] = '\0';
transfer = obc_transfer_put("x-bt/messageStatus", msg->handle, NULL,
- contents,
- sizeof(contents), &err);
+ contents, sizeof(contents), &err);
if (transfer == NULL)
goto fail;
apparam = g_obex_apparam_set_uint8(NULL, MAP_AP_STATUSINDICATOR,
- op);
- apparam = g_obex_apparam_set_uint8(apparam, MAP_AP_STATUSVALUE,
status);
+ apparam = g_obex_apparam_set_uint8(apparam, MAP_AP_STATUSVALUE,
+ value);
obc_transfer_set_apparam(transfer, apparam);
if (!obc_session_queue(msg->data->session, transfer,
set_message_status_cb, msg, &err))
goto fail;
- msg->msg = dbus_message_ref(message);
- return NULL;
+ msg->pending = id;
+ return;
fail:
- reply = g_dbus_create_error(message, ERROR_INTERFACE ".Failed", "%s",
+ g_dbus_pending_property_error(id, ERROR_INTERFACE ".Failed", "%s",
err->message);
g_error_free(err);
- return reply;
}
-static DBusMessage *map_msg_get_properties(DBusConnection *connection,
- DBusMessage *message,
- void *user_data)
+static void set_read(const GDBusPropertyTable *property,
+ DBusMessageIter *iter, GDBusPendingPropertySet id,
+ void *data)
{
- struct map_msg *msg = user_data;
- GError *err = NULL;
- DBusMessage *reply;
- DBusMessageIter iter, data_array;
- gboolean flag;
-
- reply = dbus_message_new_method_return(message);
- if (reply == NULL) {
- reply = g_dbus_create_error(message,
- ERROR_INTERFACE ".Failed",
- NULL);
- goto done;
- }
-
- dbus_message_iter_init_append(reply, &iter);
- dbus_message_iter_open_container(&iter, DBUS_TYPE_ARRAY,
- DBUS_DICT_ENTRY_BEGIN_CHAR_AS_STRING
- DBUS_TYPE_STRING_AS_STRING
- DBUS_TYPE_VARIANT_AS_STRING
- DBUS_DICT_ENTRY_END_CHAR_AS_STRING,
- &data_array);
-
-
- obex_dbus_dict_append(&data_array, "Subject",
- DBUS_TYPE_STRING, &msg->subject);
- obex_dbus_dict_append(&data_array, "Timestamp",
- DBUS_TYPE_STRING, &msg->timestamp);
- obex_dbus_dict_append(&data_array, "Sender",
- DBUS_TYPE_STRING, &msg->sender);
- obex_dbus_dict_append(&data_array, "SenderAddress",
- DBUS_TYPE_STRING, &msg->sender_address);
- obex_dbus_dict_append(&data_array, "ReplyTo",
- DBUS_TYPE_STRING, &msg->replyto);
- obex_dbus_dict_append(&data_array, "Recipient",
- DBUS_TYPE_STRING, &msg->recipient);
- obex_dbus_dict_append(&data_array, "RecipientAddress",
- DBUS_TYPE_STRING, &msg->recipient_address);
- obex_dbus_dict_append(&data_array, "Type",
- DBUS_TYPE_STRING, &msg->type);
- obex_dbus_dict_append(&data_array, "Status",
- DBUS_TYPE_STRING, &msg->status);
- obex_dbus_dict_append(&data_array, "Size",
- DBUS_TYPE_UINT64, &msg->size);
-
- flag = (msg->flags & MAP_MSG_FLAG_PRIORITY) != 0;
- obex_dbus_dict_append(&data_array, "Priority",
- DBUS_TYPE_BOOLEAN, &flag);
-
- flag = (msg->flags & MAP_MSG_FLAG_READ) != 0;
- obex_dbus_dict_append(&data_array, "Read",
- DBUS_TYPE_BOOLEAN, &flag);
-
- flag = (msg->flags & MAP_MSG_FLAG_SENT) != 0;
- obex_dbus_dict_append(&data_array, "Sent",
- DBUS_TYPE_BOOLEAN, &flag);
-
- flag = (msg->flags & MAP_MSG_FLAG_PROTECTED) != 0;
- obex_dbus_dict_append(&data_array, "Protected",
- DBUS_TYPE_BOOLEAN, &flag);
-
- dbus_message_iter_close_container(&iter, &data_array);
-
-
-done:
- if (err)
- g_error_free(err);
+ set_status(property, iter, id, STATUS_READ, data);
+}
- return reply;
+static void set_deleted(const GDBusPropertyTable *property,
+ DBusMessageIter *iter, GDBusPendingPropertySet id,
+ void *data)
+{
+ set_status(property, iter, id, STATUS_DELETE, data);
}
static const GDBusMethodTable map_msg_methods[] = {
@@ -600,13 +629,24 @@ static const GDBusMethodTable map_msg_methods[] = {
GDBUS_ARGS({ "transfer", "o" },
{ "properties", "a{sv}" }),
map_msg_get) },
- { GDBUS_METHOD("GetProperties",
- NULL,
- GDBUS_ARGS({ "properties", "a{sv}" }),
- map_msg_get_properties) },
- { GDBUS_ASYNC_METHOD("SetProperty",
- GDBUS_ARGS({ "property", "sv" }), NULL,
- map_msg_set_property) },
+ { }
+};
+
+static const GDBusPropertyTable map_msg_properties[] = {
+ { "Subject", "s", get_subject },
+ { "Timestamp", "s", get_timestamp },
+ { "Sender", "s", get_sender },
+ { "SenderAddress", "s", get_sender_address },
+ { "ReplyTo", "s", get_replyto },
+ { "Recipient", "s", get_recipient },
+ { "RecipientAddress", "s", get_recipient_address },
+ { "Type", "s", get_type },
+ { "Size", "t", get_size },
+ { "Priority", "b", get_priority },
+ { "Read", "b", get_read, set_read },
+ { "Sent", "b", get_sent },
+ { "Protected", "b", get_sent },
+ { "Deleted", "b", NULL, set_deleted },
{ }
};
@@ -621,7 +661,8 @@ static struct map_msg *map_msg_create(struct map_data *data, const char *handle)
handle);
if (!g_dbus_register_interface(conn, msg->path, MAP_MSG_INTERFACE,
- map_msg_methods, NULL, NULL,
+ map_msg_methods, NULL,
+ map_msg_properties,
msg, map_msg_free)) {
map_msg_free(msg);
return NULL;
--
1.7.11.7
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH BlueZ 2/4] obex-client: Port session code to use D-Bus properties interface
2012-12-14 21:31 [PATCH BlueZ 1/4] obex-client: Port MAP module to use D-Bus properties interface Luiz Augusto von Dentz
@ 2012-12-14 21:31 ` Luiz Augusto von Dentz
2012-12-14 21:31 ` [PATCH BlueZ 3/4] obex-client: Port transfer " Luiz Augusto von Dentz
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Luiz Augusto von Dentz @ 2012-12-14 21:31 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
---
doc/obex-client-api.txt | 6 +---
obexd/client/session.c | 86 ++++++++++++++++++++++++++++---------------------
2 files changed, 51 insertions(+), 41 deletions(-)
diff --git a/doc/obex-client-api.txt b/doc/obex-client-api.txt
index 19c8541..f516760 100644
--- a/doc/obex-client-api.txt
+++ b/doc/obex-client-api.txt
@@ -43,11 +43,7 @@ Service org.bluez.obex.client
Interface org.bluez.obex.Session
Object path [variable prefix]/{session0,session1,...}
-Methods dict GetProperties()
-
- Returns all properties for the session.
-
- string GetCapabilities()
+Methods string GetCapabilities()
Get remote device capabilities.
diff --git a/obexd/client/session.c b/obexd/client/session.c
index 2bac229..40d6c9c 100644
--- a/obexd/client/session.c
+++ b/obexd/client/session.c
@@ -524,39 +524,6 @@ void obc_session_shutdown(struct obc_session *session)
obc_session_unref(session);
}
-static DBusMessage *session_get_properties(DBusConnection *connection,
- DBusMessage *message, void *user_data)
-{
- struct obc_session *session = user_data;
- DBusMessage *reply;
- DBusMessageIter iter, dict;
-
- reply = dbus_message_new_method_return(message);
- if (!reply)
- return NULL;
-
- dbus_message_iter_init_append(reply, &iter);
-
- dbus_message_iter_open_container(&iter, DBUS_TYPE_ARRAY,
- DBUS_DICT_ENTRY_BEGIN_CHAR_AS_STRING
- DBUS_TYPE_STRING_AS_STRING DBUS_TYPE_VARIANT_AS_STRING
- DBUS_DICT_ENTRY_END_CHAR_AS_STRING, &dict);
-
- if (session->source != NULL)
- obex_dbus_dict_append(&dict, "Source", DBUS_TYPE_STRING,
- &session->source);
-
- obex_dbus_dict_append(&dict, "Destination", DBUS_TYPE_STRING,
- &session->destination);
-
- obex_dbus_dict_append(&dict, "Channel", DBUS_TYPE_BYTE,
- &session->channel);
-
- dbus_message_iter_close_container(&iter, &dict);
-
- return reply;
-}
-
static void capabilities_complete_callback(struct obc_session *session,
struct obc_transfer *transfer,
GError *err, void *user_data)
@@ -621,16 +588,63 @@ fail:
}
+static gboolean get_source(const GDBusPropertyTable *property,
+ DBusMessageIter *iter, void *data)
+{
+ struct obc_session *session = data;
+
+ if (session->source == NULL)
+ return FALSE;
+
+ dbus_message_iter_append_basic(iter, DBUS_TYPE_STRING,
+ &session->source);
+
+ return TRUE;
+}
+
+static gboolean source_exists(const GDBusPropertyTable *property, void *data)
+{
+ struct obc_session *session = data;
+
+ return session->source != NULL;
+}
+
+static gboolean get_destination(const GDBusPropertyTable *property,
+ DBusMessageIter *iter, void *data)
+{
+ struct obc_session *session = data;
+
+ dbus_message_iter_append_basic(iter, DBUS_TYPE_STRING,
+ &session->destination);
+
+ return TRUE;
+}
+
+static gboolean get_channel(const GDBusPropertyTable *property,
+ DBusMessageIter *iter, void *data)
+{
+ struct obc_session *session = data;
+
+ dbus_message_iter_append_basic(iter, DBUS_TYPE_BYTE,
+ &session->channel);
+
+ return TRUE;
+}
+
static const GDBusMethodTable session_methods[] = {
- { GDBUS_METHOD("GetProperties",
- NULL, GDBUS_ARGS({ "properties", "a{sv}" }),
- session_get_properties) },
{ GDBUS_ASYNC_METHOD("GetCapabilities",
NULL, GDBUS_ARGS({ "capabilities", "s" }),
get_capabilities) },
{ }
};
+static const GDBusPropertyTable session_properties[] = {
+ { "Source", "s", get_source, NULL, source_exists },
+ { "Destination", "s", get_destination },
+ { "Channel", "y", get_channel },
+ { }
+};
+
static gboolean session_queue_complete(gpointer data)
{
struct obc_session *session = data;
--
1.7.11.7
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH BlueZ 3/4] obex-client: Port transfer code to use D-Bus properties interface
2012-12-14 21:31 [PATCH BlueZ 1/4] obex-client: Port MAP module to use D-Bus properties interface Luiz Augusto von Dentz
2012-12-14 21:31 ` [PATCH BlueZ 2/4] obex-client: Port session code " Luiz Augusto von Dentz
@ 2012-12-14 21:31 ` Luiz Augusto von Dentz
2012-12-14 21:32 ` [PATCH BlueZ 4/4] test: Update map-client " Luiz Augusto von Dentz
2012-12-16 11:28 ` [PATCH BlueZ 1/4] obex-client: Port MAP module " Johan Hedberg
3 siblings, 0 replies; 5+ messages in thread
From: Luiz Augusto von Dentz @ 2012-12-14 21:31 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
---
doc/obex-client-api.txt | 12 --------
obexd/client/transfer.c | 80 +++++++++++++++++++++++++++++++++++++++++++++----
2 files changed, 74 insertions(+), 18 deletions(-)
diff --git a/doc/obex-client-api.txt b/doc/obex-client-api.txt
index f516760..817ca71 100644
--- a/doc/obex-client-api.txt
+++ b/doc/obex-client-api.txt
@@ -535,18 +535,6 @@ Methods object, dict Get(string targetfile, boolean attachment)
The properties of this transfer are also returned along
with the object path, to avoid a call to GetProperties.
- dict GetProperties()
-
- Returns all properties for the message. See the
- properties section for available properties.
-
- void SetProperty (string name, variant value)
-
- Sets value to the mentioned property.
-
- Possible properties: Read and Deleted.
-
-
Properties string Subject [readonly]
Message subject
diff --git a/obexd/client/transfer.c b/obexd/client/transfer.c
index 38c99cd..29d61f3 100644
--- a/obexd/client/transfer.c
+++ b/obexd/client/transfer.c
@@ -231,24 +231,91 @@ static DBusMessage *obc_transfer_cancel(DBusConnection *connection,
return NULL;
}
+static gboolean get_name(const GDBusPropertyTable *property,
+ DBusMessageIter *iter, void *data)
+{
+ struct obc_transfer *transfer = data;
+
+ dbus_message_iter_append_basic(iter, DBUS_TYPE_STRING,
+ &transfer->name);
+
+ return TRUE;
+}
+
+static gboolean get_size(const GDBusPropertyTable *property,
+ DBusMessageIter *iter, void *data)
+{
+ struct obc_transfer *transfer = data;
+
+ dbus_message_iter_append_basic(iter, DBUS_TYPE_UINT64,
+ &transfer->size);
+
+ return TRUE;
+}
+
+static gboolean filename_exists(const GDBusPropertyTable *property, void *data)
+{
+ struct obc_transfer *transfer = data;
+
+ return transfer->filename != NULL;
+}
+
+static gboolean get_filename(const GDBusPropertyTable *property,
+ DBusMessageIter *iter, void *data)
+{
+ struct obc_transfer *transfer = data;
+
+ if (transfer->filename == NULL)
+ return FALSE;
+
+ dbus_message_iter_append_basic(iter, DBUS_TYPE_STRING,
+ &transfer->filename);
+
+ return TRUE;
+}
+
+static gboolean progress_exists(const GDBusPropertyTable *property, void *data)
+{
+ struct obc_transfer *transfer = data;
+
+ return transfer->obex != NULL;
+}
+
+static gboolean get_progress(const GDBusPropertyTable *property,
+ DBusMessageIter *iter, void *data)
+{
+ struct obc_transfer *transfer = data;
+
+ if (transfer->obex == NULL)
+ return FALSE;
+
+ dbus_message_iter_append_basic(iter, DBUS_TYPE_UINT64,
+ &transfer->progress);
+
+ return TRUE;
+}
+
static const GDBusMethodTable obc_transfer_methods[] = {
- { GDBUS_METHOD("GetProperties",
- NULL, GDBUS_ARGS({ "properties", "a{sv}" }),
- obc_transfer_get_properties) },
{ GDBUS_ASYNC_METHOD("Cancel", NULL, NULL,
obc_transfer_cancel) },
{ }
};
static const GDBusSignalTable obc_transfer_signals[] = {
- { GDBUS_SIGNAL("PropertyChanged",
- GDBUS_ARGS({ "name", "s" }, { "value", "v" })) },
{ GDBUS_SIGNAL("Complete", NULL) },
{ GDBUS_SIGNAL("Error",
GDBUS_ARGS({ "code", "s" }, { "message", "s" })) },
{ }
};
+static const GDBusPropertyTable obc_transfer_properties[] = {
+ { "Name", "s", get_name },
+ { "Size", "t", get_size },
+ { "Filename", "s", get_filename, NULL, filename_exists },
+ { "Progress", "t", get_progress, NULL, progress_exists },
+ { }
+};
+
static void obc_transfer_free(struct obc_transfer *transfer)
{
DBG("%p", transfer);
@@ -325,7 +392,8 @@ gboolean obc_transfer_register(struct obc_transfer *transfer,
if (g_dbus_register_interface(transfer->conn, transfer->path,
TRANSFER_INTERFACE,
obc_transfer_methods, obc_transfer_signals,
- NULL, transfer, NULL) == FALSE) {
+ obc_transfer_properties, transfer,
+ NULL) == FALSE) {
g_set_error(err, OBC_TRANSFER_ERROR, -EFAULT,
"Unable to register to D-Bus");
return FALSE;
--
1.7.11.7
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH BlueZ 4/4] test: Update map-client to use D-Bus properties interface
2012-12-14 21:31 [PATCH BlueZ 1/4] obex-client: Port MAP module to use D-Bus properties interface Luiz Augusto von Dentz
2012-12-14 21:31 ` [PATCH BlueZ 2/4] obex-client: Port session code " Luiz Augusto von Dentz
2012-12-14 21:31 ` [PATCH BlueZ 3/4] obex-client: Port transfer " Luiz Augusto von Dentz
@ 2012-12-14 21:32 ` Luiz Augusto von Dentz
2012-12-16 11:28 ` [PATCH BlueZ 1/4] obex-client: Port MAP module " Johan Hedberg
3 siblings, 0 replies; 5+ messages in thread
From: Luiz Augusto von Dentz @ 2012-12-14 21:32 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
---
test/map-client | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/test/map-client b/test/map-client
index 756ebb8..39dd79f 100755
--- a/test/map-client
+++ b/test/map-client
@@ -136,8 +136,8 @@ class MapClient:
self.map.ListMessages("", dict())
path = self.path + "/message" + handle
obj = bus.get_object("org.bluez.obex.client", path)
- msg = dbus.Interface(obj, "org.bluez.obex.Message")
- ret = msg.GetProperties()
+ msg = dbus.Interface(obj, "org.freedesktop.DBus.Properties")
+ ret = msg.GetAll("org.bluez.obex.Message")
print pformat(unwrap(ret))
def set_message_property(self, handle, prop, flag):
--
1.7.11.7
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH BlueZ 1/4] obex-client: Port MAP module to use D-Bus properties interface
2012-12-14 21:31 [PATCH BlueZ 1/4] obex-client: Port MAP module to use D-Bus properties interface Luiz Augusto von Dentz
` (2 preceding siblings ...)
2012-12-14 21:32 ` [PATCH BlueZ 4/4] test: Update map-client " Luiz Augusto von Dentz
@ 2012-12-16 11:28 ` Johan Hedberg
3 siblings, 0 replies; 5+ messages in thread
From: Johan Hedberg @ 2012-12-16 11:28 UTC (permalink / raw)
To: Luiz Augusto von Dentz; +Cc: linux-bluetooth
Hi Luiz,
On Fri, Dec 14, 2012, Luiz Augusto von Dentz wrote:
> ---
> obexd/client/map.c | 315 ++++++++++++++++++++++++++++++-----------------------
> 1 file changed, 178 insertions(+), 137 deletions(-)
All patches in this set have been applied. Thanks.
Johan
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-12-16 11:28 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-14 21:31 [PATCH BlueZ 1/4] obex-client: Port MAP module to use D-Bus properties interface Luiz Augusto von Dentz
2012-12-14 21:31 ` [PATCH BlueZ 2/4] obex-client: Port session code " Luiz Augusto von Dentz
2012-12-14 21:31 ` [PATCH BlueZ 3/4] obex-client: Port transfer " Luiz Augusto von Dentz
2012-12-14 21:32 ` [PATCH BlueZ 4/4] test: Update map-client " Luiz Augusto von Dentz
2012-12-16 11:28 ` [PATCH BlueZ 1/4] obex-client: Port MAP module " Johan Hedberg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox