1/* Copyright (C) 2012 The giomm Development Team
2 *
3 * This library is free software; you can redistribute it and/or
4 * modify it under the terms of the GNU Lesser General Public
5 * License as published by the Free Software Foundation; either
6 * version 2.1 of the License, or (at your option) any later version.
7 *
8 * This library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 * Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public
14 * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#include <giomm/filteroutputstream.h>
18#include <giomm/pollableoutputstream.h>
19
20_DEFS(giomm,gio)
21_PINCLUDE(giomm/private/filteroutputstream_p.h)
22
23namespace Gio
24{
25
26class GIOMM_API Converter;
27class GIOMM_API OutputStream;
28
29/** ConverterOutputstream - Converter Output Stream.
30 * Converter output stream implements OutputStream and allows conversion of
31 * data of various types during reading.  ConverterOutputStream also implements
32 * the PollableOutputStream interface.
33 * @newin{2,34}
34 */
35class GIOMM_API ConverterOutputStream : public FilterOutputStream,
36                                        public PollableOutputStream
37{
38  _CLASS_GOBJECT(ConverterOutputStream, GConverterOutputStream, G_CONVERTER_OUTPUT_STREAM, FilterOutputStream, GFilterOutputStream, , , GIOMM_API)
39  _IMPLEMENTS_INTERFACE(PollableOutputStream)
40
41protected:
42  _WRAP_CTOR(ConverterOutputStream(const Glib::RefPtr<OutputStream>& base_stream, const Glib::RefPtr<Converter>& converter), g_converter_output_stream_new)
43
44public:
45  _WRAP_METHOD_DOCS_ONLY(g_converter_output_stream_new)
46  _WRAP_CREATE(const Glib::RefPtr<OutputStream>& base_stream, const Glib::RefPtr<Converter>& converter)
47
48  // The C function returns an unreffed private member.
49  _WRAP_METHOD(Glib::RefPtr<Converter> get_converter(), g_converter_output_stream_get_converter, refreturn)
50  _WRAP_METHOD(Glib::RefPtr<const Converter> get_converter() const, g_converter_output_stream_get_converter, constversion)
51
52  _WRAP_PROPERTY("converter", Glib::RefPtr<Converter>)
53};
54
55} // namespace Gio
56