This is a really difficult question.   One that I didn't know how to do.   Originally, I had planned on accuracy as the defining point.    Each backend would signal a master process about it's accuracy and when it got more accurate.   From this the clients would chnge over to the more accurate backends.
<br><br><br>I thought this would suffice, but the civic location idea does bring up problems.&nbsp;&nbsp; What if different backends implement different methods?&nbsp;&nbsp; I still vote for allowing more control from the programmers, but maybe providing examples on how to change between providers and such.
<br><br>Keith Preston<br><br><br><div><span class="gmail_quote">On 6/19/07, <b class="gmail_sendername">Jussi Kukkonen</b> &lt;<a href="mailto:jhkukkon@cc.hut.fi">jhkukkon@cc.hut.fi</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
This RFC is actually somewhat related to the earlier (hopefully even<br>ongoing) discussion on interfaces.<br><br><br>Selecting the backend to use is not just a matter of choosing the<br>default one, if we want to do it right. Example: Let&#39;s say the user has
<br>the following position backends installed<br>&nbsp;&nbsp; 1. GPS<br>&nbsp;&nbsp; 2. Hostip<br><br>Scenario 1. Application wants to know the city/country (assume civic<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;location is now included in the position-interface).<br>
Scenario 2: An application wants coordinates. User does not have a GPS<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;device with her (or she is indoors).<br><br>In both scenarios the default GPS backend is unusable. Problem in<br>scenario 1 is something that could be avoided with having separate
<br>interfaces for civic/coordinate location, but that is just a special<br>case. Scenario 2, and many other situations like it, would require the<br>application to call get_all_position_providers() and try another backend
<br>if the current_position()-method of the first backend failed... This is<br>not friendly at all.<br><br><br>Conclusions/questions:<br><br>* There should be an order of preference for backends<br>&nbsp;&nbsp;(a list in gconf instead of just the default backend?)
<br><br>* Getting information from the several backends should be as seamless as<br>&nbsp;&nbsp;possible. I don&#39;t see why we couldn&#39;t totally abstract this in the<br>&nbsp;&nbsp;bindings / wrapper library?<br>&nbsp;&nbsp;&nbsp;&nbsp; If a method (e.g. current_position()) fails, and
<br>&nbsp;&nbsp;&nbsp;&nbsp; if no backend was initialized with generic init-method and<br>&nbsp;&nbsp;&nbsp;&nbsp; if there are backends still left on the list of backends<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Initialize the next backend in the list and<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call the current_position method() on the new backend
<br><br>Is there something seriously wrong with this idea? If it works,<br>applications could just say<br>&quot;I want [Coordinates|City Name|Street Address|...]&quot;<br>and get that information without knowing any details.
<br><br><br>&nbsp;&nbsp;-jussi<br><br><br>_______________________________________________<br>GeoClue mailing list<br><a href="mailto:GeoClue@lists.freedesktop.org">GeoClue@lists.freedesktop.org</a><br><a href="http://lists.freedesktop.org/mailman/listinfo/geoclue">
http://lists.freedesktop.org/mailman/listinfo/geoclue</a><br><br><br></blockquote></div><br>