1
0
Fork 0
mirror of git://git.psyc.eu/libpsyc synced 2024-08-15 03:19:02 +00:00

more paketz

This commit is contained in:
psyc://psyced.org/~lynX 2011-05-18 21:59:00 +02:00
parent 909a908107
commit 0111aa7224
7 changed files with 45 additions and 2 deletions

View file

@ -43,14 +43,25 @@ np
** An average chat message ** An average chat message
XML: XMPP:
#+INCLUDE: packets/chat_msg.xml src xml #+INCLUDE: packets/chat_msg.xml src xml
JSON:
#+INCLUDE: packets/chat_msg.json src js
PSYC: PSYC:
#+INCLUDE: packets/chat_msg.psyc src 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 ** A new status updated activity
Example taken from http://onesocialweb.org/spec/1.0/osw-activities.html Example taken from http://onesocialweb.org/spec/1.0/osw-activities.html
You could call this XML namespace hell: You could call this XML namespace hell:
@ -71,12 +82,16 @@ We'll use the latter here:
** A message with JSON-unfriendly characters ** A message with JSON-unfriendly characters
#+INCLUDE: packets/json-unfriendly.xml src xml #+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 ** A message with XML-unfriendly characters
#+INCLUDE: packets/xml-unfriendly.xml src xml #+INCLUDE: packets/xml-unfriendly.xml src xml
** A message with PSYC-unfriendly strings ** A message with PSYC-unfriendly strings
#+INCLUDE: packets/psyc-unfriendly.xml src xml #+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 ** A packet containing a JPEG photograph
... TBD ... ... TBD ...

View file

@ -0,0 +1,2 @@
["message",{"from":"juliet@example.com/balcony","to":"romeo@example.net"},
"Art thou not Romeo, and a Montague?"]

View file

@ -1,6 +1,6 @@
:_source psyc://example.com/~juliet :_source psyc://example.com/~juliet
:_target psyc://example.net/~romeo :_target psyc://example.net/~romeo
_message_private _message
Art thou not Romeo, and a Montague? Art thou not Romeo, and a Montague?
| |

View 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."]

View 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.
|

View 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.]

View 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.
|