]> git.tdb.fi Git - libs/core.git/blobdiff - source/io/buffered.h
Implement controls for file descriptor inheritance
[libs/core.git] / source / io / buffered.h
index 36d2a1165a3e52b7413397bf01575984efa3ac49..da917e0c5a6585027a469ad4fa5dc814db517c29 100644 (file)
@@ -1,12 +1,13 @@
 #ifndef MSP_IO_BUFFERED_H_
 #define MSP_IO_BUFFERED_H_
 
+#include <sigc++/trackable.h>
 #include "base.h"
 
 namespace Msp {
 namespace IO {
 
-class Buffered: public Base
+class Buffered: public Base, public sigc::trackable
 {
 private:
        Base &below;
@@ -20,6 +21,9 @@ public:
        Buffered(Base &, unsigned =8192);
        ~Buffered();
 
+       virtual void set_block(bool);
+       virtual void set_inherit(bool);
+
        void flush();
 
 protected:
@@ -31,13 +35,13 @@ public:
        bool getline(std::string &);
        int get();
 
+       virtual const Handle &get_handle(Mode);
+
 private:
        void set_op(Mode);
 public:
        Mode get_current_op() const { return cur_op; }
        unsigned get_current_size() const;
-
-       virtual Handle get_event_handle();
 };
 
 } // namespace IO