objc2-intents 0.3.2

Bindings to the Intents framework
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/intents/inmediasearch?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct INMediaSearch;
);

extern_conformance!(
    unsafe impl NSCoding for INMediaSearch {}
);

extern_conformance!(
    unsafe impl NSCopying for INMediaSearch {}
);

unsafe impl CopyingHelper for INMediaSearch {
    type Result = Self;
}

extern_conformance!(
    unsafe impl NSObjectProtocol for INMediaSearch {}
);

extern_conformance!(
    unsafe impl NSSecureCoding for INMediaSearch {}
);

impl INMediaSearch {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[cfg(all(
            feature = "INDateComponentsRange",
            feature = "INMediaItemType",
            feature = "INMediaReference",
            feature = "INMediaSortOrder"
        ))]
        #[unsafe(method(initWithMediaType:sortOrder:mediaName:artistName:albumName:genreNames:moodNames:releaseDate:reference:mediaIdentifier:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithMediaType_sortOrder_mediaName_artistName_albumName_genreNames_moodNames_releaseDate_reference_mediaIdentifier(
            this: Allocated<Self>,
            media_type: INMediaItemType,
            sort_order: INMediaSortOrder,
            media_name: Option<&NSString>,
            artist_name: Option<&NSString>,
            album_name: Option<&NSString>,
            genre_names: Option<&NSArray<NSString>>,
            mood_names: Option<&NSArray<NSString>>,
            release_date: Option<&INDateComponentsRange>,
            reference: INMediaReference,
            media_identifier: Option<&NSString>,
        ) -> Retained<Self>;

        #[cfg(feature = "INMediaItemType")]
        #[unsafe(method(mediaType))]
        #[unsafe(method_family = none)]
        pub unsafe fn mediaType(&self) -> INMediaItemType;

        #[cfg(feature = "INMediaSortOrder")]
        #[unsafe(method(sortOrder))]
        #[unsafe(method_family = none)]
        pub unsafe fn sortOrder(&self) -> INMediaSortOrder;

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

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

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

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

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

        #[cfg(feature = "INDateComponentsRange")]
        #[unsafe(method(releaseDate))]
        #[unsafe(method_family = none)]
        pub unsafe fn releaseDate(&self) -> Option<Retained<INDateComponentsRange>>;

        #[cfg(feature = "INMediaReference")]
        #[unsafe(method(reference))]
        #[unsafe(method_family = none)]
        pub unsafe fn reference(&self) -> INMediaReference;

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

/// Methods declared on superclass `NSObject`.
impl INMediaSearch {
    extern_methods!(
        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;
    );
}