* [PATCH 1/3] bluez5: Add role parameter to bt_register_profile
@ 2013-02-25 20:36 Paulo Borges
2013-02-25 20:36 ` [PATCH 2/3] hfp_hf_bluez5: Change register profile call Paulo Borges
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Paulo Borges @ 2013-02-25 20:36 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 1556 bytes --]
This commit allows asymmetric profiles that do not have UUIDs
available to uniquely identify which role is been registered.
---
plugins/bluez5.c | 5 ++++-
plugins/bluez5.h | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/plugins/bluez5.c b/plugins/bluez5.c
index 788f3a2..04dd39d 100644
--- a/plugins/bluez5.c
+++ b/plugins/bluez5.c
@@ -110,7 +110,7 @@ done:
int bt_register_profile(DBusConnection *conn, const char *uuid,
uint16_t version, const char *name,
- const char *object)
+ const char *object, const char* role)
{
DBusMessageIter iter, dict;
DBusPendingCall *c;
@@ -129,6 +129,9 @@ int bt_register_profile(DBusConnection *conn, const char *uuid,
ofono_dbus_dict_append(&dict, "Name", DBUS_TYPE_STRING, &name);
ofono_dbus_dict_append(&dict, "Version", DBUS_TYPE_UINT16, &version);
+ if (role)
+ ofono_dbus_dict_append(&dict, "Role", DBUS_TYPE_STRING, &role);
+
dbus_message_iter_close_container(&iter, &dict);
if (!dbus_connection_send_with_reply(conn, msg, &c, -1)) {
diff --git a/plugins/bluez5.h b/plugins/bluez5.h
index 1432068..17e925f 100644
--- a/plugins/bluez5.h
+++ b/plugins/bluez5.h
@@ -71,7 +71,7 @@ int bt_bacmp(const bdaddr_t *ba1, const bdaddr_t *ba2);
int bt_register_profile(DBusConnection *conn, const char *uuid,
uint16_t version, const char *name,
- const char *object);
+ const char *object, const char *role);
void bt_unregister_profile(DBusConnection *conn, const char *object);
--
1.7.9.5
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/3] hfp_hf_bluez5: Change register profile call
2013-02-25 20:36 [PATCH 1/3] bluez5: Add role parameter to bt_register_profile Paulo Borges
@ 2013-02-25 20:36 ` Paulo Borges
2013-02-25 20:36 ` [PATCH 3/3] hfp_ag_bluez5: " Paulo Borges
` (2 subsequent siblings)
3 siblings, 0 replies; 7+ messages in thread
From: Paulo Borges @ 2013-02-25 20:36 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 611 bytes --]
---
plugins/hfp_hf_bluez5.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugins/hfp_hf_bluez5.c b/plugins/hfp_hf_bluez5.c
index 7057d71..ebe411a 100644
--- a/plugins/hfp_hf_bluez5.c
+++ b/plugins/hfp_hf_bluez5.c
@@ -529,7 +529,7 @@ static void connect_handler(DBusConnection *conn, void *user_data)
DBG("Registering External Profile handler ...");
bt_register_profile(conn, HFP_HS_UUID, local_hfp_version, "hfp_hf",
- HFP_EXT_PROFILE_PATH);
+ HFP_EXT_PROFILE_PATH, NULL);
}
static gboolean has_hfp_ag_uuid(DBusMessageIter *array)
--
1.7.9.5
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 3/3] hfp_ag_bluez5: Change register profile call
2013-02-25 20:36 [PATCH 1/3] bluez5: Add role parameter to bt_register_profile Paulo Borges
2013-02-25 20:36 ` [PATCH 2/3] hfp_hf_bluez5: Change register profile call Paulo Borges
@ 2013-02-25 20:36 ` Paulo Borges
2013-02-27 21:48 ` [PATCH 1/3] bluez5: Add role parameter to bt_register_profile Paulo Borges
2013-02-27 21:54 ` [PATCH v2] " Paulo Borges
3 siblings, 0 replies; 7+ messages in thread
From: Paulo Borges @ 2013-02-25 20:36 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 587 bytes --]
---
plugins/hfp_ag_bluez5.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugins/hfp_ag_bluez5.c b/plugins/hfp_ag_bluez5.c
index a81adfd..3c4a34e 100644
--- a/plugins/hfp_ag_bluez5.c
+++ b/plugins/hfp_ag_bluez5.c
@@ -181,7 +181,7 @@ static void sim_state_watch(enum ofono_sim_state new_state, void *data)
return;
bt_register_profile(conn, HFP_AG_UUID, HFP_VERSION_1_5, "hfp_ag",
- HFP_AG_EXT_PROFILE_PATH);
+ HFP_AG_EXT_PROFILE_PATH, NULL);
}
static gboolean sim_watch_remove(gpointer key, gpointer value,
--
1.7.9.5
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/3] bluez5: Add role parameter to bt_register_profile
2013-02-25 20:36 [PATCH 1/3] bluez5: Add role parameter to bt_register_profile Paulo Borges
2013-02-25 20:36 ` [PATCH 2/3] hfp_hf_bluez5: Change register profile call Paulo Borges
2013-02-25 20:36 ` [PATCH 3/3] hfp_ag_bluez5: " Paulo Borges
@ 2013-02-27 21:48 ` Paulo Borges
2013-02-27 21:54 ` [PATCH v2] " Paulo Borges
3 siblings, 0 replies; 7+ messages in thread
From: Paulo Borges @ 2013-02-27 21:48 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 2053 bytes --]
I will resend this patch due to a wrong commit message.
On Mon, Feb 25, 2013 at 5:36 PM, Paulo Borges <paulo.borges@openbossa.org>wrote:
> This commit allows asymmetric profiles that do not have UUIDs
> available to uniquely identify which role is been registered.
> ---
> plugins/bluez5.c | 5 ++++-
> plugins/bluez5.h | 2 +-
> 2 files changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/plugins/bluez5.c b/plugins/bluez5.c
> index 788f3a2..04dd39d 100644
> --- a/plugins/bluez5.c
> +++ b/plugins/bluez5.c
> @@ -110,7 +110,7 @@ done:
>
> int bt_register_profile(DBusConnection *conn, const char *uuid,
> uint16_t version, const char *name,
> - const char *object)
> + const char *object, const char*
> role)
> {
> DBusMessageIter iter, dict;
> DBusPendingCall *c;
> @@ -129,6 +129,9 @@ int bt_register_profile(DBusConnection *conn, const
> char *uuid,
> ofono_dbus_dict_append(&dict, "Name", DBUS_TYPE_STRING, &name);
> ofono_dbus_dict_append(&dict, "Version", DBUS_TYPE_UINT16,
> &version);
>
> + if (role)
> + ofono_dbus_dict_append(&dict, "Role", DBUS_TYPE_STRING,
> &role);
> +
> dbus_message_iter_close_container(&iter, &dict);
>
> if (!dbus_connection_send_with_reply(conn, msg, &c, -1)) {
> diff --git a/plugins/bluez5.h b/plugins/bluez5.h
> index 1432068..17e925f 100644
> --- a/plugins/bluez5.h
> +++ b/plugins/bluez5.h
> @@ -71,7 +71,7 @@ int bt_bacmp(const bdaddr_t *ba1, const bdaddr_t *ba2);
>
> int bt_register_profile(DBusConnection *conn, const char *uuid,
> uint16_t version, const char *name,
> - const char *object);
> + const char *object, const char
> *role);
>
> void bt_unregister_profile(DBusConnection *conn, const char *object);
>
> --
> 1.7.9.5
>
>
[-- Attachment #2: attachment.html --]
[-- Type: text/html, Size: 2462 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2] bluez5: Add role parameter to bt_register_profile
2013-02-25 20:36 [PATCH 1/3] bluez5: Add role parameter to bt_register_profile Paulo Borges
` (2 preceding siblings ...)
2013-02-27 21:48 ` [PATCH 1/3] bluez5: Add role parameter to bt_register_profile Paulo Borges
@ 2013-02-27 21:54 ` Paulo Borges
2013-03-01 19:42 ` Denis Kenzior
3 siblings, 1 reply; 7+ messages in thread
From: Paulo Borges @ 2013-02-27 21:54 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 1575 bytes --]
This commit allows asymmetric profiles that do not have UUIDs
available to uniquely identify each role specify which role is
been registered.
---
plugins/bluez5.c | 5 ++++-
plugins/bluez5.h | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/plugins/bluez5.c b/plugins/bluez5.c
index 9233a2b..bcae808 100644
--- a/plugins/bluez5.c
+++ b/plugins/bluez5.c
@@ -109,7 +109,7 @@ done:
int bt_register_profile(DBusConnection *conn, const char *uuid,
uint16_t version, const char *name,
- const char *object)
+ const char *object, const char* role)
{
DBusMessageIter iter, dict;
DBusPendingCall *c;
@@ -128,6 +128,9 @@ int bt_register_profile(DBusConnection *conn, const char *uuid,
ofono_dbus_dict_append(&dict, "Name", DBUS_TYPE_STRING, &name);
ofono_dbus_dict_append(&dict, "Version", DBUS_TYPE_UINT16, &version);
+ if (role)
+ ofono_dbus_dict_append(&dict, "Role", DBUS_TYPE_STRING, &role);
+
dbus_message_iter_close_container(&iter, &dict);
if (!dbus_connection_send_with_reply(conn, msg, &c, -1)) {
diff --git a/plugins/bluez5.h b/plugins/bluez5.h
index 1432068..17e925f 100644
--- a/plugins/bluez5.h
+++ b/plugins/bluez5.h
@@ -71,7 +71,7 @@ int bt_bacmp(const bdaddr_t *ba1, const bdaddr_t *ba2);
int bt_register_profile(DBusConnection *conn, const char *uuid,
uint16_t version, const char *name,
- const char *object);
+ const char *object, const char *role);
void bt_unregister_profile(DBusConnection *conn, const char *object);
--
1.7.9.5
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v2] bluez5: Add role parameter to bt_register_profile
2013-02-27 21:54 ` [PATCH v2] " Paulo Borges
@ 2013-03-01 19:42 ` Denis Kenzior
2013-03-01 20:02 ` Paulo Borges
0 siblings, 1 reply; 7+ messages in thread
From: Denis Kenzior @ 2013-03-01 19:42 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 525 bytes --]
Hi Paulo,
On 02/27/2013 03:54 PM, Paulo Borges wrote:
> This commit allows asymmetric profiles that do not have UUIDs
> available to uniquely identify each role specify which role is
> been registered.
> ---
> plugins/bluez5.c | 5 ++++-
> plugins/bluez5.h | 2 +-
> 2 files changed, 5 insertions(+), 2 deletions(-)
>
Which profiles actually need this? If this is an extreme minority, then
I'd rather see a dedicated function for this. e.g.
bt_register_profile_with_role()
Regards,
-Denis
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2] bluez5: Add role parameter to bt_register_profile
2013-03-01 19:42 ` Denis Kenzior
@ 2013-03-01 20:02 ` Paulo Borges
0 siblings, 0 replies; 7+ messages in thread
From: Paulo Borges @ 2013-03-01 20:02 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 295 bytes --]
> Which profiles actually need this? If this is an extreme minority, then
> I'd rather see a dedicated function for this. e.g.
>
> bt_register_profile_with_role(**)
>
> Regards,
> -Denis
>
Hi,
In oFono, only the DUN profile use it.
I'll create the new function, as specified.
[-- Attachment #2: attachment.html --]
[-- Type: text/html, Size: 849 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2013-03-01 20:02 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-25 20:36 [PATCH 1/3] bluez5: Add role parameter to bt_register_profile Paulo Borges
2013-02-25 20:36 ` [PATCH 2/3] hfp_hf_bluez5: Change register profile call Paulo Borges
2013-02-25 20:36 ` [PATCH 3/3] hfp_ag_bluez5: " Paulo Borges
2013-02-27 21:48 ` [PATCH 1/3] bluez5: Add role parameter to bt_register_profile Paulo Borges
2013-02-27 21:54 ` [PATCH v2] " Paulo Borges
2013-03-01 19:42 ` Denis Kenzior
2013-03-01 20:02 ` Paulo Borges
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.