2006/11/30, Jamie McCracken <<a href="mailto:jamiemcc@blueyonder.co.uk">jamiemcc@blueyonder.co.uk</a>>:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Mikkel Kamstrup Erlandsen wrote:<br>> 2006/11/28, Jamie McCracken <<a href="mailto:jamiemcc@blueyonder.co.uk">jamiemcc@blueyonder.co.uk</a><br>> <mailto:<a href="mailto:jamiemcc@blueyonder.co.uk">jamiemcc@blueyonder.co.uk
</a>>>:<br>><br>><br>> As for live queries, I dont like dynamic interfaces and in tracker we<br>> will simply take a live_query_id as a param and use dbus signal<br>> filtering to listen for changes to that specific ID
<br>><br>><br>><br>> You mean that the client app will have to do dbus match rules, no? I see<br>> that this would work, but it also feels counter intuitive, and all<br>> experience tells me that this should be avoided in an api.
<br>><br>> Why not use temporary dbus objects instead? That will also wrap easier<br>> in a toolkit client object. Then you have the search engine live interface:<br>><br>> method org.freedesktop.search.live.PrepareQuery
(args) : returns a dbus<br>> path to the query object<br><br>yes that will do - I was worried the existing interface would be<br>extended dynamically but yeah using a separate interface will avoid that<br><br>><br>> The query object has the interface
org.freedesktop.search.Query<br>> something like:<br>><br>> method org.freedesktop.search.Query.Execute (args)<br>> method org.freedesktop.search.Query.HitCount (args)<br>> method org.freedesktop.search.Query.Close
(args)<br>><br>> signal org.freedesktop.search.Query.HitAdd (args)<br>> signal org.freedesktop.search.Query.HitRemove (args)<br>> signal org.freedesktop.search.Query.HitModify (args)<br>><br>> This is a really rough draft, but I hope the point is clear enough...
<br>><br><br>yeah thats fine. (not sure you need a HitModify though?)<br><br>HitAdd - only fired when a new file is created that matches the query<br>HitRemove - only fired when a file is deleted that matches the query
<br><br>For a file Move - it generates a remove and an add signal.</blockquote><div><br>The HitModify was a bit arbitarary... I was thinking that the metadata for the hit could change. Resizing and image, changing mimetype, snippet text changes... This could still be solved by add/remove signals though...
<br></div><br></div>Cheers,<br>Mikkel<br>