24#include "kabc_export.h"
26#include <QtCore/QDataStream>
27#include <QtCore/QSharedDataPointer>
36 friend KABC_EXPORT QDataStream &
operator<<( QDataStream &,
const Key & );
97 void setId(
const QString &identifier );
170 QSharedDataPointer<Private> d;
176KABC_EXPORT QDataStream &
operator<<( QDataStream &stream,
const Key &key );
181KABC_EXPORT QDataStream &
operator>>( QDataStream &stream,
Key &key );
A class to store an encryption key.
static QString typeLabel(Type type)
Returns a translated label for a given key type.
static TypeList typeList()
Returns a list of all available key types.
bool operator!=(const Key &) const
Not-equal operator.
friend QDataStream & operator<<(QDataStream &, const Key &)
Serializes the key object into the stream.
Type type() const
Returns the type, see Type.
bool isBinary() const
Returns whether the key contains binary or text data.
QString toString() const
Returns a string representation of the key.
@ PGP
Pretty Good Privacy key.
@ Custom
Custom or IANA conform key.
void setCustomTypeString(const QString &type)
Sets custom type string.
QString id() const
Returns the unique identifier.
QByteArray binaryData() const
Returns the binary data.
QString customTypeString() const
Returns the custom type string.
QList< Key > List
List of keys.
friend QDataStream & operator>>(QDataStream &, Key &)
Initializes the key object from the stream.
QList< Type > TypeList
List of key types.
bool operator==(const Key &) const
Equality operator.
void setId(const QString &identifier)
Sets the unique identifier.
void setBinaryData(const QByteArray &data)
Sets binary data.
void setType(Type type)
Sets the type.
Key(const QString &text=QString(), Type type=PGP)
Creates a new key.
void setTextData(const QString &data)
Sets text data.
QString textData() const
Returns the text data.
Key & operator=(const Key &other)
Assignment operator.
Class that holds a Calendar Url (FBURL/CALADRURI/CALURI)
QDataStream & operator<<(QDataStream &stream, const Address &address)
Serializes the address object into the stream.
QDataStream & operator>>(QDataStream &stream, Address &address)
Initializes the address object from the stream.