[maemo-developers] QDBusError UnknownMethod for com.nokia.csd.Call service

From: Felipe Crochik felipe at crochik.com
Date: Fri May 28 15:15:32 EEST 2010
This code works for me:

    QDBusMessage msg = QDBusMessage::createMethodCall(
        "com.nokia.csd.Call", // --dest
        "/com/nokia/csd/call", // destination object path
        "com.nokia.csd.Call", // message name (w/o method)
        "CreateWith" // method
    );
    msg << phone_number;
    msg << 0;
    msg = QDBusConnection::systemBus().call(msg);
    qDebug() << msg;
    return msg.type() != QDBusMessage::ErrorMessage;


Felipe

-----Original Message-----
From: maemo-developers-bounces at maemo.org
[mailto:maemo-developers-bounces at maemo.org] On Behalf Of Roman Morawek
Sent: Friday, May 28, 2010 8:08 AM
To: maemo-developers at maemo.org
Subject: QDBusError UnknownMethod for com.nokia.csd.Call service

Hello,

I am using the Nokia Qt Beta SDK and try to initiate a voice call on
Maemo/N900. Since there is no Qt API for this available, I try this via
the DBus.

Actually I want to mimic the functionality of the following working
shell command:

dbus-send --system --type=method_call --print-reply
--dest=com.nokia.csd.Call /com/nokia/csd/call
com.nokia.csd.Call.CreateWith string:"+43123456789" uint32:0


This is what I try:

// DBUS call interface
if (!QDBusConnection::sessionBus().isConnected())
    return false;

// initiate call
QDBusConnection connSystemBus = QDBusConnection::systemBus();
QDBusInterface dbusPhone( "com.nokia.csd.Call", "/com/nokia/csd/call",
QString(), connSystemBus );
qDebug() << "connected to bus with result " << dbusPhone.isValid();

QDBusMessage reply = dbusPhone.call( "CreateWith", "+43123456789",
(uint)0 );
qDebug() << "call initiated with result " << dbusPhone.lastError();


As the output, I get the following error:

connected to bus with result  true
call initiated with result
QDBusError("org.freedesktop.DBus.Error.UnknownMethod", "Method
"CreateWith" with signature "su" on interface "(null)" doesn't exist ")


What am I doing wrong?
Thanks a lot for your support!

Regards,
Roman
_______________________________________________
maemo-developers mailing list
maemo-developers at maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers

More information about the maemo-developers mailing list