File indexing completed on 2024-11-24 04:17:00

0001 /*
0002     SPDX-FileCopyrightText: 2022 Volker Krause <vkrause@kde.org>
0003     SPDX-License-Identifier: LGPL-2.0-or-later
0004 */
0005 
0006 #ifndef KUNIFIEDPUSH_CLIENT_INFO_P_H
0007 #define KUNIFIEDPUSH_CLIENT_INFO_P_H
0008 
0009 #include <QDBusArgument>
0010 #include <QString>
0011 
0012 namespace KUnifiedPush
0013 {
0014 
0015 struct ClientInfo {
0016     QString token;
0017     QString serviceName;
0018     QString description;
0019 };
0020 
0021 }
0022 Q_DECLARE_METATYPE(KUnifiedPush::ClientInfo)
0023 
0024 inline QDBusArgument &operator<<(QDBusArgument &argument, const KUnifiedPush::ClientInfo &client)
0025 {
0026     argument.beginStructure();
0027     argument << client.token << client.serviceName << client.description;
0028     argument.endStructure();
0029     return argument;
0030 }
0031 
0032 inline const QDBusArgument &operator>>(const QDBusArgument &argument, KUnifiedPush::ClientInfo &client)
0033 {
0034     argument.beginStructure();
0035     argument >> client.token >> client.serviceName >> client.description;
0036     argument.endStructure();
0037     return argument;
0038 }
0039 
0040 #endif