// This file was generated by gir (https://github.com/gtk-rs/gir)
// from gir-files
// DO NOT EDIT

use crate::{ffi,RepoFinder};
#[cfg(feature = "v2018_6")]
#[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
use glib::{prelude::*,translate::*};

glib::wrapper! {
    #[doc(alias = "OstreeRepoFinderMount")]
    pub struct RepoFinderMount(Object<ffi::OstreeRepoFinderMount, ffi::OstreeRepoFinderMountClass>) @implements RepoFinder;

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

impl RepoFinderMount {
    #[cfg(feature = "v2018_6")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
    #[doc(alias = "ostree_repo_finder_mount_new")]
    pub fn new(monitor: Option<&impl IsA<gio::VolumeMonitor>>) -> RepoFinderMount {
        unsafe {
            from_glib_full(ffi::ostree_repo_finder_mount_new(monitor.map(|p| p.as_ref()).to_glib_none().0))
        }
    }

    #[cfg(feature = "v2018_6")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
    pub fn monitor(&self) -> Option<gio::VolumeMonitor> {
        ObjectExt::property(self, "monitor")
    }
}
