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

#import "IoTPlayerGroup.h"

@class IoTPlaylist;
@class IoTPlayer;
@class IoTClient;

NS_ASSUME_NONNULL_BEGIN

@interface IoTPlayerGroup (Private)

@property (nonatomic, assign) BOOL isConvenienceGroup;
@property (nonatomic, copy) NSString *groupID;
@property (nonatomic, copy) NSString *displayName;
@property (nonatomic, copy) NSArray<IoTPlayerGroupMember *> *members;

- (instancetype)initWithClient:(IoTClient *)client;

- (nullable IoTPlayer *)sourcePlayer;

- (IoTMediaItem *)currentItem;
- (int)indexPlaying;
- (BOOL)isLoopModeEnabled;
- (BOOL)isShuffleModeEnabled;
- (IoTLoopMode)loopMode;
- (IoTShuffleMode)shuffleMode;

- (NSString *)playlistUserData;
- (uint)playlistSize;

- (void)setLoopMode:(IoTLoopMode)loopMode
         completion:(nullable IoTCompletionHandler)completion
    completionQueue:(nullable dispatch_queue_t)queue;

- (void)setShuffleMode:(IoTShuffleMode)shuffleMode
            completion:(nullable IoTCompletionHandler)completion
       completionQueue:(dispatch_queue_t)queue;

- (void)playItemAtIndex:(int)index
             completion:(nullable IoTCompletionHandler)completion
        completionQueue:(nullable dispatch_queue_t)queue;

- (void)addMediaItem:(IoTMediaItem *)mediaItem
             atIndex:(int)index
                play:(BOOL)play
            userData:(NSString *)userData
          completion:(nullable IoTCompletionHandler)completion
     completionQueue:(nullable dispatch_queue_t)queue;

- (void)addMediaItems:(NSArray *)mediaItems
              atIndex:(int)index
                 play:(BOOL)play
             userData:(NSString *)userData
           completion:(nullable IoTCompletionHandler)completion
      completionQueue:(nullable dispatch_queue_t)queue;

- (void)removeMediaItemsInRange:(NSRange)range
                     completion:(nullable IoTCompletionHandler)completion
                completionQueue:(nullable dispatch_queue_t)queue;

- (void)moveMediaItemsInRange:(NSRange)range
                     position:(int)position
                   completion:(nullable IoTCompletionHandler)completion
              completionQueue:(nullable dispatch_queue_t)queue;

- (void)clearWithCompletion:(nullable IoTCompletionHandler)completion
            completionQueue:(nullable dispatch_queue_t)queue;

- (void)getItemsInRange:(NSRange)range
             completion:(nullable void(^)(BOOL success, NSArray<IoTMediaItem *> *items, NSError * _Nullable error))completion
        completionQueue:(nullable dispatch_queue_t)queue;

@end

NS_ASSUME_NONNULL_END
