1
// Generated by gtkmmproc -- DO NOT MODIFY!
4
#include <giomm/inetaddress.h>
5
#include <giomm/private/inetaddress_p.h>
7
// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
9
/* Copyright (C) 2008 Jonathon Jongsma
11
* This library is free software; you can redistribute it and/or
12
* modify it under the terms of the GNU Lesser General Public
13
* License as published by the Free Software Foundation; either
14
* version 2.1 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
* Lesser General Public License for more details.
21
* You should have received a copy of the GNU Lesser 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.
35
} // anonymous namespace
41
Glib::RefPtr<Gio::InetAddress> wrap(GInetAddress* object, bool take_copy)
43
return Glib::RefPtr<Gio::InetAddress>( dynamic_cast<Gio::InetAddress*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
44
//We use dynamic_cast<> in case of multiple inheritance.
47
} /* namespace Glib */
54
/* The *_Class implementation: */
56
const Glib::Class& InetAddress_Class::init()
58
if(!gtype_) // create the GType if necessary
60
// Glib::Class has to know the class init function to clone custom types.
61
class_init_func_ = &InetAddress_Class::class_init_function;
63
// This is actually just optimized away, apparently with no harm.
64
// Make sure that the parent type has been created.
65
//CppClassParent::CppObjectType::get_type();
67
// Create the wrapper type, with the same class/instance size as the base type.
68
register_derived_type(g_inet_address_get_type());
70
// Add derived versions of interfaces, if the C type implements any interfaces:
78
void InetAddress_Class::class_init_function(void* g_class, void* class_data)
80
BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
81
CppClassParent::class_init_function(klass, class_data);
83
#ifdef GLIBMM_VFUNCS_ENABLED
84
#endif //GLIBMM_VFUNCS_ENABLED
86
#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
87
#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
90
#ifdef GLIBMM_VFUNCS_ENABLED
91
#endif //GLIBMM_VFUNCS_ENABLED
93
#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
94
#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
97
Glib::ObjectBase* InetAddress_Class::wrap_new(GObject* object)
99
return new InetAddress((GInetAddress*)object);
103
/* The implementation: */
105
GInetAddress* InetAddress::gobj_copy()
111
InetAddress::InetAddress(const Glib::ConstructParams& construct_params)
113
Glib::Object(construct_params)
118
InetAddress::InetAddress(GInetAddress* castitem)
120
Glib::Object((GObject*)(castitem))
124
InetAddress::~InetAddress()
128
InetAddress::CppClassType InetAddress::inetaddress_class_; // initialize static member
130
GType InetAddress::get_type()
132
return inetaddress_class_.init().get_type();
136
GType InetAddress::get_base_type()
138
return g_inet_address_get_type();
142
InetAddress::InetAddress(const Glib::ustring& string)
144
// Mark this class as non-derived to allow C++ vfuncs to be skipped.
146
Glib::Object(Glib::ConstructParams(inetaddress_class_.init(), "string", string.c_str(), static_cast<char*>(0)))
152
InetAddress::InetAddress(const guint8 * bytes, SocketFamily family)
154
// Mark this class as non-derived to allow C++ vfuncs to be skipped.
156
Glib::Object(Glib::ConstructParams(inetaddress_class_.init(), "bytes", bytes, "family", ((GSocketFamily)(family)), static_cast<char*>(0)))
162
InetAddress::InetAddress(SocketFamily family)
164
// Mark this class as non-derived to allow C++ vfuncs to be skipped.
166
Glib::Object(Glib::ConstructParams(inetaddress_class_.init(), "family", ((GSocketFamily)(family)), static_cast<char*>(0)))
172
Glib::RefPtr<InetAddress> InetAddress::create(const Glib::ustring& string)
174
return Glib::RefPtr<InetAddress>( new InetAddress(string) );
176
Glib::RefPtr<InetAddress> InetAddress::create(const guint8 * bytes, SocketFamily family)
178
return Glib::RefPtr<InetAddress>( new InetAddress(bytes, family) );
180
Glib::RefPtr<InetAddress> InetAddress::create(SocketFamily family)
182
return Glib::RefPtr<InetAddress>( new InetAddress(family) );
184
const guint8* InetAddress::to_bytes() const
186
return g_inet_address_to_bytes(const_cast<GInetAddress*>(gobj()));
189
Glib::ustring InetAddress::to_string() const
191
return Glib::convert_return_gchar_ptr_to_ustring(g_inet_address_to_string(const_cast<GInetAddress*>(gobj())));
194
SocketFamily InetAddress::get_family() const
196
return ((SocketFamily)(g_inet_address_get_family(const_cast<GInetAddress*>(gobj()))));
199
bool InetAddress::get_is_any() const
201
return g_inet_address_get_is_any(const_cast<GInetAddress*>(gobj()));
204
bool InetAddress::get_is_link_local() const
206
return g_inet_address_get_is_link_local(const_cast<GInetAddress*>(gobj()));
209
bool InetAddress::get_is_loopback() const
211
return g_inet_address_get_is_loopback(const_cast<GInetAddress*>(gobj()));
214
bool InetAddress::get_is_mc_global() const
216
return g_inet_address_get_is_mc_global(const_cast<GInetAddress*>(gobj()));
219
bool InetAddress::get_is_mc_link_local() const
221
return g_inet_address_get_is_mc_link_local(const_cast<GInetAddress*>(gobj()));
224
bool InetAddress::get_is_mc_node_local() const
226
return g_inet_address_get_is_mc_node_local(const_cast<GInetAddress*>(gobj()));
229
bool InetAddress::get_is_mc_org_local() const
231
return g_inet_address_get_is_mc_org_local(const_cast<GInetAddress*>(gobj()));
234
bool InetAddress::get_is_mc_site_local() const
236
return g_inet_address_get_is_mc_site_local(const_cast<GInetAddress*>(gobj()));
239
bool InetAddress::get_is_multicast() const
241
return g_inet_address_get_is_multicast(const_cast<GInetAddress*>(gobj()));
244
bool InetAddress::get_is_site_local() const
246
return g_inet_address_get_is_site_local(const_cast<GInetAddress*>(gobj()));
249
gsize InetAddress::get_native_size() const
251
return g_inet_address_get_native_size(const_cast<GInetAddress*>(gobj()));
255
#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
256
#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
258
#ifdef GLIBMM_VFUNCS_ENABLED
259
#endif //GLIBMM_VFUNCS_ENABLED