2020-11-09 05:23:58 +01:00
|
|
|
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
2012-07-18 19:07:51 +02:00
|
|
|
#pragma once
|
2010-04-18 03:08:16 +02:00
|
|
|
|
2013-11-19 21:12:59 +01:00
|
|
|
#include "sd-bus.h"
|
2018-05-28 06:36:35 +02:00
|
|
|
#include "sd-bus-vtable.h"
|
2015-10-24 22:58:24 +02:00
|
|
|
|
2013-11-19 21:12:59 +01:00
|
|
|
#include "execute.h"
|
2010-04-18 03:08:16 +02:00
|
|
|
|
2013-11-19 21:12:59 +01:00
|
|
|
#define BUS_EXEC_STATUS_VTABLE(prefix, offset, flags) \
|
|
|
|
BUS_PROPERTY_DUAL_TIMESTAMP(prefix "StartTimestamp", (offset) + offsetof(ExecStatus, start_timestamp), flags), \
|
|
|
|
BUS_PROPERTY_DUAL_TIMESTAMP(prefix "ExitTimestamp", (offset) + offsetof(ExecStatus, exit_timestamp), flags), \
|
|
|
|
SD_BUS_PROPERTY(prefix "PID", "u", bus_property_get_pid, (offset) + offsetof(ExecStatus, pid), flags), \
|
|
|
|
SD_BUS_PROPERTY(prefix "Code", "i", bus_property_get_int, (offset) + offsetof(ExecStatus, code), flags), \
|
|
|
|
SD_BUS_PROPERTY(prefix "Status", "i", bus_property_get_int, (offset) + offsetof(ExecStatus, status), flags)
|
2010-04-18 03:08:16 +02:00
|
|
|
|
2013-11-19 21:12:59 +01:00
|
|
|
#define BUS_EXEC_COMMAND_VTABLE(name, offset, flags) \
|
|
|
|
SD_BUS_PROPERTY(name, "a(sasbttttuii)", bus_property_get_exec_command, offset, flags)
|
2010-07-04 18:49:58 +02:00
|
|
|
|
2013-11-25 16:59:51 +01:00
|
|
|
#define BUS_EXEC_COMMAND_LIST_VTABLE(name, offset, flags) \
|
|
|
|
SD_BUS_PROPERTY(name, "a(sasbttttuii)", bus_property_get_exec_command_list, offset, flags)
|
|
|
|
|
2019-02-20 23:53:58 +01:00
|
|
|
#define BUS_EXEC_EX_COMMAND_LIST_VTABLE(name, offset, flags) \
|
|
|
|
SD_BUS_PROPERTY(name, "a(sasasttttuii)", bus_property_get_exec_ex_command_list, offset, flags)
|
|
|
|
|
2013-11-19 21:12:59 +01:00
|
|
|
extern const sd_bus_vtable bus_exec_vtable[];
|
2010-07-04 20:38:14 +02:00
|
|
|
|
2013-11-21 19:34:37 +01:00
|
|
|
int bus_property_get_exec_output(sd_bus *bus, const char *path, const char *interface, const char *property, sd_bus_message *reply, void *userdata, sd_bus_error *ret_error);
|
|
|
|
int bus_property_get_exec_command(sd_bus *bus, const char *path, const char *interface, const char *property, sd_bus_message *reply, void *userdata, sd_bus_error *ret_error);
|
2013-11-25 16:59:51 +01:00
|
|
|
int bus_property_get_exec_command_list(sd_bus *bus, const char *path, const char *interface, const char *property, sd_bus_message *reply, void *userdata, sd_bus_error *ret_error);
|
2019-02-20 23:53:58 +01:00
|
|
|
int bus_property_get_exec_ex_command_list(sd_bus *bus, const char *path, const char *interface, const char *property, sd_bus_message *reply, void *userdata, sd_bus_error *ret_error);
|
2014-02-05 02:02:00 +01:00
|
|
|
|
2017-11-22 15:03:51 +01:00
|
|
|
int bus_exec_context_set_transient_property(Unit *u, ExecContext *c, const char *name, sd_bus_message *message, UnitWriteFlags flags, sd_bus_error *error);
|
2017-12-29 09:23:25 +01:00
|
|
|
int bus_set_transient_exec_command(Unit *u, const char *name, ExecCommand **exec_command, sd_bus_message *message, UnitWriteFlags flags, sd_bus_error *error);
|