Commit 3fce38b1 authored by Jürg Billeter's avatar Jürg Billeter Committed by Jürg Billeter
Browse files

add libsoup bindings

2007-08-07  Juerg Billeter  <j@bitron.ch>

	* vapi/libsoup-2.2.vala, vapi/packages/libsoup-2.2,
	  vapigen/valagidlparser.vala: add libsoup bindings

svn path=/trunk/; revision=427
parent 6d058800
2007-08-07 Jürg Billeter <j@bitron.ch>
* vapi/libsoup-2.2.vala, vapi/packages/libsoup-2.2,
vapigen/valagidlparser.vala: add libsoup bindings
2007-08-07 Jürg Billeter <j@bitron.ch>
* vapi/Makefile.am, vapi/gtkmozembed.deps, vapi/libglade-2.0.deps,
......
......@@ -1240,7 +1240,7 @@ namespace Gdk {
public char send_event;
public Gdk.Atom message_type;
public ushort data_format;
public weak string b;
public weak GLib.Memory b;
}
[ReferenceType]
[CCode (cheader_filename = "gdk/gdk.h")]
......
......@@ -2971,7 +2971,7 @@ namespace Gtk {
public weak Gtk.Printer get_printer ();
public weak Gtk.PrintSettings get_settings ();
public Gtk.PrintStatus get_status ();
public weak Cairo.XlibSurface get_surface (GLib.Error error);
public weak Cairo.Surface get_surface (GLib.Error error);
public weak string get_title ();
public bool get_track_print_status ();
public static GLib.Type get_type ();
......
This diff is collapsed.
/* libsoup-2.2-custom.vala
*
* Copyright (C) 2007 Jürg Billeter
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Author:
* Jürg Billeter <j@bitron.ch>
*/
[CCode (cheader_filename = "libsoup/soup.h")]
namespace Soup {
[ReferenceType]
public struct ServerAuth {
[Import]
public ServerAuth (ServerAuthContext auth_ctx, GLib.SList auth_hdrs, Message msg);
[Import]
public weak string get_user ();
[Import]
public bool check_passwd (string passwd);
}
}
This diff is collapsed.
Soup cheader_filename="libsoup/soup.h"
soup_add_io_watch hidden="1"
soup_address_new_from_sockaddr hidden="1"
soup_dns_lookup_address hidden="1"
soup_dns_ntop hidden="1"
SoupMessage::finished has_emitter="1"
soup_message_foreach_header hidden="1"
SoupMessage::got_body has_emitter="1"
SoupMessage::got_chunk has_emitter="1"
SoupMessage::got_headers has_emitter="1"
SoupMessage::got_informational has_emitter="1"
SoupMessage::restarted has_emitter="1"
SoupMessage::wrote_body has_emitter="1"
SoupMessage::wrote_chunk has_emitter="1"
SoupMessage::wrote_headers has_emitter="1"
SoupMessage::wrote_informational has_emitter="1"
soup_mktime_utc hidden="1"
soup_server_new ellipsis="1"
SoupServerAuthContext.realm hidden="1"
SoupSoap hidden="1"
SoupSoapMessage hidden="1"
SoupSoapResponse hidden="1"
soup_xml_real_node hidden="1"
SoupXmlrpc hidden="1"
SoupXmlrpcMessage hidden="1"
SoupXmlrpcResponse hidden="1"
......@@ -208,6 +208,9 @@ public class Vala.GIdlParser : CodeVisitor {
current_source_file.add_node (en);
} else if (node.type == IdlNodeTypeId.OBJECT) {
var cl = parse_object ((IdlNodeInterface) node);
if (cl == null) {
continue;
}
cl.name = fix_type_name (cl.name, module);
ns.add_class (cl);
current_source_file.add_node (cl);
......@@ -285,6 +288,10 @@ public class Vala.GIdlParser : CodeVisitor {
var nv = attr.split ("=", 2);
if (nv[0] == "is_value_type" && eval (nv[1]) == "1") {
st.set_is_reference_type (false);
} else if (nv[0] == "hidden") {
if (eval (nv[1]) == "1") {
return null;
}
}
}
}
......@@ -391,6 +398,10 @@ public class Vala.GIdlParser : CodeVisitor {
var nv = attr.split ("=", 2);
if (nv[0] == "cheader_filename") {
cl.add_cheader_filename (eval (nv[1]));
} else if (nv[0] == "hidden") {
if (eval (nv[1]) == "1") {
return null;
}
}
}
}
......@@ -683,6 +694,9 @@ public class Vala.GIdlParser : CodeVisitor {
type.type_name = "int";
} else if (n == "ClutterFixed" || n == "ClutterUnit" || n == "ClutterAngle") {
type.type_name = "int32";
} else if (n == "SoupProtocol") {
type.namespace_name = "GLib";
type.type_name = "Quark";
} else if (n == "GStrv") {
type.type_name = "string";
type.array_rank = 1;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment