// Generated by gmmproc 2.50.1 -- DO NOT MODIFY!


#include <gstreamermmconfig.h>
#ifndef GSTREAMERMM_DISABLE_DEPRECATED


#include <glibmm.h>

#include <gstreamermm/multifdsink.h>
#include <gstreamermm/private/multifdsink_p.h>


// Generated by generate_plugin_gmmproc_file. Don't edit this file.


extern "C"
{

GType gst_multi_fd_sink_gstreamermm_get_type()
{
  static GType type = 0;
  GstElementFactory* factory = 0;
  GstPluginFeature* feature = 0;

  if(!type)
  {
    factory = gst_element_factory_find("multifdsink");
    // Make sure that the feature is actually loaded:
    if(factory)
    {
      feature =
        gst_plugin_feature_load(GST_PLUGIN_FEATURE(factory));

      g_object_unref(factory);
      factory = GST_ELEMENT_FACTORY(feature);
      type = gst_element_factory_get_element_type(factory);
      g_object_unref(factory);
    }
  }

  return type;
}

} // extern "C"

namespace Gst
{

MultiFdSink::MultiFdSink()
: // Mark this class as non-derived to allow C++ vfuncs to be skipped.
  Glib::ObjectBase(nullptr),
  Gst::BaseSink(Glib::ConstructParams(multifdsink_class_.init(), "name",static_cast<char*>(0), nullptr))
{}

MultiFdSink::MultiFdSink(const Glib::ustring& name)
: // Mark this class as non-derived to allow C++ vfuncs to be skipped.
  Glib::ObjectBase(nullptr),
  Gst::BaseSink(Glib::ConstructParams(multifdsink_class_.init(), "name",name.c_str(), nullptr))
{}

void MultiFdSink::add(int arg0)
{
  g_signal_emit_by_name(gobj(), "add", arg0, static_cast<void*>(0));
}

void MultiFdSink::add_full(int arg0, Gst::MultiHandleSinkSyncMethod arg1, Gst::Format arg2, guint64 arg3, Gst::Format arg4, guint64 arg5)
{
  g_signal_emit_by_name(gobj(), "add-full", arg0, ((GstMultiHandleSinkSyncMethod)(arg1)), ((GstFormat)(arg2)), arg3, ((GstFormat)(arg4)), arg5, static_cast<void*>(0));
}

void MultiFdSink::remove(int arg0)
{
  g_signal_emit_by_name(gobj(), "remove", arg0, static_cast<void*>(0));
}

void MultiFdSink::remove_flush(int arg0)
{
  g_signal_emit_by_name(gobj(), "remove-flush", arg0, static_cast<void*>(0));
}

Gst::Structure MultiFdSink::get_stats(int arg0)
{
  GstStructure* result;
  g_signal_emit_by_name(gobj(), "get-stats", arg0, &result, static_cast<void*>(0));
  return Glib::wrap(result);
}

}

namespace
{


static void MultiFdSink_signal_add_callback(GstMultiFdSink* self, gint p0,void* data)
{
  using namespace Gst;
  using SlotType = sigc::slot< void,int >;

  auto obj = dynamic_cast<MultiFdSink*>(Glib::ObjectBase::_get_current_wrapper((GObject*) self));
  // Do not try to call a signal on a disassociated wrapper.
  if(obj)
  {
    try
    {
      if(const auto slot = Glib::SignalProxyNormal::data_to_slot(data))
        (*static_cast<SlotType*>(slot))(p0
);
    }
    catch(...)
    {
       Glib::exception_handlers_invoke();
    }
  }
}

static const Glib::SignalProxyInfo MultiFdSink_signal_add_info =
{
  "add",
  (GCallback) &MultiFdSink_signal_add_callback,
  (GCallback) &MultiFdSink_signal_add_callback
};


static void MultiFdSink_signal_add_full_callback(GstMultiFdSink* self, gint p0,GstMultiHandleSinkSyncMethod p1,GstFormat p2,guint64 p3,GstFormat p4,guint64 p5,void* data)
{
  using namespace Gst;
  using SlotType = sigc::slot< void,int,Gst::MultiHandleSinkSyncMethod,Gst::Format,guint64,Gst::Format,guint64 >;

  auto obj = dynamic_cast<MultiFdSink*>(Glib::ObjectBase::_get_current_wrapper((GObject*) self));
  // Do not try to call a signal on a disassociated wrapper.
  if(obj)
  {
    try
    {
      if(const auto slot = Glib::SignalProxyNormal::data_to_slot(data))
        (*static_cast<SlotType*>(slot))(p0
, ((Gst::MultiHandleSinkSyncMethod)(p1))
, ((Gst::Format)(p2))
, p3, ((Gst::Format)(p4))
, p5);
    }
    catch(...)
    {
       Glib::exception_handlers_invoke();
    }
  }
}

static const Glib::SignalProxyInfo MultiFdSink_signal_add_full_info =
{
  "add-full",
  (GCallback) &MultiFdSink_signal_add_full_callback,
  (GCallback) &MultiFdSink_signal_add_full_callback
};


static void MultiFdSink_signal_remove_callback(GstMultiFdSink* self, gint p0,void* data)
{
  using namespace Gst;
  using SlotType = sigc::slot< void,int >;

  auto obj = dynamic_cast<MultiFdSink*>(Glib::ObjectBase::_get_current_wrapper((GObject*) self));
  // Do not try to call a signal on a disassociated wrapper.
  if(obj)
  {
    try
    {
      if(const auto slot = Glib::SignalProxyNormal::data_to_slot(data))
        (*static_cast<SlotType*>(slot))(p0
);
    }
    catch(...)
    {
       Glib::exception_handlers_invoke();
    }
  }
}

static const Glib::SignalProxyInfo MultiFdSink_signal_remove_info =
{
  "remove",
  (GCallback) &MultiFdSink_signal_remove_callback,
  (GCallback) &MultiFdSink_signal_remove_callback
};


static void MultiFdSink_signal_remove_flush_callback(GstMultiFdSink* self, gint p0,void* data)
{
  using namespace Gst;
  using SlotType = sigc::slot< void,int >;

  auto obj = dynamic_cast<MultiFdSink*>(Glib::ObjectBase::_get_current_wrapper((GObject*) self));
  // Do not try to call a signal on a disassociated wrapper.
  if(obj)
  {
    try
    {
      if(const auto slot = Glib::SignalProxyNormal::data_to_slot(data))
        (*static_cast<SlotType*>(slot))(p0
);
    }
    catch(...)
    {
       Glib::exception_handlers_invoke();
    }
  }
}

static const Glib::SignalProxyInfo MultiFdSink_signal_remove_flush_info =
{
  "remove-flush",
  (GCallback) &MultiFdSink_signal_remove_flush_callback,
  (GCallback) &MultiFdSink_signal_remove_flush_callback
};


static GstStructure* MultiFdSink_signal_get_stats_callback(GstMultiFdSink* self, gint p0,void* data)
{
  using namespace Gst;
  using SlotType = sigc::slot< Gst::Structure,int >;

  auto obj = dynamic_cast<MultiFdSink*>(Glib::ObjectBase::_get_current_wrapper((GObject*) self));
  // Do not try to call a signal on a disassociated wrapper.
  if(obj)
  {
    try
    {
      if(const auto slot = Glib::SignalProxyNormal::data_to_slot(data))
        return ((*static_cast<SlotType*>(slot))(p0
)).gobj_copy();
    }
    catch(...)
    {
       Glib::exception_handlers_invoke();
    }
  }

  using RType = GstStructure*;
  return RType();
}

static GstStructure* MultiFdSink_signal_get_stats_notify_callback(GstMultiFdSink* self, gint p0, void* data)
{
  using namespace Gst;
  using SlotType = sigc::slot< void,int >;

  auto obj = dynamic_cast<MultiFdSink*>(Glib::ObjectBase::_get_current_wrapper((GObject*) self));
  // Do not try to call a signal on a disassociated wrapper.
  if(obj)
  {
    try
    {
      if(const auto slot = Glib::SignalProxyNormal::data_to_slot(data))
        (*static_cast<SlotType*>(slot))(p0
);
    }
    catch(...)
    {
      Glib::exception_handlers_invoke();
    }
  }

  using RType = GstStructure*;
  return RType();
}

static const Glib::SignalProxyInfo MultiFdSink_signal_get_stats_info =
{
  "get-stats",
  (GCallback) &MultiFdSink_signal_get_stats_callback,
  (GCallback) &MultiFdSink_signal_get_stats_notify_callback
};


static void MultiFdSink_signal_client_added_callback(GstMultiFdSink* self, gint p0,void* data)
{
  using namespace Gst;
  using SlotType = sigc::slot< void,int >;

  auto obj = dynamic_cast<MultiFdSink*>(Glib::ObjectBase::_get_current_wrapper((GObject*) self));
  // Do not try to call a signal on a disassociated wrapper.
  if(obj)
  {
    try
    {
      if(const auto slot = Glib::SignalProxyNormal::data_to_slot(data))
        (*static_cast<SlotType*>(slot))(p0
);
    }
    catch(...)
    {
       Glib::exception_handlers_invoke();
    }
  }
}

static const Glib::SignalProxyInfo MultiFdSink_signal_client_added_info =
{
  "client-added",
  (GCallback) &MultiFdSink_signal_client_added_callback,
  (GCallback) &MultiFdSink_signal_client_added_callback
};


static void MultiFdSink_signal_client_removed_callback(GstMultiFdSink* self, gint p0,GstMultiHandleSinkClientStatus p1,void* data)
{
  using namespace Gst;
  using SlotType = sigc::slot< void,int,Gst::MultiHandleSinkClientStatus >;

  auto obj = dynamic_cast<MultiFdSink*>(Glib::ObjectBase::_get_current_wrapper((GObject*) self));
  // Do not try to call a signal on a disassociated wrapper.
  if(obj)
  {
    try
    {
      if(const auto slot = Glib::SignalProxyNormal::data_to_slot(data))
        (*static_cast<SlotType*>(slot))(p0
, ((Gst::MultiHandleSinkClientStatus)(p1))
);
    }
    catch(...)
    {
       Glib::exception_handlers_invoke();
    }
  }
}

static const Glib::SignalProxyInfo MultiFdSink_signal_client_removed_info =
{
  "client-removed",
  (GCallback) &MultiFdSink_signal_client_removed_callback,
  (GCallback) &MultiFdSink_signal_client_removed_callback
};


static void MultiFdSink_signal_client_fd_removed_callback(GstMultiFdSink* self, gint p0,void* data)
{
  using namespace Gst;
  using SlotType = sigc::slot< void,int >;

  auto obj = dynamic_cast<MultiFdSink*>(Glib::ObjectBase::_get_current_wrapper((GObject*) self));
  // Do not try to call a signal on a disassociated wrapper.
  if(obj)
  {
    try
    {
      if(const auto slot = Glib::SignalProxyNormal::data_to_slot(data))
        (*static_cast<SlotType*>(slot))(p0
);
    }
    catch(...)
    {
       Glib::exception_handlers_invoke();
    }
  }
}

static const Glib::SignalProxyInfo MultiFdSink_signal_client_fd_removed_info =
{
  "client-fd-removed",
  (GCallback) &MultiFdSink_signal_client_fd_removed_callback,
  (GCallback) &MultiFdSink_signal_client_fd_removed_callback
};


} // anonymous namespace


namespace Glib
{

Glib::RefPtr<Gst::MultiFdSink> wrap(GstMultiFdSink* object, bool take_copy)
{
  return Glib::RefPtr<Gst::MultiFdSink>( dynamic_cast<Gst::MultiFdSink*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
  //We use dynamic_cast<> in case of multiple inheritance.
}

} /* namespace Glib */


namespace Gst
{


/* The *_Class implementation: */

const Glib::Class& MultiFdSink_Class::init()
{
  if(!gtype_) // create the GType if necessary
  {
    // Glib::Class has to know the class init function to clone custom types.
    class_init_func_ = &MultiFdSink_Class::class_init_function;

    // This is actually just optimized away, apparently with no harm.
    // Make sure that the parent type has been created.
    //CppClassParent::CppObjectType::get_type();

    // Create the wrapper type, with the same class/instance size as the base type.
    register_derived_type(gst_multi_fd_sink_gstreamermm_get_type());

    // Add derived versions of interfaces, if the C type implements any interfaces:

  }

  return *this;
}


void MultiFdSink_Class::class_init_function(void* g_class, void* class_data)
{
  const auto klass = static_cast<BaseClassType*>(g_class);
  CppClassParent::class_init_function(klass, class_data);


}


Glib::ObjectBase* MultiFdSink_Class::wrap_new(GObject* object)
{
  return new MultiFdSink((GstMultiFdSink*)object);
}


/* The implementation: */

GstMultiFdSink* MultiFdSink::gobj_copy()
{
  reference();
  return gobj();
}

MultiFdSink::MultiFdSink(const Glib::ConstructParams& construct_params)
:
  Gst::BaseSink(construct_params)
{

}

MultiFdSink::MultiFdSink(GstMultiFdSink* castitem)
:
  Gst::BaseSink((GstBaseSink*)(castitem))
{}


MultiFdSink::MultiFdSink(MultiFdSink&& src) noexcept
: Gst::BaseSink(std::move(src))
{}

MultiFdSink& MultiFdSink::operator=(MultiFdSink&& src) noexcept
{
  Gst::BaseSink::operator=(std::move(src));
  return *this;
}


MultiFdSink::~MultiFdSink() noexcept
{}


MultiFdSink::CppClassType MultiFdSink::multifdsink_class_; // initialize static member

GType MultiFdSink::get_type()
{
  return multifdsink_class_.init().get_type();
}


GType MultiFdSink::get_base_type()
{
  return gst_multi_fd_sink_gstreamermm_get_type();
}


Glib::RefPtr<MultiFdSink> MultiFdSink::create()
{
  return Glib::RefPtr<MultiFdSink>( new MultiFdSink() );
}

Glib::RefPtr<MultiFdSink> MultiFdSink::create(const Glib::ustring& name)
{
  return Glib::RefPtr<MultiFdSink>( new MultiFdSink(name) );
}


Glib::SignalProxy< void,int > MultiFdSink::signal_add()
{
  return Glib::SignalProxy< void,int >(this, &MultiFdSink_signal_add_info);
}


Glib::SignalProxy< void,int,Gst::MultiHandleSinkSyncMethod,Gst::Format,guint64,Gst::Format,guint64 > MultiFdSink::signal_add_full()
{
  return Glib::SignalProxy< void,int,Gst::MultiHandleSinkSyncMethod,Gst::Format,guint64,Gst::Format,guint64 >(this, &MultiFdSink_signal_add_full_info);
}


Glib::SignalProxy< void,int > MultiFdSink::signal_remove()
{
  return Glib::SignalProxy< void,int >(this, &MultiFdSink_signal_remove_info);
}


Glib::SignalProxy< void,int > MultiFdSink::signal_remove_flush()
{
  return Glib::SignalProxy< void,int >(this, &MultiFdSink_signal_remove_flush_info);
}


Glib::SignalProxy< Gst::Structure,int > MultiFdSink::signal_get_stats()
{
  return Glib::SignalProxy< Gst::Structure,int >(this, &MultiFdSink_signal_get_stats_info);
}


Glib::SignalProxy< void,int > MultiFdSink::signal_client_added()
{
  return Glib::SignalProxy< void,int >(this, &MultiFdSink_signal_client_added_info);
}


Glib::SignalProxy< void,int,Gst::MultiHandleSinkClientStatus > MultiFdSink::signal_client_removed()
{
  return Glib::SignalProxy< void,int,Gst::MultiHandleSinkClientStatus >(this, &MultiFdSink_signal_client_removed_info);
}


Glib::SignalProxy< void,int > MultiFdSink::signal_client_fd_removed()
{
  return Glib::SignalProxy< void,int >(this, &MultiFdSink_signal_client_fd_removed_info);
}


Glib::PropertyProxy< bool > MultiFdSink::property_handle_read() 
{
  return Glib::PropertyProxy< bool >(this, "handle-read");
}

Glib::PropertyProxy_ReadOnly< bool > MultiFdSink::property_handle_read() const
{
  return Glib::PropertyProxy_ReadOnly< bool >(this, "handle-read");
}


} // namespace Gst

#endif // GSTREAMERMM_DISABLE_DEPRECATED


