From ddb83b1fb2d305e0c06fc067d82d6bab5458b0fd Mon Sep 17 00:00:00 2001 From: Matthias Benkard Date: Fri, 30 Oct 2009 20:52:07 +0100 Subject: Add third-party XML processing libraries. Ignore-this: 5ca28497555bf944858ca2f58bc8a62b darcs-hash:a0b0f9baa7c9b1259e755435db1fb17123630a6c --- .../s-xml-rpc/src/define-xmlrpc-method.lisp | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 third-party/s-xml-rpc/src/define-xmlrpc-method.lisp (limited to 'third-party/s-xml-rpc/src/define-xmlrpc-method.lisp') diff --git a/third-party/s-xml-rpc/src/define-xmlrpc-method.lisp b/third-party/s-xml-rpc/src/define-xmlrpc-method.lisp new file mode 100644 index 0000000..74a3bc3 --- /dev/null +++ b/third-party/s-xml-rpc/src/define-xmlrpc-method.lisp @@ -0,0 +1,30 @@ +;;;; -*- mode: lisp -*- +;;;; +;;;; $Id: define-xmlrpc-method.lisp,v 1.1 2004-07-08 19:45:25 scaekenberghe Exp $ +;;;; +;;;; The code in this file adds a very handly define-xmlrpc-method macro. +;;;; +;;;; (define-xmlrpc-method get-state-name (state) +;;;; :url #u"http://betty.userland.com/RPC2" +;;;; :method "examples.getStateName") +;;;; +;;;; (define-xmlrpc-method get-time () +;;;; :url #u"http://time.xmlrpc.com/RPC2" +;;;; :method "currentTime.getCurrentTime") +;;;; +;;;; It require the PURI package. +;;;; +;;;; Copyright (C) 2004 Frederic Brunel. +;;;; +;;;; You are granted the rights to distribute and use this software +;;;; as governed by the terms of the Lisp Lesser GNU Public License +;;;; (http://opensource.franz.com/preamble.html), also known as the LLGPL. + +(defmacro define-xmlrpc-method (name args &key url method) + `(defun ,name ,args + (xml-rpc-call (encode-xml-rpc-call ,method ,@args) + :url ,(puri:uri-path url) + :host ,(puri:uri-host url) + :port ,(cond ((puri:uri-port url)) (t 80))))) + +;;;; eof -- cgit v1.2.3