1 // Generated by gtkmmproc -- DO NOT MODIFY!
4 #include <giomm/fileoutputstream.h>
5 #include <giomm/private/fileoutputstream_p.h>
7 // -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
9 /* Copyright (C) 2007 The gtkmm Development Team
11 * This library is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU Library General Public
13 * License as published by the Free Software Foundation; either
14 * version 2 of the License, or (at your option) any later version.
16 * This library is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 * Library General Public License for more details.
21 * You should have received a copy of the GNU Library General Public
22 * License along with this library; if not, write to the Free
23 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
28 #include <glibmm/error.h>
29 #include <glibmm/exceptionhandler.h>
30 #include "slot_async.h"
35 #ifdef GLIBMM_EXCEPTIONS_ENABLED
36 Glib::RefPtr<FileInfo> FileOutputStream::query_info(const Glib::RefPtr<Cancellable>& cancellable, const std::string& attributes)
38 Glib::RefPtr<FileInfo> FileOutputStream::query_info(const Glib::RefPtr<Cancellable>& cancellable, const std::string& attributes, std::auto_ptr<Glib::Error>& error)
39 #endif //GLIBMM_EXCEPTIONS_ENABLED
42 Glib::RefPtr<FileInfo> retvalue = Glib::wrap(g_file_output_stream_query_info(gobj(), g_strdup((attributes).c_str()), const_cast<GCancellable*>(Glib::unwrap(cancellable)), &(gerror)));
43 #ifdef GLIBMM_EXCEPTIONS_ENABLED
45 ::Glib::Error::throw_exception(gerror);
48 error = ::Glib::Error::throw_exception(gerror);
49 #endif //GLIBMM_EXCEPTIONS_ENABLED
52 retvalue->reference(); //The function does not do a ref for us.
56 #ifdef GLIBMM_EXCEPTIONS_ENABLED
57 Glib::RefPtr<FileInfo> FileOutputStream::query_info(const std::string& attributes)
59 Glib::RefPtr<FileInfo> FileOutputStream::query_info(const std::string& attributes, std::auto_ptr<Glib::Error>& error)
60 #endif //GLIBMM_EXCEPTIONS_ENABLED
63 Glib::RefPtr<FileInfo> retvalue = Glib::wrap(g_file_output_stream_query_info(gobj(), g_strdup((attributes).c_str()), NULL, &(gerror)));
64 #ifdef GLIBMM_EXCEPTIONS_ENABLED
66 ::Glib::Error::throw_exception(gerror);
69 error = ::Glib::Error::throw_exception(gerror);
70 #endif //GLIBMM_EXCEPTIONS_ENABLED
73 retvalue->reference(); //The function does not do a ref for us.
78 FileOutputStream::query_info_async(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, const std::string& attributes, int io_priority)
80 // Create a copy of the slot.
81 // A pointer to it will be passed through the callback's data parameter
82 // and deleted in the callback.
83 SlotAsyncReady* slot_copy = new SlotAsyncReady(slot);
85 g_file_output_stream_query_info_async(gobj(),
86 const_cast<char*>(attributes.c_str()),
89 &SignalProxy_async_callback,
94 FileOutputStream::query_info_async(const SlotAsyncReady& slot, const std::string& attributes, int io_priority)
96 // Create a copy of the slot.
97 // A pointer to it will be passed through the callback's data parameter
98 // and deleted in the callback.
99 SlotAsyncReady* slot_copy = new SlotAsyncReady(slot);
101 g_file_output_stream_query_info_async(gobj(),
102 const_cast<char*>(attributes.c_str()),
105 &SignalProxy_async_callback,
113 } // anonymous namespace
119 Glib::RefPtr<Gio::FileOutputStream> wrap(GFileOutputStream* object, bool take_copy)
121 return Glib::RefPtr<Gio::FileOutputStream>( dynamic_cast<Gio::FileOutputStream*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
122 //We use dynamic_cast<> in case of multiple inheritance.
125 } /* namespace Glib */
132 /* The *_Class implementation: */
134 const Glib::Class& FileOutputStream_Class::init()
136 if(!gtype_) // create the GType if necessary
138 // Glib::Class has to know the class init function to clone custom types.
139 class_init_func_ = &FileOutputStream_Class::class_init_function;
141 // This is actually just optimized away, apparently with no harm.
142 // Make sure that the parent type has been created.
143 //CppClassParent::CppObjectType::get_type();
145 // Create the wrapper type, with the same class/instance size as the base type.
146 register_derived_type(g_file_output_stream_get_type());
148 // Add derived versions of interfaces, if the C type implements any interfaces:
149 Seekable::add_interface(get_type());
156 void FileOutputStream_Class::class_init_function(void* g_class, void* class_data)
158 BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
159 CppClassParent::class_init_function(klass, class_data);
161 #ifdef GLIBMM_VFUNCS_ENABLED
162 #endif //GLIBMM_VFUNCS_ENABLED
164 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
165 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
168 #ifdef GLIBMM_VFUNCS_ENABLED
169 #endif //GLIBMM_VFUNCS_ENABLED
171 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
172 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
175 Glib::ObjectBase* FileOutputStream_Class::wrap_new(GObject* object)
177 return new FileOutputStream((GFileOutputStream*)object);
181 /* The implementation: */
183 GFileOutputStream* FileOutputStream::gobj_copy()
189 FileOutputStream::FileOutputStream(const Glib::ConstructParams& construct_params)
191 Gio::OutputStream(construct_params)
196 FileOutputStream::FileOutputStream(GFileOutputStream* castitem)
198 Gio::OutputStream((GOutputStream*)(castitem))
202 FileOutputStream::~FileOutputStream()
206 FileOutputStream::CppClassType FileOutputStream::fileoutputstream_class_; // initialize static member
208 GType FileOutputStream::get_type()
210 return fileoutputstream_class_.init().get_type();
213 GType FileOutputStream::get_base_type()
215 return g_file_output_stream_get_type();
219 #ifdef GLIBMM_EXCEPTIONS_ENABLED
220 Glib::RefPtr<FileInfo> FileOutputStream::query_info_finish(const Glib::RefPtr<AsyncResult>& result)
222 Glib::RefPtr<FileInfo> FileOutputStream::query_info_finish(const Glib::RefPtr<AsyncResult>& result, std::auto_ptr<Glib::Error>& error)
223 #endif //GLIBMM_EXCEPTIONS_ENABLED
226 Glib::RefPtr<FileInfo> retvalue = Glib::wrap(g_file_output_stream_query_info_finish(gobj(), Glib::unwrap(result), &(gerror)));
227 #ifdef GLIBMM_EXCEPTIONS_ENABLED
229 ::Glib::Error::throw_exception(gerror);
232 error = ::Glib::Error::throw_exception(gerror);
233 #endif //GLIBMM_EXCEPTIONS_ENABLED
236 retvalue->reference(); //The function does not do a ref for us.
241 std::string FileOutputStream::get_etag() const
243 return Glib::convert_return_gchar_ptr_to_stdstring(g_file_output_stream_get_etag(const_cast<GFileOutputStream*>(gobj())));
247 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
248 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
250 #ifdef GLIBMM_VFUNCS_ENABLED
251 #endif //GLIBMM_VFUNCS_ENABLED