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

KDECore

  • 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
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Sat Jun 1 2013 20:17:58 by doxygen 1.8.3.1 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-4.10.4 API Reference

Skip menu "kdelibs-4.10.4 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
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