2 This file is part of systemd.
4 Copyright 2015 Tom Gundersen
6 systemd is free software; you can redistribute it and/or modify it
7 under the terms of the GNU Lesser General Public License as published by
8 the Free Software Foundation; either version 2.1 of the License, or
9 (at your option) any later version.
11 systemd is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
16 You should have received a copy of the GNU Lesser General Public License
17 along with systemd; If not, see <http://www.gnu.org/licenses/>.
20 #include "alloc-util.h"
24 static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_operational_state
, link_operstate
, LinkOperationalState
);
26 const sd_bus_vtable manager_vtable
[] = {
27 SD_BUS_VTABLE_START(0),
29 SD_BUS_PROPERTY("OperationalState", "s", property_get_operational_state
, offsetof(Manager
, operational_state
), SD_BUS_VTABLE_PROPERTY_EMITS_CHANGE
),
34 int manager_send_changed(Manager
*manager
, const char *property
, ...) {
40 return 0; /* replace by assert when we have kdbus */
42 l
= strv_from_stdarg_alloca(property
);
44 return sd_bus_emit_properties_changed_strv(
46 "/org/freedesktop/network1",
47 "org.freedesktop.network1.Manager",