1 // Generated by gtkmmproc -- DO NOT MODIFY!
4 #include <giomm/fileinputstream.h>
5 #include <giomm/private/fileinputstream_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.
27 #include "slot_async.h"
28 #include <glibmm/exceptionhandler.h>
33 #ifdef GLIBMM_EXCEPTIONS_ENABLED
34 Glib::RefPtr<FileInfo> FileInputStream::query_info(const Glib::RefPtr<Cancellable>& cancellable, const std::string& attributes)
36 Glib::RefPtr<FileInfo> FileInputStream::query_info(const Glib::RefPtr<Cancellable>& cancellable, const std::string& attributes, std::auto_ptr<Glib::Error>& error)
37 #endif //GLIBMM_EXCEPTIONS_ENABLED
40 Glib::RefPtr<FileInfo> retvalue = Glib::wrap(g_file_input_stream_query_info(gobj(), g_strdup((attributes).c_str()), const_cast<GCancellable*>(Glib::unwrap(cancellable)), &(gerror)));
41 #ifdef GLIBMM_EXCEPTIONS_ENABLED
43 ::Glib::Error::throw_exception(gerror);
46 error = ::Glib::Error::throw_exception(gerror);
47 #endif //GLIBMM_EXCEPTIONS_ENABLED
52 #ifdef GLIBMM_EXCEPTIONS_ENABLED
53 Glib::RefPtr<FileInfo> FileInputStream::query_info(const std::string& attributes)
55 Glib::RefPtr<FileInfo> FileInputStream::query_info(const std::string& attributes, std::auto_ptr<Glib::Error>& error)
56 #endif //GLIBMM_EXCEPTIONS_ENABLED
59 Glib::RefPtr<FileInfo> retvalue = Glib::wrap(g_file_input_stream_query_info(gobj(), g_strdup((attributes).c_str()), NULL, &(gerror)));
60 #ifdef GLIBMM_EXCEPTIONS_ENABLED
62 ::Glib::Error::throw_exception(gerror);
65 error = ::Glib::Error::throw_exception(gerror);
66 #endif //GLIBMM_EXCEPTIONS_ENABLED
72 FileInputStream::query_info_async(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, const std::string& attributes, int io_priority)
74 // Create a copy of the slot.
75 // A pointer to it will be passed through the callback's data parameter
76 // and deleted in the callback.
77 SlotAsyncReady* slot_copy = new SlotAsyncReady(slot);
79 g_file_input_stream_query_info_async(gobj(),
80 const_cast<char*>(attributes.c_str()),
83 &SignalProxy_async_callback,
88 FileInputStream::query_info_async(const SlotAsyncReady& slot, const std::string& attributes, int io_priority)
90 // Create a copy of the slot.
91 // A pointer to it will be passed through the callback's data parameter
92 // and deleted in the callback.
93 SlotAsyncReady* slot_copy = new SlotAsyncReady(slot);
95 g_file_input_stream_query_info_async(gobj(),
96 const_cast<char*>(attributes.c_str()),
99 &SignalProxy_async_callback,
107 } // anonymous namespace
113 Glib::RefPtr<Gio::FileInputStream> wrap(GFileInputStream* object, bool take_copy)
115 return Glib::RefPtr<Gio::FileInputStream>( dynamic_cast<Gio::FileInputStream*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
116 //We use dynamic_cast<> in case of multiple inheritance.
119 } /* namespace Glib */
126 /* The *_Class implementation: */
128 const Glib::Class& FileInputStream_Class::init()
130 if(!gtype_) // create the GType if necessary
132 // Glib::Class has to know the class init function to clone custom types.
133 class_init_func_ = &FileInputStream_Class::class_init_function;
135 // This is actually just optimized away, apparently with no harm.
136 // Make sure that the parent type has been created.
137 //CppClassParent::CppObjectType::get_type();
139 // Create the wrapper type, with the same class/instance size as the base type.
140 register_derived_type(g_file_input_stream_get_type());
142 // Add derived versions of interfaces, if the C type implements any interfaces:
143 Seekable::add_interface(get_type());
150 void FileInputStream_Class::class_init_function(void* g_class, void* class_data)
152 BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
153 CppClassParent::class_init_function(klass, class_data);
155 #ifdef GLIBMM_VFUNCS_ENABLED
156 #endif //GLIBMM_VFUNCS_ENABLED
158 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
159 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
162 #ifdef GLIBMM_VFUNCS_ENABLED
163 #endif //GLIBMM_VFUNCS_ENABLED
165 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
166 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
169 Glib::ObjectBase* FileInputStream_Class::wrap_new(GObject* object)
171 return new FileInputStream((GFileInputStream*)object);
175 /* The implementation: */
177 GFileInputStream* FileInputStream::gobj_copy()
183 FileInputStream::FileInputStream(const Glib::ConstructParams& construct_params)
185 Gio::InputStream(construct_params)
190 FileInputStream::FileInputStream(GFileInputStream* castitem)
192 Gio::InputStream((GInputStream*)(castitem))
196 FileInputStream::~FileInputStream()
200 FileInputStream::CppClassType FileInputStream::fileinputstream_class_; // initialize static member
202 GType FileInputStream::get_type()
204 return fileinputstream_class_.init().get_type();
207 GType FileInputStream::get_base_type()
209 return g_file_input_stream_get_type();
213 #ifdef GLIBMM_EXCEPTIONS_ENABLED
214 Glib::RefPtr<FileInfo> FileInputStream::query_info_finish(const Glib::RefPtr<AsyncResult>& result)
216 Glib::RefPtr<FileInfo> FileInputStream::query_info_finish(const Glib::RefPtr<AsyncResult>& result, std::auto_ptr<Glib::Error>& error)
217 #endif //GLIBMM_EXCEPTIONS_ENABLED
220 Glib::RefPtr<FileInfo> retvalue = Glib::wrap(g_file_input_stream_query_info_finish(gobj(), Glib::unwrap(result), &(gerror)));
221 #ifdef GLIBMM_EXCEPTIONS_ENABLED
223 ::Glib::Error::throw_exception(gerror);
226 error = ::Glib::Error::throw_exception(gerror);
227 #endif //GLIBMM_EXCEPTIONS_ENABLED
234 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
235 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
237 #ifdef GLIBMM_VFUNCS_ENABLED
238 #endif //GLIBMM_VFUNCS_ENABLED