From a369064269e8d9a8ebc8739f616bb6de602b91a7 Mon Sep 17 00:00:00 2001 From: nik gaffney Date: Fri, 3 Apr 2009 16:57:08 +0200 Subject: [PATCH] PLaneT fixes & renames --- README.md | 4 +-- gibberish.scrbl | 44 ------------------------------ info.ss | 9 +++---- xmpp.scrbl | 71 +++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 77 insertions(+), 51 deletions(-) delete mode 100644 gibberish.scrbl create mode 100644 xmpp.scrbl diff --git a/README.md b/README.md index 343959f..e099f0f 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -# Gibberish +# XMPP A basic module for IM using the Jabber/XMPP protocol with PLT Scheme. @@ -11,7 +11,7 @@ currently documented in the file 'xmpp.ss' ## Installation - (require (planet zzkt/gibberish:1:0/xmpp)) + (require (planet zzkt/xmpp:1:0/xmpp)) ## Example Chat Client diff --git a/gibberish.scrbl b/gibberish.scrbl deleted file mode 100644 index 6e3477b..0000000 --- a/gibberish.scrbl +++ /dev/null @@ -1,44 +0,0 @@ -#lang scribble/doc -@(require scribble/manual) - -@title{Gibberish} - -Gibberish is a module for using the Jabber/XMPP protocol. - -@table-of-contents[] - -@section{Protocol Support} - -It should eventually implement XMPP-Core and XMPP-IM to conform with -RFCs 3920 and 3921. Progress toward supporting the full protocol is -currently documented in the file 'xmpp.ss' - - -@section{Installation} - -(require (planet zzkt/gibberish:1:0/xmpp)) - - -@section{Example Chat Client} - -@schemeblock[ - - (require xmpp) - - (define (read-input prompt) - (display prompt) - (read-line (current-input-port))) - - (define (chat) - (let ((jid (read-input "jid: ")) - (pass (read-input "password: ")) - (to (read-input "chat with: "))) - (with-xmpp-session jid pass - (set-xmpp-handler 'message print-message) - (let loop () - (let ((msg (read-line (current-input-port)))) - (send (message to msg)) - (loop)))))) - ] - -and chat away... diff --git a/info.ss b/info.ss index 1454590..e4a7feb 100644 --- a/info.ss +++ b/info.ss @@ -1,10 +1,10 @@ #lang setup/infotab (define name - "gibberish") + "xmpp") (define blurb - '("A client library for the XMPP or Jabber protocol.")) + '("A library for the XMPP or Jabber protocol.")) (define categories '(xml net)) @@ -24,6 +24,5 @@ (define release-notes '("")) -;(define scribblings -; '(("gibberish.scrbl" ()))) - +(define scribblings + '(("xmpp.scrbl" ()))) diff --git a/xmpp.scrbl b/xmpp.scrbl new file mode 100644 index 0000000..8af5fed --- /dev/null +++ b/xmpp.scrbl @@ -0,0 +1,71 @@ +#lang scribble/doc +@(require scribble/manual) + +@title{XMPP} + +A module for using the Jabber/XMPP protocol. + +@table-of-contents[] + +@section{Protocol Support} + +It should eventually implement XMPP-Core and XMPP-IM to conform with +RFCs 3920 and 3921. Progress toward supporting the full protocol is +currently documented in the file 'xmpp.ss' + + +@section{Installation} + +@schemeblock[(require (planet zzkt/xmpp:1:0/xmpp))] + +@section{Session} + +@schemeblock[ +(with-xmpp-session jid pass body) +] + +@section{Mesaging} + +@schemeblock[ +(with-xmpp-session jid pass + (send (message to text))) +] + +@section{Presence} + +@schemeblock[ +(with-xmpp-session jid pass + (send (presence))) +] + +@section{Registration} + +@section{Response Handling} + +@schemeblock[ +(with-xmpp-session jid pass + (set-xmpp-handler 'message print-message)) +] + +@section{Example Chat Client} + +@schemeblock[ +(define (read-input prompt) + (display prompt) + (read-line (current-input-port))) + +(define (chat) + (let ((jid (read-input "jid: ")) + (pass (read-input "password: ")) + (to (read-input "chat with: "))) + (with-xmpp-session + jid pass + (set-xmpp-handler 'message print-message) + (let loop () + (let ((msg (read-line (current-input-port)))) + (send (message to msg)) + (loop)))))) + + ] + +and chat away...