use crate::common::*;
use crate::Contacts::*;
use crate::Foundation::*;
__inner_extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "Contacts_CNLabeledValue")]
pub struct CNLabeledValue<ValueType: ?Sized = AnyObject> {
__superclass: NSObject,
_inner0: PhantomData<*mut ValueType>,
notunwindsafe: PhantomData<&'static mut ()>,
}
#[cfg(feature = "Contacts_CNLabeledValue")]
unsafe impl<ValueType: ?Sized + Message> ClassType for CNLabeledValue<ValueType> {
type Super = NSObject;
type Mutability = InteriorMutable;
fn as_super(&self) -> &Self::Super {
&self.__superclass
}
fn as_super_mut(&mut self) -> &mut Self::Super {
&mut self.__superclass
}
}
);
#[cfg(feature = "Contacts_CNLabeledValue")]
unsafe impl<ValueType: ?Sized + NSCoding> NSCoding for CNLabeledValue<ValueType> {}
#[cfg(feature = "Contacts_CNLabeledValue")]
unsafe impl<ValueType: ?Sized + IsIdCloneable> NSCopying for CNLabeledValue<ValueType> {}
#[cfg(feature = "Contacts_CNLabeledValue")]
unsafe impl<ValueType: ?Sized> NSObjectProtocol for CNLabeledValue<ValueType> {}
#[cfg(feature = "Contacts_CNLabeledValue")]
unsafe impl<ValueType: ?Sized + NSSecureCoding> NSSecureCoding for CNLabeledValue<ValueType> {}
extern_methods!(
#[cfg(feature = "Contacts_CNLabeledValue")]
unsafe impl<ValueType: Message> CNLabeledValue<ValueType> {
#[cfg(feature = "Foundation_NSString")]
#[method_id(@__retain_semantics Other identifier)]
pub unsafe fn identifier(&self) -> Id<NSString>;
#[cfg(feature = "Foundation_NSString")]
#[method_id(@__retain_semantics Other label)]
pub unsafe fn label(&self) -> Option<Id<NSString>>;
#[method_id(@__retain_semantics Other value)]
pub unsafe fn value(&self) -> Id<ValueType>;
#[cfg(feature = "Foundation_NSString")]
#[method_id(@__retain_semantics Other labeledValueWithLabel:value:)]
pub unsafe fn labeledValueWithLabel_value(
label: Option<&NSString>,
value: &ValueType,
) -> Id<Self>;
#[cfg(feature = "Foundation_NSString")]
#[method_id(@__retain_semantics Init initWithLabel:value:)]
pub unsafe fn initWithLabel_value(
this: Allocated<Self>,
label: Option<&NSString>,
value: &ValueType,
) -> Id<Self>;
#[cfg(feature = "Foundation_NSString")]
#[method_id(@__retain_semantics Other labeledValueBySettingLabel:)]
pub unsafe fn labeledValueBySettingLabel(&self, label: Option<&NSString>) -> Id<Self>;
#[method_id(@__retain_semantics Other labeledValueBySettingValue:)]
pub unsafe fn labeledValueBySettingValue(&self, value: &ValueType) -> Id<Self>;
#[cfg(feature = "Foundation_NSString")]
#[method_id(@__retain_semantics Other labeledValueBySettingLabel:value:)]
pub unsafe fn labeledValueBySettingLabel_value(
&self,
label: Option<&NSString>,
value: &ValueType,
) -> Id<Self>;
#[cfg(feature = "Foundation_NSString")]
#[method_id(@__retain_semantics Other localizedStringForLabel:)]
pub unsafe fn localizedStringForLabel(label: &NSString) -> Id<NSString>;
}
);
extern_methods!(
#[cfg(feature = "Contacts_CNLabeledValue")]
unsafe impl<ValueType: Message> CNLabeledValue<ValueType> {
#[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_static!(CNLabelHome: &'static NSString);
extern_static!(CNLabelWork: &'static NSString);
extern_static!(CNLabelSchool: &'static NSString);
extern_static!(CNLabelOther: &'static NSString);
extern_static!(CNLabelEmailiCloud: &'static NSString);
extern_static!(CNLabelURLAddressHomePage: &'static NSString);
extern_static!(CNLabelDateAnniversary: &'static NSString);