]> git.tdb.fi Git - libs/core.git/blobdiff - source/io/zlibcompressed.h
Add a constructor to ZlibCompressed that takes a mode parameter
[libs/core.git] / source / io / zlibcompressed.h
index feb21c635d406ea567708119fd2c9d467f697f0c..30894cb9cf2345e7e5d79ed742dfe74e115ab99c 100644 (file)
@@ -3,6 +3,7 @@
 
 #include <stdexcept>
 #include <string>
+#include <sigc++/trackable.h>
 #include "base.h"
 
 namespace Msp {
@@ -27,7 +28,7 @@ operates on top of another I/O object.
 To ensure proper termination of the compressed data stream, the ZlibCompressed
 object must be destroyed before the underlying object is closed.
 */
-class ZlibCompressed: public Base
+class ZlibCompressed: public Base, public sigc::trackable
 {
 private:
        struct Private;
@@ -45,6 +46,14 @@ public:
        compression quality, ranging from 1 (fastest) to 9 (best compression). */
        ZlibCompressed(Base &, unsigned level = 9);
 
+       /** Creates a zlib de/compression object.  Mode must be either read or
+       write, and compatible with the underlying object. */
+       ZlibCompressed(Base &, Mode, unsigned level = 9);
+
+private:
+       void init(unsigned);
+
+public:
        virtual ~ZlibCompressed();
 
        void flush();