Expose LIBMTP_Read_Event to support Add Storage events.
I noticed that, for my MTP devices, Windows appeared to
detect when storages appeared after unlocking the device.
So, I figured there were probably StoreAdded events being
generated, and this turned out to be the case.
So, it would be highly desirable to pass these events on to
clients so they can react accordingly.
This implementation is quite ad-hoc, and can't really be considered
fully baked. I don't know what the grand scheme is/was for events,
but I'm sure passing each param out separately was not part of it.
In any case, I'm passing out param1 as it is the ID of the added
storage entity.
I've tested this with my in-progress mtp backend for gvfs and it
works as hoped; I can pass on a gvfs notification that results in the
storage appearing in Nautilus.
Signed-off-by: Philip Langdale <philipl@overt.org>
3 files changed