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 KSSLD_ADAPTOR_H
9#define KSSLD_ADAPTOR_H
10
11#include <QDBusAbstractAdaptor>
12#include <QDBusArgument>
13#include <QDBusInterface>
14#include <QDBusMetaType>
15
16#include "kssld_dbusmetatypes.h"
17
18class KSSLDAdaptor : public QDBusAbstractAdaptor
19{
20 Q_OBJECT
21 Q_CLASSINFO("D-Bus Interface", "org.kde.KSSLD")
22
23public:
24 explicit KSSLDAdaptor(KSSLD *parent)
25 : QDBusAbstractAdaptor(parent)
26 {
27 Q_ASSERT(parent);
28 registerMetaTypesForKSSLD();
29 }
30
31private:
32 inline KSSLD *p()
33 {
34 return static_cast<KSSLD *>(parent());
35 }
36
37public Q_SLOTS:
38 inline Q_NOREPLY void setRule(const KSslCertificateRule &rule)
39 {
40 p()->setRule(rule);
41 }
42
43 inline Q_NOREPLY void clearRule__rule(const KSslCertificateRule &rule)
44 {
45 p()->clearRule(rule);
46 }
47
48 inline Q_NOREPLY void clearRule__certHost(const QSslCertificate &cert, const QString &hostName)
49 {
50 p()->clearRule(cert, hostName);
51 }
52
53 inline KSslCertificateRule rule(const QSslCertificate &cert, const QString &hostName)
54 {
55 return p()->rule(cert, hostName);
56 }
57};
58
59#endif // KSSLD_ADAPTOR_H
60

source code of kio/src/kssld/kssld_adaptor.h