Imported Upstream version 0.2.0
[debian/lxdm.git] / src / lxdm.h
CommitLineData
eea1c851
AL
1/*
2 * lxdm.h - interface of lxdm
3 *
4 * Copyright 2009 dgod <dgod.osa@gmail.com>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU 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, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 * MA 02110-1301, USA.
20 */
21
22#ifndef _LXDM_H_
23#define _LXDM_H_
24
faee902e 25#include <glib.h>
eea1c851
AL
26#include <pwd.h>
27
faee902e
AL
28G_BEGIN_DECLS
29
eea1c851
AL
30extern GKeyFile *config;
31
32void log_print(char *fmt,...);
33int lxdm_auth_user(char *user,char *pass,struct passwd **ppw);
34void lxdm_do_login(struct passwd *pw,char *session,char *lang);
35void lxdm_do_reboot(void);
36void lxdm_do_shutdown(void);
37int lxdm_cur_session(void);
38
faee902e
AL
39enum AuthResult
40{
41 AUTH_SUCCESS,
42 AUTH_BAD_USER,
43 AUTH_FAIL,
44 AUTH_PRIV,
45 AUTH_ERROR
46};
eea1c851
AL
47
48void ui_drop(void);
49int ui_main(void);
50void ui_prepare(void);
51int ui_do_login(void);
faee902e 52void ui_clean(void);
eea1c851
AL
53
54typedef struct{
55 char *name;
56 char *exec;
faee902e
AL
57 char* desktop_file;
58}Session;
eea1c851
AL
59
60GSList *do_scan_xsessions(void);
61void free_xsessions(GSList *);
62
faee902e
AL
63G_END_DECLS
64
eea1c851 65#endif/*_LXDM_H_*/