chiark / gitweb /
systemctl: fix systemctl help text
[elogind.git] / src / dbus-execute.h
1 /*-*- Mode: C; c-basic-offset: 8 -*-*/
2
3 #ifndef foodbusexecutehfoo
4 #define foodbusexecutehfoo
5
6 /***
7   This file is part of systemd.
8
9   Copyright 2010 Lennart Poettering
10
11   systemd is free software; you can redistribute it and/or modify it
12   under the terms of the GNU General Public License as published by
13   the Free Software Foundation; either version 2 of the License, or
14   (at your option) any later version.
15
16   systemd is distributed in the hope that it will be useful, but
17   WITHOUT ANY WARRANTY; without even the implied warranty of
18   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19   General Public License for more details.
20
21   You should have received a copy of the GNU General Public License
22   along with systemd; If not, see <http://www.gnu.org/licenses/>.
23 ***/
24
25 #include <dbus/dbus.h>
26
27 #include "manager.h"
28
29 #define BUS_EXEC_CONTEXT_INTERFACE                                      \
30         "  <property name=\"Environment\" type=\"as\" access=\"read\"/>\n" \
31         "  <property name=\"UMask\" type=\"u\" access=\"read\"/>\n"     \
32         "  <property name=\"WorkingDirectory\" type=\"s\" access=\"read\"/>\n" \
33         "  <property name=\"RootDirectory\" type=\"s\" access=\"read\"/>\n" \
34         "  <property name=\"CPUSchedulingResetOnFork\" type=\"b\" access=\"read\"/>\n" \
35         "  <property name=\"NonBlocking\" type=\"b\" access=\"read\"/>\n" \
36         "  <property name=\"StandardInput\" type=\"s\" access=\"read\"/>\n" \
37         "  <property name=\"StandardOutput\" type=\"s\" access=\"read\"/>\n" \
38         "  <property name=\"StandardError\" type=\"s\" access=\"read\"/>\n" \
39         "  <property name=\"TTYPath\" type=\"s\" access=\"read\"/>\n"   \
40         "  <property name=\"SyslogPriority\" type=\"i\" access=\"read\"/>\n" \
41         "  <property name=\"SyslogIdentifier\" type=\"s\" access=\"read\"/>\n" \
42         "  <property name=\"SecureBits\" type=\"i\" access=\"read\"/>\n" \
43         "  <property name=\"CapabilityBoundingSetDrop\" type=\"t\" access=\"read\"/>\n" \
44         "  <property name=\"User\" type=\"s\" access=\"read\"/>\n"      \
45         "  <property name=\"Group\" type=\"s\" access=\"read\"/>\n"     \
46         "  <property name=\"SupplementaryGroups\" type=\"as\" access=\"read\"/>\n" \
47         "  <property name=\"TCPWrapName\" type=\"s\" access=\"read\"/>\n" \
48         "  <property name=\"PAMName\" type=\"s\" access=\"read\"/>\n"
49
50 #define BUS_EXEC_CONTEXT_PROPERTIES(interface, context)                 \
51         { interface, "Environment",                   bus_property_append_strv,   "as",    (context).environment                   }, \
52         { interface, "UMask",                         bus_property_append_mode,   "u",     &(context).umask                        }, \
53             /* RLimits */                                               \
54         { interface, "WorkingDirectory",              bus_property_append_string, "s",     (context).working_directory             }, \
55         { interface, "RootDirectory",                 bus_property_append_string, "s",     (context).root_directory                }, \
56             /* OOM Adjust */                                            \
57             /* Nice */                                                  \
58             /* IOPrio */                                                \
59             /* CPUSchedPolicy */                                        \
60             /* CPUSchedPriority */                                      \
61             /* CPUAffinity */                                           \
62             /* TimerSlackNS */                                          \
63         { interface, "CPUSchedulingResetOnFork",      bus_property_append_bool,   "b",     &(context).cpu_sched_reset_on_fork      }, \
64         { interface, "NonBlocking",                   bus_property_append_bool,   "b",     &(context).non_blocking                 }, \
65         { interface, "StandardInput",                 bus_execute_append_input,   "s",     &(context).std_input                    }, \
66         { interface, "StandardOutput",                bus_execute_append_output,  "s",     &(context).std_output                   }, \
67         { interface, "StandardError",                 bus_execute_append_output,  "s",     &(context).std_error                    }, \
68         { interface, "TTYPath",                       bus_property_append_string, "s",     (context).tty_path                      }, \
69         { interface, "SyslogPriority",                bus_property_append_int,    "i",     &(context).syslog_priority              }, \
70         { interface, "SyslogIdentifier",              bus_property_append_string, "s",     (context).syslog_identifier             }, \
71             /* CAPABILITIES */                                          \
72         { interface, "SecureBits",                    bus_property_append_int,    "i",     &(context).secure_bits                  }, \
73         { interface, "CapabilityBoundingSetDrop",     bus_property_append_uint64, "t",     &(context).capability_bounding_set_drop }, \
74         { interface, "User",                          bus_property_append_string, "s",     (context).user                          }, \
75         { interface, "Group",                         bus_property_append_string, "s",     (context).group                         }, \
76         { interface, "SupplementaryGroups",           bus_property_append_strv,   "as",    (context).supplementary_groups          }, \
77         { interface, "TCPWrapName",                   bus_property_append_string, "s",     (context).tcpwrap_name                  }, \
78         { interface, "PAMName",                       bus_property_append_string, "s",     (context).pam_name                      }
79
80 int bus_execute_append_output(Manager *m, DBusMessageIter *i, const char *property, void *data);
81 int bus_execute_append_input(Manager *m, DBusMessageIter *i, const char *property, void *data);
82
83 #endif