After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 744482 - DBus interface cannot builds
DBus interface cannot builds
Status: RESOLVED DUPLICATE of bug 643787
Product: vala
Classification: Core
Component: D-Bus
0.26.x
Other Linux
: Normal normal
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2015-02-13 18:42 UTC by ria.freelander
Modified: 2015-02-13 20:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Generated C file (22.78 KB, text/x-csrc)
2015-02-13 18:42 UTC, ria.freelander
Details

Description ria.freelander 2015-02-13 18:42:18 UTC
Created attachment 296797 [details]
Generated C file

I have following interface:
[DBus (name="org.some.interface")]
interface SomeInterface: Object
{
	public abstract void context_menu(int x, int y);
	public abstract void activate(int x, int y);
	public abstract void secondary_activate(int x, int y);
	public abstract void scroll(int delta, string orientation);
}

After trying to build it I get this error:
snitem.c: In function ‘some_interface_proxy_context_menu’:
snitem.c:185:228: error: ‘error’ undeclared (first use in this function)
  _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error);
                                                                                                                                                                                                                                    ^
snitem.c:185:228: note: each undeclared identifier is reported only once for each function it appears in
snitem.c: In function ‘some_interface_proxy_activate’:
snitem.c:209:228: error: ‘error’ undeclared (first use in this function)
  _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error);
                                                                                                                                                                                                                                    ^
snitem.c: In function ‘some_interface_proxy_secondary_activate’:
snitem.c:233:228: error: ‘error’ undeclared (first use in this function)
  _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error);
                                                                                                                                                                                                                                    ^
snitem.c: In function ‘some_interface_proxy_scroll’:
snitem.c:257:228: error: ‘error’ undeclared (first use in this function)
  _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error);

It obliviosly not builds.
Comment 1 Luca Bruno 2015-02-13 20:35:01 UTC
Add throws Error to every method.

Thanks for taking the time to report this.
This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find.

*** This bug has been marked as a duplicate of bug 643787 ***