30 #include <QCoreApplication>
31 #include <QDBusServer>
33 #include "../myobject.h"
35 static const char serviceName[] =
"org.qtproject.autotests.qmyserver";
36 static const char objectPath[] =
"/org/qtproject/qmyserver";
45 Q_CLASSINFO(
"D-Bus Interface",
"org.qtproject.autotests.qmyserver")
86 obj.m_complexProp.clear();
96 return MyObject::callArgs;
116 return obj.m_complexProp;
121 if (
message().isInteractiveAuthorizationAllowed())
153 int main(
int argc,
char *argv[])
158 if (!
con.isConnected())
161 if (!
con.registerService(serviceName))
173 #include "qmyserver.moc"
void setComplexProp(QList< int > val)
QList< int > complexProp()
bool interactiveAuthorization()
void emitSignal(const QString &interface, const QString &name, const QString &arg)
The QCoreApplication class provides an event loop for Qt applications without UI.
The QDBusConnection class represents a connection to the D-Bus bus daemon.
bool send(const QDBusMessage &message) const
static QDBusConnection sessionBus()
bool registerObject(const QString &path, QObject *object, RegisterOptions options=ExportAdaptors)
The QDBusContext class allows slots to determine the D-Bus context of the calls.
void setDelayedReply(bool enable) const
void sendErrorReply(const QString &name, const QString &msg=QString()) const
const QDBusMessage & message() const
The QDBusMessage class represents one message sent or received over the D-Bus bus.
static QDBusMessage createSignal(const QString &path, const QString &interface, const QString &name)
QDBusMessage createReply(const QList< QVariant > &arguments=QList< QVariant >()) const
The QDBusServer class provides peer-to-peer communication between processes on the same computer.
void newConnection(const QDBusConnection &connection)
QDBusError lastError() const
The QObject class is the base class of all Qt objects.
static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
The QString class provides a Unicode character string.
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction void DBusFreeFunction return DBusConnection return DBusConnection return const char DBusError return DBusConnection DBusMessage dbus_uint32_t return DBusConnection dbus_bool_t DBusConnection DBusAddWatchFunction DBusRemoveWatchFunction DBusWatchToggledFunction void DBusFreeFunction return DBusConnection DBusDispatchStatusFunction void DBusFreeFunction DBusTimeout return DBusTimeout return DBusWatch return DBusWatch unsigned int return DBusError const DBusError return const DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessageIter int const void return DBusMessageIter DBusMessageIter return DBusMessageIter void DBusMessageIter void int return DBusMessage DBusMessageIter return DBusMessageIter return DBusMessageIter DBusMessageIter const char const char const char const char return DBusMessage return DBusMessage const char return DBusMessage dbus_bool_t return DBusMessage dbus_uint32_t return DBusMessage return DBusPendingCall DBusPendingCall return DBusPendingCall return dbus_int32_t return DBusServer * server
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction void DBusFreeFunction return DBusConnection return DBusConnection return const char DBusError return DBusConnection DBusMessage dbus_uint32_t return DBusConnection dbus_bool_t DBusConnection DBusAddWatchFunction DBusRemoveWatchFunction DBusWatchToggledFunction void DBusFreeFunction return DBusConnection DBusDispatchStatusFunction void DBusFreeFunction DBusTimeout return DBusTimeout return DBusWatch return DBusWatch unsigned int return DBusError const DBusError return const DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessageIter int const void return DBusMessageIter DBusMessageIter return DBusMessageIter void DBusMessageIter void int return DBusMessage DBusMessageIter return DBusMessageIter return DBusMessageIter DBusMessageIter const char const char const char * interface
int main(int argc, char *argv[])
[1]
#define QStringLiteral(str)
QApplication app(argc, argv)
[0]