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

libkleo

  • sources
  • kde-4.14
  • kdepim
  • libkleo
  • kleo
cryptoconfig.h
Go to the documentation of this file.
1 /*
2  cryptoconfig.h
3 
4  This file is part of libkleopatra, the KDE keymanagement library
5  Copyright (c) 2004 Klarälvdalens Datakonsult AB
6 
7  Libkleopatra is free software; you can redistribute it and/or
8  modify it under the terms of the GNU General Public License as
9  published by the Free Software Foundation; either version 2 of the
10  License, or (at your option) any later version.
11 
12  Libkleopatra is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program; if not, write to the Free Software
19  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 
21  In addition, as a special exception, the copyright holders give
22  permission to link the code of this program with any edition of
23  the Qt library by Trolltech AS, Norway (or with modified versions
24  of Qt that use the same license as Qt), and distribute linked
25  combinations including the two. You must obey the GNU General
26  Public License in all respects for all of the code used other than
27  Qt. If you modify this file, you may extend this exception to
28  your version of the file, but you are not obligated to do so. If
29  you do not wish to do so, delete this exception statement from
30  your version.
31 */
32 
33 #ifndef CRYPTOCONFIG_H
34 #define CRYPTOCONFIG_H
35 
36 #ifdef __cplusplus
37 /* we read this file from a C compiler, and are only interested in the
38  * enums... */
39 
40 #include <kurl.h>
41 
42 #include <vector>
43 
44 /* Start reading this file from the bottom up :) */
45 
46 namespace Kleo {
47 
51  class CryptoConfigEntry {
52 
53  public:
54 #endif /* __cplusplus */
55 
60  enum Level { Level_Basic = 0,
61  Level_Advanced = 1,
62  Level_Expert = 2 };
63 
81  enum ArgType { ArgType_None = 0,
82  ArgType_String = 1,
83  ArgType_Int = 2,
84  ArgType_UInt = 3,
85  ArgType_Path = 4,
86  ArgType_URL = 5,
87  ArgType_LDAPURL = 6,
88  ArgType_DirPath = 7,
89 
90  NumArgType
91  };
92 
93 #ifdef __cplusplus
94  virtual ~CryptoConfigEntry() {}
95 
99  virtual QString name() const = 0;
100 
104  virtual QString description() const = 0;
105 
109  virtual QString path() const = 0;
110 
114  virtual bool isOptional() const = 0;
115 
119  virtual bool isReadOnly() const = 0;
120 
124  virtual bool isList() const = 0;
125 
129  virtual bool isRuntime() const = 0;
130 
134  virtual Level level() const = 0;
135 
139  virtual ArgType argType() const = 0;
140 
144  virtual bool isSet() const = 0;
145 
149  virtual bool boolValue() const = 0;
150 
155  virtual QString stringValue() const = 0;
156 
160  virtual int intValue() const = 0;
161 
165  virtual unsigned int uintValue() const = 0;
166 
170  virtual KUrl urlValue() const = 0;
171 
175  virtual unsigned int numberOfTimesSet() const = 0;
176 
180  virtual QStringList stringValueList() const = 0;
181 
185  virtual std::vector<int> intValueList() const = 0;
186 
190  virtual std::vector<unsigned int> uintValueList() const = 0;
191 
195  virtual KUrl::List urlValueList() const = 0;
196 
200  virtual void resetToDefault() = 0;
201 
206  virtual void setBoolValue( bool ) = 0;
207 
211  virtual void setStringValue( const QString& ) = 0;
212 
216  virtual void setIntValue( int ) = 0;
217 
221  virtual void setUIntValue( unsigned int ) = 0;
222 
226  virtual void setURLValue( const KUrl& ) = 0;
227 
231  virtual void setNumberOfTimesSet( unsigned int ) = 0;
232 
236  virtual void setStringValueList( const QStringList& ) = 0;
237 
241  virtual void setIntValueList( const std::vector<int>& ) = 0;
242 
246  virtual void setUIntValueList( const std::vector<unsigned int>& ) = 0;
247 
251  virtual void setURLValueList( const KUrl::List& ) = 0;
252 
256  virtual bool isDirty() const = 0;
257  };
258 
262  class CryptoConfigGroup {
263 
264  public:
265  virtual ~CryptoConfigGroup() {}
266 
270  virtual QString name() const = 0;
271 
275  virtual QString iconName() const = 0;
276 
280  virtual QString description() const = 0;
281 
285  virtual QString path() const = 0;
286 
290  virtual CryptoConfigEntry::Level level() const = 0;
291 
297  virtual QStringList entryList() const = 0;
298 
304  virtual CryptoConfigEntry* entry( const QString& name ) const = 0;
305  };
306 
310  class CryptoConfigComponent {
311 
312  public:
313  virtual ~CryptoConfigComponent() {}
314 
318  virtual QString name() const = 0;
319 
323  virtual QString iconName() const = 0;
324 
328  virtual QString description() const = 0;
329 
336  virtual QStringList groupList() const = 0;
337 
342  virtual CryptoConfigGroup* group( const QString& name ) const = 0;
343 
344  };
345 
349  class CryptoConfig {
350 
351  public:
352  virtual ~CryptoConfig() {}
353 
359  virtual QStringList componentList() const = 0;
360 
365  virtual CryptoConfigComponent* component( const QString& name ) const = 0;
366 
375  CryptoConfigEntry* entry( const QString& componentName, const QString& groupName, const QString& entryName ) const {
376  const Kleo::CryptoConfigComponent* comp = component( componentName );
377  const Kleo::CryptoConfigGroup* group = comp ? comp->group( groupName ) : 0;
378  return group ? group->entry( entryName ) : 0;
379  }
380 
388  virtual void sync( bool runtime ) = 0;
389 
397  virtual void clear() = 0;
398  };
399 
400 }
401 #endif /* __cplusplus */
402 #endif /* CRYPTOCONFIG_H */
ArgType_LDAPURL
Definition: cryptoconfig.h:87
name
const char * name
Definition: kconfigbasedkeyfilter.cpp:126
ArgType_DirPath
Definition: cryptoconfig.h:88
NumArgType
Definition: cryptoconfig.h:90
ArgType_String
Definition: cryptoconfig.h:82
Level_Basic
Definition: cryptoconfig.h:60
Level_Advanced
Definition: cryptoconfig.h:61
ArgType_Path
Definition: cryptoconfig.h:85
Level
Level
Definition: cryptoconfig.h:60
QString
QStringList
ArgType
ArgType
Type of the argument.
Definition: cryptoconfig.h:81
ArgType_UInt
Definition: cryptoconfig.h:84
ArgType_URL
Definition: cryptoconfig.h:86
ArgType_None
Definition: cryptoconfig.h:81
ArgType_Int
Definition: cryptoconfig.h:83
Level_Expert
Definition: cryptoconfig.h:62
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:33:38 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

libkleo

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

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer
  • pimprint

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