2008/4/22 Arun Raghavan &lt;<a href="mailto:arunisgod@gmail.com">arunisgod@gmail.com</a>&gt;:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Tue, Apr 22, 2008 at 1:21 AM, Mikkel Kamstrup Erlandsen<br>
<div class="Ih2E3d">&lt;<a href="mailto:mikkel.kamstrup@gmail.com">mikkel.kamstrup@gmail.com</a>&gt; wrote:<br>
</div>&lt;snip&gt;<br>
<div class="Ih2E3d">&gt; I am having second thoughts on this.<br>
&gt;<br>
&gt; Since a normal SearchDone does not necessarily mean that the search has<br>
&gt; stopped running in case of a live session. On the other hand a SearchFailed<br>
&gt; signal (or what ever we call it) will probably always mean that search is<br>
&gt; dead (the question is whether the client needs to call CloseSearch on it is<br>
&gt; open then).<br>
<br>
</div><div class="Ih2E3d">I think this is a big missing piece in the API and am glad we&#39;re<br>
looking at this.<br>
<br>
I don&#39;t see why the SearchDone can&#39;t call a CloseSearch in case of an<br>
error. However, if these are the only 2 options, then I am in favour<br>
of a SearchFailed because it seems to be cleaner (error path is kept<br>
independent of the regular path).<br>
<br>
A few thoughts:<br>
<br>
a) SearchFailed might be bad nomenclature. For example, setting an<br>
invalid property should raise an error, but not cause the search to<br>
fail.</div></blockquote><div><br>According to the spec, SetProperty (ses, prop, val) should return a dbus error if ses is closed or invalid, or if prop is not a valid property, so this should be covered.<br>&nbsp;</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d"><br>
b) There can also be errors at the Session level. How do we handle<br>
those? For example, I think using a closed search handle should be a<br>
Session error rather than a Search error. Maybe we can have 2 signals<br>
&quot;SessionError&quot; and &quot;SearchError&quot; to handle these?<br>
</div></blockquote><div><br>That is not a problem, the dbus methods can return dbus errors (read: throw exceptions). The Managed C# dbus bindings will probably marshal an exception to a dbus error (python-dbus does this at least). It is speced out when the methods should throw exceptions<br>
<br>The problem comes after StartSearch is invoked - here you will just sit idle waiting for HitsAdded or SearchDone if the search dies before the server can emit anything.<br><br>Cheers,<br>Mikkel<br>&nbsp;<br></div></div><br>