From 52d89e603e17ca9c4e62781d973f165c1f8c48e4 Mon Sep 17 00:00:00 2001 From: Rico Tzschichholz Date: Tue, 17 Mar 2015 19:52:35 +0100 Subject: [PATCH] vapi: Update GIR-based bindings --- vapi/clutter-1.0.vapi | 10 +++++ vapi/gio-2.0.vapi | 7 +--- vapi/json-glib-1.0.vapi | 2 +- vapi/libsoup-2.4.vapi | 92 +++++++++++++++++++++++++++++++++++++++-- 4 files changed, 102 insertions(+), 9 deletions(-) diff --git a/vapi/clutter-1.0.vapi b/vapi/clutter-1.0.vapi index 639b7a3eb..c4a02bf5d 100644 --- a/vapi/clutter-1.0.vapi +++ b/vapi/clutter-1.0.vapi @@ -5491,7 +5491,9 @@ namespace Clutter { public void set_color (Clutter.Color? color); [Deprecated (since = "1.10")] public void set_layout_manager (Clutter.LayoutManager manager); + [Deprecated (since = "1.10")] public Clutter.Color color { get; set; } + [Deprecated (since = "1.10")] [NoAccessorMethod] public bool color_set { get; set; } public Clutter.LayoutManager layout_manager { get; set; } @@ -6350,14 +6352,22 @@ namespace Clutter { [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_rectangle_get_type ()")] public class Rectangle : Clutter.Actor, Atk.Implementor, Clutter.Animatable, Clutter.Container, Clutter.Scriptable { [CCode (has_construct_function = false, type = "ClutterActor*")] + [Deprecated (since = "1.10")] public Rectangle (); + [Deprecated (since = "1.10")] public Clutter.Color get_border_color (); + [Deprecated (since = "1.10")] public uint get_border_width (); + [Deprecated (since = "1.10")] public Clutter.Color get_color (); + [Deprecated (since = "1.10")] public void set_border_color (Clutter.Color color); + [Deprecated (since = "1.10")] public void set_border_width (uint width); + [Deprecated (since = "1.10")] public void set_color (Clutter.Color color); [CCode (has_construct_function = false, type = "ClutterActor*")] + [Deprecated (since = "1.10")] public Rectangle.with_color (Clutter.Color color); public Clutter.Color border_color { get; set; } public uint border_width { get; set; } diff --git a/vapi/gio-2.0.vapi b/vapi/gio-2.0.vapi index 5eb0b1d77..53817ef68 100644 --- a/vapi/gio-2.0.vapi +++ b/vapi/gio-2.0.vapi @@ -2207,6 +2207,7 @@ namespace GLib { public async Task (GLib.Object? source_object, GLib.Cancellable? cancellable = null); public unowned GLib.Cancellable get_cancellable (); public bool get_check_cancellable (); + public bool get_completed (); public unowned GLib.MainContext get_context (); public int get_priority (); public bool get_return_on_cancel (); @@ -2228,6 +2229,7 @@ namespace GLib { public bool set_return_on_cancel (bool return_on_cancel); public void set_source_tag (void* source_tag); public void set_task_data (void* task_data, GLib.DestroyNotify? task_data_destroy); + public bool completed { get; } } [CCode (cheader_filename = "gio/gio.h", type_id = "g_tcp_connection_get_type ()")] public class TcpConnection : GLib.SocketConnection { @@ -3003,11 +3005,6 @@ namespace GLib { } [CCode (cheader_filename = "gio/gio.h", has_type_id = false)] public struct StaticResource { - [CCode (array_length_cname = "data_len", array_length_type = "gsize")] - public weak uint8[] data; - public size_t data_len; - public GLib.Resource resource; - public GLib.StaticResource* next; public void fini (); public unowned GLib.Resource get_resource (); public void init (); diff --git a/vapi/json-glib-1.0.vapi b/vapi/json-glib-1.0.vapi index 8ddf59d28..6254a8916 100644 --- a/vapi/json-glib-1.0.vapi +++ b/vapi/json-glib-1.0.vapi @@ -210,7 +210,7 @@ namespace Json { public Json.Node default_serialize_property (string property_name, GLib.Value value, GLib.ParamSpec pspec); public abstract bool deserialize_property (string property_name, out GLib.Value value, GLib.ParamSpec pspec, Json.Node property_node); public abstract unowned GLib.ParamSpec find_property (string name); - public abstract void get_property (GLib.ParamSpec pspec, GLib.Value value); + public abstract GLib.Value get_property (GLib.ParamSpec pspec); [CCode (array_length_pos = 0.1, array_length_type = "guint")] public GLib.ParamSpec[] list_properties (); public abstract Json.Node serialize_property (string property_name, GLib.Value value, GLib.ParamSpec pspec); diff --git a/vapi/libsoup-2.4.vapi b/vapi/libsoup-2.4.vapi index 841b5ea80..de773dbd4 100644 --- a/vapi/libsoup-2.4.vapi +++ b/vapi/libsoup-2.4.vapi @@ -255,6 +255,7 @@ namespace Soup { public unowned GLib.SocketAddress? get_remote_address (); [Deprecated] public unowned Soup.Socket get_socket (); + public GLib.IOStream steal_connection (); } [CCode (cheader_filename = "libsoup/soup.h")] [Compact] @@ -453,6 +454,8 @@ namespace Soup { [HasEmitter] public virtual signal void restarted (); [HasEmitter] + public virtual signal void starting (); + [HasEmitter] public virtual signal void wrote_body (); [HasEmitter] public signal void wrote_body_data (Soup.Buffer chunk); @@ -504,9 +507,12 @@ namespace Soup { public unowned string? get_content_type (out GLib.HashTable @params); public Soup.Encoding get_encoding (); public Soup.Expectation get_expectations (); + public Soup.MessageHeadersType get_headers_type (); public unowned string? get_list (string name); public unowned string? get_one (string name); public bool get_ranges (int64 total_length, [CCode (array_length_cname = "length", array_length_pos = 2.1)] out Soup.Range[] ranges); + public bool header_contains (string name, string token); + public bool header_equals (string name, string value); public void remove (string name); public void replace (string name, string value); public void set_content_disposition (string disposition, GLib.HashTable? @params); @@ -604,7 +610,9 @@ namespace Soup { public Server (string optname1, ...); public bool accept_iostream (GLib.IOStream stream, GLib.SocketAddress? local_addr, GLib.SocketAddress? remote_addr) throws GLib.Error; public void add_auth_domain (Soup.AuthDomain auth_domain); + public void add_early_handler (string? path, owned Soup.ServerCallback callback); public void add_handler (string? path, owned Soup.ServerCallback callback); + public void add_websocket_handler (string? path, string? origin, [CCode (array_length = false, array_null_terminated = true)] string[]? protocols, owned Soup.ServerWebsocketCallback callback); public void disconnect (); [Deprecated] public unowned GLib.MainContext? get_async_context (); @@ -696,7 +704,9 @@ namespace Soup { public GLib.InputStream send (Soup.Message msg, GLib.Cancellable? cancellable = null) throws GLib.Error; public async GLib.InputStream send_async (Soup.Message msg, GLib.Cancellable? cancellable = null) throws GLib.Error; public virtual uint send_message (Soup.Message msg); + public GLib.IOStream steal_connection (Soup.Message msg); public void unpause_message (Soup.Message msg); + public async Soup.WebsocketConnection websocket_connect_async (Soup.Message msg, string? origin, [CCode (array_length = false, array_null_terminated = true)] string[]? protocols, GLib.Cancellable? cancellable) throws GLib.Error; [CCode (has_construct_function = false)] public Session.with_options (string optname1, ...); public bool would_redirect (Soup.Message msg); @@ -746,6 +756,7 @@ namespace Soup { public virtual signal void authenticate (Soup.Message msg, Soup.Auth auth, bool retrying); public signal void connection_created (GLib.Object connection); public signal void request_queued (Soup.Message msg); + [Deprecated (since = "2.50.")] public virtual signal void request_started (Soup.Message msg, Soup.Socket socket); public signal void request_unqueued (Soup.Message msg); public signal void tunneling (GLib.Object connection); @@ -788,8 +799,6 @@ namespace Soup { public Soup.SocketIOStatus write ([CCode (array_length_cname = "len", array_length_pos = 1.5, array_length_type = "gsize")] uint8[] buffer, out size_t nwrote, GLib.Cancellable? cancellable = null) throws GLib.Error; [NoAccessorMethod] public GLib.MainContext async_context { owned get; construct; } - [NoAccessorMethod] - public bool close_on_dispose { get; set construct; } public int fd { get; construct; } public GLib.Socket gsocket { construct; } public GLib.IOStream iostream { construct; } @@ -868,6 +877,32 @@ namespace Soup { [CCode (has_construct_function = false)] public URI.with_base (Soup.URI @base, string uri_string); } + [CCode (cheader_filename = "libsoup/soup.h", type_id = "soup_websocket_connection_get_type ()")] + public class WebsocketConnection : GLib.Object { + [CCode (has_construct_function = false)] + public WebsocketConnection (GLib.IOStream stream, Soup.URI uri, Soup.WebsocketConnectionType type, string? origin, string? protocol); + public void close (ushort code, string? data); + public ushort get_close_code (); + public unowned string get_close_data (); + public Soup.WebsocketConnectionType get_connection_type (); + public unowned GLib.IOStream get_io_stream (); + public unowned string? get_origin (); + public unowned string? get_protocol (); + public Soup.WebsocketState get_state (); + public unowned Soup.URI get_uri (); + public void send_binary ([CCode (array_length_cname = "length", array_length_pos = 1.1, array_length_type = "gsize")] uint8[] data); + public void send_text (string text); + public Soup.WebsocketConnectionType connection_type { get; construct; } + public GLib.IOStream io_stream { get; construct; } + public string origin { get; construct; } + public string protocol { get; construct; } + public Soup.WebsocketState state { get; } + public Soup.URI uri { get; construct; } + public virtual signal void closed (); + public virtual signal void closing (); + public virtual signal void error (GLib.Error error); + public virtual signal void message (int type, GLib.Bytes message); + } [CCode (cheader_filename = "libsoup/soup.h", type_cname = "SoupPasswordManagerInterface", type_id = "soup_password_manager_get_type ()")] public interface PasswordManager : Soup.SessionFeature, GLib.Object { public abstract void get_passwords_async (Soup.Message msg, Soup.Auth auth, bool retrying, GLib.MainContext async_context, GLib.Cancellable? cancellable, [CCode (scope = "async")] owned Soup.PasswordManagerCallback callback); @@ -1070,7 +1105,8 @@ namespace Soup { CONTENT_DECODED, CERTIFICATE_TRUSTED, NEW_CONNECTION, - IDEMPOTENT + IDEMPOTENT, + IGNORE_CONNECTION_LIMITS } [CCode (cheader_filename = "libsoup/soup.h", cprefix = "SOUP_MESSAGE_HEADERS_", type_id = "soup_message_headers_type_get_type ()")] public enum MessageHeadersType { @@ -1168,6 +1204,46 @@ namespace Soup { public static unowned string get_phrase (uint status_code); public static uint proxify (uint status_code); } + [CCode (cheader_filename = "libsoup/soup.h", cprefix = "SOUP_WEBSOCKET_CLOSE_", type_id = "soup_websocket_close_code_get_type ()")] + public enum WebsocketCloseCode { + NORMAL, + GOING_AWAY, + PROTOCOL_ERROR, + UNSUPPORTED_DATA, + NO_STATUS, + ABNORMAL, + BAD_DATA, + POLICY_VIOLATION, + TOO_BIG, + NO_EXTENSION, + SERVER_ERROR, + TLS_HANDSHAKE + } + [CCode (cheader_filename = "libsoup/soup.h", cprefix = "SOUP_WEBSOCKET_CONNECTION_", type_id = "soup_websocket_connection_type_get_type ()")] + public enum WebsocketConnectionType { + UNKNOWN, + CLIENT, + SERVER + } + [CCode (cheader_filename = "libsoup/soup.h", cprefix = "SOUP_WEBSOCKET_DATA_", type_id = "soup_websocket_data_type_get_type ()")] + public enum WebsocketDataType { + TEXT, + BINARY + } + [CCode (cheader_filename = "libsoup/soup.h", cprefix = "SOUP_WEBSOCKET_ERROR_", type_id = "soup_websocket_error_get_type ()")] + public enum WebsocketError { + FAILED, + NOT_WEBSOCKET, + BAD_HANDSHAKE, + BAD_ORIGIN; + public static GLib.Quark get_quark (); + } + [CCode (cheader_filename = "libsoup/soup.h", cprefix = "SOUP_WEBSOCKET_STATE_", type_id = "soup_websocket_state_get_type ()")] + public enum WebsocketState { + OPEN, + CLOSING, + CLOSED + } [CCode (cheader_filename = "libsoup/soup.h", cprefix = "SOUP_REQUEST_ERROR_")] public errordomain RequestError { BAD_URI, @@ -1225,6 +1301,8 @@ namespace Soup { public delegate void ProxyURIResolverCallback (Soup.ProxyURIResolver resolver, uint status, Soup.URI proxy_uri); [CCode (cheader_filename = "libsoup/soup.h", instance_pos = 5.9)] public delegate void ServerCallback (Soup.Server server, Soup.Message msg, string path, GLib.HashTable? query, Soup.ClientContext client); + [CCode (cheader_filename = "libsoup/soup.h", instance_pos = 4.9)] + public delegate void ServerWebsocketCallback (Soup.Server server, Soup.WebsocketConnection connection, string path, Soup.ClientContext client); [CCode (cheader_filename = "libsoup/soup.h", instance_pos = 2.9)] public delegate void SessionCallback (Soup.Session session, Soup.Message msg); [CCode (cheader_filename = "libsoup/soup.h", instance_pos = 2.9)] @@ -1642,6 +1720,14 @@ namespace Soup { [CCode (cheader_filename = "libsoup/soup.h")] public static GLib.HashTable value_hash_new_with_vals (...); [CCode (cheader_filename = "libsoup/soup.h")] + public static void websocket_client_prepare_handshake (Soup.Message msg, string? origin, [CCode (array_length = false, array_null_terminated = true)] string[]? protocols); + [CCode (cheader_filename = "libsoup/soup.h")] + public static bool websocket_client_verify_handshake (Soup.Message msg) throws GLib.Error; + [CCode (cheader_filename = "libsoup/soup.h")] + public static bool websocket_server_check_handshake (Soup.Message msg, string? origin, [CCode (array_length = false, array_null_terminated = true)] string[]? protocols) throws GLib.Error; + [CCode (cheader_filename = "libsoup/soup.h")] + public static bool websocket_server_process_handshake (Soup.Message msg, string? origin, [CCode (array_length = false, array_null_terminated = true)] string[]? protocols); + [CCode (cheader_filename = "libsoup/soup.h")] [Deprecated (replacement = "XMLRPC.build_fault", since = "vala-0.12")] [PrintfFormat] public static unowned string xmlrpc_build_fault (int fault_code, string fault_format, ...); -- 2.47.2