diff MoinMoin/jabber/main.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 3ca2b7065a05
children 4e123eb32380
line wrap: on
line diff
--- a/MoinMoin/jabber/main.py	Thu May 31 01:05:09 2007 +0200
+++ b/MoinMoin/jabber/main.py	Thu May 31 01:19:49 2007 +0200
@@ -6,22 +6,28 @@
     operations. Developed as a Google Summer of Code 
     project.
 
-@copyright: 2007 by Karol Nowak <grywacz@gmail.com>
-@license: GNU GPL, see COPYING for details.
+    @copyright: 2007 by Karol Nowak <grywacz@gmail.com>
+    @license: GNU GPL, see COPYING for details.
 """
 
 import sys
 from config import JabberConfig
 from xmppbot import XMPPBot
+from xmlrpcbot import XMLRPCServer, XMLRPCClient
 from Queue import Queue
 
 def main():
-    commands = Queue()
-    results = Queue()
+    commands_from_xmpp = Queue()
+    commands_to_xmpp = Queue()
     
     try:
-        bot = XMPPBot(JabberConfig, commands, results)
-        bot.start()
+        xmpp_bot = XMPPBot(JabberConfig, commands_from_xmpp, commands_to_xmpp)
+        xmlrpc_client = XMLRPCClient(commands_from_xmpp)
+        xmlrpc_server = XMLRPCServer(commands_to_xmpp)
+        
+        xmpp_bot.start()
+        xmlrpc_client.start()
+        xmlrpc_server.start()
     
     except KeyboardInterrupt, i:
         print i