/[cl-xmpp]/cl-xmpp/administration.lisp
ViewVC logotype

Contents of /cl-xmpp/administration.lisp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations)
Wed Jul 9 21:02:40 2008 UTC (5 years, 9 months ago) by ehuelsmann
Branch: MAIN
CVS Tags: HEAD
Collected Ravenpack Int'l patches as submitted by Kevin Crosbie (kcrosbie at ravenpack.com).
1 ;;;; $Id: administration.lisp,v 1.1 2008/07/09 21:02:40 ehuelsmann Exp $
2 ;;;; $Source: /tiger/var/lib/cvsroots/cl-xmpp/cl-xmpp/administration.lisp,v $
3
4 (in-package :cl-xmpp)
5
6 ;;<iq from='bard@shakespeare.lit/globe'
7 ;; id='end-user-session-1'
8 ;; to='shakespeare.lit'
9 ;; type='get'
10 ;; xml:lang='en'>
11 ;; <command xmlns='http://jabber.org/protocol/commands'
12 ;; action='execute'
13 ;; node='http://jabber.org/protocol/admin#end-user-session'/>
14 ;;</iq>
15
16 ;;<iq type="set" to="shakespeare.lit" id="ae23a" >
17 ;; <command xmlns="http://jabber.org/protocol/commands"
18 ;; node="http://jabber.org/protocol/admin#end-user-session"
19 ;; sessionid="2007-12-04T11:56:33.920539Z" >
20 ;; <x xmlns="jabber:x:data" type="submit" >
21 ;; <field type="hidden" var="FORM_TYPE" >
22 ;; <value>http://jabber.org/protocol/admin</value>
23 ;; </field>
24 ;; <field type="jid-single" var="accountjid" >
25 ;; <value>bard@shakespeare.lit</value>
26 ;; </field>
27 ;; </x>
28 ;; </command>
29 ;;</iq>
30
31 (defmethod end-user-session ((connection connection) &key to server)
32 (with-xml-output (connection)
33 (with-iq-command
34 (connection :xmlns "http://jabber.org/protocol/commands"
35 :node "http://jabber.org/protocol/admin#end-user-session"
36 :to server
37 :type "set")
38 (cxml:with-element "x"
39 (cxml:attribute "xmlns" "jabber:x:data")
40 (cxml:attribute "type" "submit")
41 (with-form-field "hidden" "FORM_TYPE" "http://jabber.org/protocol/admin")
42 (with-form-field "jid-single" "accountjid" to)))))
43
44 ;;<iq type="get"
45 ;; to="shakespeare.lit"
46 ;; id="ab48a" >
47 ;; <query xmlns="http://jabber.org/protocol/disco#items"
48 ;; node="online users" />
49 ;;</iq>
50
51 (defmethod get-online-users ((connection connection) &key server)
52 (with-xml-output (connection)
53 (with-iq-query (connection :type "get" :to server
54 :xmlns "http://jabber.org/protocol/disco#items"
55 :node "online users"))))
56

  ViewVC Help
Powered by ViewVC 1.1.5