objc2_contacts/generated/
CNSocialProfile.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 social profile.
11    ///
12    ///
13    /// CNSocialProfile is thread safe.
14    ///
15    /// See also [Apple's documentation](https://developer.apple.com/documentation/contacts/cnsocialprofile?language=objc)
16    #[unsafe(super(NSObject))]
17    #[derive(Debug, PartialEq, Eq, Hash)]
18    pub struct CNSocialProfile;
19);
20
21extern_conformance!(
22    unsafe impl NSCoding for CNSocialProfile {}
23);
24
25extern_conformance!(
26    unsafe impl NSCopying for CNSocialProfile {}
27);
28
29unsafe impl CopyingHelper for CNSocialProfile {
30    type Result = Self;
31}
32
33extern_conformance!(
34    unsafe impl NSObjectProtocol for CNSocialProfile {}
35);
36
37extern_conformance!(
38    unsafe impl NSSecureCoding for CNSocialProfile {}
39);
40
41impl CNSocialProfile {
42    extern_methods!(
43        #[unsafe(method(urlString))]
44        #[unsafe(method_family = none)]
45        pub unsafe fn urlString(&self) -> Retained<NSString>;
46
47        #[unsafe(method(username))]
48        #[unsafe(method_family = none)]
49        pub unsafe fn username(&self) -> Retained<NSString>;
50
51        #[unsafe(method(userIdentifier))]
52        #[unsafe(method_family = none)]
53        pub unsafe fn userIdentifier(&self) -> Retained<NSString>;
54
55        #[unsafe(method(service))]
56        #[unsafe(method_family = none)]
57        pub unsafe fn service(&self) -> Retained<NSString>;
58
59        #[unsafe(method(initWithUrlString:username:userIdentifier:service:))]
60        #[unsafe(method_family = init)]
61        pub unsafe fn initWithUrlString_username_userIdentifier_service(
62            this: Allocated<Self>,
63            url_string: Option<&NSString>,
64            username: Option<&NSString>,
65            user_identifier: Option<&NSString>,
66            service: Option<&NSString>,
67        ) -> Retained<Self>;
68
69        /// Returns a user displayable property name.
70        #[unsafe(method(localizedStringForKey:))]
71        #[unsafe(method_family = none)]
72        pub unsafe fn localizedStringForKey(key: &NSString) -> Retained<NSString>;
73
74        /// Returns a user displayable service name.
75        #[unsafe(method(localizedStringForService:))]
76        #[unsafe(method_family = none)]
77        pub unsafe fn localizedStringForService(service: &NSString) -> Retained<NSString>;
78    );
79}
80
81/// Methods declared on superclass `NSObject`.
82impl CNSocialProfile {
83    extern_methods!(
84        #[unsafe(method(init))]
85        #[unsafe(method_family = init)]
86        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
87
88        #[unsafe(method(new))]
89        #[unsafe(method_family = new)]
90        pub unsafe fn new() -> Retained<Self>;
91    );
92}
93
94extern "C" {
95    /// [Apple's documentation](https://developer.apple.com/documentation/contacts/cnsocialprofileurlstringkey?language=objc)
96    pub static CNSocialProfileURLStringKey: &'static NSString;
97}
98
99extern "C" {
100    /// [Apple's documentation](https://developer.apple.com/documentation/contacts/cnsocialprofileusernamekey?language=objc)
101    pub static CNSocialProfileUsernameKey: &'static NSString;
102}
103
104extern "C" {
105    /// [Apple's documentation](https://developer.apple.com/documentation/contacts/cnsocialprofileuseridentifierkey?language=objc)
106    pub static CNSocialProfileUserIdentifierKey: &'static NSString;
107}
108
109extern "C" {
110    /// [Apple's documentation](https://developer.apple.com/documentation/contacts/cnsocialprofileservicekey?language=objc)
111    pub static CNSocialProfileServiceKey: &'static NSString;
112}
113
114extern "C" {
115    /// [Apple's documentation](https://developer.apple.com/documentation/contacts/cnsocialprofileservicefacebook?language=objc)
116    pub static CNSocialProfileServiceFacebook: &'static NSString;
117}
118
119extern "C" {
120    /// [Apple's documentation](https://developer.apple.com/documentation/contacts/cnsocialprofileserviceflickr?language=objc)
121    pub static CNSocialProfileServiceFlickr: &'static NSString;
122}
123
124extern "C" {
125    /// [Apple's documentation](https://developer.apple.com/documentation/contacts/cnsocialprofileservicelinkedin?language=objc)
126    pub static CNSocialProfileServiceLinkedIn: &'static NSString;
127}
128
129extern "C" {
130    /// [Apple's documentation](https://developer.apple.com/documentation/contacts/cnsocialprofileservicemyspace?language=objc)
131    pub static CNSocialProfileServiceMySpace: &'static NSString;
132}
133
134extern "C" {
135    /// [Apple's documentation](https://developer.apple.com/documentation/contacts/cnsocialprofileservicesinaweibo?language=objc)
136    pub static CNSocialProfileServiceSinaWeibo: &'static NSString;
137}
138
139extern "C" {
140    /// [Apple's documentation](https://developer.apple.com/documentation/contacts/cnsocialprofileservicetencentweibo?language=objc)
141    pub static CNSocialProfileServiceTencentWeibo: &'static NSString;
142}
143
144extern "C" {
145    /// [Apple's documentation](https://developer.apple.com/documentation/contacts/cnsocialprofileservicetwitter?language=objc)
146    pub static CNSocialProfileServiceTwitter: &'static NSString;
147}
148
149extern "C" {
150    /// [Apple's documentation](https://developer.apple.com/documentation/contacts/cnsocialprofileserviceyelp?language=objc)
151    pub static CNSocialProfileServiceYelp: &'static NSString;
152}
153
154extern "C" {
155    /// [Apple's documentation](https://developer.apple.com/documentation/contacts/cnsocialprofileservicegamecenter?language=objc)
156    pub static CNSocialProfileServiceGameCenter: &'static NSString;
157}