Skip to content

Commit

Permalink
[dbus] Track org.bluez service availability. JB#18661
Browse files Browse the repository at this point in the history
Track org.bluez name ownership on D-Bus SystemBus and expose bluetooth
service availability within mce via bluez_available_pipe datapipe.

Signed-off-by: Simo Piiroinen <simo.piiroinen@jollamobile.com>
  • Loading branch information
spiiroin committed Nov 24, 2016
1 parent 4ea22d1 commit 3934a09
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
7 changes: 7 additions & 0 deletions datapipe.c
Expand Up @@ -184,6 +184,9 @@ datapipe_struct ngfd_available_pipe;
/** dsme availability; read only */
datapipe_struct dsme_available_pipe;

/** bluez availability; read only */
datapipe_struct bluez_available_pipe;

/** PackageKit Locked status; read only */
datapipe_struct packagekit_locked_pipe;

Expand Down Expand Up @@ -913,6 +916,9 @@ void mce_datapipe_init(void)
setup_datapipe(&dsme_available_pipe, READ_ONLY, DONT_FREE_CACHE,
0, GINT_TO_POINTER(SERVICE_STATE_UNDEF));

setup_datapipe(&bluez_available_pipe, READ_ONLY, DONT_FREE_CACHE,
0, GINT_TO_POINTER(SERVICE_STATE_UNDEF));

setup_datapipe(&packagekit_locked_pipe, READ_ONLY, DONT_FREE_CACHE,
0, GINT_TO_POINTER(FALSE));
setup_datapipe(&update_mode_pipe, READ_ONLY, DONT_FREE_CACHE,
Expand Down Expand Up @@ -991,6 +997,7 @@ void mce_datapipe_quit(void)
free_datapipe(&usbmoded_available_pipe);
free_datapipe(&ngfd_available_pipe);
free_datapipe(&dsme_available_pipe);
free_datapipe(&bluez_available_pipe);
free_datapipe(&packagekit_locked_pipe);
free_datapipe(&update_mode_pipe);
free_datapipe(&shutting_down_pipe);
Expand Down
1 change: 1 addition & 0 deletions datapipe.h
Expand Up @@ -140,6 +140,7 @@ extern datapipe_struct lipstick_available_pipe;
extern datapipe_struct usbmoded_available_pipe;
extern datapipe_struct ngfd_available_pipe;
extern datapipe_struct dsme_available_pipe;
extern datapipe_struct bluez_available_pipe;
extern datapipe_struct packagekit_locked_pipe;
extern datapipe_struct update_mode_pipe;
extern datapipe_struct shutting_down_pipe;
Expand Down
4 changes: 4 additions & 0 deletions mce-dbus.c
Expand Up @@ -3594,6 +3594,10 @@ static struct
.name = DSME_DBUS_SERVICE,
.datapipe = &dsme_available_pipe,
},
{
.name = "org.bluez",
.datapipe = &bluez_available_pipe,
},
{
.name = COMPOSITOR_SERVICE,
.datapipe = &compositor_available_pipe,
Expand Down

0 comments on commit 3934a09

Please sign in to comment.