]> rtime.felk.cvut.cz Git - sojka/lightdm.git/blob - liblightdm-gobject/liblightdm-gobject-1.vapi
Use asynchronous methods in gobject greeter
[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         public async bool connect_sync () throws GLib.Error;
28         public bool connect_sync () throws GLib.Error;
29         public unowned string get_hint (string name);
30         public unowned string default_session_hint { get; }
31         public bool hide_users_hint { get; }
32         public bool show_manual_login_hint { get; }
33         public bool show_remote_login_hint { get; }
34         public bool lock_hint { get; }
35         public bool has_guest_account_hint { get; }
36         public unowned string select_user_hint { get; }
37         public bool select_guest_hint { get; }
38         public unowned string autologin_user_hint { get; }
39         public bool autologin_guest_hint { get; }
40         public int autologin_timeout_hint { get; }
41         public void cancel_autologin ();
42         public void authenticate (string? username = null);
43         public void authenticate_as_guest ();
44         public void authenticate_autologin ();
45         public void authenticate_remote (string session, string? username);
46         public void respond (string response);
47         public void cancel_authentication ();
48         public bool in_authentication { get; }
49         public bool is_authenticated { get; }
50         public unowned string? authentication_user { get; }
51         public async void start_session (string? session = null) throws GLib.Error;
52         public void start_session_sync (string? session = null) throws GLib.Error;
53         public async string ensure_shared_data_dir (string username);
54         public string ensure_shared_data_dir_sync (string username);
55     }
56     [CCode (has_type_id = false)]
57     public enum MessageType {
58         INFO,
59         ERROR
60     }
61     [CCode (has_type_id = false)]
62     public enum PromptType {
63         QUESTION,
64         SECRET
65     }
66     public class Language : GLib.Object {
67         public unowned string code { get; }
68         public unowned string name { get; }
69         public unowned string territory { get; }
70         public bool matches (string code);
71     }
72     public class Layout : GLib.Object {
73         public unowned string description { get; }
74         public unowned string name { get; }
75         public unowned string short_description { get; }
76     }
77     public class Session : GLib.Object {
78         public unowned string comment { get; }
79         public unowned string key { get; }
80         public unowned string name { get; }
81     }
82     public class UserList : GLib.Object {
83         public static unowned UserList get_instance ();
84
85         public signal void user_added (User user);
86         public signal void user_changed (User user);
87         public signal void user_removed (User user);
88
89         public UserList ();
90         public int num_users { get; }
91         public unowned GLib.List<weak LightDM.User> users { get; }
92         public unowned LightDM.User get_user_by_name (string username);
93     }
94     public class User : GLib.Object {
95         public signal void changed ();
96
97         [CCode (array_length = false, array_null_terminated = true)]
98         public unowned string[] get_layouts ();
99
100         public unowned string display_name { get; }
101         public unowned string image { get; }
102         public unowned string language { get; }
103         public unowned string layout { get; }
104         public bool logged_in { get; }
105         public unowned string name { get; }
106         public unowned string real_name { get; }
107         public unowned string home_directory { get; }
108         public unowned string session { get; }
109         public unowned string background { get; }
110         public bool has_messages { get; }
111     }
112 }