summaryrefslogtreecommitdiff
path: root/daemon/gdm-daemon-config.h
blob: 7c4f3767c25b2380cfb5d2f74ae29283e62ee360 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
 *
 * GDM - The GNOME Display Manager
 * Copyright (C) 1998, 1999, 2000 Martin K. Petersen <mkp@mkp.net>
 * Copyright (C) 2005 Brian Cameron <brian.cameron@sun.com>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

#ifndef _GDM_DAEMON_CONFIG_H
#define _GDM_DAEMON_CONFIG_H

#include "server.h"
#include "gdm-daemon-config-entries.h"

G_BEGIN_DECLS

const char *   gdm_daemon_config_get_string_for_id    (int id);
gboolean       gdm_daemon_config_get_bool_for_id      (int id);
int            gdm_daemon_config_get_int_for_id       (int id);

void           gdm_daemon_config_parse                (const char *config_file,
                                                       gboolean    no_console);
GdmXserver *   gdm_daemon_config_find_xserver         (const char *id);
char *         gdm_daemon_config_get_xservers         (void);
GSList *       gdm_daemon_config_get_display_list     (void);
GSList *       gdm_daemon_config_display_list_append  (GdmDisplay *display);
GSList *       gdm_daemon_config_display_list_insert  (GdmDisplay *display);
GSList *       gdm_daemon_config_display_list_remove  (GdmDisplay *display);
uid_t          gdm_daemon_config_get_gdmuid           (void);
uid_t          gdm_daemon_config_get_gdmgid           (void);
gint           gdm_daemon_config_get_high_display_num (void);
void           gdm_daemon_config_set_high_display_num (gint val);

/* deprecated */
char *         gdm_daemon_config_get_display_custom_config_file (const char *display);
char *         gdm_daemon_config_get_custom_config_file (void);


const char *   gdm_daemon_config_get_value_string     (const char *key);
const char **  gdm_daemon_config_get_value_string_array (const char *key);
gboolean       gdm_daemon_config_get_value_bool       (const char *key);
gint           gdm_daemon_config_get_value_int        (const char *key);
char *         gdm_daemon_config_get_value_string_per_display (const char *key,
                                                               const char *display);
gboolean       gdm_daemon_config_get_value_bool_per_display   (const char *key,
                                                               const char *display);
gint           gdm_daemon_config_get_value_int_per_display    (const char *key,
                                                               const char *display);

void           gdm_daemon_config_set_value_string     (const char *key,
                                                       const char *value);
void           gdm_daemon_config_set_value_bool       (const char *key,
                                                       gboolean value);
void           gdm_daemon_config_set_value_int        (const char *key,
                                                       gint value);


gboolean       gdm_daemon_config_key_to_string_per_display (const char *display,
                                                            const char *key,
                                                            char **retval);
gboolean       gdm_daemon_config_key_to_string        (const char *file,
                                                       const char *key,
                                                       char **retval);
gboolean       gdm_daemon_config_to_string            (const char *key,
                                                       const char *display,
                                                       char **retval);
gboolean       gdm_daemon_config_update_key           (const char *key);


int            gdm_daemon_config_compare_displays     (gconstpointer a,
                                                       gconstpointer b);
gboolean       gdm_daemon_config_is_valid_key         (const char *key);
gboolean       gdm_daemon_config_signal_terminthup_was_notified  (void);

char *         gdm_daemon_config_get_facefile_from_home (const char *homedir,
                                                         guint uid);
char *         gdm_daemon_config_get_facefile_from_global (const char *username,
                                                           guint uid);
void           gdm_daemon_config_get_user_session_lang (char **usrsess,
                                                        char **usrlang,
                                                        const char *homedir,
                                                        gboolean *savesess);
void	       gdm_daemon_config_set_user_session_lang (gboolean savesess,
                                                        gboolean savelang,
                                                        const char *home_dir,
                                                        const char *save_session,
                                                        const char *save_language);
char *         gdm_daemon_config_get_session_exec     (const char *session_name,
                                                       gboolean check_try_exec);
char *         gdm_daemon_config_get_session_xserver_args (const char *session_name);


G_END_DECLS

#endif /* _GDM_DAEMON_CONFIG_H */