profile: Add exception to battery profile for external access
authorSonny Sasaka <sonnysasaka@chromium.org>
Wed, 15 Jul 2020 22:47:40 +0000 (15:47 -0700)
committerAyush Garg <ayush.garg@samsung.com>
Mon, 12 Apr 2021 09:00:49 +0000 (14:30 +0530)
This gives exception to battery profile to be shared both internally and
externally.

Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
profiles/battery/battery.c
src/profile.h

index 4da4355..c9a1af4 100644 (file)
@@ -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)
index bbdf05d..612dcd2 100644 (file)
@@ -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);