use std::ffi::OsStr;
use endpoint_sec_sys::{es_event_xpc_connect_t, es_xpc_domain_type_t};
#[doc(alias = "es_event_xpc_connect_t")]
pub struct EventXpcConnect<'a> {
pub(crate) raw: &'a es_event_xpc_connect_t,
}
impl<'a> EventXpcConnect<'a> {
#[inline(always)]
pub fn service_name(&self) -> &'a OsStr {
unsafe { self.raw.service_name.as_os_str() }
}
#[inline(always)]
pub fn service_domain_type(&self) -> es_xpc_domain_type_t {
self.raw.service_domain_type
}
}
unsafe impl Send for EventXpcConnect<'_> {}
unsafe impl Sync for EventXpcConnect<'_> {}
impl_debug_eq_hash_with_functions!(EventXpcConnect<'a>; service_name, service_domain_type);