[vala] libsoup-2.4: Move form_* methods into Form and fix ownership issues



commit bafc84ee82f49ff3069c408c380f0f79f5f942ce
Author: Marc-André Lureau <marcandre lureau gmail com>
Date:   Fri Feb 4 17:47:09 2011 -0800

    libsoup-2.4: Move form_* methods into Form and fix ownership issues
    
    Fixes bug 640841.

 vapi/libsoup-2.4.vapi                             |   47 +++++++++++++++++----
 vapi/packages/libsoup-2.4/libsoup-2.4-custom.vala |   23 ++++++++++-
 vapi/packages/libsoup-2.4/libsoup-2.4.metadata    |    7 ++-
 3 files changed, 66 insertions(+), 11 deletions(-)
---
diff --git a/vapi/libsoup-2.4.vapi b/vapi/libsoup-2.4.vapi
index aeda1e4..dbada0c 100644
--- a/vapi/libsoup-2.4.vapi
+++ b/vapi/libsoup-2.4.vapi
@@ -2,6 +2,27 @@
 
 [CCode (cprefix = "Soup", lower_case_cprefix = "soup_")]
 namespace Soup {
+	[CCode (cprefix = "SoupForm", lower_case_cprefix = "soup_form_")]
+	namespace Form {
+		[CCode (cheader_filename = "libsoup/soup.h")]
+		public static GLib.HashTable<string,string> decode (string encoded_form);
+		[CCode (cheader_filename = "libsoup/soup.h")]
+		public static GLib.HashTable<string,string> decode_multipart (Soup.Message msg, string file_control_name, out string filename, out string content_type, out Soup.Buffer file);
+		[CCode (cheader_filename = "libsoup/soup.h")]
+		public static string encode (...);
+		[CCode (cheader_filename = "libsoup/soup.h")]
+		public static string encode_datalist (void* form_data_set);
+		[CCode (cheader_filename = "libsoup/soup.h")]
+		public static string encode_hash (GLib.HashTable<string,string> form_data_set);
+		[CCode (cheader_filename = "libsoup/soup.h")]
+		public static Soup.Message request_new (string method, string uri, ...);
+		[CCode (cheader_filename = "libsoup/soup.h")]
+		public static Soup.Message request_new_from_datalist (string method, string uri, void* form_data_set);
+		[CCode (cheader_filename = "libsoup/soup.h")]
+		public static Soup.Message request_new_from_hash (string method, string uri, GLib.HashTable<string,string> form_data_set);
+		[CCode (cheader_filename = "libsoup/soup.h")]
+		public static Soup.Message request_new_from_multipart (string uri, Soup.Multipart multipart);
+	}
 	[CCode (cprefix = "SoupXMLRPC", lower_case_cprefix = "soup_xmlrpc_")]
 	namespace XMLRPC {
 		[CCode (cprefix = "SOUP_XMLRPC_ERROR_", cheader_filename = "libsoup/soup.h")]
@@ -1031,26 +1052,36 @@ namespace Soup {
 	public static void cookies_to_request (GLib.SList<Soup.Cookie> cookies, Soup.Message msg);
 	[CCode (cheader_filename = "libsoup/soup.h")]
 	public static void cookies_to_response (GLib.SList<Soup.Cookie> cookies, Soup.Message msg);
+	[Deprecated (since = "vala-0.12", replacement = "Form.decode")]
 	[CCode (cheader_filename = "libsoup/soup.h")]
 	public static GLib.HashTable<string,string> form_decode (string encoded_form);
+	[Deprecated (since = "vala-0.12", replacement = "Form.decode_multipart")]
 	[CCode (cheader_filename = "libsoup/soup.h")]
 	public static GLib.HashTable<string,string> form_decode_multipart (Soup.Message msg, string file_control_name, out string filename, out string content_type, out Soup.Buffer file);
+	[Deprecated (since = "vala-0.12", replacement = "Form.encode")]
 	[CCode (cheader_filename = "libsoup/soup.h")]
-	public static unowned string form_encode (...);
+	public static string form_encode (...);
+	[Deprecated (since = "vala-0.12", replacement = "Form.encode_datalist")]
 	[CCode (cheader_filename = "libsoup/soup.h")]
-	public static unowned string form_encode_datalist (void* form_data_set);
+	public static string form_encode_datalist (void* form_data_set);
+	[Deprecated (since = "vala-0.12", replacement = "Form.encode_hash")]
 	[CCode (cheader_filename = "libsoup/soup.h")]
-	public static unowned string form_encode_hash (GLib.HashTable<string,string> form_data_set);
+	public static string form_encode_hash (GLib.HashTable<string,string> form_data_set);
+	[Deprecated (since = "vala-0.12")]
 	[CCode (cheader_filename = "libsoup/soup.h")]
-	public static unowned string form_encode_valist (string first_field, void* args);
+	public static string form_encode_valist (string first_field, void* args);
+	[Deprecated (since = "vala-0.12", replacement = "Form.request_new")]
 	[CCode (cheader_filename = "libsoup/soup.h")]
-	public static unowned Soup.Message form_request_new (string method, string uri, ...);
+	public static Soup.Message form_request_new (string method, string uri, ...);
+	[Deprecated (since = "vala-0.12", replacement = "Form.request_new_from_datalist")]
 	[CCode (cheader_filename = "libsoup/soup.h")]
-	public static unowned Soup.Message form_request_new_from_datalist (string method, string uri, void* form_data_set);
+	public static Soup.Message form_request_new_from_datalist (string method, string uri, void* form_data_set);
+	[Deprecated (since = "vala-0.12", replacement = "Form.request_new_from_hash")]
 	[CCode (cheader_filename = "libsoup/soup.h")]
-	public static unowned Soup.Message form_request_new_from_hash (string method, string uri, GLib.HashTable<string,string> form_data_set);
+	public static Soup.Message form_request_new_from_hash (string method, string uri, GLib.HashTable<string,string> form_data_set);
+	[Deprecated (since = "vala-0.12", replacement = "Form.request_new_from_multipart")]
 	[CCode (cheader_filename = "libsoup/soup.h")]
-	public static unowned Soup.Message form_request_new_from_multipart (string uri, Soup.Multipart multipart);
+	public static Soup.Message form_request_new_from_multipart (string uri, Soup.Multipart multipart);
 	[CCode (cheader_filename = "libsoup/soup.h")]
 	public static bool header_contains (string header, string token);
 	[CCode (cheader_filename = "libsoup/soup.h")]
diff --git a/vapi/packages/libsoup-2.4/libsoup-2.4-custom.vala b/vapi/packages/libsoup-2.4/libsoup-2.4-custom.vala
index 8f2f5c1..4271899 100644
--- a/vapi/packages/libsoup-2.4/libsoup-2.4-custom.vala
+++ b/vapi/packages/libsoup-2.4/libsoup-2.4-custom.vala
@@ -29,4 +29,25 @@ namespace Soup {
 	[Deprecated (since = "vala-0.12", replacement = "XMLRPC.set_response")]
 	[CCode (sentinel = "G_TYPE_INVALID")]
 	public static void xmlrpc_set_response (Soup.Message msg, ...);
-}
\ No newline at end of file
+
+	[Deprecated (since = "vala-0.12", replacement = "Form.decode")]
+	public static GLib.HashTable<string,string> form_decode (string encoded_form);
+	[Deprecated (since = "vala-0.12", replacement = "Form.decode_multipart")]
+	public static GLib.HashTable<string,string> form_decode_multipart (Soup.Message msg, string file_control_name, out string filename, out string content_type, out Soup.Buffer file);
+	[Deprecated (since = "vala-0.12", replacement = "Form.encode")]
+	public static string form_encode (...);
+	[Deprecated (since = "vala-0.12", replacement = "Form.encode_datalist")]
+	public static string form_encode_datalist (void* form_data_set);
+	[Deprecated (since = "vala-0.12", replacement = "Form.encode_hash")]
+	public static string form_encode_hash (GLib.HashTable<string,string> form_data_set);
+	[Deprecated (since = "vala-0.12")]
+	public static string form_encode_valist (string first_field, void* args);
+	[Deprecated (since = "vala-0.12", replacement = "Form.request_new")]
+	public static Soup.Message form_request_new (string method, string uri, ...);
+	[Deprecated (since = "vala-0.12", replacement = "Form.request_new_from_datalist")]
+	public static Soup.Message form_request_new_from_datalist (string method, string uri, void* form_data_set);
+	[Deprecated (since = "vala-0.12", replacement = "Form.request_new_from_hash")]
+	public static Soup.Message form_request_new_from_hash (string method, string uri, GLib.HashTable<string,string> form_data_set);
+	[Deprecated (since = "vala-0.12", replacement = "Form.request_new_from_multipart")]
+	public static Soup.Message form_request_new_from_multipart (string uri, Soup.Multipart multipart);
+}
diff --git a/vapi/packages/libsoup-2.4/libsoup-2.4.metadata b/vapi/packages/libsoup-2.4/libsoup-2.4.metadata
index bdad20f..8dfc225 100644
--- a/vapi/packages/libsoup-2.4/libsoup-2.4.metadata
+++ b/vapi/packages/libsoup-2.4/libsoup-2.4.metadata
@@ -35,13 +35,16 @@ soup_cookies_to_request.cookies type_arguments="Cookie"
 soup_cookies_to_response.cookies type_arguments="Cookie"
 soup_cookie_jar_all_cookies type_arguments="Cookie" transfer_ownership="1"
 soup_date_copy transfer_ownership="1"
-soup_form_decode type_arguments="string,string" transfer_ownership="1"
-soup_form_decode_multipart type_arguments="string,string" transfer_ownership="1"
+soup_form_*_new* parent="Form" transfer_ownership="1"
+soup_form_decode parent="Form" type_arguments="string,string" transfer_ownership="1"
+soup_form_decode_multipart parent="Form" type_arguments="string,string" transfer_ownership="1"
 soup_form_decode_multipart.filename transfer_ownership="1"
 soup_form_decode_multipart.content_type transfer_ownership="1"
 soup_form_decode_multipart.file transfer_ownership="1"
 soup_form_encode_hash.form_data_set type_arguments="string,string"
 soup_form_request_new_from_hash.form_data_set type_arguments="string,string"
+soup_form_encode* parent="Form" transfer_ownership="1"
+soup_form_encode_valist hidden="1"
 soup_header_free_param_list hidden="1"
 soup_header_free_list hidden="1"
 soup_header_parse_list type_arguments="string" transfer_ownership="1"



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]