validate: reporter: Add a report_action() method

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1227>
This commit is contained in:
Thibault Saunier 2023-03-13 16:52:29 -03:00
parent b34718697c
commit 9647ce8895
2 changed files with 19 additions and 0 deletions

View file

@ -50,6 +50,9 @@ pub use enums::*;
mod action;
pub use action::{Action, ActionRef};
mod reporter;
pub use reporter::*;
// Re-export all the traits in a prelude module, so that applications
// can always "use gst_validate::prelude::*" without getting conflicts
pub mod prelude {

View file

@ -0,0 +1,16 @@
use glib::translate::*;
use crate::action::Action;
impl crate::Reporter {
pub fn report_action(&self, action: &Action, issue_id: crate::IssueId, message: &str) {
unsafe {
ffi::gst_validate_report_action(
self.to_glib_none().0,
action.to_glib_none().0,
issue_id.into_glib(),
message.to_glib_none().0,
);
}
}
}