Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CoreSpotlight] Updates for Xcode14 beta 5 #15701

Merged
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
47 changes: 17 additions & 30 deletions src/corespotlight.cs
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,10 @@ interface CSSearchableItem : NSSecureCoding, NSCopying {

[Export ("attributeSet", ArgumentSemantic.Strong)]
CSSearchableItemAttributeSet AttributeSet { get; set; }

[NoTV, iOS (16,0), MacCatalyst (16,0), Mac (13,0), NoWatch]
[Export ("compareByRank:")]
NSComparisonResult CompareByRank (CSSearchableItem other);
}

[NoTV] // CS_TVOS_UNAVAILABLE
Expand Down Expand Up @@ -1089,7 +1093,7 @@ interface CSSearchQuery {
[Mac (13,0), iOS (16,0), MacCatalyst (16,0)]
[Export ("initWithQueryString:queryContext:")]
[DesignatedInitializer]
NativeHandle Constructor (string queryString, CSSearchQueryContext queryContext);
NativeHandle Constructor (string queryString, [NullAllowed] CSSearchQueryContext queryContext);

[Export ("cancelled")]
bool Cancelled { [Bind ("isCancelled")] get; }
Expand Down Expand Up @@ -1127,9 +1131,9 @@ interface CSImportExtension : NSExtensionRequestHandling
[DisableDefaultCtor]
interface CSUserQuery
{
[Export ("initWithUserQueryString:queryContext:")]
[Export ("initWithUserQueryString:userQueryContext:")]
[DesignatedInitializer]
NativeHandle Constructor ([NullAllowed] string userQueryString, CSUserQueryContext queryContext);
NativeHandle Constructor ([NullAllowed] string userQueryString, [NullAllowed] CSUserQueryContext userQueryContext);

[Export ("foundSuggestionCount")]
nint FoundSuggestionCount { get; }
Expand Down Expand Up @@ -1159,34 +1163,14 @@ interface CSUserQueryContext

[Export ("maxSuggestionCount")]
nint MaxSuggestionCount { get; set; }
}

[NoTV, Mac (13,0), iOS (16,0), MacCatalyst (16,0)]
[BaseType (typeof (CSUserQueryContext))]
[DisableDefaultCtor]
interface CSTopHitQueryContext
{
[Static]
[Export ("topHitQueryContext")]
CSTopHitQueryContext TopHitQueryContext { get; }

[Static]
[Export ("topHitQueryContextWithCurrentSuggestion:")]
CSTopHitQueryContext Create ([NullAllowed] CSSuggestion currentSuggestion);
[Export ("enableRankedResults")]
bool EnableRankedResults { get; set; }

[Export ("maxItemCount")]
nint MaxItemCount { get; set; }
[Export ("maxResultCount")]
nint MaxResultCount { get; set; }
}

[NoTV, Mac (13,0), iOS (16,0), MacCatalyst (16,0)]
[BaseType (typeof (CSUserQuery))]
[DisableDefaultCtor]
interface CSTopHitQuery
{
[Export ("initWithUserQueryString:queryContext:")]
[DesignatedInitializer]
NativeHandle Constructor ([NullAllowed] string userQueryString, CSTopHitQueryContext queryContext);
}

[NoTV, Mac (13,0), iOS (16,0), MacCatalyst (16,0)]
[BaseType (typeof (NSObject))]
Expand All @@ -1205,19 +1189,22 @@ interface CSSuggestion : NSSecureCoding, NSCopying

[Export ("compare:")]
NSComparisonResult Compare (CSSuggestion other);

[Export ("compareByRank:")]
NSComparisonResult CompareByRank (CSSuggestion other);
}

[NoTV, Mac (13,0), iOS (16,0), MacCatalyst (16,0)]
[BaseType (typeof (NSObject))]
interface CSSearchQueryContext : NSSecureCoding, NSCopying
{
[NullAllowed, Export ("fetchAttributes", ArgumentSemantic.Strong)]
[Export ("fetchAttributes", ArgumentSemantic.Strong)]
string[] FetchAttributes { get; set; }

[NullAllowed, Export ("protectionClasses", ArgumentSemantic.Strong)]
string[] ProtectionClasses { get; set; }

[NullAllowed, Export ("filterQueries", ArgumentSemantic.Copy)]
[Export ("filterQueries", ArgumentSemantic.Copy)]
string[] FilterQueries { get; set; }

[NullAllowed, Export ("keyboardLanguage", ArgumentSemantic.Strong)]
Expand All @@ -1227,7 +1214,7 @@ interface CSSearchQueryContext : NSSecureCoding, NSCopying
CSSearchQuerySourceOptions SourceOptions { get; set; }
}

[NoTV, Mac (13,0), iOS (16,0), MacCatalyst (16,0)]
[TV (16,0), Mac (13,0), iOS (16,0), MacCatalyst (16,0)]
[Native]
public enum CSSearchQuerySourceOptions : long
{
Expand Down
12 changes: 0 additions & 12 deletions tests/xtro-sharpie/api-annotations-dotnet/iOS-CoreSpotlight.todo

This file was deleted.

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

This file was deleted.

This file was deleted.

12 changes: 0 additions & 12 deletions tests/xtro-sharpie/iOS-CoreSpotlight.todo

This file was deleted.

12 changes: 0 additions & 12 deletions tests/xtro-sharpie/macOS-CoreSpotlight.todo

This file was deleted.

1 change: 0 additions & 1 deletion tests/xtro-sharpie/tvOS-CoreSpotlight.todo

This file was deleted.