How I can catch error during call method of proxy-class generated via qdusxml2cpp?

Vitaly V. Ch at
Wed Nov 7 04:48:47 PST 2007


I generate interface class from attached com.i_zum.jukebox.sim300.xml
via qdbusxml2cpp and get as result class
ComI_zumJukeboxSim300Interface with method get_money_atd().

after i compile next simple programm:

#include <QtDBus>
#include <QtCore/QCoreApplication>

#include "sim300_dbus_interface.h"

int main(int argc, char *argv[])
controller("com.i_zum.jukebox.sim300", "/",

    QString res, money;

    res = controller.get_money_atd(money);
        qWarning("Get_money_atd: %s\n", money.toLocal8Bit().data());
        qWarning("Get_money_atd:FAILURE: %s\n", res.toLocal8Bit().data());

    return 0;

at now if I run my programm when no service on
com.i_zum.jukebox.sim300 is available then qWarning print something
not related to exported method get_money_atd (). I want have method to
determine service availabity during call
and prevent non-sence process 'res' and 'money' if there was not a service.

On Nov 7, 2007 2:30 PM, Thiago Macieira <thiago at> wrote:
> Em Wednesday 07 November 2007 13:04:25 Vitaly V. Ch escreveu:
> > for example if I call method det_data() of class ProxyClass but
> > service than provide than method is not up - method return garbadge
> > instead of error or same.
> Please illustrate with code. I cannot understand you.
> --
>  Thiago Macieira - thiago (AT) - thiago (AT)
>   PGP/GPG: 0x6EF45358; fingerprint:
>   E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
> _______________________________________________
> dbus mailing list
> dbus at
-------------- next part --------------
A non-text attachment was scrubbed...
Name: com.i_zum.jukebox.sim300.xml
Type: text/xml
Size: 1182 bytes
Desc: not available
Url : 

More information about the dbus mailing list