![]() |
Qt 6.x
The Qt SDK
|
#include <qdbusconnection_p.h>
Classes | |
struct | ArgMatchRules |
struct | ObjectTreeNode |
struct | SignalHook |
struct | WatchedServiceData |
struct | Watcher |
Public Types | |
enum | ConnectionMode { InvalidMode , ServerMode , ClientMode , PeerMode } |
enum | TreeNodeType { Object = 0x0 , VirtualObject = 0x01000000 } |
typedef QMultiHash< qintptr, Watcher > | WatcherHash |
typedef QHash< int, DBusTimeout * > | TimeoutHash |
typedef QList< QDBusMessage > | PendingMessageList |
typedef QMultiHash< QString, SignalHook > | SignalHookHash |
typedef QHash< QString, QDBusMetaObject * > | MetaObjectHash |
typedef QHash< QByteArray, int > | MatchRefCountHash |
typedef QList< QDBusPendingCallPrivate * > | PendingCallList |
typedef QHash< QString, WatchedServiceData > | WatchedServicesHash |
Public Slots | |
void | setDispatchEnabled (bool enable) |
void | doDispatch () |
void | socketRead (qintptr) |
void | socketWrite (qintptr) |
void | objectDestroyed (QObject *o) |
void | relaySignal (QObject *obj, const QMetaObject *, int signalId, const QVariantList &args) |
bool | addSignalHook (const QString &key, const SignalHook &hook) |
bool | removeSignalHook (const QString &key, const SignalHook &hook) |
![]() | |
void | deleteLater () |
\threadsafe | |
Signals | |
void | dispatchStatusChanged () |
void | spyHooksFinished (const QDBusMessage &msg) |
void | messageNeedsSending (QDBusPendingCallPrivate *pcall, void *msg, int timeout=-1) |
bool | signalNeedsConnecting (const QString &key, const QDBusConnectionPrivate::SignalHook &hook) |
bool | signalNeedsDisconnecting (const QString &key, const QDBusConnectionPrivate::SignalHook &hook) |
void | serviceOwnerChanged (const QString &name, const QString &oldOwner, const QString &newOwner) |
void | callWithCallbackFailed (const QDBusError &error, const QDBusMessage &message) |
void | newServerConnection (QDBusConnectionPrivate *newConnection) |
![]() | |
void | destroyed (QObject *=nullptr) |
This signal is emitted immediately before the object obj is destroyed, after any instances of QPointer have been notified, and cannot be blocked. | |
void | objectNameChanged (const QString &objectName, QPrivateSignal) |
This signal is emitted after the object's name has been changed. | |
Public Member Functions | |
QDBusConnectionPrivate (QObject *parent=nullptr) | |
~QDBusConnectionPrivate () | |
void | createBusService () |
void | setPeer (DBusConnection *connection, const QDBusErrorInternal &error) |
void | setConnection (DBusConnection *connection, const QDBusErrorInternal &error) |
void | setServer (QDBusServer *object, DBusServer *server, const QDBusErrorInternal &error) |
void | closeConnection () |
QString | getNameOwner (const QString &service) |
bool | shouldWatchService (const QString &service) |
void | watchService (const QString &service, QDBusServiceWatcher::WatchMode mode, QObject *obj, const char *member) |
Sets up a watch rule for service service for the change described by mode mode. | |
void | unwatchService (const QString &service, QDBusServiceWatcher::WatchMode mode, QObject *obj, const char *member) |
Removes a watch rule set up by QDBusConnectionPrivate::watchService(). | |
bool | send (const QDBusMessage &message) |
QDBusMessage | sendWithReply (const QDBusMessage &message, QDBus::CallMode mode, int timeout=-1) |
QDBusMessage | sendWithReplyLocal (const QDBusMessage &message) |
QDBusPendingCallPrivate * | sendWithReplyAsync (const QDBusMessage &message, QObject *receiver, const char *returnMethod, const char *errorMethod, int timeout=-1) |
bool | connectSignal (const QString &service, const QString &path, const QString &interface, const QString &name, const QStringList &argumentMatch, const QString &signature, QObject *receiver, const char *slot) |
bool | disconnectSignal (const QString &service, const QString &path, const QString &interface, const QString &name, const QStringList &argumentMatch, const QString &signature, QObject *receiver, const char *slot) |
bool | connectSignal (const QString &service, const QString &path, const QString &interface, const QString &name, const ArgMatchRules &argumentMatch, const QString &signature, QObject *receiver, const char *slot) |
bool | disconnectSignal (const QString &service, const QString &path, const QString &interface, const QString &name, const ArgMatchRules &argumentMatch, const QString &signature, QObject *receiver, const char *slot) |
void | registerObject (const ObjectTreeNode *node) |
void | unregisterObject (const QString &path, QDBusConnection::UnregisterMode mode) |
void | connectRelay (const QString &service, const QString &path, const QString &interface, QDBusAbstractInterface *receiver, const QMetaMethod &signal) |
void | disconnectRelay (const QString &service, const QString &path, const QString &interface, QDBusAbstractInterface *receiver, const QMetaMethod &signal) |
void | registerService (const QString &serviceName) |
void | unregisterService (const QString &serviceName) |
bool | handleMessage (const QDBusMessage &msg) |
QDBusMetaObject * | findMetaObject (const QString &service, const QString &path, const QString &interface, QDBusError &error) |
void | postEventToThread (int action, QObject *target, QEvent *event) |
void | enableDispatchDelayed (QObject *context) |
QDBusConnection::ConnectionCapabilities | connectionCapabilities () const |
![]() | |
Q_INVOKABLE | QObject (QObject *parent=nullptr) |
Constructs an object with parent object parent. | |
virtual | ~QObject () |
Destroys the object, deleting all its child objects. | |
virtual bool | event (QEvent *event) |
This virtual function receives events to an object and should return true if the event e was recognized and processed. | |
virtual bool | eventFilter (QObject *watched, QEvent *event) |
Filters events if this object has been installed as an event filter for the watched object. | |
QString | objectName () const |
Q_WEAK_OVERLOAD void | setObjectName (const QString &name) |
Sets the object's name to name. | |
void | setObjectName (QAnyStringView name) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
QBindable< QString > | bindableObjectName () |
bool | isWidgetType () const |
Returns true if the object is a widget; otherwise returns false . | |
bool | isWindowType () const |
Returns true if the object is a window; otherwise returns false . | |
bool | isQuickItemType () const |
Returns true if the object is a QQuickItem; otherwise returns false . | |
bool | signalsBlocked () const noexcept |
Returns true if signals are blocked; otherwise returns false . | |
bool | blockSignals (bool b) noexcept |
If block is true, signals emitted by this object are blocked (i.e., emitting a signal will not invoke anything connected to it). | |
QThread * | thread () const |
Returns the thread in which the object lives. | |
void | moveToThread (QThread *thread) |
Changes the thread affinity for this object and its children. | |
int | startTimer (int interval, Qt::TimerType timerType=Qt::CoarseTimer) |
This is an overloaded function that will start a timer of type timerType and a timeout of interval milliseconds. | |
int | startTimer (std::chrono::milliseconds time, Qt::TimerType timerType=Qt::CoarseTimer) |
void | killTimer (int id) |
Kills the timer with timer identifier, id. | |
template<typename T > | |
T | findChild (const QString &aName=QString(), Qt::FindChildOptions options=Qt::FindChildrenRecursively) const |
Returns the child of this object that can be cast into type T and that is called name, or \nullptr if there is no such object. | |
template<typename T > | |
QList< T > | findChildren (const QString &aName, Qt::FindChildOptions options=Qt::FindChildrenRecursively) const |
Returns all children of this object with the given name that can be cast to type T, or an empty list if there are no such objects. | |
template<typename T > | |
QList< T > | findChildren (Qt::FindChildOptions options=Qt::FindChildrenRecursively) const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
const QObjectList & | children () const |
Returns a list of child objects. | |
void | setParent (QObject *parent) |
Makes the object a child of parent. | |
void | installEventFilter (QObject *filterObj) |
Installs an event filter filterObj on this object. | |
void | removeEventFilter (QObject *obj) |
Removes an event filter object obj from this object. | |
QMetaObject::Connection | connect (const QObject *sender, const char *signal, const char *member, Qt::ConnectionType type=Qt::AutoConnection) const |
bool | disconnect (const char *signal=nullptr, const QObject *receiver=nullptr, const char *member=nullptr) const |
bool | disconnect (const QObject *receiver, const char *member=nullptr) const |
void | dumpObjectTree () const |
Dumps a tree of children to the debug output. | |
void | dumpObjectInfo () const |
Dumps information about signal connections, etc. | |
bool | setProperty (const char *name, const QVariant &value) |
Sets the value of the object's name property to value. | |
bool | setProperty (const char *name, QVariant &&value) |
QVariant | property (const char *name) const |
Returns the value of the object's name property. | |
QList< QByteArray > | dynamicPropertyNames () const |
QBindingStorage * | bindingStorage () |
const QBindingStorage * | bindingStorage () const |
QObject * | parent () const |
Returns a pointer to the parent object. | |
bool | inherits (const char *classname) const |
Returns true if this object is an instance of a class that inherits className or a QObject subclass that inherits className; otherwise returns false . | |
Static Public Member Functions | |
static int | findSlot (QObject *obj, const QByteArray &normalizedName, QList< QMetaType > ¶ms, QString &errorMsg) |
static bool | prepareHook (QDBusConnectionPrivate::SignalHook &hook, QString &key, const QString &service, const QString &path, const QString &interface, const QString &name, const ArgMatchRules &argMatch, QObject *receiver, const char *signal, int minMIdx, bool buildSignature) |
static DBusHandlerResult | messageFilter (DBusConnection *, DBusMessage *, void *) |
static QDBusCallDeliveryEvent * | prepareReply (QDBusConnectionPrivate *target, QObject *object, int idx, const QList< QMetaType > &metaTypes, const QDBusMessage &msg) |
static void | processFinishedCall (QDBusPendingCallPrivate *call) |
static QDBusConnectionPrivate * | d (const QDBusConnection &q) |
static QDBusConnection | q (QDBusConnectionPrivate *connection) |
![]() | |
static QMetaObject::Connection | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection) |
\threadsafe | |
static QMetaObject::Connection | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type=Qt::AutoConnection) |
template<typename Func1 , typename Func2 > | |
static QMetaObject::Connection | connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::ContextTypeForFunctor< Func2 >::ContextType *context, Func2 &&slot, Qt::ConnectionType type=Qt::AutoConnection) |
template<typename Func1 , typename Func2 > | |
static QMetaObject::Connection | connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, Func2 &&slot) |
static bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *member) |
\threadsafe | |
static bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &member) |
static bool | disconnect (const QMetaObject::Connection &) |
Disconnect a connection. | |
template<typename Func1 , typename Func2 > | |
static bool | disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiver, Func2 slot) |
template<typename Func1 > | |
static bool | disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const QObject *receiver, void **zero) |
Protected Member Functions | |
void | timerEvent (QTimerEvent *e) override |
This event handler can be reimplemented in a subclass to receive timer events for the object. | |
![]() | |
QObject * | sender () const |
Returns a pointer to the object that sent the signal, if called in a slot activated by a signal; otherwise it returns \nullptr. | |
int | senderSignalIndex () const |
int | receivers (const char *signal) const |
Returns the number of receivers connected to the signal. | |
bool | isSignalConnected (const QMetaMethod &signal) const |
virtual void | timerEvent (QTimerEvent *event) |
This event handler can be reimplemented in a subclass to receive timer events for the object. | |
virtual void | childEvent (QChildEvent *event) |
This event handler can be reimplemented in a subclass to receive child events. | |
virtual void | customEvent (QEvent *event) |
This event handler can be reimplemented in a subclass to receive custom events. | |
virtual void | connectNotify (const QMetaMethod &signal) |
virtual void | disconnectNotify (const QMetaMethod &signal) |
QObject (QObjectPrivate &dd, QObject *parent=nullptr) | |
Friends | |
class | QDBusActivateObjectEvent |
class | QDBusCallDeliveryEvent |
class | QDBusServer |
Additional Inherited Members | |
![]() | |
QScopedPointer< QObjectData > | d_ptr |
![]() | |
QString | objectName |
the name of this object | |
![]() | |
template< class T > T | qobject_cast (const QObject *object) |
Returns the given object cast to type T if the object is of type T (or of a subclass); otherwise returns \nullptr. | |
template< typename T > T | qFindChildqFindChildren (const QObject *obj, const QString &name)() |
template< typename T > QList< T > | qFindChildrenqFindChildren (const QObject *obj, const QString &name)() |
QObjectList | |
\macro Q_CLASSINFO(Name, Value) | |
Definition at line 74 of file qdbusconnection_p.h.
typedef QHash<QByteArray, int> QDBusConnectionPrivate::MatchRefCountHash |
Definition at line 147 of file qdbusconnection_p.h.
Definition at line 146 of file qdbusconnection_p.h.
Definition at line 148 of file qdbusconnection_p.h.
Definition at line 143 of file qdbusconnection_p.h.
Definition at line 145 of file qdbusconnection_p.h.
typedef QHash<int, DBusTimeout *> QDBusConnectionPrivate::TimeoutHash |
Definition at line 142 of file qdbusconnection_p.h.
Definition at line 158 of file qdbusconnection_p.h.
Definition at line 141 of file qdbusconnection_p.h.
Enumerator | |
---|---|
InvalidMode | |
ServerMode | |
ClientMode | |
PeerMode |
Definition at line 79 of file qdbusconnection_p.h.
Enumerator | |
---|---|
Object | |
VirtualObject |
Definition at line 109 of file qdbusconnection_p.h.
Definition at line 992 of file qdbusintegrator.cpp.
References addSignalHook(), Qt::BlockingQueuedConnection, QObject::connect(), QDBusUtil::dbusService(), dispatchStatusChanged(), doDispatch(), QDBusConnectionPrivate::ObjectTreeNode::flags, QDBusMetaTypeId::init(), QHash< Key, T >::insert(), isDebugging, matchRefCounts, messageNeedsSending(), Q_UNUSED, qEnvironmentVariableIntValue(), Qt::QueuedConnection, removeSignalHook(), rootNode, signalNeedsConnecting(), signalNeedsDisconnecting(), spyHooksFinished(), QBasicAtomicInteger< T >::storeRelaxed(), and watchedServices.
QDBusConnectionPrivate::~QDBusConnectionPrivate | ( | ) |
Definition at line 1036 of file qdbusintegrator.cpp.
References busService, cachedMetaObjects, ClientMode, closeConnection(), connection, QThread::currentThread(), disconnect(), mode, PeerMode, Q_ASSERT, qCWarning, qDeleteAll(), qPrintable, server, ServerMode, and QObject::thread().
|
slot |
Definition at line 2223 of file qdbusintegrator.cpp.
Referenced by QDBusConnectionPrivate().
|
signal |
void QDBusConnectionPrivate::closeConnection | ( | ) |
Definition at line 1077 of file qdbusintegrator.cpp.
References baseService, QString::clear(), QList< T >::clear(), ClientMode, CloseConnectionAction, connection, DBUS_DISPATCH_DATA_REMAINS, QSet< T >::insert(), InvalidMode, mode, PeerMode, pendingCalls, qDBusDebug, rootNode, server, server_slot, ServerMode, and signalHooks.
Referenced by ~QDBusConnectionPrivate().
|
inline |
Definition at line 281 of file qdbusconnection_p.h.
References QBasicAtomicInteger< T >::loadRelaxed().
Referenced by QDBusMessagePrivate::makeLocal(), and send().
void QDBusConnectionPrivate::connectRelay | ( | const QString & | service, |
const QString & | path, | ||
const QString & | interface, | ||
QDBusAbstractInterface * | receiver, | ||
const QMetaMethod & | signal | ||
) |
Definition at line 2425 of file qdbusintegrator.cpp.
Referenced by QDBusAbstractInterface::connectNotify().
bool QDBusConnectionPrivate::connectSignal | ( | const QString & | service, |
const QString & | path, | ||
const QString & | interface, | ||
const QString & | name, | ||
const ArgMatchRules & | argumentMatch, | ||
const QString & | signature, | ||
QObject * | receiver, | ||
const char * | slot | ||
) |
Definition at line 2203 of file qdbusintegrator.cpp.
References interface, prepareHook(), qCWarning, and QDBusConnectionPrivate::SignalHook::signature.
bool QDBusConnectionPrivate::connectSignal | ( | const QString & | service, |
const QString & | path, | ||
const QString & | interface, | ||
const QString & | name, | ||
const QStringList & | argumentMatch, | ||
const QString & | signature, | ||
QObject * | receiver, | ||
const char * | slot | ||
) |
Definition at line 2193 of file qdbusintegrator.cpp.
References QDBusConnectionPrivate::ArgMatchRules::args, connectSignal(), and interface.
Referenced by connectSignal().
void QDBusConnectionPrivate::createBusService | ( | ) |
Definition at line 1148 of file qdbusconnection.cpp.
References busService, QDBusConnectionInterface::callWithCallbackFailed(), callWithCallbackFailed(), ClientMode, QObject::connect(), connection, emit, Q_ASSERT, and Qt::QueuedConnection.
|
inlinestatic |
Definition at line 335 of file qdbusconnection_p.h.
References d().
Referenced by QDBusActivateObjectEvent::~QDBusActivateObjectEvent(), QDBusServiceWatcherPrivate::addService(), QDBusAbstractInterfacePrivate::connectionPrivate(), d(), QDBusActivateObjectEvent::placeMetaCall(), QDBusCallDeliveryEvent::placeMetaCall(), and QDBusServiceWatcherPrivate::removeService().
void QDBusConnectionPrivate::disconnectRelay | ( | const QString & | service, |
const QString & | path, | ||
const QString & | interface, | ||
QDBusAbstractInterface * | receiver, | ||
const QMetaMethod & | signal | ||
) |
Definition at line 2448 of file qdbusintegrator.cpp.
Referenced by QDBusAbstractInterfacePrivate::finishDisconnectNotify().
bool QDBusConnectionPrivate::disconnectSignal | ( | const QString & | service, |
const QString & | path, | ||
const QString & | interface, | ||
const QString & | name, | ||
const ArgMatchRules & | argumentMatch, | ||
const QString & | signature, | ||
QObject * | receiver, | ||
const char * | slot | ||
) |
Definition at line 2293 of file qdbusintegrator.cpp.
bool QDBusConnectionPrivate::disconnectSignal | ( | const QString & | service, |
const QString & | path, | ||
const QString & | interface, | ||
const QString & | name, | ||
const QStringList & | argumentMatch, | ||
const QString & | signature, | ||
QObject * | receiver, | ||
const char * | slot | ||
) |
Definition at line 2283 of file qdbusintegrator.cpp.
|
signal |
Referenced by QDBusConnectionPrivate(), and setDispatchEnabled().
|
slot |
Definition at line 1154 of file qdbusintegrator.cpp.
References QList< T >::clear(), ClientMode, connection, DBUS_DISPATCH_DATA_REMAINS, dispatchEnabled, handleMessage(), QList< T >::isEmpty(), PeerMode, pendingMessages, and qDBusDebug.
Referenced by QDBusConnectionPrivate(), setConnection(), setPeer(), socketRead(), and timerEvent().
Definition at line 2659 of file qdbusintegrator.cpp.
Referenced by qDBusNewConnection().
QDBusMetaObject * QDBusConnectionPrivate::findMetaObject | ( | const QString & | service, |
const QString & | path, | ||
const QString & | interface, | ||
QDBusError & | error | ||
) |
Definition at line 2562 of file qdbusintegrator.cpp.
Referenced by QDBusInterfacePrivate::QDBusInterfacePrivate().
|
static |
Definition at line 1275 of file qdbusintegrator.cpp.
References QString::clear(), and qDBusParametersForMethod().
Referenced by prepareHook(), and QDBusPendingCallPrivate::setReplyCallback().
Definition at line 2517 of file qdbusintegrator.cpp.
Referenced by QDBusAbstractInterfacePrivate::initOwnerTracking().
bool QDBusConnectionPrivate::handleMessage | ( | const QDBusMessage & | msg | ) |
Definition at line 502 of file qdbusintegrator.cpp.
References QList< T >::constData(), QThread::currentThread(), dispatchEnabled, QDBusMessage::ErrorMessage, QDBusMessage::InvalidMessage, QDBusSpyCallEvent::invokeSpyHooks(), QDBusMessagePrivate::isLocal(), list, QDBusMessage::MethodCallMessage, pendingMessages, QCoreApplication::postEvent(), Q_ASSERT, Q_UNLIKELY, qApp, qDBusDebug, QDBusMessage::ReplyMessage, QDBusMessage::SignalMessage, QList< T >::size(), QObject::thread(), and QDBusMessage::type().
Referenced by doDispatch(), and sendWithReplyLocal().
|
static |
|
signal |
|
signal |
Definition at line 1202 of file qdbusintegrator.cpp.
References QMultiHash< Key, T >::begin(), QMultiHash< Key, T >::end(), huntAndDestroy(), QMultiHash< QString, SignalHook >::iterator, ObjectDestroyedAction, rootNode, and signalHooks.
Definition at line 2647 of file qdbusintegrator.cpp.
|
static |
Definition at line 1290 of file qdbusintegrator.cpp.
References QDBusConnectionPrivate::SignalHook::argumentMatch, QList< T >::at(), buildMatchRule(), QString::clear(), findSlot(), QString::fromUtf8(), i, QByteArray::indexOf(), interface, QString::isNull(), QDBusConnectionPrivate::SignalHook::matchRule, QDBusMetaTypeId::message(), QDBusConnectionPrivate::SignalHook::midx, name, QMetaObject::normalizedSignature(), QDBusConnectionPrivate::SignalHook::obj, QDBusConnectionPrivate::SignalHook::params, QDBusConnectionPrivate::SignalHook::path, QString::reserve(), QDBusConnectionPrivate::SignalHook::service, signal, QDBusConnectionPrivate::SignalHook::signature, QString::size(), QList< T >::size(), QByteArray::truncate(), and QDBusMetaType::typeToSignature().
Referenced by connectSignal().
|
static |
Definition at line 743 of file qdbusintegrator.cpp.
References QDBusMessage::arguments(), QList< T >::at(), DIRECT_DELIVERY, i, QDBusMetaTypeId::message(), QVariant::metaType(), Q_ASSERT, Q_UNUSED, QDBusCallDeliveryEvent, and QList< T >::size().
Referenced by processFinishedCall().
|
static |
Definition at line 1835 of file qdbusintegrator.cpp.
References QDBusPendingCallPrivate::checkReceivedSignature(), connection, QDBusPendingCallPrivate::connection, QDBusMessage::createError(), QBasicAtomicInteger< T >::deref(), QDBusError::Disconnected, QDBusUtil::disconnectedErrorMessage(), e, emit, QDBusPendingCallWatcherHelper::emitSignals(), QDBusMessage::ErrorMessage, QDBusMessagePrivate::fromDBusMessage(), QPointer< T >::isNull(), MessageResultReceivedAction, QDBusPendingCallPrivate::metaTypes, QDBusPendingCallPrivate::methodIdx, QDBusPendingCallPrivate::mutex, QDBusPendingCallPrivate::pending, prepareReply(), qDBusDebug, QDBusPendingCallPrivate::receiver, QSharedData::ref, reply, QDBusMessage::ReplyMessage, QDBusPendingCallPrivate::replyMessage, QDBusPendingCallPrivate::sentMessage, QDBusMessage::type(), QDBusPendingCallPrivate::waitForFinishedCondition, QWaitCondition::wakeAll(), and QDBusPendingCallPrivate::watcherHelper.
Referenced by qDBusResultReceived().
|
inlinestatic |
Definition at line 336 of file qdbusconnection_p.h.
References connection.
void QDBusConnectionPrivate::registerObject | ( | const ObjectTreeNode * | node | ) |
Definition at line 2388 of file qdbusintegrator.cpp.
Definition at line 2614 of file qdbusintegrator.cpp.
|
slot |
Definition at line 1218 of file qdbusintegrator.cpp.
References args, connection, connectionCapabilities(), QByteArray::constData(), QDBusMessage::createSignal(), error, huntAndEmit(), interface, mo, qCWarning, qPrintable, RelaySignalAction, QMetaMethod::Scriptable, QDBusMessagePrivate::setParametersValidated(), and QDBusMessagePrivate::toDBusMessage().
|
slot |
Definition at line 2316 of file qdbusintegrator.cpp.
Referenced by QDBusConnectionPrivate().
bool QDBusConnectionPrivate::send | ( | const QDBusMessage & | message | ) |
Definition at line 1897 of file qdbusintegrator.cpp.
References connectionCapabilities(), emit, error, QDBusMessage::ErrorMessage, QDBusMessagePrivate::isLocal(), lastError, messageNeedsSending(), QDBusMessage::MethodCallMessage, qCWarning, qDBusDebug, qPrintable, QDBusMessage::ReplyMessage, QDBusMessage::SignalMessage, and QDBusMessagePrivate::toDBusMessage().
QDBusMessage QDBusConnectionPrivate::sendWithReply | ( | const QDBusMessage & | message, |
QDBus::CallMode | mode, | ||
int | timeout = -1 |
||
) |
Definition at line 2030 of file qdbusintegrator.cpp.
References QDBus::BlockWithGui, QObject::connect(), QBasicAtomicInteger< T >::deref(), QDBusPendingCallWatcherHelper::error(), QEventLoop::ExcludeUserInputEvents, QEventLoop::exec(), QDBusMessage::InvalidMessage, lastError, Q_ASSERT, QEventLoop::quit(), QSharedData::ref, QDBusPendingCallWatcherHelper::reply(), reply, QDBusPendingCallPrivate::replyMessage, sendWithReplyAsync(), QDBusMessage::type(), QDBusPendingCallPrivate::waitForFinished(), QEventLoop::WaitForMoreEvents, watcher, and QDBusPendingCallPrivate::watcherHelper.
QDBusPendingCallPrivate * QDBusConnectionPrivate::sendWithReplyAsync | ( | const QDBusMessage & | message, |
QObject * | receiver, | ||
const char * | returnMethod, | ||
const char * | errorMethod, | ||
int | timeout = -1 |
||
) |
Definition at line 2097 of file qdbusintegrator.cpp.
Referenced by sendWithReply().
QDBusMessage QDBusConnectionPrivate::sendWithReplyLocal | ( | const QDBusMessage & | message | ) |
Definition at line 2061 of file qdbusintegrator.cpp.
References at, error, handleMessage(), interface, QDBusMessagePrivate::makeLocal(), method, and qDBusDebug.
|
signal |
void QDBusConnectionPrivate::setConnection | ( | DBusConnection * | connection, |
const QDBusErrorInternal & | error | ||
) |
Definition at line 1767 of file qdbusintegrator.cpp.
References baseService, QString::clear(), QList< T >::clear(), ClientMode, connection, DBUS_INTERFACE_DBUS, QDBusUtil::dbusService(), doDispatch(), error, QString::fromUtf8(), QMultiHash< Key, T >::insert(), QMetaObject::invokeMethod(), QDBusConnectionPrivate::SignalHook::midx, QDBusConnectionPrivate::SignalHook::obj, QDBusConnectionPrivate::SignalHook::params, QDBusConnectionPrivate::SignalHook::path, Q_ASSERT, qDBusAddTimeout(), qDBusAddWatch(), qDBusDebug, qDBusRemoveTimeout(), qDBusRemoveWatch(), qDBusSignalFilter(), qDBusToggleTimeout(), qDBusToggleWatch(), qDBusUpdateDispatchStatus(), Qt::QueuedConnection, QList< T >::reserve(), QDBusConnectionPrivate::SignalHook::service, and signalHooks.
|
slot |
Enables or disables the delivery of incoming method calls and signals. If enable is true, this will also cause any queued, pending messages to be delivered.
Definition at line 733 of file qdbusintegrator.cpp.
References dispatchEnabled, dispatchStatusChanged(), and emit.
Referenced by qDBusNewConnection().
void QDBusConnectionPrivate::setPeer | ( | DBusConnection * | connection, |
const QDBusErrorInternal & | error | ||
) |
Definition at line 1706 of file qdbusintegrator.cpp.
References connection, doDispatch(), error, QMetaObject::invokeMethod(), PeerMode, qDBusAddTimeout(), qDBusAddWatch(), qDBusRemoveTimeout(), qDBusRemoveWatch(), qDBusSignalFilter(), qDBusToggleTimeout(), qDBusToggleWatch(), qDBusUpdateDispatchStatus(), and Qt::QueuedConnection.
Referenced by qDBusNewConnection().
void QDBusConnectionPrivate::setServer | ( | QDBusServer * | object, |
DBusServer * | server, | ||
const QDBusErrorInternal & | error | ||
) |
Definition at line 1667 of file qdbusintegrator.cpp.
References error, Q_UNUSED, qDBusAddTimeout(), qDBusAddWatch(), qDBusNewConnection(), qDBusRemoveTimeout(), qDBusRemoveWatch(), qDBusToggleTimeout(), qDBusToggleWatch(), server, server_slot, ServerMode, and serverObject.
bool QDBusConnectionPrivate::shouldWatchService | ( | const QString & | service | ) |
Definition at line 2472 of file qdbusintegrator.cpp.
|
signal |
|
signal |
Definition at line 1169 of file qdbusintegrator.cpp.
References ClientMode, connection, QMultiHash< Key, T >::constEnd(), QMultiHash< Key, T >::constFind(), DBUS_WATCH_READABLE, doDispatch(), isAuthenticated, it, PeerMode, qDebug, and watchers.
Referenced by qDBusAddWatch().
Definition at line 1186 of file qdbusintegrator.cpp.
References ClientMode, connection, QMultiHash< Key, T >::constEnd(), QMultiHash< Key, T >::constFind(), DBUS_WATCH_WRITABLE, isAuthenticated, it, PeerMode, qDebug, and watchers.
Referenced by qDBusAddWatch().
|
signal |
|
overrideprotectedvirtual |
This event handler can be reimplemented in a subclass to receive timer events for the object.
QTimer provides a higher-level interface to the timer functionality, and also more general information about timers. The timer event is passed in the event parameter.
Reimplemented from QObject.
Definition at line 1143 of file qdbusintegrator.cpp.
References doDispatch(), e, timeouts, and QHash< Key, T >::value().
void QDBusConnectionPrivate::unregisterObject | ( | const QString & | path, |
QDBusConnection::UnregisterMode | mode | ||
) |
Definition at line 2410 of file qdbusintegrator.cpp.
Definition at line 2625 of file qdbusintegrator.cpp.
void QDBusConnectionPrivate::unwatchService | ( | const QString & | service, |
QDBusServiceWatcher::WatchMode | mode, | ||
QObject * | obj, | ||
const char * | member | ||
) |
Removes a watch rule set up by QDBusConnectionPrivate::watchService().
The arguments to this function must be the same as the ones for that function.
Sets up a watch rule for service service for the change described by mode mode. When the change happens, slot member in object obj will be called.
Definition at line 2510 of file qdbusintegrator.cpp.
void QDBusConnectionPrivate::watchService | ( | const QString & | service, |
QDBusServiceWatcher::WatchMode | mode, | ||
QObject * | obj, | ||
const char * | member | ||
) |
Sets up a watch rule for service service for the change described by mode mode.
When the change happens, slot member in object obj will be called.
The caller should call QDBusConnectionPrivate::shouldWatchService() before calling this function to check whether the service needs to be watched at all. Failing to do so may add rules that are never activated.
Definition at line 2495 of file qdbusintegrator.cpp.
|
friend |
Definition at line 338 of file qdbusconnection_p.h.
|
friend |
Definition at line 339 of file qdbusconnection_p.h.
Referenced by prepareReply().
|
friend |
Definition at line 340 of file qdbusconnection_p.h.
union { ... } QDBusConnectionPrivate |
union { ... } QDBusConnectionPrivate |
bool QDBusConnectionPrivate::anonymousAuthenticationAllowed |
Definition at line 315 of file qdbusconnection_p.h.
Referenced by QDBusServer::isAnonymousAuthenticationAllowed(), qDBusNewConnection(), and QDBusServer::setAnonymousAuthenticationAllowed().
QString QDBusConnectionPrivate::baseService |
Definition at line 286 of file qdbusconnection_p.h.
Referenced by closeConnection(), QDBusMessagePrivate::makeLocal(), and setConnection().
QDBusConnectionInterface* QDBusConnectionPrivate::busService |
Definition at line 291 of file qdbusconnection_p.h.
Referenced by ~QDBusConnectionPrivate(), and createBusService().
MetaObjectHash QDBusConnectionPrivate::cachedMetaObjects |
Definition at line 312 of file qdbusconnection_p.h.
Referenced by ~QDBusConnectionPrivate().
QAtomicInt QDBusConnectionPrivate::capabilities |
Definition at line 280 of file qdbusconnection_p.h.
DBusConnection* QDBusConnectionPrivate::connection |
Definition at line 296 of file qdbusconnection_p.h.
Referenced by QDBusActivateObjectEvent::~QDBusActivateObjectEvent(), ~QDBusConnectionPrivate(), closeConnection(), connectionCapabilities(), createBusService(), doDispatch(), QDBusActivateObjectEvent::placeMetaCall(), processFinishedCall(), setConnection(), setPeer(), socketRead(), and socketWrite().
bool QDBusConnectionPrivate::dispatchEnabled |
Definition at line 316 of file qdbusconnection_p.h.
Referenced by doDispatch(), handleMessage(), and setDispatchEnabled().
bool QDBusConnectionPrivate::isAuthenticated |
Definition at line 317 of file qdbusconnection_p.h.
Referenced by socketRead(), and socketWrite().
QDBusError QDBusConnectionPrivate::lastError |
Definition at line 305 of file qdbusconnection_p.h.
Referenced by QDBusAbstractInterfacePrivate::initOwnerTracking(), QDBusServer::lastError(), send(), and sendWithReply().
QReadWriteLock QDBusConnectionPrivate::lock |
Definition at line 304 of file qdbusconnection_p.h.
Referenced by QDBusReadLocker::QDBusReadLocker(), QDBusWriteLocker::QDBusWriteLocker(), QDBusReadLocker::~QDBusReadLocker(), QDBusServer::~QDBusServer(), QDBusWriteLocker::~QDBusWriteLocker(), and qDBusNewConnection().
MatchRefCountHash QDBusConnectionPrivate::matchRefCounts |
Definition at line 310 of file qdbusconnection_p.h.
Referenced by QDBusConnectionPrivate().
ConnectionMode QDBusConnectionPrivate::mode |
Definition at line 289 of file qdbusconnection_p.h.
Referenced by ~QDBusConnectionPrivate(), and closeConnection().
QString QDBusConnectionPrivate::name |
Definition at line 285 of file qdbusconnection_p.h.
Referenced by prepareHook(), and qDBusNewConnection().
PendingCallList QDBusConnectionPrivate::pendingCalls |
Definition at line 313 of file qdbusconnection_p.h.
Referenced by closeConnection().
PendingMessageList QDBusConnectionPrivate::pendingMessages |
Definition at line 301 of file qdbusconnection_p.h.
Referenced by doDispatch(), and handleMessage().
QAtomicInt QDBusConnectionPrivate::ref |
Definition at line 279 of file qdbusconnection_p.h.
Referenced by QDBusServer::~QDBusServer().
ObjectTreeNode QDBusConnectionPrivate::rootNode |
Definition at line 311 of file qdbusconnection_p.h.
Referenced by QDBusConnectionPrivate(), closeConnection(), and objectDestroyed().
DBusServer* QDBusConnectionPrivate::server |
Definition at line 297 of file qdbusconnection_p.h.
Referenced by ~QDBusConnectionPrivate(), QDBusServer::address(), closeConnection(), QDBusServer::isConnected(), and setServer().
QStringList QDBusConnectionPrivate::serverConnectionNames |
Definition at line 287 of file qdbusconnection_p.h.
Referenced by QDBusServer::~QDBusServer(), and qDBusNewConnection().
QDBusServer* QDBusConnectionPrivate::serverObject |
Definition at line 292 of file qdbusconnection_p.h.
Referenced by QDBusServer::~QDBusServer(), qDBusNewConnection(), and setServer().
QStringList QDBusConnectionPrivate::serviceNames |
Definition at line 307 of file qdbusconnection_p.h.
SignalHookHash QDBusConnectionPrivate::signalHooks |
Definition at line 309 of file qdbusconnection_p.h.
Referenced by closeConnection(), objectDestroyed(), and setConnection().
TimeoutHash QDBusConnectionPrivate::timeouts |
Definition at line 300 of file qdbusconnection_p.h.
Referenced by timerEvent().
WatchedServicesHash QDBusConnectionPrivate::watchedServices |
Definition at line 308 of file qdbusconnection_p.h.
Referenced by QDBusConnectionPrivate().
WatcherHash QDBusConnectionPrivate::watchers |
Definition at line 299 of file qdbusconnection_p.h.
Referenced by socketRead(), and socketWrite().