Synthesis engine: allow arbitrary <datastore> config properties

SyncSources are now allowed to insert arbitrary config properties
into the <datastore></datastore> config. The main motivation is that
some backends need to enable <updateallfields>.
This commit is contained in:
Patrick Ohly 2011-06-20 14:10:50 +02:00
parent 35646edc47
commit 86ad81e932
2 changed files with 14 additions and 0 deletions

View File

@ -171,6 +171,9 @@ void SyncSourceBase::getDatastoreXML(string &xml, XMLConfigFragments &fragments)
info.m_datatypes <<
" </typesupport>\n";
// arbitrary configuration options, can override the ones above
xmlstream << info.m_datastoreOptions;
xml = xmlstream.str();
}

View File

@ -996,6 +996,17 @@ class SyncSourceBase : public Logger {
* in <afterreadscript>.
*/
std::string m_afterReadScript;
/**
* Arbitrary configuration options, can override the ones above
* because they are added to the <datastore></datastore>
* XML configuration directly before the closing element.
*
* One example is adding <updateallfields>: this is necessary
* in backends which depend on getting complete items (= for example,
* vCard 3.0 strings) from the engine.
*/
std::string m_datastoreOptions;
};
/**