comparison MoinMoin/jabber/xmlrpcbot.py @ 2068:7e2a9b7d2bc6

XML RPC functionality for the notification bot - the beginning
author Karol 'grzywacz' Nowak <grzywacz@sul.uni.lodz.pl>
date Thu, 31 May 2007 01:19:49 +0200
parents
children 4e123eb32380
comparison
equal deleted inserted replaced
2067:3ca2b7065a05 2068:7e2a9b7d2bc6
1 # -*- coding: iso-8859-1 -*-
2 """
3 MoinMoin - a xmlrpc server and client for the notification bot
4
5 This is a bot for notification and simple editing
6 operations. Developed as a Google Summer of Code
7 project.
8
9 @copyright: 2007 by Karol Nowak <grywacz@gmail.com>
10 @license: GNU GPL, see COPYING for details.
11 """
12
13 from threading import Thread
14
15 class Notification:
16 """Class representing a notification request"""
17
18 def __init__(self, jid, text):
19 self.jid = jid
20 self.text = text
21
22 class XMLRPCClient(Thread):
23 """XMLRPC Client
24
25 It's responsible for performing XMLRPC operations on
26 a wiki, as inctructed by command objects received from
27 the XMPP component"""
28
29 def __init__(self, commands):
30 Thread.__init__(self)
31 self.commands = commands
32
33 class XMLRPCServer(Thread):
34 """XMLRPC Server
35
36 It waits for notifications requests coming from wiki,
37 creates command objects and puts them on a queue for
38 later processing by the XMPP component"""
39
40 def __init__(self, commands):
41 Thread.__init__(self)
42 self.commands = commands