use libc::c_double;
use objc::{msg_send, sel, sel_impl};
use rust_macios_objective_c_runtime_proc_macros::interface_impl;
use crate::{
foundation::{NSArray, NSDictionary, NSNumber, NSString, UInt},
object,
objective_c_runtime::id,
};
use super::{
IUNNotificationContent, UNNotificationAttachment, UNNotificationInterruptionLevel,
UNNotificationSound,
};
object! {
unsafe pub struct UNMutableNotificationContent;
}
impl IUNNotificationContent for UNMutableNotificationContent {}
#[interface_impl(UNNotificationContent)]
impl UNMutableNotificationContent {
#[property]
pub fn set_title(&mut self, title: NSString) {
unsafe { msg_send![self.m_self(), setTitle: title] }
}
#[property]
pub fn set_subtitle(&mut self, subtitle: NSString) {
unsafe { msg_send![self.m_self(), setSubtitle: subtitle] }
}
#[property]
pub fn set_body(&mut self, body: NSString) {
unsafe { msg_send![self.m_self(), setBody: body] }
}
#[property]
pub fn set_attachments(&mut self, attachments: NSArray<UNNotificationAttachment>) {
unsafe { msg_send![self.m_self(), setAttachments: attachments] }
}
#[property]
pub fn set_user_info(&mut self, user_info: NSDictionary<id, id>) {
unsafe { msg_send![self.m_self(), setUserInfo: user_info] }
}
#[property]
pub fn set_launch_image_name(&mut self, value: NSString) {
unsafe { msg_send![self.m_self(), setLaunchImageName: value] }
}
#[property]
pub fn set_badge(&mut self, badge: NSNumber) {
unsafe { msg_send![self.m_self(), setBadge: badge] }
}
#[property]
pub fn set_target_content_identifier(&mut self, value: NSString) {
unsafe { msg_send![self.m_self(), setTargetContentIdentifier: value] }
}
#[property]
pub fn set_sound(&mut self, value: UNNotificationSound) {
unsafe { msg_send![self.m_self(), setSound: value] }
}
#[property]
pub fn set_interruption_level(&mut self, value: UNNotificationInterruptionLevel) {
unsafe { msg_send![self.m_self(), setInterruptionLevel: value] }
}
#[property]
pub fn set_relevance_score(&mut self, value: c_double) {
unsafe { msg_send![self.m_self(), setRelevanceScore: value] }
}
#[property]
pub fn set_filter_criteria(&mut self, value: NSString) {
unsafe { msg_send![self.m_self(), setFilterCriteria: value] }
}
#[property]
pub fn set_thread_identifier(&mut self, value: NSString) {
unsafe { msg_send![self.m_self(), setThreadIdentifier: value] }
}
#[property]
pub fn set_category_identifier(&mut self, value: NSString) {
unsafe { msg_send![self.m_self(), setCategoryIdentifier: value] }
}
#[property]
pub fn set_summary_argument(&mut self, value: NSString) {
unsafe { msg_send![self.m_self(), setSummaryArgument: value] }
}
#[property]
pub fn set_summary_argument_count(&mut self, value: UInt) {
unsafe { msg_send![self.m_self(), setSummaryArgumentCount: value] }
}
}