objc2-core-spotlight 0.3.2

Bindings to the CoreSpotlight framework
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
#[cfg(feature = "objc2-uniform-type-identifiers")]
use objc2_uniform_type_identifiers::*;

use crate::*;

/// CSGeneral.
#[cfg(feature = "CSSearchableItemAttributeSet")]
impl CSSearchableItemAttributeSet {
    extern_methods!(
        #[unsafe(method(displayName))]
        #[unsafe(method_family = none)]
        pub unsafe fn displayName(&self) -> Option<Retained<NSString>>;

        /// Setter for [`displayName`][Self::displayName].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setDisplayName:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setDisplayName(&self, display_name: Option<&NSString>);

        #[unsafe(method(alternateNames))]
        #[unsafe(method_family = none)]
        pub unsafe fn alternateNames(&self) -> Option<Retained<NSArray<NSString>>>;

        /// Setter for [`alternateNames`][Self::alternateNames].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setAlternateNames:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setAlternateNames(&self, alternate_names: Option<&NSArray<NSString>>);

        #[unsafe(method(path))]
        #[unsafe(method_family = none)]
        pub unsafe fn path(&self) -> Option<Retained<NSString>>;

        /// Setter for [`path`][Self::path].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setPath:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setPath(&self, path: Option<&NSString>);

        #[unsafe(method(contentURL))]
        #[unsafe(method_family = none)]
        pub unsafe fn contentURL(&self) -> Option<Retained<NSURL>>;

        /// Setter for [`contentURL`][Self::contentURL].
        #[unsafe(method(setContentURL:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setContentURL(&self, content_url: Option<&NSURL>);

        #[unsafe(method(thumbnailURL))]
        #[unsafe(method_family = none)]
        pub unsafe fn thumbnailURL(&self) -> Option<Retained<NSURL>>;

        /// Setter for [`thumbnailURL`][Self::thumbnailURL].
        #[unsafe(method(setThumbnailURL:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setThumbnailURL(&self, thumbnail_url: Option<&NSURL>);

        #[unsafe(method(thumbnailData))]
        #[unsafe(method_family = none)]
        pub unsafe fn thumbnailData(&self) -> Option<Retained<NSData>>;

        /// Setter for [`thumbnailData`][Self::thumbnailData].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setThumbnailData:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setThumbnailData(&self, thumbnail_data: Option<&NSData>);

        #[unsafe(method(darkThumbnailURL))]
        #[unsafe(method_family = none)]
        pub unsafe fn darkThumbnailURL(&self) -> Option<Retained<NSURL>>;

        /// Setter for [`darkThumbnailURL`][Self::darkThumbnailURL].
        #[unsafe(method(setDarkThumbnailURL:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setDarkThumbnailURL(&self, dark_thumbnail_url: Option<&NSURL>);

        #[unsafe(method(relatedUniqueIdentifier))]
        #[unsafe(method_family = none)]
        pub unsafe fn relatedUniqueIdentifier(&self) -> Option<Retained<NSString>>;

        /// Setter for [`relatedUniqueIdentifier`][Self::relatedUniqueIdentifier].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setRelatedUniqueIdentifier:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setRelatedUniqueIdentifier(
            &self,
            related_unique_identifier: Option<&NSString>,
        );

        #[unsafe(method(weakRelatedUniqueIdentifier))]
        #[unsafe(method_family = none)]
        pub unsafe fn weakRelatedUniqueIdentifier(&self) -> Option<Retained<NSString>>;

        /// Setter for [`weakRelatedUniqueIdentifier`][Self::weakRelatedUniqueIdentifier].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setWeakRelatedUniqueIdentifier:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setWeakRelatedUniqueIdentifier(
            &self,
            weak_related_unique_identifier: Option<&NSString>,
        );

        #[unsafe(method(metadataModificationDate))]
        #[unsafe(method_family = none)]
        pub unsafe fn metadataModificationDate(&self) -> Option<Retained<NSDate>>;

        /// Setter for [`metadataModificationDate`][Self::metadataModificationDate].
        #[unsafe(method(setMetadataModificationDate:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setMetadataModificationDate(
            &self,
            metadata_modification_date: Option<&NSDate>,
        );

        #[unsafe(method(contentType))]
        #[unsafe(method_family = none)]
        pub unsafe fn contentType(&self) -> Option<Retained<NSString>>;

        /// Setter for [`contentType`][Self::contentType].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setContentType:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setContentType(&self, content_type: Option<&NSString>);

        #[unsafe(method(contentTypeTree))]
        #[unsafe(method_family = none)]
        pub unsafe fn contentTypeTree(&self) -> Option<Retained<NSArray<NSString>>>;

        /// Setter for [`contentTypeTree`][Self::contentTypeTree].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setContentTypeTree:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setContentTypeTree(&self, content_type_tree: Option<&NSArray<NSString>>);

        #[unsafe(method(keywords))]
        #[unsafe(method_family = none)]
        pub unsafe fn keywords(&self) -> Option<Retained<NSArray<NSString>>>;

        /// Setter for [`keywords`][Self::keywords].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setKeywords:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setKeywords(&self, keywords: Option<&NSArray<NSString>>);

        #[unsafe(method(title))]
        #[unsafe(method_family = none)]
        pub unsafe fn title(&self) -> Option<Retained<NSString>>;

        /// Setter for [`title`][Self::title].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setTitle:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setTitle(&self, title: Option<&NSString>);

        #[unsafe(method(version))]
        #[unsafe(method_family = none)]
        pub unsafe fn version(&self) -> Option<Retained<NSString>>;

        /// Setter for [`version`][Self::version].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setVersion:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setVersion(&self, version: Option<&NSString>);

        #[unsafe(method(isUserCreated))]
        #[unsafe(method_family = none)]
        pub unsafe fn isUserCreated(&self) -> Option<Retained<NSNumber>>;

        /// Setter for [`isUserCreated`][Self::isUserCreated].
        #[unsafe(method(setUserCreated:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setUserCreated(&self, user_created: Option<&NSNumber>);

        #[unsafe(method(isUserOwned))]
        #[unsafe(method_family = none)]
        pub unsafe fn isUserOwned(&self) -> Option<Retained<NSNumber>>;

        /// Setter for [`isUserOwned`][Self::isUserOwned].
        #[unsafe(method(setUserOwned:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setUserOwned(&self, user_owned: Option<&NSNumber>);

        #[unsafe(method(isUserCurated))]
        #[unsafe(method_family = none)]
        pub unsafe fn isUserCurated(&self) -> Option<Retained<NSNumber>>;

        /// Setter for [`isUserCurated`][Self::isUserCurated].
        #[unsafe(method(setUserCurated:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setUserCurated(&self, user_curated: Option<&NSNumber>);

        #[unsafe(method(rankingHint))]
        #[unsafe(method_family = none)]
        pub unsafe fn rankingHint(&self) -> Option<Retained<NSNumber>>;

        /// Setter for [`rankingHint`][Self::rankingHint].
        #[unsafe(method(setRankingHint:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setRankingHint(&self, ranking_hint: Option<&NSNumber>);

        #[unsafe(method(domainIdentifier))]
        #[unsafe(method_family = none)]
        pub unsafe fn domainIdentifier(&self) -> Option<Retained<NSString>>;

        /// Setter for [`domainIdentifier`][Self::domainIdentifier].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setDomainIdentifier:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setDomainIdentifier(&self, domain_identifier: Option<&NSString>);
    );
}

/// CSActionExtras.
#[cfg(feature = "CSSearchableItemAttributeSet")]
impl CSSearchableItemAttributeSet {
    extern_methods!(
        #[unsafe(method(supportsPhoneCall))]
        #[unsafe(method_family = none)]
        pub unsafe fn supportsPhoneCall(&self) -> Option<Retained<NSNumber>>;

        /// Setter for [`supportsPhoneCall`][Self::supportsPhoneCall].
        #[unsafe(method(setSupportsPhoneCall:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setSupportsPhoneCall(&self, supports_phone_call: Option<&NSNumber>);

        #[unsafe(method(supportsNavigation))]
        #[unsafe(method_family = none)]
        pub unsafe fn supportsNavigation(&self) -> Option<Retained<NSNumber>>;

        /// Setter for [`supportsNavigation`][Self::supportsNavigation].
        #[unsafe(method(setSupportsNavigation:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setSupportsNavigation(&self, supports_navigation: Option<&NSNumber>);

        #[unsafe(method(actionIdentifiers))]
        #[unsafe(method_family = none)]
        pub unsafe fn actionIdentifiers(&self) -> Retained<NSArray<NSString>>;

        /// Setter for [`actionIdentifiers`][Self::actionIdentifiers].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setActionIdentifiers:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setActionIdentifiers(&self, action_identifiers: &NSArray<NSString>);

        #[cfg(feature = "objc2-uniform-type-identifiers")]
        #[unsafe(method(sharedItemContentType))]
        #[unsafe(method_family = none)]
        pub unsafe fn sharedItemContentType(&self) -> Option<Retained<UTType>>;

        #[cfg(feature = "objc2-uniform-type-identifiers")]
        /// Setter for [`sharedItemContentType`][Self::sharedItemContentType].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setSharedItemContentType:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setSharedItemContentType(&self, shared_item_content_type: Option<&UTType>);
    );
}

/// CSContainment.
#[cfg(feature = "CSSearchableItemAttributeSet")]
impl CSSearchableItemAttributeSet {
    extern_methods!(
        #[unsafe(method(containerTitle))]
        #[unsafe(method_family = none)]
        pub unsafe fn containerTitle(&self) -> Option<Retained<NSString>>;

        /// Setter for [`containerTitle`][Self::containerTitle].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setContainerTitle:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setContainerTitle(&self, container_title: Option<&NSString>);

        #[unsafe(method(containerDisplayName))]
        #[unsafe(method_family = none)]
        pub unsafe fn containerDisplayName(&self) -> Option<Retained<NSString>>;

        /// Setter for [`containerDisplayName`][Self::containerDisplayName].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setContainerDisplayName:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setContainerDisplayName(&self, container_display_name: Option<&NSString>);

        #[unsafe(method(containerIdentifier))]
        #[unsafe(method_family = none)]
        pub unsafe fn containerIdentifier(&self) -> Option<Retained<NSString>>;

        /// Setter for [`containerIdentifier`][Self::containerIdentifier].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setContainerIdentifier:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setContainerIdentifier(&self, container_identifier: Option<&NSString>);

        #[unsafe(method(containerOrder))]
        #[unsafe(method_family = none)]
        pub unsafe fn containerOrder(&self) -> Option<Retained<NSNumber>>;

        /// Setter for [`containerOrder`][Self::containerOrder].
        #[unsafe(method(setContainerOrder:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setContainerOrder(&self, container_order: Option<&NSNumber>);
    );
}

/// CSItemProvider.
#[cfg(feature = "CSSearchableItemAttributeSet")]
impl CSSearchableItemAttributeSet {
    extern_methods!(
        #[unsafe(method(providerDataTypeIdentifiers))]
        #[unsafe(method_family = none)]
        pub unsafe fn providerDataTypeIdentifiers(&self) -> Option<Retained<NSArray<NSString>>>;

        /// Setter for [`providerDataTypeIdentifiers`][Self::providerDataTypeIdentifiers].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setProviderDataTypeIdentifiers:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setProviderDataTypeIdentifiers(
            &self,
            provider_data_type_identifiers: Option<&NSArray<NSString>>,
        );

        #[unsafe(method(providerFileTypeIdentifiers))]
        #[unsafe(method_family = none)]
        pub unsafe fn providerFileTypeIdentifiers(&self) -> Option<Retained<NSArray<NSString>>>;

        /// Setter for [`providerFileTypeIdentifiers`][Self::providerFileTypeIdentifiers].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setProviderFileTypeIdentifiers:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setProviderFileTypeIdentifiers(
            &self,
            provider_file_type_identifiers: Option<&NSArray<NSString>>,
        );

        #[unsafe(method(providerInPlaceFileTypeIdentifiers))]
        #[unsafe(method_family = none)]
        pub unsafe fn providerInPlaceFileTypeIdentifiers(
            &self,
        ) -> Option<Retained<NSArray<NSString>>>;

        /// Setter for [`providerInPlaceFileTypeIdentifiers`][Self::providerInPlaceFileTypeIdentifiers].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setProviderInPlaceFileTypeIdentifiers:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setProviderInPlaceFileTypeIdentifiers(
            &self,
            provider_in_place_file_type_identifiers: Option<&NSArray<NSString>>,
        );
    );
}