• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdepim
  • Sitemap
  • Contact Us
 

libkleo

cryptoconfig.h

Go to the documentation of this file.
00001 /*
00002     cryptoconfig.h
00003 
00004     This file is part of libkleopatra, the KDE keymanagement library
00005     Copyright (c) 2004 Klarälvdalens Datakonsult AB
00006 
00007     Libkleopatra is free software; you can redistribute it and/or
00008     modify it under the terms of the GNU General Public License as
00009     published by the Free Software Foundation; either version 2 of the
00010     License, or (at your option) any later version.
00011 
00012     Libkleopatra is distributed in the hope that it will be useful,
00013     but WITHOUT ANY WARRANTY; without even the implied warranty of
00014     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015     General Public License for more details.
00016 
00017     You should have received a copy of the GNU General Public License
00018     along with this program; if not, write to the Free Software
00019     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
00020 
00021     In addition, as a special exception, the copyright holders give
00022     permission to link the code of this program with any edition of
00023     the Qt library by Trolltech AS, Norway (or with modified versions
00024     of Qt that use the same license as Qt), and distribute linked
00025     combinations including the two.  You must obey the GNU General
00026     Public License in all respects for all of the code used other than
00027     Qt.  If you modify this file, you may extend this exception to
00028     your version of the file, but you are not obligated to do so.  If
00029     you do not wish to do so, delete this exception statement from
00030     your version.
00031 */
00032 
00033 #ifndef CRYPTOCONFIG_H
00034 #define CRYPTOCONFIG_H
00035 
00036 #ifdef __cplusplus
00037 /* we read this file from a C compiler, and are only interested in the
00038  * enums... */
00039 
00040 #include <kurl.h>
00041 
00042 /* Start reading this file from the bottom up :) */
00043 
00044 namespace Kleo {
00045 
00049   class CryptoConfigEntry {
00050 
00051   public:
00052 #endif /* __cplusplus */
00053 
00058     enum Level { Level_Basic = 0,
00059                  Level_Advanced = 1,
00060                  Level_Expert = 2 };
00061 
00079     enum ArgType { ArgType_None = 0,
00080                    ArgType_String = 1,
00081                    ArgType_Int = 2,
00082                    ArgType_UInt = 3,
00083                    ArgType_Path = 4,
00084                    ArgType_URL = 5,
00085                    ArgType_LDAPURL = 6,
00086                    ArgType_DirPath = 7,
00087 
00088                    NumArgType
00089     };
00090 
00091 #ifdef __cplusplus
00092     virtual ~CryptoConfigEntry() {}
00093 
00097     virtual QString name() const = 0;
00098 
00102     virtual QString description() const = 0;
00103 
00107     virtual QString path() const = 0;
00108 
00112     virtual bool isOptional() const = 0;
00113 
00117     virtual bool isReadOnly() const = 0;
00118 
00122     virtual bool isList() const = 0;
00123 
00127     virtual bool isRuntime() const = 0;
00128 
00132     virtual Level level() const = 0;
00133 
00137     virtual ArgType argType() const = 0;
00138 
00142     virtual bool isSet() const = 0;
00143 
00147     virtual bool boolValue() const = 0;
00148 
00153     virtual QString stringValue() const = 0;
00154 
00158     virtual int intValue() const = 0;
00159 
00163     virtual unsigned int uintValue() const = 0;
00164 
00168     virtual KUrl urlValue() const = 0;
00169 
00173     virtual unsigned int numberOfTimesSet() const = 0;
00174 
00178     virtual QStringList stringValueList() const = 0;
00179 
00183     virtual QList<int> intValueList() const = 0;
00184 
00188     virtual QList<unsigned int> uintValueList() const = 0;
00189 
00193     virtual KUrl::List urlValueList() const = 0;
00194 
00198     virtual void resetToDefault() = 0;
00199 
00204     virtual void setBoolValue( bool ) = 0;
00205 
00209     virtual void setStringValue( const QString& ) = 0;
00210 
00214     virtual void setIntValue( int ) = 0;
00215 
00219     virtual void setUIntValue( unsigned int ) = 0;
00220 
00224     virtual void setURLValue( const KUrl& ) = 0;
00225 
00229     virtual void setNumberOfTimesSet( unsigned int ) = 0;
00230 
00234     virtual void setStringValueList( const QStringList& ) = 0;
00235 
00239     virtual void setIntValueList( const QList<int>& ) = 0;
00240 
00244     virtual void setUIntValueList( const QList<unsigned int>& ) = 0;
00245 
00249     virtual void setURLValueList( const KUrl::List& ) = 0;
00250 
00254     virtual bool isDirty() const = 0;
00255   };
00256 
00260   class CryptoConfigGroup {
00261 
00262   public:
00263     virtual ~CryptoConfigGroup() {}
00264 
00268     virtual QString name() const = 0;
00269 
00273     virtual QString iconName() const = 0;
00274 
00278     virtual QString description() const = 0;
00279 
00283     virtual QString path() const = 0;
00284 
00288     virtual CryptoConfigEntry::Level level() const = 0;
00289 
00295     virtual QStringList entryList() const = 0;
00296 
00302     virtual CryptoConfigEntry* entry( const QString& name ) const = 0;
00303   };
00304 
00308   class CryptoConfigComponent {
00309 
00310   public:
00311     virtual ~CryptoConfigComponent() {}
00312 
00316     virtual QString name() const = 0;
00317 
00321     virtual QString iconName() const = 0;
00322 
00326     virtual QString description() const = 0;
00327 
00334     virtual QStringList groupList() const = 0;
00335 
00340     virtual CryptoConfigGroup* group( const QString& name ) const = 0;
00341 
00342   };
00343 
00347   class CryptoConfig {
00348 
00349   public:
00350     virtual ~CryptoConfig() {}
00351 
00357     virtual QStringList componentList() const = 0;
00358 
00363     virtual CryptoConfigComponent* component( const QString& name ) const = 0;
00364 
00373     CryptoConfigEntry* entry( const QString& componentName, const QString& groupName, const QString& entryName ) const {
00374       const Kleo::CryptoConfigComponent* comp = component( componentName );
00375       const Kleo::CryptoConfigGroup* group = comp ? comp->group( groupName ) : 0;
00376       return group ? group->entry( entryName ) : 0;
00377     }
00378 
00386     virtual void sync( bool runtime ) = 0;
00387 
00395     virtual void clear() = 0;
00396   };
00397 
00398 }
00399 #endif /* __cplusplus */
00400 #endif /* CRYPTOCONFIG_H */

libkleo

Skip menu "libkleo"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members

kdepim

Skip menu "kdepim"
  • akonadi
  •   clients
  •   kabc
  •   kcal
  •   kcm
  • akregator
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt
  • kdgantt1
  • kjots
  • kleopatra
  • kmail
  • kmobiletools
  • knode
  • knotes
  • kontact
  • kontactinterfaces
  • korganizer
  •   korgac
  • kpilot
  • ktimetracker
  •   doc
  • libkdepim
  • libkholidays
  • libkleo
  • libkpgp
  • maildir
Generated for kdepim by doxygen 1.5.4
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