| 1 | // Generated by gmmproc 2.50.1 -- DO NOT MODIFY! |
| 2 | |
| 3 | |
| 4 | #include <glibmm.h> |
| 5 | |
| 6 | #include <gstreamermm/preset.h> |
| 7 | #include <gstreamermm/private/preset_p.h> |
| 8 | |
| 9 | |
| 10 | /* gstreamermm - a C++ wrapper for gstreamer |
| 11 | * |
| 12 | * Copyright 2008-2016 The gstreamermm Development Team |
| 13 | * |
| 14 | * This library is free software; you can redistribute it and/or |
| 15 | * modify it under the terms of the GNU Lesser General Public |
| 16 | * License as published by the Free Software Foundation; either |
| 17 | * version 2.1 of the License, or (at your option) any later version. |
| 18 | * |
| 19 | * This library is distributed in the hope that it will be useful, |
| 20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 22 | * Lesser General Public License for more details. |
| 23 | * |
| 24 | * You should have received a copy of the GNU Lesser General Public |
| 25 | * License along with this library; if not, write to the Free |
| 26 | * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
| 27 | */ |
| 28 | |
| 29 | namespace Gst |
| 30 | { |
| 31 | |
| 32 | bool Preset::get_meta(const Glib::ustring& name, const Glib::ustring& tag, |
| 33 | Glib::ustring& value) const |
| 34 | { |
| 35 | gchar* meta = nullptr; |
| 36 | |
| 37 | gboolean result = gst_preset_get_meta(const_cast<GstPreset*>(gobj()), |
| 38 | name.c_str(), tag.c_str(), &meta); |
| 39 | value = meta; |
| 40 | g_free(meta); |
| 41 | return result; |
| 42 | } |
| 43 | |
| 44 | gchar** Preset_Class::get_preset_names_vfunc_callback(GstPreset* self) |
| 45 | { |
| 46 | Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>( |
| 47 | Glib::ObjectBase::_get_current_wrapper((GObject*)self)); |
| 48 | |
| 49 | // Non-gtkmmproc-generated custom classes implicitly call the default |
| 50 | // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc- |
| 51 | // generated classes can use this optimisation, which avoids the unnecessary |
| 52 | // parameter conversions if there is no possibility of the virtual function |
| 53 | // being overridden: |
| 54 | if(obj_base && obj_base->is_derived_()) |
| 55 | { |
| 56 | CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base); |
| 57 | if(obj) // This can be NULL during destruction. |
| 58 | { |
| 59 | try // Trap C++ exceptions which would normally be lost because this is a C callback. |
| 60 | { |
| 61 | // Call the virtual member method, which derived classes might override. |
| 62 | return const_cast<gchar**>((obj->get_preset_names_vfunc()).data()); |
| 63 | } |
| 64 | catch(...) |
| 65 | { |
| 66 | Glib::exception_handlers_invoke(); |
| 67 | } |
| 68 | } |
| 69 | } |
| 70 | |
| 71 | BaseClassType *const base = static_cast<BaseClassType*>( |
| 72 | g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface). |
| 73 | g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface. |
| 74 | ) ); |
| 75 | |
| 76 | // Call the original underlying C function: |
| 77 | if(base && base->get_preset_names) |
| 78 | return (*base->get_preset_names)(self); |
| 79 | |
| 80 | |
| 81 | typedef gchar** RType; |
| 82 | return RType(); |
| 83 | } |
| 84 | gchar** Preset_Class::get_property_names_vfunc_callback(GstPreset* self) |
| 85 | { |
| 86 | Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>( |
| 87 | Glib::ObjectBase::_get_current_wrapper((GObject*)self)); |
| 88 | |
| 89 | // Non-gtkmmproc-generated custom classes implicitly call the default |
| 90 | // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc- |
| 91 | // generated classes can use this optimisation, which avoids the unnecessary |
| 92 | // parameter conversions if there is no possibility of the virtual function |
| 93 | // being overridden: |
| 94 | if(obj_base && obj_base->is_derived_()) |
| 95 | { |
| 96 | CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base); |
| 97 | if(obj) // This can be NULL during destruction. |
| 98 | { |
| 99 | try // Trap C++ exceptions which would normally be lost because this is a C callback. |
| 100 | { |
| 101 | // Call the virtual member method, which derived classes might override. |
| 102 | return const_cast<gchar**>((obj->get_property_names_vfunc()).data()); |
| 103 | } |
| 104 | catch(...) |
| 105 | { |
| 106 | Glib::exception_handlers_invoke(); |
| 107 | } |
| 108 | } |
| 109 | } |
| 110 | |
| 111 | BaseClassType *const base = static_cast<BaseClassType*>( |
| 112 | g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface). |
| 113 | g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface. |
| 114 | ) ); |
| 115 | |
| 116 | // Call the original underlying C function: |
| 117 | if(base && base->get_property_names) |
| 118 | return (*base->get_property_names)(self); |
| 119 | |
| 120 | |
| 121 | typedef gchar** RType; |
| 122 | return RType(); |
| 123 | } |
| 124 | gboolean Preset_Class::get_meta_vfunc_callback(GstPreset* self, const gchar* name, const gchar* tag, gchar** value) |
| 125 | { |
| 126 | Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>( |
| 127 | Glib::ObjectBase::_get_current_wrapper((GObject*)self)); |
| 128 | |
| 129 | // Non-gtkmmproc-generated custom classes implicitly call the default |
| 130 | // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc- |
| 131 | // generated classes can use this optimisation, which avoids the unnecessary |
| 132 | // parameter conversions if there is no possibility of the virtual function |
| 133 | // being overridden: |
| 134 | if(obj_base && obj_base->is_derived_()) |
| 135 | { |
| 136 | CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base); |
| 137 | if(obj) // This can be NULL during destruction. |
| 138 | { |
| 139 | try // Trap C++ exceptions which would normally be lost because this is a C callback. |
| 140 | { |
| 141 | Glib::ustring cpp_value; |
| 142 | // Call the virtual member method, which derived classes might override. |
| 143 | const gboolean result = static_cast<int>(obj->get_meta_vfunc(Glib::convert_const_gchar_ptr_to_ustring(name) |
| 144 | , Glib::convert_const_gchar_ptr_to_ustring(tag) , cpp_value)); |
| 145 | *value = g_strdup(cpp_value.c_str()); |
| 146 | return result; |
| 147 | } |
| 148 | catch(...) |
| 149 | { |
| 150 | Glib::exception_handlers_invoke(); |
| 151 | } |
| 152 | } |
| 153 | } |
| 154 | |
| 155 | BaseClassType *const base = static_cast<BaseClassType*>( |
| 156 | g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface). |
| 157 | g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface. |
| 158 | ) ); |
| 159 | |
| 160 | // Call the original underlying C function: |
| 161 | if(base && base->get_meta) |
| 162 | return (*base->get_meta)(self, name, tag, value); |
| 163 | |
| 164 | |
| 165 | typedef gboolean RType; |
| 166 | return RType(); |
| 167 | } |
| 168 | Glib::StringArrayHandle Gst::Preset::get_preset_names_vfunc() const |
| 169 | { |
| 170 | BaseClassType *const base = static_cast<BaseClassType*>( |
| 171 | g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface). |
| 172 | g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface. |
| 173 | ) ); |
| 174 | |
| 175 | if(base && base->get_preset_names) |
| 176 | return Glib::StringArrayHandle((*base->get_preset_names)(const_cast<GstPreset*>(gobj())), Glib::OWNERSHIP_DEEP); |
| 177 | |
| 178 | return Glib::StringArrayHandle(nullptr, Glib::OWNERSHIP_NONE); |
| 179 | } |
| 180 | Glib::StringArrayHandle Gst::Preset::get_property_names_vfunc() const |
| 181 | { |
| 182 | BaseClassType *const base = static_cast<BaseClassType*>( |
| 183 | g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface). |
| 184 | g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface. |
| 185 | ) ); |
| 186 | |
| 187 | if(base && base->get_property_names) |
| 188 | return Glib::StringArrayHandle((*base->get_property_names)(const_cast<GstPreset*>(gobj())), Glib::OWNERSHIP_DEEP); |
| 189 | |
| 190 | return Glib::StringArrayHandle(nullptr, Glib::OWNERSHIP_NONE); |
| 191 | } |
| 192 | bool Gst::Preset::get_meta_vfunc(const Glib::ustring& name, |
| 193 | const Glib::ustring& tag, Glib::ustring& value) const |
| 194 | { |
| 195 | BaseClassType *const base = static_cast<BaseClassType*>( |
| 196 | g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface). |
| 197 | g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface. |
| 198 | ) ); |
| 199 | |
| 200 | if(base && base->get_meta) |
| 201 | { |
| 202 | gchar* gst_value; |
| 203 | const bool result = (*base->get_meta)(const_cast<GstPreset*>(gobj()),((name).c_str()),((tag).c_str()), &gst_value); |
| 204 | value = gst_value; |
| 205 | g_free(gst_value); |
| 206 | return result; |
| 207 | } |
| 208 | |
| 209 | typedef bool RType; |
| 210 | return RType(); |
| 211 | } |
| 212 | |
| 213 | } |
| 214 | |
| 215 | namespace |
| 216 | { |
| 217 | } // anonymous namespace |
| 218 | |
| 219 | |
| 220 | namespace Glib |
| 221 | { |
| 222 | |
| 223 | Glib::RefPtr<Gst::Preset> wrap(GstPreset* object, bool take_copy) |
| 224 | { |
| 225 | return Glib::RefPtr<Gst::Preset>( dynamic_cast<Gst::Preset*> (Glib::wrap_auto_interface<Gst::Preset> ((GObject*)(object), take_copy)) ); |
| 226 | //We use dynamic_cast<> in case of multiple inheritance. |
| 227 | } |
| 228 | |
| 229 | } // namespace Glib |
| 230 | |
| 231 | |
| 232 | namespace Gst |
| 233 | { |
| 234 | |
| 235 | |
| 236 | /* The *_Class implementation: */ |
| 237 | |
| 238 | const Glib::Interface_Class& Preset_Class::init() |
| 239 | { |
| 240 | if(!gtype_) // create the GType if necessary |
| 241 | { |
| 242 | // Glib::Interface_Class has to know the interface init function |
| 243 | // in order to add interfaces to implementing types. |
| 244 | class_init_func_ = &Preset_Class::iface_init_function; |
| 245 | |
| 246 | // We can not derive from another interface, and it is not necessary anyway. |
| 247 | gtype_ = gst_preset_get_type(); |
| 248 | } |
| 249 | |
| 250 | return *this; |
| 251 | } |
| 252 | |
| 253 | void Preset_Class::iface_init_function(void* g_iface, void*) |
| 254 | { |
| 255 | const auto klass = static_cast<BaseClassType*>(g_iface); |
| 256 | |
| 257 | //This is just to avoid an "unused variable" warning when there are no vfuncs or signal handlers to connect. |
| 258 | //This is a temporary fix until I find out why I can not seem to derive a GtkFileChooser interface. murrayc |
| 259 | g_assert(klass != nullptr); |
| 260 | |
| 261 | klass->load_preset = &load_preset_vfunc_callback; |
| 262 | klass->save_preset = &save_preset_vfunc_callback; |
| 263 | klass->rename_preset = &rename_preset_vfunc_callback; |
| 264 | klass->delete_preset = &delete_preset_vfunc_callback; |
| 265 | klass->set_meta = &set_meta_vfunc_callback; |
| 266 | klass->get_preset_names = &get_preset_names_vfunc_callback; |
| 267 | klass->get_property_names = &get_property_names_vfunc_callback; |
| 268 | klass->get_meta = &get_meta_vfunc_callback; |
| 269 | |
| 270 | } |
| 271 | |
| 272 | gboolean Preset_Class::load_preset_vfunc_callback(GstPreset* self, const gchar* name) |
| 273 | { |
| 274 | const auto obj_base = static_cast<Glib::ObjectBase*>( |
| 275 | Glib::ObjectBase::_get_current_wrapper((GObject*)self)); |
| 276 | |
| 277 | // Non-gtkmmproc-generated custom classes implicitly call the default |
| 278 | // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc- |
| 279 | // generated classes can use this optimisation, which avoids the unnecessary |
| 280 | // parameter conversions if there is no possibility of the virtual function |
| 281 | // being overridden: |
| 282 | if(obj_base && obj_base->is_derived_()) |
| 283 | { |
| 284 | const auto obj = dynamic_cast<CppObjectType* const>(obj_base); |
| 285 | if(obj) // This can be NULL during destruction. |
| 286 | { |
| 287 | try // Trap C++ exceptions which would normally be lost because this is a C callback. |
| 288 | { |
| 289 | // Call the virtual member method, which derived classes might override. |
| 290 | return static_cast<int>(obj->load_preset_vfunc(Glib::convert_const_gchar_ptr_to_ustring(name) |
| 291 | )); |
| 292 | } |
| 293 | catch(...) |
| 294 | { |
| 295 | Glib::exception_handlers_invoke(); |
| 296 | } |
| 297 | } |
| 298 | } |
| 299 | |
| 300 | BaseClassType *const base = static_cast<BaseClassType*>( |
| 301 | g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface). |
| 302 | g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface. |
| 303 | ) ); |
| 304 | |
| 305 | // Call the original underlying C function: |
| 306 | if(base && base->load_preset) |
| 307 | return (*base->load_preset)(self, name); |
| 308 | |
| 309 | using RType = gboolean; |
| 310 | return RType(); |
| 311 | } |
| 312 | gboolean Preset_Class::save_preset_vfunc_callback(GstPreset* self, const gchar* name) |
| 313 | { |
| 314 | const auto obj_base = static_cast<Glib::ObjectBase*>( |
| 315 | Glib::ObjectBase::_get_current_wrapper((GObject*)self)); |
| 316 | |
| 317 | // Non-gtkmmproc-generated custom classes implicitly call the default |
| 318 | // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc- |
| 319 | // generated classes can use this optimisation, which avoids the unnecessary |
| 320 | // parameter conversions if there is no possibility of the virtual function |
| 321 | // being overridden: |
| 322 | if(obj_base && obj_base->is_derived_()) |
| 323 | { |
| 324 | const auto obj = dynamic_cast<CppObjectType* const>(obj_base); |
| 325 | if(obj) // This can be NULL during destruction. |
| 326 | { |
| 327 | try // Trap C++ exceptions which would normally be lost because this is a C callback. |
| 328 | { |
| 329 | // Call the virtual member method, which derived classes might override. |
| 330 | return static_cast<int>(obj->save_preset_vfunc(Glib::convert_const_gchar_ptr_to_ustring(name) |
| 331 | )); |
| 332 | } |
| 333 | catch(...) |
| 334 | { |
| 335 | Glib::exception_handlers_invoke(); |
| 336 | } |
| 337 | } |
| 338 | } |
| 339 | |
| 340 | BaseClassType *const base = static_cast<BaseClassType*>( |
| 341 | g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface). |
| 342 | g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface. |
| 343 | ) ); |
| 344 | |
| 345 | // Call the original underlying C function: |
| 346 | if(base && base->save_preset) |
| 347 | return (*base->save_preset)(self, name); |
| 348 | |
| 349 | using RType = gboolean; |
| 350 | return RType(); |
| 351 | } |
| 352 | gboolean Preset_Class::rename_preset_vfunc_callback(GstPreset* self, const gchar* old_name, const gchar* new_name) |
| 353 | { |
| 354 | const auto obj_base = static_cast<Glib::ObjectBase*>( |
| 355 | Glib::ObjectBase::_get_current_wrapper((GObject*)self)); |
| 356 | |
| 357 | // Non-gtkmmproc-generated custom classes implicitly call the default |
| 358 | // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc- |
| 359 | // generated classes can use this optimisation, which avoids the unnecessary |
| 360 | // parameter conversions if there is no possibility of the virtual function |
| 361 | // being overridden: |
| 362 | if(obj_base && obj_base->is_derived_()) |
| 363 | { |
| 364 | const auto obj = dynamic_cast<CppObjectType* const>(obj_base); |
| 365 | if(obj) // This can be NULL during destruction. |
| 366 | { |
| 367 | try // Trap C++ exceptions which would normally be lost because this is a C callback. |
| 368 | { |
| 369 | // Call the virtual member method, which derived classes might override. |
| 370 | return static_cast<int>(obj->rename_preset_vfunc(Glib::convert_const_gchar_ptr_to_ustring(old_name) |
| 371 | , Glib::convert_const_gchar_ptr_to_ustring(new_name) |
| 372 | )); |
| 373 | } |
| 374 | catch(...) |
| 375 | { |
| 376 | Glib::exception_handlers_invoke(); |
| 377 | } |
| 378 | } |
| 379 | } |
| 380 | |
| 381 | BaseClassType *const base = static_cast<BaseClassType*>( |
| 382 | g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface). |
| 383 | g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface. |
| 384 | ) ); |
| 385 | |
| 386 | // Call the original underlying C function: |
| 387 | if(base && base->rename_preset) |
| 388 | return (*base->rename_preset)(self, old_name, new_name); |
| 389 | |
| 390 | using RType = gboolean; |
| 391 | return RType(); |
| 392 | } |
| 393 | gboolean Preset_Class::delete_preset_vfunc_callback(GstPreset* self, const gchar* name) |
| 394 | { |
| 395 | const auto obj_base = static_cast<Glib::ObjectBase*>( |
| 396 | Glib::ObjectBase::_get_current_wrapper((GObject*)self)); |
| 397 | |
| 398 | // Non-gtkmmproc-generated custom classes implicitly call the default |
| 399 | // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc- |
| 400 | // generated classes can use this optimisation, which avoids the unnecessary |
| 401 | // parameter conversions if there is no possibility of the virtual function |
| 402 | // being overridden: |
| 403 | if(obj_base && obj_base->is_derived_()) |
| 404 | { |
| 405 | const auto obj = dynamic_cast<CppObjectType* const>(obj_base); |
| 406 | if(obj) // This can be NULL during destruction. |
| 407 | { |
| 408 | try // Trap C++ exceptions which would normally be lost because this is a C callback. |
| 409 | { |
| 410 | // Call the virtual member method, which derived classes might override. |
| 411 | return static_cast<int>(obj->delete_preset_vfunc(Glib::convert_const_gchar_ptr_to_ustring(name) |
| 412 | )); |
| 413 | } |
| 414 | catch(...) |
| 415 | { |
| 416 | Glib::exception_handlers_invoke(); |
| 417 | } |
| 418 | } |
| 419 | } |
| 420 | |
| 421 | BaseClassType *const base = static_cast<BaseClassType*>( |
| 422 | g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface). |
| 423 | g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface. |
| 424 | ) ); |
| 425 | |
| 426 | // Call the original underlying C function: |
| 427 | if(base && base->delete_preset) |
| 428 | return (*base->delete_preset)(self, name); |
| 429 | |
| 430 | using RType = gboolean; |
| 431 | return RType(); |
| 432 | } |
| 433 | gboolean Preset_Class::set_meta_vfunc_callback(GstPreset* self, const gchar* name, const gchar* tag, const gchar* value) |
| 434 | { |
| 435 | const auto obj_base = static_cast<Glib::ObjectBase*>( |
| 436 | Glib::ObjectBase::_get_current_wrapper((GObject*)self)); |
| 437 | |
| 438 | // Non-gtkmmproc-generated custom classes implicitly call the default |
| 439 | // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc- |
| 440 | // generated classes can use this optimisation, which avoids the unnecessary |
| 441 | // parameter conversions if there is no possibility of the virtual function |
| 442 | // being overridden: |
| 443 | if(obj_base && obj_base->is_derived_()) |
| 444 | { |
| 445 | const auto obj = dynamic_cast<CppObjectType* const>(obj_base); |
| 446 | if(obj) // This can be NULL during destruction. |
| 447 | { |
| 448 | try // Trap C++ exceptions which would normally be lost because this is a C callback. |
| 449 | { |
| 450 | // Call the virtual member method, which derived classes might override. |
| 451 | return static_cast<int>(obj->set_meta_vfunc(Glib::convert_const_gchar_ptr_to_ustring(name) |
| 452 | , Glib::convert_const_gchar_ptr_to_ustring(tag) |
| 453 | , Glib::convert_const_gchar_ptr_to_ustring(value) |
| 454 | )); |
| 455 | } |
| 456 | catch(...) |
| 457 | { |
| 458 | Glib::exception_handlers_invoke(); |
| 459 | } |
| 460 | } |
| 461 | } |
| 462 | |
| 463 | BaseClassType *const base = static_cast<BaseClassType*>( |
| 464 | g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface). |
| 465 | g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface. |
| 466 | ) ); |
| 467 | |
| 468 | // Call the original underlying C function: |
| 469 | if(base && base->set_meta) |
| 470 | return (*base->set_meta)(self, name, tag, value); |
| 471 | |
| 472 | using RType = gboolean; |
| 473 | return RType(); |
| 474 | } |
| 475 | |
| 476 | |
| 477 | Glib::ObjectBase* Preset_Class::wrap_new(GObject* object) |
| 478 | { |
| 479 | return new Preset((GstPreset*)(object)); |
| 480 | } |
| 481 | |
| 482 | |
| 483 | /* The implementation: */ |
| 484 | |
| 485 | Preset::Preset() |
| 486 | : |
| 487 | Glib::Interface(preset_class_.init()) |
| 488 | {} |
| 489 | |
| 490 | Preset::Preset(GstPreset* castitem) |
| 491 | : |
| 492 | Glib::Interface((GObject*)(castitem)) |
| 493 | {} |
| 494 | |
| 495 | Preset::Preset(const Glib::Interface_Class& interface_class) |
| 496 | : Glib::Interface(interface_class) |
| 497 | { |
| 498 | } |
| 499 | |
| 500 | Preset::Preset(Preset&& src) noexcept |
| 501 | : Glib::Interface(std::move(src)) |
| 502 | {} |
| 503 | |
| 504 | Preset& Preset::operator=(Preset&& src) noexcept |
| 505 | { |
| 506 | Glib::Interface::operator=(std::move(src)); |
| 507 | return *this; |
| 508 | } |
| 509 | |
| 510 | Preset::~Preset() noexcept |
| 511 | {} |
| 512 | |
| 513 | // static |
| 514 | void Preset::add_interface(GType gtype_implementer) |
| 515 | { |
| 516 | preset_class_.init().add_interface(gtype_implementer); |
| 517 | } |
| 518 | |
| 519 | Preset::CppClassType Preset::preset_class_; // initialize static member |
| 520 | |
| 521 | GType Preset::get_type() |
| 522 | { |
| 523 | return preset_class_.init().get_type(); |
| 524 | } |
| 525 | |
| 526 | |
| 527 | GType Preset::get_base_type() |
| 528 | { |
| 529 | return gst_preset_get_type(); |
| 530 | } |
| 531 | |
| 532 | |
| 533 | Glib::StringArrayHandle Preset::get_preset_names() const |
| 534 | { |
| 535 | return Glib::StringArrayHandle(gst_preset_get_preset_names(const_cast<GstPreset*>(gobj())), Glib::OWNERSHIP_DEEP); |
| 536 | } |
| 537 | |
| 538 | Glib::StringArrayHandle Preset::get_property_names() const |
| 539 | { |
| 540 | return Glib::StringArrayHandle(gst_preset_get_property_names(const_cast<GstPreset*>(gobj())), Glib::OWNERSHIP_DEEP); |
| 541 | } |
| 542 | |
| 543 | bool Preset::load_preset(const Glib::ustring& name) |
| 544 | { |
| 545 | return gst_preset_load_preset(gobj(), name.c_str()); |
| 546 | } |
| 547 | |
| 548 | bool Preset::save_preset(const Glib::ustring& name) |
| 549 | { |
| 550 | return gst_preset_save_preset(gobj(), name.c_str()); |
| 551 | } |
| 552 | |
| 553 | bool Preset::rename_preset(const Glib::ustring& old_name, const Glib::ustring& new_name) |
| 554 | { |
| 555 | return gst_preset_rename_preset(gobj(), old_name.c_str(), new_name.c_str()); |
| 556 | } |
| 557 | |
| 558 | bool Preset::delete_preset(const Glib::ustring& name) |
| 559 | { |
| 560 | return gst_preset_delete_preset(gobj(), name.c_str()); |
| 561 | } |
| 562 | |
| 563 | bool Preset::set_meta(const Glib::ustring& name, const Glib::ustring& tag, const Glib::ustring& value) |
| 564 | { |
| 565 | return gst_preset_set_meta(gobj(), name.c_str(), tag.c_str(), value.c_str()); |
| 566 | } |
| 567 | |
| 568 | bool Preset::is_editable() const |
| 569 | { |
| 570 | return gst_preset_is_editable(const_cast<GstPreset*>(gobj())); |
| 571 | } |
| 572 | |
| 573 | |
| 574 | bool Gst::Preset::load_preset_vfunc(const Glib::ustring& name) |
| 575 | { |
| 576 | const auto base = static_cast<BaseClassType*>( |
| 577 | g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface). |
| 578 | g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface. |
| 579 | ) ); |
| 580 | |
| 581 | if(base && base->load_preset) |
| 582 | { |
| 583 | bool retval((*base->load_preset)(gobj(),name.c_str())); |
| 584 | return retval; |
| 585 | } |
| 586 | |
| 587 | using RType = bool; |
| 588 | return RType(); |
| 589 | } |
| 590 | bool Gst::Preset::save_preset_vfunc(const Glib::ustring& name) const |
| 591 | { |
| 592 | const auto base = static_cast<BaseClassType*>( |
| 593 | g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface). |
| 594 | g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface. |
| 595 | ) ); |
| 596 | |
| 597 | if(base && base->save_preset) |
| 598 | { |
| 599 | bool retval((*base->save_preset)(const_cast<GstPreset*>(gobj()),name.c_str())); |
| 600 | return retval; |
| 601 | } |
| 602 | |
| 603 | using RType = bool; |
| 604 | return RType(); |
| 605 | } |
| 606 | bool Gst::Preset::rename_preset_vfunc(const Glib::ustring& old_name, const Glib::ustring& new_name) |
| 607 | { |
| 608 | const auto base = static_cast<BaseClassType*>( |
| 609 | g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface). |
| 610 | g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface. |
| 611 | ) ); |
| 612 | |
| 613 | if(base && base->rename_preset) |
| 614 | { |
| 615 | bool retval((*base->rename_preset)(gobj(),old_name.c_str(),new_name.c_str())); |
| 616 | return retval; |
| 617 | } |
| 618 | |
| 619 | using RType = bool; |
| 620 | return RType(); |
| 621 | } |
| 622 | bool Gst::Preset::delete_preset_vfunc(const Glib::ustring& name) |
| 623 | { |
| 624 | const auto base = static_cast<BaseClassType*>( |
| 625 | g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface). |
| 626 | g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface. |
| 627 | ) ); |
| 628 | |
| 629 | if(base && base->delete_preset) |
| 630 | { |
| 631 | bool retval((*base->delete_preset)(gobj(),name.c_str())); |
| 632 | return retval; |
| 633 | } |
| 634 | |
| 635 | using RType = bool; |
| 636 | return RType(); |
| 637 | } |
| 638 | bool Gst::Preset::set_meta_vfunc(const Glib::ustring& name, const Glib::ustring& tag, const Glib::ustring& value) |
| 639 | { |
| 640 | const auto base = static_cast<BaseClassType*>( |
| 641 | g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface). |
| 642 | g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface. |
| 643 | ) ); |
| 644 | |
| 645 | if(base && base->set_meta) |
| 646 | { |
| 647 | bool retval((*base->set_meta)(gobj(),name.c_str(),tag.c_str(),value.c_str())); |
| 648 | return retval; |
| 649 | } |
| 650 | |
| 651 | using RType = bool; |
| 652 | return RType(); |
| 653 | } |
| 654 | |
| 655 | |
| 656 | } // namespace Gst |
| 657 | |
| 658 |