File indexing completed on 2024-04-28 04:43:32
0001 /* 0002 This file is part of the Polkit-qt project 0003 SPDX-FileCopyrightText: 2009 Jaroslav Reznik <jreznik@redhat.com> 0004 0005 SPDX-License-Identifier: LGPL-2.0-or-later 0006 */ 0007 0008 #ifndef POLKIT_QT_AGENT_KDE_LISTENER_H 0009 #define POLKIT_QT_AGENT_KDE_LISTENER_H 0010 0011 #include <QObject> 0012 #include <QString> 0013 0014 #include <polkitqt1-agent-listener.h> 0015 #include <polkitqt1-identity.h> 0016 #include <polkitqt1-details.h> 0017 #include <polkitqt1-agent-session.h> 0018 0019 class KListener : public PolkitQt1::Agent::Listener 0020 { 0021 Q_OBJECT 0022 Q_DISABLE_COPY(KListener) 0023 public: 0024 KListener(QObject *parent = nullptr); 0025 ~KListener() override {}; 0026 public Q_SLOTS: 0027 void initiateAuthentication(const QString &actionId, 0028 const QString &message, 0029 const QString &iconName, 0030 const PolkitQt1::Details &details, 0031 const QString &cookie, 0032 const PolkitQt1::Identity::List &identities, 0033 PolkitQt1::Agent::AsyncResult *result) override; 0034 bool initiateAuthenticationFinish() override; 0035 void cancelAuthentication() override; 0036 0037 void request(const QString &request, bool echo); 0038 void completed(bool gainedAuthorization); 0039 void showError(const QString &text); 0040 void showInfo(const QString &text); 0041 }; 0042 0043 #endif