XEP 0080¶
-
class
slixmpp.plugins.xep_0080.
XEP_0080
(xmpp, config=None)[source]¶ XEP-0080: User Location
-
publish_location
(**kwargs)[source]¶ Publish the user’s current location.
- Parameters
accuracy – Horizontal GPS error in meters.
alt – Altitude in meters above or below sea level.
area – A named area such as a campus or neighborhood.
bearing – GPS bearing (direction in which the entity is heading to reach its next waypoint), measured in decimal degrees relative to true north.
building – A specific building on a street or in an area.
country – The nation where the user is located.
countrycode – The ISO 3166 two-letter country code.
datum – GPS datum.
description – A natural-language name for or description of the location.
error – Horizontal GPS error in arc minutes. Obsoleted by the accuracy parameter.
floor – A particular floor in a building.
lat – Latitude in decimal degrees North.
locality – A locality within the administrative region, such as a town or city.
lon – Longitude in decimal degrees East.
postalcode – A code used for postal delivery.
region – An administrative region of the nation, such as a state or province.
room – A particular room in a building.
speed – The speed at which the entity is moving, in meters per second.
street – A thoroughfare within the locality, or a crossing of two thoroughfares.
text – A catch-all element that captures any other information about the location.
timestamp – UTC timestamp specifying the moment when the reading was taken.
uri – A URI or URL pointing to information about the location.
options – Optional form of publish options.
-
stanza
= <module 'slixmpp.plugins.xep_0080.stanza' from '/home/docs/checkouts/readthedocs.org/user_builds/slixmpp/checkouts/slix-1.6.0/slixmpp/plugins/xep_0080/stanza.py'>¶
-
Stanza elements¶
Slixmpp: The Slick XMPP Library Copyright (C) 2010 Nathanael C. Fritz This file is part of Slixmpp.
See the file LICENSE for copying permission.
-
class
slixmpp.plugins.xep_0080.stanza.
Geoloc
(xml=None, parent=None)[source]¶ XMPP’s <geoloc> stanza allows entities to know the current geographical or physical location of an entity. (XEP-0080: User Location)
Example <geoloc> stanzas:
<geoloc xmlns='http://jabber.org/protocol/geoloc'/> <geoloc xmlns='http://jabber.org/protocol/geoloc' xml:lang='en'> <accuracy>20</accuracy> <country>Italy</country> <lat>45.44</lat> <locality>Venice</locality> <lon>12.33</lon> </geoloc>
Stanza Interface:
accuracy -- Horizontal GPS error in meters. alt -- Altitude in meters above or below sea level. area -- A named area such as a campus or neighborhood. bearing -- GPS bearing (direction in which the entity is heading to reach its next waypoint), measured in decimal degrees relative to true north. building -- A specific building on a street or in an area. country -- The nation where the user is located. countrycode -- The ISO 3166 two-letter country code. datum -- GPS datum. description -- A natural-language name for or description of the location. error -- Horizontal GPS error in arc minutes. Obsoleted by the accuracy parameter. floor -- A particular floor in a building. lat -- Latitude in decimal degrees North. locality -- A locality within the administrative region, such as a town or city. lon -- Longitude in decimal degrees East. postalcode -- A code used for postal delivery. region -- An administrative region of the nation, such as a state or province. room -- A particular room in a building. speed -- The speed at which the entity is moving, in meters per second. street -- A thoroughfare within the locality, or a crossing of two thoroughfares. text -- A catch-all element that captures any other information about the location. timestamp -- UTC timestamp specifying the moment when the reading was taken. uri -- A URI or URL pointing to information about the location.
-
interfaces
= {'accuracy', 'alt', 'area', 'bearing', 'building', 'country', 'countrycode', 'datum', 'dscription', 'error', 'floor', 'lat', 'locality', 'lon', 'postalcode', 'region', 'room', 'speed', 'street', 'text', 'timestamp', 'uri'}¶
-
name
= 'geoloc'¶
-
namespace
= 'http://jabber.org/protocol/geoloc'¶
-
plugin_attrib
= 'geoloc'¶
-
set_accuracy
(accuracy)[source]¶ Set the value of the <accuracy> element.
- Parameters
accuracy – Horizontal GPS error in meters
-
set_alt
(alt)[source]¶ Set the value of the <alt> element.
- Parameters
alt – Altitude in meters above or below sea level
-
set_bearing
(bearing)[source]¶ Set the value of the <bearing> element.
- Parameters
bearing – GPS bearing (direction in which the entity is heading to reach its next waypoint), measured in decimal degrees relative to true north
-
set_error
(error)[source]¶ Set the value of the <error> element.
- Parameters
error – Horizontal GPS error in arc minutes; this element is deprecated in favor of <accuracy/>
-
set_lat
(lat)[source]¶ Set the value of the <lat> element.
- Parameters
lat – Latitude in decimal degrees North
-
set_lon
(lon)[source]¶ Set the value of the <lon> element.
- Parameters
lon – Longitude in decimal degrees East
-
set_speed
(speed)[source]¶ Set the value of the <speed> element.
- Parameters
speed – The speed at which the entity is moving, in meters per second
-
set_timestamp
(timestamp)[source]¶ Set the value of the <timestamp> element.
- Parameters
timestamp – UTC timestamp specifying the moment when the reading was taken
-
sub_interfaces
= {'accuracy', 'alt', 'area', 'bearing', 'building', 'country', 'countrycode', 'datum', 'dscription', 'error', 'floor', 'lat', 'locality', 'lon', 'postalcode', 'region', 'room', 'speed', 'street', 'text', 'timestamp', 'uri'}¶
-