KAuth

HelperProxy.h
1/*
2 SPDX-FileCopyrightText: 2008 Nicola Gigante <nicola.gigante@gmail.com>
3 SPDX-FileCopyrightText: 2020 Harald Sitter <sitter@kde.org>
4
5 SPDX-License-Identifier: LGPL-2.1-or-later
6*/
7
8#ifndef KAUTH_HELPER_PROXY_H
9#define KAUTH_HELPER_PROXY_H
10
11#include <QMap>
12#include <QObject>
13#include <QString>
14#include <QVariant>
15
16#include "action.h"
17#include "actionreply.h"
18
19namespace KAuth
20{
21typedef Action::DetailsMap DetailsMap;
22
23class HelperProxy : public QObject
24{
26
27public:
28 ~HelperProxy() override;
29
30 // Application-side methods
31 virtual void executeAction(const QString &action, const QString &helperID, const DetailsMap &details, const QVariantMap &arguments, int timeout) = 0;
32 virtual void stopAction(const QString &action, const QString &helperID) = 0;
33
34 // Helper-side methods
35 virtual bool initHelper(const QString &name) = 0;
36 virtual void setHelperResponder(QObject *o) = 0;
37 virtual bool hasToStopAction() = 0;
38 virtual void sendDebugMessage(int level, const char *msg) = 0;
39 virtual void sendProgressStep(int step) = 0;
40 virtual void sendProgressStepData(const QVariantMap &step) = 0;
41 // Attempts to resolve the UID of the unprivileged remote process.
42 virtual int callerUid() const = 0;
43
45 void actionStarted(const QString &action);
46 void actionPerformed(const QString &action, const KAuth::ActionReply &reply);
47 void progressStep(const QString &action, int progress);
48 void progressStepData(const QString &action, const QVariantMap &data);
49};
50
51} // namespace KAuth
52
53Q_DECLARE_INTERFACE(KAuth::HelperProxy, "org.kde.kf6auth.HelperProxy/0.1")
54
55#endif
Class that encapsulates a reply coming from the helper after executing an action.
QMap< AuthDetail, QVariant > DetailsMap
Map of details.
Definition action.h:112
Q_OBJECTQ_OBJECT
Q_SIGNALSQ_SIGNALS
T qobject_cast(QObject *object)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:13:10 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.