key.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
#ifndef KABC_KEY_H
00022
#define KABC_KEY_H
00023
00024
#include <qvaluelist.h>
00025
00026
namespace KABC {
00027
00031 class Key
00032 {
00033
friend QDataStream &operator<<(
QDataStream &,
const Key & );
00034
friend QDataStream &operator>>(
QDataStream &,
Key & );
00035
00036
public:
00037
typedef QValueList<Key> List;
00038
typedef QValueList<int> TypeList;
00039
00047 enum Types {
00048 X509,
00049 PGP,
00050 Custom
00051 };
00052
00059
Key(
const QString &text = QString::null,
int type = PGP );
00060
00064
~Key();
00065
00066
bool operator==(
const Key & ) const;
00067
bool operator!=( const
Key & ) const;
00068
00072
void setId( const
QString &
id );
00073
00077
QString id() const;
00078
00082
void setBinaryData( const
QByteArray &binary );
00083
00087
QByteArray binaryData() const;
00088
00092
void setTextData( const
QString &text );
00093
00097
QString textData() const;
00098
00102
bool isBinary() const;
00103
00107
void setType(
int type );
00108
00112
void setCustomTypeString( const
QString &custom );
00113
00117
int type() const;
00118
00122
QString customTypeString() const;
00123
00127 static TypeList typeList();
00128
00132 static
QString typeLabel(
int type );
00133
00134 private:
00135
QByteArray mBinaryData;
00136
QString mId;
00137
QString mTextData;
00138
QString mCustomTypeString;
00139
00140
int mIsBinary;
00141
int mType;
00142 };
00143
00144
QDataStream &operator<<(
QDataStream &, const
Key & );
00145 QDataStream &operator>>( QDataStream &, Key & );
00146
00147 }
00148 #endif
This file is part of the documentation for kabc Library Version 3.2.3.