//
// © 2018-2020 Qualcomm Technologies, Inc. and/or its subsidiaries. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "IoTTypes.h"

NS_ASSUME_NONNULL_BEGIN

@class IoTDeviceController;
@class IoTMediaItem;
@class IoTDevice;

typedef NS_ENUM(NSInteger, IoTInputOutputSelectorType) {
    IoTInputOutputSelectorTypeNone,
    IoTInputOutputSelectorTypeHdmiIn,
    IoTInputOutputSelectorTypeSpdifIn,
    IoTInputOutputSelectorTypeLineIn,
    IoTInputOutputSelectorTypeBluetooth,
    IoTInputOutputSelectorTypeSpeaker
};

/**
 @brief Representation of an input source or output sink.
 */
@interface IoTInputOutputSelector : NSObject

/**
 @brief The human readable name of the sink/source.
 */
@property (nonatomic, readonly) NSString *name;

/**
 @brief Unique identifier for the sink/source.
 */
@property (nonatomic, readonly) NSString *identifier;

/**
 @brief Type for the sink/source.
 */
@property (nonatomic, readonly) IoTInputOutputSelectorType type;

@end

#pragma mark -

/**
 @brief Representation of an equalizer band.
 */
@interface IoTEqualizerBand : NSObject

/**
 @brief level for the band. Range from 0 to 1.0.
 */
@property (nonatomic, assign) double bandLevel;

/**
 @brief frequency for the band.
 */
@property (nonatomic, readonly) double centerFrequency;

@end

/**
@brief Representation of a device handling a multichannel channel.
*/
@interface IoTMultichannelChannelDevice : NSObject

@property (nonatomic, readonly) BOOL connected;
@property (nonatomic, readonly) BOOL removable;
@property (nonatomic, readonly, nonnull) NSString * playerID;
@property (nonatomic, readonly, nonnull) NSString * displayName;
@property (nonatomic, readonly) double volume;
@property (nonatomic, readonly) BOOL muted;

@end

#pragma mark -

/**
 @brief Representation of an AllPlay service instance running on a device.
 @discussion An AllPlay service exposes much functionality which is not replicated in the public interface of IoTPlayer. This functionality is instead exposed on IoTPlaylist and IoTPlayerGroup. There is no public initializer for IoTPlayer.
 */
@interface IoTPlayer : NSObject

/**
 @discussion There is no public initializer for IoTPlayer
 */
- (instancetype)init NS_UNAVAILABLE;


/**
 @brief Human readable name for the player.
 @discussion This value is read only on IoTPlayer and has no setter. The name can however be set using the corresponding IoTDevice instance.
 */
@property (nonatomic, readonly) NSString *displayName;

/**
 @brief Unique ID for the player.
 */
@property (nonatomic, readonly) NSString *playerID;

/**
 @brief Denotes whether a player is groupable. Currently always YES.
 */
@property (nonatomic, readonly) BOOL groupingSupported;

/**
 @brief Denotes whether a player is interruptible. Depends on source.
 */
@property (nonatomic, readonly) BOOL isInterruptible;

#pragma mark Volume Management

/**
 @brief Denotes whether a player allows modification of volume.
 */
@property (nonatomic, readonly) BOOL isVolumeEnabled;

/**
 @brief The minimum allowable volume that can be set.
 */
@property (nonatomic, readonly) double minVolume;

/**
 @brief The maximum allowable volume that can be set.
 */
@property (nonatomic, readonly) double maxVolume;

/**
 @brief The current volume for this player.
 */
@property (nonatomic, readonly) double volume;

/**
 @brief The currently mute state of the player.
 */
@property (nonatomic, readonly) BOOL isMuted;

/**
 @brief Asynchronously dispatch request to set the volume of the speaker.
 @discussion The completion block notes the request as successful if the POST succeeds. It does not ensure that the request was effected.
 @param volume the requested volume. Usually a value between zero and one.
 @param completion block to be called asynchronously upon completion (successful or otherwise).
 @param queue the dispatch queue to use when calling the completion block.
 */
- (void)setVolume:(double)volume
       completion:(nullable IoTCompletionHandler)completion
  completionQueue:(nullable dispatch_queue_t)queue;

/**
 @brief Asynchronously dispatch request to set mute state of the speaker.
 @discussion The completion block notes the request as successful if the POST succeeds. It does not ensure that the request was effected.
 @param mute the new desired mute state.
 @param completion block to be called asynchronously upon completion (successful or otherwise).
 @param queue the dispatch queue to use when calling the completion block.
 */
- (void)setMuted:(BOOL)mute
      completion:(nullable IoTCompletionHandler)completion
 completionQueue:(nullable dispatch_queue_t)queue;

#pragma mark Input Sources/Output Sinks

/**
 @brief Denotes whether a player supports input selector API.
 */
@property (nonatomic, readonly) BOOL isInputSelectorModeSupported;

/**
 @brief Denotes whether a player supports output selector API.
 */
@property (nonatomic, readonly) BOOL isOutputSelectorModeSupported;

/**
 @brief The available input sources on this player.
 */
@property (nonatomic, readonly) NSArray<IoTInputOutputSelector *>*inputSelectors;

/**
 @brief The currently active input source on this player.
 */
@property (nonatomic, readonly) IoTInputOutputSelector *activeInputSelector;

/**
 @brief The available output sinks on this player.
 */
@property (nonatomic, readonly) NSArray<IoTInputOutputSelector *>*outputSelectors;

/**
 @brief The currently active output sinks on this player.
 */
@property (nonatomic, readonly) NSArray<IoTInputOutputSelector *>*activeOutputSelectors;

/**
 @brief Asynchronously dispatch request to set the current input source(selector).
 @discussion The completion block notes the request as successful if the POST succeeds. It does not ensure that the request was effected.
 @param input the requested selector to be made current.
 @param completion block to be called asynchronously upon completion (successful or otherwise).
 @param queue the dispatch queue to use when calling the completion block.
 */
- (void)setInputSelector:(IoTInputOutputSelector *)input
              completion:(nullable IoTCompletionHandler)completion
         completionQueue:(nullable dispatch_queue_t)queue;

/**
 @brief Asynchronously dispatch request to set the current output sink(selector).
 @discussion The completion block notes the request as successful if the POST succeeds. It does not ensure that the request was effected.
 @param outputs an array of the output sinks(selectors) to be made current.
 @param completion block to be called asynchronously upon completion (successful or otherwise).
 @param queue the dispatch queue to use when calling the completion block.
 */
- (void)setOutputSelectors:(NSArray<IoTInputOutputSelector *> *)outputs
                completion:(nullable IoTCompletionHandler)completion
           completionQueue:(nullable dispatch_queue_t)queue;

#pragma mark Home Theater/Multichannel

/**
 @brief Is the speaker a soundbar (can it form a surround sound setup).
 */
@property (nonatomic, readonly) BOOL isSoundBar;

/**
 @brief Is the speaker a satellite speaker (can it be added to a surround sound system).
 */
@property (nonatomic, readonly) BOOL isSatellite;

/**
 @brief Can the speaker either form or take part in a surround sound system.
 */
@property (nonatomic, readonly) BOOL homeTheaterSupported;

/**
 @brief If a soundbar, has the given channel been added?
 */
- (BOOL)haveHomeTheaterChannel:(IoTHomeTheaterChannel)channel;

/**
 @brief If a soundbar, has the given channel been added and is it available (present)
 */
- (BOOL)isHomeTheaterChannelAvailable:(IoTHomeTheaterChannel)channel;

/**
 @brief If a soundbar, has the given channel been added and is it available (present) and is removable
 */
- (BOOL)haveRemovableHomeTheaterChannel:(IoTHomeTheaterChannel)channel;

/**
 @brief The player IDs for all speakers involved in the MLAN.
 */
- (NSArray<NSString *> *)allHomeTheaterPlayerIDs;

/**
 @brief The device descriptions for the speakers that are acting as this channel.
 */
- (NSArray<IoTMultichannelChannelDevice *> *)homeTheaterChannelDevices:(IoTHomeTheaterChannel)channel;

/**
 @brief Asynchronously dispatch request to set the volume ratio of the given channel.
 @discussion The completion block notes the request as successful if the POST succeeds. It does not ensure that the request was effected.
 @param channel The channel to be effected. Note that all other channels on the same device will also be altered.
 @param playerID the device handling the channel to change the volume of.
 @param volume the new desired volume for the channel.
 @param completion block to be called asynchronously upon completion (successful or otherwise).
 @param queue the dispatch queue to use when calling the completion block.
 */
- (void)setHomeTheaterChannel:(IoTHomeTheaterChannel)channel
                     playerID:(NSString *)playerId
                       volume:(double)volume
                   completion:(nullable IoTCompletionHandler)completion
              completionQueue:(nullable dispatch_queue_t)queue;

/**
 @brief Asynchronously dispatch request to add a given device as handling the provided surround sound channels.
 @discussion The completion block notes the request as successful if the POST succeeds. It does not ensure that the request was effected.
 @param channels The channels to be added. An array of NSNumbers representing IoTHomeTheaterChannels.
 @param player The IoTPlayer representation of the speaker.
 @param completion block to be called asynchronously upon completion (successful or otherwise).
 @param queue the dispatch queue to use when calling the completion block.
 */
- (void)addHomeTheaterChannels:(NSArray<NSNumber *> *)channels
                        player:(IoTPlayer *)player
                    completion:(nullable IoTCompletionHandler)completion
               completionQueue:(nullable dispatch_queue_t)queue;

/**
 @brief Asynchronously dispatch request to remove the devices handling the given channels. Removing a device for one channel removes it for all the channels it handles.
 @discussion The completion block notes the request as successful if the POST succeeds. It does not ensure that the request was effected.
 @param channels The channels to be removed. An array of NSNumbers representing IoTHomeTheaterChannels.
 @param completion block to be called asynchronously upon completion (successful or otherwise).
 @param queue the dispatch queue to use when calling the completion block.
 */
- (void)removeHomeTheaterChannels:(NSArray<NSNumber *> *)channels
                       completion:(nullable IoTCompletionHandler)completion
                  completionQueue:(nullable dispatch_queue_t)queue;

@end

@interface IoTPlayer(AudioEffects)

#pragma mark Audio Config - Bassboost

/**
 @brief Denotes whether bassboost is supported on the speaker.
 */
@property (nonatomic, readonly) BOOL bassboostSupported;

/**
 @brief Denotes whether bassboost is enabled on the speaker.
 */
@property (nonatomic, readonly) BOOL bassboostEnabled;

/**
 @brief The current value of the bassboost setting on this player.
 */
@property (nonatomic, readonly) double bassBoost;

/**
 @brief Asynchronously dispatch request to enable/disable bassboost on the speaker.
 @discussion The completion block notes the request as successful if the POST succeeds. It does not ensure that the request was effected.
 @param bassboostEnabled the new desired enabled state.
 @param completion block to be called asynchronously upon completion (successful or otherwise).
 @param queue the dispatch queue to use when calling the completion block.
 */
- (void)setBassboostEnabled:(BOOL)bassboostEnabled
                 completion:(nullable IoTCompletionHandler)completion
            completionQueue:(nullable dispatch_queue_t)queue;

/**
 @brief Asynchronously dispatch request to set the level of bassboost on the speaker.
 @discussion The completion block notes the request as successful if the POST succeeds. It does not ensure that the request was effected.
 @param value new bassboost value between zero and one.
 @param completion block to be called asynchronously upon completion (successful or otherwise).
 @param queue the dispatch queue to use when calling the completion block.
 */
- (void)setBassboost:(double)value // Between 0->1
          completion:(nullable IoTCompletionHandler)completion
     completionQueue:(nullable dispatch_queue_t)queue;

#pragma mark Audio Config - Equalizer

/**
 @brief Denotes whether equalizer is supported on the speaker.
 */
@property (nonatomic, readonly) BOOL eqSupported;

/**
 @brief Denotes whether equalizer is enabled on the speaker.
 */
@property (nonatomic, readonly) BOOL eqEnabled;

/**
 @brief The currently selected equalizer preset for this player (if enabled).
 */
@property (nonatomic, readonly) NSString *currentEQPreset;

/**
 @brief The available equalizer presets for this player (if enabled).
 */
@property (nonatomic, readonly) NSArray<NSString *> *availableEQPresets;

/**
 @brief Array of available equalizer bands.
 */
@property (nonatomic, readonly) NSArray<IoTEqualizerBand *> *eqBands;

/**
 @brief Asynchronously dispatch request to enable/disable equalizer on the speaker.
 @discussion The completion block notes the request as successful if the POST succeeds. It does not ensure that the request was effected.
 @param eqEnabled the new desired enabled state.
 @param completion block to be called asynchronously upon completion (successful or otherwise).
 @param queue the dispatch queue to use when calling the completion block.
 */
- (void)setEQEnabled:(BOOL)eqEnabled
          completion:(nullable IoTCompletionHandler)completion
     completionQueue:(nullable dispatch_queue_t)queue;

/**
 @brief Asynchronously dispatch request to set the current equalizer preset on the speaker.
 @discussion The completion block notes the request as successful if the POST succeeds. It does not ensure that the request was effected.
 @param eqPreset the new desired preset.
 @param completion block to be called asynchronously upon completion (successful or otherwise).
 @param queue the dispatch queue to use when calling the completion block.
 */
- (void)setCurrentEQPreset:(NSString *)eqPreset
                completion:(nullable IoTCompletionHandler)completion
           completionQueue:(nullable dispatch_queue_t)queue;

/**
 @brief Asynchronously dispatch request to adjust the state equalizer bands on the speaker.
 @discussion The completion block notes the request as successful if the POST succeeds. It does not ensure that the request was effected.
 @param eqBands the new desired state of the eq bands.
 @param completion block to be called asynchronously upon completion (successful or otherwise).
 @param queue the dispatch queue to use when calling the completion block.
 */
- (void)setEQBands:(NSArray<IoTEqualizerBand *> *)eqBands
        completion:(nullable IoTCompletionHandler)completion
   completionQueue:(nullable dispatch_queue_t)queue;

#pragma mark Audio Config - Reverb

/**
 @brief Denotes whether reverb is supported on the speaker.
 */
@property (nonatomic, readonly) BOOL reverbSupported;

/**
 @brief Denotes whether reverb is enabled on the speaker.
 */
@property (nonatomic, readonly) BOOL reverbEnabled;

/**
 @brief The currently selected reverb preset for this player (if enabled).
 */
@property (nonatomic, readonly) NSString *currentReverbPreset;

/**
 @brief The available reverb presets for this player (if enabled).
 */
@property (nonatomic, readonly) NSArray<NSString *> *availableReverbPresets;

/**
 @brief Asynchronously dispatch request to enable/disable reverb on the speaker.
 @discussion The completion block notes the request as successful if the POST succeeds. It does not ensure that the request was effected.
 @param reverbEnabled the new desired enabled state.
 @param completion block to be called asynchronously upon completion (successful or otherwise).
 @param queue the dispatch queue to use when calling the completion block.
 */
- (void)setReverbEnabled:(BOOL)reverbEnabled
              completion:(nullable IoTCompletionHandler)completion
         completionQueue:(nullable dispatch_queue_t)queue;

/**
 @brief Asynchronously dispatch request to set the current reverb preset on the speaker.
 @discussion The completion block notes the request as successful if the POST succeeds. It does not ensure that the request was effected.
 @param reverbPreset the new desired preset.
 @param completion block to be called asynchronously upon completion (successful or otherwise).
 @param queue the dispatch queue to use when calling the completion block.
 */
- (void)setCurrentReverbPreset:(NSString *)reverbPreset
                    completion:(nullable IoTCompletionHandler)completion
               completionQueue:(nullable dispatch_queue_t)queue;

#pragma mark Audio Config - Dolby

/**
 @brief Denotes whether Dolby is supported on the speaker.
 */
@property (nonatomic, readonly) BOOL dolbySupported;

/**
 @brief Denotes whether Dolby is enabled on the speaker.
 */
@property (nonatomic, readonly) BOOL dolbyEnabled;

/**
 @brief The currently selected Dolby DAP mode.
 @discussion Currently the modes available are (0 Movie, 1 Music and 2 Night)
 */
@property (nonatomic, readonly) int currentDolbyMode;

/**
 @brief The maximum possible Dolby DAP mode.
 @discussion Currently returns 2.
 */
@property (nonatomic, readonly) int maxDolbyMode;

/**
 @brief Asynchronously dispatch request to enable/disable Dolby on the speaker.
 @discussion The completion block notes the request as successful if the POST succeeds. It does not ensure that the request was effected.
 @param dolbyEnabled the new desired enabled state.
 @param completion block to be called asynchronously upon completion (successful or otherwise).
 @param queue the dispatch queue to use when calling the completion block.
 */
- (void)setDolbyEnabled:(BOOL)dolbyEnabled
             completion:(nullable IoTCompletionHandler)completion
        completionQueue:(nullable dispatch_queue_t)queue;

/**
 @brief Asynchronously dispatch request to set the current Dolby mode on the speaker.
 @discussion The completion block notes the request as successful if the POST succeeds. It does not ensure that the request was effected.
 @param dolbyMode the new desired enabled state.
 @param completion block to be called asynchronously upon completion (successful or otherwise).
 @param queue the dispatch queue to use when calling the completion block.
 */
- (void)setCurrentDolbyMode:(int)dolbyMode
                 completion:(nullable IoTCompletionHandler)completion
            completionQueue:(nullable dispatch_queue_t)queue;

#pragma mark Audio Config - DTS Virtual X

/**
 @brief Denotes whether DTS VirtualX is supported on the speaker.
 */
@property (nonatomic, readonly) BOOL virtualXSupported;

/**
 @brief Denotes whether DTS VirtualX is enabled on the speaker.
 */
@property (nonatomic, readonly) BOOL virtualXEnabled;

/**
 @brief Denotes whether Dialog Clarity is enabled on the speaker.
 */
@property (nonatomic, readonly) BOOL isDialogClarityEnabled;

/**
 @brief The currently selected DTS VirtualX mode.
 @discussion Currently the modes available are (0(2.0), 1(2.1), 2(3.0), 3(3.1), 4(5.1))
 */
@property (nonatomic, readonly) int currentVirtualXOutputMode;

/**
 @brief The maximum possible DTS VirtualX mode.
 @discussion Currently returns 4.
 */
@property (nonatomic, readonly) int maxVirtualXOutputMode;

/**
 @brief Asynchronously dispatch request to enable/disable DTS VirtualX on the speaker.
 @discussion The completion block notes the request as successful if the POST succeeds. It does not ensure that the request was effected.
 @param virtualXEnabled the new desired enabled state.
 @param completion block to be called asynchronously upon completion (successful or otherwise).
 @param queue the dispatch queue to use when calling the completion block.
 */
- (void)setVirtualXEnabled:(BOOL)virtualXEnabled
                completion:(nullable IoTCompletionHandler)completion
           completionQueue:(nullable dispatch_queue_t)queue;

/**
 @brief Asynchronously dispatch request to enable/disable Dialog Clarity on the speaker.
 @discussion The completion block notes the request as successful if the POST succeeds. It does not ensure that the request was effected.
 @param enabled the new desired enabled state.
 @param completion block to be called asynchronously upon completion (successful or otherwise).
 @param queue the dispatch queue to use when calling the completion block.
 */
- (void)setDialogClarityEnabled:(BOOL)enabled
                     completion:(nullable IoTCompletionHandler)completion
                completionQueue:(nullable dispatch_queue_t)queue;

/**
 @brief Asynchronously dispatch request to set the current DTS VirtualX mode on the speaker.
 @discussion The completion block notes the request as successful if the POST succeeds. It does not ensure that the request was effected.
 @param outputMode the new desired mode.
 @param completion block to be called asynchronously upon completion (successful or otherwise).
 @param queue the dispatch queue to use when calling the completion block.
 */
- (void)setCurrentVirtualXOutputMode:(int)outputMode
                          completion:(nullable IoTCompletionHandler)completion
                     completionQueue:(nullable dispatch_queue_t)queue;

#pragma mark Audio Config - Trumpet

/**
 @brief Denotes whether Trumpet is supported on the speaker.
 */
@property (nonatomic, readonly) BOOL trumpetSupported;

/**
 @brief Denotes whether Trumpet is enabled on the speaker.
 */
@property (nonatomic, readonly) BOOL trumpetEnabled;

/**
 @brief Denotes whether Trumpet virtualization is enabled on the speaker.
 */
@property (nonatomic, readonly) BOOL trumpetVirtualizationEnabled;

/**
 @brief The currently selected Trumpet Preset.
 @discussion Currently the modes available are (off/dynamic/movie/music/game/voice)
 */
@property (nonatomic, readonly) IoTPreset currentTrumpetPreset;

/**
 @brief The maximum possible Trumpet mode.
 @discussion Currently returns 5.
 */
@property (nonatomic, readonly) int maxTrumpetPreset;

/**
 @brief The current value of the trumpet gain setting on this player.
 */
@property (nonatomic, readonly) double trumpetGain;

/**
 @brief Array of available trumpet equalizer bands.
 */
@property (nonatomic, readonly) NSArray<IoTEqualizerBand *> *trumpetEqBands;

/**
 @brief Asynchronously dispatch request to enable/disable Trumpet effects on the speaker.
 @discussion The completion block notes the request as successful if the POST succeeds. It does not ensure that the request was effected.
 @param trumpetEnabled the new desired enabled state.
 @param completion block to be called asynchronously upon completion (successful or otherwise).
 @param queue the dispatch queue to use when calling the completion block.
 */
- (void)setTrumpetEnabled:(BOOL)trumpetEnabled
               completion:(nullable IoTCompletionHandler)completion
          completionQueue:(nullable dispatch_queue_t)queue;

/**
 @brief Asynchronously dispatch request to enable/disable Trumpet Virtualization on the speaker.
 @discussion The completion block notes the request as successful if the POST succeeds. It does not ensure that the request was effected.
 @param trumpetVirtualizationEnabled the new desired enabled state.
 @param completion block to be called asynchronously upon completion (successful or otherwise).
 @param queue the dispatch queue to use when calling the completion block.
 */
- (void)setTrumpetVirtualizationEnabled:(BOOL)trumpetVirtualizationEnabled
                             completion:(nullable IoTCompletionHandler)completion
                        completionQueue:(nullable dispatch_queue_t)queue;

/**
 @brief Asynchronously dispatch request to set the current Trumpet mode on the speaker.
 @discussion The completion block notes the request as successful if the POST succeeds. It does not ensure that the request was effected.
 @param trumpetPreset the new desired preset.
 @param completion block to be called asynchronously upon completion (successful or otherwise).
 @param queue the dispatch queue to use when calling the completion block.
 */
- (void)setCurrentTrumpetPreset:(IoTPreset)trumpetPreset
                     completion:(nullable IoTCompletionHandler)completion
                completionQueue:(nullable dispatch_queue_t)queue;

/**
 @brief Asynchronously dispatch request to adjust the state of trumpet equalizer bands on the speaker.
 @discussion The completion block notes the request as successful if the POST succeeds. It does not ensure that the request was effected.
 @param eqBands the new desired state of the eq bands.
 @param completion block to be called asynchronously upon completion (successful or otherwise).
 @param queue the dispatch queue to use when calling the completion block.
 */
- (void)setTrumpetEQBands:(NSArray<IoTEqualizerBand *> *)eqBands
               completion:(nullable IoTCompletionHandler)completion
          completionQueue:(nullable dispatch_queue_t)queue;

/**
 @brief Asynchronously dispatch request to set the level of trumpet gain on the speaker.
 @discussion The completion block notes the request as successful if the POST succeeds. It does not ensure that the request was effected.
 @param gain new gain value between zero and one.
 @param completion block to be called asynchronously upon completion (successful or otherwise).
 @param queue the dispatch queue to use when calling the completion block.
 */
- (void)setTrumpetGain:(double)gain // Between 0->1
            completion:(nullable IoTCompletionHandler)completion
       completionQueue:(nullable dispatch_queue_t)queue;

#pragma mark Audio Config - MeloD

@property (nonatomic, readonly) BOOL meloDSupported;
@property (nonatomic, readonly) BOOL meloDAroundProSupported;
@property (nonatomic, readonly) BOOL meloDBassManagementSupported;
@property (nonatomic, readonly) BOOL meloDBtlToneCtrlSupported;
@property (nonatomic, readonly) BOOL meloDCoppBassPlusSupported;
@property (nonatomic, readonly) BOOL meloDCoppMultiBandLimiterSupported;
@property (nonatomic, readonly) BOOL meloDCoppPEQSupported;
@property (nonatomic, readonly) BOOL meloDCoppVoicePlusSupported;
@property (nonatomic, readonly) BOOL meloDCoppXOverFilterSupported;
@property (nonatomic, readonly) BOOL meloDDRCSupported;
@property (nonatomic, readonly) BOOL meloDGEQSupported;
@property (nonatomic, readonly) BOOL meloDMatrixSupported;

#pragma mark Audio Config - MeloD Around Pro

@property (nonatomic, readonly) BOOL meloDAroundProEnabled;

- (void)setMeloDAroundProEnabled:(BOOL)enabled
                      completion:(nullable IoTCompletionHandler)completion
                 completionQueue:(nullable dispatch_queue_t)queue;

@property (nonatomic, readonly) IoTAroundProEffect meloDAroundProEffect;

- (void)setMeloDAroundProEffect:(IoTAroundProEffect)effect
                     completion:(nullable IoTCompletionHandler)completion
                completionQueue:(nullable dispatch_queue_t)queue;

@property (nonatomic, readonly) IoTAroundProMode meloDAroundProMode;

- (void)setMeloDAroundProMode:(IoTAroundProMode)mode
                   completion:(nullable IoTCompletionHandler)completion
              completionQueue:(nullable dispatch_queue_t)queue;

#pragma mark Audio Config - MeloD Bass Management

@property (nonatomic, readonly) BOOL meloDBassManagementEnabled;

- (void)setMeloDBassManagementEnabled:(BOOL)enabled
                           completion:(nullable IoTCompletionHandler)completion
                      completionQueue:(nullable dispatch_queue_t)queue;

@property (nonatomic, readonly) double meloDBassManagementCornerFreqBass;

- (void)setMeloDBassManagementCornerFreqBass:(double)value
                                  completion:(nullable IoTCompletionHandler)completion
                             completionQueue:(nullable dispatch_queue_t)queue;

@property (nonatomic, readonly) BOOL meloDBassManagementLeftSurroundHeight;

- (void)setMeloDBassManagementLeftSurroundHeight:(BOOL)enabled
                                      completion:(nullable IoTCompletionHandler)completion
                                 completionQueue:(nullable dispatch_queue_t)queue;

@property (nonatomic, readonly) BOOL meloDBassManagementRightSurroundHeight;

- (void)setMeloDBassManagementRightSurroundHeight:(BOOL)enabled
                                       completion:(nullable IoTCompletionHandler)completion
                                  completionQueue:(nullable dispatch_queue_t)queue;

@property (nonatomic, readonly) BOOL meloDBassManagementSubwooferOut;

- (void)setMeloDBassManagementSubwooferOut:(BOOL)enabled
                                completion:(nullable IoTCompletionHandler)completion
                           completionQueue:(nullable dispatch_queue_t)queue;

@property (nonatomic, readonly) IoTSurroundSpeakerLeft meloDBassManagementLeftSurroundSize;

- (void)setMeloDBassManagementLeftSurroundSize:(IoTSurroundSpeakerLeft)size
                                    completion:(nullable IoTCompletionHandler)completion
                               completionQueue:(nullable dispatch_queue_t)queue;

@property (nonatomic, readonly) IoTSurroundSpeakerRight meloDBassManagementRightSurroundSize;

- (void)setMeloDBassManagementRightSurroundSize:(IoTSurroundSpeakerRight)size
                                     completion:(nullable IoTCompletionHandler)completion
                                completionQueue:(nullable dispatch_queue_t)queue;

#pragma mark Audio Config - MeloD BTL Tone Control

@property (nonatomic, readonly) BOOL meloDBTLToneControlEnabled;

- (void)setMeloDBTLToneControlEnabled:(BOOL)enabled
                           completion:(nullable IoTCompletionHandler)completion
                      completionQueue:(nullable dispatch_queue_t)queue;

@property (nonatomic, readonly) double meloDBTLToneControlBass;

- (void)setMeloDBTLToneControlBass:(double)value
                        completion:(nullable IoTCompletionHandler)completion
                   completionQueue:(nullable dispatch_queue_t)queue;

@property (nonatomic, readonly) double meloDBTLToneControlTreble;

- (void)setMeloDBTLToneControlTreble:(double)value
                          completion:(nullable IoTCompletionHandler)completion
                     completionQueue:(nullable dispatch_queue_t)queue;

@property (nonatomic, readonly) double meloDBTLToneControlLoudness;

- (void)setMeloDBTLToneControlLoudness:(double)value
                            completion:(nullable IoTCompletionHandler)completion
                       completionQueue:(nullable dispatch_queue_t)queue;

#pragma mark Audio Config - MeloD DRC

@property (nonatomic, readonly) BOOL meloDDRCEnabled;

- (void)setMeloDDRCEnabled:(BOOL)enabled
                completion:(nullable IoTCompletionHandler)completion
           completionQueue:(nullable dispatch_queue_t)queue;

@property (nonatomic, readonly) double meloDDRCRefLevel;

- (void)setMeloDDRCRefLevel:(double)value
                 completion:(nullable IoTCompletionHandler)completion
            completionQueue:(nullable dispatch_queue_t)queue;

@property (nonatomic, readonly) IoTDrcMode meloDDRCMode;

- (void)setMeloDDRCMode:(IoTDrcMode)mode
             completion:(nullable IoTCompletionHandler)completion
        completionQueue:(nullable dispatch_queue_t)queue;

#pragma mark Audio Config - MeloD GEQ

@property (nonatomic, readonly) BOOL meloDGEQEnabled;

- (void)setMeloDGEQEnabled:(BOOL)enabled
                completion:(nullable IoTCompletionHandler)completion
           completionQueue:(nullable dispatch_queue_t)queue;

@property (nonatomic, readonly) NSArray<IoTEqualizerBand *> *meloDGEQBands;

- (void)setMeloDGEQBands:(NSArray<IoTEqualizerBand *> *)eqBands
              completion:(nullable IoTCompletionHandler)completion
         completionQueue:(nullable dispatch_queue_t)queue;

/**
@brief The currently selected equalizer preset for this player (if enabled).
*/
@property (nonatomic, readonly) NSString *currentMeloDGEQPreset;

/**
 @brief The available equalizer presets for this player (if enabled).
 */
@property (nonatomic, readonly) NSArray<NSString *> *availableMeloDGEQPresets;

/**
 @brief Asynchronously dispatch request to set the current equalizer preset on the speaker.
 @discussion The completion block notes the request as successful if the POST succeeds. It does not ensure that the request was effected.
 @param eqPreset the new desired preset.
 @param completion block to be called asynchronously upon completion (successful or otherwise).
 @param queue the dispatch queue to use when calling the completion block.
 */
- (void)setCurrentMeloDGEQPreset:(NSString *)eqPreset
                      completion:(nullable IoTCompletionHandler)completion
                 completionQueue:(nullable dispatch_queue_t)queue;

#pragma mark Audio Config - MeloD Matrix

@property (nonatomic, readonly) BOOL meloDMatrixEnabled;

- (void)setMeloDMatrixEnabled:(BOOL)enabled
                   completion:(nullable IoTCompletionHandler)completion
              completionQueue:(nullable dispatch_queue_t)queue;

@property (nonatomic, readonly) IoTMatrixMode meloDMatrixMode;

- (void)setMeloDMatrixMode:(IoTMatrixMode)mode
                completion:(nullable IoTCompletionHandler)completion
           completionQueue:(nullable dispatch_queue_t)queue;

#pragma mark Audio Config - MeloD COPP Bass+

@property (nonatomic, readonly) BOOL meloDCOPPBassPlusEnabled;

- (void)setMeloDCOPPBassPlusEnabled:(BOOL)enabled
                         completion:(nullable IoTCompletionHandler)completion
                    completionQueue:(nullable dispatch_queue_t)queue;

@property (nonatomic, readonly) double meloDCOPPBassPlusHarmonic;

- (void)setMeloDCOPPBassPlusHarmonic:(double)value
                          completion:(nullable IoTCompletionHandler)completion
                     completionQueue:(nullable dispatch_queue_t)queue;

@property (nonatomic, readonly) double meloDCOPPBassPlusStrength;

- (void)setMeloDCOPPBassPlusStrength:(double)value
                          completion:(nullable IoTCompletionHandler)completion
                     completionQueue:(nullable dispatch_queue_t)queue;

#pragma mark Audio Config - MeloD COPP Voice+

@property (nonatomic, readonly) BOOL meloDCOPPVoicePlusEnabled;

- (void)setMeloDCOPPVoicePlusEnabled:(BOOL)enabled
                          completion:(nullable IoTCompletionHandler)completion
                     completionQueue:(nullable dispatch_queue_t)queue;

@property (nonatomic, readonly) IoTVoicePlusEffect meloDVoicePlusEffect;

- (void)setMeloDVoicePlusEffect:(IoTVoicePlusEffect)effect
                     completion:(nullable IoTCompletionHandler)completion
                completionQueue:(nullable dispatch_queue_t)queue;

#pragma mark Audio Config - MeloD Multiband Limiter

@property (nonatomic, readonly) BOOL meloDCOPPMultibandLimiterEnabled;

- (void)setMeloDCOPPMultibandLimiterEnabled:(BOOL)enabled
                                 completion:(nullable IoTCompletionHandler)completion
                            completionQueue:(nullable dispatch_queue_t)queue;

#pragma mark Audio Config - PEQ

@property (nonatomic, readonly) BOOL meloDCOPPPEQEnabled;

- (void)setMeloDCOPPPEQEnabled:(BOOL)enabled
                    completion:(nullable IoTCompletionHandler)completion
               completionQueue:(nullable dispatch_queue_t)queue;

#pragma mark Audio Config - XOver Filter

@property (nonatomic, readonly) BOOL meloDCOPPXOverFilterEnabled;

- (void)setMeloDCOPPXOverFilterEnabled:(BOOL)enabled
                            completion:(nullable IoTCompletionHandler)completion
                       completionQueue:(nullable dispatch_queue_t)queue;

@end

NS_ASSUME_NONNULL_END
