44 #include <QtCore/QByteArray> 45 #include <QtCore/QList> 46 #include <QtCore/QMap> 47 #include <QtCore/QString> 48 #include <QtCore/QStringList> 49 #include <QtCore/QVariant> 50 #include <QtCore/QDebug> 169 {
return "org.freedesktop.DBus"; }
178 DBUS_INTERFACE_DBUS, connection, parent)
279 flags = DBUS_NAME_FLAG_DO_NOT_QUEUE;
285 flags = DBUS_NAME_FLAG_DO_NOT_QUEUE | DBUS_NAME_FLAG_REPLACE_EXISTING;
293 flags |= DBUS_NAME_FLAG_ALLOW_REPLACEMENT;
305 case DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER:
306 case DBUS_REQUEST_NAME_REPLY_ALREADY_OWNER:
310 case DBUS_REQUEST_NAME_REPLY_EXISTS:
314 case DBUS_REQUEST_NAME_REPLY_IN_QUEUE:
337 bool success = reply.
arguments().
at(0).
toUInt() == DBUS_RELEASE_NAME_REPLY_RELEASED;
357 static bool warningPrinted =
false;
358 if (!warningPrinted) {
359 qWarning(
"Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)");
360 warningPrinted =
true;
QDBusReply< bool > unregisterService(const QString &serviceName)
Releases the claim on the bus service name serviceName, that had been previously registered with regi...
#define QT_END_NAMESPACE
This macro expands to.
QDBusReply< void > startService(const QString &name)
Requests that the bus start the service given by the name name.
void disconnectNotify(const char *signal)
Catch signal disconnections.
static const char * staticInterfaceName()
QDBusReply< QStringList > registeredServiceNames() const
The QDBusReply class stores the reply for a method call to a remote object.
QDBusConnection connection() const
Returns the connection this interface is assocated with.
QDBusReply< bool > isServiceRegistered(const QString &serviceName) const
Returns true if the service name serviceName has is currently registered.
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
QDBusReply< QString > serviceOwner(const QString &name) const
Returns the unique connection name of the primary owner of the name name.
The QString class provides a Unicode character string.
void serviceOwnerChanged(const QString &name, const QString &oldOwner, const QString &newOwner)
This signal is emitted by the D-Bus server whenever a service ownership change happens in the bus...
ServiceQueueOptions
Flags for determining how a service registration should behave, in case the service name is already r...
The QObject class is the base class of all Qt objects.
The QDBusAbstractInterface class is the base class for all D-Bus interfaces in the QtDBus binding...
#define QT_BEGIN_NAMESPACE
This macro expands to.
QDBusConnectionInterface(const QDBusConnection &connection, QObject *parent)
QList< QVariant > arguments() const
Returns the list of arguments that are going to be sent or were received from D-Bus.
QDBusMessage internalConstCall(QDBus::CallMode mode, const QString &method, const QList< QVariant > &args=QList< QVariant >()) const
static bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
Creates a connection of the given type from the signal in the sender object to the method in the rece...
~QDBusConnectionInterface()
const T & at(int i) const
Returns the item at index position i in the list.
Q_CORE_EXPORT void qWarning(const char *,...)
The QLatin1String class provides a thin wrapper around an US-ASCII/Latin-1 encoded string literal...
ServiceReplacementOptions
Flags for determining if the D-Bus server should allow another application to replace a name that thi...
The QDBusConnection class represents a connection to the D-Bus bus daemon.
QObject * parent() const
Returns a pointer to the parent object.
QList< QVariant > QVariantList
QDBusReply< QDBusConnectionInterface::RegisterServiceReply > registerService(const QString &serviceName, ServiceQueueOptions qoption=DontQueueService, ServiceReplacementOptions roption=DontAllowReplacement)
Requests to register the service name serviceName on the bus.
uint toUInt(bool *ok=0) const
Returns the variant as an unsigned int if the variant has type() UInt , Bool , ByteArray ...
QDBusReply< uint > servicePid(const QString &serviceName) const
Returns the Unix Process ID (PID) for the process currently holding the bus service serviceName...
QDBusReply< uint > serviceUid(const QString &serviceName) const
Returns the Unix User ID (UID) for the process currently holding the bus service serviceName.
The QDBusMessage class represents one message sent or received over the D-Bus bus.
MessageType type() const
Returns the message type.
void serviceRegistered(const QString &service)
This signal is emitted by the D-Bus server when the bus service name (unique connection name or well-...
void setArguments(const QList< QVariant > &arguments)
Sets the arguments that are going to be sent over D-Bus to arguments.
int qstrcmp(const QByteArray &str1, const char *str2)
void serviceUnregistered(const QString &service)
This signal is emitted by the D-Bus server when this application loses ownership of the bus service n...
void connectNotify(const char *signal)
Catch signal connections.
QDBusMessage call(const QString &method, const QVariant &arg1=QVariant(), const QVariant &arg2=QVariant(), const QVariant &arg3=QVariant(), const QVariant &arg4=QVariant(), const QVariant &arg5=QVariant(), const QVariant &arg6=QVariant(), const QVariant &arg7=QVariant(), const QVariant &arg8=QVariant())
Calls the method method on this interface and passes the parameters to this function to the method...