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

#import <Foundation/Foundation.h>
#import "IoTTypes.h"
@class IoTZigbeeAttr;
@class IoTWrappedRepresentation;
@class IoTZbDeviceAttr;

NS_ASSUME_NONNULL_BEGIN

@interface IoTZigbeeState : NSObject

@property (nonatomic, readonly) BOOL supported;
@property (nonatomic, readonly) IoTZigbeeAdapterState adapterState;
@property (nonatomic, readonly) IoTCoordinatorState coordinatorState;
@property (nonatomic, readonly) IoTJoiningState joiningState;
@property (nonatomic, readonly) NSArray<IoTZbDeviceAttr *> *joinedDevices;
//@property (nonatomic, readonly) BOOL scanning;

- (void)updateWithAttribute:(nullable IoTZigbeeAttr *)zbAttr;

/**
 Update the internal state using a wrapped IoTSys notification diff.
 @param wrapper Wrapper representation of a diff from IoTSys
 @return Array of the changed keys. This may include additional keys that were not in the original representation that are changed in the
 Bluetooth state due to an error.
 */
- (NSArray<NSString *> *)updateWithWrapper:(IoTWrappedRepresentation *)wrapper;

@end

NS_ASSUME_NONNULL_END
