|typedef EvolutionSyncSource *(*||Create_t )(const EvolutionSyncSourceParams ¶ms)|
Public Member Functions
|RegisterSyncSource (const string &shortDescr, bool enabled, Create_t create, const string &typeDescr, const Values &typeValues)|
Static Public Attributes
|static EvolutionSyncSource *const||InactiveSource = (EvolutionSyncSource *)1|
It is also possible to add configuration options. For that define a derived class. In its constructor use EvolutionSyncSourceConfig::getRegistry() resp. EvolutionSyncConfig::getRegistry() to define new configuration properties. The advantage of registering them is that the user interface will automatically handle them like the predefined ones. The namespace of these configuration options is shared by all sources and the core.
For properties with arbitrary names use the SyncSourceNodes::m_trackingNode.
|typedef EvolutionSyncSource*(* RegisterSyncSource::Create_t)(const EvolutionSyncSourceParams ¶ms)|
Users select a SyncSource and its data format via the "type" config property. Backends have to add this kind of function to the SourceRegistry_t in order to be considered by the SyncSource creation mechanism.
The function will be called to check whether the backend was meant by the user. It should return a new instance which will be freed by the caller or NULL if it does not support the selected type.
Inactive sources should return the special InactiveSource pointer value if they recognize without a doubt that the user wanted to instantiate them: for example, an inactive EvolutionContactSource will return NULL for "addressbook" but InactiveSource for "evolution-contacts".
|RegisterSyncSource::RegisterSyncSource||(||const string &||shortDescr,|
|const string &||typeDescr,|
|const Values &||typeValues|
|shortDescr||a few words identifying the data to be synchronized, e.g. "Evolution Calendar"|
|enabled||true if the sync source can be instantiated, false if it was not enabled during compilation or is otherwise not functional|
|create||factory function for sync sources of this type|
|typeDescr||multiple lines separated by |
which get appended to the the description of the type property, e.g. "Evolution Memos = memo = evolution-memo\n" " plain text in UTF-8 (default) = text/plain\n" " iCalendar 2.0 = text/calendar\n" " The later format is not tested because none of the\n" " supported SyncML servers accepts it.\n"
|typeValues||the config accepts multiple names for the same internal type string; this list here is added to that list of aliases. It should contain at least one unique string the can be used to pick this sync source among all SyncEvolution sync sources (testing, listing backends, ...). Example: Values() + (Aliases("Evolution Memos") + "evolution-memo")|
|const bool RegisterSyncSource::m_enabled|
|const string RegisterSyncSource::m_shortDescr|