X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Flogin%2Flogind-button.h;h=95bb6a52402f166d05c5f46d51eccad57b35d1c1;hb=bf2098e9e4837573d84dd4949b9c28a7372c93b9;hp=e85aa81d0a8e75b5fc6ad310111a43c8918e5343;hpb=ed4ba7e4f652150310d062ffbdfefb4521ce1054;p=elogind.git diff --git a/src/login/logind-button.h b/src/login/logind-button.h index e85aa81d0..95bb6a524 100644 --- a/src/login/logind-button.h +++ b/src/login/logind-button.h @@ -5,7 +5,7 @@ /*** This file is part of systemd. - Copyright 2012 Lennart Poettering + Copyright 2014 Daniel Mack systemd is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -21,27 +21,24 @@ along with systemd; If not, see . ***/ -typedef struct Button Button; +typedef struct BusEndpoint BusEndpoint; +typedef struct BusEndpointPolicy BusEndpointPolicy; -#include "list.h" -#include "util.h" -#include "logind.h" - -struct Button { - Manager *manager; - - sd_event_source *io_event_source; - sd_event_source *check_event_source; +#include "hashmap.h" +#include "bus-policy.h" +struct BusEndpointPolicy { char *name; - char *seat; - int fd; + BusPolicyAccess access; +}; - bool lid_closed; +struct BusEndpoint { + Hashmap *policy_hash; }; -Button* button_new(Manager *m, const char *name); -void button_free(Button*b); -int button_open(Button *b); -int button_set_seat(Button *b, const char *sn); -int button_check_lid(Button *b); +// UNNEEDED int bus_endpoint_new(BusEndpoint **ep); +void bus_endpoint_free(BusEndpoint *endpoint); + +// UNNEEDED int bus_endpoint_add_policy(BusEndpoint *ep, const char *name, BusPolicyAccess access); + +int bus_kernel_set_endpoint_policy(int fd, uid_t uid, BusEndpoint *ep);