objc2_core_data/generated/
NSCoreDataCoreSpotlightDelegate.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern "C" {
11 pub static NSCoreDataCoreSpotlightDelegateIndexDidUpdateNotification:
13 &'static NSNotificationName;
14}
15
16extern_class!(
17 #[unsafe(super(NSObject))]
19 #[derive(Debug, PartialEq, Eq, Hash)]
20 pub struct NSCoreDataCoreSpotlightDelegate;
21);
22
23extern_conformance!(
24 unsafe impl NSObjectProtocol for NSCoreDataCoreSpotlightDelegate {}
25);
26
27impl NSCoreDataCoreSpotlightDelegate {
28 extern_methods!(
29 #[unsafe(method(isIndexingEnabled))]
30 #[unsafe(method_family = none)]
31 pub unsafe fn isIndexingEnabled(&self) -> bool;
32
33 #[unsafe(method(domainIdentifier))]
34 #[unsafe(method_family = none)]
35 pub unsafe fn domainIdentifier(&self) -> Retained<NSString>;
36
37 #[unsafe(method(indexName))]
38 #[unsafe(method_family = none)]
39 pub unsafe fn indexName(&self) -> Option<Retained<NSString>>;
40
41 #[unsafe(method(init))]
42 #[unsafe(method_family = init)]
43 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
44
45 #[cfg(all(
46 feature = "NSPersistentStoreCoordinator",
47 feature = "NSPersistentStoreDescription"
48 ))]
49 #[unsafe(method(initForStoreWithDescription:coordinator:))]
50 #[unsafe(method_family = init)]
51 pub unsafe fn initForStoreWithDescription_coordinator(
52 this: Allocated<Self>,
53 description: &NSPersistentStoreDescription,
54 psc: &NSPersistentStoreCoordinator,
55 ) -> Retained<Self>;
56
57 #[cfg(all(
58 feature = "NSManagedObjectModel",
59 feature = "NSPersistentStoreDescription"
60 ))]
61 #[deprecated]
62 #[unsafe(method(initForStoreWithDescription:model:))]
63 #[unsafe(method_family = init)]
64 pub unsafe fn initForStoreWithDescription_model(
65 this: Allocated<Self>,
66 description: &NSPersistentStoreDescription,
67 model: &NSManagedObjectModel,
68 ) -> Retained<Self>;
69
70 #[unsafe(method(startSpotlightIndexing))]
71 #[unsafe(method_family = none)]
72 pub unsafe fn startSpotlightIndexing(&self);
73
74 #[unsafe(method(stopSpotlightIndexing))]
75 #[unsafe(method_family = none)]
76 pub unsafe fn stopSpotlightIndexing(&self);
77
78 #[cfg(feature = "block2")]
79 #[unsafe(method(deleteSpotlightIndexWithCompletionHandler:))]
80 #[unsafe(method_family = none)]
81 pub unsafe fn deleteSpotlightIndexWithCompletionHandler(
82 &self,
83 completion_handler: &block2::DynBlock<dyn Fn(*mut NSError)>,
84 );
85 );
86}
87
88impl NSCoreDataCoreSpotlightDelegate {
90 extern_methods!(
91 #[unsafe(method(new))]
92 #[unsafe(method_family = new)]
93 pub unsafe fn new() -> Retained<Self>;
94 );
95}