Fix crash on startup if an LV2 plugin has a bad .ttl file.
[ardour.git] / libs / glibmm2 / gio / giomm / dataoutputstream.cc
1 // Generated by gtkmmproc -- DO NOT MODIFY!
2
3
4 #include <giomm/dataoutputstream.h>
5 #include <giomm/private/dataoutputstream_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
28 namespace Gio
29 {
30
31 #ifdef GLIBMM_EXCEPTIONS_ENABLED
32 bool DataOutputStream::put_byte(guchar data)
33 #else
34 bool DataOutputStream::put_byte(guchar data, std::auto_ptr<Glib::Error>& error)
35 #endif //GLIBMM_EXCEPTIONS_ENABLED
36 {
37   GError* gerror = 0;
38   guchar retvalue = g_data_output_stream_put_byte(gobj(), data, NULL, &(gerror));
39 #ifdef GLIBMM_EXCEPTIONS_ENABLED
40   if(gerror)
41     ::Glib::Error::throw_exception(gerror);
42 #else
43   if(gerror)
44     error = ::Glib::Error::throw_exception(gerror);
45 #endif //GLIBMM_EXCEPTIONS_ENABLED
46
47   return retvalue;
48 }
49
50 #ifdef GLIBMM_EXCEPTIONS_ENABLED
51 bool DataOutputStream::put_int16(gint16 data)
52 #else
53 bool DataOutputStream::put_int16(gint16 data, std::auto_ptr<Glib::Error>& error)
54 #endif //GLIBMM_EXCEPTIONS_ENABLED
55 {
56   GError* gerror = 0;
57   gint16 retvalue = g_data_output_stream_put_int16(gobj(), data, NULL, &(gerror));
58 #ifdef GLIBMM_EXCEPTIONS_ENABLED
59   if(gerror)
60     ::Glib::Error::throw_exception(gerror);
61 #else
62   if(gerror)
63     error = ::Glib::Error::throw_exception(gerror);
64 #endif //GLIBMM_EXCEPTIONS_ENABLED
65
66   return retvalue;
67 }
68
69 #ifdef GLIBMM_EXCEPTIONS_ENABLED
70 bool DataOutputStream::put_uint16(guint16 data)
71 #else
72 bool DataOutputStream::put_uint16(guint16 data, std::auto_ptr<Glib::Error>& error)
73 #endif //GLIBMM_EXCEPTIONS_ENABLED
74 {
75   GError* gerror = 0;
76   guint16 retvalue = g_data_output_stream_put_uint16(gobj(), data, NULL, &(gerror));
77 #ifdef GLIBMM_EXCEPTIONS_ENABLED
78   if(gerror)
79     ::Glib::Error::throw_exception(gerror);
80 #else
81   if(gerror)
82     error = ::Glib::Error::throw_exception(gerror);
83 #endif //GLIBMM_EXCEPTIONS_ENABLED
84
85   return retvalue;
86 }
87
88 #ifdef GLIBMM_EXCEPTIONS_ENABLED
89 bool DataOutputStream::put_int32(gint32 data)
90 #else
91 bool DataOutputStream::put_int32(gint32 data, std::auto_ptr<Glib::Error>& error)
92 #endif //GLIBMM_EXCEPTIONS_ENABLED
93 {
94   GError* gerror = 0;
95   gint32 retvalue = g_data_output_stream_put_int32(gobj(), data, NULL, &(gerror));
96 #ifdef GLIBMM_EXCEPTIONS_ENABLED
97   if(gerror)
98     ::Glib::Error::throw_exception(gerror);
99 #else
100   if(gerror)
101     error = ::Glib::Error::throw_exception(gerror);
102 #endif //GLIBMM_EXCEPTIONS_ENABLED
103
104   return retvalue;
105 }
106
107 #ifdef GLIBMM_EXCEPTIONS_ENABLED
108 bool DataOutputStream::put_uint32(guint32 data)
109 #else
110 bool DataOutputStream::put_uint32(guint32 data, std::auto_ptr<Glib::Error>& error)
111 #endif //GLIBMM_EXCEPTIONS_ENABLED
112 {
113   GError* gerror = 0;
114   guint32 retvalue = g_data_output_stream_put_uint32(gobj(), data, NULL, &(gerror));
115 #ifdef GLIBMM_EXCEPTIONS_ENABLED
116   if(gerror)
117     ::Glib::Error::throw_exception(gerror);
118 #else
119   if(gerror)
120     error = ::Glib::Error::throw_exception(gerror);
121 #endif //GLIBMM_EXCEPTIONS_ENABLED
122
123   return retvalue;
124 }
125
126 #ifdef GLIBMM_EXCEPTIONS_ENABLED
127 bool DataOutputStream::put_int64(gint64 data)
128 #else
129 bool DataOutputStream::put_int64(gint64 data, std::auto_ptr<Glib::Error>& error)
130 #endif //GLIBMM_EXCEPTIONS_ENABLED
131 {
132   GError* gerror = 0;
133   gint64 retvalue = g_data_output_stream_put_int64(gobj(), data, NULL, &(gerror));
134 #ifdef GLIBMM_EXCEPTIONS_ENABLED
135   if(gerror)
136     ::Glib::Error::throw_exception(gerror);
137 #else
138   if(gerror)
139     error = ::Glib::Error::throw_exception(gerror);
140 #endif //GLIBMM_EXCEPTIONS_ENABLED
141
142   return retvalue;
143 }
144
145 #ifdef GLIBMM_EXCEPTIONS_ENABLED
146 bool DataOutputStream::put_uint64(guint64 data)
147 #else
148 bool DataOutputStream::put_uint64(guint64 data, std::auto_ptr<Glib::Error>& error)
149 #endif //GLIBMM_EXCEPTIONS_ENABLED
150 {
151   GError* gerror = 0;
152   guint64 retvalue = g_data_output_stream_put_uint64(gobj(), data, NULL, &(gerror));
153 #ifdef GLIBMM_EXCEPTIONS_ENABLED
154   if(gerror)
155     ::Glib::Error::throw_exception(gerror);
156 #else
157   if(gerror)
158     error = ::Glib::Error::throw_exception(gerror);
159 #endif //GLIBMM_EXCEPTIONS_ENABLED
160
161   return retvalue;
162 }
163
164 #ifdef GLIBMM_EXCEPTIONS_ENABLED
165 bool DataOutputStream::put_string(std::string str)
166 #else
167 bool DataOutputStream::put_string(std::string str, std::auto_ptr<Glib::Error>& error)
168 #endif //GLIBMM_EXCEPTIONS_ENABLED
169 {
170   GError* gerror = 0;
171   bool retval = g_data_output_stream_put_string(gobj(),
172                                                 str.c_str (),
173                                                 NULL,
174                                                 &gerror);
175 #ifdef GLIBMM_EXCEPTIONS_ENABLED
176   if(gerror)
177     ::Glib::Error::throw_exception(gerror);
178 #else
179   if(gerror)
180     error = ::Glib::Error::throw_exception(gerror);
181 #endif //GLIBMM_EXCEPTIONS_ENABLED
182     return retval;
183 }
184
185
186 } // namespace Gio
187
188 namespace
189 {
190 } // anonymous namespace
191
192
193 namespace Glib
194 {
195
196 Glib::RefPtr<Gio::DataOutputStream> wrap(GDataOutputStream* object, bool take_copy)
197 {
198   return Glib::RefPtr<Gio::DataOutputStream>( dynamic_cast<Gio::DataOutputStream*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
199   //We use dynamic_cast<> in case of multiple inheritance.
200 }
201
202 } /* namespace Glib */
203
204
205 namespace Gio
206 {
207
208
209 /* The *_Class implementation: */
210
211 const Glib::Class& DataOutputStream_Class::init()
212 {
213   if(!gtype_) // create the GType if necessary
214   {
215     // Glib::Class has to know the class init function to clone custom types.
216     class_init_func_ = &DataOutputStream_Class::class_init_function;
217
218     // This is actually just optimized away, apparently with no harm.
219     // Make sure that the parent type has been created.
220     //CppClassParent::CppObjectType::get_type();
221
222     // Create the wrapper type, with the same class/instance size as the base type.
223     register_derived_type(g_data_output_stream_get_type());
224
225     // Add derived versions of interfaces, if the C type implements any interfaces:
226
227   }
228
229   return *this;
230 }
231
232 void DataOutputStream_Class::class_init_function(void* g_class, void* class_data)
233 {
234   BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
235   CppClassParent::class_init_function(klass, class_data);
236
237 #ifdef GLIBMM_VFUNCS_ENABLED
238 #endif //GLIBMM_VFUNCS_ENABLED
239
240 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
241 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
242 }
243
244 #ifdef GLIBMM_VFUNCS_ENABLED
245 #endif //GLIBMM_VFUNCS_ENABLED
246
247 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
248 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
249
250
251 Glib::ObjectBase* DataOutputStream_Class::wrap_new(GObject* object)
252 {
253   return new DataOutputStream((GDataOutputStream*)object);
254 }
255
256
257 /* The implementation: */
258
259 GDataOutputStream* DataOutputStream::gobj_copy()
260 {
261   reference();
262   return gobj();
263 }
264
265 DataOutputStream::DataOutputStream(const Glib::ConstructParams& construct_params)
266 :
267   Gio::BufferedOutputStream(construct_params)
268 {
269
270 }
271
272 DataOutputStream::DataOutputStream(GDataOutputStream* castitem)
273 :
274   Gio::BufferedOutputStream((GBufferedOutputStream*)(castitem))
275 {}
276
277
278 DataOutputStream::~DataOutputStream()
279 {}
280
281
282 DataOutputStream::CppClassType DataOutputStream::dataoutputstream_class_; // initialize static member
283
284 GType DataOutputStream::get_type()
285 {
286   return dataoutputstream_class_.init().get_type();
287 }
288
289 GType DataOutputStream::get_base_type()
290 {
291   return g_data_output_stream_get_type();
292 }
293
294
295 DataOutputStream::DataOutputStream(const Glib::RefPtr<OutputStream>& base_stream)
296 :
297   // Mark this class as non-derived to allow C++ vfuncs to be skipped.
298   Glib::ObjectBase(0),
299   Gio::BufferedOutputStream(Glib::ConstructParams(dataoutputstream_class_.init(), "base_stream", const_cast<GOutputStream*>(Glib::unwrap(base_stream)), static_cast<char*>(0)))
300 {
301   
302
303 }
304
305 Glib::RefPtr<DataOutputStream> DataOutputStream::create(const Glib::RefPtr<OutputStream>& base_stream)
306 {
307   return Glib::RefPtr<DataOutputStream>( new DataOutputStream(base_stream) );
308 }
309 void DataOutputStream::set_byte_order(DataStreamByteOrder order)
310 {
311 g_data_output_stream_set_byte_order(gobj(), ((GDataStreamByteOrder)(order))); 
312 }
313
314 DataStreamByteOrder DataOutputStream::get_byte_order() const
315 {
316   return ((DataStreamByteOrder)(g_data_output_stream_get_byte_order(const_cast<GDataOutputStream*>(gobj()))));
317 }
318
319 #ifdef GLIBMM_EXCEPTIONS_ENABLED
320 bool DataOutputStream::put_byte(guchar data, const Glib::RefPtr<Cancellable>& cancellable)
321 #else
322 bool DataOutputStream::put_byte(guchar data, const Glib::RefPtr<Cancellable>& cancellable, std::auto_ptr<Glib::Error>& error)
323 #endif //GLIBMM_EXCEPTIONS_ENABLED
324 {
325   GError* gerror = 0;
326   bool retvalue = g_data_output_stream_put_byte(gobj(), data, const_cast<GCancellable*>(Glib::unwrap(cancellable)), &(gerror));
327 #ifdef GLIBMM_EXCEPTIONS_ENABLED
328   if(gerror)
329     ::Glib::Error::throw_exception(gerror);
330 #else
331   if(gerror)
332     error = ::Glib::Error::throw_exception(gerror);
333 #endif //GLIBMM_EXCEPTIONS_ENABLED
334
335   return retvalue;
336
337 }
338
339 #ifdef GLIBMM_EXCEPTIONS_ENABLED
340 bool DataOutputStream::put_int16(gint16 data, const Glib::RefPtr<Cancellable>& cancellable)
341 #else
342 bool DataOutputStream::put_int16(gint16 data, const Glib::RefPtr<Cancellable>& cancellable, std::auto_ptr<Glib::Error>& error)
343 #endif //GLIBMM_EXCEPTIONS_ENABLED
344 {
345   GError* gerror = 0;
346   bool retvalue = g_data_output_stream_put_int16(gobj(), data, const_cast<GCancellable*>(Glib::unwrap(cancellable)), &(gerror));
347 #ifdef GLIBMM_EXCEPTIONS_ENABLED
348   if(gerror)
349     ::Glib::Error::throw_exception(gerror);
350 #else
351   if(gerror)
352     error = ::Glib::Error::throw_exception(gerror);
353 #endif //GLIBMM_EXCEPTIONS_ENABLED
354
355   return retvalue;
356
357 }
358
359 #ifdef GLIBMM_EXCEPTIONS_ENABLED
360 bool DataOutputStream::put_uint16(guint16 data, const Glib::RefPtr<Cancellable>& cancellable)
361 #else
362 bool DataOutputStream::put_uint16(guint16 data, const Glib::RefPtr<Cancellable>& cancellable, std::auto_ptr<Glib::Error>& error)
363 #endif //GLIBMM_EXCEPTIONS_ENABLED
364 {
365   GError* gerror = 0;
366   bool retvalue = g_data_output_stream_put_uint16(gobj(), data, const_cast<GCancellable*>(Glib::unwrap(cancellable)), &(gerror));
367 #ifdef GLIBMM_EXCEPTIONS_ENABLED
368   if(gerror)
369     ::Glib::Error::throw_exception(gerror);
370 #else
371   if(gerror)
372     error = ::Glib::Error::throw_exception(gerror);
373 #endif //GLIBMM_EXCEPTIONS_ENABLED
374
375   return retvalue;
376
377 }
378
379 #ifdef GLIBMM_EXCEPTIONS_ENABLED
380 bool DataOutputStream::put_int32(gint32 data, const Glib::RefPtr<Cancellable>& cancellable)
381 #else
382 bool DataOutputStream::put_int32(gint32 data, const Glib::RefPtr<Cancellable>& cancellable, std::auto_ptr<Glib::Error>& error)
383 #endif //GLIBMM_EXCEPTIONS_ENABLED
384 {
385   GError* gerror = 0;
386   bool retvalue = g_data_output_stream_put_int32(gobj(), data, const_cast<GCancellable*>(Glib::unwrap(cancellable)), &(gerror));
387 #ifdef GLIBMM_EXCEPTIONS_ENABLED
388   if(gerror)
389     ::Glib::Error::throw_exception(gerror);
390 #else
391   if(gerror)
392     error = ::Glib::Error::throw_exception(gerror);
393 #endif //GLIBMM_EXCEPTIONS_ENABLED
394
395   return retvalue;
396
397 }
398
399 #ifdef GLIBMM_EXCEPTIONS_ENABLED
400 bool DataOutputStream::put_uint32(guint32 data, const Glib::RefPtr<Cancellable>& cancellable)
401 #else
402 bool DataOutputStream::put_uint32(guint32 data, const Glib::RefPtr<Cancellable>& cancellable, std::auto_ptr<Glib::Error>& error)
403 #endif //GLIBMM_EXCEPTIONS_ENABLED
404 {
405   GError* gerror = 0;
406   bool retvalue = g_data_output_stream_put_uint32(gobj(), data, const_cast<GCancellable*>(Glib::unwrap(cancellable)), &(gerror));
407 #ifdef GLIBMM_EXCEPTIONS_ENABLED
408   if(gerror)
409     ::Glib::Error::throw_exception(gerror);
410 #else
411   if(gerror)
412     error = ::Glib::Error::throw_exception(gerror);
413 #endif //GLIBMM_EXCEPTIONS_ENABLED
414
415   return retvalue;
416
417 }
418
419 #ifdef GLIBMM_EXCEPTIONS_ENABLED
420 bool DataOutputStream::put_int64(gint64 data, const Glib::RefPtr<Cancellable>& cancellable)
421 #else
422 bool DataOutputStream::put_int64(gint64 data, const Glib::RefPtr<Cancellable>& cancellable, std::auto_ptr<Glib::Error>& error)
423 #endif //GLIBMM_EXCEPTIONS_ENABLED
424 {
425   GError* gerror = 0;
426   bool retvalue = g_data_output_stream_put_int64(gobj(), data, const_cast<GCancellable*>(Glib::unwrap(cancellable)), &(gerror));
427 #ifdef GLIBMM_EXCEPTIONS_ENABLED
428   if(gerror)
429     ::Glib::Error::throw_exception(gerror);
430 #else
431   if(gerror)
432     error = ::Glib::Error::throw_exception(gerror);
433 #endif //GLIBMM_EXCEPTIONS_ENABLED
434
435   return retvalue;
436
437 }
438
439 #ifdef GLIBMM_EXCEPTIONS_ENABLED
440 bool DataOutputStream::put_uint64(guint64 data, const Glib::RefPtr<Cancellable>& cancellable)
441 #else
442 bool DataOutputStream::put_uint64(guint64 data, const Glib::RefPtr<Cancellable>& cancellable, std::auto_ptr<Glib::Error>& error)
443 #endif //GLIBMM_EXCEPTIONS_ENABLED
444 {
445   GError* gerror = 0;
446   bool retvalue = g_data_output_stream_put_uint64(gobj(), data, const_cast<GCancellable*>(Glib::unwrap(cancellable)), &(gerror));
447 #ifdef GLIBMM_EXCEPTIONS_ENABLED
448   if(gerror)
449     ::Glib::Error::throw_exception(gerror);
450 #else
451   if(gerror)
452     error = ::Glib::Error::throw_exception(gerror);
453 #endif //GLIBMM_EXCEPTIONS_ENABLED
454
455   return retvalue;
456
457 }
458
459 #ifdef GLIBMM_EXCEPTIONS_ENABLED
460 bool DataOutputStream::put_string(std::string str, const Glib::RefPtr<Cancellable>& cancellable)
461 #else
462 bool DataOutputStream::put_string(std::string str, const Glib::RefPtr<Cancellable>& cancellable, std::auto_ptr<Glib::Error>& error)
463 #endif //GLIBMM_EXCEPTIONS_ENABLED
464 {
465   GError* gerror = 0;
466   bool retvalue = g_data_output_stream_put_string(gobj(), str.c_str(), const_cast<GCancellable*>(Glib::unwrap(cancellable)), &(gerror));
467 #ifdef GLIBMM_EXCEPTIONS_ENABLED
468   if(gerror)
469     ::Glib::Error::throw_exception(gerror);
470 #else
471   if(gerror)
472     error = ::Glib::Error::throw_exception(gerror);
473 #endif //GLIBMM_EXCEPTIONS_ENABLED
474
475   return retvalue;
476
477 }
478
479
480 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
481 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
482
483 #ifdef GLIBMM_VFUNCS_ENABLED
484 #endif //GLIBMM_VFUNCS_ENABLED
485
486
487 } // namespace Gio
488
489