File indexing completed on 2025-02-16 06:48:02
0001 /* 0002 SPDX-FileCopyrightText: 2008 Nicola Gigante <nicola.gigante@gmail.com> 0003 0004 SPDX-License-Identifier: LGPL-2.1-or-later 0005 */ 0006 0007 #ifndef FAKE_BACKEND_H 0008 #define FAKE_BACKEND_H 0009 0010 #include "AuthBackend.h" 0011 #include <QHash> 0012 0013 class QByteArray; 0014 0015 namespace KAuth 0016 { 0017 class FakeBackend : public AuthBackend 0018 { 0019 Q_OBJECT 0020 Q_INTERFACES(KAuth::AuthBackend) 0021 0022 public: 0023 FakeBackend(); 0024 void setupAction(const QString &) override; 0025 Action::AuthStatus authorizeAction(const QString &) override; 0026 Action::AuthStatus actionStatus(const QString &) override; 0027 QByteArray callerID() const override; 0028 bool isCallerAuthorized(const QString &action, const QByteArray &callerID, const QVariantMap &details) override; 0029 }; 0030 0031 } // namespace Auth 0032 0033 #endif