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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
|
/*
* Copyright (C) 2010 Robert Ancell.
* Author: Robert Ancell <robert.ancell@canonical.com>
*
* This library is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 3 of the License, or (at your option) any
* later version. See http://www.gnu.org/copyleft/lgpl.html the full text of the
* license.
*/
#ifndef _LDM_GREETER_H_
#define _LDM_GREETER_H_
#include <glib-object.h>
G_BEGIN_DECLS
#define LDM_TYPE_GREETER (ldm_greeter_get_type())
#define LDM_GREETER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LDM_TYPE_GREETER, LdmGreeter));
#define LDM_GREETER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LDM_TYPE_GREETER, LdmGreeterClass))
#define LDM_IS_GREETER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LDM_TYPE_GREETER))
#define LDM_IS_GREETER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LDM_TYPE_GREETER))
#define LDM_GREETER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LDM_TYPE_GREETER, LdmGreeterClass))
typedef struct _LdmGreeter LdmGreeter;
typedef struct _LdmGreeterClass LdmGreeterClass;
typedef struct _LdmGreeterPrivate LdmGreeterPrivate;
#include "user.h"
#include "language.h"
#include "layout.h"
#include "session.h"
struct _LdmGreeter
{
GObject parent_instance;
/*<private>*/
LdmGreeterPrivate *priv;
};
struct _LdmGreeterClass
{
GObjectClass parent_class;
void (*connected)(LdmGreeter *greeter);
void (*show_prompt)(LdmGreeter *greeter, const gchar *text);
void (*show_message)(LdmGreeter *greeter, const gchar *text);
void (*show_error)(LdmGreeter *greeter, const gchar *text);
void (*authentication_complete)(LdmGreeter *greeter);
void (*timed_login)(LdmGreeter *greeter, const gchar *username);
void (*user_added)(LdmGreeter *greeter, LdmUser *user);
void (*user_changed)(LdmGreeter *greeter, LdmUser *user);
void (*user_removed)(LdmGreeter *greeter, LdmUser *user);
void (*quit)(LdmGreeter *greeter);
};
GType ldm_greeter_get_type (void);
LdmGreeter *ldm_greeter_new (void);
gboolean ldm_greeter_connect_to_server (LdmGreeter *greeter);
const gchar *ldm_greeter_get_hostname (LdmGreeter *greeter);
const gchar *ldm_greeter_get_theme (LdmGreeter *greeter);
gchar *ldm_greeter_get_string_property (LdmGreeter *greeter, const gchar *name);
gint ldm_greeter_get_integer_property (LdmGreeter *greeter, const gchar *name);
gboolean ldm_greeter_get_boolean_property (LdmGreeter *greeter, const gchar *name);
gint ldm_greeter_get_num_users (LdmGreeter *greeter);
const GList *ldm_greeter_get_users (LdmGreeter *greeter);
const LdmUser *ldm_greeter_get_user_by_name (LdmGreeter *greeter, const gchar *username);
const gchar *ldm_greeter_get_default_language (LdmGreeter *greeter);
const GList *ldm_greeter_get_languages (LdmGreeter *greeter);
const GList *ldm_greeter_get_layouts (LdmGreeter *greeter);
void ldm_greeter_set_layout (LdmGreeter *greeter, const gchar *layout);
const gchar *ldm_greeter_get_layout (LdmGreeter *greeter);
const GList *ldm_greeter_get_sessions (LdmGreeter *greeter);
const gchar *ldm_greeter_get_default_session (LdmGreeter *greeter);
gboolean ldm_greeter_get_has_guest_session (LdmGreeter *greeter);
const gchar *ldm_greeter_get_timed_login_user (LdmGreeter *greeter);
gint ldm_greeter_get_timed_login_delay (LdmGreeter *greeter);
void ldm_greeter_cancel_timed_login (LdmGreeter *greeter);
void ldm_greeter_login (LdmGreeter *greeter, const char *username);
void ldm_greeter_login_as_guest (LdmGreeter *greeter);
void ldm_greeter_provide_secret (LdmGreeter *greeter, const gchar *secret);
void ldm_greeter_cancel_authentication (LdmGreeter *greeter);
gboolean ldm_greeter_get_in_authentication (LdmGreeter *greeter);
gboolean ldm_greeter_get_is_authenticated (LdmGreeter *greeter);
const gchar *ldm_greeter_get_authentication_user (LdmGreeter *greeter);
void ldm_greeter_start_session (LdmGreeter *greeter, const gchar *session, const gchar *language);
void ldm_greeter_start_session_with_defaults (LdmGreeter *greeter);
gboolean ldm_greeter_get_can_suspend (LdmGreeter *greeter);
void ldm_greeter_suspend (LdmGreeter *greeter);
gboolean ldm_greeter_get_can_hibernate (LdmGreeter *greeter);
void ldm_greeter_hibernate (LdmGreeter *greeter);
gboolean ldm_greeter_get_can_restart (LdmGreeter *greeter);
void ldm_greeter_restart (LdmGreeter *greeter);
gboolean ldm_greeter_get_can_shutdown (LdmGreeter *greeter);
void ldm_greeter_shutdown (LdmGreeter *greeter);
gboolean ldm_greeter_get_user_defaults (LdmGreeter *greeter, const gchar *username, gchar **language, gchar **layout, gchar **session);
G_END_DECLS
#endif /* _LDM_GREETER_H_ */
|