objc2_open_directory/generated/
ODMappings.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11    /// [Apple's documentation](https://developer.apple.com/documentation/opendirectory/odmappings?language=objc)
12    #[unsafe(super(NSObject))]
13    #[derive(Debug, PartialEq, Eq, Hash)]
14    pub struct ODMappings;
15);
16
17extern_conformance!(
18    unsafe impl NSObjectProtocol for ODMappings {}
19);
20
21impl ODMappings {
22    extern_methods!(
23        #[unsafe(method(comment))]
24        #[unsafe(method_family = none)]
25        pub unsafe fn comment(&self) -> Retained<NSString>;
26
27        /// Setter for [`comment`][Self::comment].
28        ///
29        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
30        #[unsafe(method(setComment:))]
31        #[unsafe(method_family = none)]
32        pub unsafe fn setComment(&self, comment: Option<&NSString>);
33
34        #[unsafe(method(templateName))]
35        #[unsafe(method_family = none)]
36        pub unsafe fn templateName(&self) -> Retained<NSString>;
37
38        /// Setter for [`templateName`][Self::templateName].
39        ///
40        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
41        #[unsafe(method(setTemplateName:))]
42        #[unsafe(method_family = none)]
43        pub unsafe fn setTemplateName(&self, template_name: Option<&NSString>);
44
45        #[unsafe(method(identifier))]
46        #[unsafe(method_family = none)]
47        pub unsafe fn identifier(&self) -> Retained<NSString>;
48
49        /// Setter for [`identifier`][Self::identifier].
50        ///
51        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
52        #[unsafe(method(setIdentifier:))]
53        #[unsafe(method_family = none)]
54        pub unsafe fn setIdentifier(&self, identifier: Option<&NSString>);
55
56        #[unsafe(method(recordTypes))]
57        #[unsafe(method_family = none)]
58        pub unsafe fn recordTypes(&self) -> Retained<NSArray>;
59
60        #[unsafe(method(function))]
61        #[unsafe(method_family = none)]
62        pub unsafe fn function(&self) -> Retained<NSString>;
63
64        /// Setter for [`function`][Self::function].
65        ///
66        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
67        #[unsafe(method(setFunction:))]
68        #[unsafe(method_family = none)]
69        pub unsafe fn setFunction(&self, function: Option<&NSString>);
70
71        #[unsafe(method(functionAttributes))]
72        #[unsafe(method_family = none)]
73        pub unsafe fn functionAttributes(&self) -> Retained<NSArray>;
74
75        /// Setter for [`functionAttributes`][Self::functionAttributes].
76        ///
77        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
78        ///
79        /// # Safety
80        ///
81        /// `function_attributes` generic should be of the correct type.
82        #[unsafe(method(setFunctionAttributes:))]
83        #[unsafe(method_family = none)]
84        pub unsafe fn setFunctionAttributes(&self, function_attributes: Option<&NSArray>);
85
86        /// Returns an initialized and autoreleased ODMappings object.
87        ///
88        ///
89        /// Returns an initialized and autoreleased ODMappings object.
90        #[unsafe(method(mappings))]
91        #[unsafe(method_family = none)]
92        pub unsafe fn mappings() -> Option<Retained<Self>>;
93
94        #[cfg(feature = "ODRecordMap")]
95        /// Returns an ODRecordMap associated with the provided recordtype.
96        ///
97        ///
98        /// Returns an ODRecordMap associated with the provided recordtype.
99        ///
100        /// # Safety
101        ///
102        /// `std_type` might not allow `None`.
103        #[unsafe(method(recordMapForStandardRecordType:))]
104        #[unsafe(method_family = none)]
105        pub unsafe fn recordMapForStandardRecordType(
106            &self,
107            std_type: Option<&NSString>,
108        ) -> Option<Retained<ODRecordMap>>;
109
110        #[cfg(feature = "ODRecordMap")]
111        /// Sets a particular ODRecordMap for a given standard record type.
112        ///
113        ///
114        /// Sets a particular ODRecordMap for a given standard record type.
115        ///
116        /// # Safety
117        ///
118        /// - `map` might not allow `None`.
119        /// - `std_type` might not allow `None`.
120        #[unsafe(method(setRecordMap:forStandardRecordType:))]
121        #[unsafe(method_family = none)]
122        pub unsafe fn setRecordMap_forStandardRecordType(
123            &self,
124            map: Option<&ODRecordMap>,
125            std_type: Option<&NSString>,
126        );
127    );
128}
129
130/// Methods declared on superclass `NSObject`.
131impl ODMappings {
132    extern_methods!(
133        #[unsafe(method(init))]
134        #[unsafe(method_family = init)]
135        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
136
137        #[unsafe(method(new))]
138        #[unsafe(method_family = new)]
139        pub unsafe fn new() -> Retained<Self>;
140    );
141}