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

Plasma

authorizationrule.h

Go to the documentation of this file.
00001 /*
00002  * Copyright 2009 by Rob Scheepmaker <r.scheepmaker@student.utwente.nl>
00003  *
00004  * This library is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU Lesser General Public
00006  * License as published by the Free Software Foundation; either
00007  * version 2.1 of the License, or (at your option) any later version.
00008  *
00009  * This library is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012  * Lesser General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU Lesser General Public
00015  * License along with this library; if not, write to the Free Software
00016  * Foundation, Inc., 51 Franklin St, Fifth Floor,
00017  * Boston, MA  02110-1301  USA
00018  */
00019 
00020 #ifndef PLASMA_AUTHORIZATIONRULE_H
00021 #define PLASMA_AUTHORIZATIONRULE_H
00022 
00023 #include "plasma_export.h"
00024 
00025 #include <QtCore/QObject>
00026 
00027 class QString;
00028 class KUrl;
00029 
00030 namespace QCA
00031 {
00032     class PublicKey;
00033 }
00034 
00035 namespace Plasma
00036 {
00037 
00038 class AuthorizationManager;
00039 class AuthorizationRulePrivate;
00040 class Credentials;
00041 
00067 class PLASMA_EXPORT AuthorizationRule : public QObject
00068 {
00069     Q_OBJECT
00070     public:
00071         ~AuthorizationRule();
00072 
00073         enum Policy {
00074             Deny = 0,           
00075             Allow = 1,          
00076             PinRequired = 2     
00077         };
00078 
00079         enum Persistence {
00080             Transient = 0,      
00081             Persistent = 1      
00082         };
00083 
00084         enum Target {
00085             Default = 0,
00086             AllUsers = 1,       
00087             AllServices = 2     
00088         };
00089         Q_DECLARE_FLAGS(Targets, Target)
00090 
00091         
00095         QString description() const;
00096 
00100         void setPolicy(Policy policy);
00101 
00105         Policy policy();
00106 
00110         void setPersistence(Persistence persistence);
00111 
00115         Persistence persistence();
00116 
00120         void setTargets(Targets targets);
00121 
00125         Targets targets();
00126 
00130         void setPin(const QString &pin);
00131 
00135         QString pin() const;
00136 
00140         Credentials credentials() const;
00141 
00145         QString serviceName() const;
00146 
00147     Q_SIGNALS:
00148         void changed(Plasma::AuthorizationRule *);
00149 
00150     private:
00151         AuthorizationRule();
00152         AuthorizationRule(const QString &serviceName, const QString &identityID);
00153 
00154         AuthorizationRulePrivate * const d;
00155 
00156         Q_PRIVATE_SLOT(d, void fireChangedSignal())
00157 
00158         friend class AppletPrivate;
00159         friend class AuthorizationManager;
00160         friend class AuthorizationManagerPrivate;
00161         friend class AuthorizationRulePrivate;
00162         friend class GetSource;
00163         friend class PlasmoidServiceJob;
00164         friend class ServiceProvider;
00165 };
00166 } // Plasma namespace
00167 
00168 Q_DECLARE_OPERATORS_FOR_FLAGS(Plasma::AuthorizationRule::Targets)
00169 
00170 #endif
00171 

Plasma

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

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • 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
Generated for kdelibs by doxygen 1.7.3
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal