chivox_aiengine_platform_interface.dart 2.75 KB
import 'dart:typed_data';

import 'package:plugin_platform_interface/plugin_platform_interface.dart';

import 'chivox_aiengine_method_channel.dart';

abstract class ChivoxAienginePlatform extends PlatformInterface {
  /// Constructs a ChivoxAienginePlatform.
  ChivoxAienginePlatform() : super(token: _token);

  static final Object _token = Object();

  static ChivoxAienginePlatform _instance = MethodChannelChivoxAiengine();

  /// The default instance of [ChivoxAienginePlatform] to use.
  ///
  /// Defaults to [MethodChannelChivoxAiengine].
  static ChivoxAienginePlatform get instance => _instance;

  /// Platform-specific implementations should set this with their own
  /// platform-specific class that extends [ChivoxAienginePlatform] when
  /// they register themselves.
  static set instance(ChivoxAienginePlatform instance) {
    PlatformInterface.verifyToken(instance, _token);
    _instance = instance;
  }

  Future<String?> getPlatformVersion() {
    throw UnimplementedError('platformVersion() has not been implemented.');
  }

  Future<String?> aiengineNew(String cfg) {
    throw UnimplementedError('aiengineNew() has not been implemented.');
  }

  Future<void> aiengineDelete(String engineId) {
    throw UnimplementedError('aiengineDelete() has not been implemented.');
  }

  Future<void> aiengineStart(String engineId, Map<String, dynamic> audioSrc,
      String param, String callbackId) {
    throw UnimplementedError('aiengineStart() has not been implemented.');
  }

  Future<void> aiengineFeed(String engineId, Uint8List bytes, int length) {
    throw UnimplementedError('aiengineFeed() has not been implemented.');
  }

  Future<void> aiengineStop(String engineId) {
    throw UnimplementedError('aiengineStop() has not been implemented.');
  }

  Future<void> aiengineCancel(String engineId) {
    throw UnimplementedError('aiengineCancel() has not been implemented.');
  }

  Future<String?> getDeviceId() {
    throw UnimplementedError('getDeviceId() has not been implemented.');
  }

  Future<String?> getSerialNumber(String? engineId, Map input) {
    throw UnimplementedError('getSerialNumber() has not been implemented.');
  }

  Future<bool?> clearSavedSerialNumber(String appKey) {
    throw UnimplementedError(
        'clearSavedSerialNumber() has not been implemented.');
  }

  Future<String?> getProvision(String? engineId, Map input) {
    throw UnimplementedError('getProvision() has not been implemented.');
  }

  Future<void> extractRes(String assetPrefix, List<String> assetNames,
      String targetDir, String callbackId) {
    throw UnimplementedError('extractRes() has not been implemented.');
  }

  Future<String?> loadNativeCfg(String resRootDir, List<String> resNames) {
    throw UnimplementedError('loadNativeCfg() has not been implemented.');
  }
}