KAuth

Polkit1Backend.h
1/*
2 SPDX-FileCopyrightText: 2008 Nicola Gigante <nicola.gigante@gmail.com>
3 SPDX-FileCopyrightText: 2009 Radek Novacek <rnovacek@redhat.com>
4 SPDX-FileCopyrightText: 2009-2010 Dario Freddi <drf@kde.org>
5 SPDX-FileCopyrightText: 2023 Kai Uwe Broulik <kde@broulik.de>
6
7 SPDX-License-Identifier: LGPL-2.1-or-later
8*/
9
10#ifndef POLKIT1BACKEND_H
11#define POLKIT1BACKEND_H
12
13#include "AuthBackend.h"
14
15#include <QEventLoop>
16#include <QHash>
17#include <QStringList>
18
19#include <PolkitQt1/Authority>
20
21#include <memory>
22
23class QByteArray;
24
25namespace KAuth
26{
27class Polkit1Backend : public AuthBackend
28{
30 Q_PLUGIN_METADATA(IID "org.kde.Polkit1Backend")
31 Q_INTERFACES(KAuth::AuthBackend)
32
33public:
34 Polkit1Backend();
35 ~Polkit1Backend() override;
36 void setupAction(const QString &) override;
37 void preAuthAction(const QString &action, QWindow *parent) override;
38 Action::AuthStatus authorizeAction(const QString &) override;
39 Action::AuthStatus actionStatus(const QString &) override;
40 QByteArray callerID() const override;
41 bool isCallerAuthorized(const QString &action, const QByteArray &callerID, const QVariantMap &details) override;
42 QVariantMap backendDetails(const DetailsMap &details) override;
43
44private Q_SLOTS:
45 void checkForResultChanged();
46
47private:
48 void sendWindowHandle(const QString &action, const QString &handle);
49 void sendActivationToken(const QString &action, QWindow *window);
50
52};
53
54} // namespace Auth
55
56#endif
AuthStatus
The three values set by authorization methods.
Definition action.h:84
Q_INTERFACES(...)
Q_OBJECTQ_OBJECT
Q_SLOTSQ_SLOTS
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:07:57 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.