Update of /cvsroot/pclasses/pclasses2/src/IO
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28075/src/IO
Modified Files:
IODevice.cpp IOListener.cpp
Log Message:
- More work on asynchronous I/O
Index: IOListener.cpp
===================================================================
RCS file: /cvsroot/pclasses/pclasses2/src/IO/IOListener.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- IOListener.cpp 29 May 2005 17:48:31 -0000 1.1
+++ IOListener.cpp 3 Jun 2005 09:55:44 -0000 1.2
@@ -24,17 +24,31 @@
namespace IO {
-IOListener::IOListener(IODevice& dev, int flags)
+IOListener::IOListener(IODevice& dev)
: _dev(dev)
{
- dev.addListener(this);
}
IOListener::~IOListener()
{
- _dev.removeListener(this);
}
+IODevice& IOListener::device() const throw()
+{
+ return _dev;
+}
+
+void IOListener::onRead()
+{
+}
+
+void IOListener::onWrite()
+{
+}
+
+void IOListener::onError()
+{
+}
}
Index: IODevice.cpp
===================================================================
RCS file: /cvsroot/pclasses/pclasses2/src/IO/IODevice.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- IODevice.cpp 29 May 2005 17:48:31 -0000 1.9
+++ IODevice.cpp 3 Jun 2005 09:55:44 -0000 1.10
@@ -197,15 +197,6 @@
return _filter;
}
-void IODevice::addListener(IOListener*) throw(IOError)
-{
- throw IOError(0, "Listening on this device is not supported", P_SOURCEINFO);
-}
-
-void IODevice::removeListener(IOListener*) throw()
-{
-}
-
size_t IODevice::_peek(char* buffer, size_t count) throw(IOError)
{
return 0;
|