From: Ronald Tessier <ronald.tessier@linux.intel.com>
To: ofono@ofono.org
Subject: [PATCHv1 1/5] service: Add GetConversation method
Date: Wed, 25 Apr 2012 11:01:49 +0200 [thread overview]
Message-ID: <1335344513-2347-2-git-send-email-ronald.tessier@linux.intel.com> (raw)
In-Reply-To: <1335344513-2347-1-git-send-email-ronald.tessier@linux.intel.com>
[-- Attachment #1: Type: text/plain, Size: 1262 bytes --]
---
src/service.c | 21 +++++++++++++++++++++
1 files changed, 21 insertions(+), 0 deletions(-)
diff --git a/src/service.c b/src/service.c
index f89fd3f..24c89b6 100644
--- a/src/service.c
+++ b/src/service.c
@@ -690,6 +690,26 @@ static DBusMessage *get_messages(DBusConnection *conn,
return reply;
}
+static DBusMessage *get_conversation(DBusConnection *conn,
+ DBusMessage *dbus_msg, void *data)
+{
+ DBusMessage *reply;
+ DBusMessageIter iter, array;
+
+ reply = dbus_message_new_method_return(dbus_msg);
+ if (reply == NULL)
+ return __mms_error_trans_failure(dbus_msg);
+
+ dbus_message_iter_init_append(reply, &iter);
+
+ dbus_message_iter_open_container(&iter, DBUS_TYPE_ARRAY,
+ "(oa{sv})", &array);
+
+ dbus_message_iter_close_container(&iter, &array);
+
+ return reply;
+}
+
static gboolean mms_attachment_is_smil(const struct mms_attachment *part)
{
if (g_str_has_prefix(part->content_type, "application/smil"))
@@ -813,6 +833,7 @@ release_msg:
static GDBusMethodTable service_methods[] = {
{ "SendMessage", "assa(sss)", "o", send_message },
{ "GetMessages", "", "a(oa{sv})", get_messages },
+ { "GetConversation", "su", "a(oa{sv})", get_conversation },
{ }
};
--
1.7.4.1
next prev parent reply other threads:[~2012-04-25 9:01 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-25 9:01 [PATCHv1 0/5] mmsd: GetConversation support Ronald Tessier
2012-04-25 9:01 ` Ronald Tessier [this message]
2012-04-27 12:26 ` [PATCHv1 1/5] service: Add GetConversation method Marcel Holtmann
2012-04-25 9:01 ` [PATCHv1 2/5] service: Retrieve get_conversation() args Ronald Tessier
2012-04-27 12:25 ` Marcel Holtmann
2012-04-25 9:01 ` [PATCHv1 3/5] service: Fill conversation list with messages Ronald Tessier
2012-04-27 12:25 ` Marcel Holtmann
2012-04-25 9:01 ` [PATCHv1 4/5] service: Sort conversation list by message date Ronald Tessier
2012-04-27 12:23 ` Marcel Holtmann
2012-04-25 9:01 ` [PATCHv1 5/5] doc: Update service-api.txt Ronald Tessier
2012-04-27 12:20 ` Marcel Holtmann
2012-04-27 13:30 ` Ronald Tessier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1335344513-2347-2-git-send-email-ronald.tessier@linux.intel.com \
--to=ronald.tessier@linux.intel.com \
--cc=ofono@ofono.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox