1
/* libsoup-2.2.vapi generated by lt-vapigen, do not modify. */
3
[CCode (cprefix = "Soup", lower_case_cprefix = "soup_")]
5
[CCode (cprefix = "SOUP_ADDRESS_FAMILY_", cheader_filename = "libsoup/soup.h")]
6
public enum AddressFamily {
10
[CCode (cprefix = "SOUP_AUTH_TYPE_", cheader_filename = "libsoup/soup.h")]
11
public enum AuthType {
15
[CCode (cprefix = "SOUP_ALGORITHM_", cheader_filename = "libsoup/soup.h")]
16
public enum DigestAlgorithm {
20
[CCode (cprefix = "SOUP_HANDLER_", cheader_filename = "libsoup/soup.h")]
21
public enum HandlerPhase {
27
[CCode (cprefix = "SOUP_HTTP_", cheader_filename = "libsoup/soup.h")]
28
public enum HttpVersion {
32
[CCode (cprefix = "SOUP_STATUS_", cheader_filename = "libsoup/soup.h")]
33
public enum KnownStatusCode {
62
NOT_APPEARING_IN_THIS_PROTOCOL,
71
PROXY_AUTHENTICATION_REQUIRED,
78
REQUEST_ENTITY_TOO_LARGE,
80
UNSUPPORTED_MEDIA_TYPE,
81
REQUESTED_RANGE_NOT_SATISFIABLE,
87
INTERNAL_SERVER_ERROR,
92
HTTP_VERSION_NOT_SUPPORTED,
96
[CCode (cprefix = "SOUP_MESSAGE_", cheader_filename = "libsoup/soup.h")]
97
public enum MessageFlags {
102
[CCode (cprefix = "SOUP_MESSAGE_STATUS_", cheader_filename = "libsoup/soup.h")]
103
public enum MessageStatus {
110
[CCode (cprefix = "SOUP_METHOD_ID_", cheader_filename = "libsoup/soup.h")]
111
public enum MethodId {
130
[CCode (cprefix = "SOUP_BUFFER_", cheader_filename = "libsoup/soup.h")]
131
public enum Ownership {
136
[CCode (cprefix = "SOUP_SSL_TYPE_", cheader_filename = "libsoup/soup.h")]
137
public enum SSLType {
141
[CCode (cprefix = "SOUP_SSL_ERROR_", cheader_filename = "libsoup/soup.h")]
142
public enum SocketError {
143
HANDSHAKE_NEEDS_READ,
144
HANDSHAKE_NEEDS_WRITE,
147
[CCode (cprefix = "SOUP_SOCKET_", cheader_filename = "libsoup/soup.h")]
148
public enum SocketIOStatus {
154
[CCode (cprefix = "SOUP_STATUS_CLASS_", cheader_filename = "libsoup/soup.h")]
155
public enum StatusClass {
163
[CCode (cprefix = "SOUP_TRANSFER_", cheader_filename = "libsoup/soup.h")]
164
public enum TransferEncoding {
172
[CCode (cprefix = "SOUP_XMLRPC_VALUE_TYPE_", cheader_filename = "libsoup/soup.h")]
173
public enum XmlrpcValueType {
184
[CCode (cheader_filename = "libsoup/soup.h")]
185
public class ServerAuth {
186
public ServerAuth (Soup.ServerAuthContext auth_ctx, GLib.SList auth_hdrs, Soup.Message msg);
187
public weak string get_user ();
188
public bool check_passwd (string passwd);
190
[CCode (cheader_filename = "libsoup/soup.h")]
191
public class Address : GLib.Object {
192
public weak string get_name ();
193
public weak string get_physical ();
194
public uint get_port ();
195
public static GLib.Type get_type ();
196
public Address (string name, uint port);
197
public Address.any (Soup.AddressFamily family, uint port);
198
public void resolve_async (Soup.AddressCallback callback, pointer user_data);
199
public void resolve_async_full (GLib.MainContext async_context, Soup.AddressCallback callback, pointer user_data);
200
public uint resolve_sync ();
201
public signal void dns_result (uint status);
203
[CCode (cheader_filename = "libsoup/soup.h")]
204
public class Auth : GLib.Object {
205
public void authenticate (string username, string password);
206
public static GLib.Type basic_get_type ();
207
public void free_protection_space (GLib.SList space);
208
public weak string get_authorization (Soup.Message msg);
209
public weak GLib.SList get_protection_space (Soup.Uri source_uri);
210
public weak string get_realm ();
211
public weak string get_scheme_name ();
212
public static GLib.Type get_type ();
213
public virtual bool is_authenticated ();
214
public Auth.from_header_list (GLib.SList vals);
216
[CCode (cheader_filename = "libsoup/soup.h")]
217
public class AuthDigest : Soup.Auth {
218
public static GLib.Type get_type ();
220
[CCode (cheader_filename = "libsoup/soup.h")]
221
public class Connection : GLib.Object {
222
public void authenticate (Soup.Message msg, string auth_type, string auth_realm, out string username, out string password);
223
public void connect_async (Soup.ConnectionCallback callback, pointer user_data);
224
public uint connect_sync ();
225
public void disconnect ();
226
public static GLib.Type get_type ();
227
public bool is_in_use ();
228
public ulong last_used ();
229
public Connection (string propname1);
230
public void reauthenticate (Soup.Message msg, string auth_type, string auth_realm, out string username, out string password);
231
public void release ();
232
public void reserve ();
233
public virtual void send_request (Soup.Message req);
235
public weak pointer origin_uri { get; construct; }
237
public weak pointer proxy_uri { get; construct; }
239
public weak pointer ssl_creds { get; construct; }
241
public weak pointer message_filter { get; set; }
243
public weak pointer async_context { get; construct; }
245
public weak uint timeout { get; set; }
246
public signal void connect_result (uint arg2);
247
public signal void disconnected ();
249
[CCode (cheader_filename = "libsoup/soup.h")]
250
public class ConnectionNTLM : Soup.Connection {
251
public static GLib.Type get_type ();
253
[CCode (cheader_filename = "libsoup/soup.h")]
254
public class Message : GLib.Object {
255
public weak string method;
256
public uint status_code;
257
public weak string reason_phrase;
258
public weak Soup.DataBuffer request;
259
public weak GLib.HashTable request_headers;
260
public weak Soup.DataBuffer response;
261
public weak GLib.HashTable response_headers;
262
public Soup.MessageStatus status;
263
public void add_chunk (Soup.Ownership owner, string body, uint length);
264
public void add_final_chunk ();
265
public void add_handler (Soup.HandlerPhase phase, Soup.MessageCallbackFn handler_cb, pointer user_data);
266
public static void add_header (GLib.HashTable hash, string name, string value);
267
public void add_header_handler (string header, Soup.HandlerPhase phase, Soup.MessageCallbackFn handler_cb, pointer user_data);
268
public void add_status_class_handler (pointer status_class, Soup.HandlerPhase phase, Soup.MessageCallbackFn handler_cb, pointer user_data);
269
public void add_status_code_handler (uint status_code, Soup.HandlerPhase phase, Soup.MessageCallbackFn handler_cb, pointer user_data);
270
public static void clear_headers (GLib.HashTable hash);
271
public uint get_flags ();
272
public static weak string get_header (GLib.HashTable hash, string name);
273
public static weak GLib.SList get_header_list (GLib.HashTable hash, string name);
274
public Soup.HttpVersion get_http_version ();
275
public Soup.TransferEncoding get_request_encoding (uint content_length);
276
public Soup.TransferEncoding get_response_encoding (uint content_length);
277
public static GLib.Type get_type ();
278
public weak Soup.Uri get_uri ();
279
public bool io_in_progress ();
280
public void io_pause ();
281
public void io_stop ();
282
public void io_unpause ();
283
public bool is_keepalive ();
284
public Message (string method, string uri_string);
285
public Message.from_uri (string method, Soup.Uri uri);
286
public weak Soup.DataBuffer pop_chunk ();
287
public void read_request (Soup.Socket sock);
288
public void remove_handler (Soup.HandlerPhase phase, Soup.MessageCallbackFn handler_cb, pointer user_data);
289
public static void remove_header (GLib.HashTable hash, string name);
290
public void send_request (Soup.Socket sock, bool is_via_proxy);
291
public void set_flags (uint flags);
292
public void set_http_version (Soup.HttpVersion version);
293
public void set_request (string content_type, Soup.Ownership req_owner, string req_body, ulong req_length);
294
public void set_response (string content_type, Soup.Ownership resp_owner, string resp_body, ulong resp_length);
295
public void set_status (uint status_code);
296
public void set_status_full (uint status_code, string reason_phrase);
297
public void set_uri (Soup.Uri uri);
299
public signal void wrote_informational ();
301
public signal void wrote_headers ();
303
public signal void wrote_chunk ();
305
public signal void wrote_body ();
307
public signal void got_informational ();
309
public signal void got_headers ();
311
public signal void got_chunk ();
313
public signal void got_body ();
315
public signal void restarted ();
317
public signal void finished ();
319
[CCode (cheader_filename = "libsoup/soup.h")]
320
public class Server : GLib.Object {
321
public void add_handler (string path, Soup.ServerAuthContext auth_ctx, Soup.ServerCallbackFn callback, Soup.ServerUnregisterFn unreg, pointer data);
322
public static bool auth_check_passwd (Soup.ServerAuth auth, string passwd);
323
public static void auth_free (Soup.ServerAuth auth);
324
public static weak string auth_get_user (Soup.ServerAuth auth);
325
public static weak Soup.ServerAuth auth_new (Soup.ServerAuthContext auth_ctx, GLib.SList auth_hdrs, Soup.Message msg);
326
public weak Soup.ServerHandler get_handler (string path);
327
public weak Soup.Socket get_listener ();
328
public uint get_port ();
329
public GLib.Quark get_protocol ();
330
public static GLib.Type get_type ();
331
public weak GLib.SList list_handlers ();
332
public Server (string optname1, ...);
334
public void remove_handler (string path);
336
public void run_async ();
338
public weak uint port { get; construct; }
340
public weak Soup.Address @interface { get; construct; }
342
public weak string ssl_cert_file { get; construct; }
344
public weak string ssl_key_file { get; construct; }
346
public weak pointer async_context { get; construct; }
348
[CCode (cheader_filename = "libsoup/soup.h")]
349
public class ServerMessage : Soup.Message {
350
public void finish ();
351
public Soup.TransferEncoding get_encoding ();
352
public weak Soup.Server get_server ();
353
public static GLib.Type get_type ();
354
public bool is_finished ();
355
public bool is_started ();
356
public ServerMessage (Soup.Server server);
357
public void set_encoding (Soup.TransferEncoding encoding);
358
public void start ();
360
[CCode (cheader_filename = "libsoup/soup.h")]
361
public class Session : GLib.Object {
362
public void abort ();
363
public void add_filter (Soup.MessageFilter filter);
364
public virtual void cancel_message (Soup.Message msg);
365
public weak Soup.Connection get_connection (Soup.Message msg, bool try_pruning, bool is_new);
366
public static GLib.Type get_type ();
367
public void queue_message (Soup.Message msg, Soup.MessageCallbackFn callback, pointer user_data);
368
public void remove_filter (Soup.MessageFilter filter);
369
public virtual void requeue_message (Soup.Message msg);
370
public virtual uint send_message (Soup.Message msg);
371
public bool try_prune_connection ();
373
public weak pointer proxy_uri { get; set; }
375
public weak int max_conns { get; set; }
377
public weak int max_conns_per_host { get; set; }
379
public weak bool use_ntlm { get; set; }
381
public weak string ssl_ca_file { get; set; }
383
public weak pointer async_context { get; construct; }
385
public weak uint timeout { get; set; }
387
[CCode (cheader_filename = "libsoup/soup.h")]
388
public class SessionAsync : Soup.Session {
389
public static GLib.Type get_type ();
390
public SessionAsync ();
391
public SessionAsync.with_options (string optname1);
393
[CCode (cheader_filename = "libsoup/soup.h")]
394
public class SessionSync : Soup.Session {
395
public static GLib.Type get_type ();
396
public SessionSync ();
397
public SessionSync.with_options (string optname1);
399
[CCode (cheader_filename = "libsoup/soup.h")]
400
public class Socket : GLib.Object {
401
public static weak Soup.Socket client_new_async (string hostname, uint port, pointer ssl_creds, Soup.SocketCallback callback, pointer user_data);
402
public static weak Soup.Socket client_new_sync (string hostname, uint port, pointer ssl_creds, uint status_ret);
403
public uint connect (Soup.Address remote_addr);
404
public void disconnect ();
405
public weak Soup.Address get_local_address ();
406
public weak Soup.Address get_remote_address ();
407
public static GLib.Type get_type ();
408
public bool is_connected ();
409
public bool listen (Soup.Address local_addr);
410
public Socket (string optname1);
411
public Soup.SocketIOStatus read (pointer buffer, ulong len, ulong nread);
412
public Soup.SocketIOStatus read_until (pointer buffer, ulong len, pointer boundary, ulong boundary_len, ulong nread, bool got_boundary);
413
public static weak Soup.Socket server_new (Soup.Address local_addr, pointer ssl_creds, Soup.SocketListenerCallback callback, pointer user_data);
414
public bool start_proxy_ssl (string ssl_host);
415
public bool start_ssl ();
416
public Soup.SocketIOStatus write (pointer buffer, ulong len, ulong nwrote);
418
public weak bool non_blocking { get; set; }
420
public weak bool nodelay { get; set; }
422
public weak bool reuseaddr { get; set; }
424
public weak bool cloexec { get; set; }
426
public weak bool is_server { get; }
428
public weak pointer ssl_creds { get; set; }
430
public weak pointer async_context { get; construct; }
432
public weak uint timeout { get; set; }
433
public signal void connect_result (uint arg2);
434
public signal void readable ();
435
public signal void writable ();
436
public signal void disconnected ();
437
public signal void new_connection (Soup.Socket arg2);
439
[CCode (cheader_filename = "libsoup/soup.h")]
440
public class AuthBasicClass {
441
public pointer parent_class;
443
[CCode (cheader_filename = "libsoup/soup.h")]
444
public class DNSLookup {
445
public void cancel ();
446
public weak string get_hostname ();
447
public static weak Soup.DNSLookup name (string name);
448
public bool resolve ();
449
public void resolve_async (GLib.MainContext async_context, Soup.DNSCallback callback, pointer user_data);
451
[CCode (cheader_filename = "libsoup/soup.h")]
452
public class DataBuffer {
453
public Soup.Ownership owner;
454
public weak string body;
457
[CCode (cheader_filename = "libsoup/soup.h")]
458
public class MD5Context {
462
public bool doByteReverse;
464
[CCode (free_function = "soup_message_queue_destroy", cheader_filename = "libsoup/soup.h")]
465
public class MessageQueue {
466
public void append (Soup.Message msg);
467
public weak Soup.Message first (Soup.MessageQueueIter iter);
468
public void free_iter (Soup.MessageQueueIter iter);
469
public MessageQueue ();
470
public weak Soup.Message next (Soup.MessageQueueIter iter);
471
public weak Soup.Message remove (Soup.MessageQueueIter iter);
472
public void remove_message (Soup.Message msg);
474
[CCode (cheader_filename = "libsoup/soup.h")]
475
public class MessageQueueIter {
476
public weak GLib.List cur;
477
public weak GLib.List next;
479
[CCode (cheader_filename = "libsoup/soup.h")]
480
public class ServerAuthBasic {
481
public Soup.AuthType type;
482
public weak string user;
483
public weak string passwd;
485
[CCode (cheader_filename = "libsoup/soup.h")]
486
public class ServerAuthContext {
488
public Soup.ServerAuthCallbackFn callback;
489
public pointer user_data;
490
public uint allow_algorithms;
491
public bool force_integrity;
492
public void challenge (Soup.Message msg, string header_name);
494
[CCode (cheader_filename = "libsoup/soup.h")]
495
public class ServerAuthDigest {
496
public Soup.AuthType type;
497
public Soup.DigestAlgorithm algorithm;
498
public bool integrity;
499
public weak string realm;
500
public weak string user;
501
public weak string nonce;
502
public int nonce_count;
503
public weak string cnonce;
504
public weak string digest_uri;
505
public weak string digest_response;
506
public weak string request_method;
508
[CCode (cheader_filename = "libsoup/soup.h")]
509
public class ServerContext {
510
public weak Soup.Message msg;
511
public weak string path;
512
public Soup.MethodId method_id;
513
public weak Soup.ServerAuth auth;
514
public weak Soup.Server server;
515
public weak Soup.ServerHandler handler;
516
public weak Soup.Socket sock;
517
public weak Soup.Address get_client_address ();
518
public weak string get_client_host ();
520
[CCode (cheader_filename = "libsoup/soup.h")]
521
public class ServerHandler {
522
public weak string path;
523
public weak Soup.ServerAuthContext auth_ctx;
524
public Soup.ServerCallbackFn callback;
525
public Soup.ServerUnregisterFn unregister;
526
public pointer user_data;
528
[CCode (copy_function = "soup_uri_copy", cheader_filename = "libsoup/soup.h")]
530
public GLib.Quark protocol;
531
public weak string user;
532
public weak string passwd;
533
public weak string host;
535
public weak string path;
536
public weak string query;
537
public weak string fragment;
538
public bool broken_encoding;
539
public weak Soup.Uri copy ();
540
public weak Soup.Uri copy_root ();
541
public static void decode (string part);
542
public static weak string encode (string part, string escape_extra);
543
public bool equal (Soup.Uri uri2);
544
public Uri (string uri_string);
545
public Uri.with_base (Soup.Uri @base, string uri_string);
546
public weak string to_string (bool just_path);
547
public bool uses_default_port ();
549
[CCode (cheader_filename = "libsoup/soup.h")]
551
public static weak string generate (ulong when);
552
public static ulong iso8601_parse (string timestamp);
553
public static ulong parse (string timestamp);
555
[CCode (cheader_filename = "libsoup/soup.h")]
557
public static void init ();
559
[CCode (cheader_filename = "libsoup/soup.h")]
560
public class Header {
561
public static weak string param_copy_token (GLib.HashTable tokens, string t);
562
public static weak string param_decode_token (out string @in);
563
public static void param_destroy_hash (GLib.HashTable table);
564
public static weak GLib.HashTable param_parse_list (string header);
566
[CCode (cheader_filename = "libsoup/soup.h")]
567
public class Headers {
568
public static bool parse_request (string str, int len, GLib.HashTable dest, out string req_method, out string req_path, Soup.HttpVersion ver);
569
public static bool parse_response (string str, int len, GLib.HashTable dest, Soup.HttpVersion ver, uint status_code, out string reason_phrase);
570
public static bool parse_status_line (string status_line, Soup.HttpVersion ver, uint status_code, out string reason_phrase);
572
[CCode (cheader_filename = "libsoup/soup.h")]
574
public static GLib.Quark error_quark ();
575
public static void free_client_credentials (pointer creds);
576
public static void free_server_credentials (pointer creds);
577
public static pointer get_client_credentials (string ca_file);
578
public static pointer get_server_credentials (string cert_file, string key_file);
579
public static weak GLib.IOChannel wrap_iochannel (GLib.IOChannel sock, Soup.SSLType type, string remote_host, pointer credentials);
581
[CCode (cheader_filename = "libsoup/soup.h")]
583
public static bool case_equal (pointer v1, pointer v2);
584
public static uint case_hash (pointer key);
586
[CCode (cheader_filename = "libsoup/soup.h")]
587
public interface MessageFilter {
588
public static GLib.Type get_type ();
589
public abstract void setup_message (Soup.Message msg);
591
public static delegate void AddressCallback (Soup.Address addr, uint status, pointer data);
592
public static delegate void ConnectionCallback (Soup.Connection conn, uint status, pointer data);
593
public static delegate void DNSCallback (Soup.DNSLookup lookup, bool success, pointer user_data);
594
public static delegate void MessageCallbackFn (Soup.Message req, pointer user_data);
595
public static delegate bool ServerAuthCallbackFn (Soup.ServerAuthContext auth_ctx, Soup.ServerAuth auth, Soup.Message msg, pointer data);
596
public static delegate void ServerCallbackFn (Soup.ServerContext context, Soup.Message msg, pointer user_data);
597
public static delegate void ServerUnregisterFn (Soup.Server server, Soup.ServerHandler handler, pointer user_data);
598
public static delegate void SocketCallback (Soup.Socket sock, uint status, pointer user_data);
599
public static delegate void SocketListenerCallback (Soup.Socket listener, Soup.Socket sock, pointer user_data);
600
public static weak GLib.Source add_idle (GLib.MainContext async_context, GLib.SourceFunc function, pointer data);
601
public static weak GLib.Source add_timeout (GLib.MainContext async_context, uint interval, GLib.SourceFunc function, pointer data);
602
public static Soup.MethodId method_get_id (string method);
603
public static uint signal_connect_once (pointer instance, string detailed_signal, GLib.Callback c_handler, pointer data);
604
public static weak string status_get_phrase (uint status_code);