diff mbox series

[BlueZ,v2] profile: Add exception to battery profile for external access

Message ID 20200715224740.238527-1-sonnysasaka@chromium.org (mailing list archive)
State Accepted
Headers show
Series [BlueZ,v2] profile: Add exception to battery profile for external access | expand

Commit Message

Sonny Sasaka July 15, 2020, 10:47 p.m. UTC
This gives exception to battery profile to be shared both internally and
externally.

---
 profiles/battery/battery.c | 1 +
 src/profile.h              | 4 ++++
 2 files changed, 5 insertions(+)

Comments

Sonny Sasaka July 17, 2020, 8:13 p.m. UTC | #1
Friendly ping on this simple patch.

On Wed, Jul 15, 2020 at 3:47 PM Sonny Sasaka <sonnysasaka@chromium.org> wrote:
>
> This gives exception to battery profile to be shared both internally and
> externally.
>
> ---
>  profiles/battery/battery.c | 1 +
>  src/profile.h              | 4 ++++
>  2 files changed, 5 insertions(+)
>
> diff --git a/profiles/battery/battery.c b/profiles/battery/battery.c
> index 4da4355a1..c9a1af4b9 100644
> --- a/profiles/battery/battery.c
> +++ b/profiles/battery/battery.c
> @@ -354,6 +354,7 @@ static struct btd_profile batt_profile = {
>         .device_remove  = batt_remove,
>         .accept         = batt_accept,
>         .disconnect     = batt_disconnect,
> +       .external       = true,
>  };
>
>  static int batt_init(void)
> diff --git a/src/profile.h b/src/profile.h
> index 4448a2a6d..95523e50a 100644
> --- a/src/profile.h
> +++ b/src/profile.h
> @@ -35,6 +35,10 @@ struct btd_profile {
>         const char *remote_uuid;
>
>         bool auto_connect;
> +       /* Some profiles are considered safe to be handled internally and also
> +        * be exposed in the GATT API. This flag give such profiles exception
> +        * from being claimed internally.
> +        */
>         bool external;
>
>         int (*device_probe) (struct btd_service *service);
> --
> 2.26.2
>
Luiz Augusto von Dentz July 17, 2020, 8:33 p.m. UTC | #2
Hi Sonny,

On Fri, Jul 17, 2020 at 1:17 PM Sonny Sasaka <sonnysasaka@chromium.org> wrote:
>
> Friendly ping on this simple patch.
>
> On Wed, Jul 15, 2020 at 3:47 PM Sonny Sasaka <sonnysasaka@chromium.org> wrote:
> >
> > This gives exception to battery profile to be shared both internally and
> > externally.
> >
> > ---
> >  profiles/battery/battery.c | 1 +
> >  src/profile.h              | 4 ++++
> >  2 files changed, 5 insertions(+)
> >
> > diff --git a/profiles/battery/battery.c b/profiles/battery/battery.c
> > index 4da4355a1..c9a1af4b9 100644
> > --- a/profiles/battery/battery.c
> > +++ b/profiles/battery/battery.c
> > @@ -354,6 +354,7 @@ static struct btd_profile batt_profile = {
> >         .device_remove  = batt_remove,
> >         .accept         = batt_accept,
> >         .disconnect     = batt_disconnect,
> > +       .external       = true,
> >  };
> >
> >  static int batt_init(void)
> > diff --git a/src/profile.h b/src/profile.h
> > index 4448a2a6d..95523e50a 100644
> > --- a/src/profile.h
> > +++ b/src/profile.h
> > @@ -35,6 +35,10 @@ struct btd_profile {
> >         const char *remote_uuid;
> >
> >         bool auto_connect;
> > +       /* Some profiles are considered safe to be handled internally and also
> > +        * be exposed in the GATT API. This flag give such profiles exception
> > +        * from being claimed internally.
> > +        */
> >         bool external;
> >
> >         int (*device_probe) (struct btd_service *service);
> > --
> > 2.26.2
> >

I've might have forgotten to announce it on the mailing list but this
has been applied for a while:

commit 0509a4a217256ac46020b957a6532dc150729748 (HEAD -> master)
Author: Sonny Sasaka <sonnysasaka@chromium.org>
Date:   Wed Jul 15 15:47:40 2020 -0700

    profile: Add exception to battery profile for external access

    This gives exception to battery profile to be shared both internally and
    externally.
Luiz Augusto von Dentz July 17, 2020, 8:38 p.m. UTC | #3
Hi Sonny,

On Fri, Jul 17, 2020 at 1:33 PM Luiz Augusto von Dentz
<luiz.dentz@gmail.com> wrote:
>
> Hi Sonny,
>
> On Fri, Jul 17, 2020 at 1:17 PM Sonny Sasaka <sonnysasaka@chromium.org> wrote:
> >
> > Friendly ping on this simple patch.
> >
> > On Wed, Jul 15, 2020 at 3:47 PM Sonny Sasaka <sonnysasaka@chromium.org> wrote:
> > >
> > > This gives exception to battery profile to be shared both internally and
> > > externally.
> > >
> > > ---
> > >  profiles/battery/battery.c | 1 +
> > >  src/profile.h              | 4 ++++
> > >  2 files changed, 5 insertions(+)
> > >
> > > diff --git a/profiles/battery/battery.c b/profiles/battery/battery.c
> > > index 4da4355a1..c9a1af4b9 100644
> > > --- a/profiles/battery/battery.c
> > > +++ b/profiles/battery/battery.c
> > > @@ -354,6 +354,7 @@ static struct btd_profile batt_profile = {
> > >         .device_remove  = batt_remove,
> > >         .accept         = batt_accept,
> > >         .disconnect     = batt_disconnect,
> > > +       .external       = true,
> > >  };
> > >
> > >  static int batt_init(void)
> > > diff --git a/src/profile.h b/src/profile.h
> > > index 4448a2a6d..95523e50a 100644
> > > --- a/src/profile.h
> > > +++ b/src/profile.h
> > > @@ -35,6 +35,10 @@ struct btd_profile {
> > >         const char *remote_uuid;
> > >
> > >         bool auto_connect;
> > > +       /* Some profiles are considered safe to be handled internally and also
> > > +        * be exposed in the GATT API. This flag give such profiles exception
> > > +        * from being claimed internally.
> > > +        */
> > >         bool external;
> > >
> > >         int (*device_probe) (struct btd_service *service);
> > > --
> > > 2.26.2
> > >
>
> I've might have forgotten to announce it on the mailing list but this
> has been applied for a while:
>
> commit 0509a4a217256ac46020b957a6532dc150729748 (HEAD -> master)
> Author: Sonny Sasaka <sonnysasaka@chromium.org>
> Date:   Wed Jul 15 15:47:40 2020 -0700
>
>     profile: Add exception to battery profile for external access
>
>     This gives exception to battery profile to be shared both internally and
>     externally.

Nevermind, it was just in my local tree for some reason, now I've applied it.
Sonny Sasaka July 17, 2020, 9:36 p.m. UTC | #4
Thanks, Luiz.

On Fri, Jul 17, 2020 at 1:38 PM Luiz Augusto von Dentz
<luiz.dentz@gmail.com> wrote:
>
> Hi Sonny,
>
> On Fri, Jul 17, 2020 at 1:33 PM Luiz Augusto von Dentz
> <luiz.dentz@gmail.com> wrote:
> >
> > Hi Sonny,
> >
> > On Fri, Jul 17, 2020 at 1:17 PM Sonny Sasaka <sonnysasaka@chromium.org> wrote:
> > >
> > > Friendly ping on this simple patch.
> > >
> > > On Wed, Jul 15, 2020 at 3:47 PM Sonny Sasaka <sonnysasaka@chromium.org> wrote:
> > > >
> > > > This gives exception to battery profile to be shared both internally and
> > > > externally.
> > > >
> > > > ---
> > > >  profiles/battery/battery.c | 1 +
> > > >  src/profile.h              | 4 ++++
> > > >  2 files changed, 5 insertions(+)
> > > >
> > > > diff --git a/profiles/battery/battery.c b/profiles/battery/battery.c
> > > > index 4da4355a1..c9a1af4b9 100644
> > > > --- a/profiles/battery/battery.c
> > > > +++ b/profiles/battery/battery.c
> > > > @@ -354,6 +354,7 @@ static struct btd_profile batt_profile = {
> > > >         .device_remove  = batt_remove,
> > > >         .accept         = batt_accept,
> > > >         .disconnect     = batt_disconnect,
> > > > +       .external       = true,
> > > >  };
> > > >
> > > >  static int batt_init(void)
> > > > diff --git a/src/profile.h b/src/profile.h
> > > > index 4448a2a6d..95523e50a 100644
> > > > --- a/src/profile.h
> > > > +++ b/src/profile.h
> > > > @@ -35,6 +35,10 @@ struct btd_profile {
> > > >         const char *remote_uuid;
> > > >
> > > >         bool auto_connect;
> > > > +       /* Some profiles are considered safe to be handled internally and also
> > > > +        * be exposed in the GATT API. This flag give such profiles exception
> > > > +        * from being claimed internally.
> > > > +        */
> > > >         bool external;
> > > >
> > > >         int (*device_probe) (struct btd_service *service);
> > > > --
> > > > 2.26.2
> > > >
> >
> > I've might have forgotten to announce it on the mailing list but this
> > has been applied for a while:
> >
> > commit 0509a4a217256ac46020b957a6532dc150729748 (HEAD -> master)
> > Author: Sonny Sasaka <sonnysasaka@chromium.org>
> > Date:   Wed Jul 15 15:47:40 2020 -0700
> >
> >     profile: Add exception to battery profile for external access
> >
> >     This gives exception to battery profile to be shared both internally and
> >     externally.
>
> Nevermind, it was just in my local tree for some reason, now I've applied it.
>
> --
> Luiz Augusto von Dentz
diff mbox series

Patch

diff --git a/profiles/battery/battery.c b/profiles/battery/battery.c
index 4da4355a1..c9a1af4b9 100644
--- a/profiles/battery/battery.c
+++ b/profiles/battery/battery.c
@@ -354,6 +354,7 @@  static struct btd_profile batt_profile = {
 	.device_remove	= batt_remove,
 	.accept		= batt_accept,
 	.disconnect	= batt_disconnect,
+	.external	= true,
 };
 
 static int batt_init(void)
diff --git a/src/profile.h b/src/profile.h
index 4448a2a6d..95523e50a 100644
--- a/src/profile.h
+++ b/src/profile.h
@@ -35,6 +35,10 @@  struct btd_profile {
 	const char *remote_uuid;
 
 	bool auto_connect;
+	/* Some profiles are considered safe to be handled internally and also
+	 * be exposed in the GATT API. This flag give such profiles exception
+	 * from being claimed internally.
+	 */
 	bool external;
 
 	int (*device_probe) (struct btd_service *service);