use objc::{msg_send, sel, sel_impl};
use crate::{foundation::NSString, object, objective_c_runtime::macros::interface_impl};
use super::ICNPostalAddress;
object! {
unsafe pub struct CNMutablePostalAddress;
}
impl ICNPostalAddress for CNMutablePostalAddress {}
#[interface_impl(CNPostalAddress)]
impl CNMutablePostalAddress {
#[property]
pub fn set_street(&mut self, street: NSString) {
unsafe { msg_send![self.m_self(), setStreet: street] }
}
#[property]
pub fn set_city(&mut self, city: NSString) {
unsafe { msg_send![self.m_self(), setCity: city] }
}
#[property]
pub fn set_state(&mut self, state: NSString) {
unsafe { msg_send![self.m_self(), setState: state] }
}
#[property]
pub fn set_postal_code(&mut self, postal_code: NSString) {
unsafe { msg_send![self.m_self(), setPostalCode: postal_code] }
}
#[property]
pub fn set_country(&mut self, country: NSString) {
unsafe { msg_send![self.m_self(), setCountry: country] }
}
#[property]
pub fn set_iso_country_code(&mut self, iso_country_code: NSString) {
unsafe { msg_send![self.m_self(), setISOCountryCode: iso_country_code] }
}
#[property]
pub fn set_sub_administrative_area(&mut self, sub_administrative_area: NSString) {
unsafe {
msg_send![
self.m_self(),
setSubAdministrativeArea: sub_administrative_area
]
}
}
#[property]
pub fn set_sub_locality(&mut self, sub_locality: NSString) {
unsafe { msg_send![self.m_self(), setSubLocality: sub_locality] }
}
}