Author: dmeyer
Date: Wed Feb 13 13:43:19 2008
New Revision: 3070
Log:
rename (Weak)SocketDispatcher to (Weak)IOMonitor
Modified:
trunk/DEPRECATED/ipc.py
trunk/DEPRECATED/player/src/xine.py
trunk/WIP/bluetooth.py
trunk/WIP/webinfo/src/httpreader.py
trunk/display/src/x11.py
trunk/popcorn/src/utils/ipc.py
trunk/popcorn/test/render_manager.py
trunk/record/src/device.py
trunk/record/src/fdsplitter.py
Modified: trunk/DEPRECATED/ipc.py
==============================================================================
--- trunk/DEPRECATED/ipc.py (original)
+++ trunk/DEPRECATED/ipc.py Wed Feb 13 13:43:19 2008
@@ -189,7 +189,7 @@
self.socket.setblocking(False)
self.socket.bind(address)
self.socket.listen(5)
- self._monitor =
kaa.notifier.WeakSocketDispatcher(self.handle_connection)
+ self._monitor = kaa.notifier.WeakIOMonitor(self.handle_connection)
self._monitor.register(self.socket.fileno())
# Remove socket file and close clients on shutdown
kaa.signals["shutdown"].connect_weak(self.close)
@@ -270,10 +270,10 @@
self.socket = sock
self.server = server_or_address
- self._rmon = kaa.notifier.WeakSocketDispatcher(self.handle_read)
+ self._rmon = kaa.notifier.WeakIOMonitor(self.handle_read)
self._rmon.register(self.socket.fileno(), kaa.notifier.IO_READ)
- self._wmon = kaa.notifier.WeakSocketDispatcher(self.handle_write)
+ self._wmon = kaa.notifier.WeakIOMonitor(self.handle_write)
#self._wmon.register(self.socket.fileno(), kaa.notifier.IO_WRITE)
self.signals = {
Modified: trunk/DEPRECATED/player/src/xine.py
==============================================================================
--- trunk/DEPRECATED/player/src/xine.py (original)
+++ trunk/DEPRECATED/player/src/xine.py Wed Feb 13 13:43:19 2008
@@ -43,7 +43,7 @@
self._status.start(0.1)
self._status_last = None
- monitor = kaa.notifier.WeakSocketDispatcher(self._handle_line)
+ monitor = kaa.notifier.WeakIOMonitor(self._handle_line)
monitor.register(sys.stdin.fileno())
flags = fcntl.fcntl(sys.stdin.fileno(), fcntl.F_GETFL)
fcntl.fcntl(sys.stdin.fileno(), fcntl.F_SETFL, flags | os.O_NONBLOCK)
Modified: trunk/WIP/bluetooth.py
==============================================================================
--- trunk/WIP/bluetooth.py (original)
+++ trunk/WIP/bluetooth.py Wed Feb 13 13:43:19 2008
@@ -42,7 +42,7 @@
raise ImportError('pybluez no installed')
# kaa.notifier imports
-from kaa.notifier import SocketDispatcher, IO_WRITE, WeakOneShotTimer, Signal
+from kaa.notifier import IOMonitor, IO_WRITE, WeakOneShotTimer, Signal
class Bluetooth(object):
"""
@@ -88,7 +88,7 @@
except Exception, e:
if e.args[0] == 11:
# doing the connect, just wait until we can write
- SocketDispatcher(self._write).register(self._sock.fileno(),
IO_WRITE)
+ IOMonitor(self._write).register(self._sock.fileno(), IO_WRITE)
elif e.args[0] == 16:
# busy, try again later
self._sock = None
@@ -127,7 +127,7 @@
raise IOError(e.args)
self._sock.send('AT+CMER=3,2,0,0,0\r')
self.signals['connected'].emit()
- SocketDispatcher(self._read).register(self._sock.fileno())
+ IOMonitor(self._read).register(self._sock.fileno())
return False
Modified: trunk/WIP/webinfo/src/httpreader.py
==============================================================================
--- trunk/WIP/webinfo/src/httpreader.py (original)
+++ trunk/WIP/webinfo/src/httpreader.py Wed Feb 13 13:43:19 2008
@@ -33,7 +33,7 @@
import sys
import cStringIO
-from kaa.notifier import Signal, MainThreadCallback, Thread, SocketDispatcher
+from kaa.notifier import Signal, MainThreadCallback, Thread, IOMonitor
import kaa.notifier
class HTTPReader(urllib.FancyURLopener):
Modified: trunk/display/src/x11.py
==============================================================================
--- trunk/display/src/x11.py (original)
+++ trunk/display/src/x11.py Wed Feb 13 13:43:19 2008
@@ -103,7 +103,7 @@
self._display = _X11.X11Display(dispname)
self._windows = {}
- dispatcher = kaa.WeakSocketDispatcher(self.handle_events)
+ dispatcher = kaa.WeakIOMonitor(self.handle_events)
dispatcher.register(self.socket)
# Also connect to the step signal. It is a bad hack, but when
# drawing is done, the socket is read and we will miss keypress
Modified: trunk/popcorn/src/utils/ipc.py
==============================================================================
--- trunk/popcorn/src/utils/ipc.py (original)
+++ trunk/popcorn/src/utils/ipc.py Wed Feb 13 13:43:19 2008
@@ -181,7 +181,7 @@
to the parent and need to implement the function the parent is calling.
"""
def __init__(self):
- monitor = kaa.WeakSocketDispatcher(self._handle_line)
+ monitor = kaa.WeakIOMonitor(self._handle_line)
monitor.register(sys.stdin.fileno())
flags = fcntl.fcntl(sys.stdin.fileno(), fcntl.F_GETFL)
fcntl.fcntl(sys.stdin.fileno(), fcntl.F_SETFL, flags | os.O_NONBLOCK)
Modified: trunk/popcorn/test/render_manager.py
==============================================================================
--- trunk/popcorn/test/render_manager.py (original)
+++ trunk/popcorn/test/render_manager.py Wed Feb 13 13:43:19 2008
@@ -120,7 +120,7 @@
pass
print "Setup fifo", fifo
- kaa.WeakSocketDispatcher(self._new_frame, fifo).register(fifo)
+ kaa.WeakIOMonitor(self._new_frame, fifo).register(fifo)
def _new_frame(self, fifo):
Modified: trunk/record/src/device.py
==============================================================================
--- trunk/record/src/device.py (original)
+++ trunk/record/src/device.py Wed Feb 13 13:43:19 2008
@@ -80,7 +80,7 @@
def __init__(self, device, channels):
"""
Init the device by creating a C++ object for DVB and create a
- SocketDispatcher for the file descriptor. The C++ objecty will
+ IOMonitor for the file descriptor. The C++ objecty will
register and unregister from notifier.
"""
self.adapter = device
Modified: trunk/record/src/fdsplitter.py
==============================================================================
--- trunk/record/src/fdsplitter.py (original)
+++ trunk/record/src/fdsplitter.py Wed Feb 13 13:43:19 2008
@@ -57,7 +57,7 @@
def __init__(self, filedesc, inputtype = INPUT_RAW):
"""
Init the device by creating a C++ object and create a
- SocketDispatcher for the file descriptor. The C++ objecty will
+ IOMonitor for the file descriptor. The C++ objecty will
register and unregister from notifier.
"""
# counter for added chains
@@ -76,7 +76,7 @@
self._fdsplitter.set_input_type(inputtype)
# create socket dispatcher
- self.sd = kaa.SocketDispatcher( self._fdsplitter.read_fd_data )
+ self.sd = kaa.IOMonitor( self._fdsplitter.read_fd_data )
def add_filter_chain(self, filter_chain):
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog