1 /* gdm-session-settings.h - Object for auditing session login/logout
2  *
3  * Copyright (C) 2008 Red Hat, Inc.
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2, or (at your option)
8  * any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
18  * 02110-1301, USA.
19  *
20  * Written by: Ray Strode <rstrode@redhat.com>
21  */
22 #ifndef GDM_SESSION_SETTINGS_H
23 #define GDM_SESSION_SETTINGS_H
24 
25 #include <glib.h>
26 #include <glib-object.h>
27 
28 G_BEGIN_DECLS
29 #define GDM_TYPE_SESSION_SETTINGS (gdm_session_settings_get_type ())
30 #define GDM_SESSION_SETTINGS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GDM_TYPE_SESSION_SETTINGS, GdmSessionSettings))
31 #define GDM_SESSION_SETTINGS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDM_TYPE_SESSION_SETTINGS, GdmSessionSettingsClass))
32 #define GDM_IS_SESSION_SETTINGS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GDM_TYPE_SESSION_SETTINGS))
33 #define GDM_IS_SESSION_SETTINGS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDM_TYPE_SESSION_SETTINGS))
34 #define GDM_SESSION_SETTINGS_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj), GDM_TYPE_SESSION_SETTINGS, GdmSessionSettingsClass))
35 #define GDM_SESSION_SETTINGS_ERROR (gdm_session_settings_error_quark ())
36 typedef struct _GdmSessionSettings GdmSessionSettings;
37 typedef struct _GdmSessionSettingsClass GdmSessionSettingsClass;
38 typedef struct _GdmSessionSettingsPrivate GdmSessionSettingsPrivate;
39 
40 struct _GdmSessionSettings
41 {
42         GObject                   parent;
43 
44         /*< private > */
45         GdmSessionSettingsPrivate *priv;
46 };
47 
48 struct _GdmSessionSettingsClass
49 {
50         GObjectClass        parent_class;
51 };
52 
53 GType               gdm_session_settings_get_type           (void);
54 GdmSessionSettings *gdm_session_settings_new                (void);
55 
56 gboolean            gdm_session_settings_load               (GdmSessionSettings  *settings,
57                                                              const char          *username);
58 gboolean            gdm_session_settings_save               (GdmSessionSettings  *settings,
59                                                              const char          *username);
60 gboolean            gdm_session_settings_is_loaded          (GdmSessionSettings  *settings);
61 char               *gdm_session_settings_get_language_name  (GdmSessionSettings *settings);
62 char               *gdm_session_settings_get_session_name   (GdmSessionSettings *settings);
63 void                gdm_session_settings_set_language_name  (GdmSessionSettings *settings,
64                                                              const char         *language_name);
65 void                gdm_session_settings_set_session_name   (GdmSessionSettings *settings,
66                                                              const char         *session_name);
67 
68 G_END_DECLS
69 #endif /* GDM_SESSION_SETTINGS_H */
70