Package apple.corespotlight.protocol
Interface CSSearchableIndexDelegate
-
- All Known Implementing Classes:
CSIndexExtensionRequestHandler
public interface CSSearchableIndexDelegateAn application that is long running should provide a CSSearchableIndexDelegate conforming object to handle communication from the index. Alternatively, an app can provide an extension whose request handler conforms to this protocol and the extension will be called if the app isn't running. API-Since: 9.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceCSSearchableIndexDelegate.Block_searchableIndexReindexAllSearchableItemsWithAcknowledgementHandlerstatic interfaceCSSearchableIndexDelegate.Block_searchableIndexReindexSearchableItemsWithIdentifiersAcknowledgementHandler
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default @Nullable NSDatadataForSearchableIndexItemIdentifierTypeIdentifierError(@NotNull CSSearchableIndex searchableIndex, @NotNull java.lang.String itemIdentifier, @NotNull java.lang.String typeIdentifier, @Nullable org.moe.natj.general.ptr.Ptr<NSError> outError)The developer may provided a NSData representation if type was specified in providerDataTypeIdentifiers property.default @Nullable NSURLfileURLForSearchableIndexItemIdentifierTypeIdentifierInPlaceError(@NotNull CSSearchableIndex searchableIndex, @NotNull java.lang.String itemIdentifier, @NotNull java.lang.String typeIdentifier, boolean inPlace, @Nullable org.moe.natj.general.ptr.Ptr<NSError> outError)The developer may provided a NSURL to file representation representation if type was specified from providerDataTypeIdentifiers or providerInPlaceFileTypeIdentifiers property.default voidsearchableIndexDidFinishThrottle(@NotNull CSSearchableIndex searchableIndex)default voidsearchableIndexDidThrottle(@NotNull CSSearchableIndex searchableIndex)When on battery power, it is possible for indexing to slowed down to prevent battery drain.voidsearchableIndexReindexAllSearchableItemsWithAcknowledgementHandler(@NotNull CSSearchableIndex searchableIndex, @NotNull CSSearchableIndexDelegate.Block_searchableIndexReindexAllSearchableItemsWithAcknowledgementHandler acknowledgementHandler)The index requests that the delegate should reindex all of its searchable data and clear any local state that it might have persisted because the index has been lost.voidsearchableIndexReindexSearchableItemsWithIdentifiersAcknowledgementHandler(@NotNull CSSearchableIndex searchableIndex, @NotNull NSArray<java.lang.String> identifiers, @NotNull CSSearchableIndexDelegate.Block_searchableIndexReindexSearchableItemsWithIdentifiersAcknowledgementHandler acknowledgementHandler)The index requests that the delegate should reindex the searchable data with the provided identifiers.
-
-
-
Method Detail
-
searchableIndexReindexAllSearchableItemsWithAcknowledgementHandler
void searchableIndexReindexAllSearchableItemsWithAcknowledgementHandler(@NotNull @NotNull CSSearchableIndex searchableIndex, @NotNull @NotNull CSSearchableIndexDelegate.Block_searchableIndexReindexAllSearchableItemsWithAcknowledgementHandler acknowledgementHandler)The index requests that the delegate should reindex all of its searchable data and clear any local state that it might have persisted because the index has been lost. The app or extension should call indexSearchableItems on the passed in CSSearchableIndex. The app or extension must call the acknowledgement handler once any client state information has been persisted, that way, in case of a crash, the indexer can call this again. If the app passes clientState information in a batch, the acknowledgement can be called right away. The passed in index shouldn't be used in an extension if a custom protection class is needed.
-
searchableIndexReindexSearchableItemsWithIdentifiersAcknowledgementHandler
void searchableIndexReindexSearchableItemsWithIdentifiersAcknowledgementHandler(@NotNull @NotNull CSSearchableIndex searchableIndex, @NotNull @NotNull NSArray<java.lang.String> identifiers, @NotNull @NotNull CSSearchableIndexDelegate.Block_searchableIndexReindexSearchableItemsWithIdentifiersAcknowledgementHandler acknowledgementHandler)The index requests that the delegate should reindex the searchable data with the provided identifiers. The app or extension should call indexSearchableItems:completionHandler on the passed in index CSSearchableIndex to update the items' states. The app or extension must call the acknowledgement handler once any client state information has been persisted, that way, in case of a crash, the indexer can call this again. If the app passes clientState information in a batch, the acknowledgement can be called right away. The passed in index shouldn't be used in an extension if a custom protection class is needed.
-
searchableIndexDidFinishThrottle
default void searchableIndexDidFinishThrottle(@NotNull @NotNull CSSearchableIndex searchableIndex)
-
searchableIndexDidThrottle
default void searchableIndexDidThrottle(@NotNull @NotNull CSSearchableIndex searchableIndex)When on battery power, it is possible for indexing to slowed down to prevent battery drain. The developer may want to optionally implement these methods to receive notice that indexing is being throttled and react accordingly (e.g. by priortizing indexing of more important content).
-
dataForSearchableIndexItemIdentifierTypeIdentifierError
@Nullable default @Nullable NSData dataForSearchableIndexItemIdentifierTypeIdentifierError(@NotNull @NotNull CSSearchableIndex searchableIndex, @NotNull @NotNull java.lang.String itemIdentifier, @NotNull @NotNull java.lang.String typeIdentifier, @Nullable @Nullable org.moe.natj.general.ptr.Ptr<NSError> outError)
The developer may provided a NSData representation if type was specified in providerDataTypeIdentifiers property. API-Since: 11.0
-
fileURLForSearchableIndexItemIdentifierTypeIdentifierInPlaceError
@Nullable default @Nullable NSURL fileURLForSearchableIndexItemIdentifierTypeIdentifierInPlaceError(@NotNull @NotNull CSSearchableIndex searchableIndex, @NotNull @NotNull java.lang.String itemIdentifier, @NotNull @NotNull java.lang.String typeIdentifier, boolean inPlace, @Nullable @Nullable org.moe.natj.general.ptr.Ptr<NSError> outError)
The developer may provided a NSURL to file representation representation if type was specified from providerDataTypeIdentifiers or providerInPlaceFileTypeIdentifiers property. API-Since: 11.0
-
-