• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdepimlibs-4.8.5 API Reference
  • KDE Home
  • Contact Us
 

kabc

key.h
00001 /*
00002     This file is part of libkabc.
00003     Copyright (c) 2002 Tobias Koenig <tokoe@kde.org>
00004 
00005     This library is free software; you can redistribute it and/or
00006     modify it under the terms of the GNU Library General Public
00007     License as published by the Free Software Foundation; either
00008     version 2 of the License, or (at your option) any later version.
00009 
00010     This library is distributed in the hope that it will be useful,
00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013     Library General Public License for more details.
00014 
00015     You should have received a copy of the GNU Library General Public License
00016     along with this library; see the file COPYING.LIB.  If not, write to
00017     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00018     Boston, MA 02110-1301, USA.
00019 */
00020 
00021 #ifndef KABC_KEY_H
00022 #define KABC_KEY_H
00023 
00024 #include "kabc_export.h"
00025 
00026 #include <QtCore/QDataStream>
00027 #include <QtCore/QSharedDataPointer>
00028 
00029 namespace KABC {
00030 
00034 class KABC_EXPORT Key
00035 {
00036   friend KABC_EXPORT QDataStream &operator<<( QDataStream &, const Key & );
00037   friend KABC_EXPORT QDataStream &operator>>( QDataStream &, Key & );
00038 
00039   public:
00043     typedef QList<Key> List;
00044 
00048     enum Type {
00049       X509,   
00050       PGP,    
00051       Custom  
00052     };
00053 
00057     typedef QList<Type> TypeList;
00058 
00065     explicit Key( const QString &text = QString(), Type type = PGP );
00066 
00070     Key( const Key &other );
00071 
00075     ~Key();
00076 
00080     bool operator==( const Key & ) const;
00081 
00085     bool operator!=( const Key & ) const;
00086 
00092     Key &operator=( const Key &other );
00093 
00097     void setId( const QString &identifier );
00098 
00102     QString id() const;
00103 
00107     void setBinaryData( const QByteArray &data );
00108 
00112     QByteArray binaryData() const;
00113 
00117     void setTextData( const QString &data );
00118 
00122     QString textData() const;
00123 
00127     bool isBinary() const;
00128 
00136     void setType( Type type );
00137 
00141     void setCustomTypeString( const QString &type );
00142 
00146     Type type() const;
00147 
00151     QString customTypeString() const;
00152 
00156     QString toString() const;
00157 
00161     static TypeList typeList();
00162 
00166     static QString typeLabel( Type type );
00167 
00168   private:
00169     class Private;
00170     QSharedDataPointer<Private> d;
00171 };
00172 
00176 KABC_EXPORT QDataStream &operator<<( QDataStream &stream, const Key &key );
00177 
00181 KABC_EXPORT QDataStream &operator>>( QDataStream &stream, Key &key );
00182 
00183 }
00184 
00185 #endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Mon Aug 27 2012 22:10:23 by doxygen 1.7.5 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kabc

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

kdepimlibs-4.8.5 API Reference

Skip menu "kdepimlibs-4.8.5 API Reference"
  • akonadi
  •   contact
  •   kmime
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  •   richtextbuilders
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
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