Merged revisions 6293,6296-6306,6308 via svnmerge from
[ardour.git] / libs / glibmm2 / gio / giomm / unixinputstream.cc
1 // Generated by gtkmmproc -- DO NOT MODIFY!
2
3
4 #include <giomm/unixinputstream.h>
5 #include <giomm/private/unixinputstream_p.h>
6
7 // -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
8
9 /* Copyright (C) 2007 The gtkmm Development Team
10  *
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.
15  *
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.
20  *
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.
24  */
25
26 #include <gio/gio.h>
27 #include <gio/gunixinputstream.h>
28
29 namespace
30 {
31 } // anonymous namespace
32
33
34 namespace Glib
35 {
36
37 Glib::RefPtr<Gio::UnixInputStream> wrap(GUnixInputStream* object, bool take_copy)
38 {
39   return Glib::RefPtr<Gio::UnixInputStream>( dynamic_cast<Gio::UnixInputStream*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
40   //We use dynamic_cast<> in case of multiple inheritance.
41 }
42
43 } /* namespace Glib */
44
45
46 namespace Gio
47 {
48
49
50 /* The *_Class implementation: */
51
52 const Glib::Class& UnixInputStream_Class::init()
53 {
54   if(!gtype_) // create the GType if necessary
55   {
56     // Glib::Class has to know the class init function to clone custom types.
57     class_init_func_ = &UnixInputStream_Class::class_init_function;
58
59     // This is actually just optimized away, apparently with no harm.
60     // Make sure that the parent type has been created.
61     //CppClassParent::CppObjectType::get_type();
62
63     // Create the wrapper type, with the same class/instance size as the base type.
64     register_derived_type(g_unix_input_stream_get_type());
65
66     // Add derived versions of interfaces, if the C type implements any interfaces:
67
68   }
69
70   return *this;
71 }
72
73 void UnixInputStream_Class::class_init_function(void* g_class, void* class_data)
74 {
75   BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
76   CppClassParent::class_init_function(klass, class_data);
77
78 #ifdef GLIBMM_VFUNCS_ENABLED
79 #endif //GLIBMM_VFUNCS_ENABLED
80
81 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
82 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
83 }
84
85 #ifdef GLIBMM_VFUNCS_ENABLED
86 #endif //GLIBMM_VFUNCS_ENABLED
87
88 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
89 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
90
91
92 Glib::ObjectBase* UnixInputStream_Class::wrap_new(GObject* object)
93 {
94   return new UnixInputStream((GUnixInputStream*)object);
95 }
96
97
98 /* The implementation: */
99
100 GUnixInputStream* UnixInputStream::gobj_copy()
101 {
102   reference();
103   return gobj();
104 }
105
106 UnixInputStream::UnixInputStream(const Glib::ConstructParams& construct_params)
107 :
108   Gio::InputStream(construct_params)
109 {
110
111 }
112
113 UnixInputStream::UnixInputStream(GUnixInputStream* castitem)
114 :
115   Gio::InputStream((GInputStream*)(castitem))
116 {}
117
118
119 UnixInputStream::~UnixInputStream()
120 {}
121
122
123 UnixInputStream::CppClassType UnixInputStream::unixinputstream_class_; // initialize static member
124
125 GType UnixInputStream::get_type()
126 {
127   return unixinputstream_class_.init().get_type();
128 }
129
130 GType UnixInputStream::get_base_type()
131 {
132   return g_unix_input_stream_get_type();
133 }
134
135
136 UnixInputStream::UnixInputStream(int fd, bool close_fd_at_close)
137 :
138   // Mark this class as non-derived to allow C++ vfuncs to be skipped.
139   Glib::ObjectBase(0),
140   Gio::InputStream(Glib::ConstructParams(unixinputstream_class_.init(), "fd", fd, "close_fd_at_close", static_cast<int>(close_fd_at_close), static_cast<char*>(0)))
141 {
142   
143
144 }
145
146 Glib::RefPtr<UnixInputStream> UnixInputStream::create(int fd, bool close_fd_at_close)
147 {
148   return Glib::RefPtr<UnixInputStream>( new UnixInputStream(fd, close_fd_at_close) );
149 }
150
151
152 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
153 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
154
155 #ifdef GLIBMM_VFUNCS_ENABLED
156 #endif //GLIBMM_VFUNCS_ENABLED
157
158
159 } // namespace Gio
160
161