From 04654ea5ff638ffb2293e9550c27983748417460 Mon Sep 17 00:00:00 2001 From: tj_devel709 Date: Mon, 18 Jul 2022 12:33:37 -0500 Subject: [PATCH] [ShazamKit] Update bindings for Xcode 14.0 beta 1 --- src/shazamkit.cs | 41 +++++++++++++++++++ src/uniformtypeidentifiers.cs | 12 ++++++ .../api-annotations-dotnet/iOS-ShazamKit.todo | 13 ------ .../macOS-ShazamKit.todo | 13 ------ .../tvOS-ShazamKit.todo | 13 ------ tests/xtro-sharpie/iOS-ShazamKit.todo | 13 ------ tests/xtro-sharpie/macOS-ShazamKit.todo | 13 ------ tests/xtro-sharpie/tvOS-ShazamKit.todo | 13 ------ tests/xtro-sharpie/watchOS-ShazamKit.todo | 13 ------ 9 files changed, 53 insertions(+), 91 deletions(-) delete mode 100644 tests/xtro-sharpie/api-annotations-dotnet/iOS-ShazamKit.todo delete mode 100644 tests/xtro-sharpie/api-annotations-dotnet/macOS-ShazamKit.todo delete mode 100644 tests/xtro-sharpie/api-annotations-dotnet/tvOS-ShazamKit.todo delete mode 100644 tests/xtro-sharpie/iOS-ShazamKit.todo delete mode 100644 tests/xtro-sharpie/macOS-ShazamKit.todo delete mode 100644 tests/xtro-sharpie/tvOS-ShazamKit.todo delete mode 100644 tests/xtro-sharpie/watchOS-ShazamKit.todo diff --git a/src/shazamkit.cs b/src/shazamkit.cs index 864b42a43a7..98ad9b3326a 100644 --- a/src/shazamkit.cs +++ b/src/shazamkit.cs @@ -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)] @@ -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)] @@ -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)] @@ -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 completionHandler); } interface ISHSessionDelegate {} @@ -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); + } } diff --git a/src/uniformtypeidentifiers.cs b/src/uniformtypeidentifiers.cs index 6e1de7998f2..1885cffca32 100644 --- a/src/uniformtypeidentifiers.cs +++ b/src/uniformtypeidentifiers.cs @@ -119,6 +119,18 @@ interface UTType : NSCopying, NSSecureCoding { [Export ("supertypes")] NSSet 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)] diff --git a/tests/xtro-sharpie/api-annotations-dotnet/iOS-ShazamKit.todo b/tests/xtro-sharpie/api-annotations-dotnet/iOS-ShazamKit.todo deleted file mode 100644 index 26c6382c372..00000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/iOS-ShazamKit.todo +++ /dev/null @@ -1,13 +0,0 @@ -!missing-enum-value! SHErrorCode native value SHErrorCodeInternalError = 500 not bound -!missing-field! SHMediaItemTimeRanges not bound -!missing-selector! +SHRange::rangeWithLowerBound:upperBound: not bound -!missing-selector! +SHSignatureGenerator::generateSignatureFromAsset:completionHandler: not bound -!missing-selector! SHMediaItem::frequencySkewRanges not bound -!missing-selector! SHMediaItem::timeRanges not bound -!missing-selector! SHRange::initWithLowerBound:upperBound: not bound -!missing-selector! SHRange::lowerBound not bound -!missing-selector! SHRange::upperBound not bound -!missing-type! SHRange not bound -!missing-field! SHMediaItemFrequencySkewRanges not bound -!missing-selector! +UTType::SHCustomCatalogContentType not bound -!missing-selector! +UTType::SHSignatureContentType not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/macOS-ShazamKit.todo b/tests/xtro-sharpie/api-annotations-dotnet/macOS-ShazamKit.todo deleted file mode 100644 index 26c6382c372..00000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/macOS-ShazamKit.todo +++ /dev/null @@ -1,13 +0,0 @@ -!missing-enum-value! SHErrorCode native value SHErrorCodeInternalError = 500 not bound -!missing-field! SHMediaItemTimeRanges not bound -!missing-selector! +SHRange::rangeWithLowerBound:upperBound: not bound -!missing-selector! +SHSignatureGenerator::generateSignatureFromAsset:completionHandler: not bound -!missing-selector! SHMediaItem::frequencySkewRanges not bound -!missing-selector! SHMediaItem::timeRanges not bound -!missing-selector! SHRange::initWithLowerBound:upperBound: not bound -!missing-selector! SHRange::lowerBound not bound -!missing-selector! SHRange::upperBound not bound -!missing-type! SHRange not bound -!missing-field! SHMediaItemFrequencySkewRanges not bound -!missing-selector! +UTType::SHCustomCatalogContentType not bound -!missing-selector! +UTType::SHSignatureContentType not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/tvOS-ShazamKit.todo b/tests/xtro-sharpie/api-annotations-dotnet/tvOS-ShazamKit.todo deleted file mode 100644 index 26c6382c372..00000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/tvOS-ShazamKit.todo +++ /dev/null @@ -1,13 +0,0 @@ -!missing-enum-value! SHErrorCode native value SHErrorCodeInternalError = 500 not bound -!missing-field! SHMediaItemTimeRanges not bound -!missing-selector! +SHRange::rangeWithLowerBound:upperBound: not bound -!missing-selector! +SHSignatureGenerator::generateSignatureFromAsset:completionHandler: not bound -!missing-selector! SHMediaItem::frequencySkewRanges not bound -!missing-selector! SHMediaItem::timeRanges not bound -!missing-selector! SHRange::initWithLowerBound:upperBound: not bound -!missing-selector! SHRange::lowerBound not bound -!missing-selector! SHRange::upperBound not bound -!missing-type! SHRange not bound -!missing-field! SHMediaItemFrequencySkewRanges not bound -!missing-selector! +UTType::SHCustomCatalogContentType not bound -!missing-selector! +UTType::SHSignatureContentType not bound diff --git a/tests/xtro-sharpie/iOS-ShazamKit.todo b/tests/xtro-sharpie/iOS-ShazamKit.todo deleted file mode 100644 index 26c6382c372..00000000000 --- a/tests/xtro-sharpie/iOS-ShazamKit.todo +++ /dev/null @@ -1,13 +0,0 @@ -!missing-enum-value! SHErrorCode native value SHErrorCodeInternalError = 500 not bound -!missing-field! SHMediaItemTimeRanges not bound -!missing-selector! +SHRange::rangeWithLowerBound:upperBound: not bound -!missing-selector! +SHSignatureGenerator::generateSignatureFromAsset:completionHandler: not bound -!missing-selector! SHMediaItem::frequencySkewRanges not bound -!missing-selector! SHMediaItem::timeRanges not bound -!missing-selector! SHRange::initWithLowerBound:upperBound: not bound -!missing-selector! SHRange::lowerBound not bound -!missing-selector! SHRange::upperBound not bound -!missing-type! SHRange not bound -!missing-field! SHMediaItemFrequencySkewRanges not bound -!missing-selector! +UTType::SHCustomCatalogContentType not bound -!missing-selector! +UTType::SHSignatureContentType not bound diff --git a/tests/xtro-sharpie/macOS-ShazamKit.todo b/tests/xtro-sharpie/macOS-ShazamKit.todo deleted file mode 100644 index 26c6382c372..00000000000 --- a/tests/xtro-sharpie/macOS-ShazamKit.todo +++ /dev/null @@ -1,13 +0,0 @@ -!missing-enum-value! SHErrorCode native value SHErrorCodeInternalError = 500 not bound -!missing-field! SHMediaItemTimeRanges not bound -!missing-selector! +SHRange::rangeWithLowerBound:upperBound: not bound -!missing-selector! +SHSignatureGenerator::generateSignatureFromAsset:completionHandler: not bound -!missing-selector! SHMediaItem::frequencySkewRanges not bound -!missing-selector! SHMediaItem::timeRanges not bound -!missing-selector! SHRange::initWithLowerBound:upperBound: not bound -!missing-selector! SHRange::lowerBound not bound -!missing-selector! SHRange::upperBound not bound -!missing-type! SHRange not bound -!missing-field! SHMediaItemFrequencySkewRanges not bound -!missing-selector! +UTType::SHCustomCatalogContentType not bound -!missing-selector! +UTType::SHSignatureContentType not bound diff --git a/tests/xtro-sharpie/tvOS-ShazamKit.todo b/tests/xtro-sharpie/tvOS-ShazamKit.todo deleted file mode 100644 index 26c6382c372..00000000000 --- a/tests/xtro-sharpie/tvOS-ShazamKit.todo +++ /dev/null @@ -1,13 +0,0 @@ -!missing-enum-value! SHErrorCode native value SHErrorCodeInternalError = 500 not bound -!missing-field! SHMediaItemTimeRanges not bound -!missing-selector! +SHRange::rangeWithLowerBound:upperBound: not bound -!missing-selector! +SHSignatureGenerator::generateSignatureFromAsset:completionHandler: not bound -!missing-selector! SHMediaItem::frequencySkewRanges not bound -!missing-selector! SHMediaItem::timeRanges not bound -!missing-selector! SHRange::initWithLowerBound:upperBound: not bound -!missing-selector! SHRange::lowerBound not bound -!missing-selector! SHRange::upperBound not bound -!missing-type! SHRange not bound -!missing-field! SHMediaItemFrequencySkewRanges not bound -!missing-selector! +UTType::SHCustomCatalogContentType not bound -!missing-selector! +UTType::SHSignatureContentType not bound diff --git a/tests/xtro-sharpie/watchOS-ShazamKit.todo b/tests/xtro-sharpie/watchOS-ShazamKit.todo deleted file mode 100644 index 26c6382c372..00000000000 --- a/tests/xtro-sharpie/watchOS-ShazamKit.todo +++ /dev/null @@ -1,13 +0,0 @@ -!missing-enum-value! SHErrorCode native value SHErrorCodeInternalError = 500 not bound -!missing-field! SHMediaItemTimeRanges not bound -!missing-selector! +SHRange::rangeWithLowerBound:upperBound: not bound -!missing-selector! +SHSignatureGenerator::generateSignatureFromAsset:completionHandler: not bound -!missing-selector! SHMediaItem::frequencySkewRanges not bound -!missing-selector! SHMediaItem::timeRanges not bound -!missing-selector! SHRange::initWithLowerBound:upperBound: not bound -!missing-selector! SHRange::lowerBound not bound -!missing-selector! SHRange::upperBound not bound -!missing-type! SHRange not bound -!missing-field! SHMediaItemFrequencySkewRanges not bound -!missing-selector! +UTType::SHCustomCatalogContentType not bound -!missing-selector! +UTType::SHSignatureContentType not bound