summaryrefslogtreecommitdiffabout
path: root/kabc/addressee.h
Unidiff
Diffstat (limited to 'kabc/addressee.h') (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/addressee.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/kabc/addressee.h b/kabc/addressee.h
index 3ba7777..8baa888 100644
--- a/kabc/addressee.h
+++ b/kabc/addressee.h
@@ -21,192 +21,194 @@
21 21
22/* 22/*
23Enhanced Version of the file for platform independent KDE tools. 23Enhanced Version of the file for platform independent KDE tools.
24Copyright (c) 2004 Ulf Schenk 24Copyright (c) 2004 Ulf Schenk
25 25
26$Id$ 26$Id$
27*/ 27*/
28 28
29#ifndef KABC_ADDRESSEE_H 29#ifndef KABC_ADDRESSEE_H
30#define KABC_ADDRESSEE_H 30#define KABC_ADDRESSEE_H
31 31
32#include <qdatetime.h> 32#include <qdatetime.h>
33#include <qstring.h> 33#include <qstring.h>
34#include <qstringlist.h> 34#include <qstringlist.h>
35#include <qvaluelist.h> 35#include <qvaluelist.h>
36 36
37#include <ksharedptr.h> 37#include <ksharedptr.h>
38#include <kurl.h> 38#include <kurl.h>
39 39
40#include "address.h" 40#include "address.h"
41#include "agent.h" 41#include "agent.h"
42#include "geo.h" 42#include "geo.h"
43#include "key.h" 43#include "key.h"
44#include "phonenumber.h" 44#include "phonenumber.h"
45#include "picture.h" 45#include "picture.h"
46#include "secrecy.h" 46#include "secrecy.h"
47#include "sound.h" 47#include "sound.h"
48#include "timezone.h" 48#include "timezone.h"
49 49
50namespace KABC { 50namespace KABC {
51 51
52class Resource; 52class Resource;
53 53
54/** 54/**
55 @short address book entry 55 @short address book entry
56 56
57 This class represents an entry in the address book. 57 This class represents an entry in the address book.
58 58
59 The data of this class is implicitly shared. You can pass this class by value. 59 The data of this class is implicitly shared. You can pass this class by value.
60 60
61 If you need the name of a field for presenting it to the user you should use 61 If you need the name of a field for presenting it to the user you should use
62 the functions ending in Label(). They return a translated string which can be 62 the functions ending in Label(). They return a translated string which can be
63 used as label for the corresponding field. 63 used as label for the corresponding field.
64 64
65 About the name fields: 65 About the name fields:
66 66
67 givenName() is the first name and familyName() the last name. In some 67 givenName() is the first name and familyName() the last name. In some
68 countries the family name comes first, that's the reason for the 68 countries the family name comes first, that's the reason for the
69 naming. formattedName() is the full name with the correct formatting. 69 naming. formattedName() is the full name with the correct formatting.
70 It is used as an override, when the correct formatting can't be generated 70 It is used as an override, when the correct formatting can't be generated
71 from the other name fields automatically. 71 from the other name fields automatically.
72 72
73 realName() returns a fully formatted name(). It uses formattedName, if set, 73 realName() returns a fully formatted name(). It uses formattedName, if set,
74 otherwise it constucts the name from the name fields. As fallback, if 74 otherwise it constucts the name from the name fields. As fallback, if
75 nothing else is set it uses name(). 75 nothing else is set it uses name().
76 76
77 name() is the NAME type of RFC2426. It can be used as internal name for the 77 name() is the NAME type of RFC2426. It can be used as internal name for the
78 data enty, but shouldn't be used for displaying the data to the user. 78 data enty, but shouldn't be used for displaying the data to the user.
79 */ 79 */
80class Addressee 80class Addressee
81{ 81{
82 friend QDataStream &operator<<( QDataStream &, const Addressee & ); 82 friend QDataStream &operator<<( QDataStream &, const Addressee & );
83 friend QDataStream &operator>>( QDataStream &, Addressee & ); 83 friend QDataStream &operator>>( QDataStream &, Addressee & );
84 84
85 public: 85 public:
86 typedef QValueList<Addressee> List; 86 typedef QValueList<Addressee> List;
87 87
88 /** 88 /**
89 Construct an empty address book entry. 89 Construct an empty address book entry.
90 */ 90 */
91 Addressee(); 91 Addressee();
92 ~Addressee(); 92 ~Addressee();
93 93
94 Addressee( const Addressee & ); 94 Addressee( const Addressee & );
95 Addressee &operator=( const Addressee & ); 95 Addressee &operator=( const Addressee & );
96 96
97 bool operator==( const Addressee & ) const; 97 bool operator==( const Addressee & ) const;
98 bool operator!=( const Addressee & ) const; 98 bool operator!=( const Addressee & ) const;
99 // sync stuff 99 // sync stuff
100 void setTempSyncStat(int id); 100 void setTempSyncStat(int id);
101 int tempSyncStat() const; 101 int tempSyncStat() const;
102 void setIDStr( const QString & ); 102 void setIDStr( const QString & );
103 QString IDStr() const; 103 QString IDStr() const;
104 void setID( const QString &, const QString & ); 104 void setID( const QString &, const QString & );
105 QString getID( const QString & ); 105 QString getID( const QString & );
106 void setCsum( const QString &, const QString & ); 106 void setCsum( const QString &, const QString & );
107 QString getCsum( const QString & ); 107 QString getCsum( const QString & );
108 void removeID(const QString &); 108 void removeID(const QString &);
109 void computeCsum(const QString &dev); 109 void computeCsum(const QString &dev);
110 ulong getCsum4List( const QStringList & attList); 110 ulong getCsum4List( const QStringList & attList);
111 /** 111 /**
112 Return, if the address book entry is empty. 112 Return, if the address book entry is empty.
113 */ 113 */
114 bool isEmpty() const; 114 bool isEmpty() const;
115 void setExternalUID( const QString &id ); 115 void setExternalUID( const QString &id );
116 QString externalUID() const; 116 QString externalUID() const;
117 void setOriginalExternalUID( const QString &id );
118 QString originalExternalUID() const;
117 void mergeContact( const Addressee& ad ); 119 void mergeContact( const Addressee& ad );
118 /** 120 /**
119 Set unique identifier. 121 Set unique identifier.
120 */ 122 */
121 void setUid( const QString &uid ); 123 void setUid( const QString &uid );
122 /** 124 /**
123 Return unique identifier. 125 Return unique identifier.
124 */ 126 */
125 QString uid() const; 127 QString uid() const;
126 /** 128 /**
127 Return translated label for uid field. 129 Return translated label for uid field.
128 */ 130 */
129 static QString uidLabel(); 131 static QString uidLabel();
130 132
131 /** 133 /**
132 Set name. 134 Set name.
133 */ 135 */
134 void setName( const QString &name ); 136 void setName( const QString &name );
135 /** 137 /**
136 Return name. 138 Return name.
137 */ 139 */
138 QString name() const; 140 QString name() const;
139 /** 141 /**
140 Return translated label for name field. 142 Return translated label for name field.
141 */ 143 */
142 static QString nameLabel(); 144 static QString nameLabel();
143 145
144 /** 146 /**
145 Set formatted name. 147 Set formatted name.
146 */ 148 */
147 void setFormattedName( const QString &formattedName ); 149 void setFormattedName( const QString &formattedName );
148 /** 150 /**
149 Return formatted name. 151 Return formatted name.
150 */ 152 */
151 QString formattedName() const; 153 QString formattedName() const;
152 /** 154 /**
153 Return translated label for formattedName field. 155 Return translated label for formattedName field.
154 */ 156 */
155 static QString formattedNameLabel(); 157 static QString formattedNameLabel();
156 158
157 /** 159 /**
158 Set family name. 160 Set family name.
159 */ 161 */
160 void setFamilyName( const QString &familyName ); 162 void setFamilyName( const QString &familyName );
161 /** 163 /**
162 Return family name. 164 Return family name.
163 */ 165 */
164 QString familyName() const; 166 QString familyName() const;
165 /** 167 /**
166 Return translated label for familyName field. 168 Return translated label for familyName field.
167 */ 169 */
168 static QString familyNameLabel(); 170 static QString familyNameLabel();
169 171
170 /** 172 /**
171 Set given name. 173 Set given name.
172 */ 174 */
173 void setGivenName( const QString &givenName ); 175 void setGivenName( const QString &givenName );
174 /** 176 /**
175 Return given name. 177 Return given name.
176 */ 178 */
177 QString givenName() const; 179 QString givenName() const;
178 /** 180 /**
179 Return translated label for givenName field. 181 Return translated label for givenName field.
180 */ 182 */
181 static QString givenNameLabel(); 183 static QString givenNameLabel();
182 184
183 /** 185 /**
184 Set additional names. 186 Set additional names.
185 */ 187 */
186 void setAdditionalName( const QString &additionalName ); 188 void setAdditionalName( const QString &additionalName );
187 /** 189 /**
188 Return additional names. 190 Return additional names.
189 */ 191 */
190 QString additionalName() const; 192 QString additionalName() const;
191 /** 193 /**
192 Return translated label for additionalName field. 194 Return translated label for additionalName field.
193 */ 195 */
194 static QString additionalNameLabel(); 196 static QString additionalNameLabel();
195 197
196 /** 198 /**
197 Set honorific prefixes. 199 Set honorific prefixes.
198 */ 200 */
199 void setPrefix( const QString &prefix ); 201 void setPrefix( const QString &prefix );
200 /** 202 /**
201 Return honorific prefixes. 203 Return honorific prefixes.
202 */ 204 */
203 QString prefix() const; 205 QString prefix() const;
204 /** 206 /**
205 Return translated label for prefix field. 207 Return translated label for prefix field.
206 */ 208 */
207 static QString prefixLabel(); 209 static QString prefixLabel();
208 210
209 /** 211 /**
210 Set honorific suffixes. 212 Set honorific suffixes.
211 */ 213 */
212 void setSuffix( const QString &suffix ); 214 void setSuffix( const QString &suffix );