rust_macios/
contacts.rs

1//! Access the user's contacts and format and localize contact information.
2
3/* Essentials
4 */
5
6mod cn_contact_store;
7
8pub use cn_contact_store::*;
9
10/* Contact Data
11 */
12mod cn_contact;
13pub use cn_contact::*;
14
15mod cn_mutable_contact;
16pub use cn_mutable_contact::*;
17
18/* Contact Keys
19***************/
20extern "C" {
21    /* Contact Identification
22     */
23
24    /// The contact’s unique identifier.
25    pub static CNContactIdentifierKey: NSString;
26    /// The type of contact.
27    pub static CNContactTypeKey: NSString;
28    /// The contact's name component property key.
29    pub static CNContactPropertyAttribute: NSString;
30
31    /* Name
32     */
33
34    /// The prefix for the contact's name.
35    pub static CNContactNamePrefixKey: NSString;
36    /// The contact's given name.
37    pub static CNContactGivenNameKey: NSString;
38    /// The contact's middle name.
39    pub static CNContactMiddleNameKey: NSString;
40    /// The contact's family name.
41    pub static CNContactFamilyNameKey: NSString;
42    /// The contact's previous family name.
43    pub static CNContactPreviousFamilyNameKey: NSString;
44    /// The contact's name suffix.
45    pub static CNContactNameSuffixKey: NSString;
46    /// The contact's nickname.
47    pub static CNContactNicknameKey: NSString;
48    /// The phonetic spelling of the contact's given name.
49    pub static CNContactPhoneticGivenNameKey: NSString;
50    /// The phonetic spelling of the contact's middle name.
51    pub static CNContactPhoneticMiddleNameKey: NSString;
52    /// The phonetic spelling of the contact's family name.
53    pub static CNContactPhoneticFamilyNameKey: NSString;
54
55    /* Work
56     */
57
58    /// The contact's job title.
59    pub static CNContactJobTitleKey: NSString;
60    /// The contact's department name.
61    pub static CNContactDepartmentNameKey: NSString;
62    /// The contact's organization name.
63    pub static CNContactOrganizationNameKey: NSString;
64    /// The phonetic spelling of the contact's organization name.
65    pub static CNContactPhoneticOrganizationNameKey: NSString;
66
67    /* Addresses
68     */
69
70    /// The postal addresses of the contact.
71    pub static CNContactPostalAddressesKey: NSString;
72    /// The email addresses of the contact.
73    pub static CNContactEmailAddressesKey: NSString;
74    /// The URL addresses of the contact.
75    pub static CNContactUrlAddressesKey: NSString;
76    /// The instant message addresses of the contact.
77    pub static CNContactInstantMessageAddressesKey: NSString;
78
79    /* Phone
80     */
81
82    /// A phone numbers of a contact.
83    pub static CNContactPhoneNumbersKey: NSString;
84
85    /* Social Profiles
86     */
87
88    /// A social profiles of a contact.
89    pub static CNContactSocialProfilesKey: NSString;
90
91    /* Birthday
92     */
93
94    /// The birthday of a contact.
95    pub static CNContactBirthdayKey: NSString;
96    /// The non-Gregorian birthday of the contact.
97    pub static CNContactNonGregorianBirthdayKey: NSString;
98    /// Dates associated with a contact.
99    pub static CNContactDatesKey: NSString;
100
101    /* Notes
102     */
103
104    /// A note associated with a contact.
105    pub static CNContactNoteKey: NSString;
106
107    /* Images
108     */
109
110    /// Image data for a contact.
111    pub static CNContactImageDataKey: NSString;
112    /// Thumbnail data for a contact.
113    pub static CNContactThumbnailImageDataKey: NSString;
114    /// Image data availability for a contact.
115    pub static CNContactImageDataAvailableKey: NSString;
116
117    /* Relationships
118     */
119
120    /// The relationships of the contact.
121    pub static CNContactRelationsKey: NSString;
122
123    /* Groups and Containers
124     */
125
126    /// The name of the group.
127    pub static CNGroupNameKey: NSString;
128    /// The identifier of the group.
129    pub static CNGroupIdentifierKey: NSString;
130    /// The name of the container.
131    pub static CNContainerNameKey: NSString;
132    /// The type of the container.
133    pub static CNContainerTypeKey: NSString;
134
135    /* Instant Messaging Keys
136     */
137
138    /// Instant message address service key.
139    pub static CNInstantMessageAddressServiceKey: NSString;
140    /// Instant message address username key.
141    pub static CNInstantMessageAddressUsernameKey: NSString;
142
143    /* Social Profile Keys
144     */
145
146    /// The social profile service.
147    pub static CNSocialProfileServiceKey: NSString;
148    /// The social profile URL.
149    pub static CNSocialProfileURLStringKey: NSString;
150    /// The social profile user name.
151    pub static CNSocialProfileUsernameKey: NSString;
152    /// The social profile user identifier.
153    pub static CNSocialProfileUserIdentifierKey: NSString;
154}
155
156/* Date Objects
157***************/
158
159/* Addresses
160 */
161mod cn_postal_address;
162pub use cn_postal_address::*;
163
164mod cn_mutable_postal_address;
165pub use cn_mutable_postal_address::*;
166
167mod cn_instant_message_address;
168pub use cn_instant_message_address::*;
169
170/* Phone Numbers
171 */
172
173mod cn_phone_number;
174pub use cn_phone_number::*;
175
176/* Groups and Containers
177 */
178
179mod cn_group;
180pub use cn_group::*;
181
182mod cn_mutable_group;
183pub use cn_mutable_group::*;
184
185mod cn_container;
186pub use cn_container::*;
187
188/* Social Profiles
189 */
190
191mod cn_social_profile;
192pub use cn_social_profile::*;
193
194/* Related Data
195 */
196
197mod cn_contact_relation;
198pub use cn_contact_relation::*;
199
200/* Generic Types
201 */
202
203mod cn_labeled_value;
204pub use cn_labeled_value::*;
205
206mod cn_contact_property;
207pub use cn_contact_property::*;
208
209/* Fetch and Save Requests
210 */
211
212mod cn_fetch_request;
213pub use cn_fetch_request::*;
214
215mod cn_fetch_result;
216pub use cn_fetch_result::*;
217
218mod cn_contact_fetch_request;
219pub use cn_contact_fetch_request::*;
220
221mod cn_save_request;
222pub use cn_save_request::*;
223
224/* Change History Data
225 */
226
227mod cn_change_history_add_contact_event;
228pub use cn_change_history_add_contact_event::*;
229
230mod cn_change_history_add_group_event;
231pub use cn_change_history_add_group_event::*;
232
233mod cn_change_history_event;
234pub use cn_change_history_event::*;
235
236mod cn_change_history_fetch_request;
237pub use cn_change_history_fetch_request::*;
238
239/* Formatters
240 */
241
242mod cn_contact_formatter;
243pub use cn_contact_formatter::*;
244
245use crate::foundation::NSString;