Draft: Use Buteo::SyncClientInterface
Use the client API from Buteo to access the synchronisation daemon.
After some discussion about Buteo with @lduboeuf by email, I'm trying to unify these developments with upstream. This is a draft of what could be possible with https://github.com/sailfishos/buteo-syncfw/pull/19
Currently, the MR is just switching internally to use Buteo::SyncClientInterface instead of direct D-Bus calls. I've also tried to upstream some minor things upstream like the service watcher. Or use some niceties from Buteo like the XML parser to create profiles.
The above mentioned PR upstream also includes some changes to the upstream QML plugin. It is introducing a new SyncManager object that can do what the object is doing here:
- following the synchronisation status (with the slight difference that it can follow the synchronisation status of a subset of profiles),
- list profiles by category, or by visibility,
- start synchronisation for a subset of profiles.
It can be used like:
import Buteo.Profiles 0.1
SyncManager {
id: msyncd
filterBy.key: "category"
filterBy.value: "email"
}
The purpose of this draft here is to let you know at UBport what I'm doing upstream and of course start a discussion of what could be usefull for you to have upstream. So contributions can be done in one place and everyone can benefit :-)