use crate::common::*;
use crate::BackgroundTasks::*;
use crate::Foundation::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "BackgroundTasks_BGTaskRequest")]
pub struct BGTaskRequest;
#[cfg(feature = "BackgroundTasks_BGTaskRequest")]
unsafe impl ClassType for BGTaskRequest {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
#[cfg(feature = "BackgroundTasks_BGTaskRequest")]
unsafe impl NSCopying for BGTaskRequest {}
#[cfg(feature = "BackgroundTasks_BGTaskRequest")]
unsafe impl NSObjectProtocol for BGTaskRequest {}
extern_methods!(
#[cfg(feature = "BackgroundTasks_BGTaskRequest")]
unsafe impl BGTaskRequest {
#[cfg(feature = "Foundation_NSString")]
#[method_id(@__retain_semantics Other identifier)]
pub unsafe fn identifier(&self) -> Id<NSString>;
#[cfg(feature = "Foundation_NSDate")]
#[method_id(@__retain_semantics Other earliestBeginDate)]
pub unsafe fn earliestBeginDate(&self) -> Option<Id<NSDate>>;
#[cfg(feature = "Foundation_NSDate")]
#[method(setEarliestBeginDate:)]
pub unsafe fn setEarliestBeginDate(&self, earliest_begin_date: Option<&NSDate>);
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Id<Self>;
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "BackgroundTasks_BGAppRefreshTaskRequest")]
pub struct BGAppRefreshTaskRequest;
#[cfg(feature = "BackgroundTasks_BGAppRefreshTaskRequest")]
unsafe impl ClassType for BGAppRefreshTaskRequest {
#[inherits(NSObject)]
type Super = BGTaskRequest;
type Mutability = InteriorMutable;
}
);
#[cfg(feature = "BackgroundTasks_BGAppRefreshTaskRequest")]
unsafe impl NSCopying for BGAppRefreshTaskRequest {}
#[cfg(feature = "BackgroundTasks_BGAppRefreshTaskRequest")]
unsafe impl NSObjectProtocol for BGAppRefreshTaskRequest {}
extern_methods!(
#[cfg(feature = "BackgroundTasks_BGAppRefreshTaskRequest")]
unsafe impl BGAppRefreshTaskRequest {
#[cfg(feature = "Foundation_NSString")]
#[method_id(@__retain_semantics Init initWithIdentifier:)]
pub unsafe fn initWithIdentifier(this: Allocated<Self>, identifier: &NSString) -> Id<Self>;
}
);
extern_methods!(
#[cfg(feature = "BackgroundTasks_BGAppRefreshTaskRequest")]
unsafe impl BGAppRefreshTaskRequest {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Id<Self>;
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "BackgroundTasks_BGProcessingTaskRequest")]
pub struct BGProcessingTaskRequest;
#[cfg(feature = "BackgroundTasks_BGProcessingTaskRequest")]
unsafe impl ClassType for BGProcessingTaskRequest {
#[inherits(NSObject)]
type Super = BGTaskRequest;
type Mutability = InteriorMutable;
}
);
#[cfg(feature = "BackgroundTasks_BGProcessingTaskRequest")]
unsafe impl NSCopying for BGProcessingTaskRequest {}
#[cfg(feature = "BackgroundTasks_BGProcessingTaskRequest")]
unsafe impl NSObjectProtocol for BGProcessingTaskRequest {}
extern_methods!(
#[cfg(feature = "BackgroundTasks_BGProcessingTaskRequest")]
unsafe impl BGProcessingTaskRequest {
#[cfg(feature = "Foundation_NSString")]
#[method_id(@__retain_semantics Init initWithIdentifier:)]
pub unsafe fn initWithIdentifier(this: Allocated<Self>, identifier: &NSString) -> Id<Self>;
#[method(requiresNetworkConnectivity)]
pub unsafe fn requiresNetworkConnectivity(&self) -> bool;
#[method(setRequiresNetworkConnectivity:)]
pub unsafe fn setRequiresNetworkConnectivity(&self, requires_network_connectivity: bool);
#[method(requiresExternalPower)]
pub unsafe fn requiresExternalPower(&self) -> bool;
#[method(setRequiresExternalPower:)]
pub unsafe fn setRequiresExternalPower(&self, requires_external_power: bool);
}
);
extern_methods!(
#[cfg(feature = "BackgroundTasks_BGProcessingTaskRequest")]
unsafe impl BGProcessingTaskRequest {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Id<Self>;
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "BackgroundTasks_BGHealthResearchTaskRequest")]
pub struct BGHealthResearchTaskRequest;
#[cfg(feature = "BackgroundTasks_BGHealthResearchTaskRequest")]
unsafe impl ClassType for BGHealthResearchTaskRequest {
#[inherits(BGTaskRequest, NSObject)]
type Super = BGProcessingTaskRequest;
type Mutability = InteriorMutable;
}
);
#[cfg(feature = "BackgroundTasks_BGHealthResearchTaskRequest")]
unsafe impl NSCopying for BGHealthResearchTaskRequest {}
#[cfg(feature = "BackgroundTasks_BGHealthResearchTaskRequest")]
unsafe impl NSObjectProtocol for BGHealthResearchTaskRequest {}
extern_methods!(
#[cfg(feature = "BackgroundTasks_BGHealthResearchTaskRequest")]
unsafe impl BGHealthResearchTaskRequest {
#[method_id(@__retain_semantics Other protectionTypeOfRequiredData)]
pub unsafe fn protectionTypeOfRequiredData(&self) -> Id<NSFileProtectionType>;
#[method(setProtectionTypeOfRequiredData:)]
pub unsafe fn setProtectionTypeOfRequiredData(
&self,
protection_type_of_required_data: &NSFileProtectionType,
);
}
);
extern_methods!(
#[cfg(feature = "BackgroundTasks_BGHealthResearchTaskRequest")]
unsafe impl BGHealthResearchTaskRequest {
#[cfg(feature = "Foundation_NSString")]
#[method_id(@__retain_semantics Init initWithIdentifier:)]
pub unsafe fn initWithIdentifier(this: Allocated<Self>, identifier: &NSString) -> Id<Self>;
}
);
extern_methods!(
#[cfg(feature = "BackgroundTasks_BGHealthResearchTaskRequest")]
unsafe impl BGHealthResearchTaskRequest {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Id<Self>;
}
);