2 * KFontInst - KDE Font Installer
4 * Copyright 2003-2008 Craig Drummond <craig@kde.org>
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; see the file COPYING. If not, write to
20 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 * Boston, MA 02110-1301, USA.
24 #ifndef __POLICYKIT_AUTHENTICATOR_H__
25 #define __POLICYKIT_AUTHENTICATOR_H__
27 #include <QtCore/QObject>
32 class PolicyKitAuthenticatorPrivate
;
34 class PolicyKitAuthenticator
: public QObject
40 static PolicyKitAuthenticator
* instance();
42 PolicyKitAuthenticator();
43 virtual ~PolicyKitAuthenticator();
45 bool authenticate(const QString
&action
, QWidget
*widet
, bool gui
);
46 bool authenticate(const QString
&action
, uint winId
, uint pid
, bool gui
);
54 void reply(const QDBusMessage
&msg
);
55 void error(const QDBusError
&er
, const QDBusMessage
&msg
);
59 bool isAuthenticated(const QDBusMessage
&msg
);
61 PolicyKitAuthenticator(const PolicyKitAuthenticator
&o
);
65 PolicyKitAuthenticatorPrivate
* const d_ptr
;
66 Q_DECLARE_PRIVATE(PolicyKitAuthenticator
)