[vala] libsoup-2.4: Fix XMLRPC error domains.
- From: Evan Nemerson <evann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] libsoup-2.4: Fix XMLRPC error domains.
- Date: Sat, 21 Aug 2010 21:57:44 +0000 (UTC)
commit af733f2e5949ecb7447807f3db637645ef736089
Author: Evan Nemerson <evan coeus-group com>
Date: Sat Aug 21 14:47:50 2010 -0700
libsoup-2.4: Fix XMLRPC error domains.
vapi/libsoup-2.4.vapi | 40 ++++++++++----------
vapi/packages/libsoup-2.4/libsoup-2.4-custom.vala | 32 ++++++++++++++++
vapi/packages/libsoup-2.4/libsoup-2.4.metadata | 5 ++-
vapigen/valagidlparser.vala | 1 +
4 files changed, 57 insertions(+), 21 deletions(-)
---
diff --git a/vapi/libsoup-2.4.vapi b/vapi/libsoup-2.4.vapi
index a4ab9f5..27ce0ba 100644
--- a/vapi/libsoup-2.4.vapi
+++ b/vapi/libsoup-2.4.vapi
@@ -4,6 +4,24 @@
namespace Soup {
[CCode (cprefix = "SoupXMLRPC", lower_case_cprefix = "soup_xmlrpc_")]
namespace XMLRPC {
+ [CCode (cprefix = "SOUP_XMLRPC_ERROR_", cheader_filename = "libsoup/soup.h")]
+ public errordomain Error {
+ ARGUMENTS,
+ RETVAL,
+ }
+ [CCode (cprefix = "SOUP_XMLRPC_FAULT_", cheader_filename = "libsoup/soup.h")]
+ public errordomain Fault {
+ PARSE_ERROR_NOT_WELL_FORMED,
+ PARSE_ERROR_UNSUPPORTED_ENCODING,
+ PARSE_ERROR_INVALID_CHARACTER_FOR_ENCODING,
+ SERVER_ERROR_INVALID_XML_RPC,
+ SERVER_ERROR_REQUESTED_METHOD_NOT_FOUND,
+ SERVER_ERROR_INVALID_METHOD_PARAMETERS,
+ SERVER_ERROR_INTERNAL_XML_RPC_ERROR,
+ APPLICATION_ERROR,
+ SYSTEM_ERROR,
+ TRANSPORT_ERROR,
+ }
[PrintfFormat]
[CCode (cheader_filename = "libsoup/soup.h")]
public static unowned string build_fault (int fault_code, string fault_format, ...);
@@ -16,13 +34,13 @@ namespace Soup {
[CCode (cheader_filename = "libsoup/soup.h", sentinel = "G_TYPE_INVALID")]
public static bool extract_method_call (string method_call, int length, out unowned string method_name, ...);
[CCode (cheader_filename = "libsoup/soup.h", sentinel = "G_TYPE_INVALID")]
- public static bool extract_method_response (string method_response, int length, ...) throws GLib.Error;
+ public static bool extract_method_response (string method_response, int length, ...) throws Soup.XMLRPC.Fault;
[CCode (cheader_filename = "libsoup/soup.h")]
public static GLib.Quark fault_quark ();
[CCode (cheader_filename = "libsoup/soup.h")]
public static bool parse_method_call (string method_call, int length, out unowned string method_name, out unowned GLib.ValueArray @params);
[CCode (cheader_filename = "libsoup/soup.h")]
- public static bool parse_method_response (string method_response, int length, GLib.Value value) throws GLib.Error;
+ public static bool parse_method_response (string method_response, int length, GLib.Value value) throws Soup.XMLRPC.Fault;
[CCode (cheader_filename = "libsoup/soup.h", sentinel = "G_TYPE_INVALID")]
public static unowned Soup.Message request_new (string uri, string method_name, ...);
[PrintfFormat]
@@ -748,24 +766,6 @@ namespace Soup {
EOF,
ERROR
}
- [CCode (cprefix = "SOUP_XMLRPC_ERROR_", cheader_filename = "libsoup/soup.h")]
- public enum XMLRPCError {
- ARGUMENTS,
- RETVAL
- }
- [CCode (cprefix = "SOUP_XMLRPC_FAULT_", cheader_filename = "libsoup/soup.h")]
- public enum XMLRPCFault {
- PARSE_ERROR_NOT_WELL_FORMED,
- PARSE_ERROR_UNSUPPORTED_ENCODING,
- PARSE_ERROR_INVALID_CHARACTER_FOR_ENCODING,
- SERVER_ERROR_INVALID_XML_RPC,
- SERVER_ERROR_REQUESTED_METHOD_NOT_FOUND,
- SERVER_ERROR_INVALID_METHOD_PARAMETERS,
- SERVER_ERROR_INTERNAL_XML_RPC_ERROR,
- APPLICATION_ERROR,
- SYSTEM_ERROR,
- TRANSPORT_ERROR
- }
[CCode (cheader_filename = "libsoup/soup.h")]
public delegate void AddressCallback (Soup.Address addr, uint status);
[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
new file mode 100644
index 0000000..8f2f5c1
--- /dev/null
+++ b/vapi/packages/libsoup-2.4/libsoup-2.4-custom.vala
@@ -0,0 +1,32 @@
+namespace Soup {
+ [Deprecated (since = "vala-0.12", replacement = "XMLRPC.build_fault")]
+ [PrintfFormat]
+ public static unowned string xmlrpc_build_fault (int fault_code, string fault_format, ...);
+ [Deprecated (since = "vala-0.12", replacement = "XMLRPC.build_method_call")]
+ public static unowned string xmlrpc_build_method_call (string method_name, GLib.Value[] @params);
+ [Deprecated (since = "vala-0.12", replacement = "XMLRPC.build_method_response")]
+ public static unowned string xmlrpc_build_method_response (GLib.Value value);
+ [Deprecated (since = "vala-0.12", replacement = "XMLRPC.error_quark")]
+ public static GLib.Quark xmlrpc_error_quark ();
+ [Deprecated (since = "vala-0.12", replacement = "XMLRPC.extract_method_call")]
+ [CCode (sentinel = "G_TYPE_INVALID")]
+ public static bool xmlrpc_extract_method_call (string method_call, int length, out unowned string method_name, ...);
+ [Deprecated (since = "vala-0.12", replacement = "XMLRPC.extract_method_response")]
+ [CCode (sentinel = "G_TYPE_INVALID")]
+ public static bool xmlrpc_extract_method_response (string method_response, int length, ...) throws GLib.Error;
+ [Deprecated (since = "vala-0.12", replacement = "XMLRPC.fault_quark")]
+ public static GLib.Quark xmlrpc_fault_quark ();
+ [Deprecated (since = "vala-0.12", replacement = "XMLRPC.parse_method_call")]
+ public static bool xmlrpc_parse_method_call (string method_call, int length, out unowned string method_name, out unowned GLib.ValueArray @params);
+ [Deprecated (since = "vala-0.12", replacement = "XMLRPC.parse_method_response")]
+ public static bool xmlrpc_parse_method_response (string method_response, int length, GLib.Value value) throws GLib.Error;
+ [Deprecated (since = "vala-0.12", replacement = "XMLRPC.request_new")]
+ [CCode (sentinel = "G_TYPE_INVALID")]
+ public static unowned Soup.Message xmlrpc_request_new (string uri, string method_name, ...);
+ [Deprecated (since = "vala-0.12", replacement = "XMLRPC.set_fault")]
+ [PrintfFormat]
+ public static void xmlrpc_set_fault (Soup.Message msg, int fault_code, string fault_format, ...);
+ [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
diff --git a/vapi/packages/libsoup-2.4/libsoup-2.4.metadata b/vapi/packages/libsoup-2.4/libsoup-2.4.metadata
index acce698..e714803 100644
--- a/vapi/packages/libsoup-2.4/libsoup-2.4.metadata
+++ b/vapi/packages/libsoup-2.4/libsoup-2.4.metadata
@@ -135,12 +135,15 @@ soup_value_hash_new* type_arguments="string,GLib.Value" transfer_ownership="1"
soup_xmlrpc_* parent="XMLRPC"
soup_xmlrpc_build_fault parent="XMLRPC" ellipsis="1" printf_format="1"
soup_xmlrpc_extract_method_call parent="XMLRPC" ellipsis="1" sentinel="G_TYPE_INVALID"
-soup_xmlrpc_extract_method_response parent="XMLRPC" ellipsis="1" sentinel="G_TYPE_INVALID"
+soup_xmlrpc_extract_method_response parent="XMLRPC" ellipsis="1" sentinel="G_TYPE_INVALID" error_types="XMLRPC.Fault"
soup_xmlrpc_extract_method_response.type hidden="1"
+soup_xmlrpc_parse_method_response parent="XMLRPC" error_types="XMLRPC.Fault"
soup_xmlrpc_request_new parent="XMLRPC" ellipsis="1" sentinel="G_TYPE_INVALID"
soup_xmlrpc_set_response parent="XMLRPC" ellipsis="1" sentinel="G_TYPE_INVALID"
soup_xmlrpc_set_response.type hidden="1"
soup_xmlrpc_set_fault parent="XMLRPC" ellipsis="1" printf_format="1"
+SoupXMLRPCFault parent="XMLRPC" errordomain="1"
+SoupXMLRPCError parent="XMLRPC" errordomain="1"
# unsupported
GData name="pointer"
diff --git a/vapigen/valagidlparser.vala b/vapigen/valagidlparser.vala
index 99d2d84..438a8c7 100644
--- a/vapigen/valagidlparser.vala
+++ b/vapigen/valagidlparser.vala
@@ -353,6 +353,7 @@ public class Vala.GIdlParser : CodeVisitor {
cc = cp.scope.lookup (tok) as Symbol;
if ( cc == null ) {
cc = new Namespace (tok, current_source_reference);
+ ((Namespace) cc).add_cprefix (cp.get_cprefix () + tok);
add_symbol_to_container (cp, cc);
}
cp = cc;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]