kpimidentities
22 #ifndef KPIMIDENTITES_IDENTITY_H
23 #define KPIMIDENTITES_IDENTITY_H
25 #include "kpimidentities_export.h"
26 #include "signature.h"
28 #include <kdemacros.h>
30 #include <QtCore/QString>
31 #include <QtCore/QStringList>
32 #include <QtCore/QList>
33 #include <QtCore/QHash>
34 #include <QtCore/QVariant>
36 namespace KPIMIdentities
45 namespace KPIMIdentities
48 static const char s_uoid[] =
"uoid";
49 static const char s_identity[] =
"Identity";
50 static const char s_name[] =
"Name";
51 static const char s_organization[] =
"Organization";
52 static const char s_pgps[] =
"PGP Signing Key";
53 static const char s_pgpe[] =
"PGP Encryption Key";
54 static const char s_smimes[] =
"SMIME Signing Key";
55 static const char s_smimee[] =
"SMIME Encryption Key";
56 static const char s_prefcrypt[] =
"Preferred Crypto Message Format";
57 static const char s_email[] =
"Email Address";
58 static const char s_replyto[] =
"Reply-To Address";
59 static const char s_bcc[] =
"Bcc";
60 static const char s_cc[] =
"Cc";
61 static const char s_vcard[] =
"VCardFile";
62 static const char s_transport[] =
"Transport";
63 static const char s_fcc[] =
"Fcc";
64 static const char s_drafts[] =
"Drafts";
65 static const char s_templates[] =
"Templates";
66 static const char s_dict[] =
"Dictionary";
67 static const char s_xface[] =
"X-Face";
68 static const char s_xfaceenabled[] =
"X-FaceEnabled";
69 static const char s_signature[] =
"Signature";
70 static const char s_emailAliases[] =
"Email Aliases";
72 KPIMIDENTITIES_EXPORT QDataStream &
operator<<
74 KPIMIDENTITIES_EXPORT QDataStream &
operator>>
85 friend KPIMIDENTITIES_EXPORT QDataStream &
operator<<
87 friend KPIMIDENTITIES_EXPORT QDataStream &
operator>>
91 typedef QList<Identity> List;
94 explicit Identity(
const QString &
id=QString(),
95 const QString &realName=QString(),
96 const QString &emailAddr=QString(),
97 const QString &organization=QString(),
98 const QString &replyToAddress=QString() );
104 bool operator== (
const Identity &other )
const;
107 bool operator!= (
const Identity &other )
const;
110 bool operator< (
const Identity &other )
const;
113 bool operator> (
const Identity &other )
const;
116 bool operator<= (
const Identity &other )
const;
119 bool operator>= (
const Identity &other )
const;
122 bool mailingAllowed()
const;
125 QString identityName()
const;
128 void setIdentityName(
const QString &name );
131 bool isDefault()
const;
137 QString fullName()
const;
138 void setFullName(
const QString& );
141 QString organization()
const;
142 void setOrganization(
const QString& );
145 QByteArray pgpEncryptionKey()
const;
146 void setPGPEncryptionKey(
const QByteArray &key );
149 QByteArray pgpSigningKey()
const;
150 void setPGPSigningKey(
const QByteArray &key );
153 QByteArray smimeEncryptionKey()
const;
154 void setSMIMEEncryptionKey(
const QByteArray &key );
157 QByteArray smimeSigningKey()
const;
158 void setSMIMESigningKey(
const QByteArray &key );
160 QString preferredCryptoMessageFormat()
const;
161 void setPreferredCryptoMessageFormat(
const QString& );
169 KDE_DEPRECATED QString emailAddr()
const;
170 KDE_DEPRECATED
void setEmailAddr(
const QString& );
178 QString primaryEmailAddress()
const;
179 void setPrimaryEmailAddress(
const QString & email );
186 const QStringList emailAliases()
const;
187 void setEmailAliases(
const QStringList & aliases );
195 bool matchesEmailAddress(
const QString & addr )
const;
198 QString vCardFile()
const;
199 void setVCardFile(
const QString& );
203 QString fullEmailAddr()
const;
206 QString replyToAddr()
const;
207 void setReplyToAddr(
const QString& );
211 void setBcc(
const QString& );
217 void setCc(
const QString& );
220 void setSignature(
const Signature &sig );
229 QString signatureText(
bool *ok = 0 )
const;
235 bool signatureIsInlinedHtml()
const;
239 QString transport()
const;
240 void setTransport(
const QString& );
245 void setFcc(
const QString& );
251 QString drafts()
const;
252 void setDrafts(
const QString& );
258 QString templates()
const;
259 void setTemplates(
const QString& );
267 QString dictionary()
const;
268 void setDictionary(
const QString& );
271 QString xface()
const;
272 void setXFace(
const QString& );
273 bool isXFaceEnabled()
const;
274 void setXFaceEnabled(
const bool );
277 QVariant property(
const QString &key )
const;
280 void setProperty(
const QString &key,
const QVariant &value );
287 static QString mimeDataType();
288 static bool canDecode(
const QMimeData* );
289 void populateMimeData( QMimeData* );
290 static Identity fromMimeData(
const QMimeData* );
294 void readConfig(
const KConfigGroup & );
298 void writeConfig( KConfigGroup & )
const;
308 void setIsDefault(
bool flag );
311 void setUoid( uint aUoid );
316 QString verifyAkonadiId(
const QString& str)
const;
319 bool signatureIsCommand()
const;
322 bool signatureIsPlainFile()
const;
325 bool signatureIsInline()
const;
328 QString signatureFile()
const;
329 void setSignatureFile(
const QString& );
332 QString signatureInlineText()
const;
333 void setSignatureInlineText(
const QString& );
336 bool useSignatureFile()
const;
340 QHash<QString,QVariant> mPropertiesMap;
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Mon Dec 10 2012 13:49:18 by
doxygen 1.8.1.2 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.