bus-endpoint.c revision d5099efc47d4e6ac60816b5381a5f607ab03f06e
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering This file is part of systemd.
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering Copyright 2014 Daniel Mack
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering systemd is free software; you can redistribute it and/or modify it
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering under the terms of the GNU Lesser General Public License as published by
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering the Free Software Foundation; either version 2.1 of the License, or
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering (at your option) any later version.
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering systemd is distributed in the hope that it will be useful, but
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering WITHOUT ANY WARRANTY; without even the implied warranty of
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering Lesser General Public License for more details.
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering You should have received a copy of the GNU Lesser General Public License
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering along with systemd; If not, see <http://www.gnu.org/licenses/>.
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poetteringint bus_endpoint_add_policy(BusEndpoint *ep, const char *name, BusPolicyAccess access)
c335068380fe8c9d843cdb2cf8a00f822cfabed3Lennart Poettering assert(access > _BUS_POLICY_ACCESS_INVALID && access < _BUS_POLICY_ACCESS_MAX);
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering /* check if we already have this name in the policy list. If we do, see if the new access level
ebcf1f97de4f6b1580ae55eb56b1a3939fe6b602Lennart Poettering * is higher than the exising one, and upgrade the entry in that case. Otherwise, do nothing.
c335068380fe8c9d843cdb2cf8a00f822cfabed3Lennart Poettering ep->policy_hash = hashmap_new(&string_hash_ops);
c2ce6a3d82b717c4c1e6245ad8c6ce1173f502d0Lennart Poettering r = hashmap_put(ep->policy_hash, key, po);
c2ce6a3d82b717c4c1e6245ad8c6ce1173f502d0Lennart Poetteringvoid bus_endpoint_free(BusEndpoint *endpoint)