// Generated by gtkmmproc -- DO NOT MODIFY!


#include <glibmm.h>

#include <gstreamermm/tuner.h>
#include <gstreamermm/private/tuner_p.h>


/* gstreamermm - a C++ wrapper for gstreamer
 *
 * Copyright 2008 The gstreamermm Development Team
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free
 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */

#include <gst/interfaces/tuner.h>
#include <gstreamermm/tunerchannel.h>
#include <gstreamermm/tunernorm.h>

namespace Gst
{

const GList* Tuner_Class::list_channels_vfunc_callback(GstTuner* self)
{
  Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));

  // Non-gtkmmproc-generated custom classes implicitly call the default
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
  // generated classes can use this optimisation, which avoids the unnecessary
  // parameter conversions if there is no possibility of the virtual function
  // being overridden:
  if(obj_base && obj_base->is_derived_())
  {
    CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
    if(obj) // This can be NULL during destruction.
    {
      try // Trap C++ exceptions which would normally be lost because this is a C callback.
      {
        // Call the virtual member method, which derived classes might override.
        return (obj->list_channels_vfunc()).data();
      }
      catch(...)
      {
        Glib::exception_handlers_invoke();
      }
    }
  }
  
  BaseClassType *const base = static_cast<BaseClassType*>(
      g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
)  );

  // Call the original underlying C function:
  if(base && base->list_channels)
    return (*base->list_channels)(self);


  typedef const GList* RType;
  return RType();
}
Glib::ListHandle< Glib::RefPtr<Gst::TunerChannel> > Gst::Tuner::list_channels_vfunc() const
{
  BaseClassType *const base = static_cast<BaseClassType*>(
      g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
)  );

  if(base && base->list_channels)
    return Glib::ListHandle< Glib::RefPtr<Gst::TunerChannel> >(const_cast<GList*>((*base->list_channels)(const_cast<GstTuner*>(gobj()))), Glib::OWNERSHIP_NONE);

  typedef Glib::ListHandle< Glib::RefPtr<Gst::TunerChannel> > RType;
  return RType(0, Glib::OWNERSHIP_NONE);
}
const GList* Tuner_Class::list_norms_vfunc_callback(GstTuner* self)
{
  Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));

  // Non-gtkmmproc-generated custom classes implicitly call the default
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
  // generated classes can use this optimisation, which avoids the unnecessary
  // parameter conversions if there is no possibility of the virtual function
  // being overridden:
  if(obj_base && obj_base->is_derived_())
  {
    CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
    if(obj) // This can be NULL during destruction.
    {
      try // Trap C++ exceptions which would normally be lost because this is a C callback.
      {
        // Call the virtual member method, which derived classes might override.
        return (obj->list_norms_vfunc()).data();
      }
      catch(...)
      {
        Glib::exception_handlers_invoke();
      }
    }
  }
  
  BaseClassType *const base = static_cast<BaseClassType*>(
      g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
)  );

  // Call the original underlying C function:
  if(base && base->list_norms)
    return (*base->list_norms)(self);


  typedef const GList* RType;
  return RType();
}
Glib::ListHandle< Glib::RefPtr<Gst::TunerNorm> > Gst::Tuner::list_norms_vfunc() const
{
  BaseClassType *const base = static_cast<BaseClassType*>(
      g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
)  );

  if(base && base->list_norms)
    return Glib::ListHandle< Glib::RefPtr<Gst::TunerNorm> >(const_cast<GList*>((*base->list_norms)(const_cast<GstTuner*>(gobj()))), Glib::OWNERSHIP_NONE);

  typedef Glib::ListHandle< Glib::RefPtr<Gst::TunerNorm> > RType;
  return RType(0, Glib::OWNERSHIP_NONE);
}

} // namespace Gst

namespace
{


static void Tuner_signal_channel_changed_callback(GstTuner* self, GstTunerChannel* p0,void* data)
{
  using namespace Gst;
  typedef sigc::slot< void,const Glib::RefPtr<Gst::TunerChannel>& > SlotType;

  // Do not try to call a signal on a disassociated wrapper.
  if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
  {
    #ifdef GLIBMM_EXCEPTIONS_ENABLED
    try
    {
    #endif //GLIBMM_EXCEPTIONS_ENABLED
      if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
        (*static_cast<SlotType*>(slot))(Glib::wrap(p0, true)
);
    #ifdef GLIBMM_EXCEPTIONS_ENABLED
    }
    catch(...)
    {
      Glib::exception_handlers_invoke();
    }
    #endif //GLIBMM_EXCEPTIONS_ENABLED
  }
}

static const Glib::SignalProxyInfo Tuner_signal_channel_changed_info =
{
  "channel-changed",
  (GCallback) &Tuner_signal_channel_changed_callback,
  (GCallback) &Tuner_signal_channel_changed_callback
};


static void Tuner_signal_frequency_changed_callback(GstTuner* self, GstTunerChannel* p0,gulong p1,void* data)
{
  using namespace Gst;
  typedef sigc::slot< void,const Glib::RefPtr<Gst::TunerChannel>&,gulong > SlotType;

  // Do not try to call a signal on a disassociated wrapper.
  if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
  {
    #ifdef GLIBMM_EXCEPTIONS_ENABLED
    try
    {
    #endif //GLIBMM_EXCEPTIONS_ENABLED
      if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
        (*static_cast<SlotType*>(slot))(Glib::wrap(p0, true)
, p1);
    #ifdef GLIBMM_EXCEPTIONS_ENABLED
    }
    catch(...)
    {
      Glib::exception_handlers_invoke();
    }
    #endif //GLIBMM_EXCEPTIONS_ENABLED
  }
}

static const Glib::SignalProxyInfo Tuner_signal_frequency_changed_info =
{
  "frequency-changed",
  (GCallback) &Tuner_signal_frequency_changed_callback,
  (GCallback) &Tuner_signal_frequency_changed_callback
};


static void Tuner_signal_norm_changed_callback(GstTuner* self, GstTunerNorm* p0,void* data)
{
  using namespace Gst;
  typedef sigc::slot< void,const Glib::RefPtr<Gst::TunerNorm>& > SlotType;

  // Do not try to call a signal on a disassociated wrapper.
  if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
  {
    #ifdef GLIBMM_EXCEPTIONS_ENABLED
    try
    {
    #endif //GLIBMM_EXCEPTIONS_ENABLED
      if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
        (*static_cast<SlotType*>(slot))(Glib::wrap(p0, true)
);
    #ifdef GLIBMM_EXCEPTIONS_ENABLED
    }
    catch(...)
    {
      Glib::exception_handlers_invoke();
    }
    #endif //GLIBMM_EXCEPTIONS_ENABLED
  }
}

static const Glib::SignalProxyInfo Tuner_signal_norm_changed_info =
{
  "norm-changed",
  (GCallback) &Tuner_signal_norm_changed_callback,
  (GCallback) &Tuner_signal_norm_changed_callback
};


static void Tuner_signal_signal_changed_callback(GstTuner* self, GstTunerChannel* p0,gint p1,void* data)
{
  using namespace Gst;
  typedef sigc::slot< void,const Glib::RefPtr<Gst::TunerChannel>&,int > SlotType;

  // Do not try to call a signal on a disassociated wrapper.
  if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
  {
    #ifdef GLIBMM_EXCEPTIONS_ENABLED
    try
    {
    #endif //GLIBMM_EXCEPTIONS_ENABLED
      if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
        (*static_cast<SlotType*>(slot))(Glib::wrap(p0, true)
, p1
);
    #ifdef GLIBMM_EXCEPTIONS_ENABLED
    }
    catch(...)
    {
      Glib::exception_handlers_invoke();
    }
    #endif //GLIBMM_EXCEPTIONS_ENABLED
  }
}

static const Glib::SignalProxyInfo Tuner_signal_signal_changed_info =
{
  "signal-changed",
  (GCallback) &Tuner_signal_signal_changed_callback,
  (GCallback) &Tuner_signal_signal_changed_callback
};


} // anonymous namespace


namespace Glib
{

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

} // namespace Glib


namespace Gst
{


/* The *_Class implementation: */

const Glib::Interface_Class& Tuner_Class::init()
{
  if(!gtype_) // create the GType if necessary
  {
    // Glib::Interface_Class has to know the interface init function
    // in order to add interfaces to implementing types.
    class_init_func_ = &Tuner_Class::iface_init_function;

    // We can not derive from another interface, and it is not necessary anyway.
    gtype_ = gst_tuner_get_type();
  }

  return *this;
}

void Tuner_Class::iface_init_function(void* g_iface, void*)
{
  BaseClassType *const klass = static_cast<BaseClassType*>(g_iface);

  //This is just to avoid an "unused variable" warning when there are no vfuncs or signal handlers to connect.
  //This is a temporary fix until I find out why I can not seem to derive a GtkFileChooser interface. murrayc
  g_assert(klass != 0); 

  klass->set_channel = &set_channel_vfunc_callback;
  klass->get_channel = &get_channel_vfunc_callback;
  klass->set_norm = &set_norm_vfunc_callback;
  klass->get_norm = &get_norm_vfunc_callback;
  klass->set_frequency = &set_frequency_vfunc_callback;
  klass->get_frequency = &get_frequency_vfunc_callback;
  klass->signal_strength = &signal_strength_vfunc_callback;
  klass->list_channels = &list_channels_vfunc_callback;
  klass->list_norms = &list_norms_vfunc_callback;
  
  klass->channel_changed = &channel_changed_callback;
  klass->frequency_changed = &frequency_changed_callback;
  klass->norm_changed = &norm_changed_callback;
  klass->signal_changed = &signal_changed_callback;
}

void Tuner_Class::set_channel_vfunc_callback(GstTuner* self, GstTunerChannel* channel)
{
  Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));

  // Non-gtkmmproc-generated custom classes implicitly call the default
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
  // generated classes can use this optimisation, which avoids the unnecessary
  // parameter conversions if there is no possibility of the virtual function
  // being overridden:
  if(obj_base && obj_base->is_derived_())
  {
    CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
    if(obj) // This can be NULL during destruction.
    {
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
      try // Trap C++ exceptions which would normally be lost because this is a C callback.
      {
      #endif //GLIBMM_EXCEPTIONS_ENABLED
        // Call the virtual member method, which derived classes might override.
        obj->set_channel_vfunc(Glib::wrap(channel, true)
);
        return;
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
      }
      catch(...)
      {
        Glib::exception_handlers_invoke();
      }
      #endif //GLIBMM_EXCEPTIONS_ENABLED
    }
  }

  BaseClassType *const base = static_cast<BaseClassType*>(
      g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
)  );

  // Call the original underlying C function:
  if(base && base->set_channel)
  {
    (*base->set_channel)(self, channel);
  }

}
GstTunerChannel* Tuner_Class::get_channel_vfunc_callback(GstTuner* self)
{
  Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));

  // Non-gtkmmproc-generated custom classes implicitly call the default
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
  // generated classes can use this optimisation, which avoids the unnecessary
  // parameter conversions if there is no possibility of the virtual function
  // being overridden:
  if(obj_base && obj_base->is_derived_())
  {
    CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
    if(obj) // This can be NULL during destruction.
    {
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
      try // Trap C++ exceptions which would normally be lost because this is a C callback.
      {
      #endif //GLIBMM_EXCEPTIONS_ENABLED
        // Call the virtual member method, which derived classes might override.
        return Glib::unwrap(obj->get_channel_vfunc());
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
      }
      catch(...)
      {
        Glib::exception_handlers_invoke();
      }
      #endif //GLIBMM_EXCEPTIONS_ENABLED
    }
  }

  BaseClassType *const base = static_cast<BaseClassType*>(
      g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
)  );

  // Call the original underlying C function:
  if(base && base->get_channel)
  {
    GstTunerChannel* result = (*base->get_channel)(self);
    return result;
  }


  typedef GstTunerChannel* RType;
  return RType();
}
void Tuner_Class::set_norm_vfunc_callback(GstTuner* self, GstTunerNorm* norm)
{
  Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));

  // Non-gtkmmproc-generated custom classes implicitly call the default
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
  // generated classes can use this optimisation, which avoids the unnecessary
  // parameter conversions if there is no possibility of the virtual function
  // being overridden:
  if(obj_base && obj_base->is_derived_())
  {
    CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
    if(obj) // This can be NULL during destruction.
    {
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
      try // Trap C++ exceptions which would normally be lost because this is a C callback.
      {
      #endif //GLIBMM_EXCEPTIONS_ENABLED
        // Call the virtual member method, which derived classes might override.
        obj->set_norm_vfunc(Glib::wrap(norm, true)
);
        return;
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
      }
      catch(...)
      {
        Glib::exception_handlers_invoke();
      }
      #endif //GLIBMM_EXCEPTIONS_ENABLED
    }
  }

  BaseClassType *const base = static_cast<BaseClassType*>(
      g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
)  );

  // Call the original underlying C function:
  if(base && base->set_norm)
  {
    (*base->set_norm)(self, norm);
  }

}
GstTunerNorm* Tuner_Class::get_norm_vfunc_callback(GstTuner* self)
{
  Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));

  // Non-gtkmmproc-generated custom classes implicitly call the default
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
  // generated classes can use this optimisation, which avoids the unnecessary
  // parameter conversions if there is no possibility of the virtual function
  // being overridden:
  if(obj_base && obj_base->is_derived_())
  {
    CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
    if(obj) // This can be NULL during destruction.
    {
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
      try // Trap C++ exceptions which would normally be lost because this is a C callback.
      {
      #endif //GLIBMM_EXCEPTIONS_ENABLED
        // Call the virtual member method, which derived classes might override.
        return Glib::unwrap(obj->get_norm_vfunc());
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
      }
      catch(...)
      {
        Glib::exception_handlers_invoke();
      }
      #endif //GLIBMM_EXCEPTIONS_ENABLED
    }
  }

  BaseClassType *const base = static_cast<BaseClassType*>(
      g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
)  );

  // Call the original underlying C function:
  if(base && base->get_norm)
  {
    GstTunerNorm* result = (*base->get_norm)(self);
    return result;
  }


  typedef GstTunerNorm* RType;
  return RType();
}
void Tuner_Class::set_frequency_vfunc_callback(GstTuner* self, GstTunerChannel* channel, gulong frequency)
{
  Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));

  // Non-gtkmmproc-generated custom classes implicitly call the default
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
  // generated classes can use this optimisation, which avoids the unnecessary
  // parameter conversions if there is no possibility of the virtual function
  // being overridden:
  if(obj_base && obj_base->is_derived_())
  {
    CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
    if(obj) // This can be NULL during destruction.
    {
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
      try // Trap C++ exceptions which would normally be lost because this is a C callback.
      {
      #endif //GLIBMM_EXCEPTIONS_ENABLED
        // Call the virtual member method, which derived classes might override.
        obj->set_frequency_vfunc(Glib::wrap(channel, true)
, frequency);
        return;
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
      }
      catch(...)
      {
        Glib::exception_handlers_invoke();
      }
      #endif //GLIBMM_EXCEPTIONS_ENABLED
    }
  }

  BaseClassType *const base = static_cast<BaseClassType*>(
      g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
)  );

  // Call the original underlying C function:
  if(base && base->set_frequency)
  {
    (*base->set_frequency)(self, channel, frequency);
  }

}
gulong Tuner_Class::get_frequency_vfunc_callback(GstTuner* self, GstTunerChannel* channel)
{
  Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));

  // Non-gtkmmproc-generated custom classes implicitly call the default
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
  // generated classes can use this optimisation, which avoids the unnecessary
  // parameter conversions if there is no possibility of the virtual function
  // being overridden:
  if(obj_base && obj_base->is_derived_())
  {
    CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
    if(obj) // This can be NULL during destruction.
    {
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
      try // Trap C++ exceptions which would normally be lost because this is a C callback.
      {
      #endif //GLIBMM_EXCEPTIONS_ENABLED
        // Call the virtual member method, which derived classes might override.
        return obj->get_frequency_vfunc(Glib::wrap(channel, true)
);
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
      }
      catch(...)
      {
        Glib::exception_handlers_invoke();
      }
      #endif //GLIBMM_EXCEPTIONS_ENABLED
    }
  }

  BaseClassType *const base = static_cast<BaseClassType*>(
      g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
)  );

  // Call the original underlying C function:
  if(base && base->get_frequency)
  {
    gulong result = (*base->get_frequency)(self, channel);
    return result;
  }


  typedef gulong RType;
  return RType();
}
gint Tuner_Class::signal_strength_vfunc_callback(GstTuner* self, GstTunerChannel* channel)
{
  Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));

  // Non-gtkmmproc-generated custom classes implicitly call the default
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
  // generated classes can use this optimisation, which avoids the unnecessary
  // parameter conversions if there is no possibility of the virtual function
  // being overridden:
  if(obj_base && obj_base->is_derived_())
  {
    CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
    if(obj) // This can be NULL during destruction.
    {
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
      try // Trap C++ exceptions which would normally be lost because this is a C callback.
      {
      #endif //GLIBMM_EXCEPTIONS_ENABLED
        // Call the virtual member method, which derived classes might override.
        return obj->signal_strength_vfunc(Glib::wrap(channel, true)
);
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
      }
      catch(...)
      {
        Glib::exception_handlers_invoke();
      }
      #endif //GLIBMM_EXCEPTIONS_ENABLED
    }
  }

  BaseClassType *const base = static_cast<BaseClassType*>(
      g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
)  );

  // Call the original underlying C function:
  if(base && base->signal_strength)
  {
    gint result = (*base->signal_strength)(self, channel);
    return result;
  }


  typedef gint RType;
  return RType();
}

void Tuner_Class::channel_changed_callback(GstTuner* self, GstTunerChannel* p0)
{
  Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));

  // Non-gtkmmproc-generated custom classes implicitly call the default
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
  // generated classes can use this optimisation, which avoids the unnecessary
  // parameter conversions if there is no possibility of the virtual function
  // being overridden:
  if(obj_base && obj_base->is_derived_())
  {
    CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
    if(obj) // This can be NULL during destruction.
    {
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
      try // Trap C++ exceptions which would normally be lost because this is a C callback.
      {
      #endif //GLIBMM_EXCEPTIONS_ENABLED
        // Call the virtual member method, which derived classes might override.
        obj->on_channel_changed(Glib::wrap(p0, true)
);
        return;
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
      }
      catch(...)
      {
        Glib::exception_handlers_invoke();
      }
      #endif //GLIBMM_EXCEPTIONS_ENABLED
    }
  }

  BaseClassType *const base = static_cast<BaseClassType*>(
        g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
)    );

  // Call the original underlying C function:
  if(base && base->channel_changed)
    (*base->channel_changed)(self, p0);
}
void Tuner_Class::frequency_changed_callback(GstTuner* self, GstTunerChannel* p0, gulong p1)
{
  Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));

  // Non-gtkmmproc-generated custom classes implicitly call the default
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
  // generated classes can use this optimisation, which avoids the unnecessary
  // parameter conversions if there is no possibility of the virtual function
  // being overridden:
  if(obj_base && obj_base->is_derived_())
  {
    CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
    if(obj) // This can be NULL during destruction.
    {
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
      try // Trap C++ exceptions which would normally be lost because this is a C callback.
      {
      #endif //GLIBMM_EXCEPTIONS_ENABLED
        // Call the virtual member method, which derived classes might override.
        obj->on_frequency_changed(Glib::wrap(p0, true)
, p1);
        return;
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
      }
      catch(...)
      {
        Glib::exception_handlers_invoke();
      }
      #endif //GLIBMM_EXCEPTIONS_ENABLED
    }
  }

  BaseClassType *const base = static_cast<BaseClassType*>(
        g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
)    );

  // Call the original underlying C function:
  if(base && base->frequency_changed)
    (*base->frequency_changed)(self, p0, p1);
}
void Tuner_Class::norm_changed_callback(GstTuner* self, GstTunerNorm* p0)
{
  Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));

  // Non-gtkmmproc-generated custom classes implicitly call the default
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
  // generated classes can use this optimisation, which avoids the unnecessary
  // parameter conversions if there is no possibility of the virtual function
  // being overridden:
  if(obj_base && obj_base->is_derived_())
  {
    CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
    if(obj) // This can be NULL during destruction.
    {
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
      try // Trap C++ exceptions which would normally be lost because this is a C callback.
      {
      #endif //GLIBMM_EXCEPTIONS_ENABLED
        // Call the virtual member method, which derived classes might override.
        obj->on_norm_changed(Glib::wrap(p0, true)
);
        return;
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
      }
      catch(...)
      {
        Glib::exception_handlers_invoke();
      }
      #endif //GLIBMM_EXCEPTIONS_ENABLED
    }
  }

  BaseClassType *const base = static_cast<BaseClassType*>(
        g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
)    );

  // Call the original underlying C function:
  if(base && base->norm_changed)
    (*base->norm_changed)(self, p0);
}
void Tuner_Class::signal_changed_callback(GstTuner* self, GstTunerChannel* p0, gint p1)
{
  Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));

  // Non-gtkmmproc-generated custom classes implicitly call the default
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
  // generated classes can use this optimisation, which avoids the unnecessary
  // parameter conversions if there is no possibility of the virtual function
  // being overridden:
  if(obj_base && obj_base->is_derived_())
  {
    CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
    if(obj) // This can be NULL during destruction.
    {
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
      try // Trap C++ exceptions which would normally be lost because this is a C callback.
      {
      #endif //GLIBMM_EXCEPTIONS_ENABLED
        // Call the virtual member method, which derived classes might override.
        obj->on_signal_changed(Glib::wrap(p0, true)
, p1
);
        return;
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
      }
      catch(...)
      {
        Glib::exception_handlers_invoke();
      }
      #endif //GLIBMM_EXCEPTIONS_ENABLED
    }
  }

  BaseClassType *const base = static_cast<BaseClassType*>(
        g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
)    );

  // Call the original underlying C function:
  if(base && base->signal_changed)
    (*base->signal_changed)(self, p0, p1);
}


Glib::ObjectBase* Tuner_Class::wrap_new(GObject* object)
{
  return new Tuner((GstTuner*)(object));
}


/* The implementation: */

Tuner::Tuner()
:
  Glib::Interface(tuner_class_.init())
{}

Tuner::Tuner(GstTuner* castitem)
:
  Glib::Interface((GObject*)(castitem))
{}

Tuner::Tuner(const Glib::Interface_Class& interface_class)
: Glib::Interface(interface_class)
{
}

Tuner::~Tuner()
{}

// static
void Tuner::add_interface(GType gtype_implementer)
{
  tuner_class_.init().add_interface(gtype_implementer);
}

Tuner::CppClassType Tuner::tuner_class_; // initialize static member

GType Tuner::get_type()
{
  return tuner_class_.init().get_type();
}


GType Tuner::get_base_type()
{
  return gst_tuner_get_type();
}


Glib::ListHandle< Glib::RefPtr<Gst::TunerChannel> > Tuner::list_channels()
{
  return Glib::ListHandle< Glib::RefPtr<Gst::TunerChannel> >(const_cast<GList*>(gst_tuner_list_channels(gobj())), Glib::OWNERSHIP_NONE);
}

Glib::ListHandle< Glib::RefPtr<const Gst::TunerChannel> > Tuner::list_channels() const
{
  return Glib::ListHandle< Glib::RefPtr<const Gst::TunerChannel> >(const_cast<GList*>(gst_tuner_list_channels(const_cast<GstTuner*>(gobj()))), Glib::OWNERSHIP_NONE);
}

Glib::RefPtr<Gst::TunerChannel> Tuner::get_channel()
{
  return Glib::wrap(gst_tuner_get_channel(gobj()));
}

Glib::RefPtr<const Gst::TunerChannel> Tuner::get_channel() const
{
  return Glib::wrap(gst_tuner_get_channel(const_cast<GstTuner*>(gobj())));
}

void Tuner::set_channel(const Glib::RefPtr<Gst::TunerChannel>& channel)
{
  gst_tuner_set_channel(gobj(), Glib::unwrap(channel));
}

Glib::ListHandle< Glib::RefPtr<Gst::TunerNorm> > Tuner::list_norms()
{
  return Glib::ListHandle< Glib::RefPtr<Gst::TunerNorm> >(const_cast<GList*>(gst_tuner_list_norms(gobj())), Glib::OWNERSHIP_NONE);
}

Glib::ListHandle< Glib::RefPtr<const Gst::TunerNorm> > Tuner::list_norms() const
{
  return Glib::ListHandle< Glib::RefPtr<const Gst::TunerNorm> >(const_cast<GList*>(gst_tuner_list_norms(const_cast<GstTuner*>(gobj()))), Glib::OWNERSHIP_NONE);
}

Glib::RefPtr<Gst::TunerNorm> Tuner::get_norm()
{
  return Glib::wrap(gst_tuner_get_norm(gobj()));
}

Glib::RefPtr<const Gst::TunerNorm> Tuner::get_norm() const
{
  return Glib::wrap(gst_tuner_get_norm(const_cast<GstTuner*>(gobj())));
}

void Tuner::set_norm(const Glib::RefPtr<Gst::TunerNorm>& norm)
{
  gst_tuner_set_norm(gobj(), Glib::unwrap(norm));
}

gulong Tuner::get_frequency(const Glib::RefPtr<const Gst::TunerChannel>& channel) const
{
  return gst_tuner_get_frequency(const_cast<GstTuner*>(gobj()), const_cast<GstTunerChannel*>(Glib::unwrap(channel)));
}

void Tuner::set_frequency(const Glib::RefPtr<Gst::TunerChannel>& channel, gulong frequency)
{
  gst_tuner_set_frequency(gobj(), Glib::unwrap(channel), frequency);
}

int Tuner::get_signal_strength(const Glib::RefPtr<Gst::TunerChannel>& channel)
{
  return gst_tuner_signal_strength(gobj(), Glib::unwrap(channel));
}

Glib::RefPtr<Gst::TunerNorm> Tuner::find_norm(const Glib::ustring& norm)
{
  return Glib::wrap(gst_tuner_find_norm_by_name(gobj(), const_cast<gchar*>(norm.c_str())));
}

Glib::RefPtr<const Gst::TunerNorm> Tuner::find_norm(const Glib::ustring& norm) const
{
  return Glib::wrap(gst_tuner_find_norm_by_name(const_cast<GstTuner*>(gobj()), const_cast<gchar*>(norm.c_str())));
}

Glib::RefPtr<Gst::TunerChannel> Tuner::find_channel(const Glib::ustring& channel)
{
  return Glib::wrap(gst_tuner_find_channel_by_name(gobj(), const_cast<gchar*>(channel.c_str())));
}

Glib::RefPtr<const Gst::TunerChannel> Tuner::find_channel(const Glib::ustring& channel) const
{
  return Glib::wrap(gst_tuner_find_channel_by_name(const_cast<GstTuner*>(gobj()), const_cast<gchar*>(channel.c_str())));
}

void Tuner::channel_changed(const Glib::RefPtr<Gst::TunerChannel>& channel)
{
  gst_tuner_channel_changed(gobj(), Glib::unwrap(channel));
}

void Tuner::norm_changed(const Glib::RefPtr<Gst::TunerNorm>& norm)
{
  gst_tuner_norm_changed(gobj(), Glib::unwrap(norm));
}

void Tuner::frequency_changed(const Glib::RefPtr<Gst::TunerChannel>& channel, gulong frequency)
{
  gst_tuner_frequency_changed(gobj(), Glib::unwrap(channel), frequency);
}

void Tuner::signal_changed(const Glib::RefPtr<Gst::TunerChannel>& channel, int signal)
{
  gst_tuner_signal_changed(gobj(), Glib::unwrap(channel), signal);
}


Glib::SignalProxy1< void,const Glib::RefPtr<Gst::TunerChannel>& > Tuner::signal_channel_changed()
{
  return Glib::SignalProxy1< void,const Glib::RefPtr<Gst::TunerChannel>& >(this, &Tuner_signal_channel_changed_info);
}


Glib::SignalProxy2< void,const Glib::RefPtr<Gst::TunerChannel>&,gulong > Tuner::signal_frequency_changed()
{
  return Glib::SignalProxy2< void,const Glib::RefPtr<Gst::TunerChannel>&,gulong >(this, &Tuner_signal_frequency_changed_info);
}


Glib::SignalProxy1< void,const Glib::RefPtr<Gst::TunerNorm>& > Tuner::signal_norm_changed()
{
  return Glib::SignalProxy1< void,const Glib::RefPtr<Gst::TunerNorm>& >(this, &Tuner_signal_norm_changed_info);
}


Glib::SignalProxy2< void,const Glib::RefPtr<Gst::TunerChannel>&,int > Tuner::signal_signal_changed()
{
  return Glib::SignalProxy2< void,const Glib::RefPtr<Gst::TunerChannel>&,int >(this, &Tuner_signal_signal_changed_info);
}


void Gst::Tuner::on_channel_changed(const Glib::RefPtr<Gst::TunerChannel>& channel)
{
  BaseClassType *const base = static_cast<BaseClassType*>(
      g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
)  );

  if(base && base->channel_changed)
    (*base->channel_changed)(gobj(),Glib::unwrap(channel));
}
void Gst::Tuner::on_frequency_changed(const Glib::RefPtr<Gst::TunerChannel>& channel, gulong frequency)
{
  BaseClassType *const base = static_cast<BaseClassType*>(
      g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
)  );

  if(base && base->frequency_changed)
    (*base->frequency_changed)(gobj(),Glib::unwrap(channel),frequency);
}
void Gst::Tuner::on_norm_changed(const Glib::RefPtr<Gst::TunerNorm>& norm)
{
  BaseClassType *const base = static_cast<BaseClassType*>(
      g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
)  );

  if(base && base->norm_changed)
    (*base->norm_changed)(gobj(),Glib::unwrap(norm));
}
void Gst::Tuner::on_signal_changed(const Glib::RefPtr<Gst::TunerChannel>& channel, int signal)
{
  BaseClassType *const base = static_cast<BaseClassType*>(
      g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
)  );

  if(base && base->signal_changed)
    (*base->signal_changed)(gobj(),Glib::unwrap(channel),signal);
}

void Gst::Tuner::set_channel_vfunc(const Glib::RefPtr<Gst::TunerChannel>& channel) 
{
  BaseClassType *const base = static_cast<BaseClassType*>(
      g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
)  );

  if(base && base->set_channel)
  {
    (*base->set_channel)(gobj(),Glib::unwrap(channel));
  }
}
Glib::RefPtr<Gst::TunerChannel> Gst::Tuner::get_channel_vfunc() const
{
  BaseClassType *const base = static_cast<BaseClassType*>(
      g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
)  );

  if(base && base->get_channel)
  {
    Glib::RefPtr<Gst::TunerChannel> result(Glib::wrap((*base->get_channel)(const_cast<GstTuner*>(gobj()))));
    return result;
  }

  typedef Glib::RefPtr<Gst::TunerChannel> RType;
  return RType();
}
void Gst::Tuner::set_norm_vfunc(const Glib::RefPtr<Gst::TunerNorm>& norm) 
{
  BaseClassType *const base = static_cast<BaseClassType*>(
      g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
)  );

  if(base && base->set_norm)
  {
    (*base->set_norm)(gobj(),Glib::unwrap(norm));
  }
}
Glib::RefPtr<Gst::TunerNorm> Gst::Tuner::get_norm_vfunc() const
{
  BaseClassType *const base = static_cast<BaseClassType*>(
      g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
)  );

  if(base && base->get_norm)
  {
    Glib::RefPtr<Gst::TunerNorm> result(Glib::wrap((*base->get_norm)(const_cast<GstTuner*>(gobj()))));
    return result;
  }

  typedef Glib::RefPtr<Gst::TunerNorm> RType;
  return RType();
}
void Gst::Tuner::set_frequency_vfunc(const Glib::RefPtr<Gst::TunerChannel>& channel, gulong frequency) 
{
  BaseClassType *const base = static_cast<BaseClassType*>(
      g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
)  );

  if(base && base->set_frequency)
  {
    (*base->set_frequency)(gobj(),Glib::unwrap(channel),frequency);
  }
}
gulong Gst::Tuner::get_frequency_vfunc(const Glib::RefPtr<Gst::TunerChannel>& channel) const
{
  BaseClassType *const base = static_cast<BaseClassType*>(
      g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
)  );

  if(base && base->get_frequency)
  {
    gulong result((*base->get_frequency)(const_cast<GstTuner*>(gobj()),Glib::unwrap(channel)));
    return result;
  }

  typedef gulong RType;
  return RType();
}
int Gst::Tuner::signal_strength_vfunc(const Glib::RefPtr<Gst::TunerChannel>& channel) const
{
  BaseClassType *const base = static_cast<BaseClassType*>(
      g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
)  );

  if(base && base->signal_strength)
  {
    int result((*base->signal_strength)(const_cast<GstTuner*>(gobj()),Glib::unwrap(channel)));
    return result;
  }

  typedef int RType;
  return RType();
}


} // namespace Gst


