1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
2  *
3  * Copyright (C) 2007 Novell, Inc.
4  * Copyright (C) 2008 Red Hat, Inc.
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License as
8  * published by the Free Software Foundation; either version 2 of the
9  * License, or (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful, but
12  * WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, see <http://www.gnu.org/licenses/>.
18  */
19 
20 #ifndef __GSM_AUTOSTART_APP_H__
21 #define __GSM_AUTOSTART_APP_H__
22 
23 #include "gsm-app.h"
24 
25 #include <X11/SM/SMlib.h>
26 
27 G_BEGIN_DECLS
28 
29 #define GSM_TYPE_AUTOSTART_APP            (gsm_autostart_app_get_type ())
30 #define GSM_AUTOSTART_APP(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GSM_TYPE_AUTOSTART_APP, GsmAutostartApp))
31 #define GSM_AUTOSTART_APP_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GSM_TYPE_AUTOSTART_APP, GsmAutostartAppClass))
32 #define GSM_IS_AUTOSTART_APP(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GSM_TYPE_AUTOSTART_APP))
33 #define GSM_IS_AUTOSTART_APP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GSM_TYPE_AUTOSTART_APP))
34 #define GSM_AUTOSTART_APP_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), GSM_TYPE_AUTOSTART_APP, GsmAutostartAppClass))
35 
36 typedef struct _GsmAutostartApp        GsmAutostartApp;
37 typedef struct _GsmAutostartAppClass   GsmAutostartAppClass;
38 typedef struct _GsmAutostartAppPrivate GsmAutostartAppPrivate;
39 
40 struct _GsmAutostartApp
41 {
42         GsmApp parent;
43 
44         GsmAutostartAppPrivate *priv;
45 };
46 
47 struct _GsmAutostartAppClass
48 {
49         GsmAppClass parent_class;
50 
51         /* signals */
52         void     (*condition_changed)  (GsmApp  *app,
53                                         gboolean condition);
54 };
55 
56 GType   gsm_autostart_app_get_type           (void) G_GNUC_CONST;
57 
58 GsmApp *gsm_autostart_app_new                (const char *desktop_file,
59                                               gboolean    mask_systemd,
60                                               GError    **error);
61 
62 void    gsm_autostart_app_add_provides       (GsmAutostartApp *aapp,
63                                               const char      *provides);
64 
65 #define GSM_AUTOSTART_APP_SYSTEMD_KEY     "X-GNOME-HiddenUnderSystemd"
66 #define GSM_AUTOSTART_APP_ENABLED_KEY     "X-GNOME-Autostart-enabled"
67 #define GSM_AUTOSTART_APP_PHASE_KEY       "X-GNOME-Autostart-Phase"
68 #define GSM_AUTOSTART_APP_PROVIDES_KEY    "X-GNOME-Provides"
69 #define GSM_AUTOSTART_APP_STARTUP_ID_KEY  "X-GNOME-Autostart-startup-id"
70 #define GSM_AUTOSTART_APP_AUTORESTART_KEY "X-GNOME-AutoRestart"
71 #define GSM_AUTOSTART_APP_DBUS_NAME_KEY   "X-GNOME-DBus-Name"
72 #define GSM_AUTOSTART_APP_DBUS_PATH_KEY   "X-GNOME-DBus-Path"
73 #define GSM_AUTOSTART_APP_DBUS_ARGS_KEY   "X-GNOME-DBus-Start-Arguments"
74 #define GSM_AUTOSTART_APP_DISCARD_KEY     "X-GNOME-Autostart-discard-exec"
75 
76 G_END_DECLS
77 
78 #endif /* __GSM_AUTOSTART_APP_H__ */
79