objc2_core_data/generated/
NSCoreDataCoreSpotlightDelegate.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-core-spotlight")]
7#[cfg(not(any(target_os = "tvos", target_os = "watchos")))]
8use objc2_core_spotlight::*;
9use objc2_foundation::*;
10
11use crate::*;
12
13extern "C" {
14 pub static NSCoreDataCoreSpotlightDelegateIndexDidUpdateNotification:
16 &'static NSNotificationName;
17}
18
19extern_class!(
20 #[unsafe(super(NSObject))]
22 #[derive(Debug, PartialEq, Eq, Hash)]
23 pub struct NSCoreDataCoreSpotlightDelegate;
24);
25
26extern_conformance!(
27 unsafe impl NSObjectProtocol for NSCoreDataCoreSpotlightDelegate {}
28);
29
30impl NSCoreDataCoreSpotlightDelegate {
31 extern_methods!(
32 #[unsafe(method(isIndexingEnabled))]
33 #[unsafe(method_family = none)]
34 pub unsafe fn isIndexingEnabled(&self) -> bool;
35
36 #[unsafe(method(domainIdentifier))]
37 #[unsafe(method_family = none)]
38 pub unsafe fn domainIdentifier(&self) -> Retained<NSString>;
39
40 #[unsafe(method(indexName))]
41 #[unsafe(method_family = none)]
42 pub unsafe fn indexName(&self) -> Option<Retained<NSString>>;
43
44 #[unsafe(method(init))]
45 #[unsafe(method_family = init)]
46 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
47
48 #[cfg(all(
49 feature = "NSPersistentStoreCoordinator",
50 feature = "NSPersistentStoreDescription"
51 ))]
52 #[unsafe(method(initForStoreWithDescription:coordinator:))]
53 #[unsafe(method_family = init)]
54 pub unsafe fn initForStoreWithDescription_coordinator(
55 this: Allocated<Self>,
56 description: &NSPersistentStoreDescription,
57 psc: &NSPersistentStoreCoordinator,
58 ) -> Retained<Self>;
59
60 #[cfg(all(
61 feature = "NSManagedObjectModel",
62 feature = "NSPersistentStoreDescription"
63 ))]
64 #[deprecated]
65 #[unsafe(method(initForStoreWithDescription:model:))]
66 #[unsafe(method_family = init)]
67 pub unsafe fn initForStoreWithDescription_model(
68 this: Allocated<Self>,
69 description: &NSPersistentStoreDescription,
70 model: &NSManagedObjectModel,
71 ) -> Retained<Self>;
72
73 #[unsafe(method(startSpotlightIndexing))]
74 #[unsafe(method_family = none)]
75 pub unsafe fn startSpotlightIndexing(&self);
76
77 #[unsafe(method(stopSpotlightIndexing))]
78 #[unsafe(method_family = none)]
79 pub unsafe fn stopSpotlightIndexing(&self);
80
81 #[cfg(feature = "block2")]
82 #[unsafe(method(deleteSpotlightIndexWithCompletionHandler:))]
83 #[unsafe(method_family = none)]
84 pub unsafe fn deleteSpotlightIndexWithCompletionHandler(
85 &self,
86 completion_handler: &block2::DynBlock<dyn Fn(*mut NSError)>,
87 );
88
89 #[cfg(all(feature = "NSManagedObject", feature = "objc2-core-spotlight"))]
90 #[cfg(not(any(target_os = "tvos", target_os = "watchos")))]
91 #[unsafe(method(attributeSetForObject:))]
92 #[unsafe(method_family = none)]
93 pub unsafe fn attributeSetForObject(
94 &self,
95 object: &NSManagedObject,
96 ) -> Option<Retained<CSSearchableItemAttributeSet>>;
97
98 #[cfg(all(feature = "block2", feature = "objc2-core-spotlight"))]
99 #[cfg(not(any(target_os = "tvos", target_os = "watchos")))]
100 #[unsafe(method(searchableIndex:reindexAllSearchableItemsWithAcknowledgementHandler:))]
101 #[unsafe(method_family = none)]
102 pub unsafe fn searchableIndex_reindexAllSearchableItemsWithAcknowledgementHandler(
103 &self,
104 searchable_index: &CSSearchableIndex,
105 acknowledgement_handler: &block2::DynBlock<dyn Fn()>,
106 );
107
108 #[cfg(all(feature = "block2", feature = "objc2-core-spotlight"))]
109 #[cfg(not(any(target_os = "tvos", target_os = "watchos")))]
110 #[unsafe(method(searchableIndex:reindexSearchableItemsWithIdentifiers:acknowledgementHandler:))]
111 #[unsafe(method_family = none)]
112 pub unsafe fn searchableIndex_reindexSearchableItemsWithIdentifiers_acknowledgementHandler(
113 &self,
114 searchable_index: &CSSearchableIndex,
115 identifiers: &NSArray<NSString>,
116 acknowledgement_handler: &block2::DynBlock<dyn Fn()>,
117 );
118 );
119}
120
121impl NSCoreDataCoreSpotlightDelegate {
123 extern_methods!(
124 #[unsafe(method(new))]
125 #[unsafe(method_family = new)]
126 pub unsafe fn new() -> Retained<Self>;
127 );
128}