-rw-r--r-- | libopie/pim/ocontact.h | 42 |
1 files changed, 8 insertions, 34 deletions
diff --git a/libopie/pim/ocontact.h b/libopie/pim/ocontact.h index 9643e8b..d97af1c 100644 --- a/libopie/pim/ocontact.h +++ b/libopie/pim/ocontact.h | |||
@@ -31,35 +31,22 @@ | |||
31 | #if defined(QPC_TEMPLATEDLL) | 31 | #if defined(QPC_TEMPLATEDLL) |
32 | // MOC_SKIP_BEGIN | 32 | // MOC_SKIP_BEGIN |
33 | QPC_TEMPLATEEXTERN template class QPC_EXPORT QMap<int, QString>; | 33 | QPC_TEMPLATEEXTERN template class QPC_EXPORT QMap<int, QString>; |
34 | // MOC_SKIP_END | 34 | // MOC_SKIP_END |
35 | #endif | 35 | #endif |
36 | 36 | ||
37 | class ContactPrivate; // Wozu ist das gut und wo ist das decrariert ? (se) | 37 | class ContactPrivate; |
38 | /* Stefan das ist eine forward declaration | 38 | |
39 | * dann machst du in der private section | ||
40 | * ContactPrivate *d; | ||
41 | * | ||
42 | * und wenn du bei Opie1.1 was hinzufuegen moechtest | ||
43 | * packst du es in ContactPrivate damit Opie | ||
44 | * binaer kompatibel bleibt | ||
45 | * -zecke | ||
46 | */ | ||
47 | class QPC_EXPORT OContact : public OPimRecord | 39 | class QPC_EXPORT OContact : public OPimRecord |
48 | { | 40 | { |
49 | friend class DataSet; | 41 | friend class DataSet; |
50 | public: | 42 | public: |
51 | OContact(); | 43 | OContact(); |
52 | OContact( const QMap<int, QString> &fromMap ); | 44 | OContact( const QMap<int, QString> &fromMap ); |
53 | virtual ~OContact(); | 45 | virtual ~OContact(); |
54 | 46 | ||
55 | /* VCARD stuff should vanish! -zecke */ | ||
56 | static void writeVCard( const QString &filename, const QValueList<OContact> &contacts); | ||
57 | static void writeVCard( const QString &filename, const OContact &c ); | ||
58 | static QValueList<OContact> readVCard( const QString &filename ); | ||
59 | |||
60 | enum journal_action { ACTION_ADD, ACTION_REMOVE, ACTION_REPLACE }; | 47 | enum journal_action { ACTION_ADD, ACTION_REMOVE, ACTION_REPLACE }; |
61 | 48 | ||
62 | /* | 49 | /* |
63 | * do we need to inline them | 50 | * do we need to inline them |
64 | * if yes do we need to inline them this way? | 51 | * if yes do we need to inline them this way? |
65 | * -zecke | 52 | * -zecke |
@@ -203,29 +190,19 @@ public: | |||
203 | QStringList groupList() const; | 190 | QStringList groupList() const; |
204 | 191 | ||
205 | // // custom | 192 | // // custom |
206 | // const QString &customField( const QString &key ) | 193 | // const QString &customField( const QString &key ) |
207 | // { return find( Custom- + key ); } | 194 | // { return find( Custom- + key ); } |
208 | 195 | ||
209 | static QStringList fields(); | ||
210 | static QStringList trfields(); | ||
211 | static QStringList untrfields(); | ||
212 | 196 | ||
213 | QString toRichText() const; | 197 | QString toRichText() const; |
214 | QMap<int, QString> toMap() const; | 198 | QMap<int, QString> toMap() const; |
215 | QString field( int key ) const { return find( key ); } | 199 | QString field( int key ) const { return find( key ); } |
216 | 200 | ||
217 | 201 | ||
218 | // journaling... | 202 | void setUid( int i ); |
219 | /* do we still need them? Stefan your backend takes care of these -zecke */ | ||
220 | void saveJournal( journal_action action, const QString &key = QString::null ); | ||
221 | void save( QString &buf ) const; | ||
222 | |||
223 | /* we shouldn't inline this one -zecke */ | ||
224 | void setUid( int i ) | ||
225 | { OPimRecord::setUid(i); replace( Qtopia::AddressUid , QString::number(i)); } | ||
226 | 203 | ||
227 | QString toShortText()const; | 204 | QString toShortText()const; |
228 | QString OContact::type()const; | 205 | QString OContact::type()const; |
229 | QMap<QString,QString> OContact::toExtraMap() const; | 206 | QMap<QString,QString> OContact::toExtraMap() const; |
230 | class QString OContact::recordField(int) const; | 207 | class QString OContact::recordField(int) const; |
231 | 208 | ||
@@ -234,24 +211,21 @@ public: | |||
234 | // the emails should be seperated by a comma | 211 | // the emails should be seperated by a comma |
235 | void setEmails( const QString &v ); | 212 | void setEmails( const QString &v ); |
236 | QString emails() const { return find( Qtopia::Emails ); } | 213 | QString emails() const { return find( Qtopia::Emails ); } |
237 | 214 | ||
238 | 215 | ||
239 | private: | 216 | private: |
240 | /* I do not like friends ;) | 217 | // The XML-Backend needs some access to the private functions |
241 | * besides that I think we do not need them | 218 | friend class OContactAccessBackend_XML; |
242 | * anymore -zecke | ||
243 | */ | ||
244 | friend class AbEditor; | ||
245 | friend class AbTable; | ||
246 | friend class AddressBookAccessPrivate; | ||
247 | friend class XMLIO; | ||
248 | 219 | ||
249 | void insert( int key, const QString &value ); | 220 | void insert( int key, const QString &value ); |
250 | void replace( int key, const QString &value ); | 221 | void replace( int key, const QString &value ); |
251 | QString find( int key ) const; | 222 | QString find( int key ) const; |
223 | static QStringList fields(); | ||
224 | |||
225 | void save( QString &buf ) const; | ||
252 | 226 | ||
253 | QString displayAddress( const QString &street, | 227 | QString displayAddress( const QString &street, |
254 | const QString &city, | 228 | const QString &city, |
255 | const QString &state, | 229 | const QString &state, |
256 | const QString &zip, | 230 | const QString &zip, |
257 | const QString &country ) const; | 231 | const QString &country ) const; |