[vala/gdbus: 10/11] D-Bus: Register error domains before calls in GDBus clients
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/gdbus: 10/11] D-Bus: Register error domains before calls in GDBus clients
- Date: Fri, 22 Oct 2010 11:09:45 +0000 (UTC)
commit 0469fce571901fc780381a6c261c3dbf67c8b231
Author: Jürg Billeter <j bitron ch>
Date: Fri Oct 22 12:46:24 2010 +0200
D-Bus: Register error domains before calls in GDBus clients
Error domains need to be registered with GDBus to support error
type mapping.
codegen/valagdbusclientmodule.vala | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/codegen/valagdbusclientmodule.vala b/codegen/valagdbusclientmodule.vala
index 65bebfc..95eb641 100644
--- a/codegen/valagdbusclientmodule.vala
+++ b/codegen/valagdbusclientmodule.vala
@@ -433,6 +433,14 @@ public class Vala.GDBusClientModule : GDBusModule {
var timeout = new CCodeFunctionCall (new CCodeIdentifier ("g_dbus_proxy_get_default_timeout"));
timeout.add_argument (new CCodeIdentifier ("self"));
+ // register errors
+ foreach (var error_type in m.get_error_types ()) {
+ var errtype = (ErrorType) error_type;
+ if (errtype.error_domain != null) {
+ ccode.add_expression (new CCodeIdentifier (errtype.error_domain.get_upper_case_cname ()));
+ }
+ }
+
// build D-Bus message
ccode.add_declaration ("GDBusMessage", new CCodeVariableDeclarator ("*_message"));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]