summaryrefslogtreecommitdiff
path: root/liblightdm-gobject/liblightdm-gobject-1.vapi
blob: ba0ec1950678240483e733d1d524c9fbdc06f073 (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
[CCode (cprefix = "LightDM", lower_case_cprefix = "lightdm_", cheader_filename = "lightdm.h")]
namespace LightDM {
    public static unowned string get_hostname ();
    public static unowned GLib.List<weak LightDM.Session> get_sessions ();
    public static unowned GLib.List<weak LightDM.Language> get_languages ();
    public static unowned GLib.List<weak LightDM.Layout> get_layouts ();
    public static unowned GLib.List<weak LightDM.Session> get_remote_sessions ();
    public static unowned Language get_language ();
    public static void set_layout (Layout layout);
    public static unowned Layout get_layout ();
    public static bool get_can_suspend ();
    public static bool suspend () throws GLib.Error;
    public static bool get_can_hibernate ();
    public static bool hibernate () throws GLib.Error;
    public static bool get_can_restart ();
    public static bool restart () throws GLib.Error;
    public static bool get_can_shutdown ();
    public static bool shutdown () throws GLib.Error;

    public class Greeter : GLib.Object {
        public Greeter ();
        public signal void show_message (string text, MessageType type);
        public signal void show_prompt (string text, PromptType type);
        public signal void authentication_complete ();
        public signal void autologin_timer_expired ();

        public bool connect_sync () throws GLib.Error;
        public unowned string get_hint (string name);
        public unowned string default_session_hint { get; }
        public bool hide_users_hint { get; }
        public bool show_manual_login_hint { get; }
        public bool lock_hint { get; }
        public bool has_guest_account_hint { get; }
        public unowned string select_user_hint { get; }
        public bool select_guest_hint { get; }
        public unowned string autologin_user_hint { get; }
        public bool autologin_guest_hint { get; }
        public int autologin_timeout_hint { get; }
        public void cancel_autologin ();
        public void authenticate (string? username = null);
        public void authenticate_as_guest ();
        public void authenticate_remote (string session, string? username);
        public void respond (string response);
        public void cancel_authentication ();
        public bool in_authentication { get; }
        public bool is_authenticated { get; }
        public unowned string? authentication_user { get; }
        public void start_session_sync (string? session = null) throws GLib.Error;
    }
    [CCode (has_type_id = false)]
    public enum MessageType {
        INFO,
        ERROR
    }
    [CCode (has_type_id = false)]
    public enum PromptType {
        QUESTION,
        SECRET
    }
    public class Language : GLib.Object {
        public unowned string code { get; }
        public unowned string name { get; }
        public unowned string territory { get; }
        public bool matches (string code);
    }
    public class Layout : GLib.Object {
        public unowned string description { get; }
        public unowned string name { get; }
        public unowned string short_description { get; }
    }
    public class Session : GLib.Object {
        public unowned string comment { get; }
        public unowned string key { get; }
        public unowned string name { get; }
    }
    public class UserList : GLib.Object {
        public static unowned UserList get_instance ();

        public signal void user_added (User user);
        public signal void user_changed (User user);
        public signal void user_removed (User user);

        public UserList ();
        public int num_users { get; }
        public unowned GLib.List<weak LightDM.User> users { get; }
        public unowned LightDM.User get_user_by_name (string username);
    }
    public class User : GLib.Object {
        public signal void changed ();

        [CCode (array_length = false, array_null_terminated = true)]
        public unowned string[] get_layouts ();

        public unowned string display_name { get; }
        public unowned string image { get; }
        public unowned string language { get; }
        public unowned string layout { get; }
        public bool logged_in { get; }
        public unowned string name { get; }
        public unowned string real_name { get; }
        public unowned string home_directory { get; }
        public unowned string session { get; }
        public unowned string background { get; }
        public bool has_messages { get; }
    }
}