diff options
author | Patrick Ohly <patrick.ohly@intel.com> | 2011-09-13 10:58:49 +0200 |
---|---|---|
committer | Patrick Ohly <patrick.ohly@intel.com> | 2011-09-14 15:07:30 +0200 |
commit | 8a640d2ae25fa8a0b9b4e2c104b3721bfe618899 (patch) | |
tree | f2cb3febb83aa8244ccfe4f3c94ecafb3a1b0352 /src/backends/evolution/EvolutionContactSource.cpp | |
parent | 5e88021226d53396b73da8496af5dfc4c50fdb5f (diff) |
SyncSource API: support and use Synthesis DB_DataMerged/Replace/Conflict result codes (BMC #22783)
Returning 207 = DB_DataMerged when an item replaced an existing one
wasn't correct (the data wasn't really merged) and also wasn't handled
as intended by the Synthesis engine. Now a backend can properly report what it did:
- data fully replaced
- data was merged
- data needs to be merged by engine
The last option is used by EDS and CalDAV when an add<->add conflict
is detected by the backends. In that case the Synthesis engine will
read the local item, merge it with the incoming item and write back
the result.
At the moment the tests assume that the more recent item wins
completely. But our field list config specifies a merge=lines mode for
some fields, which results in concatenating these fields in the merged
item. Thus the tests currently fail. Need to decide which behavior is
desired.
Diffstat (limited to 'src/backends/evolution/EvolutionContactSource.cpp')
-rw-r--r-- | src/backends/evolution/EvolutionContactSource.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backends/evolution/EvolutionContactSource.cpp b/src/backends/evolution/EvolutionContactSource.cpp index 28fd0828..7d04f97a 100644 --- a/src/backends/evolution/EvolutionContactSource.cpp +++ b/src/backends/evolution/EvolutionContactSource.cpp @@ -330,7 +330,7 @@ EvolutionContactSource::insertItem(const string &uid, const std::string &item, b throwError("no UID for contact"); } string newrev = getRevision(newuid); - return InsertItemResult(newuid, newrev, false); + return InsertItemResult(newuid, newrev, ITEM_OKAY); } else { throwError(uid.empty() ? "storing new contact" : @@ -341,7 +341,7 @@ EvolutionContactSource::insertItem(const string &uid, const std::string &item, b throwError(string("failure parsing vcard " ) + item); } // not reached! - return InsertItemResult("", "", false); + return InsertItemResult("", "", ITEM_OKAY); } void EvolutionContactSource::removeItem(const string &uid) |