On Fri, 2 Apr 2010, Peter Saint-Andre wrote:
On 2/23/10 9:03 AM, Kyle Usbeck wrote:
I very strongly support the addition of "source" and "provider"
information to the geoloc spec,
Great. Patches welcome. :)
but their addition means that we might
also have to modify the way we represent "stop commands." According to
XEP-0080:
In order to indicate that the user is no longer publishing any
location information, the user's client shall send an empty
<geoloc/> element, which can be considered a "stop command" for
geolocation.
Example Use Case: Transmit a "stop command" for a WIFI source, but
continue sending information from a GPS source.
The stop command indicates that the entity has stopped all publishing of
geolocation data from all sources and providers.
The options are 1) include "source" and "provider" as optional
attributes of the <geoloc/> element, or 2) alter the representation of
the stop command.
By including the "source" and "provider" as optional attributes of
<geoloc/>, we can continue using an empty <geoloc/> as a stop command:
<geoloc
xmlns='http://jabber.org/protocol/geoloc'
<http://www.google.com/url?sa=D&q=http://jabber.org/protocol/geoloc%27&usg=AFQjCNEeMfdwnaV7yu2Aqox0OVKaz2IXlw>
xml:lang='en'
source='wifi'/>
I prefer, though, altering the representation by adding an explicit
termination, such as the type='stop' below:
<geoloc
xmlns='http://jabber.org/protocol/geoloc'
<http://www.google.com/url?sa=D&q=http://jabber.org/protocol/geoloc%27&usg=AFQjCNEeMfdwnaV7yu2Aqox0OVKaz2IXlw>
xml:lang='en'
type='stop'>
<source>wifi</source>
</geoloc>
I'd keep using the <source/> child elements for consistency with
publishing the source of the location information, rather than making it a
sometime attribute on <geoloc/>.
Since the <geoloc/> element would not be empty in the above case, existing
implementations shouldn't be treating it as the complete end of location
informations from the source user, but I guess this depends on whether
'empty' is considered by the implementation as being 'no child elements'
or 'no lat/lon/usable elements'.
Are there any other options that I'm missing?
Why do you need to indicate that you are stopping publication from a
particular source or provider? Is there a use case for that feature?
I've got two mildly-contrived-but-plausible use cases. Firstly, say that
your device is being used to feed location information (GPS and Intertial)
to a subscriber which is providing you with real-time driving directions.
As you enter an extended tunnel, the GPS source loses its signal lock, and
at the next publication interval, sends a stop stanza for that source.
This lets the real-time driving directions supplier know that you are
where you should be (ie, in the tunnel, and not on the surface street),
and to fall back on timed directions based on the information from the
Inertial source.
Second use case, say that the same device is actually receiving detailed
Inertial information via a bluetooth connection to the vehicle. As you
park in the parking lot and turn off your vehicle, that source goes away
and a stop stanza for that source is generated. A subscriber notices the
disconnection of that particular source, and records your last-received
location for later use when you press the ``dude, where's my car?'' button
on the device.
--
Bruce.
_______________________________________________
JDev mailing list
Forum: http://www.jabberforum.org/forumdisplay.php?f=20
Info: http://mail.jabber.org/mailman/listinfo/jdev
Unsubscribe: [email protected]
_______________________________________________