2
* This file is part of the Polkit-qt project
3
* Copyright (C) 2009 Jaroslav Reznik <jreznik@redhat.com>
5
* This library is free software; you can redistribute it and/or
6
* modify it under the terms of the GNU Library General Public
7
* License as published by the Free Software Foundation; either
8
* version 2 of the License, or (at your option) any later version.
10
* This library is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
* Library General Public License for more details.
15
* You should have received a copy of the GNU Library General Public License
16
* along with this library; see the file COPYING.LIB. If not, write to
17
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18
* Boston, MA 02110-1301, USA.
21
#ifndef POLKIT_QT_AGENT_KDE_LISTENER_H
22
#define POLKIT_QT_AGENT_KDE_LISTENER_H
24
#include <QtCore/QObject>
25
#include <QtCore/QString>
27
#include "agent/listener.h"
28
#include "core/identity.h"
29
#include "core/details.h"
30
#include "agent/session.h"
32
class KListener : public PolkitQtAgent::Listener
35
Q_DISABLE_COPY(KListener)
37
KListener(QObject *parent = 0);
40
void initiateAuthentication(const QString &actionId,
41
const QString &message,
42
const QString &iconName,
43
PolkitQt::Details *details,
44
const QString &cookie,
45
QList<PolkitQt::Identity *> identities,
46
PolkitQtAgent::AsyncResult *result);
47
bool initiateAuthenticationFinish();
48
void cancelAuthentication();
50
void request(const QString &request, bool echo);
51
void completed(bool gainedAuthorization);
52
void showError(const QString &text);
53
void showInfo(const QString &text);