diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-06-23 02:32:10 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-06-23 02:32:10 +0000 |
commit | 672beaaffcce643b8ab17a191327caa771641a7e (patch) | |
tree | 4b4850b93992ba065767768c7f5ff2de2e3e6421 /kresources/carddav/writer.cpp | |
parent | 23f5d4229caea32af49c007de85563158630b5d4 (diff) | |
download | tdepim-672beaaffcce643b8ab17a191327caa771641a7e.tar.gz tdepim-672beaaffcce643b8ab17a191327caa771641a7e.zip |
Major KAddressbook carddav fixes and improvements (should now work with Zimbra once Zimbra fixes a standards compliance issue with contact creation mimetypes)
Fixed handling of close events and save interaction with Kontact and Korganizer
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1141613 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kresources/carddav/writer.cpp')
-rw-r--r-- | kresources/carddav/writer.cpp | 31 |
1 files changed, 23 insertions, 8 deletions
diff --git a/kresources/carddav/writer.cpp b/kresources/carddav/writer.cpp index 479120d44..2216fb065 100644 --- a/kresources/carddav/writer.cpp +++ b/kresources/carddav/writer.cpp @@ -24,9 +24,9 @@ // Use carddav_modify_object() function. // If it's not set, a pair of carddav_delete_object/carddav_add_object // is used for modifying objects. -// It's done, because, for some reason, SOGo server returns an error -// on carddav_modify_object. DAViCAL works fine both ways. -#define USE_CARDDAV_MODIFY +// It's done, because, for some reason, Zimbra returns an error +// on carddav_modify_object. +//#define USE_CARDDAV_MODIFY /*========================================================================= | NAMESPACE @@ -52,20 +52,35 @@ int CardDavWriter::runJob(runtime_info* RT) { if (OK == res) { #ifdef USE_CARDDAV_MODIFY kdDebug() << "pushing changed objects"; - res = pushObjects(mChanged, carddav_modify_object, OK, RT); + if (getUseURI() == false) + res = pushObjects(mChanged, carddav_modify_object, OK, RT); + else + res = pushObjects(mChanged, carddav_modify_object_by_uri, OK, RT); if (OK == res) { kdDebug() << "pushing deleted objects"; - res = pushObjects(mDeleted, carddav_delete_object, OK, RT); + if (getUseURI() == false) + res = pushObjects(mDeleted, carddav_delete_object, OK, RT); + else + res = pushObjects(mDeleted, carddav_delete_object_by_uri, OK, RT); } #else // if USE_CARDDAV_MODIFY kdDebug() << "pushing changed objects (delete)"; - res = pushObjects(mChanged, carddav_delete_object, OK, RT); + if (getUseURI() == false) + res = pushObjects(mChanged, carddav_delete_object, OK, RT); + else + res = pushObjects(mChanged, carddav_delete_object_by_uri, OK, RT); if (OK == res) { kdDebug() << "pushing changed objects (add)"; - res = pushObjects(mChanged, carddav_add_object, OK, RT); + if (getUseURI() == false) + res = pushObjects(mChanged, carddav_add_object, OK, RT); + else + res = pushObjects(mChanged, carddav_add_object, OK, RT); if (OK == res) { kdDebug() << "pushing deleted objects"; - res = pushObjects(mDeleted, carddav_delete_object, OK, RT); + if (getUseURI() == false) + res = pushObjects(mDeleted, carddav_delete_object, OK, RT); + else + res = pushObjects(mDeleted, carddav_delete_object_by_uri, OK, RT); } } #endif // if USE_CARDDAV_MODIFY |