//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use crate::common::*;
use crate::AppKit::*;
use crate::Foundation::*;
use crate::MediaPlayer::*;

ns_enum!(
    #[underlying(NSInteger)]
    pub enum MPRemoteCommandHandlerStatus {
        MPRemoteCommandHandlerStatusSuccess = 0,
        MPRemoteCommandHandlerStatusNoSuchContent = 100,
        MPRemoteCommandHandlerStatusNoActionableNowPlayingItem = 110,
        MPRemoteCommandHandlerStatusDeviceNotFound = 120,
        MPRemoteCommandHandlerStatusCommandFailed = 200,
    }
);

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "MediaPlayer_MPRemoteCommand")]
    pub struct MPRemoteCommand;

    #[cfg(feature = "MediaPlayer_MPRemoteCommand")]
    unsafe impl ClassType for MPRemoteCommand {
        type Super = NSObject;
        type Mutability = InteriorMutable;
    }
);

#[cfg(feature = "MediaPlayer_MPRemoteCommand")]
unsafe impl NSObjectProtocol for MPRemoteCommand {}

extern_methods!(
    #[cfg(feature = "MediaPlayer_MPRemoteCommand")]
    unsafe impl MPRemoteCommand {
        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new() -> Id<Self>;

        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Option<Allocated<Self>>) -> Id<Self>;

        #[method(isEnabled)]
        pub unsafe fn isEnabled(&self) -> bool;

        #[method(setEnabled:)]
        pub unsafe fn setEnabled(&self, enabled: bool);

        #[method(addTarget:action:)]
        pub unsafe fn addTarget_action(&self, target: &AnyObject, action: Sel);

        #[method(removeTarget:action:)]
        pub unsafe fn removeTarget_action(&self, target: &AnyObject, action: Option<Sel>);

        #[method(removeTarget:)]
        pub unsafe fn removeTarget(&self, target: Option<&AnyObject>);

        #[cfg(feature = "MediaPlayer_MPRemoteCommandEvent")]
        #[method_id(@__retain_semantics Other addTargetWithHandler:)]
        pub unsafe fn addTargetWithHandler(
            &self,
            handler: &Block<(NonNull<MPRemoteCommandEvent>,), MPRemoteCommandHandlerStatus>,
        ) -> Id<AnyObject>;
    }
);

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "MediaPlayer_MPSkipIntervalCommand")]
    pub struct MPSkipIntervalCommand;

    #[cfg(feature = "MediaPlayer_MPSkipIntervalCommand")]
    unsafe impl ClassType for MPSkipIntervalCommand {
        #[inherits(NSObject)]
        type Super = MPRemoteCommand;
        type Mutability = InteriorMutable;
    }
);

#[cfg(feature = "MediaPlayer_MPSkipIntervalCommand")]
unsafe impl NSObjectProtocol for MPSkipIntervalCommand {}

extern_methods!(
    #[cfg(feature = "MediaPlayer_MPSkipIntervalCommand")]
    unsafe impl MPSkipIntervalCommand {
        #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSNumber"))]
        #[method_id(@__retain_semantics Other preferredIntervals)]
        pub unsafe fn preferredIntervals(&self) -> Id<NSArray<NSNumber>>;

        #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSNumber"))]
        #[method(setPreferredIntervals:)]
        pub unsafe fn setPreferredIntervals(&self, preferred_intervals: &NSArray<NSNumber>);
    }
);

extern_methods!(
    /// Methods declared on superclass `MPRemoteCommand`
    #[cfg(feature = "MediaPlayer_MPSkipIntervalCommand")]
    unsafe impl MPSkipIntervalCommand {
        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new() -> Id<Self>;

        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Option<Allocated<Self>>) -> Id<Self>;
    }
);

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "MediaPlayer_MPFeedbackCommand")]
    pub struct MPFeedbackCommand;

    #[cfg(feature = "MediaPlayer_MPFeedbackCommand")]
    unsafe impl ClassType for MPFeedbackCommand {
        #[inherits(NSObject)]
        type Super = MPRemoteCommand;
        type Mutability = InteriorMutable;
    }
);

#[cfg(feature = "MediaPlayer_MPFeedbackCommand")]
unsafe impl NSObjectProtocol for MPFeedbackCommand {}

extern_methods!(
    #[cfg(feature = "MediaPlayer_MPFeedbackCommand")]
    unsafe impl MPFeedbackCommand {
        #[method(isActive)]
        pub unsafe fn isActive(&self) -> bool;

        #[method(setActive:)]
        pub unsafe fn setActive(&self, active: bool);

        #[cfg(feature = "Foundation_NSString")]
        #[method_id(@__retain_semantics Other localizedTitle)]
        pub unsafe fn localizedTitle(&self) -> Id<NSString>;

        #[cfg(feature = "Foundation_NSString")]
        #[method(setLocalizedTitle:)]
        pub unsafe fn setLocalizedTitle(&self, localized_title: &NSString);

        #[cfg(feature = "Foundation_NSString")]
        #[method_id(@__retain_semantics Other localizedShortTitle)]
        pub unsafe fn localizedShortTitle(&self) -> Id<NSString>;

        #[cfg(feature = "Foundation_NSString")]
        #[method(setLocalizedShortTitle:)]
        pub unsafe fn setLocalizedShortTitle(&self, localized_short_title: &NSString);
    }
);

extern_methods!(
    /// Methods declared on superclass `MPRemoteCommand`
    #[cfg(feature = "MediaPlayer_MPFeedbackCommand")]
    unsafe impl MPFeedbackCommand {
        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new() -> Id<Self>;

        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Option<Allocated<Self>>) -> Id<Self>;
    }
);

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "MediaPlayer_MPRatingCommand")]
    pub struct MPRatingCommand;

    #[cfg(feature = "MediaPlayer_MPRatingCommand")]
    unsafe impl ClassType for MPRatingCommand {
        #[inherits(NSObject)]
        type Super = MPRemoteCommand;
        type Mutability = InteriorMutable;
    }
);

#[cfg(feature = "MediaPlayer_MPRatingCommand")]
unsafe impl NSObjectProtocol for MPRatingCommand {}

extern_methods!(
    #[cfg(feature = "MediaPlayer_MPRatingCommand")]
    unsafe impl MPRatingCommand {
        #[method(minimumRating)]
        pub unsafe fn minimumRating(&self) -> c_float;

        #[method(setMinimumRating:)]
        pub unsafe fn setMinimumRating(&self, minimum_rating: c_float);

        #[method(maximumRating)]
        pub unsafe fn maximumRating(&self) -> c_float;

        #[method(setMaximumRating:)]
        pub unsafe fn setMaximumRating(&self, maximum_rating: c_float);
    }
);

extern_methods!(
    /// Methods declared on superclass `MPRemoteCommand`
    #[cfg(feature = "MediaPlayer_MPRatingCommand")]
    unsafe impl MPRatingCommand {
        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new() -> Id<Self>;

        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Option<Allocated<Self>>) -> Id<Self>;
    }
);

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "MediaPlayer_MPChangePlaybackRateCommand")]
    pub struct MPChangePlaybackRateCommand;

    #[cfg(feature = "MediaPlayer_MPChangePlaybackRateCommand")]
    unsafe impl ClassType for MPChangePlaybackRateCommand {
        #[inherits(NSObject)]
        type Super = MPRemoteCommand;
        type Mutability = InteriorMutable;
    }
);

#[cfg(feature = "MediaPlayer_MPChangePlaybackRateCommand")]
unsafe impl NSObjectProtocol for MPChangePlaybackRateCommand {}

extern_methods!(
    #[cfg(feature = "MediaPlayer_MPChangePlaybackRateCommand")]
    unsafe impl MPChangePlaybackRateCommand {
        #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSNumber"))]
        #[method_id(@__retain_semantics Other supportedPlaybackRates)]
        pub unsafe fn supportedPlaybackRates(&self) -> Id<NSArray<NSNumber>>;

        #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSNumber"))]
        #[method(setSupportedPlaybackRates:)]
        pub unsafe fn setSupportedPlaybackRates(
            &self,
            supported_playback_rates: &NSArray<NSNumber>,
        );
    }
);

extern_methods!(
    /// Methods declared on superclass `MPRemoteCommand`
    #[cfg(feature = "MediaPlayer_MPChangePlaybackRateCommand")]
    unsafe impl MPChangePlaybackRateCommand {
        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new() -> Id<Self>;

        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Option<Allocated<Self>>) -> Id<Self>;
    }
);

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "MediaPlayer_MPChangePlaybackPositionCommand")]
    pub struct MPChangePlaybackPositionCommand;

    #[cfg(feature = "MediaPlayer_MPChangePlaybackPositionCommand")]
    unsafe impl ClassType for MPChangePlaybackPositionCommand {
        #[inherits(NSObject)]
        type Super = MPRemoteCommand;
        type Mutability = InteriorMutable;
    }
);

#[cfg(feature = "MediaPlayer_MPChangePlaybackPositionCommand")]
unsafe impl NSObjectProtocol for MPChangePlaybackPositionCommand {}

extern_methods!(
    #[cfg(feature = "MediaPlayer_MPChangePlaybackPositionCommand")]
    unsafe impl MPChangePlaybackPositionCommand {}
);

extern_methods!(
    /// Methods declared on superclass `MPRemoteCommand`
    #[cfg(feature = "MediaPlayer_MPChangePlaybackPositionCommand")]
    unsafe impl MPChangePlaybackPositionCommand {
        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new() -> Id<Self>;

        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Option<Allocated<Self>>) -> Id<Self>;
    }
);

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "MediaPlayer_MPChangeShuffleModeCommand")]
    pub struct MPChangeShuffleModeCommand;

    #[cfg(feature = "MediaPlayer_MPChangeShuffleModeCommand")]
    unsafe impl ClassType for MPChangeShuffleModeCommand {
        #[inherits(NSObject)]
        type Super = MPRemoteCommand;
        type Mutability = InteriorMutable;
    }
);

#[cfg(feature = "MediaPlayer_MPChangeShuffleModeCommand")]
unsafe impl NSObjectProtocol for MPChangeShuffleModeCommand {}

extern_methods!(
    #[cfg(feature = "MediaPlayer_MPChangeShuffleModeCommand")]
    unsafe impl MPChangeShuffleModeCommand {
        #[method(currentShuffleType)]
        pub unsafe fn currentShuffleType(&self) -> MPShuffleType;

        #[method(setCurrentShuffleType:)]
        pub unsafe fn setCurrentShuffleType(&self, current_shuffle_type: MPShuffleType);
    }
);

extern_methods!(
    /// Methods declared on superclass `MPRemoteCommand`
    #[cfg(feature = "MediaPlayer_MPChangeShuffleModeCommand")]
    unsafe impl MPChangeShuffleModeCommand {
        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new() -> Id<Self>;

        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Option<Allocated<Self>>) -> Id<Self>;
    }
);

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "MediaPlayer_MPChangeRepeatModeCommand")]
    pub struct MPChangeRepeatModeCommand;

    #[cfg(feature = "MediaPlayer_MPChangeRepeatModeCommand")]
    unsafe impl ClassType for MPChangeRepeatModeCommand {
        #[inherits(NSObject)]
        type Super = MPRemoteCommand;
        type Mutability = InteriorMutable;
    }
);

#[cfg(feature = "MediaPlayer_MPChangeRepeatModeCommand")]
unsafe impl NSObjectProtocol for MPChangeRepeatModeCommand {}

extern_methods!(
    #[cfg(feature = "MediaPlayer_MPChangeRepeatModeCommand")]
    unsafe impl MPChangeRepeatModeCommand {
        #[method(currentRepeatType)]
        pub unsafe fn currentRepeatType(&self) -> MPRepeatType;

        #[method(setCurrentRepeatType:)]
        pub unsafe fn setCurrentRepeatType(&self, current_repeat_type: MPRepeatType);
    }
);

extern_methods!(
    /// Methods declared on superclass `MPRemoteCommand`
    #[cfg(feature = "MediaPlayer_MPChangeRepeatModeCommand")]
    unsafe impl MPChangeRepeatModeCommand {
        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new() -> Id<Self>;

        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Option<Allocated<Self>>) -> Id<Self>;
    }
);
