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

[ShazamKit] Update bindings for Xcode 14.0 beta 1&2&3&4 #15539

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
41 changes: 41 additions & 0 deletions src/shazamkit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ public enum SHErrorCode : long
CustomCatalogInvalid = 300,
CustomCatalogInvalidURL = 301,
MediaLibrarySyncFailed = 400,
[Watch (9,0), TV (16,0), Mac (13,0), iOS (16,0), MacCatalyst (16,0)]
InternalError = 500,
}

[iOS (15,0), Mac (12,0), Watch (8,0), TV (15,0), MacCatalyst (15,0)]
Expand Down Expand Up @@ -57,6 +59,12 @@ enum SHMediaItemProperty
MatchOffset,
[Field ("SHMediaItemFrequencySkew")]
FrequencySkew,
[Watch (9,0), TV (16,0), Mac (13,0), iOS (16,0), MacCatalyst (16,0)]
[Field ("SHMediaItemTimeRanges")]
TimeRanges,
[Watch (9,0), TV (16,0), Mac (13,0), iOS (16,0), MacCatalyst (16,0)]
[Field ("SHMediaItemFrequencySkewRanges")]
FrequencySkewRanges,
}

[iOS (15,0), Mac (12,0), Watch (8,0), TV (15,0), MacCatalyst (15,0)]
Expand Down Expand Up @@ -182,6 +190,14 @@ interface SHMediaItem : NSSecureCoding, NSCopying

[Export ("objectForKeyedSubscript:")]
NSObject GetObject (string key);

[Watch (9,0), TV (16,0), Mac (13,0), iOS (16,0), MacCatalyst (16,0)]
[Export ("timeRanges", ArgumentSemantic.Strong)]
SHRange[] TimeRanges { get; }

[Watch (9,0), TV (16,0), Mac (13,0), iOS (16,0), MacCatalyst (16,0)]
[Export ("frequencySkewRanges", ArgumentSemantic.Strong)]
SHRange[] FrequencySkewRanges { get; }
}

[iOS (15,0), Mac (12,0), Watch (8,0), TV (15,0), MacCatalyst (15,0)]
Expand Down Expand Up @@ -252,6 +268,11 @@ interface SHSignatureGenerator

[Export ("signature")]
SHSignature Signature { get; }

[Static, Async]
[Watch (9,0), TV (16,0), Mac (13,0), iOS (16,0), MacCatalyst (16,0)]
[Export ("generateSignatureFromAsset:completionHandler:")]
void GenerateSignature (AVAsset asset, Action<SHSignature, NSError> completionHandler);
}

interface ISHSessionDelegate {}
Expand All @@ -271,4 +292,24 @@ interface SHSessionDelegate
[Export ("session:didNotFindMatchForSignature:error:")]
void DidNotFindMatch (SHSession session, SHSignature signature, [NullAllowed] NSError error);
}

[Watch (9,0), TV (16,0), Mac (13,0), iOS (16,0), MacCatalyst (16,0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface SHRange : NSSecureCoding, NSCopying
{
[Export ("initWithLowerBound:upperBound:")]
[DesignatedInitializer]
NativeHandle Constructor (double lowerBound, double upperBound);

[Export ("lowerBound")]
double LowerBound { get; }

[Export ("upperBound")]
double UpperBound { get; }

[Static]
[Export ("rangeWithLowerBound:upperBound:")]
SHRange CreateRange (double lowerBound, double upperBound);
}
}
12 changes: 12 additions & 0 deletions src/uniformtypeidentifiers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,18 @@ interface UTType : NSCopying, NSSecureCoding {

[Export ("supertypes")]
NSSet<UTType> Supertypes { get; }

// extension methods used in ShazamKit

[Static]
[Watch (9,0), TV (16,0), Mac (13,0), iOS (16,0), MacCatalyst (16,0)]
[Export ("SHCustomCatalogContentType", ArgumentSemantic.Strong)]
UTType SHCustomCatalogContentType { get; }

[Static]
[Watch (9,0), TV (16,0), Mac (13,0), iOS (16,0), MacCatalyst (16,0)]
[Export ("SHSignatureContentType", ArgumentSemantic.Strong)]
UTType SHSignatureContentType { get; }
}

[Introduced (PlatformName.MacCatalyst, 14,0)]
Expand Down
13 changes: 0 additions & 13 deletions tests/xtro-sharpie/api-annotations-dotnet/iOS-ShazamKit.todo

This file was deleted.

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

This file was deleted.

13 changes: 0 additions & 13 deletions tests/xtro-sharpie/api-annotations-dotnet/tvOS-ShazamKit.todo

This file was deleted.

13 changes: 0 additions & 13 deletions tests/xtro-sharpie/iOS-ShazamKit.todo

This file was deleted.

13 changes: 0 additions & 13 deletions tests/xtro-sharpie/macOS-ShazamKit.todo

This file was deleted.

13 changes: 0 additions & 13 deletions tests/xtro-sharpie/tvOS-ShazamKit.todo

This file was deleted.

13 changes: 0 additions & 13 deletions tests/xtro-sharpie/watchOS-ShazamKit.todo

This file was deleted.