Created
April 23, 2013 22:47
-
-
Save legastero/5448068 to your computer and use it in GitHub Desktop.
Thoughts on using Pubsub with FIS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<iq type="get" to="[email protected]/fis"> | |
<query xmlns="http://jabber.org/protocol/disco#items" node="urn:xmpp:fis:shares:0"> | |
<item jid="pubsub.example.com" node="file_share_1" name="Pictures" /> | |
<item jid="pubsub.example.com" node="file_share_2" name="Music" /> | |
</query> | |
</iq> | |
<iq type="get" to="pubsub.example.com"> | |
<pubsub xmlns="http://jabber.org/protocol/pubsub"> | |
<items node="file_share_1" /> | |
</pubsub> | |
</iq> | |
<iq type="result" to="[email protected]/myself"> | |
<pubsub xmlns="http://jabber.org/protocol/pubsub"> | |
<items node="file_share_1"> | |
<item id="foo/bar/baz.jpg"> | |
<file xmlns="urn:xmpp:fis:0" | |
name="baz.jpg" | |
size="1024" | |
mime-type="image/jpeg" | |
date="1969-07-21T02:56:15Z"> | |
<hash xmlns="urn:xmpp:hashes:1" algo="sha-1">552da749930852c69ae5d2141d3766b1</hash> | |
</file> | |
</item> | |
<item id="foo/blah.jpg"> | |
<file xmlns="urn:xmpp:fis:0" | |
name="blah.jpg" | |
size="1024" | |
mime-type="image/jpeg" | |
date="1969-07-21T02:56:15Z"> | |
<hash xmlns="urn:xmpp:hashes:1" algo="sha-1">552da749930852c69ae5d2141d3766b1</hash> | |
</file> | |
</item> | |
</items> | |
</pubsub> | |
</iq> | |
<message to="[email protected]/myself" from="pubsub.example.com"> | |
<event xmlns="http://jabber.org/protocol/pubsub#event"> | |
<items node="file_share_1"> | |
<item id="foo/bar/meh.gif"> | |
<file xmlns="urn:xmpp:fis:0" | |
name="blah.jpg" | |
size="1024" | |
mime-type="image/jpeg" | |
date="1969-07-21T02:56:15Z"> | |
<hash xmlns="urn:xmpp:hashes:1" algo="sha-1">552da749930852c69ae5d2141d3766b1</hash> | |
</file> | |
</item> | |
</items> | |
</event> | |
</message> | |
<message to="[email protected]/myself" from="pubsub.example.com"> | |
<event xmlns="http://jabber.org/protocol/pubsub#event"> | |
<items node="file_share_1"> | |
<retract id="foo/bar/meh.gif" /> | |
</items> | |
</event> | |
</message> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment