// This file was generated by gir (https://github.com/gtk-rs/gir)
// from gir-files (https://github.com/gtk-rs/gir-files)
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
// DO NOT EDIT

use crate::{Element, Object, TagList, TagMergeMode};
use glib::{prelude::*, translate::*};

glib::wrapper! {
    #[doc(alias = "GstTagSetter")]
    pub struct TagSetter(Interface<ffi::GstTagSetter, ffi::GstTagSetterInterface>) @requires Element, Object;

    match fn {
        type_ => || ffi::gst_tag_setter_get_type(),
    }
}

impl TagSetter {
    pub const NONE: Option<&'static TagSetter> = None;
}

unsafe impl Send for TagSetter {}
unsafe impl Sync for TagSetter {}

mod sealed {
    pub trait Sealed {}
    impl<T: super::IsA<super::TagSetter>> Sealed for T {}
}

pub trait TagSetterExt: IsA<TagSetter> + sealed::Sealed + 'static {
    //#[doc(alias = "gst_tag_setter_add_tag_valist")]
    //fn add_tag_valist(&self, mode: TagMergeMode, tag: &str, var_args: /*Unknown conversion*//*Unimplemented*/Unsupported) {
    //    unsafe { TODO: call ffi:gst_tag_setter_add_tag_valist() }
    //}

    //#[doc(alias = "gst_tag_setter_add_tag_valist_values")]
    //fn add_tag_valist_values(&self, mode: TagMergeMode, tag: &str, var_args: /*Unknown conversion*//*Unimplemented*/Unsupported) {
    //    unsafe { TODO: call ffi:gst_tag_setter_add_tag_valist_values() }
    //}

    //#[doc(alias = "gst_tag_setter_add_tag_values")]
    //fn add_tag_values(&self, mode: TagMergeMode, tag: &str, : /*Unknown conversion*//*Unimplemented*/Basic: VarArgs) {
    //    unsafe { TODO: call ffi:gst_tag_setter_add_tag_values() }
    //}

    #[doc(alias = "gst_tag_setter_get_tag_list")]
    #[doc(alias = "get_tag_list")]
    fn tag_list(&self) -> Option<TagList> {
        unsafe {
            from_glib_none(ffi::gst_tag_setter_get_tag_list(
                self.as_ref().to_glib_none().0,
            ))
        }
    }

    #[doc(alias = "gst_tag_setter_get_tag_merge_mode")]
    #[doc(alias = "get_tag_merge_mode")]
    fn tag_merge_mode(&self) -> TagMergeMode {
        unsafe {
            from_glib(ffi::gst_tag_setter_get_tag_merge_mode(
                self.as_ref().to_glib_none().0,
            ))
        }
    }

    #[doc(alias = "gst_tag_setter_merge_tags")]
    fn merge_tags(&self, list: &TagList, mode: TagMergeMode) {
        unsafe {
            ffi::gst_tag_setter_merge_tags(
                self.as_ref().to_glib_none().0,
                list.to_glib_none().0,
                mode.into_glib(),
            );
        }
    }

    #[doc(alias = "gst_tag_setter_reset_tags")]
    fn reset_tags(&self) {
        unsafe {
            ffi::gst_tag_setter_reset_tags(self.as_ref().to_glib_none().0);
        }
    }

    #[doc(alias = "gst_tag_setter_set_tag_merge_mode")]
    fn set_tag_merge_mode(&self, mode: TagMergeMode) {
        unsafe {
            ffi::gst_tag_setter_set_tag_merge_mode(
                self.as_ref().to_glib_none().0,
                mode.into_glib(),
            );
        }
    }
}

impl<O: IsA<TagSetter>> TagSetterExt for O {}
