From 1cc184b4a849619b56bed2be0e752fbc0fb75a29 Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Sun, 22 Jun 2003 22:59:31 +0000 Subject: 2003-06-22 Havoc Pennington * mono/Connection.cs, mono/DBus.cs, mono/Error.cs: Start wrapping more stuff. --- mono/Error.cs | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 mono/Error.cs (limited to 'mono/Error.cs') diff --git a/mono/Error.cs b/mono/Error.cs new file mode 100644 index 00000000..95c0193b --- /dev/null +++ b/mono/Error.cs @@ -0,0 +1,29 @@ +namespace DBus { + + using System; + using System.Runtime.InteropServices; + + // FIXME add code to verify that size of DBus.Error + // matches the C code. + + [StructLayout (LayoutKind.Sequential)] + internal struct Error { + internal IntPtr name; + internal IntPtr message; + private int dummies; + private IntPtr padding1; + + internal void Init () { + dbus_error_init (ref this); + } + + internal void Free () { + dbus_error_free (ref this); + } + + [DllImport (DBus.Internals.Libname, EntryPoint="dbus_error_init")] + private extern static void dbus_error_init (ref Error error); + [DllImport (DBus.Internals.Libname, EntryPoint="dbus_error_free")] + private extern static void dbus_error_free (ref Error error); + } +} -- cgit