use crate::util::*;
use crate::dispatch::DispatchQueue;
sys! {
"pushkit"
pub fn apple_apis_pushkit_pk_push_registry_drop(ptr: Ptr);
pub fn apple_apis_pushkit_pk_push_registry_new() -> Ptr;
pub fn apple_apis_pushkit_pk_push_registry_with_queue(queue: Ptr) -> Ptr;
}
wrapper! {
pub struct PKPushRegistry;
new: sys::apple_apis_pushkit_pk_push_registry_new;
drop: sys::apple_apis_pushkit_pk_push_registry_drop;
}
impl PKPushRegistry {
pub fn with_queue(queue: &DispatchQueue) -> Self {
let ptr = unsafe { sys::apple_apis_pushkit_pk_push_registry_with_queue(queue.as_ptr()) };
unsafe { Self::_new(ptr) }
}
}