bb7dd0b04a6e89674100476eed0bbd05c6a4cbd8Daniel Mack#pragma once
bb7dd0b04a6e89674100476eed0bbd05c6a4cbd8Daniel Mack
bb7dd0b04a6e89674100476eed0bbd05c6a4cbd8Daniel Mack/***
bb7dd0b04a6e89674100476eed0bbd05c6a4cbd8Daniel Mack This file is part of systemd.
bb7dd0b04a6e89674100476eed0bbd05c6a4cbd8Daniel Mack
bb7dd0b04a6e89674100476eed0bbd05c6a4cbd8Daniel Mack Copyright 2014 Daniel Mack
bb7dd0b04a6e89674100476eed0bbd05c6a4cbd8Daniel Mack
bb7dd0b04a6e89674100476eed0bbd05c6a4cbd8Daniel Mack systemd is free software; you can redistribute it and/or modify it
bb7dd0b04a6e89674100476eed0bbd05c6a4cbd8Daniel Mack under the terms of the GNU Lesser General Public License as published by
bb7dd0b04a6e89674100476eed0bbd05c6a4cbd8Daniel Mack the Free Software Foundation; either version 2.1 of the License, or
bb7dd0b04a6e89674100476eed0bbd05c6a4cbd8Daniel Mack (at your option) any later version.
bb7dd0b04a6e89674100476eed0bbd05c6a4cbd8Daniel Mack
bb7dd0b04a6e89674100476eed0bbd05c6a4cbd8Daniel Mack systemd is distributed in the hope that it will be useful, but
bb7dd0b04a6e89674100476eed0bbd05c6a4cbd8Daniel Mack WITHOUT ANY WARRANTY; without even the implied warranty of
bb7dd0b04a6e89674100476eed0bbd05c6a4cbd8Daniel Mack MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
bb7dd0b04a6e89674100476eed0bbd05c6a4cbd8Daniel Mack Lesser General Public License for more details.
bb7dd0b04a6e89674100476eed0bbd05c6a4cbd8Daniel Mack
bb7dd0b04a6e89674100476eed0bbd05c6a4cbd8Daniel Mack You should have received a copy of the GNU Lesser General Public License
bb7dd0b04a6e89674100476eed0bbd05c6a4cbd8Daniel Mack along with systemd; If not, see <http://www.gnu.org/licenses/>.
bb7dd0b04a6e89674100476eed0bbd05c6a4cbd8Daniel Mack***/
bb7dd0b04a6e89674100476eed0bbd05c6a4cbd8Daniel Mack
bb7dd0b04a6e89674100476eed0bbd05c6a4cbd8Daniel Macktypedef struct BusEndpoint BusEndpoint;
bb7dd0b04a6e89674100476eed0bbd05c6a4cbd8Daniel Macktypedef struct BusEndpointPolicy BusEndpointPolicy;
bb7dd0b04a6e89674100476eed0bbd05c6a4cbd8Daniel Mack
3c70e3bb022f0de3317f3600c9366a2f4597339eLennart Poettering#include "bus-policy.h"
71d35b6b5563817dfbe757ab9e3b9f018b2db491Thomas Hindoe Paaboel Andersen#include "hashmap.h"
bb7dd0b04a6e89674100476eed0bbd05c6a4cbd8Daniel Mack
bb7dd0b04a6e89674100476eed0bbd05c6a4cbd8Daniel Mackstruct BusEndpointPolicy {
bb7dd0b04a6e89674100476eed0bbd05c6a4cbd8Daniel Mack char *name;
bb7dd0b04a6e89674100476eed0bbd05c6a4cbd8Daniel Mack BusPolicyAccess access;
bb7dd0b04a6e89674100476eed0bbd05c6a4cbd8Daniel Mack};
bb7dd0b04a6e89674100476eed0bbd05c6a4cbd8Daniel Mack
bb7dd0b04a6e89674100476eed0bbd05c6a4cbd8Daniel Mackstruct BusEndpoint {
bb7dd0b04a6e89674100476eed0bbd05c6a4cbd8Daniel Mack Hashmap *policy_hash;
bb7dd0b04a6e89674100476eed0bbd05c6a4cbd8Daniel Mack};
bb7dd0b04a6e89674100476eed0bbd05c6a4cbd8Daniel Mack
bb7dd0b04a6e89674100476eed0bbd05c6a4cbd8Daniel Mackint bus_endpoint_new(BusEndpoint **ep);
bb7dd0b04a6e89674100476eed0bbd05c6a4cbd8Daniel Mackvoid bus_endpoint_free(BusEndpoint *endpoint);
bb7dd0b04a6e89674100476eed0bbd05c6a4cbd8Daniel Mack
bb7dd0b04a6e89674100476eed0bbd05c6a4cbd8Daniel Mackint bus_endpoint_add_policy(BusEndpoint *ep, const char *name, BusPolicyAccess access);
3c70e3bb022f0de3317f3600c9366a2f4597339eLennart Poettering
3c70e3bb022f0de3317f3600c9366a2f4597339eLennart Poetteringint bus_kernel_set_endpoint_policy(int fd, uid_t uid, BusEndpoint *ep);