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.
-
-
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 NSDatadataForSearchableIndexItemIdentifierTypeIdentifierError(CSSearchableIndex searchableIndex, java.lang.String itemIdentifier, java.lang.String typeIdentifier, org.moe.natj.general.ptr.Ptr<NSError> outError)The developer may provided a NSData representation if type was specified in providerDataTypeIdentifiers property.default NSURLfileURLForSearchableIndexItemIdentifierTypeIdentifierInPlaceError(CSSearchableIndex searchableIndex, java.lang.String itemIdentifier, java.lang.String typeIdentifier, boolean inPlace, 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(CSSearchableIndex searchableIndex)default voidsearchableIndexDidThrottle(CSSearchableIndex searchableIndex)When on battery power, it is possible for indexing to slowed down to prevent battery drain.voidsearchableIndexReindexAllSearchableItemsWithAcknowledgementHandler(CSSearchableIndex searchableIndex, 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(CSSearchableIndex searchableIndex, NSArray<java.lang.String> identifiers, CSSearchableIndexDelegate.Block_searchableIndexReindexSearchableItemsWithIdentifiersAcknowledgementHandler acknowledgementHandler)The index requests that the delegate should reindex the searchable data with the provided identifiers.
-
-
-
Method Detail
-
searchableIndexReindexAllSearchableItemsWithAcknowledgementHandler
void searchableIndexReindexAllSearchableItemsWithAcknowledgementHandler(CSSearchableIndex searchableIndex, 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(CSSearchableIndex searchableIndex, NSArray<java.lang.String> identifiers, 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(CSSearchableIndex searchableIndex)
-
searchableIndexDidThrottle
default void searchableIndexDidThrottle(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
default NSData dataForSearchableIndexItemIdentifierTypeIdentifierError(CSSearchableIndex searchableIndex, java.lang.String itemIdentifier, java.lang.String typeIdentifier, org.moe.natj.general.ptr.Ptr<NSError> outError)
The developer may provided a NSData representation if type was specified in providerDataTypeIdentifiers property.
-
fileURLForSearchableIndexItemIdentifierTypeIdentifierInPlaceError
default NSURL fileURLForSearchableIndexItemIdentifierTypeIdentifierInPlaceError(CSSearchableIndex searchableIndex, java.lang.String itemIdentifier, java.lang.String typeIdentifier, boolean inPlace, 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.
-
-