From: Michal Hruby Date: Sun, 20 Feb 2011 21:46:33 +0000 (+0100) Subject: rest-0.6: Fix multiple issues with the bindings X-Git-Tag: 0.11.7~64 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c54983551ddee3ffdb726309a86435160d825836;p=thirdparty%2Fvala.git rest-0.6: Fix multiple issues with the bindings --- diff --git a/vapi/packages/rest-0.6/rest-0.6-custom.vala b/vapi/packages/rest-0.6/rest-0.6-custom.vala index ac95972c2..ee8d60d06 100644 --- a/vapi/packages/rest-0.6/rest-0.6-custom.vala +++ b/vapi/packages/rest-0.6/rest-0.6-custom.vala @@ -1,23 +1,11 @@ namespace Rest { [CCode (cheader_filename = "rest/rest-proxy.h")] - public class Proxy : GLib.Object { + public class Proxy { public Rest.ProxyCall new_call (); } - [CCode (cheader_filename = "rest/rest-proxy-call.h")] - public class ProxyCall : GLib.Object { - } - - [CCode (cheader_filename = "rest/rest-xml-parser.h")] - public class XmlParser : GLib.Object { - } - - [CCode (cheader_filename = "rest/oauth-proxy.h")] - public class OAuthProxy : Rest.Proxy { - } - - [CCode (cheader_filename = "rest/oauth-proxy-call.h")] - public class OAuthProxyCall : Rest.ProxyCall { + [CCode (cname = "OAuthProxy", cheader_filename = "rest/oauth-proxy.h")] + public class OAuthProxy { } } diff --git a/vapi/packages/rest-0.6/rest-0.6.files b/vapi/packages/rest-0.6/rest-0.6.files index 1db420b6a..5d82be854 100644 --- a/vapi/packages/rest-0.6/rest-0.6.files +++ b/vapi/packages/rest-0.6/rest-0.6.files @@ -1 +1,2 @@ include/rest-0.6/rest/*.h +lib/librest-0.6.so diff --git a/vapi/packages/rest-0.6/rest-0.6.gi b/vapi/packages/rest-0.6/rest-0.6.gi index fed255433..169c4dab1 100644 --- a/vapi/packages/rest-0.6/rest-0.6.gi +++ b/vapi/packages/rest-0.6/rest-0.6.gi @@ -19,7 +19,94 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -78,7 +165,7 @@ - + @@ -86,8 +173,8 @@ - - + + @@ -97,7 +184,7 @@ - + @@ -133,20 +220,14 @@ - - - - - - - - - - - - - - + + + + + + + + @@ -169,19 +250,19 @@ - + - - + + - + @@ -208,9 +289,34 @@ - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -378,65 +484,19 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - + + - - - - - - - - - - + + + + - + @@ -445,57 +505,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + diff --git a/vapi/packages/rest-0.6/rest-0.6.metadata b/vapi/packages/rest-0.6/rest-0.6.metadata index d8b6fb3a8..a3bfe63d4 100644 --- a/vapi/packages/rest-0.6/rest-0.6.metadata +++ b/vapi/packages/rest-0.6/rest-0.6.metadata @@ -12,14 +12,20 @@ RestProxyCallAsyncCallback cheader_filename="rest/rest-proxy-call.h" has_target= *Class hidden="1" *.parent hidden="1" -rest_proxy_call_get_params type_arguments="string,string" +rest_proxy_call_get_params type_arguments="string,string" transfer_ownership="1" rest_proxy_bind ellipsis="1" rest_proxy_new_call hidden="1" rest_proxy_call_add_headers ellipsis="1" rest_proxy_call_add_params ellipsis="1" rest_proxy_call_async name="run_async" rest_proxy_call_async.weak_object nullable="1" +rest_proxy_call_async.callback delegate_target_pos="2.9" rest_proxy_call_async.userdata hidden="1" +oauth_proxy_auth_step* deprecated="1" +oauth_proxy*.weak_object nullable="1" +oauth_proxy_auth_step_async.callback delegate_target_pos="3.9" +oauth_proxy_request_token_async.callback delegate_target_pos="4.9" +oauth_proxy_access_token_async.callback delegate_target_pos="4.9" RestProxyCallAsyncCallback.userdata hidden="1" RestProxyCallAsyncCallback.error nullable="1" RestProxyCallAsyncCallback.weak_object nullable="1" diff --git a/vapi/rest-0.6.vapi b/vapi/rest-0.6.vapi index 401dce70b..bd91c0000 100644 --- a/vapi/rest-0.6.vapi +++ b/vapi/rest-0.6.vapi @@ -2,53 +2,70 @@ [CCode (cprefix = "Rest", lower_case_cprefix = "rest_")] namespace Rest { - [CCode (cheader_filename = "rest/oauth-proxy.h")] + [CCode (cname = "OAuthProxy", cheader_filename = "rest/oauth-proxy.h")] public class OAuthProxy : Rest.Proxy { [CCode (cname = "oauth_proxy_new", type = "RestProxy*", has_construct_function = false)] public OAuthProxy (string consumer_key, string consumer_secret, string url_format, bool binding_required); [CCode (cname = "oauth_proxy_access_token")] - public static bool access_token (Rest.OAuthProxy proxy, string function, string verifier) throws GLib.Error; + public bool access_token (string function, string verifier) throws GLib.Error; [CCode (cname = "oauth_proxy_access_token_async")] - public static bool access_token_async (Rest.OAuthProxy proxy, string function, string verifier, Rest.OAuthProxyAuthCallback callback, GLib.Object weak_object) throws GLib.Error; + public bool access_token_async (string function, string verifier, [CCode (delegate_target_pos = 4.9)] Rest.OAuthProxyAuthCallback callback, GLib.Object? weak_object) throws GLib.Error; + [Deprecated] [CCode (cname = "oauth_proxy_auth_step")] - public static bool auth_step (Rest.OAuthProxy proxy, string function) throws GLib.Error; + public bool auth_step (string function) throws GLib.Error; + [Deprecated] [CCode (cname = "oauth_proxy_auth_step_async")] - public static bool auth_step_async (Rest.OAuthProxy proxy, string function, Rest.OAuthProxyAuthCallback callback, GLib.Object weak_object) throws GLib.Error; + public bool auth_step_async (string function, [CCode (delegate_target_pos = 3.9)] Rest.OAuthProxyAuthCallback callback, GLib.Object? weak_object) throws GLib.Error; [CCode (cname = "oauth_proxy_get_token")] - public static unowned string get_token (Rest.OAuthProxy proxy); + public unowned string get_token (); [CCode (cname = "oauth_proxy_get_token_secret")] - public static unowned string get_token_secret (Rest.OAuthProxy proxy); + public unowned string get_token_secret (); [CCode (cname = "oauth_proxy_is_oauth10a")] - public static bool is_oauth10a (Rest.OAuthProxy proxy); + public bool is_oauth10a (); [CCode (cname = "oauth_proxy_request_token")] - public static bool request_token (Rest.OAuthProxy proxy, string function, string callback_uri) throws GLib.Error; + public bool request_token (string function, string callback_uri) throws GLib.Error; [CCode (cname = "oauth_proxy_request_token_async")] - public static bool request_token_async (Rest.OAuthProxy proxy, string function, string callback_uri, Rest.OAuthProxyAuthCallback callback, GLib.Object weak_object) throws GLib.Error; + public bool request_token_async (string function, string callback_uri, [CCode (delegate_target_pos = 4.9)] Rest.OAuthProxyAuthCallback callback, GLib.Object? weak_object) throws GLib.Error; [CCode (cname = "oauth_proxy_set_token")] - public static void set_token (Rest.OAuthProxy proxy, string token); + public void set_token (string token); [CCode (cname = "oauth_proxy_set_token_secret")] - public static void set_token_secret (Rest.OAuthProxy proxy, string token_secret); + public void set_token_secret (string token_secret); [CCode (cname = "oauth_proxy_new_with_token", type = "RestProxy*", has_construct_function = false)] public OAuthProxy.with_token (string consumer_key, string consumer_secret, string token, string token_secret, string url_format, bool binding_required); + [NoAccessorMethod] + public string consumer_key { owned get; construct; } + [NoAccessorMethod] + public string consumer_secret { owned get; construct; } + public string token { get; set; } + public string token_secret { get; set; } } [CCode (cheader_filename = "rest/oauth-proxy-call.h")] public class OAuthProxyCall : Rest.ProxyCall { + [CCode (has_construct_function = false)] + protected OAuthProxyCall (); } [CCode (cheader_filename = "rest/rest-proxy.h")] public class Proxy : GLib.Object { [CCode (has_construct_function = false)] public Proxy (string url_format, bool binding_required); public bool bind (...); - public bool bind_valist (void* @params); + public virtual bool bind_valist (void* @params); public static GLib.Quark error_quark (); public unowned string get_user_agent (); public Rest.ProxyCall new_call (); public void set_user_agent (string user_agent); public bool simple_run (string payload, int64 len) throws GLib.Error; - public bool simple_run_valist (string payload, int64 len, void* @params) throws GLib.Error; + public virtual bool simple_run_valist (string payload, int64 len, void* @params) throws GLib.Error; + [NoAccessorMethod] + public bool binding_required { get; set; } + [NoAccessorMethod] + public string url_format { owned get; set; } + public string user_agent { get; set; } } [CCode (cheader_filename = "rest/rest-proxy-call.h")] public class ProxyCall : GLib.Object { + [CCode (has_construct_function = false)] + protected ProxyCall (); public void add_header (string header, string value); public void add_headers (...); public void add_headers_from_valist (void* headers); @@ -58,7 +75,7 @@ namespace Rest { public bool cancel (); public static GLib.Quark error_quark (); public unowned string get_method (); - public unowned GLib.HashTable get_params (); + public GLib.HashTable get_params (); public unowned string get_payload (); public int64 get_payload_length (); public unowned GLib.HashTable get_response_headers (); @@ -67,17 +84,21 @@ namespace Rest { public unowned string lookup_header (string header); public unowned string lookup_param (string param); public unowned string lookup_response_header (string header); + [NoWrapper] + public virtual bool prepare () throws GLib.Error; public void remove_header (string header); public void remove_param (string param); public bool run (out unowned GLib.MainLoop loop) throws GLib.Error; [CCode (cname = "rest_proxy_call_async")] - public bool run_async (Rest.ProxyCallAsyncCallback callback, GLib.Object? weak_object) throws GLib.Error; + public bool run_async ([CCode (delegate_target_pos = 2.9)] Rest.ProxyCallAsyncCallback callback, GLib.Object? weak_object) throws GLib.Error; public void set_function (string function); public void set_method (string method); public bool sync () throws GLib.Error; + [NoAccessorMethod] + public Rest.Proxy proxy { owned get; construct; } } [Compact] - [CCode (ref_function = "rest_xml_node_ref", unref_function = "rest_xml_node_unref", cheader_filename = "rest/rest-xml-parser.h")] + [CCode (ref_function = "rest_xml_node_ref", unref_function = "rest_xml_node_unref", type_id = "REST_TYPE_XML_NODE", cheader_filename = "rest/rest-xml-parser.h")] public class XmlNode { public weak GLib.HashTable attrs; public weak GLib.HashTable children;