Shell Search Provider v3
As per some discussion, one problem that suffers the actual protocol is that, once the overview is closed or the search is stopped by the user, the providers won't be canceled, and they will continue going without being stopped. Providers like nautilus could be affected more by this, or the ones which perform network searches.
A part from various documentation that needs to be added, the basic of the protocol could be something like this (IRC logs for first discussion):
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
<interface name='org.gnome.Shell.SearchProvider3'>
<method name='Search'>
<arg type='as' name='Terms' direction='in' />
<arg type='o' name='ResultsObject' direction='out' />
</method>
<method name='LaunchSearch'>
<arg type='as' name='Terms' direction='in' />
<arg type='u' name='Timestamp' direction='in' />
</method>
</interface>
<interface name='org.gnome.Shell.SearchProvider3.Result'>
<method name='GetIDs'>
<arg type='as' name='Results' direction='out' />
</method>
<method name='GetMetas'>
<arg type='as' name='ResultsFilter' direction='in' />
<arg type='aa{sv}' name='Metas' direction='out' />
</method>
<method name='Activate'>
<arg type='s' name='Result ID' direction='in' />
<arg type='u' name='Timestamp' direction='in' />
</method>
<method name='Cancel' />
<!-- bool cancelled property? -->
<signal name='ResultsAdded'>
<arg type='as' name='Results' />
</signal>
<signal name='ResultsReady' />
</interface>
</node>
So basically, when calling org.gnome.Shell.SearchProvider3.Search
an object implementing org.gnome.Shell.SearchProvider3.Result
interface path will be returned and from that we can fetch Result IDs, Meta's or activate it. If the sarch hs not been completed yet, calling Cancel
should make the provider to stop its action.
GetSubsearchResultSet
has also been removed.
This is indeed open for discussion, and based on a quick draft, so happy to get inputs on this.