[Interest] Question about using QtDBus

Rogers Nate nate.rogers at raymondcorp.com
Wed Sep 3 19:19:18 CEST 2014


On 09/03/2014 01:15 PM, Thiago Macieira wrote:
> On Wednesday 03 September 2014 16:26:31 Rogers Nate wrote:
>> public Q_SLOTS: // METHODS
>>     void serviceErrorLog();
> This isn't right. Is the interface file also returning void (or 
> QDBusReply<void>)?
>
> Can you attach the .xml file too?


Also here are the interface files...


------------------- Begin ServiceDataInterface.cpp ----------------------
/*
 * This file was generated by qdbusxml2cpp version 0.7
 * Command line was: qdbusxml2cpp ServiceData.xml -i ServiceData.h -i
ServiceErrorLogData.h -p ServiceDataInterface
 *
 * qdbusxml2cpp is Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
 *
 * This is an auto-generated file.
 * This file may have been hand-edited. Look for HAND-EDIT comments
 * before re-generating it.
 */

#include "ServiceDataInterface.h"

/*
 * Implementation of interface class ComGDMServiceDataInterface
 */

ComGDMServiceDataInterface::ComGDMServiceDataInterface(const QString
&service, const QString &path, const QDBusConnection &connection,
QObject *parent)
    : QDBusAbstractInterface(service, path, staticInterfaceName(),
connection, parent)
{
}

ComGDMServiceDataInterface::~ComGDMServiceDataInterface()
{
}
------------------- End ServiceDataInterface.cpp ----------------------

------------------- Begin ServiceDataInterface.h ----------------------
/*
 * This file was generated by qdbusxml2cpp version 0.7
 * Command line was: qdbusxml2cpp ServiceData.xml -i ServiceData.h -i
ServiceErrorLogData.h -p ServiceDataInterface
 *
 * qdbusxml2cpp is Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
 *
 * This is an auto-generated file.
 * Do not edit! All changes made to it will be lost.
 */

#ifndef SERVICEDATAINTERFACE_H_1409751838
#define SERVICEDATAINTERFACE_H_1409751838

#include <QtCore/QObject>
#include <QtCore/QByteArray>
#include <QtCore/QList>
#include <QtCore/QMap>
#include <QtCore/QString>
#include <QtCore/QStringList>
#include <QtCore/QVariant>
#include <QtDBus/QtDBus>
#include "ServiceData.h"
#include "ServiceErrorLogData.h"

/*
 * Proxy class for interface com.GDM.ServiceData
 */
class ComGDMServiceDataInterface: public QDBusAbstractInterface
{
    Q_OBJECT
public:
    static inline const char *staticInterfaceName()
    { return "com.GDM.ServiceData"; }

public:
    ComGDMServiceDataInterface(const QString &service, const QString
&path, const QDBusConnection &connection, QObject *parent = 0);

    ~ComGDMServiceDataInterface();

public Q_SLOTS: // METHODS
    inline QDBusPendingReply<> serviceErrorLog()
    {
        QList<QVariant> argumentList;
        return
asyncCallWithArgumentList(QLatin1String("serviceErrorLog"), argumentList);
    }

Q_SIGNALS: // SIGNALS
};

namespace com {
  namespace GDM {
    typedef ::ComGDMServiceDataInterface ServiceData;
  }
}
#endif
------------------- End ServiceDataInterface.h ----------------------




-------------------- Begin ServiceData.xml -----------------------
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection
1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
  <interface name="com.GDM.ServiceData">
    <method name="serviceErrorLog">
        <arg name="QList<ServiceErrorLogData>" type="a(o)ss)"
direction="out"/>
        <annotation name="org.qtproject.QtDBus.QtTypeName.Out0"
value="QList<ServiceErrorLogData>"/>
    </method>
  </interface>
</node>
-------------------- End ServiceData.h -----------------------


Nate

Confidentiality Notice: The preceding e-mail message (including any attachments) contains information that may be confidential, protected by applicable legal privileges, or constitute non-public information. It is intended to be conveyed only to the designated recipient(s). If you are not an intended recipient of this message, please notify the sender by replying to this message and then delete it from your system. Use, dissemination, distribution or reproduction of this message by unintended recipients is not authorized and may be unlawful.




More information about the Interest mailing list