#ifndef NativeConversationUtils_h
#define NativeConversationUtils_h

#ifdef DEBUG_MODE
#define TLog( s, ... ) NSLog( s, ##__VA_ARGS__ )
#else
#define TLog( s, ... )
#endif

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>


@interface NativeConversationUtils : NSObject
@property (readonly) void* conv_sdk_utils;

+ (NSString*)getDeviceType;

+ (NSString *)getDeviceModel;

+ (NSString*)getDeviceName;


+ (instancetype)get_instance;

-(int) create_conversation_utils;

-(void) destroy_conversation_utils;

-(int) try_create_audio_encoder:(const char *)type
                             CH:(int)channels
                             SR:(int)sample_rate
                          Error:(int*)errorCode;

-(int) recreate_audio_encoder:(const char*)type
                           CH:(int)channels
                           SR:(const int)sample_rate
                        Error:(int*)errorCode;

-(int) destroy_audio_encoder;

-(int) audio_encoder_soft_restart;

-(int) audio_encoding:(const unsigned char*)frameBuff
             FrameLen:(const int)frameLen
           OutputBuff:(unsigned char*)outputBuffer
           OutputSize:(int)outputSize;

-(int) get_frame_sample_bytes;

-(int) set_frame_sample_bytes:(int)bytes;

-(int) try_create_audio_decoder:(const char *)type
                             CH:(int)channels
                             SR:(int)sample_rate
                          Error:(int*)errorCode;

-(int) recreate_audio_decoder:(const char*)type
                           CH:(int)channels
                           SR:(const int)sample_rate
                        Error:(int*)errorCode;

-(int) destroy_audio_decoder;

-(int) audio_decoding:(const unsigned char*)frameBuff
             FrameLen:(const int)frameLen
           OutputBuff:(unsigned char*)outputBuffer
           OutputSize:(int)outputBufferBytes;

@end

#endif /* NativeConversationUtils_h */

