test-bus-introspect.c revision 29ddb38fea134c6132e4f2dd608e9da3871eaebe
d657c51f14601d0235434ffb78cf6ac0f27cc83cLennart Poettering/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
597c52cfedb5edd13ee1635fa6be72fc80e587c3Lennart Poettering This file is part of systemd.
597c52cfedb5edd13ee1635fa6be72fc80e587c3Lennart Poettering Copyright 2013 Lennart Poettering
597c52cfedb5edd13ee1635fa6be72fc80e587c3Lennart Poettering systemd is free software; you can redistribute it and/or modify it
597c52cfedb5edd13ee1635fa6be72fc80e587c3Lennart Poettering under the terms of the GNU Lesser General Public License as published by
597c52cfedb5edd13ee1635fa6be72fc80e587c3Lennart Poettering the Free Software Foundation; either version 2.1 of the License, or
597c52cfedb5edd13ee1635fa6be72fc80e587c3Lennart Poettering (at your option) any later version.
597c52cfedb5edd13ee1635fa6be72fc80e587c3Lennart Poettering systemd is distributed in the hope that it will be useful, but
597c52cfedb5edd13ee1635fa6be72fc80e587c3Lennart Poettering WITHOUT ANY WARRANTY; without even the implied warranty of
597c52cfedb5edd13ee1635fa6be72fc80e587c3Lennart Poettering MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
597c52cfedb5edd13ee1635fa6be72fc80e587c3Lennart Poettering Lesser General Public License for more details.
597c52cfedb5edd13ee1635fa6be72fc80e587c3Lennart Poettering You should have received a copy of the GNU Lesser General Public License
597c52cfedb5edd13ee1635fa6be72fc80e587c3Lennart Poettering along with systemd; If not, see <http://www.gnu.org/licenses/>.
597c52cfedb5edd13ee1635fa6be72fc80e587c3Lennart Poetteringstatic int prop_get(sd_bus *bus, const char *path, const char *interface, const char *property, sd_bus_message *reply, sd_bus_error *error, void *userdata) {
597c52cfedb5edd13ee1635fa6be72fc80e587c3Lennart Poetteringstatic int prop_set(sd_bus *bus, const char *path, const char *interface, const char *property, sd_bus_message *reply, sd_bus_error *error, void *userdata) {
597c52cfedb5edd13ee1635fa6be72fc80e587c3Lennart Poettering SD_BUS_METHOD("Hello", "ssas", "a(uu)", 0, NULL),
597c52cfedb5edd13ee1635fa6be72fc80e587c3Lennart Poettering SD_BUS_METHOD("DeprecatedHello", "", "", SD_BUS_VTABLE_DEPRECATED, NULL),
597c52cfedb5edd13ee1635fa6be72fc80e587c3Lennart Poettering SD_BUS_METHOD("DeprecatedHelloNoReply", "", "", SD_BUS_VTABLE_DEPRECATED|SD_BUS_VTABLE_METHOD_NO_REPLY, NULL),
075d4ecb4026c5bc55e73bd2d44e3fc4d679adc7Lennart Poettering SD_BUS_SIGNAL("DeprecatedWowza", "ut", SD_BUS_VTABLE_DEPRECATED),
075d4ecb4026c5bc55e73bd2d44e3fc4d679adc7Lennart Poettering SD_BUS_WRITABLE_PROPERTY("AProperty", "s", prop_get, prop_set, 0, 0),
075d4ecb4026c5bc55e73bd2d44e3fc4d679adc7Lennart Poettering SD_BUS_PROPERTY("AReadOnlyDeprecatedProperty", "(ut)", prop_get, 0, SD_BUS_VTABLE_DEPRECATED),
075d4ecb4026c5bc55e73bd2d44e3fc4d679adc7Lennart Poettering SD_BUS_PROPERTY("ChangingProperty", "t", prop_get, 0, SD_BUS_VTABLE_PROPERTY_EMITS_CHANGE),
075d4ecb4026c5bc55e73bd2d44e3fc4d679adc7Lennart Poettering SD_BUS_PROPERTY("Invalidating", "t", prop_get, 0, SD_BUS_VTABLE_PROPERTY_EMITS_CHANGE|SD_BUS_VTABLE_PROPERTY_INVALIDATE_ONLY),
597c52cfedb5edd13ee1635fa6be72fc80e587c3Lennart Poettering assert_se(introspect_begin(&intro) >= 0);