/*
 * Copyright © Dynamsoft Corporation. All rights reserved.
 *
 */

#import <React/RCTBridgeModule.h>
#import <React/RCTEventEmitter.h>

@interface RCT_EXTERN_REMAP_MODULE(DynamsoftImageSourceAdapterModule, RNDynamsoftImageSourceAdapter, RCTEventEmitter)

RCT_EXTERN__BLOCKING_SYNCHRONOUS_METHOD(createDefaultNativeISA)

RCT_EXTERN_METHOD(destroy:(NSString *)key)

RCT_EXTERN_METHOD(clearBuffer:(NSString *)key
                  resolve:(RCTPromiseResolveBlock)resolve
                  reject:(RCTPromiseRejectBlock)reject)

RCT_EXTERN_METHOD(getImageCount:(NSString *)key
                  resolve:(RCTPromiseResolveBlock)resolve
                  reject:(RCTPromiseRejectBlock)reject)

RCT_EXTERN_METHOD(isBufferEmpty:(NSString *)key
                  resolve:(RCTPromiseResolveBlock)resolve
                  reject:(RCTPromiseRejectBlock)reject)

RCT_EXTERN_METHOD(getColourChannelUsageType:(NSString *)key
                  resolve:(RCTPromiseResolveBlock)resolve
                  reject:(RCTPromiseRejectBlock)reject)

RCT_EXTERN_METHOD(setColourChannelUsageType:(NSString *)key
                  type:(NSInteger)type
                  resolve:(RCTPromiseResolveBlock)resolve
                  reject:(RCTPromiseRejectBlock)reject)

RCT_EXTERN_METHOD(getMaximumImageCount:(NSString *)key
                  resolve:(RCTPromiseResolveBlock)resolve
                  reject:(RCTPromiseRejectBlock)reject)

RCT_EXTERN_METHOD(setMaximumImageCount:(NSString *)key
                  maxCount:(NSInteger)maxCount
                  resolve:(RCTPromiseResolveBlock)resolve
                  reject:(RCTPromiseRejectBlock)reject)

RCT_EXTERN_METHOD(setNextImageToReturn:(NSString *)key
                  imageId:(NSInteger)imageId
                  resolver:(RCTPromiseResolveBlock)resolve
                  rejecter:(RCTPromiseRejectBlock)reject)

RCT_EXTERN_METHOD(startFetching:(NSString *)key)

RCT_EXTERN_METHOD(stopFetching:(NSString *)key)

RCT_EXTERN__BLOCKING_SYNCHRONOUS_METHOD(hasImage:(NSString *)key imageId:(NSInteger)imageId)

@end
