author | zautrix <zautrix> | 2004-09-19 11:32:40 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-09-19 11:32:40 (UTC) |
commit | eea0ff04703dffdbe8b67a0dc9f592597d7450c1 (patch) (side-by-side diff) | |
tree | 874549d9c1c6239304fe1540d1b56269652954c0 /kabc/addressee.cpp | |
parent | 953277a85e6ec5630ab0d64b4d68815e4e4f9906 (diff) | |
download | kdepimpi-eea0ff04703dffdbe8b67a0dc9f592597d7450c1.zip kdepimpi-eea0ff04703dffdbe8b67a0dc9f592597d7450c1.tar.gz kdepimpi-eea0ff04703dffdbe8b67a0dc9f592597d7450c1.tar.bz2 |
more AB sync
-rw-r--r-- | kabc/addressee.cpp | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/kabc/addressee.cpp b/kabc/addressee.cpp index c34f671..711c261 100644 --- a/kabc/addressee.cpp +++ b/kabc/addressee.cpp @@ -61,16 +61,17 @@ struct Addressee::AddresseeData : public KShared Geo geo; QString title; QString role; QString organization; QString note; QString productId; QDateTime revision; QString sortString; + QString externalUID; KURL url; Secrecy secrecy; Picture logo; Picture photo; Sound sound; Agent agent; QString mExternalId; PhoneNumber::List phoneNumbers; @@ -266,16 +267,42 @@ void Addressee::computeCsum(const QString &dev) t.sort(); for ( iii = 0; iii < t.count(); ++iii) l.append( t[iii] ); } uint cs = getCsum4List(l); // qDebug("CSUM computed %d %s %s", cs,QString::number (cs ).latin1(), uid().latin1() ); setCsum( dev, QString::number (cs )); } + +void Addressee::mergeContact( Addressee ad ) +{ +#if 0 + if ( !mData->name.isEmpty() ) l.append(mData->name); + if ( !mData->formattedName.isEmpty() ) l.append(mData->formattedName ); + if ( !mData->familyName.isEmpty() ) l.append( mData->familyName ); + if ( !mData->givenName.isEmpty() ) l.append(mData->givenName ); + if ( !mData->additionalName ) l.append( mData->additionalName ); + if ( !mData->prefix.isEmpty() ) l.append( mData->prefix ); + if ( !mData->suffix.isEmpty() ) l.append( mData->suffix ); + if ( !mData->nickName.isEmpty() ) l.append( mData->nickName ); + if ( mData->birthday.isValid() ) l.append( mData->birthday.toString() ); + if ( !mData->mailer.isEmpty() ) l.append( mData->mailer ); + if ( mData->timeZone.isValid() ) l.append( mData->timeZone.asString() ); + if ( mData->geo.isValid() ) l.append( mData->geo.asString() ); + if ( !mData->title .isEmpty() ) l.append( mData->title ); + if ( !mData->role.isEmpty() ) l.append( mData->role ); + if ( !mData->organization.isEmpty() ) l.append( mData->organization ); + if ( !mData->note.isEmpty() ) l.append( mData->note ); + if ( !mData->productId.isEmpty() ) l.append(mData->productId ); + if ( !mData->sortString.isEmpty() ) l.append( mData->sortString ); + if ( mData->secrecy.isValid() ) l.append( mData->secrecy.asString()); +#endif +} + void Addressee::removeID(const QString &prof) { detach(); mData->mExternalId = KIdManager::removeId ( mData->mExternalId, prof); } void Addressee::setID( const QString & prof , const QString & id ) { @@ -318,16 +345,28 @@ void Addressee::setIDStr( const QString & s ) mData->mExternalId = s; } QString Addressee::IDStr() const { return mData->mExternalId; } +void Addressee::setExternalUID( const QString &id ) +{ + if ( id == mData->externalUID ) return; + detach(); + mData->empty = false; + mData->externalUID = id; +} + +QString Addressee::externalUID() const +{ + return mData->externalUID; +} void Addressee::setUid( const QString &id ) { if ( id == mData->uid ) return; detach(); mData->empty = false; mData->uid = id; } |