diff options
author | David Herrmann <dh.herrmann@gmail.com> | 2013-09-17 17:39:55 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2013-09-17 11:30:44 -0500 |
commit | e8b212fe56f7f4e1778474777a7a2959244d0047 (patch) | |
tree | b3d30b51e14d95cbda6245ee96b04e7a781f6b21 /src/login/logind.h | |
parent | 718d006a63f773c42106494e823250c48942cf08 (diff) |
logind: add infrastructure to watch busnames
If we want to track bus-names to allow exclusive resource-access, we need
a way to get notified when a bus-name is gone. We make logind watch for
NameOwnerChanged dbus events and check whether the name is currently
watched. If it is, we remove it from the watch-list (notification for
other objects can be added in follow-up patches).
Diffstat (limited to 'src/login/logind.h')
-rw-r--r-- | src/login/logind.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/login/logind.h b/src/login/logind.h index 1a97351fff..a76936da17 100644 --- a/src/login/logind.h +++ b/src/login/logind.h @@ -51,6 +51,7 @@ struct Manager { Hashmap *users; Hashmap *inhibitors; Hashmap *buttons; + Hashmap *busnames; LIST_HEAD(Seat, seat_gc_queue); LIST_HEAD(Session, session_gc_queue); @@ -190,3 +191,6 @@ int manager_unit_is_active(Manager *manager, const char *unit); /* gperf lookup function */ const struct ConfigPerfItem* logind_gperf_lookup(const char *key, unsigned length); + +int manager_watch_busname(Manager *manager, const char *name); +void manager_drop_busname(Manager *manager, const char *name); |