Changeset 35:2866eaae775f in ralphm-patches for client_service_example.patch


Ignore:
Timestamp:
Feb 12, 2010, 12:01:52 PM (11 years ago)
Author:
Ralph Meijer <ralphm@…>
Branch:
default
Message:

Minor cleanups to deal with changed APIs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • client_service_example.patch

    r34 r35  
    1 diff -r a0bcf2e586ec doc/examples/client_service.tac
     1diff -r 0a3d1655a3e5 doc/examples/client_service.tac
    22--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
    3 +++ b/doc/examples/client_service.tac   Fri Feb 12 09:50:08 2010 +0100
    4 @@ -0,0 +1,40 @@
     3+++ b/doc/examples/client_service.tac   Fri Feb 12 11:55:08 2010 +0100
     4@@ -0,0 +1,41 @@
    55+from twisted.application import service
    66+from twisted.internet import defer
     
    88+from wokkel.client import ClientService
    99+from wokkel.generic import FallbackHandler
    10 +from wokkel.xmppim import RosterProtocol
     10+from wokkel.xmppim import RosterServerProtocol
    1111+
    1212+import socket
    1313+domain = socket.gethostname()
    1414+
    15 +class StaticRoster(RosterProtocol):
     15+class StaticRoster(RosterServerProtocol):
    1616+
    1717+    def __init__(self):
     18+        RosterServerProtocol.__init__(self)
    1819+        self.roster = {'ralphm':
    1920+                           [{'jid': 'intosi@' + domain,
     
    4041+clientService = ClientService(domain, 5224)
    4142+clientService.logTraffic = True
    42 +clientService.addHandler(FallbackHandler())
    43 +clientService.addHandler(StaticRoster())
     43+FallbackHandler().setHandlerParent(clientService)
     44+StaticRoster().setHandlerParent(clientService)
    4445+clientService.setServiceParent(application)
Note: See TracChangeset for help on using the changeset viewer.