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