KDECore
kssld_interface.h
Go to the documentation of this file.
00001 /* 00002 This file is part of the KDE libraries 00003 00004 Copyright (C) 2007 Andreas Hartmetz <ahartmetz@gmail.com> 00005 00006 This library is free software; you can redistribute it and/or 00007 modify it under the terms of the GNU Library General Public 00008 License as published by the Free Software Foundation; either 00009 version 2 of the License, or (at your option) any later version. 00010 00011 This library is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 Library General Public License for more details. 00015 00016 You should have received a copy of the GNU Library General Public License 00017 along with this library; see the file COPYING.LIB. If not, write to 00018 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00019 Boston, MA 02110-1301, USA. 00020 */ 00021 00022 #ifndef KSSLDINTERFACE_H 00023 #define KSSLDINTERFACE_H 00024 00025 #include <QtCore/QObject> 00026 #include <QtCore/QByteArray> 00027 #include <QtCore/QList> 00028 #include <QtCore/QString> 00029 #include <QtCore/QVariant> 00030 #include <QtDBus/QtDBus> 00031 00032 #include "kssld_dbusmetatypes.h" 00033 00034 00035 /* 00036 * Proxy class for interface org.kde.KSSLD 00037 */ 00038 class OrgKdeKSSLDInterface: public QDBusAbstractInterface 00039 { 00040 Q_OBJECT 00041 public: 00042 static inline const char *staticInterfaceName() 00043 { 00044 return "org.kde.KSSLD"; 00045 } 00046 00047 public: 00048 OrgKdeKSSLDInterface(const QString &service, const QString &path, 00049 const QDBusConnection &connection, 00050 QObject *parent = 0) 00051 : QDBusAbstractInterface(service, path, staticInterfaceName(), connection, parent) 00052 { 00053 registerMetaTypesForKSSLD(); 00054 } 00055 00056 ~OrgKdeKSSLDInterface() {} 00057 00058 public Q_SLOTS: // METHODS 00059 Q_NOREPLY void setRule(const KSslCertificateRule &rule) 00060 { 00061 QList<QVariant> argumentList; 00062 argumentList << qVariantFromValue(rule); 00063 callWithArgumentList(QDBus::Block, QLatin1String("setRule"), 00064 argumentList); 00065 } 00066 00067 Q_NOREPLY void clearRule(const KSslCertificateRule &rule) 00068 { 00069 QList<QVariant> argumentList; 00070 argumentList << qVariantFromValue(rule); 00071 callWithArgumentList(QDBus::Block, QLatin1String("clearRule__rule"), 00072 argumentList); 00073 } 00074 00075 Q_NOREPLY void clearRule(const QSslCertificate &cert, const QString &hostName) 00076 { 00077 QList<QVariant> argumentList; 00078 argumentList << qVariantFromValue(cert) << qVariantFromValue(hostName); 00079 callWithArgumentList(QDBus::Block, QLatin1String("clearRule__certHost"), 00080 argumentList); 00081 } 00082 00083 QDBusReply<KSslCertificateRule> rule(const QSslCertificate &cert, const QString &hostName) 00084 { 00085 QList<QVariant> argumentList; 00086 argumentList << qVariantFromValue(cert) << qVariantFromValue(hostName); 00087 return callWithArgumentList(QDBus::Block, QLatin1String("rule"), 00088 argumentList); 00089 } 00090 }; 00091 00092 namespace org { 00093 namespace kde { 00094 typedef ::OrgKdeKSSLDInterface KSSLDInterface; 00095 } 00096 } 00097 00098 00099 #endif //KSSLDINTERFACE_H
KDE 4.6 API Reference