1 /* SPDX-License-Identifier: LGPL-2.1-or-later */ 2 #pragma once 3 4 #include "macro.h" 5 6 typedef struct XdgAutostartService { 7 char *name; 8 char *path; 9 char *description; /* Name in XDG desktop file */ 10 11 char *type; /* Purely as an assertion check */ 12 char *exec_string; 13 char *working_directory; 14 15 char **only_show_in; 16 char **not_show_in; 17 18 char *try_exec; 19 char *autostart_condition; /* This is mostly GNOME specific */ 20 char *kde_autostart_condition; 21 22 char *gnome_autostart_phase; 23 24 bool hidden; 25 bool systemd_skip; 26 27 } XdgAutostartService; 28 29 XdgAutostartService * xdg_autostart_service_free(XdgAutostartService *s); 30 DEFINE_TRIVIAL_CLEANUP_FUNC(XdgAutostartService*, xdg_autostart_service_free); 31 32 char *xdg_autostart_service_translate_name(const char *name); 33 int xdg_autostart_format_exec_start(const char *exec, char **ret_exec_start); 34 35 XdgAutostartService *xdg_autostart_service_parse_desktop(const char *path); 36 int xdg_autostart_service_generate_unit(const XdgAutostartService *service, const char *dest); 37