Commit c0ae879d authored by Jussi Laakkonen's avatar Jussi Laakkonen

[notifier] Add storage uid changed notify functionality. JB#49506

Storage does need to inform about user id changes to other components
using the user change functionality. This enables informing about the
newly set uid.
parent 2877561f
......@@ -59,9 +59,10 @@ struct connman_notifier {
void (*idle_state) (bool idle);
void (*tethering_changed) (struct connman_technology *tech, bool on);
void (*device_status_changed) (struct connman_device *device, bool on);
void (*storage_uid_changed) (uid_t uid);
/* Placeholders for future extensions */
void (*_reserved[9])(void);
void (*_reserved[8])(void);
/* api_level will remain zero (and ignored) until we run out of
* the above placeholders. Hopefully, forever. */
......
......@@ -985,6 +985,7 @@ void __connman_notifier_tethering_changed(struct connman_technology* tech,
bool on);
void __connman_notifier_device_status_changed(struct connman_device *device,
bool on);
void __connman_notifier_storage_uid_changed(uid_t uid);
bool __connman_notifier_is_connected(void);
const char *__connman_notifier_get_state(void);
......
......@@ -400,6 +400,21 @@ void __connman_notifier_device_status_changed(struct connman_device *device,
}
}
void __connman_notifier_storage_uid_changed(uid_t uid)
{
GSList *l = notifier_list;
while (l) {
GSList *next = l->next;
const struct connman_notifier *notifier = l->data;
if (notifier->storage_uid_changed)
notifier->storage_uid_changed(uid);
l = next;
}
}
int __connman_notifier_init(void)
{
DBG("");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment