1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
/// Predicates.
///
/// The predicates to match contacts against.
///
///
/// Can only use these predicates with CNContactStore and CNContactFetchRequest.
#[cfg(feature = "CNContact")]
impl CNContact {
extern_methods!(
/// To fetch contacts matching a name.
///
///
/// The name can contain any number of words.
#[unsafe(method(predicateForContactsMatchingName:))]
#[unsafe(method_family = none)]
pub unsafe fn predicateForContactsMatchingName(name: &NSString) -> Retained<NSPredicate>;
/// Fetch contacts matching an email address.
///
///
/// Use this predicate to find the contact(s) which contain the specified
/// email address. The search is not case-sensitive.
///
///
/// Parameter `emailAddress`: The email address to search for. Do not include a scheme (e.g., "mailto:").
#[unsafe(method(predicateForContactsMatchingEmailAddress:))]
#[unsafe(method_family = none)]
pub unsafe fn predicateForContactsMatchingEmailAddress(
email_address: &NSString,
) -> Retained<NSPredicate>;
#[cfg(feature = "CNPhoneNumber")]
/// Fetch contacts matching a phone number.
///
///
/// If the predicate and contact differ in their use or presence of country
/// codes, a best effort will be made to match results; however, inexact
/// matches are not guaranteed.
///
///
/// Parameter `phoneNumber`: A
/// `CNPhoneNumber`representing the phone number to search for.
/// Do not include a scheme (e.g., "tel:").
#[unsafe(method(predicateForContactsMatchingPhoneNumber:))]
#[unsafe(method_family = none)]
pub unsafe fn predicateForContactsMatchingPhoneNumber(
phone_number: &CNPhoneNumber,
) -> Retained<NSPredicate>;
/// To fetch contacts matching contact identifiers.
#[unsafe(method(predicateForContactsWithIdentifiers:))]
#[unsafe(method_family = none)]
pub unsafe fn predicateForContactsWithIdentifiers(
identifiers: &NSArray<NSString>,
) -> Retained<NSPredicate>;
#[unsafe(method(predicateForContactsInGroupWithIdentifier:))]
#[unsafe(method_family = none)]
pub unsafe fn predicateForContactsInGroupWithIdentifier(
group_identifier: &NSString,
) -> Retained<NSPredicate>;
#[unsafe(method(predicateForContactsInContainerWithIdentifier:))]
#[unsafe(method_family = none)]
pub unsafe fn predicateForContactsInContainerWithIdentifier(
container_identifier: &NSString,
) -> Retained<NSPredicate>;
);
}