1 | /* |
2 | This file is part of the KDE libraries |
3 | SPDX-FileCopyrightText: 2007 Andreas Hartmetz <ahartmetz@gmail.com> |
4 | |
5 | SPDX-License-Identifier: LGPL-2.0-or-later |
6 | */ |
7 | |
8 | #ifndef KSSLDINTERFACE_H |
9 | #define KSSLDINTERFACE_H |
10 | |
11 | #include <QByteArray> |
12 | #include <QDBusAbstractInterface> |
13 | #include <QDBusConnection> |
14 | #include <QDBusReply> |
15 | #include <QList> |
16 | #include <QObject> |
17 | #include <QString> |
18 | #include <QVariant> |
19 | |
20 | #include "kssld_dbusmetatypes.h" |
21 | |
22 | /** |
23 | * Proxy class for interface org.kde.KSSLD |
24 | */ |
25 | class OrgKdeKSSLDInterface : public QDBusAbstractInterface |
26 | { |
27 | Q_OBJECT |
28 | public: |
29 | static inline const char *staticInterfaceName() |
30 | { |
31 | return "org.kde.KSSLD" ; |
32 | } |
33 | |
34 | public: |
35 | OrgKdeKSSLDInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = nullptr) |
36 | : QDBusAbstractInterface(service, path, staticInterfaceName(), connection, parent) |
37 | { |
38 | registerMetaTypesForKSSLD(); |
39 | } |
40 | |
41 | ~OrgKdeKSSLDInterface() override |
42 | { |
43 | } |
44 | |
45 | public Q_SLOTS: // METHODS |
46 | Q_NOREPLY void setRule(const KSslCertificateRule &rule) |
47 | { |
48 | QList<QVariant> argumentList; |
49 | argumentList << QVariant::fromValue(value: rule); |
50 | callWithArgumentList(mode: QDBus::Block, QStringLiteral("setRule" ), args: argumentList); |
51 | } |
52 | |
53 | Q_NOREPLY void clearRule(const KSslCertificateRule &rule) |
54 | { |
55 | QList<QVariant> argumentList; |
56 | argumentList << QVariant::fromValue(value: rule); |
57 | callWithArgumentList(mode: QDBus::Block, QStringLiteral("clearRule__rule" ), args: argumentList); |
58 | } |
59 | |
60 | Q_NOREPLY void clearRule(const QSslCertificate &cert, const QString &hostName) |
61 | { |
62 | QList<QVariant> argumentList; |
63 | argumentList << QVariant::fromValue(value: cert) << QVariant::fromValue(value: hostName); |
64 | callWithArgumentList(mode: QDBus::Block, QStringLiteral("clearRule__certHost" ), args: argumentList); |
65 | } |
66 | |
67 | QDBusReply<KSslCertificateRule> rule(const QSslCertificate &cert, const QString &hostName) |
68 | { |
69 | QList<QVariant> argumentList; |
70 | argumentList << QVariant::fromValue(value: cert) << QVariant::fromValue(value: hostName); |
71 | return callWithArgumentList(mode: QDBus::Block, QStringLiteral("rule" ), args: argumentList); |
72 | } |
73 | }; |
74 | |
75 | namespace org |
76 | { |
77 | namespace kde |
78 | { |
79 | typedef ::OrgKdeKSSLDInterface KSSLDInterface; |
80 | } |
81 | } |
82 | |
83 | #endif // KSSLDINTERFACE_H |
84 | |