Hashmap *inhibitors;
Hashmap *buttons;
- Set *busnames;
-
LIST_HEAD(Seat, seat_gc_queue);
LIST_HEAD(Session, session_gc_queue);
LIST_HEAD(User, user_gc_queue);
sd_event_source *udev_vcsa_event_source;
sd_event_source *udev_button_event_source;
- /* Make sure the user cannot accidentally unmount our cgroup
- * file system */
- int pin_cgroupfs_fd;
+ int console_active_fd;
- /* Data specific to the cgroup subsystem */
- char *cgroup_root;
+ unsigned n_autovts;
- int console_active_fd;
+ unsigned reserve_vt;
+ int reserve_vt_fd;
Seat *seat0;
unsigned long session_counter;
unsigned long inhibit_counter;
+ Hashmap *session_units;
+ Hashmap *user_units;
+
usec_t inhibit_delay_max;
/* If an action is currently being executed or is delayed,
InhibitWhat action_what;
/* If a shutdown/suspend was delayed due to a inhibitor this
- contains the action we are supposed to perform after the
+ contains the unit name we are supposed to start after the
delay is over */
- HandleAction pending_action;
+ const char *action_unit;
+
+ /* If a shutdown/suspend is currently executed, then this is
+ * the job of it */
+ char *action_job;
sd_event_source *inhibit_timeout_source;
char *scheduled_shutdown_type;
bool remove_ipc;
- char **suspend_state, **suspend_mode;
- char **hibernate_state, **hibernate_mode;
- char **hybrid_sleep_state, **hybrid_sleep_mode;
-
Hashmap *polkit_registry;
usec_t holdoff_timeout_usec;
int manager_process_seat_device(Manager *m, struct udev_device *d);
int manager_process_button_device(Manager *m, struct udev_device *d);
+int manager_spawn_autovt(Manager *m, unsigned int vtnr);
bool manager_shall_kill(Manager *m, const char *user);
extern const sd_bus_vtable manager_vtable[];
-int bus_manager_shutdown_or_sleep_now_or_later(Manager *m, HandleAction action, InhibitWhat w, sd_bus_error *error);
-int shutdown_or_sleep(Manager *m, HandleAction action);
+int match_job_removed(sd_bus_message *message, void *userdata, sd_bus_error *error);
+int match_unit_removed(sd_bus_message *message, void *userdata, sd_bus_error *error);
+int match_properties_changed(sd_bus_message *message, void *userdata, sd_bus_error *error);
+int match_reloading(sd_bus_message *message, void *userdata, sd_bus_error *error);
+int match_name_owner_changed(sd_bus_message *message, void *userdata, sd_bus_error *error);
+
+int bus_manager_shutdown_or_sleep_now_or_later(Manager *m, const char *unit_name, InhibitWhat w, sd_bus_error *error);
int manager_send_changed(Manager *manager, const char *property, ...) _sentinel_;
+int manager_start_scope(Manager *manager, const char *scope, pid_t pid, const char *slice, const char *description, const char *after, const char *after2, sd_bus_error *error, char **job);
+int manager_start_unit(Manager *manager, const char *unit, sd_bus_error *error, char **job);
+int manager_stop_unit(Manager *manager, const char *unit, sd_bus_error *error, char **job);
+int manager_abandon_scope(Manager *manager, const char *scope, sd_bus_error *error);
+int manager_kill_unit(Manager *manager, const char *unit, KillWho who, int signo, sd_bus_error *error);
+int manager_unit_is_active(Manager *manager, const char *unit);
+int manager_job_is_active(Manager *manager, const char *path);
/* gperf lookup function */
-const struct ConfigPerfItem* logind_gperf_lookup(const char *key, unsigned length);
-
-int manager_watch_busname(Manager *manager, const char *name);
-void manager_drop_busname(Manager *manager, const char *name);
+const struct ConfigPerfItem* logind_gperf_lookup (const char *str, size_t len);
int manager_set_lid_switch_ignore(Manager *m, usec_t until);