Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/CoreSpotlight/CSEnums.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public enum CSFileProtection {
CompleteUntilFirstUserAuthentication,
}

[NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)]
[TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)]
[Native]
public enum CSUserInteraction : long {
Select,
Expand Down
68 changes: 62 additions & 6 deletions src/corespotlight.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,22 @@

namespace CoreSpotlight {

[Partial]
interface CoreSpotlightConstants {
[Field ("CoreSpotlightVersionNumber")]
double CoreSpotlightVersionNumber { get; }

[Field ("CoreSpotlightVersionString")]
[Internal]
IntPtr _CoreSpotlightVersionString { get; }

[Static]
string CoreSpotlightVersionString {
[Wrap ("Marshal.PtrToStringUTF8 (_CoreSpotlightVersionString)!")]
get;
}
}

/// <summary>Handler for communication between the application and the index on the device. The app does not need to be running for this communication to occur.</summary>
///
/// <related type="externalDocumentation" href="https://developer.apple.com/library/ios/documentation/CoreSpotlight/Reference/CSIndexExtensionRequestHandler_Class/index.html">Apple documentation for <c>CSIndexExtensionRequestHandler</c></related>
Expand Down Expand Up @@ -110,7 +126,6 @@ interface CSSearchableIndex {
[Export ("initWithName:")]
NativeHandle Constructor (string name);

[NoMac]
[MacCatalyst (13, 1)]
[Export ("initWithName:protectionClass:")]
NativeHandle Constructor (string name, [NullAllowed] NSString protectionClass);
Expand Down Expand Up @@ -221,8 +236,20 @@ interface CSSearchableIndexDelegate {
[Export ("fileURLForSearchableIndex:itemIdentifier:typeIdentifier:inPlace:error:")]
[return: NullAllowed]
NSUrl GetFileUrl (CSSearchableIndex searchableIndex, string itemIdentifier, string typeIdentifier, bool inPlace, out NSError outError);

[NoTV]
[iOS (18, 4), Mac (15, 4), MacCatalyst (18, 4)]
[Export ("searchableItemsForIdentifiers:searchableItemsHandler:")]
void GetSearchableItems (string [] identifiers, CSSearchableIndexDelegateGetSearchableItemsHandler searchableItemsHandler);

[NoTV]
[iOS (18, 4), Mac (15, 4), MacCatalyst (18, 4)]
[Export ("searchableItemsDidUpdate:")]
void DidUpdate (CSSearchableItem [] items);
}

delegate void CSSearchableIndexDelegateGetSearchableItemsHandler (CSSearchableItem [] items);

/// <summary>A uniquely identifiable, searchable object in a <see cref="T:CoreSpotlight.CSSearchableIndex" />.</summary>
///
/// <related type="externalDocumentation" href="https://developer.apple.com/library/ios/documentation/CoreSpotlight/Reference/CSSearchableItem_Class/index.html">Apple documentation for <c>CSSearchableItem</c></related>
Expand Down Expand Up @@ -299,6 +326,10 @@ interface CSSearchableItem : NSSecureCoding, NSCopying {
[NoTV]
[Export ("isUpdate", ArgumentSemantic.Assign)]
bool IsUpdate { get; set; }

[NoTV, iOS (18, 4), MacCatalyst (18, 4), Mac (15, 4)]
[Export ("updateListenerOptions", ArgumentSemantic.Assign)]
CSSearchableItemUpdateListenerOptions UpdateListenerOptions { get; set; }
}

/// <summary>Represents a string-like object that returns a locale-specific version of a string.</summary>
Expand Down Expand Up @@ -2194,14 +2225,12 @@ interface CSSearchableItemAttributeSet : NSCopying, NSSecureCoding {
[Field ("CSActionIdentifier")]
NSString ActionIdentifier { get; }

[NoTV, NoMac, iOS (15, 0)]
[NoMacCatalyst]
[NoTV, NoMac, iOS (15, 0), MacCatalyst (18, 0)]
[Export ("actionIdentifiers", ArgumentSemantic.Copy)]
string [] ActionIdentifiers { get; set; }

[NullAllowed]
[NoTV, NoMac, iOS (15, 0)]
[NoMacCatalyst]
[NoTV, NoMac, iOS (15, 0), MacCatalyst (18, 0)]
[Export ("sharedItemContentType", ArgumentSemantic.Copy)]
UTType SharedItemContentType { get; set; }

Expand Down Expand Up @@ -2323,6 +2352,26 @@ interface CSSearchableItemAttributeSet : NSCopying, NSSecureCoding {
[MacCatalyst (13, 1)]
[NullAllowed, Export ("providerInPlaceFileTypeIdentifiers", ArgumentSemantic.Copy)]
string [] ProviderInPlaceFileTypeIdentifiers { get; set; }

[NoTV]
[iOS (18, 4), MacCatalyst (18, 4), Mac (15, 4)]
[Export ("moveFrom:")]
void MoveFrom (CSSearchableItemAttributeSet sourceAttributeSet);

[NoTV]
[iOS (18, 4), MacCatalyst (18, 4), Mac (15, 4)]
[Export ("isPriority", ArgumentSemantic.Strong), NullAllowed]
NSNumber IsPriority { get; }

[NoTV]
[iOS (18, 4), MacCatalyst (18, 4), Mac (15, 4)]
[Export ("textContentSummary", ArgumentSemantic.Copy), NullAllowed]
string TextContentSummary { get; }

[NoTV]
[iOS (18, 4), MacCatalyst (18, 4), Mac (15, 4)]
[Export ("transcribedTextContent", ArgumentSemantic.Strong), NullAllowed]
string TranscribedTextContent { get; set; }
}

/// <include file="../docs/api/CoreSpotlight/CSSearchQuery.xml" path="/Documentation/Docs[@DocId='T:CoreSpotlight.CSSearchQuery']/*" />
Expand Down Expand Up @@ -2520,12 +2569,19 @@ public enum CSSearchQuerySourceOptions : long {
AllowMail = 1L << 0,
}

[NoTV, iOS (16, 0), MacCatalyst (16, 0)]
[TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)]
[Native]
public enum CSSuggestionKind : long {
None,
Custom,
Default,
}

[Native]
[TV (18, 4), iOS (18, 4), MacCatalyst (18, 4), Mac (15, 4)]
public enum CSSearchableItemUpdateListenerOptions : ulong {
Default = 0,
Summarization = 1 << 1,
Priority = 1 << 2,
}
}
22 changes: 22 additions & 0 deletions tests/cecil-tests/Documentation.KnownFailures.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6391,6 +6391,9 @@ F:CoreServices.LSRoles.None
F:CoreServices.LSRoles.Shell
F:CoreServices.LSRoles.Viewer
F:CoreSpotlight.CSIndexErrorCode.MismatchedClientState
F:CoreSpotlight.CSSearchableItemUpdateListenerOptions.Default
F:CoreSpotlight.CSSearchableItemUpdateListenerOptions.Priority
F:CoreSpotlight.CSSearchableItemUpdateListenerOptions.Summarization
F:CoreSpotlight.CSSearchQuerySourceOptions.AllowMail
F:CoreSpotlight.CSSearchQuerySourceOptions.Default
F:CoreSpotlight.CSSuggestionKind.Custom
Expand Down Expand Up @@ -28041,6 +28044,7 @@ M:CoreServices.LaunchServices.Open(Foundation.NSUrl)
M:CoreServices.LaunchServices.Register(Foundation.NSUrl,System.Boolean)
M:CoreServices.LaunchServices.SetDefaultHandlerForUrlScheme(System.String,System.String)
M:CoreServices.LaunchServices.SetDefaultRoleHandlerForContentType(System.String,System.String,CoreServices.LSRoles)
M:CoreSpotlight.CoreSpotlightConstants.#ctor
M:CoreSpotlight.CSCustomAttributeKey.#ctor(System.String,System.Boolean,System.Boolean,System.Boolean,System.Boolean)
M:CoreSpotlight.CSCustomAttributeKey.#ctor(System.String)
M:CoreSpotlight.CSCustomAttributeKey.Copy(Foundation.NSZone)
Expand All @@ -28050,8 +28054,10 @@ M:CoreSpotlight.CSImportExtension.Update(CoreSpotlight.CSSearchableItemAttribute
M:CoreSpotlight.CSIndexExtensionRequestHandler.BeginRequestWithExtensionContext(Foundation.NSExtensionContext)
M:CoreSpotlight.CSIndexExtensionRequestHandler.DidFinishThrottle(CoreSpotlight.CSSearchableIndex)
M:CoreSpotlight.CSIndexExtensionRequestHandler.DidThrottle(CoreSpotlight.CSSearchableIndex)
M:CoreSpotlight.CSIndexExtensionRequestHandler.DidUpdate(CoreSpotlight.CSSearchableItem[])
M:CoreSpotlight.CSIndexExtensionRequestHandler.GetData(CoreSpotlight.CSSearchableIndex,System.String,System.String,Foundation.NSError@)
M:CoreSpotlight.CSIndexExtensionRequestHandler.GetFileUrl(CoreSpotlight.CSSearchableIndex,System.String,System.String,System.Boolean,Foundation.NSError@)
M:CoreSpotlight.CSIndexExtensionRequestHandler.GetSearchableItems(System.String[],CoreSpotlight.CSSearchableIndexDelegateGetSearchableItemsHandler)
M:CoreSpotlight.CSIndexExtensionRequestHandler.ReindexAllSearchableItems(CoreSpotlight.CSSearchableIndex,System.Action)
M:CoreSpotlight.CSIndexExtensionRequestHandler.ReindexSearchableItems(CoreSpotlight.CSSearchableIndex,System.String[],System.Action)
M:CoreSpotlight.CSLocalizedString.#ctor(Foundation.NSDictionary)
Expand Down Expand Up @@ -28084,12 +28090,16 @@ M:CoreSpotlight.CSSearchableIndex.ProvideDataAsync(System.String,System.String,S
M:CoreSpotlight.CSSearchableIndexBundleDataResult.#ctor(Foundation.NSData)
M:CoreSpotlight.CSSearchableIndexDelegate_Extensions.DidFinishThrottle(CoreSpotlight.ICSSearchableIndexDelegate,CoreSpotlight.CSSearchableIndex)
M:CoreSpotlight.CSSearchableIndexDelegate_Extensions.DidThrottle(CoreSpotlight.ICSSearchableIndexDelegate,CoreSpotlight.CSSearchableIndex)
M:CoreSpotlight.CSSearchableIndexDelegate_Extensions.DidUpdate(CoreSpotlight.ICSSearchableIndexDelegate,CoreSpotlight.CSSearchableItem[])
M:CoreSpotlight.CSSearchableIndexDelegate_Extensions.GetData(CoreSpotlight.ICSSearchableIndexDelegate,CoreSpotlight.CSSearchableIndex,System.String,System.String,Foundation.NSError@)
M:CoreSpotlight.CSSearchableIndexDelegate_Extensions.GetFileUrl(CoreSpotlight.ICSSearchableIndexDelegate,CoreSpotlight.CSSearchableIndex,System.String,System.String,System.Boolean,Foundation.NSError@)
M:CoreSpotlight.CSSearchableIndexDelegate_Extensions.GetSearchableItems(CoreSpotlight.ICSSearchableIndexDelegate,System.String[],CoreSpotlight.CSSearchableIndexDelegateGetSearchableItemsHandler)
M:CoreSpotlight.CSSearchableIndexDelegate.DidFinishThrottle(CoreSpotlight.CSSearchableIndex)
M:CoreSpotlight.CSSearchableIndexDelegate.DidThrottle(CoreSpotlight.CSSearchableIndex)
M:CoreSpotlight.CSSearchableIndexDelegate.DidUpdate(CoreSpotlight.CSSearchableItem[])
M:CoreSpotlight.CSSearchableIndexDelegate.GetData(CoreSpotlight.CSSearchableIndex,System.String,System.String,Foundation.NSError@)
M:CoreSpotlight.CSSearchableIndexDelegate.GetFileUrl(CoreSpotlight.CSSearchableIndex,System.String,System.String,System.Boolean,Foundation.NSError@)
M:CoreSpotlight.CSSearchableIndexDelegate.GetSearchableItems(System.String[],CoreSpotlight.CSSearchableIndexDelegateGetSearchableItemsHandler)
M:CoreSpotlight.CSSearchableIndexDelegate.ReindexAllSearchableItems(CoreSpotlight.CSSearchableIndex,System.Action)
M:CoreSpotlight.CSSearchableIndexDelegate.ReindexSearchableItems(CoreSpotlight.CSSearchableIndex,System.String[],System.Action)
M:CoreSpotlight.CSSearchableItem.#ctor(System.String,System.String,CoreSpotlight.CSSearchableItemAttributeSet)
Expand All @@ -28100,6 +28110,7 @@ M:CoreSpotlight.CSSearchableItemAttributeSet.#ctor(System.String)
M:CoreSpotlight.CSSearchableItemAttributeSet.#ctor(UniformTypeIdentifiers.UTType)
M:CoreSpotlight.CSSearchableItemAttributeSet.Copy(Foundation.NSZone)
M:CoreSpotlight.CSSearchableItemAttributeSet.EncodeTo(Foundation.NSCoder)
M:CoreSpotlight.CSSearchableItemAttributeSet.MoveFrom(CoreSpotlight.CSSearchableItemAttributeSet)
M:CoreSpotlight.CSSearchQuery.#ctor(System.String,CoreSpotlight.CSSearchQueryContext)
M:CoreSpotlight.CSSearchQuery.#ctor(System.String,System.String[])
M:CoreSpotlight.CSSearchQuery.Cancel
Expand All @@ -28121,8 +28132,10 @@ M:CoreSpotlight.CSUserQuery.UserEngaged(CoreSpotlight.CSSuggestion,CoreSpotlight
M:CoreSpotlight.CSUserQueryContext.Create(CoreSpotlight.CSSuggestion)
M:CoreSpotlight.ICSSearchableIndexDelegate.DidFinishThrottle(CoreSpotlight.CSSearchableIndex)
M:CoreSpotlight.ICSSearchableIndexDelegate.DidThrottle(CoreSpotlight.CSSearchableIndex)
M:CoreSpotlight.ICSSearchableIndexDelegate.DidUpdate(CoreSpotlight.CSSearchableItem[])
M:CoreSpotlight.ICSSearchableIndexDelegate.GetData(CoreSpotlight.CSSearchableIndex,System.String,System.String,Foundation.NSError@)
M:CoreSpotlight.ICSSearchableIndexDelegate.GetFileUrl(CoreSpotlight.CSSearchableIndex,System.String,System.String,System.Boolean,Foundation.NSError@)
M:CoreSpotlight.ICSSearchableIndexDelegate.GetSearchableItems(System.String[],CoreSpotlight.CSSearchableIndexDelegateGetSearchableItemsHandler)
M:CoreSpotlight.ICSSearchableIndexDelegate.ReindexAllSearchableItems(CoreSpotlight.CSSearchableIndex,System.Action)
M:CoreSpotlight.ICSSearchableIndexDelegate.ReindexSearchableItems(CoreSpotlight.CSSearchableIndex,System.String[],System.Action)
M:CoreTelephony.CTCellularPlanProvisioning.AddPlan(CoreTelephony.CTCellularPlanProvisioningRequest,System.Action{CoreTelephony.CTCellularPlanProvisioningAddPlanResult})
Expand Down Expand Up @@ -52984,14 +52997,20 @@ P:CoreServices.FSEventStream.DeviceBeingWatched
P:CoreServices.FSEventStream.LatestEventId
P:CoreServices.FSEventStream.PathsBeingWatched
P:CoreServices.FSEventStreamEventsArgs.Events
P:CoreSpotlight.CoreSpotlightConstants.CoreSpotlightVersionNumber
P:CoreSpotlight.CoreSpotlightConstants.CoreSpotlightVersionString
P:CoreSpotlight.CSSearchableIndex.IndexDelegate
P:CoreSpotlight.CSSearchableIndexBundleDataResult.Arg1
P:CoreSpotlight.CSSearchableItem.IsUpdate
P:CoreSpotlight.CSSearchableItem.UpdateListenerOptions
P:CoreSpotlight.CSSearchableItemAttributeSet.ActionIdentifier
P:CoreSpotlight.CSSearchableItemAttributeSet.ActionIdentifiers
P:CoreSpotlight.CSSearchableItemAttributeSet.DarkThumbnailUrl
P:CoreSpotlight.CSSearchableItemAttributeSet.IsPriority
P:CoreSpotlight.CSSearchableItemAttributeSet.Item(CoreSpotlight.CSCustomAttributeKey)
P:CoreSpotlight.CSSearchableItemAttributeSet.SharedItemContentType
P:CoreSpotlight.CSSearchableItemAttributeSet.TextContentSummary
P:CoreSpotlight.CSSearchableItemAttributeSet.TranscribedTextContent
P:CoreSpotlight.CSSearchQueryContext.FetchAttributes
P:CoreSpotlight.CSSearchQueryContext.FilterQueries
P:CoreSpotlight.CSSearchQueryContext.KeyboardLanguage
Expand Down Expand Up @@ -66596,9 +66615,12 @@ T:CoreServices.LaunchServices
T:CoreServices.LSAcceptanceFlags
T:CoreServices.LSResult
T:CoreServices.LSRoles
T:CoreSpotlight.CoreSpotlightConstants
T:CoreSpotlight.CSImportExtension
T:CoreSpotlight.CSSearchableIndexBundleDataResult
T:CoreSpotlight.CSSearchableIndexDelegateGetSearchableItemsHandler
T:CoreSpotlight.CSSearchableIndexEndIndexHandler
T:CoreSpotlight.CSSearchableItemUpdateListenerOptions
T:CoreSpotlight.CSSearchQueryContext
T:CoreSpotlight.CSSearchQuerySourceOptions
T:CoreSpotlight.CSSuggestion
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

10 changes: 0 additions & 10 deletions tests/xtro-sharpie/api-annotations-dotnet/iOS-CoreSpotlight.todo

This file was deleted.

This file was deleted.

10 changes: 0 additions & 10 deletions tests/xtro-sharpie/api-annotations-dotnet/macOS-CoreSpotlight.todo

This file was deleted.

This file was deleted.

This file was deleted.

Loading