summaryrefslogtreecommitdiffabout
path: root/kabc/addressee.h
authorzautrix <zautrix>2004-09-19 11:32:40 (UTC)
committer zautrix <zautrix>2004-09-19 11:32:40 (UTC)
commiteea0ff04703dffdbe8b67a0dc9f592597d7450c1 (patch) (unidiff)
tree874549d9c1c6239304fe1540d1b56269652954c0 /kabc/addressee.h
parent953277a85e6ec5630ab0d64b4d68815e4e4f9906 (diff)
downloadkdepimpi-eea0ff04703dffdbe8b67a0dc9f592597d7450c1.zip
kdepimpi-eea0ff04703dffdbe8b67a0dc9f592597d7450c1.tar.gz
kdepimpi-eea0ff04703dffdbe8b67a0dc9f592597d7450c1.tar.bz2
more AB sync
Diffstat (limited to 'kabc/addressee.h') (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/addressee.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/kabc/addressee.h b/kabc/addressee.h
index bfb0840..59fcbd8 100644
--- a/kabc/addressee.h
+++ b/kabc/addressee.h
@@ -51,129 +51,131 @@ namespace 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 115 void setExternalUID( const QString &id );
116 QString externalUID() const;
117 void mergeContact( Addressee ad );
116 /** 118 /**
117 Set unique identifier. 119 Set unique identifier.
118 */ 120 */
119 void setUid( const QString &uid ); 121 void setUid( const QString &uid );
120 /** 122 /**
121 Return unique identifier. 123 Return unique identifier.
122 */ 124 */
123 QString uid() const; 125 QString uid() const;
124 /** 126 /**
125 Return translated label for uid field. 127 Return translated label for uid field.
126 */ 128 */
127 static QString uidLabel(); 129 static QString uidLabel();
128 130
129 /** 131 /**
130 Set name. 132 Set name.
131 */ 133 */
132 void setName( const QString &name ); 134 void setName( const QString &name );
133 /** 135 /**
134 Return name. 136 Return name.
135 */ 137 */
136 QString name() const; 138 QString name() const;
137 /** 139 /**
138 Return translated label for name field. 140 Return translated label for name field.
139 */ 141 */
140 static QString nameLabel(); 142 static QString nameLabel();
141 143
142 /** 144 /**
143 Set formatted name. 145 Set formatted name.
144 */ 146 */
145 void setFormattedName( const QString &formattedName ); 147 void setFormattedName( const QString &formattedName );
146 /** 148 /**
147 Return formatted name. 149 Return formatted name.
148 */ 150 */
149 QString formattedName() const; 151 QString formattedName() const;
150 /** 152 /**
151 Return translated label for formattedName field. 153 Return translated label for formattedName field.
152 */ 154 */
153 static QString formattedNameLabel(); 155 static QString formattedNameLabel();
154 156
155 /** 157 /**
156 Set family name. 158 Set family name.
157 */ 159 */
158 void setFamilyName( const QString &familyName ); 160 void setFamilyName( const QString &familyName );
159 /** 161 /**
160 Return family name. 162 Return family name.
161 */ 163 */
162 QString familyName() const; 164 QString familyName() const;
163 /** 165 /**
164 Return translated label for familyName field. 166 Return translated label for familyName field.
165 */ 167 */
166 static QString familyNameLabel(); 168 static QString familyNameLabel();
167 169
168 /** 170 /**
169 Set given name. 171 Set given name.
170 */ 172 */
171 void setGivenName( const QString &givenName ); 173 void setGivenName( const QString &givenName );
172 /** 174 /**
173 Return given name. 175 Return given name.
174 */ 176 */
175 QString givenName() const; 177 QString givenName() const;
176 /** 178 /**
177 Return translated label for givenName field. 179 Return translated label for givenName field.
178 */ 180 */
179 static QString givenNameLabel(); 181 static QString givenNameLabel();