Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qdbusinternalfilters.cpp File Reference

(9fb3bd05a8877a2b5f3b8d64cfd6e3c0e523bf6d)

#include "qdbusconnection_p.h"
#include "qdbus_symbols_p.h"
#include <QtCore/qcoreapplication.h>
#include <QtCore/qmetaobject.h>
#include <QtCore/qstringlist.h>
#include <QtCore/qthread.h>
#include "qdbusabstractadaptor.h"
#include "qdbusabstractadaptor_p.h"
#include "qdbusconnection.h"
#include "qdbusextratypes.h"
#include "qdbusmessage.h"
#include "qdbusmetatype.h"
#include "qdbusmetatype_p.h"
#include "qdbusmessage_p.h"
#include "qdbusutil_p.h"
#include "qdbusvirtualobject.h"
#include <algorithm>
+ Include dependency graph for qdbusinternalfilters.cpp:

Go to the source code of this file.

Enumerations

enum  PropertyWriteResult {
  PropertyWriteSuccess = 0 , PropertyNotFound , PropertyTypeMismatch , PropertyReadOnly ,
  PropertyWriteFailed
}
 

Functions

Q_DBUS_EXPORT QString qDBusGenerateMetaObjectXml (QString interface, const QMetaObject *mo, const QMetaObject *base, int flags)
 
static QString generateSubObjectXml (const QObject *object)
 
QString qDBusIntrospectObject (const QDBusConnectionPrivate::ObjectTreeNode &node, const QString &path)
 
static QDBusMessage interfaceNotFoundError (const QDBusMessage &msg, const QString &interface_name)
 
static QDBusMessage propertyNotFoundError (const QDBusMessage &msg, const QString &interface_name, const QByteArray &property_name)
 
QDBusMessage qDBusPropertyGet (const QDBusConnectionPrivate::ObjectTreeNode &node, const QDBusMessage &msg)
 
static QDBusMessage propertyWriteReply (const QDBusMessage &msg, const QString &interface_name, const QByteArray &property_name, int status)
 
static int writeProperty (QObject *obj, const QByteArray &property_name, QVariant value, int propFlags=QDBusConnection::ExportAllProperties)
 
QDBusMessage qDBusPropertySet (const QDBusConnectionPrivate::ObjectTreeNode &node, const QDBusMessage &msg)
 
static QVariantMapoperator+= (QVariantMap &lhs, const QVariantMap &rhs)
 
static QVariantMap readAllProperties (QObject *object, int flags)
 
QDBusMessage qDBusPropertyGetAll (const QDBusConnectionPrivate::ObjectTreeNode &node, const QDBusMessage &msg)
 

Variables

static const char introspectableInterfaceXml []
 
static const char propertiesInterfaceXml []
 
static const char peerInterfaceXml []
 

Enumeration Type Documentation

◆ PropertyWriteResult

Enumerator
PropertyWriteSuccess 
PropertyNotFound 
PropertyTypeMismatch 
PropertyReadOnly 
PropertyWriteFailed 

Definition at line 250 of file qdbusinternalfilters.cpp.

Function Documentation

◆ generateSubObjectXml()

static QString generateSubObjectXml ( const QObject * object)
static

Definition at line 76 of file qdbusinternalfilters.cpp.

References child, and QDBusUtil::isValidPartOfObjectPath().

Referenced by qDBusIntrospectObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ interfaceNotFoundError()

static QDBusMessage interfaceNotFoundError ( const QDBusMessage & msg,
const QString & interface_name )
inlinestatic

Definition at line 165 of file qdbusinternalfilters.cpp.

References arg, QDBusMessage::createErrorReply(), QDBusMessage::path(), and QDBusError::UnknownInterface.

Referenced by qDBusPropertyGet(), qDBusPropertyGetAll(), and qDBusPropertySet().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator+=()

static QVariantMap & operator+= ( QVariantMap & lhs,
const QVariantMap & rhs )
static

Definition at line 397 of file qdbusinternalfilters.cpp.

References QMap< Key, T >::asKeyValueRange(), and QMap< Key, T >::insert().

+ Here is the call graph for this function:

◆ propertyNotFoundError()

static QDBusMessage propertyNotFoundError ( const QDBusMessage & msg,
const QString & interface_name,
const QByteArray & property_name )
inlinestatic

Definition at line 173 of file qdbusinternalfilters.cpp.

References arg, QDBusMessage::createErrorReply(), QDBusMessage::path(), and QDBusError::UnknownProperty.

Referenced by propertyWriteReply(), and qDBusPropertyGet().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ propertyWriteReply()

static QDBusMessage propertyWriteReply ( const QDBusMessage & msg,
const QString & interface_name,
const QByteArray & property_name,
int status )
static

Definition at line 258 of file qdbusinternalfilters.cpp.

References arg, QDBusMessage::createErrorReply(), QDBusMessage::createReply(), QString::fromLatin1(), QDBusError::InternalError, QDBusError::InvalidArgs, PropertyNotFound, propertyNotFoundError(), QDBusError::PropertyReadOnly, PropertyReadOnly, PropertyTypeMismatch, PropertyWriteFailed, PropertyWriteSuccess, and Q_ASSERT_X.

Referenced by qDBusPropertySet().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ qDBusGenerateMetaObjectXml()

QString qDBusGenerateMetaObjectXml ( QString interface,
const QMetaObject * mo,
const QMetaObject * base,
int flags )
extern

Definition at line 212 of file qdbusxmlgenerator.cpp.

References base, QString::fromUtf8(), generateInterfaceXml(), interface, mo, QCLASSINFO_DBUS_INTROSPECTION, and xml.

Referenced by qDBusIntrospectObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ qDBusIntrospectObject()

◆ qDBusPropertyGet()

◆ qDBusPropertyGetAll()

◆ qDBusPropertySet()

◆ readAllProperties()

static QVariantMap readAllProperties ( QObject * object,
int flags )
static

Definition at line 404 of file qdbusinternalfilters.cpp.

References QDBusConnection::ExportNonScriptableProperties, QDBusConnection::ExportScriptableProperties, QString::fromLatin1(), i, mo, and QDBusMetaType::typeToSignature().

Referenced by qDBusPropertyGetAll().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ writeProperty()

static int writeProperty ( QObject * obj,
const QByteArray & property_name,
QVariant value,
int propFlags = QDBusConnection::ExportAllProperties )
static

Definition at line 287 of file qdbusinternalfilters.cpp.

References QDBusMetaTypeId::argument(), QDBusMetaType::demarshall(), QDBusConnection::ExportNonScriptableProperties, QDBusConnection::ExportScriptableProperties, QVariant::fromValue(), mo, other(), PropertyNotFound, PropertyReadOnly, PropertyWriteFailed, PropertyWriteSuccess, QMetaType::QVariant, and qWarning.

Referenced by qDBusPropertySet(), and QSSGQmlUtilities::writeQml().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ introspectableInterfaceXml

const char introspectableInterfaceXml[]
static
Initial value:
=
" <interface name=\"org.freedesktop.DBus.Introspectable\">\n"
" <method name=\"Introspect\">\n"
" <arg name=\"xml_data\" type=\"s\" direction=\"out\"/>\n"
" </method>\n"
" </interface>\n"

Definition at line 36 of file qdbusinternalfilters.cpp.

Referenced by qDBusIntrospectObject().

◆ peerInterfaceXml

const char peerInterfaceXml[]
static
Initial value:
=
" <interface name=\"org.freedesktop.DBus.Peer\">\n"
" <method name=\"Ping\"/>\n"
" <method name=\"GetMachineId\">\n"
" <arg name=\"machine_uuid\" type=\"s\" direction=\"out\"/>\n"
" </method>\n"
" </interface>\n"

Definition at line 68 of file qdbusinternalfilters.cpp.

Referenced by qDBusIntrospectObject().

◆ propertiesInterfaceXml

const char propertiesInterfaceXml[]
static
Initial value:
=
" <interface name=\"org.freedesktop.DBus.Properties\">\n"
" <method name=\"Get\">\n"
" <arg name=\"interface_name\" type=\"s\" direction=\"in\"/>\n"
" <arg name=\"property_name\" type=\"s\" direction=\"in\"/>\n"
" <arg name=\"value\" type=\"v\" direction=\"out\"/>\n"
" </method>\n"
" <method name=\"Set\">\n"
" <arg name=\"interface_name\" type=\"s\" direction=\"in\"/>\n"
" <arg name=\"property_name\" type=\"s\" direction=\"in\"/>\n"
" <arg name=\"value\" type=\"v\" direction=\"in\"/>\n"
" </method>\n"
" <method name=\"GetAll\">\n"
" <arg name=\"interface_name\" type=\"s\" direction=\"in\"/>\n"
" <arg name=\"values\" type=\"a{sv}\" direction=\"out\"/>\n"
" <annotation name=\"org.qtproject.QtDBus.QtTypeName.Out0\" value=\"QVariantMap\"/>\n"
" </method>\n"
" <signal name=\"PropertiesChanged\">\n"
" <arg name=\"interface_name\" type=\"s\" direction=\"out\"/>\n"
" <arg name=\"changed_properties\" type=\"a{sv}\" direction=\"out\"/>\n"
" <annotation name=\"org.qtproject.QtDBus.QtTypeName.Out1\" value=\"QVariantMap\"/>\n"
" <arg name=\"invalidated_properties\" type=\"as\" direction=\"out\"/>\n"
" </signal>\n"
" </interface>\n"

Definition at line 43 of file qdbusinternalfilters.cpp.

Referenced by qDBusIntrospectObject().