File indexing completed on 2023-12-03 08:14:44

0001 /*
0002     SPDX-FileCopyrightText: 2012 Frederik Gladhorn <gladhorn@kde.org>
0003 
0004     SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0005 */
0006 
0007 #include "qt-atspi.h"
0008 #include <QDBusMetaType>
0009 
0010 namespace QAccessibleClient {
0011 
0012 void registerDBusTypes()
0013 {
0014     qRegisterMetaType<QAccessibleClient::QSpiObjectReference>();
0015     qDBusRegisterMetaType<QAccessibleClient::QSpiObjectReference>();
0016 
0017     qRegisterMetaType<QAccessibleClient::QSpiObjectReferenceList>();
0018     qDBusRegisterMetaType<QAccessibleClient::QSpiObjectReferenceList>();
0019 
0020     qRegisterMetaType<QAccessibleClient::QSpiAction>();
0021     qDBusRegisterMetaType<QAccessibleClient::QSpiAction>();
0022 
0023     qRegisterMetaType<QAccessibleClient::QSpiActionArray>();
0024     qDBusRegisterMetaType<QAccessibleClient::QSpiActionArray>();
0025 }
0026 
0027 /* QSpiObjectReference */
0028 /*---------------------------------------------------------------------------*/
0029 
0030 QDBusArgument &operator<<(QDBusArgument &argument, const QAccessibleClient::QSpiObjectReference &address)
0031 {
0032     argument.beginStructure();
0033     argument << address.service;
0034     argument << address.path;
0035     argument.endStructure();
0036     return argument;
0037 }
0038 
0039 const QDBusArgument &operator>>(const QDBusArgument &argument, QAccessibleClient::QSpiObjectReference &address)
0040 {
0041     argument.beginStructure();
0042     argument >> address.service;
0043     argument >> address.path;
0044     argument.endStructure();
0045     return argument;
0046 }
0047 
0048 QDBusArgument &operator<<(QDBusArgument &argument, const QAccessibleClient::QSpiAction &action)
0049 {
0050     argument.beginStructure();
0051     argument << action.name;
0052     argument << action.description;
0053     argument << action.keyBinding;
0054     argument.endStructure();
0055     return argument;
0056 }
0057 
0058 const QDBusArgument &operator>>(const QDBusArgument &argument, QAccessibleClient::QSpiAction &action)
0059 {
0060     argument.beginStructure();
0061     argument >> action.name;
0062     argument >> action.description;
0063     argument >> action.keyBinding;
0064     argument.endStructure();
0065     return argument;
0066 }
0067 
0068 }