All of lore.kernel.org
 help / color / mirror / Atom feed
From: Szymon Janc <szymon.janc@tieto.com>
To: <linux-bluetooth@vger.kernel.org>
Cc: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
Subject: [PATCH 13/14] neard: Updated neard handover registration agent api calls.
Date: Thu, 7 Feb 2013 09:14:03 +0100	[thread overview]
Message-ID: <1360224844-12280-14-git-send-email-szymon.janc@tieto.com> (raw)
In-Reply-To: <1360224844-12280-1-git-send-email-szymon.janc@tieto.com>

From: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>

neard RegisterHandoverAgent and UnregisterHandoverAgent apis
need an extra parameter of carrier type(e.g. bluetooth).
---
 plugins/neard.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/plugins/neard.c b/plugins/neard.c
index ab51057..9a4a924 100644
--- a/plugins/neard.c
+++ b/plugins/neard.c
@@ -46,6 +46,7 @@
 #define NEARD_MANAGER_INTERFACE "org.neard.Manager"
 #define AGENT_INTERFACE "org.neard.HandoverAgent"
 #define AGENT_PATH "/org/bluez/neard_handover_agent"
+#define AGENT_CARRIER_TYPE "bluetooth"
 #define ERROR_INTERFACE "org.neard.HandoverAgent.Error"
 
 static guint watcher_id = 0;
@@ -123,6 +124,7 @@ static void register_agent(void)
 	DBusMessage *message;
 	DBusPendingCall *call;
 	const char *path = AGENT_PATH;
+	const char *carrier = AGENT_CARRIER_TYPE;
 
 	message = dbus_message_new_method_call(NEARD_NAME, NEARD_PATH,
 			NEARD_MANAGER_INTERFACE, "RegisterHandoverAgent");
@@ -134,6 +136,9 @@ static void register_agent(void)
 	dbus_message_append_args(message, DBUS_TYPE_OBJECT_PATH, &path,
 							DBUS_TYPE_INVALID);
 
+	dbus_message_append_args(message, DBUS_TYPE_STRING, &carrier,
+							DBUS_TYPE_INVALID);
+
 	if (!dbus_connection_send_with_reply(btd_get_dbus_connection(),
 							message, &call, -1)) {
 		dbus_message_unref(message);
@@ -151,6 +156,7 @@ static void unregister_agent(void)
 {
 	DBusMessage *message;
 	const char *path = AGENT_PATH;
+	const char *carrier = AGENT_CARRIER_TYPE;
 
 	g_free(neard_path);
 	neard_path = NULL;
@@ -166,6 +172,9 @@ static void unregister_agent(void)
 	dbus_message_append_args(message, DBUS_TYPE_OBJECT_PATH, &path,
 						DBUS_TYPE_INVALID);
 
+	dbus_message_append_args(message, DBUS_TYPE_STRING, &carrier,
+							DBUS_TYPE_INVALID);
+
 	if (!g_dbus_send_message(btd_get_dbus_connection(), message))
 		error("D-Bus send failed");
 
-- 
1.8.1.1


  parent reply	other threads:[~2013-02-07  8:14 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-07  8:13 [PATCH 00/14] neard plugin update Szymon Janc
2013-02-07  8:13 ` [PATCH 01/14] neard: Adjust errors to latest API changes Szymon Janc
2013-02-07  8:13 ` [PATCH 02/14] neard: Refactor message processing Szymon Janc
2013-02-07  8:13 ` [PATCH 03/14] neard: Add ability to parse 'State' field Szymon Janc
2013-02-07  8:13 ` [PATCH 04/14] neard: Move pairable check from check_adapter Szymon Janc
2013-02-07  8:13 ` [PATCH 05/14] adapter: Add btd_adapter_get_powered function Szymon Janc
2013-02-07  8:13 ` [PATCH 06/14] neard: Check if adapter is powered in PushOOB Szymon Janc
2013-02-07  8:13 ` [PATCH 07/14] adapter: Add btd_adapter_get_connectable function Szymon Janc
2013-02-07  8:13 ` [PATCH 08/14] neard: Add support for setting power state in RequestOOB reply Szymon Janc
2013-02-07  8:13 ` [PATCH 09/14] neard: Use path instead of boolean to track if registered to neard Szymon Janc
2013-02-15  8:46   ` Johan Hedberg
2013-02-07  8:14 ` [PATCH 10/14] neard: Restrict method calls only to neard process Szymon Janc
2013-02-07  8:14 ` [PATCH 11/14] neard: Use bool instead of gboolean for agent_register_postpone Szymon Janc
2013-02-07  8:14 ` [PATCH 12/14] neard: Update copyright information Szymon Janc
2013-02-07  8:14 ` Szymon Janc [this message]
2013-02-07  8:14 ` [PATCH 14/14] neard: Add fallback to legacy register if register failed Szymon Janc
2013-02-11  9:52 ` [PATCH 00/14] neard plugin update Szymon Janc

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=1360224844-12280-14-git-send-email-szymon.janc@tieto.com \
    --to=szymon.janc@tieto.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=ravikumar.veeramally@linux.intel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.