A Helper for XEP-0080 User Location
Use this helper to send a user's location, or receive them from a specified jid. Described at www.xmpp.org/extensions/xep-0080.html
For example: <pre> h = UserLocation::Helper( @client, 'radio1@hug.hellomatty.com' ) h.add_userlocation_callback do |location|
puts "Now in: #{location.locality}"
end </pre>
Add a callback that will be invoked when a location is received from the jid specified when you constructed the Helper.
# File lib/xmpp4r/location/helper/helper.rb, line 46 def add_userlocation_callback(prio = 200, ref = nil, &block) add_event_callback(prio, ref) do |event| location = event.first_element('items/item/location') if location block.call(location) end end end
Generated with the Darkfish Rdoc Generator 2.