Blob Blame History Raw
/* Copyright (C) 2012 The giomm Development Team
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
 */

#include <glibmm/object.h>
#include <giomm/converter.h>

_DEFS(giomm,gio)
_PINCLUDE(glibmm/private/object_p.h)

namespace Gio
{

_WRAP_ENUM(ZlibCompressorFormat,  GZlibCompressorFormat)

class FileInfo;

/** ZlibCompressor - Zlib compressor.
 * ZlibCompressor is an implementation of Converter that compresses data using
 * zlib.
 * @newin{2,34}
 */
class ZlibCompressor : public Glib::Object, public Converter
{
  _CLASS_GOBJECT(ZlibCompressor, GZlibCompressor, G_ZLIB_COMPRESSOR, Glib::Object, GObject)
  _IMPLEMENTS_INTERFACE(Converter)

protected:
  _WRAP_CTOR(ZlibCompressor(ZlibCompressorFormat format, int level), g_zlib_compressor_new)

public:
  _WRAP_METHOD_DOCS_ONLY(g_zlib_compressor_new)
  _WRAP_CREATE(ZlibCompressorFormat format, int level)

  _WRAP_METHOD(Glib::RefPtr<FileInfo> get_file_info(), g_zlib_compressor_get_file_info)
  _WRAP_METHOD(Glib::RefPtr<const FileInfo> get_file_info() const, g_zlib_compressor_get_file_info, constversion)

  _WRAP_METHOD(void set_file_info(const Glib::RefPtr<FileInfo>& file_info), g_zlib_compressor_set_file_info)

  _WRAP_PROPERTY("file-info", Glib::RefPtr<FileInfo>)
  _WRAP_PROPERTY("format", ZlibCompressorFormat)
  _WRAP_PROPERTY("level", int)
};

} // namespace Gio