summaryrefslogtreecommitdiff
path: root/gio/src/zlibcompressor.hg
blob: 402701d57cfcbd7f3b4077f158bcea30c38259ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/* 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/>.
 */

_CONFIGINCLUDE(giommconfig.h)

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

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

namespace Gio
{

_WRAP_ENUM(ZlibCompressorFormat,  GZlibCompressorFormat, decl_prefix GIOMM_API)

class GIOMM_API FileInfo;

/** ZlibCompressor - Zlib compressor.
 * ZlibCompressor is an implementation of Converter that compresses data using
 * zlib.
 * @newin{2,34}
 */
class GIOMM_API ZlibCompressor : public Glib::Object, public Converter
{
  _CLASS_GOBJECT(ZlibCompressor, GZlibCompressor, G_ZLIB_COMPRESSOR, Glib::Object, GObject, , , GIOMM_API)
  _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