Commit 40dcf50a authored by Jürg Billeter's avatar Jürg Billeter Committed by Jürg Billeter

fix TimeVal binding add experimental VAPI for HAL update

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

	* vapi/glib-2.0.vala: fix TimeVal binding
	* vapi/dbus-glib-1.vala, vapi/hal.deps, vapi/hal.vala: add experimental
	  VAPI for HAL
	* vapi/Makefile.am: update

svn path=/trunk/; revision=330
parent 8a8bbe9b
2007-07-05 Jürg Billeter <j@bitron.ch>
* vapi/glib-2.0.vala: fix TimeVal binding
* vapi/dbus-glib-1.vala, vapi/hal.deps, vapi/hal.vala: add experimental
VAPI for HAL
* vapi/Makefile.am: update
2007-07-04 Jürg Billeter <j@bitron.ch> 2007-07-04 Jürg Billeter <j@bitron.ch>
* vapi/glib-2.0.vala: update to new GRegex API * vapi/glib-2.0.vala: update to new GRegex API
......
...@@ -8,12 +8,15 @@ vala-1.0.vala: ../ccode/ccode.vala ../vala/vala.vala ../gobject/gobject.vala ...@@ -8,12 +8,15 @@ vala-1.0.vala: ../ccode/ccode.vala ../vala/vala.vala ../gobject/gobject.vala
dist_vapi_DATA = \ dist_vapi_DATA = \
atk.vala \ atk.vala \
cairo.vala \ cairo.vala \
dbus-glib-1.vala \
glib-2.0.vala \ glib-2.0.vala \
gdk-2.0.deps \ gdk-2.0.deps \
gdk-2.0.vala \ gdk-2.0.vala \
gio-standalone.vala \ gio-standalone.vala \
gtk+-2.0.deps \ gtk+-2.0.deps \
gtk+-2.0.vala \ gtk+-2.0.vala \
hal.deps \
hal.vala \
libxml-2.0.vala \ libxml-2.0.vala \
math.vala \ math.vala \
pango.deps \ pango.deps \
......
/* dbus-glib-1.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 = "dbus/dbus-glib-lowlevel.h")]
namespace DBus {
[CCode (cprefix = "DBUS_BUS_")]
public enum BusType {
SESSION,
SYSTEM,
STARTER
}
public struct Bus {
public static Connection get (BusType type, ref Error error);
}
[ReferenceType (dup_function = "dbus_connection_ref", free_function = "dbus_connection_unref")]
public struct Connection {
[CCode (cname = "dbus_connection_setup_with_g_main")]
public void setup_with_main (GLib.MainContext context);
}
public struct Error {
public string name;
public string message;
[InstanceByReference]
public void init ();
[InstanceByReference]
public bool has_name (string name);
[InstanceByReference]
public bool is_set ();
}
}
...@@ -1041,14 +1041,19 @@ namespace GLib { ...@@ -1041,14 +1041,19 @@ namespace GLib {
/* Date and Time Functions */ /* Date and Time Functions */
[ReferenceType (free_function = "g_free")]
public struct TimeVal { public struct TimeVal {
public long tv_sec;
public long tv_usec;
[CCode (cname = "g_get_current_time")] [CCode (cname = "g_get_current_time")]
[InstanceByReference]
public void get_current_time (); public void get_current_time ();
public void add (long microseconds); public void add (long microseconds);
[InstanceLast ()] [InstanceByReference]
[InstanceLast]
public bool from_iso8601 (string iso_date); public bool from_iso8601 (string iso_date);
public ref string to_iso8601 (); [InstanceByReference]
public string! to_iso8601 ();
} }
public struct DateDay : uchar { public struct DateDay : uchar {
......
dbus-glib-1
/* hal.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 = "libhal.h", cprefix = "LibHal")]
namespace Hal {
public callback void DeviceAdded (Context ctx, string udi);
public callback void DeviceRemoved (Context ctx, string udi);
[ReferenceType (free_function = "libhal_ctx_free")]
[CCode (cprefix = "libhal_ctx_")]
public struct Context {
public Context ();
public bool init (ref DBus.Error error);
public bool set_dbus_connection (DBus.Connection conn);
public bool set_user_data (pointer user_data);
public pointer get_user_data ();
public bool set_device_added (DeviceAdded _callback);
public bool set_device_removed (DeviceRemoved _callback);
[NoArrayLength]
[CCode (cname = "libhal_find_device_by_capability")]
public string[] find_device_by_capability (string capability, ref int num_devices, ref DBus.Error error);
[CCode (cname = "libhal_device_get_property_string")]
public string device_get_property_string (string udi, string key, ref DBus.Error error);
[CCode (cname = "libhal_device_get_property_int")]
public int device_get_property_int (string udi, string key, ref DBus.Error error);
[CCode (cname = "libhal_device_get_property_uint64")]
public uint64 device_get_property_uint64 (string udi, string key, ref DBus.Error error);
[CCode (cname = "libhal_device_query_capability")]
public bool device_query_capability (string udi, string capability, ref DBus.Error error);
}
}
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