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

kleopatra

  • sources
  • kde-4.12
  • kdepim
  • kleopatra
  • utils
formatting.h
Go to the documentation of this file.
1 /* -*- mode: c++; c-basic-offset:4 -*-
2  utils/formatting.h
3 
4  This file is part of Kleopatra, the KDE keymanager
5  Copyright (c) 2007 Klarälvdalens Datakonsult AB
6 
7  Kleopatra is free software; you can redistribute it and/or modify
8  it under the terms of the GNU General Public License as published by
9  the Free Software Foundation; either version 2 of the License, or
10  (at your option) any later version.
11 
12  Kleopatra 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 __KLEOPATRA_UTILS_FORMATTING_H__
34 #define __KLEOPATRA_UTILS_FORMATTING_H__
35 
36 #include <gpgme++/key.h>
37 
38 class QString;
39 class QStringList;
40 class QDate;
41 
42 namespace GpgME {
43  class Import;
44 }
45 
46 namespace Kleo {
47 namespace Formatting {
48 
49  QString prettyNameAndEMail( int proto, const char * id, const char * name, const char * email, const char * comment );
50  QString prettyNameAndEMail( int proto, const QString & id, const QString & name, const QString & email, const QString & comment );
51  QString prettyNameAndEMail( const GpgME::Key & key );
52  QString prettyNameAndEMail( const GpgME::UserID & key );
53 
54  QString prettyUserID( const GpgME::UserID & uid );
55  QString prettyKeyID( const char * id );
56 
57  QString prettyName( int proto, const char * id, const char * name, const char * comment );
58  QString prettyName( const GpgME::Key & key );
59  QString prettyName( const GpgME::UserID & uid );
60  QString prettyName( const GpgME::UserID::Signature & sig );
61 
62  QString prettyEMail( const char * email, const char * id );
63  QString prettyEMail( const GpgME::Key & key );
64  QString prettyEMail( const GpgME::UserID & uid );
65  QString prettyEMail( const GpgME::UserID::Signature & sig );
66 
67  enum ToolTipOption {
68  KeyID = 0x001,
69  Validity = 0x002,
70  StorageLocation = 0x004,
71  SerialNumber = 0x008,
72  Issuer = 0x010,
73  Subject = 0x020,
74  ExpiryDates = 0x040,
75  CertificateType = 0x080,
76  CertificateUsage = 0x100,
77  Fingerprint = 0x200,
78  UserIDs = 0x400,
79  OwnerTrust = 0x800,
80 
81  AllOptions = 0xfff
82  };
83 
84  QString toolTip( const GpgME::Key & key, int opts );
85 
86  QString expirationDateString( const GpgME::Key & key );
87  QString expirationDateString( const GpgME::Subkey & subkey );
88  QString expirationDateString( const GpgME::UserID::Signature & sig );
89  QDate expirationDate( const GpgME::Key & key );
90  QDate expirationDate( const GpgME::Subkey & subkey );
91  QDate expirationDate( const GpgME::UserID::Signature & sig );
92 
93  QString creationDateString( const GpgME::Key & key );
94  QString creationDateString( const GpgME::Subkey & subkey );
95  QString creationDateString( const GpgME::UserID::Signature & sig );
96  QDate creationDate( const GpgME::Key & key );
97  QDate creationDate( const GpgME::Subkey & subkey );
98  QDate creationDate( const GpgME::UserID::Signature & sig );
99 
100  QString displayName( GpgME::Protocol prot );
101  QString type( const GpgME::Key & key );
102  QString type( const GpgME::Subkey & subkey );
103 
104 
105  QString ownerTrustShort( const GpgME::Key & key );
106  QString ownerTrustShort( GpgME::Key::OwnerTrust trust );
107 
108  QString validityShort( const GpgME::Subkey & subkey );
109  QString validityShort( const GpgME::UserID & uid );
110  QString validityShort( const GpgME::UserID::Signature & sig );
111 
112  QString formatForComboBox( const GpgME::Key & key );
113 
114  QString formatKeyLink( const GpgME::Key & key );
115 
116  QString signatureToString( const GpgME::Signature & sig, const GpgME::Key & key );
117 
118  const char * summaryToString( const GpgME::Signature::Summary summary );
119 
120  QString importMetaData( const GpgME::Import & import );
121  QString importMetaData( const GpgME::Import & import, const QStringList & sources );
122 
123  QString formatOverview( const GpgME::Key & key );
124 }
125 }
126 
127 #endif /* __KLEOPATRA_UTILS_FORMATTING_H__ */
Kleo::Formatting::CertificateType
Definition: formatting.h:75
Kleo::Formatting::ownerTrustShort
QString ownerTrustShort(const GpgME::Key &key)
Kleo::Formatting::ToolTipOption
ToolTipOption
Definition: formatting.h:67
Kleo::Formatting::type
QString type(const GpgME::Key &key)
email
static std::string email(const UserID &uid)
Definition: keycache.cpp:593
Kleo::Formatting::prettyKeyID
QString prettyKeyID(const char *id)
Definition: formatting.cpp:137
Kleo::Formatting::formatOverview
QString formatOverview(const GpgME::Key &key)
Kleo::Formatting::creationDateString
QString creationDateString(const GpgME::Key &key)
Kleo::Formatting::displayName
QString displayName(GpgME::Protocol prot)
Kleo::Formatting::toolTip
QString toolTip(const GpgME::Key &key, int opts)
Kleo::Formatting::expirationDateString
QString expirationDateString(const GpgME::Key &key)
Kleo::Formatting::UserIDs
Definition: formatting.h:78
Kleo::Formatting::prettyUserID
QString prettyUserID(const GpgME::UserID &uid)
Kleo::Formatting::formatForComboBox
QString formatForComboBox(const GpgME::Key &key)
Definition: formatting.cpp:497
Kleo::Formatting::ExpiryDates
Definition: formatting.h:74
Kleo::Formatting::validityShort
QString validityShort(const GpgME::Subkey &subkey)
Kleo::Formatting::Issuer
Definition: formatting.h:72
Kleo::Formatting::expirationDate
QDate expirationDate(const GpgME::Key &key)
Kleo::Formatting::summaryToString
const char * summaryToString(const GpgME::Signature::Summary summary)
Kleo::Formatting::prettyNameAndEMail
QString prettyNameAndEMail(int proto, const char *id, const char *name, const char *email, const char *comment)
Definition: formatting.cpp:87
Kleo::Formatting::prettyEMail
QString prettyEMail(const char *email, const char *id)
Definition: formatting.cpp:184
Kleo::Formatting::signatureToString
QString signatureToString(const GpgME::Signature &sig, const GpgME::Key &key)
Kleo::Formatting::creationDate
QDate creationDate(const GpgME::Key &key)
Kleo::Formatting::importMetaData
QString importMetaData(const GpgME::Import &import)
Kleo::Formatting::AllOptions
Definition: formatting.h:81
Kleo::Formatting::prettyName
QString prettyName(int proto, const char *id, const char *name, const char *comment)
Definition: formatting.cpp:64
Kleo::Formatting::StorageLocation
Definition: formatting.h:70
Kleo::Formatting::CertificateUsage
Definition: formatting.h:76
name
const char * name
Definition: uiserver/selectcertificatecommand.cpp:114
Kleo::Formatting::Validity
Definition: formatting.h:69
Kleo::Formatting::Subject
Definition: formatting.h:73
Kleo::Formatting::SerialNumber
Definition: formatting.h:71
Kleo::Formatting::OwnerTrust
Definition: formatting.h:79
Kleo::Formatting::formatKeyLink
QString formatKeyLink(const GpgME::Key &key)
Kleo::Formatting::KeyID
Definition: formatting.h:68
Kleo::Formatting::Fingerprint
Definition: formatting.h:77
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:56:41 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kleopatra

Skip menu "kleopatra"
  • 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

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