• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

KDECore

  • sources
  • kde-4.14
  • kdelibs
  • kdecore
  • auth
  • backends
  • policykit
PolicyKitBackend.h
Go to the documentation of this file.
1 /*
2 * Copyright (C) 2008 Nicola Gigante <nicola.gigante@gmail.com>
3 * Copyright (C) 2009 Dario Freddi <drf@kde.org>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU Lesser General Public License as published by
7 * the Free Software Foundation; either version 2.1 of the License, or
8 * (at your option) any later version.
9 *
10 * This program 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
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public License
16 * along with this program; if not, write to the
17 * Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA .
19 */
20 
21 #ifndef POLICYKIT_BACKEND_H
22 #define POLICYKIT_BACKEND_H
23 
24 #include "AuthBackend.h"
25 #include <QHash>
26 
27 class QByteArray;
28 
29 namespace KAuth
30 {
31 
32 class PolicyKitBackend : public AuthBackend
33 {
34  Q_OBJECT
35  Q_INTERFACES(KAuth::AuthBackend)
36 
37 public:
38  PolicyKitBackend();
39  virtual void setupAction(const QString&);
40  virtual Action::AuthStatus authorizeAction(const QString&);
41  virtual Action::AuthStatus actionStatus(const QString&);
42  virtual QByteArray callerID() const;
43  virtual ExtraCallerIDVerificationMethod extraCallerIDVerificationMethod() const;
44  virtual bool isCallerAuthorized(const QString &action, QByteArray callerID);
45 
46 private Q_SLOTS:
47  void checkForResultChanged();
48 
49 private:
50  QHash<QString, Action::AuthStatus> m_cachedResults;
51 };
52 
53 } // namespace Auth
54 
55 #endif
KAuth::PolicyKitBackend::isCallerAuthorized
virtual bool isCallerAuthorized(const QString &action, QByteArray callerID)
Definition: PolicyKitBackend.cpp:86
QByteArray
KAuth::PolicyKitBackend::authorizeAction
virtual Action::AuthStatus authorizeAction(const QString &)
Definition: PolicyKitBackend.cpp:37
KAuth::PolicyKitBackend::actionStatus
virtual Action::AuthStatus actionStatus(const QString &)
Definition: PolicyKitBackend.cpp:57
AuthBackend.h
KAuth::PolicyKitBackend::setupAction
virtual void setupAction(const QString &)
Definition: PolicyKitBackend.cpp:47
QHash
Definition: ksycocafactory.h:28
KAuth::AuthBackend::ExtraCallerIDVerificationMethod
ExtraCallerIDVerificationMethod
Definition: AuthBackend.h:46
QString
KAuth::Action::AuthStatus
AuthStatus
The three values returned by authorization methods.
Definition: kauthaction.h:78
KAuth::PolicyKitBackend::PolicyKitBackend
PolicyKitBackend()
Definition: PolicyKitBackend.cpp:31
KAuth::PolicyKitBackend
Definition: PolicyKitBackend.h:32
KAuth::PolicyKitBackend::callerID
virtual QByteArray callerID() const
Definition: PolicyKitBackend.cpp:72
KAuth::AuthBackend
Definition: AuthBackend.h:31
KAuth::PolicyKitBackend::extraCallerIDVerificationMethod
virtual ExtraCallerIDVerificationMethod extraCallerIDVerificationMethod() const
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:22:12 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDECore

Skip menu "KDECore"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal