]> rtime.felk.cvut.cz Git - sojka/lightdm.git/blob - liblightdm-gobject/liblightdm-gobject-1.vapi
Support Wayland sessions / greeters
[sojka/lightdm.git] / liblightdm-gobject / liblightdm-gobject-1.vapi
1 [CCode (cprefix = "LightDM", lower_case_cprefix = "lightdm_", cheader_filename = "lightdm.h")]
2 namespace LightDM {
3     public static unowned string get_hostname ();
4     public static unowned GLib.List<weak LightDM.Session> get_sessions ();
5     public static unowned GLib.List<weak LightDM.Language> get_languages ();
6     public static unowned GLib.List<weak LightDM.Layout> get_layouts ();
7     public static unowned GLib.List<weak LightDM.Session> get_remote_sessions ();
8     public static unowned Language get_language ();
9     public static void set_layout (Layout layout);
10     public static unowned Layout get_layout ();
11     public static bool get_can_suspend ();
12     public static bool suspend () throws GLib.Error;
13     public static bool get_can_hibernate ();
14     public static bool hibernate () throws GLib.Error;
15     public static bool get_can_restart ();
16     public static bool restart () throws GLib.Error;
17     public static bool get_can_shutdown ();
18     public static bool shutdown () throws GLib.Error;
19
20     public class Greeter : GLib.Object {
21         public Greeter ();
22         public signal void show_message (string text, MessageType type);
23         public signal void show_prompt (string text, PromptType type);
24         public signal void authentication_complete ();
25         public signal void autologin_timer_expired ();
26
27         [Deprecated (replacement = "LightDM.Greeter.connect_to_daemon_sync")]
28         public bool connect_sync () throws GLib.Error;
29         public async bool connect_to_daemon () throws GLib.Error;
30         public bool connect_to_daemon_sync () throws GLib.Error;
31         public unowned string get_hint (string name);
32         public unowned string default_session_hint { get; }
33         public bool hide_users_hint { get; }
34         public bool show_manual_login_hint { get; }
35         public bool show_remote_login_hint { get; }
36         public bool lock_hint { get; }
37         public bool has_guest_account_hint { get; }
38         public unowned string select_user_hint { get; }
39         public bool select_guest_hint { get; }
40         public unowned string autologin_user_hint { get; }
41         public bool autologin_guest_hint { get; }
42         public int autologin_timeout_hint { get; }
43         public void cancel_autologin ();
44         public void authenticate (string? username = null);
45         public void authenticate_as_guest ();
46         public void authenticate_autologin ();
47         public void authenticate_remote (string session, string? username);
48         public void respond (string response);
49         public void cancel_authentication ();
50         public bool in_authentication { get; }
51         public bool is_authenticated { get; }
52         public unowned string? authentication_user { get; }
53         public async void start_session (string? session = null) throws GLib.Error;
54         public bool start_session_sync (string? session = null) throws GLib.Error;
55         public async string ensure_shared_data_dir (string username);
56         public string ensure_shared_data_dir_sync (string username);
57     }
58     [CCode (has_type_id = false)]
59     public enum MessageType {
60         INFO,
61         ERROR
62     }
63     [CCode (has_type_id = false)]
64     public enum PromptType {
65         QUESTION,
66         SECRET
67     }
68     public class Language : GLib.Object {
69         public unowned string code { get; }
70         public unowned string name { get; }
71         public unowned string territory { get; }
72         public bool matches (string code);
73     }
74     public class Layout : GLib.Object {
75         public unowned string description { get; }
76         public unowned string name { get; }
77         public unowned string short_description { get; }
78     }
79     public class Session : GLib.Object {
80         public unowned string comment { get; }
81         public unowned string key { get; }
82         public unowned string name { get; }
83     }
84     public class UserList : GLib.Object {
85         public static unowned UserList get_instance ();
86
87         public signal void user_added (User user);
88         public signal void user_changed (User user);
89         public signal void user_removed (User user);
90
91         public UserList ();
92         public int num_users { get; }
93         public unowned GLib.List<weak LightDM.User> users { get; }
94         public unowned LightDM.User get_user_by_name (string username);
95     }
96     public class User : GLib.Object {
97         public signal void changed ();
98
99         [CCode (array_length = false, array_null_terminated = true)]
100         public unowned string[] get_layouts ();
101
102         public unowned string display_name { get; }
103         public unowned string image { get; }
104         public unowned string language { get; }
105         public unowned string layout { get; }
106         public bool logged_in { get; }
107         public unowned string name { get; }
108         public unowned string real_name { get; }
109         public unowned Posix.uid_t uid { get; }
110         public unowned string home_directory { get; }
111         public unowned string session { get; }
112         public unowned string background { get; }
113         public bool has_messages { get; }
114     }
115 }