Class SHCustomCatalog

  • All Implemented Interfaces:
    NSObject

    public class SHCustomCatalog
    extends SHCatalog
    Configure a custom catalog of @c SHSignature objects to match against Use a custom catalog if you intend to search against reference signatures that you have provided yourself. All matches will be performed locally on the device against the signatures added to this Catalog. [@c] SHMediaItem can be built using custom data that will be returned when a match is made. Once this catalog has been built it can be written to disk and loaded again at a later date. API-Since: 15.0
    • Constructor Detail

      • SHCustomCatalog

        protected SHCustomCatalog​(org.moe.natj.general.Pointer peer)
    • Method Detail

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • addCustomCatalogFromURLError

        public boolean addCustomCatalogFromURLError​(@NotNull
                                                    @NotNull NSURL customCatalogURL,
                                                    @Nullable
                                                    @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
        Load a `shazamcatalog` file from a file path URL
        Parameters:
        customCatalogURL - The path to the `shazamcatalog` file.
        error - An error if the catalog could not be loaded
        Returns:
        YES if the data was successfully added, NO on failure with a populated error parameter
      • addReferenceSignatureRepresentingMediaItemsError

        public boolean addReferenceSignatureRepresentingMediaItemsError​(@NotNull
                                                                        @NotNull SHSignature signature,
                                                                        @NotNull
                                                                        @NotNull NSArray<? extends SHMediaItem> mediaItems,
                                                                        @Nullable
                                                                        @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
        Add a reference @c SHSignature and its associated @c SHMediaItem for matching Once the @c SHCatalog had been added to a @c SHSession further calls to this method will be ignored
        Parameters:
        signature - The reference to match against
        mediaItems - The metadata associated with the @c SHSignature
        Returns:
        YES if the data was successfully added, NO on failure with a populated error parameter
      • allocWithZone

        public static SHCustomCatalog allocWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
      • automaticallyNotifiesObserversForKey

        public static boolean automaticallyNotifiesObserversForKey​(@NotNull
                                                                   @NotNull java.lang.String key)
      • cancelPreviousPerformRequestsWithTarget

        public static void cancelPreviousPerformRequestsWithTarget​(@NotNull
                                                                   @NotNull java.lang.Object aTarget)
      • cancelPreviousPerformRequestsWithTargetSelectorObject

        public static void cancelPreviousPerformRequestsWithTargetSelectorObject​(@NotNull
                                                                                 @NotNull java.lang.Object aTarget,
                                                                                 @NotNull
                                                                                 @NotNull org.moe.natj.objc.SEL aSelector,
                                                                                 @Nullable
                                                                                 @Nullable java.lang.Object anArgument)
      • classFallbacksForKeyedArchiver

        @NotNull
        public static @NotNull NSArray<java.lang.String> classFallbacksForKeyedArchiver()
      • classForKeyedUnarchiver

        @NotNull
        public static @NotNull org.moe.natj.objc.Class classForKeyedUnarchiver()
      • debugDescription_static

        public static java.lang.String debugDescription_static()
      • description_static

        public static java.lang.String description_static()
      • hash_static

        public static long hash_static()
      • instanceMethodSignatureForSelector

        public static NSMethodSignature instanceMethodSignatureForSelector​(org.moe.natj.objc.SEL aSelector)
      • instancesRespondToSelector

        public static boolean instancesRespondToSelector​(org.moe.natj.objc.SEL aSelector)
      • isSubclassOfClass

        public static boolean isSubclassOfClass​(org.moe.natj.objc.Class aClass)
      • keyPathsForValuesAffectingValueForKey

        @NotNull
        public static @NotNull NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey​(@NotNull
                                                                                             @NotNull java.lang.String key)
      • resolveClassMethod

        public static boolean resolveClassMethod​(org.moe.natj.objc.SEL sel)
      • resolveInstanceMethod

        public static boolean resolveInstanceMethod​(org.moe.natj.objc.SEL sel)
      • setVersion_static

        public static void setVersion_static​(long aVersion)
      • superclass_static

        public static org.moe.natj.objc.Class superclass_static()
      • version_static

        public static long version_static()
      • writeToURLError

        public boolean writeToURLError​(@NotNull
                                       @NotNull NSURL destinationURL,
                                       @Nullable
                                       @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
        Write this Catalog to a URL A Catalog can safely be shared among devices [@note] If the `destinationURL` is a directory, a file named Signatures.shazamcatalog will be created
        Parameters:
        destinationURL - The location to write to
        error - populated on error, otherwise nil
        Returns:
        YES on success, NO on failure with a populated error parameter
      • useStoredAccessor

        @Deprecated
        public static boolean useStoredAccessor()
        Deprecated.