All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] Add Application property to HealthChannel
@ 2010-11-03 14:06 Elvis Pfützenreuter
  2010-11-03 14:06 ` [PATCH 2/2] Small fix in Health API documentation Elvis Pfützenreuter
  2010-11-06 10:56 ` [PATCH 1/2] Add Application property to HealthChannel Johan Hedberg
  0 siblings, 2 replies; 3+ messages in thread
From: Elvis Pfützenreuter @ 2010-11-03 14:06 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: epx

This patch adds the Application property to HealthChannel, which
allows to unambiguously relate a channel to an application.

This property is useful when there are several processes interested
in accepting HealthChannels but device address is not sufficient
criteria to engage upon, or ignore, the ChannelConnected signal.
Having the application path allows to determine role and data type,
in the context of the process that has created that application.
---
 doc/health-api.txt |    5 +++++
 health/hdp.c       |    3 +++
 2 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/doc/health-api.txt b/doc/health-api.txt
index 89d5ff9..3034666 100644
--- a/doc/health-api.txt
+++ b/doc/health-api.txt
@@ -160,3 +160,8 @@ Properties:
 
 		Identifies the Remote Device that is connected with. Maps with
 		a HealthDevice object.
+
+	object Application [readonly]
+
+		Identifies the HealthApplication to which this channel is
+		related to (which indirectly defines its role and data type).
diff --git a/health/hdp.c b/health/hdp.c
index be30204..1eba8e1 100644
--- a/health/hdp.c
+++ b/health/hdp.c
@@ -423,6 +423,9 @@ static DBusMessage *channel_get_properties(DBusConnection *conn,
 	path = device_get_path(chan->dev->dev);
 	dict_append_entry(&dict, "Device", DBUS_TYPE_OBJECT_PATH, &path);
 
+	path = chan->app->path;
+	dict_append_entry(&dict, "Application", DBUS_TYPE_OBJECT_PATH, &path);
+
 	if (chan->config == HDP_RELIABLE_DC)
 		type = g_strdup("Reliable");
 	else
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] Small fix in Health API documentation
  2010-11-03 14:06 [PATCH 1/2] Add Application property to HealthChannel Elvis Pfützenreuter
@ 2010-11-03 14:06 ` Elvis Pfützenreuter
  2010-11-06 10:56 ` [PATCH 1/2] Add Application property to HealthChannel Johan Hedberg
  1 sibling, 0 replies; 3+ messages in thread
From: Elvis Pfützenreuter @ 2010-11-03 14:06 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: epx

Channel path skeleton is fixed in documentation, in order to
reflect atual implementation.
---
 doc/health-api.txt |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/doc/health-api.txt b/doc/health-api.txt
index 3034666..a0a1685 100644
--- a/doc/health-api.txt
+++ b/doc/health-api.txt
@@ -119,8 +119,7 @@ Properties:
 
 Service		org.bluez
 Interface	org.bluez.HealthChannel
-Object path	[variable prefix]/{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX/
-							hdp_YYYY/channel_ZZ
+Object path	[variable prefix]/{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX/chanZZZ
 
 Only the process that created the data channel or the creator of the
 HealthApplication that received it will be able to call this methods.
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/2] Add Application property to HealthChannel
  2010-11-03 14:06 [PATCH 1/2] Add Application property to HealthChannel Elvis Pfützenreuter
  2010-11-03 14:06 ` [PATCH 2/2] Small fix in Health API documentation Elvis Pfützenreuter
@ 2010-11-06 10:56 ` Johan Hedberg
  1 sibling, 0 replies; 3+ messages in thread
From: Johan Hedberg @ 2010-11-06 10:56 UTC (permalink / raw)
  To: Elvis Pfützenreuter; +Cc: linux-bluetooth

Hi Elvis,

On Wed, Nov 03, 2010, Elvis Pfützenreuter wrote:
> This patch adds the Application property to HealthChannel, which
> allows to unambiguously relate a channel to an application.
> 
> This property is useful when there are several processes interested
> in accepting HealthChannels but device address is not sufficient
> criteria to engage upon, or ignore, the ChannelConnected signal.
> Having the application path allows to determine role and data type,
> in the context of the process that has created that application.
> ---
>  doc/health-api.txt |    5 +++++
>  health/hdp.c       |    3 +++
>  2 files changed, 8 insertions(+), 0 deletions(-)

Both patches have been pushed upstream. Thanks.

Johan

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-11-06 10:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-03 14:06 [PATCH 1/2] Add Application property to HealthChannel Elvis Pfützenreuter
2010-11-03 14:06 ` [PATCH 2/2] Small fix in Health API documentation Elvis Pfützenreuter
2010-11-06 10:56 ` [PATCH 1/2] Add Application property to HealthChannel Johan Hedberg

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.