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. What if different backends implement different methods? 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> <<a href="mailto:jhkukkon@cc.hut.fi">jhkukkon@cc.hut.fi</a>> 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's say the user has
<br>the following position backends installed<br> 1. GPS<br> 2. Hostip<br><br>Scenario 1. Application wants to know the city/country (assume civic<br> location is now included in the position-interface).<br>
Scenario 2: An application wants coordinates. User does not have a GPS<br> 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> (a list in gconf instead of just the default backend?)
<br><br>* Getting information from the several backends should be as seamless as<br> possible. I don't see why we couldn't totally abstract this in the<br> bindings / wrapper library?<br> If a method (e.g. current_position()) fails, and
<br> if no backend was initialized with generic init-method and<br> if there are backends still left on the list of backends<br> Initialize the next backend in the list and<br> 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>"I want [Coordinates|City Name|Street Address|...]"<br>and get that information without knowing any details.
<br><br><br> -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>