//
//  DAClient.h
//
//  Copyright © 2024 Jumio Corporation. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <CoreVideo/CoreVideo.h>
#import <CoreMotion/CoreMotion.h>
#import "Common.h"

#import "daclient.h"

@class JDAEvent;
@class JDAClientSettings;
@class JDAImage;
@class JDAEventAttribute;
@protocol JDAResponseHandler;
@protocol JDANativeEventHandler;

NS_ASSUME_NONNULL_BEGIN

// 2022-02-01 DG: Name this file DAClient+ObjCType, because daclient.h already exists as C++ header
JDACLIENT_EXPORT @interface JDAClient : NSObject

@property (readonly, nonatomic) BOOL isBusy;
@property (readonly, nonatomic) BOOL hasStarted;
@property (readonly, nonatomic) JDAMode mode;
@property dispatch_queue_t responseDispatchQueue;
@property (weak) id<JDAResponseHandler> _Nullable responseHandler;
@property (weak) id<JDANativeEventHandler> _Nullable nativeEventHandler;

- (instancetype)init NS_UNAVAILABLE;
- (instancetype _Nullable)initWithSettings:(JDAClientSettings*)settings enableExtraLogging:(BOOL)enableExtraLogging NS_DESIGNATED_INITIALIZER;

- (void)start;
- (void)stop;

- (void)sendNativeEvent:(const daclient_event_t*)nativeEvent;
- (void)sendEvent:(JDAEvent*)event;
- (void)sendImage:(JDAImage*)image timestamp:(int64_t)timestamp;
- (void)sendImage:(JDAImage*)image depthImage:(JDAImage*)depthImage timestamp:(int64_t)timestamp;

- (void)sendAccelerometerData:(CMAcceleration)accelerometerData timestamp:(int64_t)timestamp;
- (void)sendGyroscopeData:(CMRotationRate)gyroscopeData timestamp:(int64_t)timestamp;
- (void)sendMagnetometerData:(CMCalibratedMagneticField)magnetometerData timestamp:(int64_t)timestamp;
- (void)sendDeviceMotion:(CMDeviceMotion*)deviceMotion timestamp:(int64_t)timestamp;

@end

NS_ASSUME_NONNULL_END
