Add a way for the client to specify what metadata they're interested in
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
storage-framework (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Currently items are represented in the D-Bus API as a struct consisting of:
* item_id (string)
* parent_ids (array of string)
* name (string)
* etag (string)
* type (enum)
* metadata (dict)
We don't currently specify what should be in that dict: should it be a small set of standardised keys, or should it be everything the online service could present to the user?
Neither of these extremes are great: in the first case, it could mean that an application can't access the information it needs in order to operate with a particular provider. In the other, we're almost certainly sending much more data to the client than they need (and requesting a lot more data from the online service than needed). When doing folder listings, this overhead can add up quite quickly.
A few of the online services (at least Google and Microsoft) allow you to filter the returned metadata, so I propose following this lead. So for instance, the Metadata call would change from:
Metadata(
Metadata(
So if the client passed ["size_in_bytes", "last_modified_
If an empty list of keys are sent, a provider could leave the metadata dict empty.
Changed in storage-framework (Ubuntu): | |
status: | New → Fix Released |