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

KDECore

  • sources
  • kde-4.12
  • kdelibs
  • kdecore
  • auth
AuthBackend.h
Go to the documentation of this file.
1 /*
2 * Copyright (C) 2008 Nicola Gigante <nicola.gigante@gmail.com>
3 * Copyright (C) 2009-2010 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 AUTH_BACKEND_H
22 #define AUTH_BACKEND_H
23 
24 #include <QObject>
25 
26 #include "kauthaction.h"
27 
28 namespace KAuth
29 {
30 
31 class AuthBackend : public QObject
32 {
33  Q_OBJECT
34  Q_DISABLE_COPY(AuthBackend)
35 
36 public:
37  enum Capability {
38  NoCapability = 0,
39  AuthorizeFromClientCapability = 1,
40  AuthorizeFromHelperCapability = 2,
41  CheckActionExistenceCapability = 4,
42  PreAuthActionCapability = 8
43  };
44  Q_DECLARE_FLAGS(Capabilities, Capability)
45 
46  AuthBackend();
47  virtual ~AuthBackend();
48  virtual void setupAction(const QString &action) = 0;
49  virtual void preAuthAction(const QString &action, QWidget *parent);
50  virtual Action::AuthStatus authorizeAction(const QString &action) = 0;
51  virtual Action::AuthStatus actionStatus(const QString &action) = 0;
52  virtual QByteArray callerID() const = 0;
53  virtual bool isCallerAuthorized(const QString &action, QByteArray callerID) = 0;
54  virtual bool actionExists(const QString &action);
55 
56  Capabilities capabilities() const;
57 
58 protected:
59  void setCapabilities(Capabilities capabilities);
60 
61 Q_SIGNALS:
62  void actionStatusChanged(const QString &action, Action::AuthStatus status);
63 
64 private:
65  class Private;
66  Private * const d;
67 };
68 
69 } // namespace Auth
70 
71 Q_DECLARE_INTERFACE(KAuth::AuthBackend, "org.kde.auth.AuthBackend/0.1")
72 Q_DECLARE_OPERATORS_FOR_FLAGS(KAuth::AuthBackend::Capabilities)
73 
74 #endif
KAuth::AuthBackend::setupAction
virtual void setupAction(const QString &action)=0
KAuth::AuthBackend::CheckActionExistenceCapability
Definition: AuthBackend.h:41
KAuth::AuthBackend::isCallerAuthorized
virtual bool isCallerAuthorized(const QString &action, QByteArray callerID)=0
KAuth::AuthBackend::NoCapability
Definition: AuthBackend.h:38
KAuth::AuthBackend::AuthorizeFromClientCapability
Definition: AuthBackend.h:39
KAuth::AuthBackend::authorizeAction
virtual Action::AuthStatus authorizeAction(const QString &action)=0
KAuth::AuthBackend::actionStatusChanged
void actionStatusChanged(const QString &action, Action::AuthStatus status)
KAuth::AuthBackend::preAuthAction
virtual void preAuthAction(const QString &action, QWidget *parent)
Definition: AuthBackend.cpp:63
QString
QObject
KAuth::AuthBackend::AuthorizeFromHelperCapability
Definition: AuthBackend.h:40
KAuth::AuthBackend::Capability
Capability
Definition: AuthBackend.h:37
kauthaction.h
KAuth::AuthBackend::callerID
virtual QByteArray callerID() const =0
KAuth::AuthBackend::PreAuthActionCapability
Definition: AuthBackend.h:42
KAuth::AuthBackend::actionExists
virtual bool actionExists(const QString &action)
Definition: AuthBackend.cpp:57
KAuth::AuthBackend::setCapabilities
void setCapabilities(Capabilities capabilities)
Definition: AuthBackend.cpp:52
KAuth::AuthBackend
Definition: AuthBackend.h:31
KAuth::AuthBackend::actionStatus
virtual Action::AuthStatus actionStatus(const QString &action)=0
KAuth::Action
Class to access, authorize and execute actions.
Definition: kauthaction.h:69
KAuth::AuthBackend::capabilities
Capabilities capabilities() const
Definition: AuthBackend.cpp:47
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:47:07 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
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • 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