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 595578 - Setting a custom method name for Objects on D-Bus does not work
Setting a custom method name for Objects on D-Bus does not work
Status: RESOLVED FIXED
Product: vala
Classification: Core
Component: D-Bus
0.7.x
Other Linux
: Normal normal
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2009-09-18 13:10 UTC by Thomas Perl
Modified: 2009-09-21 18:46 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
vala source (1001 bytes, text/x-vala)
2009-09-18 13:12 UTC, Thomas Perl
Details
generated c source (11.36 KB, text/x-csrc)
2009-09-18 13:13 UTC, Thomas Perl
Details

Description Thomas Perl 2009-09-18 13:10:58 UTC
I'm using the package in Ubuntu Kamrmic (0.7.5-1ubuntu1); "valac --version" shows: Vala 0.7.5.

DESIRED OUTCOME:

Have an object exposed on the D-Bus with a method that is called "mime_open" (it has to be called like that, as I'm writing a replacement for an existing service).

According to juergbi on IRC, writing "[DBus (name = "mime_open")]" in front of the method name should fix this.

ACTUAL OUTCOME:

Vala mangles the name "mime_open" and converts it to "MimeOpen", even with the "[DBus (name = "mime_open")]" in front of it.

I will attach a test case.
Comment 1 Thomas Perl 2009-09-18 13:12:01 UTC
Created attachment 143439 [details]
vala source

This is the vala source that can be used to reproduce this bug. Compile with this:

valac --pkg dbus-glib-1 --disable-dbus-transformation -o feedhandler feedhandler.vala
Comment 2 Thomas Perl 2009-09-18 13:13:32 UTC
Created attachment 143440 [details]
generated c source

This is the generated C source when compiling attachment #143439 [details] using:

valac --pkg dbus-glib-1 -C --disable-dbus-transformation -o feedhandler feedhandler.vala

Note that this file contains "MimeOpen" instead of the expected "mime_open" name for that method.
Comment 3 Jürg Billeter 2009-09-21 18:46:51 UTC
commit 217a1a82d63ee8e4aedcdf3409de4f12cc38c962
Author: Jürg Billeter <j@bitron.ch>
Date:   Mon Sep 21 20:44:34 2009 +0200

    D-Bus: Support name attribute for members in clients and servers
    
    Fixes bug 595587.