1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
2 #pragma once
3 
4 #include "sd-bus.h"
5 
6 #include "bus-object.h"
7 #include "logind-action.h"
8 #include "logind-session.h"
9 #include "logind-user.h"
10 #include "logind.h"
11 
12 int manager_get_session_from_creds(Manager *m, sd_bus_message *message, const char *name, sd_bus_error *error, Session **ret);
13 int manager_get_user_from_creds(Manager *m, sd_bus_message *message, uid_t uid, sd_bus_error *error, User **ret);
14 int manager_get_seat_from_creds(Manager *m, sd_bus_message *message, const char *name, sd_bus_error *error, Seat **ret);
15 
16 int manager_dispatch_delayed(Manager *manager, bool timeout);
17 
18 int bus_manager_shutdown_or_sleep_now_or_later(Manager *m, const HandleActionData *a, sd_bus_error *error);
19 
20 int match_job_removed(sd_bus_message *message, void *userdata, sd_bus_error *error);
21 int match_unit_removed(sd_bus_message *message, void *userdata, sd_bus_error *error);
22 int match_properties_changed(sd_bus_message *message, void *userdata, sd_bus_error *error);
23 int match_reloading(sd_bus_message *message, void *userdata, sd_bus_error *error);
24 
25 int manager_send_changed(Manager *manager, const char *property, ...) _sentinel_;
26 
27 int manager_start_scope(Manager *manager, const char *scope, pid_t pid, const char *slice, const char *description, char **wants, char **after, const char *requires_mounts_for, sd_bus_message *more_properties, sd_bus_error *error, char **job);
28 int manager_start_unit(Manager *manager, const char *unit, sd_bus_error *error, char **job);
29 int manager_stop_unit(Manager *manager, const char *unit, const char *job_mode, sd_bus_error *error, char **job);
30 int manager_abandon_scope(Manager *manager, const char *scope, sd_bus_error *error);
31 int manager_kill_unit(Manager *manager, const char *unit, KillWho who, int signo, sd_bus_error *error);
32 int manager_unit_is_active(Manager *manager, const char *unit, sd_bus_error *error);
33 int manager_job_is_active(Manager *manager, const char *path, sd_bus_error *error);
34 
35 void manager_load_scheduled_shutdown(Manager *m);
36 
37 extern const BusObjectImplementation manager_object;
38