KAuth 5.109.0
helpersupport.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_SUPPORT_H
9#define KAUTH_HELPER_SUPPORT_H
10
11#include <QObject>
12#include <QVariant>
13
14#include "kauthcore_export.h"
15
25#define KAUTH_HELPER_MAIN(ID, HelperClass) \
26 int main(int argc, char **argv) \
27 { \
28 return KAuth::HelperSupport::helperMain(argc, argv, ID, new HelperClass()); \
29 }
30
31namespace KAuth
32{
44namespace HelperSupport
45{
58KAUTHCORE_EXPORT void progressStep(int step);
59
72KAUTHCORE_EXPORT void progressStep(const QVariantMap &data);
73
88KAUTHCORE_EXPORT bool isStopped();
89
103KAUTHCORE_EXPORT int helperMain(int argc, char **argv, const char *id, QObject *responder);
104
116KAUTHCORE_EXPORT int callerUid();
117} // namespace HelperSupport
118
119} // namespace Auth
120
121#endif
void progressStep(int step)
Send a progressStep signal to the caller application.
bool isStopped()
Check if the caller asked the helper to stop the execution.
int callerUid()
Obtains the caller user id if available.
int helperMain(int argc, char **argv, const char *id, QObject *responder)
Method that implements the main function of the helper tool.
Definition action.h:24