]> git.tdb.fi Git - libs/core.git/blobdiff - source/io/base.h
Separate event-related stuff from Base
[libs/core.git] / source / io / base.h
index df63b5b1ed3ed2d5cfbd4797bc319919fa110794..8e4d4a547243ec86a867c6fce4c2ba8122c8f11b 100644 (file)
@@ -8,8 +8,6 @@
 namespace Msp {
 namespace IO {
 
-struct Handle;
-
 /**
 Common interface for all I/O objects.
 
@@ -19,10 +17,6 @@ leaving stale pointers in an EventDispatcher.
 class Base
 {
 public:
-       /** Emitted when there is data available for reading.  If all data is not
-       read, the signal is emitted again immediately. */
-       sigc::signal<void> signal_data_available;
-
        /** Emitted when there is no more data to be read. */
        sigc::signal<void> signal_end_of_file;
 
@@ -33,17 +27,12 @@ public:
        /** Emitted when the I/O object has closed. */
        sigc::signal<void> signal_closed;
 
-       /** Emitted when the mask of interesting events changes.  Mainly for use by
-       EventDispatcher. */
-       sigc::signal<void, PollEvent> signal_events_changed;
-
        /** Emitted when the object is deleted.  Mainly for use by
        EventDispatcher. */
        sigc::signal<void> signal_deleted;
 
 protected:
        Mode mode;
-       PollEvent events;
        bool eof_flag;
 
        Base();
@@ -96,24 +85,6 @@ public:
 
        /** Returns the end-of-file flag. */
        bool eof() const { return eof_flag; }
-
-protected:
-       void set_events(PollEvent);
-
-public:
-       /** Returns a mask of the currently interesting events.  Used by
-       EventDispatcher. */
-       PollEvent get_events() const { return events; }
-
-       /** Returns a handle for polling.  Should throw if the object does not have
-       an event handle. */
-       virtual const Handle &get_event_handle() = 0;
-
-       /** Notifies the object of an event.  Used by EventDispatcher. */
-       void event(PollEvent);
-
-protected:
-       virtual void on_event(PollEvent) { }
 };
 
 } // namespace IO