~kklimonda/ubuntu/natty/glibmm2.4/update

« back to all changes in this revision

Viewing changes to gio/giomm/inetaddress.cc

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2009-09-09 11:22:01 UTC
  • mfrom: (1.2.40 upstream)
  • Revision ID: james.westby@ubuntu.com-20090909112201-1d7zaa574r0ayghb
Tags: 2.21.5-0ubuntu1
New upstream version

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
// Generated by gtkmmproc -- DO NOT MODIFY!
2
 
 
3
 
 
4
 
#include <giomm/inetaddress.h>
5
 
#include <giomm/private/inetaddress_p.h>
6
 
 
7
 
// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
8
 
 
9
 
/* Copyright (C) 2008 Jonathon Jongsma
10
 
 *
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.
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
 
 * Lesser General Public License for more details.
20
 
 *
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.
24
 
 */
25
 
 
26
 
#include <gio/gio.h>
27
 
 
28
 
namespace Gio
29
 
{
30
 
 
31
 
} //namespace Gio
32
 
 
33
 
namespace
34
 
{
35
 
} // anonymous namespace
36
 
 
37
 
 
38
 
namespace Glib
39
 
{
40
 
 
41
 
Glib::RefPtr<Gio::InetAddress> wrap(GInetAddress* object, bool take_copy)
42
 
{
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.
45
 
}
46
 
 
47
 
} /* namespace Glib */
48
 
 
49
 
 
50
 
namespace Gio
51
 
{
52
 
 
53
 
 
54
 
/* The *_Class implementation: */
55
 
 
56
 
const Glib::Class& InetAddress_Class::init()
57
 
{
58
 
  if(!gtype_) // create the GType if necessary
59
 
  {
60
 
    // Glib::Class has to know the class init function to clone custom types.
61
 
    class_init_func_ = &InetAddress_Class::class_init_function;
62
 
 
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();
66
 
 
67
 
    // Create the wrapper type, with the same class/instance size as the base type.
68
 
    register_derived_type(g_inet_address_get_type());
69
 
 
70
 
    // Add derived versions of interfaces, if the C type implements any interfaces:
71
 
 
72
 
  }
73
 
 
74
 
  return *this;
75
 
}
76
 
 
77
 
 
78
 
void InetAddress_Class::class_init_function(void* g_class, void* class_data)
79
 
{
80
 
  BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
81
 
  CppClassParent::class_init_function(klass, class_data);
82
 
 
83
 
#ifdef GLIBMM_VFUNCS_ENABLED
84
 
#endif //GLIBMM_VFUNCS_ENABLED
85
 
 
86
 
#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
87
 
#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
88
 
}
89
 
 
90
 
#ifdef GLIBMM_VFUNCS_ENABLED
91
 
#endif //GLIBMM_VFUNCS_ENABLED
92
 
 
93
 
#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
94
 
#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
95
 
 
96
 
 
97
 
Glib::ObjectBase* InetAddress_Class::wrap_new(GObject* object)
98
 
{
99
 
  return new InetAddress((GInetAddress*)object);
100
 
}
101
 
 
102
 
 
103
 
/* The implementation: */
104
 
 
105
 
GInetAddress* InetAddress::gobj_copy()
106
 
{
107
 
  reference();
108
 
  return gobj();
109
 
}
110
 
 
111
 
InetAddress::InetAddress(const Glib::ConstructParams& construct_params)
112
 
:
113
 
  Glib::Object(construct_params)
114
 
{
115
 
 
116
 
}
117
 
 
118
 
InetAddress::InetAddress(GInetAddress* castitem)
119
 
:
120
 
  Glib::Object((GObject*)(castitem))
121
 
{}
122
 
 
123
 
 
124
 
InetAddress::~InetAddress()
125
 
{}
126
 
 
127
 
 
128
 
InetAddress::CppClassType InetAddress::inetaddress_class_; // initialize static member
129
 
 
130
 
GType InetAddress::get_type()
131
 
{
132
 
  return inetaddress_class_.init().get_type();
133
 
}
134
 
 
135
 
 
136
 
GType InetAddress::get_base_type()
137
 
{
138
 
  return g_inet_address_get_type();
139
 
}
140
 
 
141
 
 
142
 
InetAddress::InetAddress(const Glib::ustring& string)
143
 
:
144
 
  // Mark this class as non-derived to allow C++ vfuncs to be skipped.
145
 
  Glib::ObjectBase(0),
146
 
  Glib::Object(Glib::ConstructParams(inetaddress_class_.init(), "string", string.c_str(), static_cast<char*>(0)))
147
 
{
148
 
  
149
 
 
150
 
}
151
 
 
152
 
InetAddress::InetAddress(const guint8 * bytes, SocketFamily family)
153
 
:
154
 
  // Mark this class as non-derived to allow C++ vfuncs to be skipped.
155
 
  Glib::ObjectBase(0),
156
 
  Glib::Object(Glib::ConstructParams(inetaddress_class_.init(), "bytes", bytes, "family", ((GSocketFamily)(family)), static_cast<char*>(0)))
157
 
{
158
 
  
159
 
 
160
 
}
161
 
 
162
 
InetAddress::InetAddress(SocketFamily family)
163
 
:
164
 
  // Mark this class as non-derived to allow C++ vfuncs to be skipped.
165
 
  Glib::ObjectBase(0),
166
 
  Glib::Object(Glib::ConstructParams(inetaddress_class_.init(), "family", ((GSocketFamily)(family)), static_cast<char*>(0)))
167
 
{
168
 
  
169
 
 
170
 
}
171
 
 
172
 
Glib::RefPtr<InetAddress> InetAddress::create(const Glib::ustring& string)
173
 
{
174
 
  return Glib::RefPtr<InetAddress>( new InetAddress(string) );
175
 
}
176
 
Glib::RefPtr<InetAddress> InetAddress::create(const guint8 * bytes, SocketFamily family)
177
 
{
178
 
  return Glib::RefPtr<InetAddress>( new InetAddress(bytes, family) );
179
 
}
180
 
Glib::RefPtr<InetAddress> InetAddress::create(SocketFamily family)
181
 
{
182
 
  return Glib::RefPtr<InetAddress>( new InetAddress(family) );
183
 
}
184
 
const guint8* InetAddress::to_bytes() const
185
 
{
186
 
  return g_inet_address_to_bytes(const_cast<GInetAddress*>(gobj()));
187
 
}
188
 
 
189
 
Glib::ustring InetAddress::to_string() const
190
 
{
191
 
  return Glib::convert_return_gchar_ptr_to_ustring(g_inet_address_to_string(const_cast<GInetAddress*>(gobj())));
192
 
}
193
 
 
194
 
SocketFamily InetAddress::get_family() const
195
 
{
196
 
  return ((SocketFamily)(g_inet_address_get_family(const_cast<GInetAddress*>(gobj()))));
197
 
}
198
 
 
199
 
bool InetAddress::get_is_any() const
200
 
{
201
 
  return g_inet_address_get_is_any(const_cast<GInetAddress*>(gobj()));
202
 
}
203
 
 
204
 
bool InetAddress::get_is_link_local() const
205
 
{
206
 
  return g_inet_address_get_is_link_local(const_cast<GInetAddress*>(gobj()));
207
 
}
208
 
 
209
 
bool InetAddress::get_is_loopback() const
210
 
{
211
 
  return g_inet_address_get_is_loopback(const_cast<GInetAddress*>(gobj()));
212
 
}
213
 
 
214
 
bool InetAddress::get_is_mc_global() const
215
 
{
216
 
  return g_inet_address_get_is_mc_global(const_cast<GInetAddress*>(gobj()));
217
 
}
218
 
 
219
 
bool InetAddress::get_is_mc_link_local() const
220
 
{
221
 
  return g_inet_address_get_is_mc_link_local(const_cast<GInetAddress*>(gobj()));
222
 
}
223
 
 
224
 
bool InetAddress::get_is_mc_node_local() const
225
 
{
226
 
  return g_inet_address_get_is_mc_node_local(const_cast<GInetAddress*>(gobj()));
227
 
}
228
 
 
229
 
bool InetAddress::get_is_mc_org_local() const
230
 
{
231
 
  return g_inet_address_get_is_mc_org_local(const_cast<GInetAddress*>(gobj()));
232
 
}
233
 
 
234
 
bool InetAddress::get_is_mc_site_local() const
235
 
{
236
 
  return g_inet_address_get_is_mc_site_local(const_cast<GInetAddress*>(gobj()));
237
 
}
238
 
 
239
 
bool InetAddress::get_is_multicast() const
240
 
{
241
 
  return g_inet_address_get_is_multicast(const_cast<GInetAddress*>(gobj()));
242
 
}
243
 
 
244
 
bool InetAddress::get_is_site_local() const
245
 
{
246
 
  return g_inet_address_get_is_site_local(const_cast<GInetAddress*>(gobj()));
247
 
}
248
 
 
249
 
gsize InetAddress::get_native_size() const
250
 
{
251
 
  return g_inet_address_get_native_size(const_cast<GInetAddress*>(gobj()));
252
 
}
253
 
 
254
 
 
255
 
#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
256
 
#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
257
 
 
258
 
#ifdef GLIBMM_VFUNCS_ENABLED
259
 
#endif //GLIBMM_VFUNCS_ENABLED
260
 
 
261
 
 
262
 
} // namespace Gio
263
 
 
264