Right now it introspects DBus and fetches properties all over the place.
This patch changes UDisks Manager to be the governor of all device data,
calling GetManagedObjects (which conveniently returns all the properties)
on startup. It also connects to change signals and updates the cache
accordingly and tells the devices about it.
This reduces impact of UDisks backend on Dolphin startup from 4.3% to 0.3%
on my machine. On my laptop it spent 130ms on startup trying to figure out
if something might be a optical drive or not...
Since I don't have an optical drive, it is likely that handling for these
is broken in this patch, at least one FIXME is definitely breaking it :)
While it sheds quite some code and compacts property caching in a single place
I'm not too happy about having this static Manager pointer in DeviceBackend,
with both Manager telling the Device about changed properties and the Device
asking the Manager about its properties.. Also, the Block directly accessing
the Manager is somehwat awful.
Fix updating existing device when it gains new interfaces
So many hours wasted finding this...
Fix monitoring optical drives
We already listen to all change events anyway so rather than explicitly connecting
to a certain path like the old one, we just process everything and try to figure out
if it was meant for an optical drive whose disc became available.
For the lack of an optical drive, I tested it in VirtualBox where attaching and
removing CD images worked fine now.