GType: Fix C warnings for properties in interface_init
[vala-lang.git] / vapi / loudmouth-1.0.vapi
blob99de9c86c6d7710f9de101f4ae4ccc18d1d4fa7b
1 /* loudmouth-1.0.vapi generated by vapigen, do not modify. */
3 [CCode (cprefix = "Lm", lower_case_cprefix = "lm_")]
4 namespace Lm {
5         [Compact]
6         [CCode (ref_function = "lm_connection_ref", unref_function = "lm_connection_unref", cheader_filename = "loudmouth/loudmouth.h")]
7         public class Connection {
8                 public const int DEFAULT_PORT;
9                 public const int DEFAULT_PORT_SSL;
10                 public bool authenticate (string username, string password, string resource, Lm.ResultFunction function, GLib.DestroyNotify? notify) throws GLib.Error;
11                 public bool authenticate_and_block (string username, string password, string resource) throws GLib.Error;
12                 public void cancel_open ();
13                 public bool close () throws GLib.Error;
14                 public weak string get_full_jid ();
15                 public weak string get_jid ();
16                 public uint get_keep_alive_rate ();
17                 public string get_local_host ();
18                 public uint get_port ();
19                 public weak Lm.Proxy get_proxy ();
20                 public weak string get_server ();
21                 public weak Lm.SSL get_ssl ();
22                 public Lm.ConnectionState get_state ();
23                 public bool is_authenticated ();
24                 public bool is_open ();
25                 [CCode (has_construct_function = false)]
26                 public Connection (string server);
27                 public bool open (Lm.ResultFunction function, GLib.DestroyNotify? notify) throws GLib.Error;
28                 public bool open_and_block () throws GLib.Error;
29                 public void register_message_handler (Lm.MessageHandler handler, Lm.MessageType type, Lm.HandlerPriority priority);
30                 public bool send (Lm.Message message) throws GLib.Error;
31                 public bool send_raw (string str) throws GLib.Error;
32                 public bool send_with_reply (Lm.Message message, Lm.MessageHandler handler) throws GLib.Error;
33                 public Lm.Message send_with_reply_and_block (Lm.Message message) throws GLib.Error;
34                 public void set_disconnect_function (Lm.DisconnectFunction function, GLib.DestroyNotify? notify);
35                 public void set_jid (string jid);
36                 public void set_keep_alive_rate (uint rate);
37                 public void set_port (uint port);
38                 public void set_proxy (Lm.Proxy proxy);
39                 public void set_server (string server);
40                 public void set_ssl (Lm.SSL ssl);
41                 public void unregister_message_handler (Lm.MessageHandler handler, Lm.MessageType type);
42                 [CCode (has_construct_function = false)]
43                 public Connection.with_context (string server, GLib.MainContext context);
44         }
45         [Compact]
46         [CCode (ref_function = "lm_message_ref", unref_function = "lm_message_unref", cheader_filename = "loudmouth/loudmouth.h")]
47         public class Message {
48                 public Lm.MessageNode node;
49                 public weak Lm.MessageNode get_node ();
50                 public Lm.MessageSubType get_sub_type ();
51                 public Lm.MessageType get_type ();
52                 [CCode (has_construct_function = false)]
53                 public Message (string? to, Lm.MessageType type);
54                 [CCode (has_construct_function = false)]
55                 public Message.with_sub_type (string? to, Lm.MessageType type, Lm.MessageSubType sub_type);
56         }
57         [Compact]
58         [CCode (ref_function = "lm_message_handler_ref", unref_function = "lm_message_handler_unref", cheader_filename = "loudmouth/loudmouth.h")]
59         public class MessageHandler {
60                 public void invalidate ();
61                 public bool is_valid ();
62                 [CCode (has_construct_function = false)]
63                 public MessageHandler (Lm.HandleMessageFunction function, GLib.DestroyNotify? notify);
64         }
65         [Compact]
66         [CCode (ref_function = "lm_message_node_ref", unref_function = "lm_message_node_unref", cheader_filename = "loudmouth/loudmouth.h")]
67         public class MessageNode {
68                 public Lm.MessageNode children;
69                 public string name;
70                 public weak Lm.MessageNode next;
71                 public weak Lm.MessageNode parent;
72                 public weak Lm.MessageNode prev;
73                 public bool raw_mode;
74                 public string value;
75                 public weak Lm.MessageNode add_child (string name, string? value);
76                 public weak Lm.MessageNode? find_child (string child_name);
77                 public weak string get_attribute (string name);
78                 public weak Lm.MessageNode? get_child (string child_name);
79                 public bool get_raw_mode ();
80                 public weak string get_value ();
81                 public void set_attribute (string name, string value);
82                 public void set_attributes (string name, ...);
83                 public void set_raw_mode (bool raw_mode);
84                 public void set_value (string value);
85                 public string to_string ();
86         }
87         [Compact]
88         [CCode (ref_function = "lm_proxy_ref", unref_function = "lm_proxy_unref", cheader_filename = "loudmouth/loudmouth.h")]
89         public class Proxy {
90                 public weak string get_password ();
91                 public uint get_port ();
92                 public weak string get_server ();
93                 public weak string get_username ();
94                 [CCode (has_construct_function = false)]
95                 public Proxy (Lm.ProxyType type);
96                 public void set_password (string password);
97                 public void set_port (uint port);
98                 public void set_server (string server);
99                 public void set_type (Lm.ProxyType type);
100                 public void set_username (string username);
101                 [CCode (has_construct_function = false)]
102                 public Proxy.with_server (Lm.ProxyType type, string server, uint port);
103         }
104         [Compact]
105         [CCode (ref_function = "lm_ssl_ref", unref_function = "lm_ssl_unref", cheader_filename = "loudmouth/loudmouth.h")]
106         public class SSL {
107                 public weak string get_fingerprint ();
108                 public bool get_require_starttls ();
109                 public bool get_use_starttls ();
110                 public static bool is_supported ();
111                 [CCode (has_construct_function = false)]
112                 public SSL (string expected_fingerprint, Lm.SSLFunction ssl_function, GLib.DestroyNotify? notify);
113                 public void use_starttls (bool use_starttls, bool require);
114         }
115         [CCode (cprefix = "LM_CERT_", has_type_id = "0", cheader_filename = "loudmouth/loudmouth.h")]
116         public enum CertificateStatus {
117                 INVALID,
118                 ISSUER_NOT_FOUND,
119                 REVOKED
120         }
121         [CCode (cprefix = "LM_CONNECTION_STATE_", has_type_id = "0", cheader_filename = "loudmouth/loudmouth.h")]
122         public enum ConnectionState {
123                 CLOSED,
124                 OPENING,
125                 OPEN,
126                 AUTHENTICATING,
127                 AUTHENTICATED
128         }
129         [CCode (cprefix = "LM_DISCONNECT_REASON_", has_type_id = "0", cheader_filename = "loudmouth/loudmouth.h")]
130         public enum DisconnectReason {
131                 OK,
132                 PING_TIME_OUT,
133                 HUP,
134                 ERROR,
135                 RESOURCE_CONFLICT,
136                 INVALID_XML,
137                 UNKNOWN
138         }
139         [CCode (cprefix = "LM_ERROR_", has_type_id = "0", cheader_filename = "loudmouth/loudmouth.h")]
140         public enum Error {
141                 CONNECTION_NOT_OPEN,
142                 CONNECTION_OPEN,
143                 AUTH_FAILED,
144                 CONNECTION_FAILED
145         }
146         [CCode (cprefix = "LM_HANDLER_PRIORITY_", has_type_id = "0", cheader_filename = "loudmouth/loudmouth.h")]
147         public enum HandlerPriority {
148                 LAST,
149                 NORMAL,
150                 FIRST
151         }
152         [CCode (cprefix = "LM_HANDLER_RESULT_", has_type_id = "0", cheader_filename = "loudmouth/loudmouth.h")]
153         public enum HandlerResult {
154                 REMOVE_MESSAGE,
155                 ALLOW_MORE_HANDLERS
156         }
157         [CCode (cprefix = "LM_MESSAGE_SUB_TYPE_", has_type_id = "0", cheader_filename = "loudmouth/loudmouth.h")]
158         public enum MessageSubType {
159                 NOT_SET,
160                 AVAILABLE,
161                 NORMAL,
162                 CHAT,
163                 GROUPCHAT,
164                 HEADLINE,
165                 UNAVAILABLE,
166                 PROBE,
167                 SUBSCRIBE,
168                 UNSUBSCRIBE,
169                 SUBSCRIBED,
170                 UNSUBSCRIBED,
171                 GET,
172                 SET,
173                 RESULT,
174                 ERROR
175         }
176         [CCode (cprefix = "LM_MESSAGE_TYPE_", has_type_id = "0", cheader_filename = "loudmouth/loudmouth.h")]
177         public enum MessageType {
178                 MESSAGE,
179                 PRESENCE,
180                 IQ,
181                 STREAM,
182                 STREAM_ERROR,
183                 STREAM_FEATURES,
184                 AUTH,
185                 CHALLENGE,
186                 RESPONSE,
187                 SUCCESS,
188                 FAILURE,
189                 PROCEED,
190                 STARTTLS,
191                 UNKNOWN
192         }
193         [CCode (cprefix = "LM_PROXY_TYPE_", has_type_id = "0", cheader_filename = "loudmouth/loudmouth.h")]
194         public enum ProxyType {
195                 NONE,
196                 HTTP
197         }
198         [CCode (cprefix = "LM_SSL_RESPONSE_", has_type_id = "0", cheader_filename = "loudmouth/loudmouth.h")]
199         public enum SSLResponse {
200                 CONTINUE,
201                 STOP
202         }
203         [CCode (cprefix = "LM_SSL_STATUS_", has_type_id = "0", cheader_filename = "loudmouth/loudmouth.h")]
204         public enum SSLStatus {
205                 NO_CERT_FOUND,
206                 UNTRUSTED_CERT,
207                 CERT_EXPIRED,
208                 CERT_NOT_ACTIVATED,
209                 CERT_HOSTNAME_MISMATCH,
210                 CERT_FINGERPRINT_MISMATCH,
211                 GENERIC_ERROR
212         }
213         [CCode (cheader_filename = "loudmouth/loudmouth.h")]
214         public delegate void DisconnectFunction (Lm.Connection connection, Lm.DisconnectReason reason);
215         [CCode (cheader_filename = "loudmouth/loudmouth.h")]
216         public delegate Lm.HandlerResult HandleMessageFunction (Lm.MessageHandler handler, Lm.Connection connection, Lm.Message message);
217         [CCode (cheader_filename = "loudmouth/loudmouth.h")]
218         public delegate void ResultFunction (Lm.Connection connection, bool success);
219         [CCode (cheader_filename = "loudmouth/loudmouth.h")]
220         public delegate Lm.SSLResponse SSLFunction (Lm.SSL ssl, Lm.SSLStatus status);
221         [CCode (cheader_filename = "loudmouth/loudmouth.h")]
222         public static GLib.Quark error_quark ();