// This file is automatically generated, so please do not edit it.
// @generated by `flutter_rust_bridge`@ 2.10.0.

// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import

import '../frb_generated.dart';
import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart';

// These functions are ignored because they are not marked as `pub`: `_init_controls`, `_new`, `_update_display`, `_update_state`, `_update_timeline`

// Rust type: RustOpaqueMoi<flutter_rust_bridge::for_generated::RustAutoOpaqueInner<SmtcFlutter>>
abstract class SmtcFlutter implements RustOpaqueInterface {
  Future<void> close();

  factory SmtcFlutter() => RustLib.instance.api.crateApiSmtcSmtcFlutterNew();

  Stream<SMTCControlEvent> subscribeToControlEvents();

  /// 更新 SMTC 显示信息
  /// 两种方式都支持：image_path (封面路径) 或 image_data (封面字节)
  Future<void> updateDisplay({
    required String title,
    required String artist,
    String? imagePath,
    Uint8List? imageData,
  });

  Future<void> updateState({required SMTCState state});

  /// 更新时间轴信息
  Future<void> updateTimeline({
    required PlatformInt64 position,
    required PlatformInt64 duration,
  });
}

/// SMTC 控制事件类型
enum SMTCControlEvent { play, pause, previous, next, unknown }

/// SMTC 播放状态
enum SMTCState { paused, playing }
