[or-cvs] include event type argument in EventHandler function protot...

Geoffrey Goodell goodell at seul.org
Wed Nov 9 22:24:27 UTC 2005


Update of /home/or/cvsroot/control/python
In directory moria:/tmp/cvs-serv8124

Modified Files:
	TorCtl.py 
Log Message:
include event type argument in EventHandler function prototypes


Index: TorCtl.py
===================================================================
RCS file: /home/or/cvsroot/control/python/TorCtl.py,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- TorCtl.py	9 Nov 2005 21:53:36 -0000	1.10
+++ TorCtl.py	9 Nov 2005 22:24:24 -0000	1.11
@@ -161,13 +161,13 @@
 
         return evtype, args
 
-    def unknown_event(self, evtype, *args):
+    def unknown_event(self, eventtype, evtype, *args):
         """Called when we get an event type we don't recognize.  This
            is almost alwyas an error.
         """
         raise NotImplemented
 
-    def circ_status(self, status, circID, path):
+    def circ_status(self, eventtype, status, circID, path):
         """Called when a circuit status changes if listening to CIRCSTATUS
            events.  'status' is a member of CIRC_STATUS; circID is a numeric
            circuit ID, and 'path' is the circuit's path so far as a list of
@@ -175,38 +175,38 @@
         """
         raise NotImplemented
 
-    def stream_status(self, status, streamID, target, circID="0"):
+    def stream_status(self, eventtype, status, streamID, target, circID="0"):
         """Called when a stream status changes if listening to STREAMSTATUS
            events.  'status' is a member of STREAM_STATUS; streamID is a
            numeric stream ID, and 'target' is the destination of the stream.
         """
         raise NotImplemented
 
-    def or_conn_status(self, status, target):
+    def or_conn_status(self, eventtype, status, target):
         """Called when an OR connection's status changes if listening to
            ORCONNSTATUS events. 'status' is a member of OR_CONN_STATUS; target
            is the OR in question.
         """
         raise NotImplemented
 
-    def bandwidth(self, read, written):
+    def bandwidth(self, eventtype, read, written):
         """Called once a second if listening to BANDWIDTH events.  'read' is
            the number of bytes read; 'written' is the number of bytes written.
         """
         raise NotImplemented
 
-    def new_desc(self, identities):
+    def new_desc(self, eventtype, identities):
         """Called when Tor learns a new server descriptor if listenting to
            NEWDESC events.
         """
         raise NotImplemented
 
-    def msg(self, severity, message):
+    def msg(self, eventtype, severity, message):
         """Called when a log message of a given severity arrives if listening
            to INFO_MSG, NOTICE_MSG, WARN_MSG, or ERR_MSG events."""
         raise NotImplemented
 
-    def address_mapped(self, fromAddr, toAddr, expiry=None):
+    def address_mapped(self, eventtype, fromAddr, toAddr, expiry=None):
         """Called when Tor adds a mapping for an address if listening
            to ADDRESSMAPPED events.
         """



More information about the tor-commits mailing list