objc2_contacts/generated/
CNGroup.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10    /// An immutable value object representing a group.
11    ///
12    ///
13    /// CNGroup is thread safe.
14    ///
15    /// See also [Apple's documentation](https://developer.apple.com/documentation/contacts/cngroup?language=objc)
16    #[unsafe(super(NSObject))]
17    #[derive(Debug, PartialEq, Eq, Hash)]
18    pub struct CNGroup;
19);
20
21extern_conformance!(
22    unsafe impl NSCoding for CNGroup {}
23);
24
25extern_conformance!(
26    unsafe impl NSCopying for CNGroup {}
27);
28
29unsafe impl CopyingHelper for CNGroup {
30    type Result = Self;
31}
32
33extern_conformance!(
34    unsafe impl NSMutableCopying for CNGroup {}
35);
36
37#[cfg(feature = "CNMutableGroup")]
38unsafe impl MutableCopyingHelper for CNGroup {
39    type Result = CNMutableGroup;
40}
41
42extern_conformance!(
43    unsafe impl NSObjectProtocol for CNGroup {}
44);
45
46extern_conformance!(
47    unsafe impl NSSecureCoding for CNGroup {}
48);
49
50impl CNGroup {
51    extern_methods!(
52        /// The identifier is unique among groups on the device. It can be saved and used for fetching groups next application launch.
53        #[unsafe(method(identifier))]
54        #[unsafe(method_family = none)]
55        pub unsafe fn identifier(&self) -> Retained<NSString>;
56
57        #[unsafe(method(name))]
58        #[unsafe(method_family = none)]
59        pub unsafe fn name(&self) -> Retained<NSString>;
60    );
61}
62
63/// Methods declared on superclass `NSObject`.
64impl CNGroup {
65    extern_methods!(
66        #[unsafe(method(init))]
67        #[unsafe(method_family = init)]
68        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
69
70        #[unsafe(method(new))]
71        #[unsafe(method_family = new)]
72        pub unsafe fn new() -> Retained<Self>;
73    );
74}
75
76extern "C" {
77    /// [Apple's documentation](https://developer.apple.com/documentation/contacts/cngroupidentifierkey?language=objc)
78    pub static CNGroupIdentifierKey: &'static NSString;
79}
80
81extern "C" {
82    /// [Apple's documentation](https://developer.apple.com/documentation/contacts/cngroupnamekey?language=objc)
83    pub static CNGroupNameKey: &'static NSString;
84}