IqQuery
Class for handling roster updates
You must do 'client.send(Iq.new_rosterget)' or else you will have nothing to put in receive_iq()
You must require 'xmpp4r/rosterquery' to use this class as its functionality is not needed for a working XMPP implementation. This will make [IqQuery] convert all Queries with namespace 'jabber:iq:roster' to [IqQueryRoster]
This <query/> contains multiple <item/> children. See RosterItem.
Iterate through all items
&block |
Yield for every [RosterItem] |
# File lib/xmpp4r/roster/iq/roster.rb, line 27 def each(&block) each_element { |item| # XPath won't work here as it's missing a prefix... yield(item) if item.kind_of?(RosterItem) } end
Output for "p"
JIDs of all contained [RosterItem] elements are joined with a comma
result |
|
# File lib/xmpp4r/roster/iq/roster.rb, line 74 def inspect jids = to_a.collect { |item| item.jid.inspect } jids.join(', ') end
Update roster by <iq/> stanza (to be fed by an iq_callback)
iq |
|
filter |
|
# File lib/xmpp4r/roster/iq/roster.rb, line 61 def receive_iq(iq, filter=true) if filter && (((iq.type != :set) && (iq.type != :result)) || (iq.queryns != 'jabber:iq:roster')) return end import(iq.query) end
Generated with the Darkfish Rdoc Generator 2.