mirror of
git://git.psyc.eu/libpsyc
synced 2024-08-15 03:19:02 +00:00
Merge branch 'master' of supraverse.net:libpsyc
This commit is contained in:
commit
9fc09724b0
7 changed files with 45 additions and 2 deletions
|
@ -43,14 +43,25 @@ np
|
|||
|
||||
** An average chat message
|
||||
|
||||
XML:
|
||||
XMPP:
|
||||
|
||||
#+INCLUDE: packets/chat_msg.xml src xml
|
||||
|
||||
JSON:
|
||||
|
||||
#+INCLUDE: packets/chat_msg.json src js
|
||||
|
||||
PSYC:
|
||||
|
||||
#+INCLUDE: packets/chat_msg.psyc src psyc
|
||||
|
||||
Why PSYC doesn't have an id? Because packet counting from contexts
|
||||
and circuits is automatic: The packet already has a number just by
|
||||
being there.
|
||||
|
||||
Also, PSYC by default doesn't mention a "resource" in XMPP terms,
|
||||
instead it allows for more addressing schemes than just PSYC.
|
||||
|
||||
** A new status updated activity
|
||||
Example taken from http://onesocialweb.org/spec/1.0/osw-activities.html
|
||||
You could call this XML namespace hell:
|
||||
|
@ -71,12 +82,16 @@ We'll use the latter here:
|
|||
|
||||
** A message with JSON-unfriendly characters
|
||||
#+INCLUDE: packets/json-unfriendly.xml src xml
|
||||
#+INCLUDE: packets/json-unfriendly.json src js
|
||||
#+INCLUDE: packets/json-unfriendly.psyc src psyc
|
||||
|
||||
** A message with XML-unfriendly characters
|
||||
#+INCLUDE: packets/xml-unfriendly.xml src xml
|
||||
|
||||
** A message with PSYC-unfriendly strings
|
||||
#+INCLUDE: packets/psyc-unfriendly.xml src xml
|
||||
#+INCLUDE: packets/psyc-unfriendly.json src js
|
||||
#+INCLUDE: packets/psyc-unfriendly.psyc src psyc
|
||||
|
||||
** A packet containing a JPEG photograph
|
||||
... TBD ...
|
||||
|
|
2
bench/packets/chat_msg.json
Normal file
2
bench/packets/chat_msg.json
Normal file
|
@ -0,0 +1,2 @@
|
|||
["message",{"from":"juliet@example.com/balcony","to":"romeo@example.net"},
|
||||
"Art thou not Romeo, and a Montague?"]
|
|
@ -1,6 +1,6 @@
|
|||
:_source psyc://example.com/~juliet
|
||||
:_target psyc://example.net/~romeo
|
||||
|
||||
_message_private
|
||||
_message
|
||||
Art thou not Romeo, and a Montague?
|
||||
|
|
||||
|
|
2
bench/packets/json-unfriendly.json
Normal file
2
bench/packets/json-unfriendly.json
Normal file
|
@ -0,0 +1,2 @@
|
|||
["message",{"from":"romeo@example.net/orchard","to":"juliet@example.com/balcony"},
|
||||
"\"Neither, fair saint, if either thee dislike.\", he said.\nAnd\nthe\nrest\nis\nhistory."]
|
11
bench/packets/json-unfriendly.psyc
Normal file
11
bench/packets/json-unfriendly.psyc
Normal file
|
@ -0,0 +1,11 @@
|
|||
:_source psyc://example.com/~romeo
|
||||
:_target psyc://example.net/~juliet
|
||||
|
||||
_message
|
||||
"Neither, fair saint, if either thee dislike.", he said.
|
||||
And
|
||||
the
|
||||
rest
|
||||
is
|
||||
history.
|
||||
|
|
3
bench/packets/psyc-unfriendly.json
Normal file
3
bench/packets/psyc-unfriendly.json
Normal file
|
@ -0,0 +1,3 @@
|
|||
["message",{"from":"juliet@example.com/balcony',"to":"romeo@example.net",
|
||||
"subject":"I implore you with a pointless\nnewline in a header variable"},
|
||||
"Wherefore art thou, Romeo?\n|\nAnd for practicing purposes we added a PSYC packet delimiter.]
|
10
bench/packets/psyc-unfriendly.psyc
Normal file
10
bench/packets/psyc-unfriendly.psyc
Normal file
|
@ -0,0 +1,10 @@
|
|||
:_source psyc://example.com/~juliet
|
||||
:_target psyc://example.net/~romeo
|
||||
177
|
||||
:_subject 59 I implore you with a pointless
|
||||
newline in a header variable
|
||||
_message
|
||||
Wherefore art thou, Romeo?
|
||||
|
|
||||
And for practicing purposes we added a PSYC packet delimiter.
|
||||
|
|
Loading…
Reference in a new issue