]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
get D-Bus sample working again
authorJuerg Billeter <j@bitron.ch>
Sat, 19 Apr 2008 16:42:51 +0000 (16:42 +0000)
committerJürg Billeter <juergbi@src.gnome.org>
Sat, 19 Apr 2008 16:42:51 +0000 (16:42 +0000)
2008-04-19  Juerg Billeter  <j@bitron.ch>

* vala/valaattributeprocessor.vala, vala/valaerrortype.vala,
  vapi/dbus-glib-1.vapi, gobject/valaccodegenerator.vala: get D-Bus
  sample working again

svn path=/trunk/; revision=1274

ChangeLog
gobject/valaccodegenerator.vala
vala/valaattributeprocessor.vala
vala/valaerrortype.vala
vapi/dbus-glib-1.vapi

index e4bf9732889b253691827469b19aca2f0f98e70b..b3e6ce4b508e611386efe8280ceb416537fc35dd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-04-19  Jürg Billeter  <j@bitron.ch>
+
+       * vala/valaattributeprocessor.vala, vala/valaerrortype.vala,
+         vapi/dbus-glib-1.vapi, gobject/valaccodegenerator.vala: get D-Bus
+         sample working again
+
 2008-04-19  Jürg Billeter  <j@bitron.ch>
 
        * vala/valaclass.vala:, vala/valadestructor.vala,
index 97ef1349deec58e9f25251d8aaeba8965b2fe7ee..47822db10a9a2e39873fbc13e93676081ba97e01 100644 (file)
@@ -3580,6 +3580,8 @@ public class Vala.CCodeGenerator : CodeGenerator {
                        type = new ValueType ((Struct) sym);
                } else if (sym is Enum) {
                        type = new ValueType ((Enum) sym);
+               } else if (sym is ErrorDomain) {
+                       type = new ErrorType ((ErrorDomain) sym);
                } else {
                        Report.error (null, "internal error: `%s' is not a supported type".printf (sym.get_full_name ()));
                        return new InvalidType ();
index 0dba10cff8e745d70b430f9ab0828af371b2c7b5..d117b42f6958de842cd44a38e0b526eddb60219f 100644 (file)
@@ -70,6 +70,10 @@ public class Vala.AttributeProcessor : CodeVisitor {
                en.process_attributes ();
        }
 
+       public override void visit_error_domain (ErrorDomain edomain) {
+               edomain.process_attributes ();
+       }
+
        public override void visit_method (Method m) {
                m.process_attributes ();
 
index 64540ab2ad66b5909e74292d967060de501ab4cd..1afc877a9ddb39151ce30f6f2ddf8fb7b7eb19ef 100644 (file)
@@ -32,7 +32,7 @@ public class Vala.ErrorType : ReferenceType {
         */
        public weak ErrorDomain? error_domain { get; set; }
 
-       public ErrorType (ErrorDomain? error_domain, SourceReference? source_reference) {
+       public ErrorType (ErrorDomain? error_domain, SourceReference? source_reference = null) {
                this.error_domain = error_domain;
                this.data_type = error_domain;
                this.source_reference = source_reference;
index 1d63d85eb806f63e310c79785de8c5d96969615b..a3adac31b68054ca12f7ffec325088e96d033c97 100644 (file)
@@ -50,9 +50,8 @@ namespace DBus {
                public bool is_set ();
        }
 
-       [ErrorDomain]
        [CCode (cname = "DBusGError", lower_case_csuffix = "gerror", cprefix = "DBUS_GERROR_")]
-       public enum Error {
+       public errordomain Error {
                FAILED,
                NO_MEMORY,
                SERVICE_UNKNOWN,
@@ -102,13 +101,13 @@ namespace DBus {
        public class Proxy {
                public Proxy.for_name (Connection connection, string name, string path, string interface_);
                public bool call (string method, out GLib.Error error, GLib.Type first_arg_type, ...);
-               public weak ProxyCall begin_call (string method, ProxyCallNotify notify, pointer data, GLib.DestroyNotify destroy, GLib.Type first_arg_type, ...);
+               public weak ProxyCall begin_call (string method, ProxyCallNotify notify, void* data, GLib.DestroyNotify destroy, GLib.Type first_arg_type, ...);
                public bool end_call (ProxyCall call, out GLib.Error error, GLib.Type first_arg_type, ...);
                public void cancel_call (ProxyCall call);
        }
 
        [CCode (cname = "DBusGProxyCallNotify")]
-       public static delegate void ProxyCallNotify (Proxy proxy, ProxyCall call_id, pointer user_data);
+       public static delegate void ProxyCallNotify (Proxy proxy, ProxyCall call_id, void* user_data);
 
        [CCode (cname = "DBusGProxyCall")]
        public class ProxyCall {