diff --git a/ios/Podfile b/ios/Podfile index ce17794db..41d32f019 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -40,6 +40,45 @@ target 'Runner' do end post_install do |installer| + # ---- Auto patch: bump FlutterGeneratedPluginSwiftPackage iOS platform ---- + # Flutter 生成的中介包总是写死 .iOS("12.0"),与 Podfile 中的 + # platform :ios, '16.0' 不一致,会报 + # "requires minimum platform version 15.0/16.0 ... but this target supports 12.0"。 + # 这里自动同步为 16.0。 + generated_pkg = File.expand_path( + 'Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage/Package.swift', __dir__) + if File.exist?(generated_pkg) + content = File.read(generated_pkg) + new_content = content.gsub(/\.iOS\("\d+\.\d+"\)/, '.iOS("16.0")') + if new_content != content + File.write(generated_pkg, new_content) + puts '[Podfile patch] Bumped FlutterGeneratedPluginSwiftPackage iOS platform to 16.0' + end + end + + # ---- Auto patch: comment out illegal `` imports in all Pods sources ---- + # 新版 Xcode 模块校验禁止跨模块引用私有头 `` + # `` 已包含全部 IPv6 定义,注释掉即可。 + pods_dir = File.expand_path('Pods', __dir__) + if Dir.exist?(pods_dir) + patched_files = [] + Dir.glob(File.join(pods_dir, '**', '*.{m,mm,h,hpp,c,cpp}')).each do |file| + content = File.read(file) + new_content = content.gsub( + /^[ \t]*#\s*(?:import|include)\s*.*$/, + '// \0 // patched: private header, covered by ' + ) + if new_content != content + File.write(file, new_content) + patched_files << file.sub(pods_dir + '/', '') + end + end + unless patched_files.empty? + puts "[Podfile patch] Commented out imports in #{patched_files.size} file(s):" + patched_files.each { |f| puts " - #{f}" } + end + end + installer.pods_project.targets.each do |target| flutter_additional_ios_build_settings(target) diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index fcad18058..ed13eec0f 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -251,7 +251,7 @@ ); mainGroup = 97C146E51CF9000F007C117D; packageReferences = ( - 781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage" */, + 781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "FlutterGeneratedPluginSwiftPackage" */, ); productRefGroup = 97C146EF1CF9000F007C117D /* Products */; projectDirPath = ""; @@ -506,7 +506,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = 537SFY28XS; + DEVELOPMENT_TEAM = K39FB49XKY; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 16.6; @@ -781,7 +781,7 @@ /* End XCConfigurationList section */ /* Begin XCLocalSwiftPackageReference section */ - 781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage" */ = { + 781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "FlutterGeneratedPluginSwiftPackage" */ = { isa = XCLocalSwiftPackageReference; relativePath = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage; }; diff --git a/lib/data/services/ble_manager.dart b/lib/data/services/ble_manager.dart index 03e38014a..ce41d888d 100644 --- a/lib/data/services/ble_manager.dart +++ b/lib/data/services/ble_manager.dart @@ -223,20 +223,28 @@ class BleManager extends GetxService { bool isFinal = false, }) async { // 段尾帧(pcm 为空 + isFinal=true)必须放行,让 native 触发立即整段下发; - // 仅对"普通空帧(非段尾)"短路。 + // 仅对“普通空帧(非段尾)”短路。 if (pcm.isEmpty && !isFinal) return true; final upper = leg.toUpperCase(); final streamId = (upper == 'A' || upper == 'UPLINK') ? 'out.uplink' : 'out.downlink'; + final isFlush = isFinal; try { - return await Jielihome.instance.feedTranslatedAudio( + final ok = await Jielihome.instance.feedTranslatedAudio( streamId: streamId, pcm: pcm, sampleRate: sampleRate, channels: channels, isFinal: isFinal, ); + if (isFlush || !ok) { + // 只在段尾 flush 或 native 返回 false 时打,避免刷屏。 + Logger.info( + '[BleManager] feedAstTtsPcm leg=$leg streamId=$streamId pcm=${pcm.length}B isFinal=$isFinal nativeOk=$ok', + ); + } + return ok; } catch (e) { Logger.w('BleManager', 'feedAstTtsPcm leg=$leg failed: $e'); return false; @@ -265,12 +273,14 @@ class BleManager extends GetxService { _eventSub?.cancel(); _eventSub = Jielihome.instance.events.listen( (event) { - // 总开关日志:每一个事件都打一次,便于诊断 native → dart 通道是否畅通。 - // 通话翻译 PCM 上推 (TranslationAudioEvent) 是高频事件(20ms 一帧), - // 日志量大且无诊断价值,单独跳过;其它事件保留 runtimeType 打印。 - if (event is! TranslationAudioEvent) { - print('[BLE] [EVT] ${event.runtimeType}'); + // TranslationAudioEvent 频率极高(10ms/帧),最先拦截并单独走节流日志处理器, + // 避免进入下面的 print / if‑链路经引发刷屏。 + if (event is TranslationAudioEvent) { + _handleTranslationAudio(event); + return; } + // 总开关日志:每一个事件都打一次,便于诊断 native → dart 通道是否畅通 + print('[BLE] [EVT] ${event.runtimeType}'); if (event is AdapterStatusEvent) { print('[BLE] [EVT] 适配器状态 enabled=${event.enabled} hasBle=${event.hasBle}'); } else if (event is ScanStatusEvent) { @@ -313,8 +323,11 @@ class BleManager extends GetxService { _isCall.value = event.status != 0; } else if (event is ExpandFunctionEvent) { _handleExpandFunction(event); - } else if (event is TranslationAudioEvent) { - _handleTranslationAudio(event); + } else if (event is TranslationLogEvent) { + print('[BLE] [EVT] TranslationLog modeId=${event.modeId} ${event.content}'); + } else if (event is TranslationErrorEvent) { + print('[BLE] [EVT] TranslationError modeId=${event.modeId} ' + 'code=${event.code} msg=${event.message}'); } else if (event is UnknownJieliEvent) { print('[BLE] [EVT] 未识别事件: ${event.raw}'); } @@ -326,11 +339,17 @@ class BleManager extends GetxService { } void _handleConnectionState(ConnectionStateEvent e) { + // 关键诊断日志:原生 → Dart 链路上的最终一站。如果这里没打印,意味着 + // 原生侧 `connectionState` 事件根本没到达 Dart(看 iOS `[JieliDispatcher] + // send #N type=connectionState` 是否成功 sink-ok)。 + print('[BLE] [EVT] >>> _handleConnectionState addr=${e.address} state=${e.state} ' + '(0=disconnect 1=ok 2=connecting)'); Logger.i('BleManager', 'JL 连接状态: ${e.address} → ${e.state}'); if (e.state == ConnectionStateEvent.connectionOk) { currentDeviceAddress = e.address; _connectionState.value = BleConnectionState.connected; _isConnected.value = true; + print('[BLE] [EVT] >>> isConnected 翻成 true, currentDeviceAddress=${e.address}'); _ensureDeviceInfoStub(); // 用扫描期间最新一条 advertisement 立刻填上电量(SDK BleScanMessage 里就有 // leftDeviceQuantity / rightDeviceQuantity / chargingBinQuantity / 各 charging 位) @@ -339,11 +358,13 @@ class BleManager extends GetxService { // 改到 RcspInitEvent 成功时再拉一次 + 之后再轮询几次保险。 } else if (e.state == ConnectionStateEvent.connectionConnecting) { _connectionState.value = BleConnectionState.connecting; + print('[BLE] [EVT] >>> 连接中 (state=2)'); } else { _connectionState.value = BleConnectionState.disconnected; _isConnected.value = false; _isCodecActive.value = false; _stopBatteryWatchdog(); + print('[BLE] [EVT] >>> isConnected 翻成 false (state=${e.state})'); } } @@ -493,16 +514,29 @@ class BleManager extends GetxService { '[BAT] 广播不再携带电量字段,连接后将通过 RCSP/BatteryEvent 补齐'); } + int _uplinkRxCount = 0; + int _downlinkRxCount = 0; + void _handleTranslationAudio(TranslationAudioEvent e) { // streamId 来自 native TranslationStreams:in.uplink / in.downlink / in.mic ... // 仅转发通话翻译两条输入流;out.* 由这里产生回灌指令而不是接收。 switch (e.streamId) { case 'in.uplink': + _uplinkRxCount++; + if (_uplinkRxCount <= 5 || _uplinkRxCount % 100 == 1) { + Logger.i('CALL-RX', + '上行 #$_uplinkRxCount len=${e.pcm.length} sr=${e.sampleRate} ch=${e.channels} bits=${e.bitsPerSample} seq=${e.seq}'); + } if (!_inUplinkPcmController.isClosed) { _inUplinkPcmController.add(e.pcm); } break; case 'in.downlink': + _downlinkRxCount++; + if (_downlinkRxCount <= 5 || _downlinkRxCount % 100 == 1) { + Logger.i('CALL-RX', + '下行 #$_downlinkRxCount len=${e.pcm.length} sr=${e.sampleRate} ch=${e.channels} bits=${e.bitsPerSample} seq=${e.seq}'); + } if (!_inDownlinkPcmController.isClosed) { _inDownlinkPcmController.add(e.pcm); } @@ -765,15 +799,16 @@ class BleManager extends GetxService { } Future openA2DPDecoder() async { - Logger.i('CALL_TRANS_CMD', '启动通话翻译模式 (杰理 startTranslation)'); + Logger.i('CALL_TRANS_CMD', '【启动】通话翻译模式 (杰理 startTranslation modeId=3)'); try { await Jielihome.instance.startTranslation( modeId: TranslationModeIds.callTranslation, ); _isCodecActive.value = true; + Logger.i('CALL_TRANS_CMD', '✅【启动成功】通话翻译模式已下发 — 接下来等耳机回上行音频'); return true; } catch (e) { - Logger.e('CALL_TRANS_CMD', '启动通话翻译模式失败: $e'); + Logger.e('CALL_TRANS_CMD', '❌【启动失败】通话翻译模式: $e'); _isCodecActive.value = false; return false; } diff --git a/lib/data/services/spotify_service.dart b/lib/data/services/spotify_service.dart index fa9816e9f..21e2f1421 100644 --- a/lib/data/services/spotify_service.dart +++ b/lib/data/services/spotify_service.dart @@ -1,3 +1,4 @@ +/* 暂时关闭:spotify_sdk plugin 已在 pubspec.yaml 注释掉,恢复时把本文件首尾的 block comment 解开即可。 import 'dart:async'; import 'dart:io'; import 'dart:convert'; @@ -207,3 +208,4 @@ class SpotifService { } } } +*/ diff --git a/lib/modules/agent/controllers/agent_controller.dart b/lib/modules/agent/controllers/agent_controller.dart index 1ffbdde13..5cc9b3937 100644 --- a/lib/modules/agent/controllers/agent_controller.dart +++ b/lib/modules/agent/controllers/agent_controller.dart @@ -1755,11 +1755,7 @@ class AgentController extends GetxController with WidgetsBindingObserver { return; } - // 必须在 Android 上且已连接杰理耳机 - if (!Platform.isAndroid) { - Get.snackbar('tips'.tr, '该功能仅安卓端支持'); - return; - } + // 必须已连接杰理耳机;iOS / Android 都走 device_jieli 的 AI 助理通路 final BleManager bleManager = Get.find(); if (!bleManager.isConnected) { Get.snackbar('tips'.tr, '请先连接耳机'); diff --git a/lib/modules/devices/controllers/devices_controller.dart b/lib/modules/devices/controllers/devices_controller.dart index 89f82ed95..309207cbe 100644 --- a/lib/modules/devices/controllers/devices_controller.dart +++ b/lib/modules/devices/controllers/devices_controller.dart @@ -1,4 +1,5 @@ import 'dart:async'; +import 'dart:io'; import 'package:device_jieli/device_jieli.dart'; import 'package:flutter/material.dart'; @@ -310,6 +311,11 @@ class DevicesController extends GetxController { } Future _ensureBluetoothPermission() async { + // iOS: CoreBluetooth 首次扫描时由系统自动弹出蓝牙权限对话框 + // (依赖 Info.plist 的 NSBluetoothAlwaysUsageDescription), + // permission_handler 的 bluetoothScan/bluetoothConnect 是 Android 专属, + // 在 iOS 上调用永远返回 denied,会误拦截扫描。 + if (Platform.isIOS) return true; try { final results = await [ Permission.bluetoothScan, diff --git a/lib/modules/ota_upgrade/controllers/ota_upgrade_controller.dart b/lib/modules/ota_upgrade/controllers/ota_upgrade_controller.dart index e2906bded..ac50419ce 100644 --- a/lib/modules/ota_upgrade/controllers/ota_upgrade_controller.dart +++ b/lib/modules/ota_upgrade/controllers/ota_upgrade_controller.dart @@ -1,9 +1,11 @@ +import 'dart:async'; + import 'package:classic_bluetooth/classic_bluetooth.dart'; +import 'package:device_jieli/device_jieli.dart'; import 'package:flutter/material.dart'; import 'package:get/get.dart'; // import 'package:logger/web.dart'; import 'package:get_storage/get_storage.dart'; -import 'package:ota/ota.dart'; import '../../../data/services/ble_manager.dart'; import 'ota_core_contropller.dart'; import 'ota_download_contropller.dart'; @@ -18,7 +20,8 @@ class OtaUpgradeController extends GetxController { final _downloadService = OtaDownloadService(); final _uiService = OtaUpgradePopUp(); final _bleManager = Get.find(); - final _jlota = Ota.instance; + final _jlota = Jielihome.instance; + StreamSubscription? _otaEventSub; // 状态管理 final RxString errorMessage = ''.obs; @@ -52,7 +55,9 @@ class OtaUpgradeController extends GetxController { @override void onClose() { - _jlota.onOtaClose(); + _jlota.otaCancel(); + _otaEventSub?.cancel(); + _otaEventSub = null; _bleManager.setEnterOta(false); isUpgrade.value = false; super.onClose(); @@ -160,7 +165,8 @@ class OtaUpgradeController extends GetxController { try { await _bleManager.setEnterOta(true); await Future.delayed(const Duration(seconds: 2)); - _jlota.init(); + // device_jieli 已经在全局 InitialBinding 里 initialize 过; + // 这里无需重复 init —— 直接订阅 OTA 事件流即可。 isDownloading.value = true; showDetailedStatus.value = true; @@ -194,13 +200,13 @@ class OtaUpgradeController extends GetxController { detailedStatus.value = 'otaPreparingConnection'.tr; await Future.delayed(const Duration(milliseconds: 500)); detailedStatus.value = 'otaConnectingDevice'.tr; - _jlota.startUpgrading(address: _address, filePath: filePath); + _jlota.otaStart(address: _address, firmwareFilePath: filePath); } /// 停止升级 /// 关闭OTA连接 void stopUpgrading() { - _jlota.onOtaClose(); + _jlota.otaCancel(); } /// 重试连接 @@ -218,44 +224,70 @@ class OtaUpgradeController extends GetxController { } /// 监听OTA事件 - /// 设置OTA事件流的监听器 + /// 订阅 device_jieli 的统一事件流,过滤 OTA 相关事件并转发到分发器。 void _listenToOtaEvents() { - _jlota.eventStream.listen((event) { - _handleOtaEvent(event); - }); + _otaEventSub?.cancel(); + _otaEventSub = _jlota.events.listen(_handleOtaEvent); } - /// 处理OTA事件 - /// [event] OTA事件对象 - /// 根据不同的事件类型执行相应的处理逻辑 - void _handleOtaEvent(dynamic event) { - switch (event.event) { - case 'onProgress': - if (event.type != null && event.progress != null) { - progress.value = event.progress!; - type.value = event.type!; + /// 处理 device_jieli 抛出的 OTA / 连接事件。 + /// - [OtaStateEvent]: 进度 / 状态机推进 + /// - [OtaErrorEvent]: 升级失败 + /// - [ConnectionStateEvent]: 设备连接 / 断开(OTA 期间用于"中断"指示) + void _handleOtaEvent(JieliEvent event) { + if (event is OtaStateEvent) { + switch (event.state) { + case OtaState.entering: + case OtaState.inquiring: + case OtaState.notifyingSize: + type.value = OtaCoreService.START_UPGRADING; + isUpgrade.value = true; + detailedStatus.value = 'otaUpgradeStarted'.tr; + break; + case OtaState.transferring: + if (event.percent >= 0) { + // device_jieli 发的是 0..100 整数;UI 这边按 0..1 浮点用。 + progress.value = event.percent / 100.0; + type.value = OtaCoreService.ONUPGRADE; + isUpgrade.value = true; + detailedStatus.value = 'otaUpgradeProgressWithPercent' + .trParams({'percent': event.percent.toStringAsFixed(1)}); + } + break; + case OtaState.verifying: + detailedStatus.value = 'otaUpgradeStarted'.tr; + break; + case OtaState.rebooting: + // 设备重启等待,仍在升级中 isUpgrade.value = true; - detailedStatus.value = - 'otaUpgradeProgressWithPercent'.trParams({'percent': (event.progress! * 100).toStringAsFixed(1)}); - } - break; - case 'onStartOTA': - type.value = OtaCoreService.START_UPGRADING; - isUpgrade.value = true; - detailedStatus.value = 'otaUpgradeStarted'.tr; - break; - case 'onStopOTA': - _handleUpgradeSuccess(); - break; - case 'onError': - _handleUpgradeError(event.code); - break; - case 'NOCONNECTION': + break; + case OtaState.done: + _handleUpgradeSuccess(); + break; + case OtaState.failed: + _handleUpgradeError(-1); + break; + case OtaState.cancelled: + isUpgrade.value = false; + showDetailedStatus.value = false; + break; + case OtaState.idle: + break; + } + return; + } + if (event is OtaErrorEvent) { + _handleUpgradeError(event.code); + return; + } + if (event is ConnectionStateEvent) { + if (event.state == ConnectionStateEvent.connectionDisconnect && + isUpgrade.value) { _handleConnectionLost(); - break; - case 'CONNECTION_SUCCESS': + } else if (event.state == ConnectionStateEvent.connectionOk && + isUpgrade.value) { _handleConnectionSuccess(); - break; + } } } diff --git a/lib/modules/translation/controllers/translation_controller.dart b/lib/modules/translation/controllers/translation_controller.dart index 254d282dc..550647be4 100644 --- a/lib/modules/translation/controllers/translation_controller.dart +++ b/lib/modules/translation/controllers/translation_controller.dart @@ -1318,8 +1318,16 @@ class TranslationController extends GetxController with WidgetsBindingObserver { }, onError: (e) => Logger.error('[CALL-BRIDGE] in.downlink stream error: $e'), ); + // 诊断:计数 + isFinal 必打,用于定位 “TTS 到底有没有被转发到 native”。 + int forwardCnt = 0; _jieliCallAstTtsSub = _astService.astTtsFrames.listen( (frame) { + forwardCnt++; + if (frame.isFinal || forwardCnt == 1 || forwardCnt % 50 == 0) { + Logger.info( + '[CALL-BRIDGE] forward TTS leg=${frame.leg} pcm=${frame.pcm.length}B isFinal=${frame.isFinal} (#$forwardCnt)', + ); + } bleManager.feedAstTtsPcm( leg: frame.leg, pcm: frame.pcm, diff --git a/local_plugins/agent_service/ios/agent_service/Package.swift b/local_plugins/agent_service/ios/agent_service/Package.swift index c22abc0ec..413e98ded 100644 --- a/local_plugins/agent_service/ios/agent_service/Package.swift +++ b/local_plugins/agent_service/ios/agent_service/Package.swift @@ -16,7 +16,7 @@ let package = Package( .package(path: "../../../chat_storage/ios/chat_storage"), .package(path: "../../../location_service/ios/location_service"), .package(path: "../../../music_service/ios/music_service"), - .package(path: "../../../music_service/ios/user_portrait"), + .package(path: "../../../user_portrait/ios/user_portrait"), .package(path: "../../../qq_music/ios/qq_music"), ], targets: [ diff --git a/local_plugins/agent_service/ios/agent_service/Sources/agent_service/AgentServicePlugin.swift b/local_plugins/agent_service/ios/agent_service/Sources/agent_service/AgentServicePlugin.swift index b8d998ee4..197df852a 100644 --- a/local_plugins/agent_service/ios/agent_service/Sources/agent_service/AgentServicePlugin.swift +++ b/local_plugins/agent_service/ios/agent_service/Sources/agent_service/AgentServicePlugin.swift @@ -74,9 +74,18 @@ public class AgentServicePlugin: NSObject, FlutterPlugin { result(true) return } - print("liwei----------AgentServicePlugin startConversation") - let mode = (call.arguments as? [String: Any])?["mode"] as? String ?? "normal" - impl.startRecognition(mode: mode) + // 关键:Dart 端传过来的 `isExternalActive=true` 表示"音频从外部 + // 设备(杰理耳机 RCSP 上行)灌进来,不要启动手机麦"。Android 在 + // `AgentServicePlugin.kt:160` 里正确提取并传给 native;iOS 这里 + // 之前完全没读这个参数,导致 `startRecognition` 用默认值 false, + // 永远走手机麦 → AI 对话即使耳机已连接也不会用耳机麦上行,TTS + // 也按 .microphone 路径配 audio session(默认到手机扬声器)。 + // 现在补齐:取出来透传成 `useBle`,与 Android 行为对齐。 + let args = call.arguments as? [String: Any] + let mode = args?["mode"] as? String ?? "normal" + let isExternalActive = args?["isExternalActive"] as? Bool ?? false + print("liwei----------AgentServicePlugin startConversation mode=\(mode) isExternalActive=\(isExternalActive)") + impl.startRecognition(useBle: isExternalActive, mode: mode) result(true) case "isInterrupt": if let args = call.arguments as? [String: Any], @@ -92,6 +101,26 @@ public class AgentServicePlugin: NSObject, FlutterPlugin { case "recognizeCallback": impl.recognizeCallback() result(true) + + case "pushAudioData": + // Dart 端通过 device_jieli AssistantAudioEvent 拿到 PCM 后调用本方法 + // 注入到 ASR。`isExternalActive=true` 模式下的唯一上行通路。 + // 之前这里漏了 case,调用直接落到 default 抛 MissingPluginException, + // Dart 侧 catchError 静默吞掉 —— 结果 BLE 帧一直发但讯飞 audioFrames=0。 + guard let args = call.arguments as? [String: Any] else { + result(FlutterError(code: "INVALID_ARGUMENTS", message: "参数缺失", details: nil)) + return + } + let pcmData: Data + if let typed = args["data"] as? FlutterStandardTypedData { + pcmData = typed.data + } else if let bytes = args["data"] as? [UInt8] { + pcmData = Data(bytes) + } else { + result(FlutterError(code: "INVALID_ARGUMENTS", message: "data 参数缺失或类型错误", details: nil)) + return + } + result(impl.pushAudioData(pcmData)) case "stopConversation": // 防抖:短时间重复调用直接忽略 diff --git a/local_plugins/azure_speech/ios/azure_speech/Sources/azure_speech/AzureSpeechPlugin.swift b/local_plugins/azure_speech/ios/azure_speech/Sources/azure_speech/AzureSpeechPlugin.swift index ec7560fd8..ae619c7da 100644 --- a/local_plugins/azure_speech/ios/azure_speech/Sources/azure_speech/AzureSpeechPlugin.swift +++ b/local_plugins/azure_speech/ios/azure_speech/Sources/azure_speech/AzureSpeechPlugin.swift @@ -59,6 +59,9 @@ import ble_service case tts case audioData case ast + // 通话翻译下行:A/B 两路 TTS PCM 以 {leg, pcm, final} 抩回 Dart, + // 由 translation_controller 转发给 device_jieli 回灌耳机。 + case astTts } /** * 通道配置结构体 @@ -93,6 +96,11 @@ import ble_service private var astChannel: FlutterMethodChannel? private var astEventChannel: FlutterEventChannel? internal var astEventSink: FlutterEventSink? + // 通话翻译 TTS 回灬事件通道(与 Android 的 ast_tts_events 对齐) + private var astTtsEventChannel: FlutterEventChannel? + internal var astTtsEventSink: FlutterEventSink? + // 通话翻译 TTS 发送计数,节流日志 + private var astTtsEmitCount: Int64 = 0 // 双向 AST 服务:A(己方)和 B(对方),与 Android 对齐 private let azureAstHelperA = IntegratedSpeechTranslationService() private let azureAstHelperB = IntegratedSpeechTranslationService() @@ -128,6 +136,10 @@ import ble_service // 设备产品配置 broadcastpeertranslate:true=播报并启用 gate;false/未下发=不播报且 gate 永不触发。默认 false。 private var broadcastPeerTranslate: Bool = false + // 杰理 SCO PCM 推送计数(每 100 帧打一次日志,避免刷屏) + private var astAudioPushCountA: Int64 = 0 + private var astAudioPushCountB: Int64 = 0 + fileprivate func pushCallBPcm(_ data: Data) { guard broadcastPeerTranslate else { return } callBPcmPlayer.feed(data) @@ -145,6 +157,68 @@ import ble_service return Data(count: data.count) } + /// 把杰理 SCO 上行 PCM(己方麦克风)按当前 provider 推到 A 路 AST。 + fileprivate func pushAstAudioToA(_ data: Data) { + astAudioPushCountA &+= 1 + if astAudioPushCountA % 100 == 1 { + let rms = Self.rmsOfPCM16LE(data) + let head = Self.hexPreview(data, 16) + os_log("pushAstAudioToA: provider=%{public}@ size=%d count=%lld rms=%.1f head=%{public}@", + log: ctLog, type: .info, currentAstProvider, data.count, astAudioPushCountA, rms, head) + } + let payload = gateAgainstBPlayback(data) + switch currentAstProvider { + case "volcano": + _ = doubaoAstHelperA.pushAudioData(payload) + case "alibaba": + _ = bailianAstHelperA.pushAudioData(payload) + default: + azureAstHelperA.pushAudioData(audioData: payload) + } + } + + /// 把杰理 SCO 下行 PCM(对端通话音)按当前 provider 推到 B 路 AST。 + fileprivate func pushAstAudioToB(_ data: Data) { + astAudioPushCountB &+= 1 + if astAudioPushCountB % 100 == 1 { + let rms = Self.rmsOfPCM16LE(data) + let head = Self.hexPreview(data, 16) + os_log("pushAstAudioToB: provider=%{public}@ size=%d count=%lld rms=%.1f head=%{public}@", + log: ctLog, type: .info, currentAstProvider, data.count, astAudioPushCountB, rms, head) + } + let payload = gateAgainstBPlayback(data) + switch currentAstProvider { + case "volcano": + _ = doubaoAstHelperB.pushAudioData(payload) + case "alibaba": + _ = bailianAstHelperB.pushAudioData(payload) + default: + azureAstHelperB.pushAudioData(audioData: payload) + } + } + + /// 计算 PCM16LE 的 RMS 能量(静音检测用)。返回 0 表示全 0 样本。 + private static func rmsOfPCM16LE(_ data: Data) -> Double { + guard data.count >= 2 else { return 0 } + let count = data.count / 2 + var sumSq: Double = 0 + data.withUnsafeBytes { (raw: UnsafeRawBufferPointer) in + let p = raw.bindMemory(to: Int16.self) + for i in 0.. String { + let take = min(n, data.count) + if take == 0 { return "" } + return data.prefix(take).map { String(format: "%02x", $0) }.joined() + } + // 音频数据相关 private var audioDataEventChannel: FlutterEventChannel? internal var audioDataEventSink: FlutterEventSink? @@ -200,6 +274,9 @@ import ble_service case .ast: self.astChannel = methodChannel self.astEventChannel = eventChannel + case .astTts: + // 不走 setupChannel 路径(在 register 里单独注册),这里仅为了详尽性。 + break } } /** @@ -224,6 +301,10 @@ private func sendEvent(_ event: [String: Any], type: EventType) { case .ast: eventSink = astEventSink logMessage = "无法发送AST事件:事件通道未准备好" + case .astTts: + // .astTts 不走 sendEvent 通用路径(单独走 pushAstTtsFrame),这里仅为了详尽性。 + eventSink = astTtsEventSink + logMessage = "无法发送AST-TTS事件:事件通道未准备好" } guard eventSink != nil else { @@ -273,6 +354,11 @@ private func sendEvent(_ event: [String: Any], type: EventType) { audioDataEventChannel.setStreamHandler(BaseEventStreamHandler(instance: instance, eventType: .audioData)) instance.audioDataEventChannel = audioDataEventChannel + // 通话翻译 TTS 回灬事件通道(只有事件通道,与 Android 对齐) + let astTtsEventChannel = FlutterEventChannel(name: "azure_speech/ast_tts_events", binaryMessenger: registrar.messenger()) + astTtsEventChannel.setStreamHandler(BaseEventStreamHandler(instance: instance, eventType: .astTts)) + instance.astTtsEventChannel = astTtsEventChannel + // 设置讯飞原生日志回调,通过 EventChannel 回传 Dart instance.azureAsrHelper.nativeLogCallback = { [weak instance] level, message in instance?.sendAsrEvent(["type": "nativeLog", "level": level, "message": message]) @@ -875,6 +961,31 @@ private func sendAudioDataEvent(_ event: [String: Any]) { os_log("[CALL] setBroadcastPeerTranslate=%{public}@", log: ctLog, type: .info, enabled ? "true" : "false") result(true) + // Dart 把杰理 runtime 解码后的 SCO PCM 推进来(与 Android `pushExternalAudio` 对齐): + // leg = "A" / "UPLINK" → 本机麦克风 → A 路 AST + // leg = "B" / "DOWNLINK" → 对端通话音 → B 路 AST + // pcm 必须是 16kHz / mono / 16bit / little-endian。 + case "pushExternalAudio": + let args = call.arguments as? [String: Any] + let leg = (args?["leg"] as? String)?.uppercased() ?? "" + let pcm: Data = { + if let typed = args?["pcm"] as? FlutterStandardTypedData { return typed.data } + return Data() + }() + if pcm.isEmpty { + result(false); return + } + switch leg { + case "A", "UPLINK": + pushAstAudioToA(pcm) + case "B", "DOWNLINK": + pushAstAudioToB(pcm) + default: + result(FlutterError(code: "BAD_LEG", message: "leg must be A/uplink or B/downlink, got=\(leg)", details: nil)) + return + } + result(true) + case "dispose": // 让 init 的 Task 在 sleep 之后比对 generation 时直接 return,避免落到已 dispose 的 helper 上 _ = nextAstInitGeneration() @@ -1083,6 +1194,36 @@ private func sendAudioDataEvent(_ event: [String: Any]) { } } + /// 通话翻译下行TTS PCM抩回 Dart,由 translation_controller 转发给 device_jieli 回灬耳机。 + /// - Parameters: + /// - leg: "A" → 对端听(SCO_UP_LINK);"B" → 本机听(SCO_DOWN_LINK) + /// - pcm: 16bit、单声道、16kHz PCM;段尾帧允许传空 + /// - isFinal: 是否是该段 utterance 的段尾(与 Android 合约一致,native 依靠 isFinal=true 触发整段下发) + internal func pushAstTtsFrame(leg: String, pcm: Data, isFinal: Bool) { + guard let sink = astTtsEventSink else { + // 调试:报警一次,避免刷屏 + astTtsEmitCount &+= 1 + if astTtsEmitCount <= 5 || astTtsEmitCount % 200 == 0 { + NSLog("[AST-TTS] DROPPED leg=%@ pcm=%dB isFinal=%@ (no sink yet, emitCount=%lld)", + leg, pcm.count, isFinal ? "true" : "false", astTtsEmitCount) + } + return + } + astTtsEmitCount &+= 1 + if isFinal || astTtsEmitCount <= 3 || astTtsEmitCount % 100 == 0 { + NSLog("[AST-TTS] emit leg=%@ pcm=%dB isFinal=%@ (#%lld)", + leg, pcm.count, isFinal ? "true" : "false", astTtsEmitCount) + } + let payload: [String: Any] = [ + "leg": leg, + "pcm": FlutterStandardTypedData(bytes: pcm), + "final": isFinal, + ] + DispatchQueue.main.async { + sink(payload) + } + } + /// 发送AST事件到Flutter层 internal func sendAstEvent(_ event: [String: Any]) { let eventType = event["type"] as? String ?? "unknown" @@ -1444,6 +1585,9 @@ private class BaseEventStreamHandler: NSObject, FlutterStreamHandler { print("音频数据事件通道已准备好") case .ast: instance?.astEventSink = events + case .astTts: + instance?.astTtsEventSink = events + print("[AST-TTS] event channel ready (azure_speech/ast_tts_events)") } return nil } @@ -1459,6 +1603,9 @@ private class BaseEventStreamHandler: NSObject, FlutterStreamHandler { print("音频数据事件通道已取消") case .ast: instance?.astEventSink = nil + case .astTts: + instance?.astTtsEventSink = nil + print("[AST-TTS] event channel cancelled") } return nil } @@ -1545,11 +1692,14 @@ private class DoubaoCallbackProxy: DoubaoE2ETranslateHelper.Callback { func onPartialAudio(sessionId: String, data: Data) { if data.isEmpty { return } + // 新路径:同时抩到 ast_tts_events sink,让通话翻译返回耳机走 device_jieli。 + // isFinal=false,native 会累积,等 onSessionFinished 返回后一次性下发。 + plugin?.pushAstTtsFrame(leg: serviceId, pcm: data, isFinal: false) if serviceId == "A" { - // A 路:翻译后的音频通过 BLE 写到耳机外放给对方 + // A 路:翻译后的音频通过 BLE 写到耳机外放给对方(遗留,已 deprecated noop) BleService.shared.writeExternalAudioData(data: data) } else { - // B 路:对方的翻译音频,本地 PCM 播放器直接播 + // B 路:对方的翻译音频,本地 PCM 播放器直接播(遗留) plugin?.pushCallBPcm(data) } } @@ -1559,6 +1709,9 @@ private class DoubaoCallbackProxy: DoubaoE2ETranslateHelper.Callback { let original = plugin?.doubaoFinalSourceTextCache.removeValue(forKey: key) ?? "" os_log("[DoubaoCallback-%{public}@] onSessionFinished finalText=%{public}@ original=%{public}@ audioLen=%d", log: ctLog, type: .info, serviceId, finalText, original, finalAudio.count) + // 段尾合约(与 Android markEnd 对齐):**不**重复写 finalAudio,只 emit 空 PCM + isFinal=true。 + // partial 阶段已累积到 native,这里只是告诉 device_jieli “这段结束了,可以整段下发”。 + plugin?.pushAstTtsFrame(leg: serviceId, pcm: Data(), isFinal: true) plugin?.sendAstEvent([ "type": "translated", "serviceId": serviceId, @@ -1573,6 +1726,8 @@ private class DoubaoCallbackProxy: DoubaoE2ETranslateHelper.Callback { func onSessionError(sessionId: String, code: Int, message: String) { os_log("[DoubaoCallback-%{public}@] onSessionError code=%d msg=%{public}@", log: ctLog, type: .error, serviceId, code, message) + // 错误也要 emit isFinal=true,避免 native 累积 buffer 残留(与 Android markEnd 对齐)。 + plugin?.pushAstTtsFrame(leg: serviceId, pcm: Data(), isFinal: true) plugin?.sendAstEvent([ "type": "error", "serviceId": serviceId, @@ -1583,6 +1738,15 @@ private class DoubaoCallbackProxy: DoubaoE2ETranslateHelper.Callback { ]) } + /// 句级 TTS 结束。豆包会在每说完一句后发 ttssentenceEnd(351),不是会话级 sessionFinished(152)。 + /// 这里 emit 空 PCM + isFinal=true,使 device_jieli 端把累积的整段 PCM 立即编码下发给 SDK。 + /// 不走 onSessionFinished 的理由:那一条会触发 WS cancel + 会话结束事件,与句级语义不符。 + func onSentenceEnd(sessionId: String) { + os_log("[DoubaoCallback-%{public}@] onSentenceEnd sessionId=%{public}@", + log: ctLog, type: .info, serviceId, sessionId) + plugin?.pushAstTtsFrame(leg: serviceId, pcm: Data(), isFinal: true) + } + func onFinalTranslatedText(sessionId: String, finalText: String) { let key = "\(serviceId):\(sessionId)" let original = plugin?.doubaoFinalSourceTextCache.removeValue(forKey: key) ?? "" @@ -1678,6 +1842,8 @@ private class AliyunCallbackProxy: AliyunBailianE2EHelper.Callback { func onPartialAudio(sessionId: String, data: Data) { if data.isEmpty { return } + // 新路径:同时抩到 ast_tts_events sink,走 device_jieli 回灬耳机。 + plugin?.pushAstTtsFrame(leg: serviceId, pcm: data, isFinal: false) if serviceId == "A" { BleService.shared.writeExternalAudioData(data: data) } else { @@ -1690,6 +1856,8 @@ private class AliyunCallbackProxy: AliyunBailianE2EHelper.Callback { let original = sourceTextCache.removeValue(forKey: key) ?? "" os_log("[AliyunCallback-%{public}@] onSessionFinished finalText=%{public}@ original=%{public}@ audioLen=%d", log: ctLog, type: .info, serviceId, finalText, original, finalAudio.count) + // 段尾合约(与 Android markEnd 对齐):**不**重复写 finalAudio,只 emit 空 PCM + isFinal=true。 + plugin?.pushAstTtsFrame(leg: serviceId, pcm: Data(), isFinal: true) plugin?.sendAstEvent([ "type": "translated", "serviceId": serviceId, @@ -1704,6 +1872,8 @@ private class AliyunCallbackProxy: AliyunBailianE2EHelper.Callback { func onSessionError(sessionId: String, code: Int, message: String) { os_log("[AliyunCallback-%{public}@] onSessionError code=%d msg=%{public}@", log: ctLog, type: .error, serviceId, code, message) + // 错误也要 emit isFinal=true,避免 native 累积 buffer 残留(与 Android markEnd 对齐)。 + plugin?.pushAstTtsFrame(leg: serviceId, pcm: Data(), isFinal: true) plugin?.sendAstEvent([ "type": "error", "serviceId": serviceId, diff --git a/local_plugins/azure_speech/ios/azure_speech/Sources/azure_speech/AzureTtsHelper.swift b/local_plugins/azure_speech/ios/azure_speech/Sources/azure_speech/AzureTtsHelper.swift index 87c112dc6..d767eeac6 100644 --- a/local_plugins/azure_speech/ios/azure_speech/Sources/azure_speech/AzureTtsHelper.swift +++ b/local_plugins/azure_speech/ios/azure_speech/Sources/azure_speech/AzureTtsHelper.swift @@ -1610,16 +1610,25 @@ private func applyAudioSessionForTTS() -> Bool { if self.currentRecognitionMode == "phone_call" { + // 设计:对齐 Android `BleAgent` 的"设备录音模式" —— 上行 BLE,下行 + // 让系统自由路由。Android 走 `AudioTrack` USAGE_MEDIA,系统连了 A2DP + // 自然走 A2DP,没连就走手机扬声器,不强制任何一边。 + // + // 之前 iOS 在没耳机分支里塞 `.defaultToSpeaker` + 下面 1667 行还会再来 + // 一次 `overrideOutputAudioPort(.speaker)` —— 等于"无论如何都打到手机 + // 扬声器"。结果就是用户配对了 A2DP 也没用(被 override 抢回去), + // AI 对话播报永远从手机出。 + // + // 改成 `.allowBluetoothA2DP` 两个分支都加;没配对 A2DP 的设备上 + // iOS 默认走手机扬声器(不需要我们 override),配对了就自动走耳机。 desiredCategory = .playAndRecord + desiredMode = .default + desiredOptions = [.allowBluetoothA2DP] if hasHeadphones { - desiredMode = .default - desiredOptions = [.allowBluetoothA2DP] + // 用手机麦做兜底(设备录音模式下其实不用,但保留与之前一致) if let inputs = audioSession.availableInputs, let builtInMic = inputs.first(where: { $0.portType == .builtInMic }) { try? audioSession.setPreferredInput(builtInMic) } - } else { - desiredMode = .voiceChat - desiredOptions = [.allowBluetooth, .defaultToSpeaker] } // 不再 mixWithOthers:TTS 期间需要打断外部/内部其他音频 } else if self.currentRecognitionMode == "push_to_talk" || self.currentRecognitionMode == "normal" || self.currentRecognitionMode == "ble_wakeup" { @@ -1664,9 +1673,9 @@ private func applyAudioSessionForTTS() -> Bool { } try audioSession.setActive(true) self.internalSessionActive = true - if self.currentRecognitionMode == "phone_call", !hasHeadphones { - _ = try? audioSession.overrideOutputAudioPort(.speaker) - } + // 注:原来这里在 phone_call 没耳机时 override 到 speaker, + // 跟"设备录音模式 下行让系统自由路由"的设计冲突,已删除。 + // 想强制扬声器的场景请在调用方显式做,不要藏在 TTS 内部。 break } catch { if attempt == 2 { diff --git a/local_plugins/azure_speech/ios/azure_speech/Sources/azure_speech/DoubaoE2ETranslateHelper.swift b/local_plugins/azure_speech/ios/azure_speech/Sources/azure_speech/DoubaoE2ETranslateHelper.swift index 6bbf935f7..a81291435 100644 --- a/local_plugins/azure_speech/ios/azure_speech/Sources/azure_speech/DoubaoE2ETranslateHelper.swift +++ b/local_plugins/azure_speech/ios/azure_speech/Sources/azure_speech/DoubaoE2ETranslateHelper.swift @@ -22,6 +22,10 @@ class DoubaoE2ETranslateHelper: NSObject, URLSessionWebSocketDelegate { func onPartialAudio(sessionId: String, data: Data) func onSessionFinished(sessionId: String, finalText: String, finalAudio: Data) func onSessionError(sessionId: String, code: Int, message: String) + /// 句级结束:豆包发的是 `ttssentenceEnd (351)`,不是会话级 `sessionFinished (152)`。 + /// 用来告诉调用方 “这一句 TTS PCM 发完了,应立即把 native 端累积的段所有 PCM 制作为一整段下发”。 + /// 与 Android `markEnd` 合约对齐。 + func onSentenceEnd(sessionId: String) } /** @@ -75,6 +79,11 @@ class DoubaoE2ETranslateHelper: NSObject, URLSessionWebSocketDelegate { private var pumpTimer: DispatchSourceTimer? private let pumpQueue = DispatchQueue(label: "com.azure.speech.DoubaoE2E.pump", qos: .userInitiated) + // pushAudioData 日志节流:累计调用次数与字节数,每 50 次打印一次 + private var pushAudioLogCount: Int = 0 + private var pushAudioLogBytes: Int = 0 + private let pushAudioLogInterval: Int = 50 + /** * 初始化助手(异步) * 返回是否成功触发了连接逻辑 @@ -202,20 +211,45 @@ class DoubaoE2ETranslateHelper: NSObject, URLSessionWebSocketDelegate { * 等首条服务端消息到达再 flush 进 audioSendBuffer。 */ func pushAudioData(_ data: Data) -> Bool { - if isDisposed { return false } - if data.isEmpty { return true } - if !isStarted || !isWebSocketConnected { + if isDisposed { + os_log("pushAudioData skipped: isDisposed=true, size=%{public}d", log: log, type: .info, data.count) + return false + } + if data.isEmpty { + os_log("pushAudioData received empty data", log: log, type: .info) + return true + } + let routedToPending = (!isStarted || !isWebSocketConnected) + if routedToPending { lock.lock() while pendingAudioData.count >= maxPendingAudioChunks { pendingAudioData.removeFirst() } pendingAudioData.append(data) + let pendingCount = pendingAudioData.count lock.unlock() + pushAudioLogCount += 1 + pushAudioLogBytes += data.count + if pushAudioLogCount % pushAudioLogInterval == 1 { + os_log("pushAudioData -> pending: size=%{public}d, pendingCount=%{public}d, totalCalls=%{public}d, totalBytes=%{public}d, isStarted=%{public}@, isWsConnected=%{public}@", + log: log, type: .info, + data.count, pendingCount, pushAudioLogCount, pushAudioLogBytes, + isStarted ? "true" : "false", + isWebSocketConnected ? "true" : "false") + } return true } audioSendBufferLock.lock() audioSendBuffer.append(data) + let bufferSize = audioSendBuffer.count audioSendBufferLock.unlock() + pushAudioLogCount += 1 + pushAudioLogBytes += data.count + if pushAudioLogCount % pushAudioLogInterval == 1 { + os_log("pushAudioData -> buffer: size=%{public}d, bufferSize=%{public}d, totalCalls=%{public}d, totalBytes=%{public}d", + log: log, type: .info, + data.count, bufferSize, pushAudioLogCount, pushAudioLogBytes) + } return true } @@ -538,6 +572,21 @@ class DoubaoE2ETranslateHelper: NSObject, URLSessionWebSocketDelegate { return } + // 句级 TTS 结束:豆包每说完一句发一次 ttssentenceEnd(351), + // 此时应立即触发 isFinal=true,让 device_jieli 把累积的 PCM 一次性下发给 SDK。 + // 与会话级 sessionFinished(152) 的关键区别:不关闭 WS,不清空 recvText/recvAudio、 + // 后续的 startNewSubSession 由 translationSubtitleEnd 控制。 + if event == .ttssentenceEnd { + os_log("TTSSentenceEnd: emit sentence isFinal", log: log, type: .info) + // 先 flush audioChunkBuffer 里不足 1280 倍数的尾料,避免最后几十字节永远满不下发。 + if !audioChunkBuffer.isEmpty { + callback?.onPartialAudio(sessionId: sessionId, data: audioChunkBuffer) + audioChunkBuffer = Data() + } + callback?.onSentenceEnd(sessionId: sessionId) + return + } + if !audioData.isEmpty { recvAudio.append(audioData) // 极高频(音频帧),取消 info 日志 @@ -609,6 +658,15 @@ class DoubaoE2ETranslateHelper: NSObject, URLSessionWebSocketDelegate { webSocket?.cancel(with: .normalClosure, reason: "Completed".data(using: .utf8)) return } + // JSON 兜底:句级结束也走 onSentenceEnd。 + if event == "TTSSentenceEnd" { + if !audioChunkBuffer.isEmpty { + callback?.onPartialAudio(sessionId: sessionId, data: audioChunkBuffer) + audioChunkBuffer = Data() + } + callback?.onSentenceEnd(sessionId: sessionId) + return + } if let audioB64 = (obj["data"] as? String), let audioData = Data(base64Encoded: audioB64) { recvAudio.append(audioData) processAudioChunk(incoming: audioData, multiple: 1280) diff --git a/local_plugins/azure_speech/ios/azure_speech/Sources/tools/SimpleAudioReceiver.swift b/local_plugins/azure_speech/ios/azure_speech/Sources/tools/SimpleAudioReceiver.swift index c620aacfe..c9e43525b 100644 --- a/local_plugins/azure_speech/ios/azure_speech/Sources/tools/SimpleAudioReceiver.swift +++ b/local_plugins/azure_speech/ios/azure_speech/Sources/tools/SimpleAudioReceiver.swift @@ -139,12 +139,19 @@ public class SimpleAudioReceiver: NSObject { do { try configureAudioSession() - - let isHybridExternalMode = audioSourceType == .external && (currentRecognitionMode == "phone_call" || currentRecognitionMode == "push_to_talk") - if audioSourceType == .microphone || isHybridExternalMode { + // 见 configureAudioSession 上方注释:iOS 已对齐 Android `BleAgent` — + // useBle=true → audioSourceType=.external → 永远走 runExternalCapture, + // 由 device_jieli 的 AssistantAudioEvent → AgentService.pushAudioData 注入。 + // 之前这里有个 isHybridExternalMode(external + phone_call/push_to_talk) + // 会错路到 runMicrophoneCapture(),试图开 AVAudioEngine 抓手机麦 —— 但 + // configureAudioSession 在 .external 分支已经把 session 设成 .playback, + // 不允许 input,AVAudioEngine 起不来抛 OSStatus -50 paramErr,日志里 + // 看到的 "配置或启动音频捕获失败" + "Failed to set properties, error: -50" + // 就是这条线。 + if audioSourceType == .microphone { runMicrophoneCapture() - } else { // True external mode + } else { // .external runExternalCapture() } } catch { @@ -161,10 +168,26 @@ public class SimpleAudioReceiver: NSObject { var desiredCategory: AVAudioSession.Category var desiredMode: AVAudioSession.Mode var desiredOptions: AVAudioSession.CategoryOptions - - let isHybridExternalMode = audioSourceType == .external && (currentRecognitionMode == "phone_call" || currentRecognitionMode == "push_to_talk") - if audioSourceType == .microphone || isHybridExternalMode { + // 设计:参考 Android `BleAgent` 路径(上行 BLE / 下行交给系统路由)。 + // + // 之前 iOS 把 (.external && phone_call/push_to_talk) 当成"混合模式", + // 仍按 .playAndRecord + 强制 builtInMic 走 — 等价于"用 BLE 上行 + 手机麦 + // 兜底"。结果两个副作用: + // 1) 设了 `setPreferredInput(builtInMic)`,iOS 把音频会话归到 voice + // record 类,下行 TTS 默认路由就被拉到内置扬声器; + // 2) 在非 A2DP 配对场景里加了 `.defaultToSpeaker`,再次把 A2DP 出口顶掉。 + // Android `BleAgent.kt` 这个模式根本不碰手机麦 — `useBle=true` → + // ASR 用 .external,全部 PCM 由 device_jieli 的 AssistantAudioEvent + // 经 `pushAudioData` 灌入。下行 TTS 直接 `AudioTrack` USAGE_MEDIA, + // 系统自己决定走 A2DP 还是手机扬声器。 + // + // 所以 iOS 也按"纯播放"配置:.playback + .spokenAudio + .allowBluetoothA2DP, + // 不再申请录音权限通道,也不再强制 builtInMic / defaultToSpeaker。 + // 这样耳机以经典蓝牙配对过的话 TTS 走 A2DP;没配过的话回退手机扬声器 + // —— 跟 Android 行为对齐。 + + if audioSourceType == .microphone { // --- 麦克风输入逻辑 (包括混合模式) --- if currentRecognitionMode == "phone_call" { if isHeadphones { @@ -217,7 +240,10 @@ public class SimpleAudioReceiver: NSObject { try audioSession.setActive(true, options: .notifyOthersOnDeactivation) // --- 路由设置 --- - if audioSourceType == .microphone || isHybridExternalMode { + // 见上方注释:iOS 已对齐 Android `BleAgent` —— 设备录音模式下 + // audioSourceType 永远是 .external,根本不进 .microphone 分支, + // 所以路由设置只在"真的用手机麦"时才执行。 + if audioSourceType == .microphone { // 为需要麦克风的场景设置输入输出 if desiredCategory == .playAndRecord { if isHeadphones { @@ -235,12 +261,6 @@ public class SimpleAudioReceiver: NSObject { try audioSession.setPreferredInput(builtInMic) print("耳机模式下,为 \(currentRecognitionMode) 模式强制设置内置麦克风") } - } else if isHybridExternalMode { - // 混合模式: 强制使用内置麦克风 - if let builtInMic = inputs.first(where: { $0.portType == .builtInMic }) { - try audioSession.setPreferredInput(builtInMic) - print("混合外部模式: 首选输入已设置为内置麦克风") - } } else if let btInput = inputs.first(where: { $0.portType == .bluetoothHFP }), isHeadphones { // 其他耳机模式: 优先使用蓝牙耳机麦克风 try audioSession.setPreferredInput(btInput) diff --git a/local_plugins/ble_service/ios/ble_service/Package.swift b/local_plugins/ble_service/ios/ble_service/Package.swift index e5d2b6c9b..2b42832f5 100644 --- a/local_plugins/ble_service/ios/ble_service/Package.swift +++ b/local_plugins/ble_service/ios/ble_service/Package.swift @@ -13,8 +13,11 @@ let package = Package( .target( name: "ble_service", dependencies: [ - "opus", - "JLAudioUnitKit" + "opus" + // 注:JLAudioUnitKit 已移除 —— ble_service 整体在向 device_jieli + // 迁移,PCM→OPUS 编码路径砍掉以解开 SPM "Multiple commands produce + // JLAudioUnitKit.framework" 冲突(device_jieli 已经 vendor 同名 framework)。 + // 详见 Sources/ble_service/SwiftOpusAudioProcessor.swift 顶部注释。 ], path: "Sources/ble_service", linkerSettings: [ @@ -27,10 +30,6 @@ let package = Package( .binaryTarget( name: "opus", // 改为与 xcframework 内部模块名称一致 path: "opus.xcframework" - ), - .binaryTarget( - name: "JLAudioUnitKit", - path: "JLAudioUnitKit.xcframework" ) ] ) \ No newline at end of file diff --git a/local_plugins/ble_service/ios/ble_service/Sources/ble_service/SwiftOpusAudioProcessor.swift b/local_plugins/ble_service/ios/ble_service/Sources/ble_service/SwiftOpusAudioProcessor.swift index 3c84f0a62..9e314f5f7 100644 --- a/local_plugins/ble_service/ios/ble_service/Sources/ble_service/SwiftOpusAudioProcessor.swift +++ b/local_plugins/ble_service/ios/ble_service/Sources/ble_service/SwiftOpusAudioProcessor.swift @@ -1,7 +1,24 @@ import Foundation import AVFoundation import opus -import JLAudioUnitKit + +// MARK: - ble_service 弃用迁移期说明 +// ---------------------------------------------------------------------------- +// 整个 ble_service plugin 在迁移到 device_jieli。 +// +// 编码路径(PCM → OPUS → BLE 下发到耳机外放)原本由 JLAudioUnitKit 提供, +// 现已被砍掉以解开 "Multiple commands produce JLAudioUnitKit.framework" 编译 +// 冲突(两个 SPM plugin 都 vendor 同名 binaryTarget)。 +// +// 砍掉后受影响的 native 调用(暂时变成 noop): +// - AzureSpeechPlugin.writeExternalAudioData → BleService.shared.writeExternalAudioData +// (通话翻译 A 路 / TTS 把 PCM 编码发到耳机外放给对方) +// - AgentServiceImpl 在 ble_wakeup 播报结束后 BleService.shared.openB1Encoder() +// (重启耳机端编码器) +// +// 迁移后这些路径应改走 device_jieli 的 RcspTranslationRuntime / AssistantBridge 下行。 +// 短期内保留方法签名让所有调用方编译通过;废弃时机由 plugin 整体下线决定。 +// ---------------------------------------------------------------------------- @available(iOS 13.0, *) class SwiftOpusAudioProcessor: NSObject { @@ -25,20 +42,12 @@ class SwiftOpusAudioProcessor: NSObject { private var channels: Int32 = 1 private let maxFrameSize: Int32 = 640 // 为16kHz优化:40ms * 16000Hz = 640 samples - // MARK: - JLOpusEncoder 编码器相关属性 - private var jlOpusEncoder: JLOpusEncoder? - private var encoderFormat: JLOpusFormat? - - // MARK: - PCM数据队列相关属性 - /// PCM数据缓存队列 - private var pcmDataQueue = Data() - /// 队列访问锁,确保线程安全 - private let queueLock = NSLock() - /// 每次处理的数据块大小(字节) - private let chunkSize = 640 - /// 异步处理队列 - private var processingQueue: DispatchQueue? - + // MARK: - 编码器(已废弃) + // 原本通过 JLAudioUnitKit 提供 OPUS encoding,迁移到 device_jieli 后这里全部 + // 不再做实际工作。保留 isEncodingActive 仅用于让外部状态查询不变。 + // 上次 noop 调用日志的时间(节流,避免 encodePCMData 高频调用时日志刷屏) + private var lastNoopEncodeLogMs: Int64 = 0 + // MARK: - 初始化和清理 override init() { @@ -367,145 +376,38 @@ class SwiftOpusAudioProcessor: NSObject { } - /// 启动JLOpusEncoder编码(完善版本) - /// - Parameters: - /// - sampleRate: 采样率(默认16000Hz) - /// - channels: 声道数(默认1) - /// - frameRate: 帧长度(默认20ms) - /// - isHeader: 是否包含头部信息 - /// - Returns: 是否启动成功 - func startEncoding(sampleRate: Int32 = 16000, - channels: Int32 = 1, - frameRate: Int32 = 20, - isHeader: Bool = false) -> Bool { - if isEncodingActive { - return true - } - - print("启动JLOpusEncoder编码 - 采样率: \(sampleRate)Hz, 声道: \(channels), 帧长度: \(frameRate)ms, 头部: \(isHeader)") - - // 创建JLOpusFormat配置 - encoderFormat = JLOpusFormat.defaultFormats() - encoderFormat?.sampleRate = Int32(sampleRate) - encoderFormat?.channels = Int32(channels) - encoderFormat?.frameDuration = Int32(frameRate) - encoderFormat?.hasDataHeader = isHeader - - // 根据配置计算数据大小 - if channels == 1 { - encoderFormat?.dataSize = frameRate == 20 ? 40 : 80 // 20ms=40bytes, 40ms=80bytes - } else { - encoderFormat?.dataSize = frameRate == 20 ? 80 : 160 // 双声道翻倍 - } - - guard let format = encoderFormat else { - print("编码器格式配置失败") - return false - } - - // 初始化JLOpusEncoder - jlOpusEncoder = JLOpusEncoder(format: format, delegate: self) - - guard jlOpusEncoder != nil else { - print("JLOpusEncoder初始化失败") - return false - } - + /// 启动 OPUS 编码(已废弃 / noop) + /// 迁移到 device_jieli 后保留方法签名让 native 调用方编译通过。 + /// 调用方应改走 Jielihome / device_jieli 的下行链路。 + @discardableResult + func startEncoding(sampleRate: Int32 = 16000, + channels: Int32 = 1, + frameRate: Int32 = 20, + isHeader: Bool = false) -> Bool { + if isEncodingActive { return true } isEncodingActive = true - print("JLOpusEncoder启动成功") - + print("[ble_service:deprecated] startEncoding noop (sampleRate=\(sampleRate) ch=\(channels) frameRate=\(frameRate)) — migrate to device_jieli") return true } - - /// 停止JLOpusEncoder编码(完善版本) - /// - Returns: 是否停止成功 + + /// 停止 OPUS 编码(已废弃 / noop) + @discardableResult func stopEncoding() -> Bool { - if !isEncodingActive { - return false - } - + guard isEncodingActive else { return false } isEncodingActive = false - - // 清空PCM数据队列 - clearPCMQueue() - - // 释放JLOpusEncoder资源 - jlOpusEncoder?.opusOnRelease() - jlOpusEncoder = nil - encoderFormat = nil - processingQueue = nil - - print("JLOpusEncoder已停止") - + print("[ble_service:deprecated] stopEncoding noop — migrate to device_jieli") return true } - - /// 编码PCM音频数据 - /// - Parameter pcmData: PCM音频数据 - func encodePCMData(_ pcmData: Data) { - guard isEncodingActive, let encoder = jlOpusEncoder else { return } - guard !pcmData.isEmpty else { return } - - // 将新数据加入队列 - queueLock.lock() - pcmDataQueue.append(pcmData) - queueLock.unlock() - - // 异步处理队列中的数据 - processQueuedData() - } - - /// 处理队列中的PCM数据 - private func processQueuedData() { - guard isEncodingActive, let encoder = jlOpusEncoder else { - return - } - - // 使用专用队列进行异步处理 - if processingQueue == nil { - processingQueue = DispatchQueue(label: "com.opus.processing", qos: .userInitiated) - } - - processingQueue?.async { [weak self, weak encoder] in - guard let self = self, let encoder = encoder else { return } - - while self.isEncodingActive { - var chunkData: Data? - self.queueLock.lock() - if self.pcmDataQueue.count >= self.chunkSize { - chunkData = self.pcmDataQueue.subdata(in: 0.. 0 { - let availableBytes = self.pcmDataQueue.count - let silentBytesNeeded = self.chunkSize - availableBytes - let silentData = Data(repeating: 0, count: silentBytesNeeded) - chunkData = Data() - chunkData?.append(self.pcmDataQueue) - chunkData?.append(silentData) - self.pcmDataQueue.removeAll() - } - self.queueLock.unlock() - - if let dataToEncode = chunkData { - guard self.isEncodingActive else { break } - encoder.opusEncode(dataToEncode) - } else { - break - } - } + /// 编码 PCM 音频数据(已废弃 / noop,日志节流到 1s 一条) + func encodePCMData(_ pcmData: Data) { + let now = Int64(Date().timeIntervalSince1970 * 1000) + if now - lastNoopEncodeLogMs >= 1000 { + lastNoopEncodeLogMs = now + print("[ble_service:deprecated] encodePCMData dropped \(pcmData.count) B (encoder removed; migrate to device_jieli)") } } - - /// 清空PCM数据队列 - private func clearPCMQueue() { - queueLock.lock() - pcmDataQueue.removeAll() - queueLock.unlock() - print("PCM数据队列已清空") - } - - + /// 清理所有资源 func cleanup() { stopDecoding() @@ -513,29 +415,5 @@ class SwiftOpusAudioProcessor: NSObject { } } -// MARK: - JLOpusEncoderDelegate -@available(iOS 13.0, *) -extension SwiftOpusAudioProcessor: JLOpusEncoderDelegate { - - /// JLOpusEncoder编码回调 - /// - Parameters: - /// - encoder: 编码器实例 - /// - data: 编码后的Opus数据 - /// - error: 错误信息 - func opusEncoder(_ encoder: JLOpusEncoder, data: Data?, error: (any Error)?) { - if let error = error { - print("Opus编码错误: \(error.localizedDescription)") - return - } - - guard let opusData = data, !opusData.isEmpty else { return } - - // 回调编码后的数据到主线程 - DispatchQueue.main.async { [weak self] in - self?.callback?.onEncodedDataReceived(data: opusData) - } - } -} - diff --git a/local_plugins/chat_api/ios/chat_api/Package.swift b/local_plugins/chat_api/ios/chat_api/Package.swift index 3fe0ccdb5..2e6a43d64 100644 --- a/local_plugins/chat_api/ios/chat_api/Package.swift +++ b/local_plugins/chat_api/ios/chat_api/Package.swift @@ -14,7 +14,9 @@ let package = Package( ], dependencies: [ .package(url: "https://github.com/MacPaw/OpenAI.git", exact: "0.4.3"), - .package(url: "https://github.com/modelcontextprotocol/swift-sdk.git", from: "0.9.0"), + // 改用本地副本:上游 swift-sdk 0.9.0 的 Package.swift 声明 swift-tools-version:6.0 + // 会在 Xcode 16 上把 sending 警告升级为错误。本地副本将其降为 5.10 规避。 + .package(path: "../../../swift_sdk_local"), .package(path: "../../../location_service/ios/location_service"), .package(path: "../../../music_service/ios/music_service"), .package(path: "../../../qq_music/ios/qq_music"), @@ -25,7 +27,7 @@ let package = Package( .target( name: "chat_api", dependencies: [ - .product(name: "MCP", package: "swift-sdk"), + .product(name: "MCP", package: "swift_sdk_local"), .product(name: "OpenAI", package: "OpenAI"), .product(name: "music-service", package: "music_service"), .product(name: "qq-music", package: "qq_music"), diff --git a/local_plugins/device_jieli/CHANGELOG.md b/local_plugins/device_jieli/CHANGELOG.md index 41cc7d819..c41ea00ea 100644 --- a/local_plugins/device_jieli/CHANGELOG.md +++ b/local_plugins/device_jieli/CHANGELOG.md @@ -1,3 +1,87 @@ +## 0.0.2 + +### iOS 端补全 / 与 Android 对齐(参考 `JIELI-IOS-Release`) + +#### 框架 +- 拷贝 `JIELI-IOS-Release/Libs/` 下全部 `.xcframework` + sample 项目里的 `JLAudioUnitKit.xcframework`(OPUS 编解码所需)到 `ios/Frameworks/`,通过 `vendored_frameworks` 引入。 +- `pubspec.yaml` 新增 `ios` 平台条目;`ios/device_jieli.podspec` 配置完成。 + +#### 与 Android 同名 / 同形态的核心通路(按 user 要求全量对齐) + +| 通路 | Android | iOS | +|---|---|---| +| 设备连接 | `ConnectFeature` → `JL_BluetoothManager.connect` + `setUseDeviceAuth(true)` | `ConnectFeature` → `JL_BLEMultiple.connectEntity` + `authEnable=true`;paired 后**自动调 `cmdTargetFeatureResult`** + `cmdGetSystemInfo(.COMMON)` 把 model 拉满,再外抛 `rcspInit` | +| 电量推送 | `OnRcspEventListener.onBatteryChange` → `battery` 事件 | `DeviceInfoEventForwarder` 订阅 `kJL_MANAGER_HEADSET_ADV` / `kJL_MANAGER_SYSTEM_INFO`,合成 `battery` 事件(带 `level/left/right/case` 字段,去重) | +| 通话状态 | `onPhoneCallStatusChange` → `phoneCallStatus` | `DeviceInfoEventForwarder` 订阅 `kJL_MANAGER_CALL_STATUS` | +| 通话翻译 mode=3 | `CallTranslationModeHandler` (uplink/downlink × OPUS 编解码) | `CallTranslationModeHandler` 完整复刻:`OpusStreamDecoder(channels=1, dataSize=40)` 分流 escoUp/escoDown,下行 PCM `OpusStreamEncoder` 编码后 `trWriteAudio(.escoUp/.escoDown)` | +| 通话翻译 mode=6(立体声)| `StereoCallTranslationModeHandler` + `PcmKit.splitStereo16` | `StereoCallTranslationModeHandler` 完整复刻:`OpusStreamDecoder(channels=2, dataSize=80)` → `PcmKit.splitStereo16` → uplink/downlink 两路 | +| MODE_CALL_TRANSLATION + OPUS 自动升级到 stereo | ✅ | ✅(`bypassStereoUpgrade=true` 可禁用,行为与 Android 一致) | +| AI 助理 | `JieliAssistantPort` (MODE_RECORD + STRATEGY_DEVICE_ALWAYS_RECORDING + OPUS) | `AssistantBridge` 复刻:通过 `TranslationSession.acquire` 拿独占所有权,`trStartTranslateMode(.onlyRecord, OPUS, ch=1)` + `recordtype=.byDevice`,`OpusStreamDecoder(channels=1, dataSize=40)` 解出 16k mono PCM → `assistantAudio` | +| 设备录音 | `JieliDeviceRecordPort` (mode=6 stereo + DEVICE_ALWAYS_RECORDING) | `DeviceRecordFeature` 复刻:`trStartTranslateMode(.callTranslateStereo, OPUS, ch=2)` + `recordtype=.byDevice`,`OpusStreamDecoder(channels=2, dataSize=80)` 解出 stereo PCM → `deviceRecordAudio` | +| OTA | 自实现 cmd-level 状态机 | 直接走 `JL_BLEMultiple.otaFunc(...)` 高层 API,结果回调映射到 `otaState` / `otaError` | + +#### TranslationSession 互斥模型 +iOS SDK 一台设备只有一个 `JLTranslationManager`,与 Android 同样要求"翻译 / 助理 / 设备录音"三选一互斥。新增 [TranslationSession](ios/Classes/core/TranslationSession.swift): +- 内部持有 `JLTranslationManager` 实例,自身作为 `JLTranslationManagerDelegate` +- 通过 `acquire(owner:)` / `release(owner:)` 协调当前会话所有者 +- 所有 SDK 回调(`onReceiveAudioData` / `onModeChange` / `onError` / `onSendAudioQueueOver` / `isOnCalling`)fan-out 到当前 owner + +#### 文件清单(`ios/Classes/`) +``` +JielihomePlugin.swift # Flutter 入口 +MethodRouter.swift # MethodChannel 路由 +EventDispatcher.swift # EventChannel 总线 +JieliHomeServer.swift # 单例 + per-device session + +core/TranslationSession.swift # 设备级翻译会话所有者协调 +audio/OpusStreamCodec.swift # JLOpusDecoder/Encoder 包装 +audio/PcmKit.swift # 16-bit stereo split / interleave + +event/BluetoothEventForwarder.swift # BLE 状态 / 连接通知 +event/CustomEventForwarder.swift # 厂商扩展指令 +event/DeviceInfoEventForwarder.swift # 电量 / 通话 / 系统信息 + +feature/ScanFeature.swift +feature/ConnectFeature.swift +feature/DeviceInfoFeature.swift +feature/CustomCmdFeature.swift +feature/OtaFeature.swift +feature/TranslationFeature.swift # 6-mode dispatcher +feature/translation/TranslationConstants.swift +feature/translation/TranslationModeHandler.swift +feature/translation/mode/RecordModeHandler.swift (mode=1 + RecordingTranslation mode=2) +feature/translation/mode/CallTranslationModeHandler.swift (mode=3) +feature/translation/mode/StereoCallTranslationModeHandler.swift (mode=6) +feature/translation/mode/AudioAndFaceModeHandlers.swift (mode=4 + mode=5) +feature/AssistantBridge.swift +feature/DeviceRecordFeature.swift +feature/SpeechFeature.swift # 状态机骨架(详见下方) +``` + +### 与 Android 实际差异 + +| 项 | Android | iOS | 影响 | +|---|---|---|---| +| `address` 含义 | BLE MAC | CoreBluetooth identifier (UUID) | iOS 系统对 BLE MAC 永久匿名;上层若用 address 做主键需要做厂商适配 | +| 录音策略 | 三选一:CUSTOM/ALWAYS/AUTO | 二选一:`.byPhone`(=CUSTOM) / `.byDevice`(=ALWAYS) | iOS SDK 不暴露 AUTO(VAD 自动启停),调用 `strategy="auto"` 时回退到 default | +| `versionCode` 字段 | SDK 有 numeric versionCode | SDK 只有 versionFirmware(字符串) | `deviceSnapshot` 里 versionCode 为 null | +| `sendCustomCmd` opCode | SDK 有专门字段 | iOS `JL_CustomManager.cmdCustomData:` 无 opCode 字段 | iOS 实现把 Dart 传入的 opCode 拼到 payload 头部(业务双方约定) | +| `OTA` 状态机 | 插件自实现 cmd 级状态机 | 直接走 SDK 高层 API | Dart `otaStart` 的 `blockSize` / `fileFlag` 参数 iOS 端忽略 | +| `speechStart/Stop`(cmd=4/5 通路) | 完整实现 | 仅状态机外抛 `speechStart/End`,**不拉真实音频** | iOS SDK 4.2 beta 没把 cmd=4/5 通路暴露成公开 Swift API;耳机硬件唤醒的上行帧通过翻译通路接管 | + +### 真机验证状态 + +| 子系统 | 单元自测 | 真机验证 | +|---|---|---| +| 扫描 / 连接 / 断开 | ✅ 编译通过 | ⬜ | +| `battery` / `phoneCallStatus` 推送 | ✅ | ⬜ | +| `deviceSnapshot` / `queryTargetInfo` / `sendCustomCmd` | ✅ | ⬜ | +| OTA | ✅ | ⬜ | +| 通话翻译 mode=3 + OPUS 上下行 | ✅ | ⬜ | +| 通话翻译 mode=6 立体声 | ✅ | ⬜ | +| AI 助理 (MODE_RECORD + byDevice + OPUS) | ✅ | ⬜ | +| 设备录音 (mode=6 + stereo + byDevice + OPUS) | ✅ | ⬜ | + ## 0.0.1 * TODO: Describe initial release. diff --git a/local_plugins/device_jieli/README.md b/local_plugins/device_jieli/README.md index d5eb0fde6..bc38ec0c9 100644 --- a/local_plugins/device_jieli/README.md +++ b/local_plugins/device_jieli/README.md @@ -1,15 +1,42 @@ -# jielihome +# device_jieli -JieLi Home SDK Flutter plugin +Flutter plugin around the JieLi (杰理) RCSP Bluetooth SDK. Provides a vendor-agnostic +MethodChannel / EventChannel surface (`device_jieli/method`, `device_jieli/event`) +so Dart-side code can scan / connect / query / OTA / translate against JieLi earpieces +on both Android and iOS. -## Getting Started +## Platforms -This project is a starting point for a Flutter -[plug-in package](https://flutter.dev/to/develop-plugins), -a specialized package that includes platform-specific implementation code for -Android and/or iOS. +| Platform | Native SDK | Status | +|---|---|---| +| Android | `android/libs/jl_bluetooth_rcsp_*.aar` etc. | Functional (used in production demo) | +| iOS | `ios/Frameworks/JL_BLEKit.xcframework` etc. (from `JIELI-IOS-Release/Libs`) | **Compiles,真机验证未完成** — see [CHANGELOG.md](CHANGELOG.md) for the per-feature status matrix. | -For help getting started with Flutter development, view the -[online documentation](https://docs.flutter.dev), which offers tutorials, -samples, guidance on mobile development, and a full API reference. +## iOS setup +The plugin ships every required `.xcframework` under `ios/Frameworks/`. When the upstream +SDK in `JIELI-IOS-Release/Libs/` updates, mirror the new `.xcframework` directories on +top of `ios/Frameworks/` (overwrite is safe) and `pod install` again in the host app. + +Minimum target: iOS 12. + +The host app must declare in `Info.plist`: + +```xml +NSBluetoothAlwaysUsageDescription +用于连接杰理蓝牙耳机 +NSBluetoothPeripheralUsageDescription +用于连接杰理蓝牙耳机 +NSMicrophoneUsageDescription +用于翻译 / 语音助手录音 +``` + +## Channel surface + +Dart API lives in [`lib/device_jieli.dart`](lib/device_jieli.dart). Native code on either +platform implements the same set of method calls and emits the same event payload schema — +the iOS implementation lives in [`ios/Classes/`](ios/Classes/), the Android +implementation in [`android/src/main/kotlin/com/jielihome/jielihome/`](android/src/main/kotlin/com/jielihome/jielihome/). + +For background on the RCSP commands and translation pipeline see +[`JIELI_SDK_COMMANDS.md`](JIELI_SDK_COMMANDS.md). diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/Info.plist b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/Info.plist new file mode 100644 index 000000000..482e8cd53 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/Info.plist @@ -0,0 +1,44 @@ + + + + + AvailableLibraries + + + BinaryPath + JLAudioUnitKit.framework/JLAudioUnitKit + LibraryIdentifier + ios-arm64_x86_64-simulator + LibraryPath + JLAudioUnitKit.framework + SupportedArchitectures + + x86_64 + arm64 + + SupportedPlatform + ios + SupportedPlatformVariant + simulator + + + BinaryPath + JLAudioUnitKit.framework/JLAudioUnitKit + LibraryIdentifier + ios-arm64 + LibraryPath + JLAudioUnitKit.framework + SupportedArchitectures + + arm64 + + SupportedPlatform + ios + + + CFBundlePackageType + XFWK + XCFrameworkFormatVersion + 1.0 + + diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64/JLAudioUnitKit.framework/Headers/JLAudioUnitKit.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64/JLAudioUnitKit.framework/Headers/JLAudioUnitKit.h new file mode 100644 index 000000000..e6b3af64f --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64/JLAudioUnitKit.framework/Headers/JLAudioUnitKit.h @@ -0,0 +1,26 @@ +// +// JLAudioUnitKit.h +// JLAudioUnitKit +// +// Created by EzioChan on 2024/11/14. +// + +#import + +//! Project version number for JLAudioUnitKit. +FOUNDATION_EXPORT double JLAudioUnitKitVersionNumber; + +//! Project version string for JLAudioUnitKit. +FOUNDATION_EXPORT const unsigned char JLAudioUnitKitVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + +#import +#import +#import +#import +#import +#import +#import +#import +#import diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64/JLAudioUnitKit.framework/Headers/JLAudioUnitPlayer.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64/JLAudioUnitKit.framework/Headers/JLAudioUnitPlayer.h new file mode 100644 index 000000000..7da831c67 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64/JLAudioUnitKit.framework/Headers/JLAudioUnitPlayer.h @@ -0,0 +1,58 @@ +// +// JLAudioUnitPlayer.h +// JLAudioUnitKit +// +// Created by EzioChan on 2025/4/16. +// Copyright © 2025 ZhuHai JieLi Technology Co.,Ltd. All rights reserved. +// + +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +typedef NS_ENUM(NSInteger, JLAudioUnitPlayerType) { + JLAudioUnitPlayerTypeFile, // 支持 MP3/WAV/AAC 等文件格式(AVAudioPlayer) + JLAudioUnitPlayerTypePCM // 支持 PCM 流式播放(Audio Queue) +}; + +@class JLAudioUnitPlayer; + +@protocol JLAudioPlayerDelegate +@optional +// 播放进度更新(秒) +- (void)audioPlayer:(JLAudioUnitPlayer *)player didUpdateProgress:(NSTimeInterval)currentTime duration:(NSTimeInterval)duration; +// 播放完成 +- (void)audioPlayerDidFinishPlaying:(JLAudioUnitPlayer *)player; +// 播放错误 +- (void)audioPlayer:(JLAudioUnitPlayer *)player didFailWithError:(NSError *)error; +@end + +@interface JLAudioUnitPlayer : NSObject + +@property (nonatomic, weak) id delegate; +@property (nonatomic, readonly) NSTimeInterval duration; // 总时长(文件模式下有效) +@property (nonatomic, readonly) NSTimeInterval currentTime; +@property (nonatomic, readonly) BOOL isPlaying; + +#pragma mark - 初始化方法 + +/// 文件播放初始化(MP3/WAV/AAC) +- (instancetype)initWithAudioFile:(NSString *)filePath; + +/// PCM 流播放初始化(需指定格式) +- (instancetype)initWithPCMFormat:(AudioStreamBasicDescription)format; + +#pragma mark - 播放控制 +- (void)play; +- (void)pause; +- (void)stop; +- (void)seekToTime:(NSTimeInterval)time; // 仅文件模式有效 + +#pragma mark - PCM 流式输入(仅 PCM 模式有效) +- (void)appendPCMData:(NSData *)pcmData; +- (void)endPCMStream; // 结束 PCM 流输入 + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64/JLAudioUnitKit.framework/Headers/JLOpusDecoder.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64/JLAudioUnitKit.framework/Headers/JLOpusDecoder.h new file mode 100644 index 000000000..711e2e99a --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64/JLAudioUnitKit.framework/Headers/JLOpusDecoder.h @@ -0,0 +1,66 @@ +// +// JLOpusDecoder.h +// JLAudioUnitKit +// +// Created by EzioChan on 2024/11/14. +// Copyright © 2024 ZhuHai JieLi Technology Co.,Ltd. All rights reserved. +// + +#import +#import + +NS_ASSUME_NONNULL_BEGIN +@class JLOpusDecoder; + +/// Opus 解码代理 +@protocol JLOpusDecoderDelegate + +/// Opus 数据解码 +/// - Parameters: +/// - decoder: 解码器 +/// - data: pcm 数据 +/// - error: 错误信息 +-(void)opusDecoder:(JLOpusDecoder *)decoder Data:(NSData* _Nullable)data error:(NSError* _Nullable)error; + +@end + +typedef void(^JLOpusDecoderConvertBlock)(NSString *_Nullable pcmPath,NSError *_Nullable error); + +/// Opus 解码 +@interface JLOpusDecoder : NSObject + +/// 数据格式参数 +@property (nonatomic, strong) JLOpusFormat *opusFormat; + +/// 代理委托 +@property(nonatomic, weak) id delegate; + +- (instancetype)init NS_UNAVAILABLE; + +/// 初始化 +/// - Parameters: +/// - format: 解码格式 +/// - delegate: 代理 +- (instancetype)initDecoder:(JLOpusFormat *)format delegate:(id)delegate; + +/// 重置解码格式 +/// - Parameter format: 解码格式 +-(void)resetOpusFramet:(JLOpusFormat *)format; + +/// 输入 Opus 数据 +/// - Parameter data: Opus 数据 +-(void)opusDecoderInputData:(NSData *)data; + +/// 解码文件 +/// - Parameters: +/// - input: opus 文件 +/// - outPut: 输出路径 +/// - result: 结果回调 +-(void)opusDecodeFile:(NSString *)input outPut:(NSString *_Nullable)outPut Resoult:(JLOpusDecoderConvertBlock _Nullable)result; + +/// 释放 +-(void)opusOnRelease; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64/JLAudioUnitKit.framework/Headers/JLOpusEncodeConfig.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64/JLAudioUnitKit.framework/Headers/JLOpusEncodeConfig.h new file mode 100644 index 000000000..037284e00 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64/JLAudioUnitKit.framework/Headers/JLOpusEncodeConfig.h @@ -0,0 +1,83 @@ +// +// JLOpusEncodeConfig.h +// JLAudioUnitKit +// +// Created by EzioChan on 2025/8/27. +// Copyright © 2025 ZhuHai JieLi Technology Co.,Ltd. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +typedef NS_ENUM(NSInteger, JLOpusEncoderBandwidth) { + ///(4kHz bandpass) + JLOpusEncoderBandwidthNarrowband = 1101, // 对应 OPUS_BANDWIDTH_NARROWBAND + /// (6kHz bandpass) + JLOpusEncoderBandwidthMediumband = 1102, // 对应 OPUS_BANDWIDTH_MEDIUMBAND + /// (8kHz bandpass) + JLOpusEncoderBandwidthWideband = 1103, // 对应 OPUS_BANDWIDTH_WIDEBAND + /// (12kHz bandpass) + JLOpusEncoderBandwidthSuperwideband = 1104,// 对应 OPUS_BANDWIDTH_SUPERWIDEBAND + /// (20kHz bandpass) + JLOpusEncoderBandwidthFullband = 1105 // 对应 OPUS_BANDWIDTH_FULLBAND +}; + +@interface JLOpusEncodeConfig : NSObject + +/// 采样率 +@property (nonatomic, assign) int sampleRate; + +/// 单/双声道 +@property (nonatomic, assign) int channels; + +/// 帧长度 20ms 默认值 +@property (nonatomic, assign) int frameDuration; + +/// 帧长度 +@property (nonatomic, assign) int frameSize; + +/// BitRate +@property (nonatomic, assign) int bitRate; + +/// 可变比特率开关,默认 NO(使用 CBR) +@property (nonatomic, assign) BOOL useVBR; + +/// VBR 限制模式,默认 NO +@property (nonatomic, assign) BOOL constrainedVBR; + +/// 编码复杂度 0~10,默认 5 +@property (nonatomic, assign) int complexity; + +/// 强制输出声道数 -1: 自适应, 1: 单声道, 2: 双声道, 默认 -1 +@property (nonatomic, assign) int forceChannels; + +/// 是否启用 DTX(静音段不发送数据),默认 NO +@property (nonatomic, assign) BOOL useDTX; + +/// 网络丢包百分比,默认 0 +@property (nonatomic, assign) int packetLossPercent; + +/// 最大带宽限制(OPUS_BANDWIDTH_*),默认 FULLBAND +@property (nonatomic, assign) int bandwidth; + +/// PCM 输入有效位深,默认 16 +@property (nonatomic, assign) int lsbDepth; + +/// 专家模式下帧时长(ms),默认与 frameDuration 一致 +@property (nonatomic, assign) int expertFrameDuration; + +/// 是否启用数据头 +/// 默认是启用的 +@property (nonatomic, assign) BOOL hasDataHeader; + +/// 创建默认编码配置 ++ (instancetype)defaultConfig; + +/// 获取默认配置 +/// 杰理的无头配置 ++ (instancetype)defaultJL; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64/JLAudioUnitKit.framework/Headers/JLOpusEncoder.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64/JLAudioUnitKit.framework/Headers/JLOpusEncoder.h new file mode 100644 index 000000000..24886a038 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64/JLAudioUnitKit.framework/Headers/JLOpusEncoder.h @@ -0,0 +1,69 @@ +// +// JLOpusEncoder.h +// JLAudioUnitKit +// +// Created by EzioChan on 2024/11/14. +// Copyright © 2024 ZhuHai JieLi Technology Co.,Ltd. All rights reserved. +// + +#import +#import + +NS_ASSUME_NONNULL_BEGIN +@class JLOpusEncoder; + +/// Opus 编码代理 +@protocol JLOpusEncoderDelegate + +/// PCM 数据编码 +/// - Parameters: +/// - encoder: 解码器 +/// - data: opus 数据 +/// - error: 错误信息 +-(void)opusEncoder:(JLOpusEncoder *)encoder Data:(NSData* _Nullable)data error:(NSError* _Nullable)error; + +@end + +typedef void(^JLOpusEncoderConvertBlock)(NSString *_Nullable pcmPath,NSError *_Nullable error); + +/// Opus 编码 +@interface JLOpusEncoder : NSObject + +/// 音频格式 +@property (nonatomic, strong) JLOpusEncodeConfig *opusFormat; + +/// 代理 +@property (nonatomic, weak) id delegate; + +-(instancetype)init NS_UNAVAILABLE; + +/// 初始化 +/// - Parameters: +/// - config: 音频格式 +/// - delegate: 代理 +-(instancetype)initFormat:(JLOpusEncodeConfig *)format delegate:(id)delegate; + +/// PCM 数据 +/// - Parameter data: PCM 数据 +-(void)opusEncodeData:(NSData *)data; + +/// PCM 文件转换成 Opus 文件(推荐新接口,流式读取,避免一次性加载内存) +/// - Parameters: +/// - pcmPath: PCM 文件存放路径 +/// - output: 文件输出路径(可空,默认 ~/Documents/pcmToOpus.opus) +/// - result: 结果回调,回传输出路径或错误 +-(void)opusEncodeFile:(NSString *)pcmPath output:(NSString *_Nullable)output result:(JLOpusEncoderConvertBlock _Nullable)result; + +/// 兼容旧接口(已废弃:命名拼写问题,且旧实现一次性读入文件) +/// - Parameters: +/// - pcmPath: PCM 文件存放路径 +/// - outPut: 文件输出路径 +/// - result: 结果回调 +-(void)opusEncodeFile:(NSString *)pcmPath outPut:(NSString *_Nullable)outPut Resoult:(JLOpusEncoderConvertBlock _Nullable)result __attribute__((deprecated("Use opusEncodeFile:output:result: instead."))); + +/// 释放 +-(void)opusOnRelease; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64/JLAudioUnitKit.framework/Headers/JLOpusFormat.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64/JLAudioUnitKit.framework/Headers/JLOpusFormat.h new file mode 100644 index 000000000..016548791 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64/JLAudioUnitKit.framework/Headers/JLOpusFormat.h @@ -0,0 +1,59 @@ +// +// JLOpusOptions.h +// JLAudioUnitKit +// +// Created by EzioChan on 2024/11/14. +// Copyright © 2024 ZhuHai JieLi Technology Co.,Ltd. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +#define OPUS_JL_MAX_FRAME_SIZE 48000 * 2 +#define OPUS_JL_MAX_PACKET_SIZE 1500 + + +@interface JLOpusFormat : NSObject + +/// 采样率 +@property (nonatomic, assign) int sampleRate; + +/// 单/双声道 +@property (nonatomic, assign) int channels; + +/// 帧长度 20ms 默认值 +@property (nonatomic, assign) int frameDuration; + +/// BitRate +@property (nonatomic, assign) int bitRate; + +/// 数据帧大小 +@property (nonatomic, assign, readonly) int frameSize; + +/// 数据大小 +@property (nonatomic, assign) int dataSize; + +/// 是否包含数据头部 +@property (nonatomic, assign) BOOL hasDataHeader; + +/// 是否开启slik语音优化 +@property (nonatomic, assign) BOOL usVoipSlik; + + +-(instancetype)init NS_UNAVAILABLE; + +/// 默认配置 +/// sampleRate: 16000 +/// channels: 1 +/// frameDuration: 20 +/// dataSize: 40 +/// frameSize: 320 +/// hasDataHeader: YES +/// bitRate: 16000 +/// usVoipSlik: false ++(JLOpusFormat*)defaultFormats; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64/JLAudioUnitKit.framework/Headers/JLOpusToOgg.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64/JLAudioUnitKit.framework/Headers/JLOpusToOgg.h new file mode 100644 index 000000000..27b919bde --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64/JLAudioUnitKit.framework/Headers/JLOpusToOgg.h @@ -0,0 +1,67 @@ +// +// JLOpusToOgg.h +// JLAudioUnitKit +// +// Created by EzioChan on 2025/5/16. +// Copyright © 2025 ZhuHai JieLi Technology Co.,Ltd. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +typedef void(^JLOpusToOggConvertBlock)(NSData *_Nullable oggData, BOOL isLast, NSError *_Nullable error); + +/// 将Opus数据转换为Ogg数据 +@interface JLOpusToOgg : NSObject + +/// 转码内容的回调 +@property(nonatomic,strong)JLOpusToOggConvertBlock _Nullable convertBlock; + +/// 帧长 +/// - Parameter frameLen: 帧长 +/// 默认值 40 +- (instancetype)initWithFrameLength:(uint32_t)frameLen; + +/// 开始流 +-(void)startStream; + +/// 添加Opus数据 +/// - Parameter opusData: 符合杰理的无头裸 opus 数据 +- (void)appendOpusData:(NSData *)opusData; + +/// 关闭流 +- (void)closeStream; + + +/// 将Opus数据转换为Ogg数据 +/// opus 必须为 16000 +/// opus 必须是 单声道 +/// - Parameters: +/// - opusData: 符合杰理的无头裸 opus 数据 +/// - frameLen: 帧长 公版默认帧长是 40 +/// - duration: 转换后的时长 +/// - error: 错误 ++ (NSData *_Nullable)convertOpusDataToOgg:(NSData *)opusData + frameLen:(uint32_t)frameLen + duration:(double *)duration + error:(NSError *__autoreleasing _Nullable *)error ; + +/// 将Opus文件转换为Ogg文件 +/// 符合杰理的无头裸 opus 文件 +/// opus 必须为 16000 +/// opus 必须是 单声道 +/// - Parameters: +/// - opusFilePath: opus文件路径 +/// - oggFilePath: ogg文件路径 +/// - frameLen: 帧长 公版默认帧长是 40 +/// - duration: 转换后的时长 ++(void)convertOpusFileToOgg:(NSString *)opusFilePath + oggFilePath:(NSString *)oggFilePath + frameLen:(uint32_t)frameLen + duration:(double *)duration; + + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64/JLAudioUnitKit.framework/Headers/JLPcmToWav.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64/JLAudioUnitKit.framework/Headers/JLPcmToWav.h new file mode 100644 index 000000000..b32ecef2d --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64/JLAudioUnitKit.framework/Headers/JLPcmToWav.h @@ -0,0 +1,55 @@ +// +// JLPcmToWav.h +// JLAudioUnitKit +// +// Created by EzioChan on 2025/4/15. +// Copyright © 2025 ZhuHai JieLi Technology Co.,Ltd. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +/// PCM 转 WAV +@interface JLPcmToWav : NSObject + +#pragma mark - 流式编码接口 + +/// 初始化流式编码器 +/// @param outputPath 输出文件路径 +/// @param sampleRate 采样率(如 16000) +/// @param numChannels 声道数(1 或 2) +/// @param bitsPerSample 位深(16) +- (instancetype)initWithOutputPath:(NSString *)outputPath + sampleRate:(uint32_t)sampleRate + numChannels:(uint16_t)numChannels + bitsPerSample:(uint16_t)bitsPerSample; + +/// 追加 PCM 数据(需确保数据格式与初始化参数一致) +/// @param pcmData PCM 数据块 +/// @param error 错误信息 +- (BOOL)appendPCMData:(NSData *)pcmData error:(NSError **)error; + +/// 完成编码并关闭文件(必须调用以更新 WAV 头) +/// @param error 错误信息 +- (BOOL)finishWithError:(NSError **)error; + +#pragma mark - 一次性编码接口(便捷方法) + +/// 将 PCM 数据一次性转为 WAV 文件 +/// @param pcmData PCM 数据块 +/// @param outputPath 输出文件路径 +/// @param sampleRate 采样率(如 16000) +/// @param numChannels 声道数(1 或 2) +/// @param bitsPerSample 位深(16) +/// @param error 错误信息 ++ (BOOL)convertPCMData:(NSData *)pcmData + toWAVFile:(NSString *)outputPath + sampleRate:(uint32_t)sampleRate + numChannels:(uint16_t)numChannels + bitsPerSample:(uint16_t)bitsPerSample + error:(NSError **)error; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64/JLAudioUnitKit.framework/Headers/JLPcmToWtg.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64/JLAudioUnitKit.framework/Headers/JLPcmToWtg.h new file mode 100644 index 000000000..231b3e837 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64/JLAudioUnitKit.framework/Headers/JLPcmToWtg.h @@ -0,0 +1,51 @@ +// +// JLPcmToWtg.h +// JLAudioUnitKit +// +// Created by EzioChan on 2025/1/21. +// Copyright © 2025 ZhuHai JieLi Technology Co.,Ltd. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface JLPcm2WtgModel : NSObject + +/// 音频文件 +@property (nonatomic, copy) NSString *pcmPath; + +/// 输出文件 +@property (nonatomic, copy) NSString *wtgPath; + +@end + + +/// JLPcmToWtgProtocol +@protocol JLPcmToWtgDelegate + +/// 音频转码完成 +/// - Parameter model: 音频转码模型 +- (void)convertPcmToWtgDone:(JLPcm2WtgModel *)model; + +@end + +/// 音频转码 +/// PCM 转 WTG +@interface JLPcmToWtg : NSObject + +- (instancetype)init NS_UNAVAILABLE; + +/// 音频转码初始化 +/// - Parameter delegate: 音频转码代理 +- (instancetype)initWithDelegate:(id)delegate; + +/// 音频转码 +/// 当前接口模型只限制 PCM 文件格式为:8k 16bit +/// 输入的pcm文件(16bit,小端,8k采样率),wtg_filename:输出的wtg文件 +/// - Parameter model: 音频转码模型 +-(void)convertPcmToWtg:(JLPcm2WtgModel *)model; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64/JLAudioUnitKit.framework/Headers/JLSpeexDecoder.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64/JLAudioUnitKit.framework/Headers/JLSpeexDecoder.h new file mode 100644 index 000000000..ad223d087 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64/JLAudioUnitKit.framework/Headers/JLSpeexDecoder.h @@ -0,0 +1,54 @@ +// +// JLSpeexUnit.h +// JLAudioUnitKit +// +// Created by EzioChan on 2024/11/14. +// + +#import + +NS_ASSUME_NONNULL_BEGIN +@class JLSpeexDecoder; + +@protocol JLSpeexDelegate + +/// Speex 数据解码 +/// - Parameters: +/// - decoder: 解码器 +/// - data: PCM 数据 +/// - error: 错误信息 +- (void)speexDecoder:(JLSpeexDecoder *)decoder Data:(NSData* _Nullable)data error:(NSError* _Nullable)error; + +@end + +typedef void(^JLSpeexConvertBlock)(NSString *_Nullable pcmPath,NSError *_Nullable error); + +/// Speex 数据解码 +@interface JLSpeexDecoder : NSObject + +-(instancetype)init NS_UNAVAILABLE; + +/// 初始化 +/// - Parameter delegate: 委托 +-(instancetype)initWithDelegate:(id)delegate; + +/// 委托 +@property (nonatomic, weak) id delegate; + +/// 输入 Speex 数据 +/// - Parameter data: Speex 数据 +-(void)speexInputData:(NSData*)data; + +/// 将 Speex 转换为 PCM +/// - Parameters: +/// - filePath: Speex 路径 +/// - opPath: 输出路径 +/// - result: 结果回调 +-(void)speexConvertToPcm:(NSString *)filePath outPutFilePath:(NSString * _Nullable)opPath Result:(JLSpeexConvertBlock)result; + +/// 释放对象 +-(void)speexOnRelease; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64/JLAudioUnitKit.framework/Info.plist b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64/JLAudioUnitKit.framework/Info.plist new file mode 100644 index 000000000..2651c6526 Binary files /dev/null and b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64/JLAudioUnitKit.framework/Info.plist differ diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64/JLAudioUnitKit.framework/JLAudioUnitKit b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64/JLAudioUnitKit.framework/JLAudioUnitKit new file mode 100755 index 000000000..871fc91fe Binary files /dev/null and b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64/JLAudioUnitKit.framework/JLAudioUnitKit differ diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64/JLAudioUnitKit.framework/Modules/module.modulemap b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64/JLAudioUnitKit.framework/Modules/module.modulemap new file mode 100644 index 000000000..5e1ae1d3d --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64/JLAudioUnitKit.framework/Modules/module.modulemap @@ -0,0 +1,6 @@ +framework module JLAudioUnitKit { + umbrella header "JLAudioUnitKit.h" + export * + + module * { export * } +} diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64/JLAudioUnitKit.framework/readme.txt b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64/JLAudioUnitKit.framework/readme.txt new file mode 100644 index 000000000..6789fe6e1 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64/JLAudioUnitKit.framework/readme.txt @@ -0,0 +1,52 @@ +DESCRIPTION +----------- +This package includes the files needed to build the fixed point implementation +of the ITU-T G.729 Appendix IV. + +DIFFERENCES WITH G.729B +----------------------- +The ANSI-C source code simulating the bit-exact, fixed point simulation +software of enhanced VAD is integrated into the G.729B source code. +The modification to the G.729B source code updated files of coder.c, +cod_ld8k.c, bits.c, dec_sid.c, dtx.c, qsidgain.c, qsidlsf.c, tab_dtx.c, +tab_dtx.h, ld8k.h, deleted vad.c/h and integrated the enhanced VAD functions +into the G.729B project. The modification also replaced the original basic +operators used in the original G.729B source code by the basic operators of +ITU-T Software Tool Library STL2005. + +COMPILATION +----------- +For UNIX systems the following makefiles are provided + + coder.mak + decoder.mak + +Edit the makefiles coder.mak and decoder.mak to set the proper options +for your system. +The command to compile and link all code on a UNIX system is + + make -f coder.mak + make -f decoder.mak + +For other platforms, the *.mak files can be used to work out the +compilation procedures. + +USAGE +----- +The command line instruction for the encoder is as follows: + coder inputfile bitstreamfile dtx_option mode x +where: + inputfile : 8 kHz sampled data file containing 16 bit linear PCM signal + bitstreamfile: binary file containing bitstream + dtx_option : = 1 : DTX enabled 0 : DTX disabled + mode X : Run encoder with enhanced VAD in operating point X, + X=0 or 1 or 2 representing balanced or quality-preferred + or bandwidth saving operating point, respectively + +The command line for the decoder is as follows: + decoder bitstreamfile outputfile +where: + bitstreamfile: binary file containing bitstream + outputfile : 8 kHz sampled data file containing 16 bit linear PCM signal + + diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64_x86_64-simulator/JLAudioUnitKit.framework/Headers/JLAudioUnitKit.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64_x86_64-simulator/JLAudioUnitKit.framework/Headers/JLAudioUnitKit.h new file mode 100644 index 000000000..e6b3af64f --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64_x86_64-simulator/JLAudioUnitKit.framework/Headers/JLAudioUnitKit.h @@ -0,0 +1,26 @@ +// +// JLAudioUnitKit.h +// JLAudioUnitKit +// +// Created by EzioChan on 2024/11/14. +// + +#import + +//! Project version number for JLAudioUnitKit. +FOUNDATION_EXPORT double JLAudioUnitKitVersionNumber; + +//! Project version string for JLAudioUnitKit. +FOUNDATION_EXPORT const unsigned char JLAudioUnitKitVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + +#import +#import +#import +#import +#import +#import +#import +#import +#import diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64_x86_64-simulator/JLAudioUnitKit.framework/Headers/JLAudioUnitPlayer.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64_x86_64-simulator/JLAudioUnitKit.framework/Headers/JLAudioUnitPlayer.h new file mode 100644 index 000000000..7da831c67 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64_x86_64-simulator/JLAudioUnitKit.framework/Headers/JLAudioUnitPlayer.h @@ -0,0 +1,58 @@ +// +// JLAudioUnitPlayer.h +// JLAudioUnitKit +// +// Created by EzioChan on 2025/4/16. +// Copyright © 2025 ZhuHai JieLi Technology Co.,Ltd. All rights reserved. +// + +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +typedef NS_ENUM(NSInteger, JLAudioUnitPlayerType) { + JLAudioUnitPlayerTypeFile, // 支持 MP3/WAV/AAC 等文件格式(AVAudioPlayer) + JLAudioUnitPlayerTypePCM // 支持 PCM 流式播放(Audio Queue) +}; + +@class JLAudioUnitPlayer; + +@protocol JLAudioPlayerDelegate +@optional +// 播放进度更新(秒) +- (void)audioPlayer:(JLAudioUnitPlayer *)player didUpdateProgress:(NSTimeInterval)currentTime duration:(NSTimeInterval)duration; +// 播放完成 +- (void)audioPlayerDidFinishPlaying:(JLAudioUnitPlayer *)player; +// 播放错误 +- (void)audioPlayer:(JLAudioUnitPlayer *)player didFailWithError:(NSError *)error; +@end + +@interface JLAudioUnitPlayer : NSObject + +@property (nonatomic, weak) id delegate; +@property (nonatomic, readonly) NSTimeInterval duration; // 总时长(文件模式下有效) +@property (nonatomic, readonly) NSTimeInterval currentTime; +@property (nonatomic, readonly) BOOL isPlaying; + +#pragma mark - 初始化方法 + +/// 文件播放初始化(MP3/WAV/AAC) +- (instancetype)initWithAudioFile:(NSString *)filePath; + +/// PCM 流播放初始化(需指定格式) +- (instancetype)initWithPCMFormat:(AudioStreamBasicDescription)format; + +#pragma mark - 播放控制 +- (void)play; +- (void)pause; +- (void)stop; +- (void)seekToTime:(NSTimeInterval)time; // 仅文件模式有效 + +#pragma mark - PCM 流式输入(仅 PCM 模式有效) +- (void)appendPCMData:(NSData *)pcmData; +- (void)endPCMStream; // 结束 PCM 流输入 + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64_x86_64-simulator/JLAudioUnitKit.framework/Headers/JLOpusDecoder.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64_x86_64-simulator/JLAudioUnitKit.framework/Headers/JLOpusDecoder.h new file mode 100644 index 000000000..711e2e99a --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64_x86_64-simulator/JLAudioUnitKit.framework/Headers/JLOpusDecoder.h @@ -0,0 +1,66 @@ +// +// JLOpusDecoder.h +// JLAudioUnitKit +// +// Created by EzioChan on 2024/11/14. +// Copyright © 2024 ZhuHai JieLi Technology Co.,Ltd. All rights reserved. +// + +#import +#import + +NS_ASSUME_NONNULL_BEGIN +@class JLOpusDecoder; + +/// Opus 解码代理 +@protocol JLOpusDecoderDelegate + +/// Opus 数据解码 +/// - Parameters: +/// - decoder: 解码器 +/// - data: pcm 数据 +/// - error: 错误信息 +-(void)opusDecoder:(JLOpusDecoder *)decoder Data:(NSData* _Nullable)data error:(NSError* _Nullable)error; + +@end + +typedef void(^JLOpusDecoderConvertBlock)(NSString *_Nullable pcmPath,NSError *_Nullable error); + +/// Opus 解码 +@interface JLOpusDecoder : NSObject + +/// 数据格式参数 +@property (nonatomic, strong) JLOpusFormat *opusFormat; + +/// 代理委托 +@property(nonatomic, weak) id delegate; + +- (instancetype)init NS_UNAVAILABLE; + +/// 初始化 +/// - Parameters: +/// - format: 解码格式 +/// - delegate: 代理 +- (instancetype)initDecoder:(JLOpusFormat *)format delegate:(id)delegate; + +/// 重置解码格式 +/// - Parameter format: 解码格式 +-(void)resetOpusFramet:(JLOpusFormat *)format; + +/// 输入 Opus 数据 +/// - Parameter data: Opus 数据 +-(void)opusDecoderInputData:(NSData *)data; + +/// 解码文件 +/// - Parameters: +/// - input: opus 文件 +/// - outPut: 输出路径 +/// - result: 结果回调 +-(void)opusDecodeFile:(NSString *)input outPut:(NSString *_Nullable)outPut Resoult:(JLOpusDecoderConvertBlock _Nullable)result; + +/// 释放 +-(void)opusOnRelease; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64_x86_64-simulator/JLAudioUnitKit.framework/Headers/JLOpusEncodeConfig.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64_x86_64-simulator/JLAudioUnitKit.framework/Headers/JLOpusEncodeConfig.h new file mode 100644 index 000000000..037284e00 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64_x86_64-simulator/JLAudioUnitKit.framework/Headers/JLOpusEncodeConfig.h @@ -0,0 +1,83 @@ +// +// JLOpusEncodeConfig.h +// JLAudioUnitKit +// +// Created by EzioChan on 2025/8/27. +// Copyright © 2025 ZhuHai JieLi Technology Co.,Ltd. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +typedef NS_ENUM(NSInteger, JLOpusEncoderBandwidth) { + ///(4kHz bandpass) + JLOpusEncoderBandwidthNarrowband = 1101, // 对应 OPUS_BANDWIDTH_NARROWBAND + /// (6kHz bandpass) + JLOpusEncoderBandwidthMediumband = 1102, // 对应 OPUS_BANDWIDTH_MEDIUMBAND + /// (8kHz bandpass) + JLOpusEncoderBandwidthWideband = 1103, // 对应 OPUS_BANDWIDTH_WIDEBAND + /// (12kHz bandpass) + JLOpusEncoderBandwidthSuperwideband = 1104,// 对应 OPUS_BANDWIDTH_SUPERWIDEBAND + /// (20kHz bandpass) + JLOpusEncoderBandwidthFullband = 1105 // 对应 OPUS_BANDWIDTH_FULLBAND +}; + +@interface JLOpusEncodeConfig : NSObject + +/// 采样率 +@property (nonatomic, assign) int sampleRate; + +/// 单/双声道 +@property (nonatomic, assign) int channels; + +/// 帧长度 20ms 默认值 +@property (nonatomic, assign) int frameDuration; + +/// 帧长度 +@property (nonatomic, assign) int frameSize; + +/// BitRate +@property (nonatomic, assign) int bitRate; + +/// 可变比特率开关,默认 NO(使用 CBR) +@property (nonatomic, assign) BOOL useVBR; + +/// VBR 限制模式,默认 NO +@property (nonatomic, assign) BOOL constrainedVBR; + +/// 编码复杂度 0~10,默认 5 +@property (nonatomic, assign) int complexity; + +/// 强制输出声道数 -1: 自适应, 1: 单声道, 2: 双声道, 默认 -1 +@property (nonatomic, assign) int forceChannels; + +/// 是否启用 DTX(静音段不发送数据),默认 NO +@property (nonatomic, assign) BOOL useDTX; + +/// 网络丢包百分比,默认 0 +@property (nonatomic, assign) int packetLossPercent; + +/// 最大带宽限制(OPUS_BANDWIDTH_*),默认 FULLBAND +@property (nonatomic, assign) int bandwidth; + +/// PCM 输入有效位深,默认 16 +@property (nonatomic, assign) int lsbDepth; + +/// 专家模式下帧时长(ms),默认与 frameDuration 一致 +@property (nonatomic, assign) int expertFrameDuration; + +/// 是否启用数据头 +/// 默认是启用的 +@property (nonatomic, assign) BOOL hasDataHeader; + +/// 创建默认编码配置 ++ (instancetype)defaultConfig; + +/// 获取默认配置 +/// 杰理的无头配置 ++ (instancetype)defaultJL; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64_x86_64-simulator/JLAudioUnitKit.framework/Headers/JLOpusEncoder.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64_x86_64-simulator/JLAudioUnitKit.framework/Headers/JLOpusEncoder.h new file mode 100644 index 000000000..24886a038 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64_x86_64-simulator/JLAudioUnitKit.framework/Headers/JLOpusEncoder.h @@ -0,0 +1,69 @@ +// +// JLOpusEncoder.h +// JLAudioUnitKit +// +// Created by EzioChan on 2024/11/14. +// Copyright © 2024 ZhuHai JieLi Technology Co.,Ltd. All rights reserved. +// + +#import +#import + +NS_ASSUME_NONNULL_BEGIN +@class JLOpusEncoder; + +/// Opus 编码代理 +@protocol JLOpusEncoderDelegate + +/// PCM 数据编码 +/// - Parameters: +/// - encoder: 解码器 +/// - data: opus 数据 +/// - error: 错误信息 +-(void)opusEncoder:(JLOpusEncoder *)encoder Data:(NSData* _Nullable)data error:(NSError* _Nullable)error; + +@end + +typedef void(^JLOpusEncoderConvertBlock)(NSString *_Nullable pcmPath,NSError *_Nullable error); + +/// Opus 编码 +@interface JLOpusEncoder : NSObject + +/// 音频格式 +@property (nonatomic, strong) JLOpusEncodeConfig *opusFormat; + +/// 代理 +@property (nonatomic, weak) id delegate; + +-(instancetype)init NS_UNAVAILABLE; + +/// 初始化 +/// - Parameters: +/// - config: 音频格式 +/// - delegate: 代理 +-(instancetype)initFormat:(JLOpusEncodeConfig *)format delegate:(id)delegate; + +/// PCM 数据 +/// - Parameter data: PCM 数据 +-(void)opusEncodeData:(NSData *)data; + +/// PCM 文件转换成 Opus 文件(推荐新接口,流式读取,避免一次性加载内存) +/// - Parameters: +/// - pcmPath: PCM 文件存放路径 +/// - output: 文件输出路径(可空,默认 ~/Documents/pcmToOpus.opus) +/// - result: 结果回调,回传输出路径或错误 +-(void)opusEncodeFile:(NSString *)pcmPath output:(NSString *_Nullable)output result:(JLOpusEncoderConvertBlock _Nullable)result; + +/// 兼容旧接口(已废弃:命名拼写问题,且旧实现一次性读入文件) +/// - Parameters: +/// - pcmPath: PCM 文件存放路径 +/// - outPut: 文件输出路径 +/// - result: 结果回调 +-(void)opusEncodeFile:(NSString *)pcmPath outPut:(NSString *_Nullable)outPut Resoult:(JLOpusEncoderConvertBlock _Nullable)result __attribute__((deprecated("Use opusEncodeFile:output:result: instead."))); + +/// 释放 +-(void)opusOnRelease; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64_x86_64-simulator/JLAudioUnitKit.framework/Headers/JLOpusFormat.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64_x86_64-simulator/JLAudioUnitKit.framework/Headers/JLOpusFormat.h new file mode 100644 index 000000000..016548791 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64_x86_64-simulator/JLAudioUnitKit.framework/Headers/JLOpusFormat.h @@ -0,0 +1,59 @@ +// +// JLOpusOptions.h +// JLAudioUnitKit +// +// Created by EzioChan on 2024/11/14. +// Copyright © 2024 ZhuHai JieLi Technology Co.,Ltd. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +#define OPUS_JL_MAX_FRAME_SIZE 48000 * 2 +#define OPUS_JL_MAX_PACKET_SIZE 1500 + + +@interface JLOpusFormat : NSObject + +/// 采样率 +@property (nonatomic, assign) int sampleRate; + +/// 单/双声道 +@property (nonatomic, assign) int channels; + +/// 帧长度 20ms 默认值 +@property (nonatomic, assign) int frameDuration; + +/// BitRate +@property (nonatomic, assign) int bitRate; + +/// 数据帧大小 +@property (nonatomic, assign, readonly) int frameSize; + +/// 数据大小 +@property (nonatomic, assign) int dataSize; + +/// 是否包含数据头部 +@property (nonatomic, assign) BOOL hasDataHeader; + +/// 是否开启slik语音优化 +@property (nonatomic, assign) BOOL usVoipSlik; + + +-(instancetype)init NS_UNAVAILABLE; + +/// 默认配置 +/// sampleRate: 16000 +/// channels: 1 +/// frameDuration: 20 +/// dataSize: 40 +/// frameSize: 320 +/// hasDataHeader: YES +/// bitRate: 16000 +/// usVoipSlik: false ++(JLOpusFormat*)defaultFormats; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64_x86_64-simulator/JLAudioUnitKit.framework/Headers/JLOpusToOgg.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64_x86_64-simulator/JLAudioUnitKit.framework/Headers/JLOpusToOgg.h new file mode 100644 index 000000000..27b919bde --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64_x86_64-simulator/JLAudioUnitKit.framework/Headers/JLOpusToOgg.h @@ -0,0 +1,67 @@ +// +// JLOpusToOgg.h +// JLAudioUnitKit +// +// Created by EzioChan on 2025/5/16. +// Copyright © 2025 ZhuHai JieLi Technology Co.,Ltd. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +typedef void(^JLOpusToOggConvertBlock)(NSData *_Nullable oggData, BOOL isLast, NSError *_Nullable error); + +/// 将Opus数据转换为Ogg数据 +@interface JLOpusToOgg : NSObject + +/// 转码内容的回调 +@property(nonatomic,strong)JLOpusToOggConvertBlock _Nullable convertBlock; + +/// 帧长 +/// - Parameter frameLen: 帧长 +/// 默认值 40 +- (instancetype)initWithFrameLength:(uint32_t)frameLen; + +/// 开始流 +-(void)startStream; + +/// 添加Opus数据 +/// - Parameter opusData: 符合杰理的无头裸 opus 数据 +- (void)appendOpusData:(NSData *)opusData; + +/// 关闭流 +- (void)closeStream; + + +/// 将Opus数据转换为Ogg数据 +/// opus 必须为 16000 +/// opus 必须是 单声道 +/// - Parameters: +/// - opusData: 符合杰理的无头裸 opus 数据 +/// - frameLen: 帧长 公版默认帧长是 40 +/// - duration: 转换后的时长 +/// - error: 错误 ++ (NSData *_Nullable)convertOpusDataToOgg:(NSData *)opusData + frameLen:(uint32_t)frameLen + duration:(double *)duration + error:(NSError *__autoreleasing _Nullable *)error ; + +/// 将Opus文件转换为Ogg文件 +/// 符合杰理的无头裸 opus 文件 +/// opus 必须为 16000 +/// opus 必须是 单声道 +/// - Parameters: +/// - opusFilePath: opus文件路径 +/// - oggFilePath: ogg文件路径 +/// - frameLen: 帧长 公版默认帧长是 40 +/// - duration: 转换后的时长 ++(void)convertOpusFileToOgg:(NSString *)opusFilePath + oggFilePath:(NSString *)oggFilePath + frameLen:(uint32_t)frameLen + duration:(double *)duration; + + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64_x86_64-simulator/JLAudioUnitKit.framework/Headers/JLPcmToWav.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64_x86_64-simulator/JLAudioUnitKit.framework/Headers/JLPcmToWav.h new file mode 100644 index 000000000..b32ecef2d --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64_x86_64-simulator/JLAudioUnitKit.framework/Headers/JLPcmToWav.h @@ -0,0 +1,55 @@ +// +// JLPcmToWav.h +// JLAudioUnitKit +// +// Created by EzioChan on 2025/4/15. +// Copyright © 2025 ZhuHai JieLi Technology Co.,Ltd. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +/// PCM 转 WAV +@interface JLPcmToWav : NSObject + +#pragma mark - 流式编码接口 + +/// 初始化流式编码器 +/// @param outputPath 输出文件路径 +/// @param sampleRate 采样率(如 16000) +/// @param numChannels 声道数(1 或 2) +/// @param bitsPerSample 位深(16) +- (instancetype)initWithOutputPath:(NSString *)outputPath + sampleRate:(uint32_t)sampleRate + numChannels:(uint16_t)numChannels + bitsPerSample:(uint16_t)bitsPerSample; + +/// 追加 PCM 数据(需确保数据格式与初始化参数一致) +/// @param pcmData PCM 数据块 +/// @param error 错误信息 +- (BOOL)appendPCMData:(NSData *)pcmData error:(NSError **)error; + +/// 完成编码并关闭文件(必须调用以更新 WAV 头) +/// @param error 错误信息 +- (BOOL)finishWithError:(NSError **)error; + +#pragma mark - 一次性编码接口(便捷方法) + +/// 将 PCM 数据一次性转为 WAV 文件 +/// @param pcmData PCM 数据块 +/// @param outputPath 输出文件路径 +/// @param sampleRate 采样率(如 16000) +/// @param numChannels 声道数(1 或 2) +/// @param bitsPerSample 位深(16) +/// @param error 错误信息 ++ (BOOL)convertPCMData:(NSData *)pcmData + toWAVFile:(NSString *)outputPath + sampleRate:(uint32_t)sampleRate + numChannels:(uint16_t)numChannels + bitsPerSample:(uint16_t)bitsPerSample + error:(NSError **)error; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64_x86_64-simulator/JLAudioUnitKit.framework/Headers/JLPcmToWtg.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64_x86_64-simulator/JLAudioUnitKit.framework/Headers/JLPcmToWtg.h new file mode 100644 index 000000000..231b3e837 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64_x86_64-simulator/JLAudioUnitKit.framework/Headers/JLPcmToWtg.h @@ -0,0 +1,51 @@ +// +// JLPcmToWtg.h +// JLAudioUnitKit +// +// Created by EzioChan on 2025/1/21. +// Copyright © 2025 ZhuHai JieLi Technology Co.,Ltd. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface JLPcm2WtgModel : NSObject + +/// 音频文件 +@property (nonatomic, copy) NSString *pcmPath; + +/// 输出文件 +@property (nonatomic, copy) NSString *wtgPath; + +@end + + +/// JLPcmToWtgProtocol +@protocol JLPcmToWtgDelegate + +/// 音频转码完成 +/// - Parameter model: 音频转码模型 +- (void)convertPcmToWtgDone:(JLPcm2WtgModel *)model; + +@end + +/// 音频转码 +/// PCM 转 WTG +@interface JLPcmToWtg : NSObject + +- (instancetype)init NS_UNAVAILABLE; + +/// 音频转码初始化 +/// - Parameter delegate: 音频转码代理 +- (instancetype)initWithDelegate:(id)delegate; + +/// 音频转码 +/// 当前接口模型只限制 PCM 文件格式为:8k 16bit +/// 输入的pcm文件(16bit,小端,8k采样率),wtg_filename:输出的wtg文件 +/// - Parameter model: 音频转码模型 +-(void)convertPcmToWtg:(JLPcm2WtgModel *)model; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64_x86_64-simulator/JLAudioUnitKit.framework/Headers/JLSpeexDecoder.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64_x86_64-simulator/JLAudioUnitKit.framework/Headers/JLSpeexDecoder.h new file mode 100644 index 000000000..ad223d087 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64_x86_64-simulator/JLAudioUnitKit.framework/Headers/JLSpeexDecoder.h @@ -0,0 +1,54 @@ +// +// JLSpeexUnit.h +// JLAudioUnitKit +// +// Created by EzioChan on 2024/11/14. +// + +#import + +NS_ASSUME_NONNULL_BEGIN +@class JLSpeexDecoder; + +@protocol JLSpeexDelegate + +/// Speex 数据解码 +/// - Parameters: +/// - decoder: 解码器 +/// - data: PCM 数据 +/// - error: 错误信息 +- (void)speexDecoder:(JLSpeexDecoder *)decoder Data:(NSData* _Nullable)data error:(NSError* _Nullable)error; + +@end + +typedef void(^JLSpeexConvertBlock)(NSString *_Nullable pcmPath,NSError *_Nullable error); + +/// Speex 数据解码 +@interface JLSpeexDecoder : NSObject + +-(instancetype)init NS_UNAVAILABLE; + +/// 初始化 +/// - Parameter delegate: 委托 +-(instancetype)initWithDelegate:(id)delegate; + +/// 委托 +@property (nonatomic, weak) id delegate; + +/// 输入 Speex 数据 +/// - Parameter data: Speex 数据 +-(void)speexInputData:(NSData*)data; + +/// 将 Speex 转换为 PCM +/// - Parameters: +/// - filePath: Speex 路径 +/// - opPath: 输出路径 +/// - result: 结果回调 +-(void)speexConvertToPcm:(NSString *)filePath outPutFilePath:(NSString * _Nullable)opPath Result:(JLSpeexConvertBlock)result; + +/// 释放对象 +-(void)speexOnRelease; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64_x86_64-simulator/JLAudioUnitKit.framework/Info.plist b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64_x86_64-simulator/JLAudioUnitKit.framework/Info.plist new file mode 100644 index 000000000..832461042 Binary files /dev/null and b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64_x86_64-simulator/JLAudioUnitKit.framework/Info.plist differ diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64_x86_64-simulator/JLAudioUnitKit.framework/JLAudioUnitKit b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64_x86_64-simulator/JLAudioUnitKit.framework/JLAudioUnitKit new file mode 100755 index 000000000..98f3b2b9e Binary files /dev/null and b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64_x86_64-simulator/JLAudioUnitKit.framework/JLAudioUnitKit differ diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64_x86_64-simulator/JLAudioUnitKit.framework/Modules/module.modulemap b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64_x86_64-simulator/JLAudioUnitKit.framework/Modules/module.modulemap new file mode 100644 index 000000000..5e1ae1d3d --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64_x86_64-simulator/JLAudioUnitKit.framework/Modules/module.modulemap @@ -0,0 +1,6 @@ +framework module JLAudioUnitKit { + umbrella header "JLAudioUnitKit.h" + export * + + module * { export * } +} diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64_x86_64-simulator/JLAudioUnitKit.framework/_CodeSignature/CodeResources b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64_x86_64-simulator/JLAudioUnitKit.framework/_CodeSignature/CodeResources new file mode 100644 index 000000000..dab32655b --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64_x86_64-simulator/JLAudioUnitKit.framework/_CodeSignature/CodeResources @@ -0,0 +1,234 @@ + + + + + files + + Headers/JLAudioUnitKit.h + + hE2nr+4q2/NdSgBaayJc7ZoOXb0= + + Headers/JLAudioUnitPlayer.h + + QPMLV/XA8hjk39d+vT+S57t0fDU= + + Headers/JLOpusDecoder.h + + K1bYcaJ67prImNlGuldy8csTRHc= + + Headers/JLOpusEncodeConfig.h + + NArAew5QxnSJGsD0tRzQ2V7bHrY= + + Headers/JLOpusEncoder.h + + 7DYUlvXrp1QC9l2XZ5tNHtsmsBQ= + + Headers/JLOpusFormat.h + + Du1x3VNk87NstmspRk7ElijuZrk= + + Headers/JLOpusToOgg.h + + fSJT6LcyylJHTHX1wsN3JHG2FxU= + + Headers/JLPcmToWav.h + + /BbZmqmWpWVBusXqjnzbjaBNCNg= + + Headers/JLPcmToWtg.h + + zoOdOFpIulND0F1OrfIXR1H0kh0= + + Headers/JLSpeexDecoder.h + + 5ecBKtD3BDGccLiKpTs0fS0CSgs= + + Info.plist + + pXqOzYCqPnMLY0nonWZTcbfnlhU= + + Modules/module.modulemap + + 2vYf0m+hGTOTapX6sliv/F1E1VI= + + readme.txt + + wijZX0Dr2OlODWS6XYbpeKabb7g= + + + files2 + + Headers/JLAudioUnitKit.h + + hash2 + + J5pq6Ed3fR+cQ7CGPXDoPl7BZzix7Cjf5yJZFRRvxqs= + + + Headers/JLAudioUnitPlayer.h + + hash2 + + qBz0OA82HUH4kBtO8xiUw7Q4ohtiIvCSYfCqax5xjJY= + + + Headers/JLOpusDecoder.h + + hash2 + + cnAj6Nt6vgRLoEH6QY3Q+gYpjcxGPN1OLLZbCgdLymI= + + + Headers/JLOpusEncodeConfig.h + + hash2 + + qrPpsrXaNCvyxf0/gUZtvveL+ywsfgBUrMPFibjneOo= + + + Headers/JLOpusEncoder.h + + hash2 + + YoHsvoGH2VEjvEIzEa7t+cAnzf8kHEU3dJTd03ABr1w= + + + Headers/JLOpusFormat.h + + hash2 + + Nm6vM9/EbFzyIWbsysu6EOO2S+vZVeplcop4NvoJaMA= + + + Headers/JLOpusToOgg.h + + hash2 + + dNSvJJnED/6E1p7TYZ4zBzUnLDVsZ8NovuNYjge6T/w= + + + Headers/JLPcmToWav.h + + hash2 + + l/SEQhSFh7ctq/pBV+Z7X+Z0/gz30eCw3s31otjMPho= + + + Headers/JLPcmToWtg.h + + hash2 + + MwtbX3Sa0nytA+m11x+1rDvP4WvJnZLljshuT5B3WD0= + + + Headers/JLSpeexDecoder.h + + hash2 + + pV0X3xn07Ps7wE+0EfL9Yu/08tp8Ug8s14iDigRU46o= + + + Modules/module.modulemap + + hash2 + + akFCUM59aSAaRM/ADWQ138YT9GD3oAjcaTvTUo24Ml8= + + + readme.txt + + hash2 + + +2GG9ORrf2yJnBe2joKWtyBZL9p2sCH8EXqK1GIgW0E= + + + + rules + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^version.plist$ + + + rules2 + + .*\.dSYM($|/) + + weight + 11 + + ^(.*/)?\.DS_Store$ + + omit + + weight + 2000 + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^Info\.plist$ + + omit + + weight + 20 + + ^PkgInfo$ + + omit + + weight + 20 + + ^embedded\.provisionprofile$ + + weight + 20 + + ^version\.plist$ + + weight + 20 + + + + diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64_x86_64-simulator/JLAudioUnitKit.framework/readme.txt b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64_x86_64-simulator/JLAudioUnitKit.framework/readme.txt new file mode 100644 index 000000000..6789fe6e1 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLAudioUnitKit.xcframework/ios-arm64_x86_64-simulator/JLAudioUnitKit.framework/readme.txt @@ -0,0 +1,52 @@ +DESCRIPTION +----------- +This package includes the files needed to build the fixed point implementation +of the ITU-T G.729 Appendix IV. + +DIFFERENCES WITH G.729B +----------------------- +The ANSI-C source code simulating the bit-exact, fixed point simulation +software of enhanced VAD is integrated into the G.729B source code. +The modification to the G.729B source code updated files of coder.c, +cod_ld8k.c, bits.c, dec_sid.c, dtx.c, qsidgain.c, qsidlsf.c, tab_dtx.c, +tab_dtx.h, ld8k.h, deleted vad.c/h and integrated the enhanced VAD functions +into the G.729B project. The modification also replaced the original basic +operators used in the original G.729B source code by the basic operators of +ITU-T Software Tool Library STL2005. + +COMPILATION +----------- +For UNIX systems the following makefiles are provided + + coder.mak + decoder.mak + +Edit the makefiles coder.mak and decoder.mak to set the proper options +for your system. +The command to compile and link all code on a UNIX system is + + make -f coder.mak + make -f decoder.mak + +For other platforms, the *.mak files can be used to work out the +compilation procedures. + +USAGE +----- +The command line instruction for the encoder is as follows: + coder inputfile bitstreamfile dtx_option mode x +where: + inputfile : 8 kHz sampled data file containing 16 bit linear PCM signal + bitstreamfile: binary file containing bitstream + dtx_option : = 1 : DTX enabled 0 : DTX disabled + mode X : Run encoder with enhanced VAD in operating point X, + X=0 or 1 or 2 representing balanced or quality-preferred + or bandwidth saving operating point, respectively + +The command line for the decoder is as follows: + decoder bitstreamfile outputfile +where: + bitstreamfile: binary file containing bitstream + outputfile : 8 kHz sampled data file containing 16 bit linear PCM signal + + diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/Info.plist b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/Info.plist new file mode 100644 index 000000000..ba249d11c --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/Info.plist @@ -0,0 +1,59 @@ + + + + + AvailableLibraries + + + BinaryPath + JLBmpConvertKit.framework/JLBmpConvertKit + LibraryIdentifier + ios-arm64 + LibraryPath + JLBmpConvertKit.framework + SupportedArchitectures + + arm64 + + SupportedPlatform + ios + + + BinaryPath + JLBmpConvertKit.framework/Versions/A/JLBmpConvertKit + LibraryIdentifier + macos-arm64_x86_64 + LibraryPath + JLBmpConvertKit.framework + SupportedArchitectures + + arm64 + x86_64 + + SupportedPlatform + macos + + + BinaryPath + JLBmpConvertKit.framework/JLBmpConvertKit + LibraryIdentifier + ios-arm64_x86_64-simulator + LibraryPath + JLBmpConvertKit.framework + SupportedArchitectures + + arm64 + x86_64 + + SupportedPlatform + ios + SupportedPlatformVariant + simulator + + + CFBundlePackageType + XFWK + XCFrameworkFormatVersion + 1.0 + + diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/ios-arm64/JLBmpConvertKit.framework/Headers/JLBmpConvert.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/ios-arm64/JLBmpConvertKit.framework/Headers/JLBmpConvert.h new file mode 100644 index 000000000..1d20bffaa --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/ios-arm64/JLBmpConvertKit.framework/Headers/JLBmpConvert.h @@ -0,0 +1,95 @@ +// +// JLBmpCovert.h +// JLBmpCovertKit +// +// Created by EzioChan on 2024/9/9. +// Copyright © 2024 www.zh-jieli.com. All rights reserved. +// + +#import +#import +#if TARGET_OS_IOS || TARGET_OS_MACCATALYST +#import +#elif TARGET_OS_OSX +#import +#endif + + +NS_ASSUME_NONNULL_BEGIN +@class JLImageConvertResult; + +typedef void(^JLBmpCovertCallBack)(NSString *inFilePath,NSString *__nullable outFilePath,NSError *__nullable error) __deprecated_msg("This interface is deprecated. Please use convert:inFilePath:outFilePath: or convert:Image: instead."); + +typedef void(^JLBmpCovertCallBack2)(NSData *__nullable outFileData,NSError *__nullable error) __deprecated_msg("This interface is deprecated. Please use convert:inFilePath:outFilePath: or convert:Image: instead."); + + +/// 图像转换 +@interface JLBmpConvert : NSObject +#if TARGET_OS_IOS || TARGET_OS_MACCATALYST + +/// 图片转换 +/// - Parameters: +/// - type: 转换类型 +/// - inFilePath: 输入文件 +/// - outFilePath: 输出文件 +/// - completion: 回调 ++(void)covert:(JLBmpConvertType)type + inFilePath:(NSString *_Nonnull)inFilePath + outFilePath:(NSString * __nullable)outFilePath + completion:(JLBmpCovertCallBack _Nonnull)completion __deprecated_msg("This interface is deprecated. Please use convert:inFilePath:outFilePath: or convert:Image: instead."); + +/// 图片转换 +/// - Parameters: +/// - type: 转换类型 +/// - inImage: 输入图片 +/// - completion: 回调 ++(void)covert:(JLBmpConvertType)type + Image:(UIImage *)inImage + completion:(JLBmpCovertCallBack2 _Nonnull)completion __deprecated_msg("This interface is deprecated. Please use convert:inFilePath:outFilePath: or convert:Image: instead."); + +/// 图片转换 +/// - Parameters: +/// - option: 类型 +/// 当前仅仅 707N 系列芯片可指定图像格式 +/// - inFilePath: 输入文件 +/// - outFilePath: 输出文件 +/// 文件路径转换入口 ++ (JLImageConvertResult *)convert:(JLBmpConvertOption *)option + inFilePath:(NSString *)inFilePath + outFilePath:(NSString * __nullable)outFilePath; + +/// UIImage 转换 +/// 当前仅仅 707N 系列芯片可指定图像格式 +/// - Parameters: +/// - option: 类型 +/// - imgData: 图片的原始数据 ++(JLImageConvertResult *)convert:(JLBmpConvertOption *)option ImageData:(NSData *)imgData; + + +/// UIImage 转换成 BGRA +/// - Parameter image: 图片 ++(NSData*)convertImageToBGRABytes:(UIImage *)image; + +/// UIImage 转换成 RGBA +/// - Parameter image: 图片 ++(NSData*)convertImageToRGBABytes:(UIImage *)image; + + +/// 图片缩放 +/// - Parameters: +/// - image: 图片 +/// - newSize: 缩放大小 +/// - Returns: 缩放后的图片 ++(NSData *)resizeImage:(UIImage*)image andResizeTo:(CGSize)newSize; + +#elif TARGET_OS_OSX +/// 图片转换 +/// - Parameters: +/// - option: 转换类型 +/// - inImage: 输入图片 ++(JLImageConvertResult *)convert:(JLBmpConvertOption *)option Image:(NSImage *)image; + +#endif +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/ios-arm64/JLBmpConvertKit.framework/Headers/JLBmpConvertKit.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/ios-arm64/JLBmpConvertKit.framework/Headers/JLBmpConvertKit.h new file mode 100644 index 000000000..9ff73bf13 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/ios-arm64/JLBmpConvertKit.framework/Headers/JLBmpConvertKit.h @@ -0,0 +1,24 @@ +// +// JLBmpConvertKit.h +// JLBmpConvertKit +// +// Created by EzioChan on 2024/9/9. +// Copyright © 2024 www.zh-jieli.com. All rights reserved. +// + +#import + +//! Project version number for JLBmpConvertKit. +FOUNDATION_EXPORT double JLBmpConvertKitVersionNumber; + +//! Project version string for JLBmpConvertKit. +FOUNDATION_EXPORT const unsigned char JLBmpConvertKitVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + + +#import +#import +#import +#import + diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/ios-arm64/JLBmpConvertKit.framework/Headers/JLBmpConvertOption.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/ios-arm64/JLBmpConvertKit.framework/Headers/JLBmpConvertOption.h new file mode 100644 index 000000000..41e05510c --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/ios-arm64/JLBmpConvertKit.framework/Headers/JLBmpConvertOption.h @@ -0,0 +1,89 @@ +// +// JLBmpConvertOption.h +// JLBmpConvertKit +// +// Created by EzioChan on 2025/5/23. +// Copyright © 2025 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +/// 图像转换类型 +typedef NS_ENUM(NSUInteger, JLBmpConvertType) { + /// 695N 图像转换 RGB 转换成 695N 芯片对应的图像资源 + /// 对应原 BR23 转换算法 + JLBmpConvertType695N_RBG = 0, + /// 701N 图像转换 RGB 转换成 701N 芯片对应的图像资源 + /// 对应原 BR28 转换的算法 + JLBmpConvertType701N_RBG = 1, + /// 701N 图像转换 ARGB 转换成 701N 芯片对应的图像资源 + /// 对应原 BR28_ARBG 转换的算法 + JLBmpConvertType701N_ARBG = 2, + /// 701N 图像转换 RGB 转换成 701N 芯片对应的图像资源(不打包封装) + /// 对应原 BR28_RGB_NO_PACK 转换的算法(不打包封装) + JLBmpConvertType701N_RBG_NO_PACK = 3, + /// 701N 图像转换 ARGB 转换成 701N 芯片对应的图像资源(不打包封装) + /// 对应原 BR28_ARGB_NO_PACK 转换的算法(不打包封装) + JLBmpConvertType701N_ARGB_NO_PACK = 4, + /// 707N 图像转换 RGB 转换成 707N 芯片对应的图像资源 + /// 对应 BR35 转换的算法 + JLBmpConvertType707N_RBG = 5, + /// 707N 图像转换 ARGB 转换成 707N 芯片对应的图像资源 + /// 对应 BR35_ARGB 转换的算法 + JLBmpConvertType707N_ARGB = 6, + /// 707N 图像转换 RGB 转换成 707N 芯片对应的图像资源(不打包封装) + /// 对应 BR35_RGB_NO_PACK 转换的算法(不打包封装) + JLBmpConvertType707N_ARGB_NO_PACK = 7, + /// 707N 图像转换 RGB 转换成 707N 芯片对应的图像资源(不打包封装) + /// 对应 BR35_RGB_NO_PACK 转换的算法(不打包封装) + JLBmpConvertType707N_RBG_NO_PACK = 8, + /// 701N 图像转换 JPEG + /// 仅仅支持 JPEG 类型 + JLBmpConvertType701N_JPEG = 9 +}; + +/// 图像格式 +/// 仅(707N 系列芯片支持) +typedef NS_ENUM(NSUInteger, JLBmpPixelformat) { + /// ARBG8888/RBG888 格式 + JLBmpPixelformat_888, + /// ARBG8565/RBG565 格式 + JLBmpPixelformat_565, + /// 自动选择最小的格式 + JLBmpPixelformat_Auto, +}; + +/// LVGL 打包格式 +typedef NS_ENUM(NSUInteger, JLBmpPacketFormat) { + JLBmpPacketFormatNone = 0, + JLBmpPacketFormatJLUI = 1, + JLBmpPacketFormatLVGL = 2 +}; + +/// 图像转换选项 +@interface JLBmpConvertOption : NSObject + +/// 图像转换类型 +@property (nonatomic, assign) JLBmpConvertType convertType; + +/// 图像格式 +/// 默认为 auto +/// 仅(707N 系列芯片支持) +@property (nonatomic, assign) JLBmpPixelformat pixelformat; + +/// LVGL 打包格式 +/// 默认为 JLUI +/// 仅(707N 系列芯片支持) +@property (nonatomic, assign) JLBmpPacketFormat packetFormat; + +/// 是否转换成 BGRA +/// 当使用的是 JL 的 UI 框架时需要使用 +/// 使用其他第三方框架时,需要根据固件端框架进行调整 +/// default YES +@property (nonatomic, assign) BOOL convertToBGRA; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/ios-arm64/JLBmpConvertKit.framework/Headers/JLGifBin.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/ios-arm64/JLBmpConvertKit.framework/Headers/JLGifBin.h new file mode 100644 index 000000000..5b7cdc2d7 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/ios-arm64/JLBmpConvertKit.framework/Headers/JLGifBin.h @@ -0,0 +1,77 @@ +// +// JLGifBin.h +// JLGifLib +// +// Created by EzioChan on 2024/1/18. +// Copyright © 2024 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +/// Gif 转 Bin 支持的芯片类型 +typedef NS_ENUM(NSUInteger, JLGIFBinChipType) { + /// 701N + JLGIFBinChipJL_701N, + /// 707N + JLGIFBinChipJL_707N, +}; + +///packet 是否打包 +typedef NS_ENUM(NSInteger, JLGIFBinPackageType) { + /// 不做其他打包使用源数据,适用 LVGL 的公版UI框架 + JLGIFBinPackageTypeLVGL = 0, + /// 杰理打包格式,适用 JLVGL 的杰理定制版 UI 框架 + JLGIFBinPackageTypeJLVGL = 1, +}; + +typedef void(^JLGif2BinBlock)(int code,NSData *_Nullable binData); + +/// Gif 转 Bin +@interface JLGifBin : NSObject + +/// 打印当前SDK的版本 ++(void)sdkVersion; + +/// 根据 Gif 创建 Bin +/// - Parameters: +/// - gifData: Gif 图片数据 +/// - level: 等级 +/// 1: 低码率 +/// 2: 中码率 +/// 3: 高码率 +/// - block: 回调内容 ++(void)makeDataToBin:(NSData *)gifData Level:(int)level Result:(JLGif2BinBlock)block __attribute__((deprecated("Use makeDataToBin:Level:ChipType:Result: instead."))); + + +/// 根据 Gif 创建 Bin +/// - Parameters: +/// - gifData: Gif 图片数据 +/// - level: 等级 +/// 1: 低码率 +/// 2: 中码率 (仅 JLGIFBinChipJL_701N 支持) +/// 3: 高码率 (仅 JLGIFBinChipJL_701N 支持) +/// - chip: 芯片类型 +/// - block: 回调内容 ++(void)makeDataToBin:(NSData *)gifData Level:(int)level ChipType:(JLGIFBinChipType)chip Result:(JLGif2BinBlock)block __attribute__((deprecated("Use makeDataToBin:Level:ChipType:PackageType:Result: instead."))); + + +/// 根据 Gif 创建 Bin +/// - Parameters: +/// - gifData: Gif 图片数据 +/// - level: 等级 +/// 1: 低码率 +/// 2: 中码率 (仅 JLGIFBinChipJL_701N 支持) +/// 3: 高码率 (仅 JLGIFBinChipJL_701N 支持) +/// - chip: 芯片类型 +/// - packageType: 打包类型 +/// 1: JLUI 杰理 UI 格式 +/// 0: 无 不打包 +/// - block: 回调内容 ++(void)makeDataToBin:(NSData *)gifData Level:(int)level ChipType:(JLGIFBinChipType)chip PackageType:(JLGIFBinPackageType)packageType Result:(JLGif2BinBlock)block; + + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/ios-arm64/JLBmpConvertKit.framework/Headers/JLImageConvertResult.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/ios-arm64/JLBmpConvertKit.framework/Headers/JLImageConvertResult.h new file mode 100644 index 000000000..0180e5784 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/ios-arm64/JLBmpConvertKit.framework/Headers/JLImageConvertResult.h @@ -0,0 +1,34 @@ +// +// JLImageConvertResult.h +// JLBmpConvertKit +// +// Created by EzioChan on 2025/3/6. +// Copyright © 2025 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +/// 图像转换结果 +@interface JLImageConvertResult : NSObject +/// 结果码 +@property (nonatomic, assign) int result; +/// 数据大小 +@property (nonatomic, assign) int buf_size; +/// 图像格式 +@property (nonatomic, assign) int pixel_format; +/// 压缩模式 +@property (nonatomic, assign) int compress_mode; + +#if TARGET_OS_IOS || TARGET_OS_MACCATALYST +/// 输出文件路径 +@property (nullable, nonatomic, copy) NSString *outFilePath; +#endif + +/// 输出文件内容 +@property (nullable, nonatomic, copy) NSData *outFileData; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/ios-arm64/JLBmpConvertKit.framework/Info.plist b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/ios-arm64/JLBmpConvertKit.framework/Info.plist new file mode 100644 index 000000000..850885dce Binary files /dev/null and b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/ios-arm64/JLBmpConvertKit.framework/Info.plist differ diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/ios-arm64/JLBmpConvertKit.framework/JLBmpConvertKit b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/ios-arm64/JLBmpConvertKit.framework/JLBmpConvertKit new file mode 100755 index 000000000..587d9cb6f Binary files /dev/null and b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/ios-arm64/JLBmpConvertKit.framework/JLBmpConvertKit differ diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/ios-arm64/JLBmpConvertKit.framework/Modules/module.modulemap b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/ios-arm64/JLBmpConvertKit.framework/Modules/module.modulemap new file mode 100644 index 000000000..b3d18e590 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/ios-arm64/JLBmpConvertKit.framework/Modules/module.modulemap @@ -0,0 +1,6 @@ +framework module JLBmpConvertKit { + umbrella header "JLBmpConvertKit.h" + export * + + module * { export * } +} diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/ios-arm64_x86_64-simulator/JLBmpConvertKit.framework/Headers/JLBmpConvert.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/ios-arm64_x86_64-simulator/JLBmpConvertKit.framework/Headers/JLBmpConvert.h new file mode 100644 index 000000000..1d20bffaa --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/ios-arm64_x86_64-simulator/JLBmpConvertKit.framework/Headers/JLBmpConvert.h @@ -0,0 +1,95 @@ +// +// JLBmpCovert.h +// JLBmpCovertKit +// +// Created by EzioChan on 2024/9/9. +// Copyright © 2024 www.zh-jieli.com. All rights reserved. +// + +#import +#import +#if TARGET_OS_IOS || TARGET_OS_MACCATALYST +#import +#elif TARGET_OS_OSX +#import +#endif + + +NS_ASSUME_NONNULL_BEGIN +@class JLImageConvertResult; + +typedef void(^JLBmpCovertCallBack)(NSString *inFilePath,NSString *__nullable outFilePath,NSError *__nullable error) __deprecated_msg("This interface is deprecated. Please use convert:inFilePath:outFilePath: or convert:Image: instead."); + +typedef void(^JLBmpCovertCallBack2)(NSData *__nullable outFileData,NSError *__nullable error) __deprecated_msg("This interface is deprecated. Please use convert:inFilePath:outFilePath: or convert:Image: instead."); + + +/// 图像转换 +@interface JLBmpConvert : NSObject +#if TARGET_OS_IOS || TARGET_OS_MACCATALYST + +/// 图片转换 +/// - Parameters: +/// - type: 转换类型 +/// - inFilePath: 输入文件 +/// - outFilePath: 输出文件 +/// - completion: 回调 ++(void)covert:(JLBmpConvertType)type + inFilePath:(NSString *_Nonnull)inFilePath + outFilePath:(NSString * __nullable)outFilePath + completion:(JLBmpCovertCallBack _Nonnull)completion __deprecated_msg("This interface is deprecated. Please use convert:inFilePath:outFilePath: or convert:Image: instead."); + +/// 图片转换 +/// - Parameters: +/// - type: 转换类型 +/// - inImage: 输入图片 +/// - completion: 回调 ++(void)covert:(JLBmpConvertType)type + Image:(UIImage *)inImage + completion:(JLBmpCovertCallBack2 _Nonnull)completion __deprecated_msg("This interface is deprecated. Please use convert:inFilePath:outFilePath: or convert:Image: instead."); + +/// 图片转换 +/// - Parameters: +/// - option: 类型 +/// 当前仅仅 707N 系列芯片可指定图像格式 +/// - inFilePath: 输入文件 +/// - outFilePath: 输出文件 +/// 文件路径转换入口 ++ (JLImageConvertResult *)convert:(JLBmpConvertOption *)option + inFilePath:(NSString *)inFilePath + outFilePath:(NSString * __nullable)outFilePath; + +/// UIImage 转换 +/// 当前仅仅 707N 系列芯片可指定图像格式 +/// - Parameters: +/// - option: 类型 +/// - imgData: 图片的原始数据 ++(JLImageConvertResult *)convert:(JLBmpConvertOption *)option ImageData:(NSData *)imgData; + + +/// UIImage 转换成 BGRA +/// - Parameter image: 图片 ++(NSData*)convertImageToBGRABytes:(UIImage *)image; + +/// UIImage 转换成 RGBA +/// - Parameter image: 图片 ++(NSData*)convertImageToRGBABytes:(UIImage *)image; + + +/// 图片缩放 +/// - Parameters: +/// - image: 图片 +/// - newSize: 缩放大小 +/// - Returns: 缩放后的图片 ++(NSData *)resizeImage:(UIImage*)image andResizeTo:(CGSize)newSize; + +#elif TARGET_OS_OSX +/// 图片转换 +/// - Parameters: +/// - option: 转换类型 +/// - inImage: 输入图片 ++(JLImageConvertResult *)convert:(JLBmpConvertOption *)option Image:(NSImage *)image; + +#endif +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/ios-arm64_x86_64-simulator/JLBmpConvertKit.framework/Headers/JLBmpConvertKit.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/ios-arm64_x86_64-simulator/JLBmpConvertKit.framework/Headers/JLBmpConvertKit.h new file mode 100644 index 000000000..9ff73bf13 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/ios-arm64_x86_64-simulator/JLBmpConvertKit.framework/Headers/JLBmpConvertKit.h @@ -0,0 +1,24 @@ +// +// JLBmpConvertKit.h +// JLBmpConvertKit +// +// Created by EzioChan on 2024/9/9. +// Copyright © 2024 www.zh-jieli.com. All rights reserved. +// + +#import + +//! Project version number for JLBmpConvertKit. +FOUNDATION_EXPORT double JLBmpConvertKitVersionNumber; + +//! Project version string for JLBmpConvertKit. +FOUNDATION_EXPORT const unsigned char JLBmpConvertKitVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + + +#import +#import +#import +#import + diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/ios-arm64_x86_64-simulator/JLBmpConvertKit.framework/Headers/JLBmpConvertOption.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/ios-arm64_x86_64-simulator/JLBmpConvertKit.framework/Headers/JLBmpConvertOption.h new file mode 100644 index 000000000..41e05510c --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/ios-arm64_x86_64-simulator/JLBmpConvertKit.framework/Headers/JLBmpConvertOption.h @@ -0,0 +1,89 @@ +// +// JLBmpConvertOption.h +// JLBmpConvertKit +// +// Created by EzioChan on 2025/5/23. +// Copyright © 2025 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +/// 图像转换类型 +typedef NS_ENUM(NSUInteger, JLBmpConvertType) { + /// 695N 图像转换 RGB 转换成 695N 芯片对应的图像资源 + /// 对应原 BR23 转换算法 + JLBmpConvertType695N_RBG = 0, + /// 701N 图像转换 RGB 转换成 701N 芯片对应的图像资源 + /// 对应原 BR28 转换的算法 + JLBmpConvertType701N_RBG = 1, + /// 701N 图像转换 ARGB 转换成 701N 芯片对应的图像资源 + /// 对应原 BR28_ARBG 转换的算法 + JLBmpConvertType701N_ARBG = 2, + /// 701N 图像转换 RGB 转换成 701N 芯片对应的图像资源(不打包封装) + /// 对应原 BR28_RGB_NO_PACK 转换的算法(不打包封装) + JLBmpConvertType701N_RBG_NO_PACK = 3, + /// 701N 图像转换 ARGB 转换成 701N 芯片对应的图像资源(不打包封装) + /// 对应原 BR28_ARGB_NO_PACK 转换的算法(不打包封装) + JLBmpConvertType701N_ARGB_NO_PACK = 4, + /// 707N 图像转换 RGB 转换成 707N 芯片对应的图像资源 + /// 对应 BR35 转换的算法 + JLBmpConvertType707N_RBG = 5, + /// 707N 图像转换 ARGB 转换成 707N 芯片对应的图像资源 + /// 对应 BR35_ARGB 转换的算法 + JLBmpConvertType707N_ARGB = 6, + /// 707N 图像转换 RGB 转换成 707N 芯片对应的图像资源(不打包封装) + /// 对应 BR35_RGB_NO_PACK 转换的算法(不打包封装) + JLBmpConvertType707N_ARGB_NO_PACK = 7, + /// 707N 图像转换 RGB 转换成 707N 芯片对应的图像资源(不打包封装) + /// 对应 BR35_RGB_NO_PACK 转换的算法(不打包封装) + JLBmpConvertType707N_RBG_NO_PACK = 8, + /// 701N 图像转换 JPEG + /// 仅仅支持 JPEG 类型 + JLBmpConvertType701N_JPEG = 9 +}; + +/// 图像格式 +/// 仅(707N 系列芯片支持) +typedef NS_ENUM(NSUInteger, JLBmpPixelformat) { + /// ARBG8888/RBG888 格式 + JLBmpPixelformat_888, + /// ARBG8565/RBG565 格式 + JLBmpPixelformat_565, + /// 自动选择最小的格式 + JLBmpPixelformat_Auto, +}; + +/// LVGL 打包格式 +typedef NS_ENUM(NSUInteger, JLBmpPacketFormat) { + JLBmpPacketFormatNone = 0, + JLBmpPacketFormatJLUI = 1, + JLBmpPacketFormatLVGL = 2 +}; + +/// 图像转换选项 +@interface JLBmpConvertOption : NSObject + +/// 图像转换类型 +@property (nonatomic, assign) JLBmpConvertType convertType; + +/// 图像格式 +/// 默认为 auto +/// 仅(707N 系列芯片支持) +@property (nonatomic, assign) JLBmpPixelformat pixelformat; + +/// LVGL 打包格式 +/// 默认为 JLUI +/// 仅(707N 系列芯片支持) +@property (nonatomic, assign) JLBmpPacketFormat packetFormat; + +/// 是否转换成 BGRA +/// 当使用的是 JL 的 UI 框架时需要使用 +/// 使用其他第三方框架时,需要根据固件端框架进行调整 +/// default YES +@property (nonatomic, assign) BOOL convertToBGRA; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/ios-arm64_x86_64-simulator/JLBmpConvertKit.framework/Headers/JLGifBin.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/ios-arm64_x86_64-simulator/JLBmpConvertKit.framework/Headers/JLGifBin.h new file mode 100644 index 000000000..5b7cdc2d7 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/ios-arm64_x86_64-simulator/JLBmpConvertKit.framework/Headers/JLGifBin.h @@ -0,0 +1,77 @@ +// +// JLGifBin.h +// JLGifLib +// +// Created by EzioChan on 2024/1/18. +// Copyright © 2024 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +/// Gif 转 Bin 支持的芯片类型 +typedef NS_ENUM(NSUInteger, JLGIFBinChipType) { + /// 701N + JLGIFBinChipJL_701N, + /// 707N + JLGIFBinChipJL_707N, +}; + +///packet 是否打包 +typedef NS_ENUM(NSInteger, JLGIFBinPackageType) { + /// 不做其他打包使用源数据,适用 LVGL 的公版UI框架 + JLGIFBinPackageTypeLVGL = 0, + /// 杰理打包格式,适用 JLVGL 的杰理定制版 UI 框架 + JLGIFBinPackageTypeJLVGL = 1, +}; + +typedef void(^JLGif2BinBlock)(int code,NSData *_Nullable binData); + +/// Gif 转 Bin +@interface JLGifBin : NSObject + +/// 打印当前SDK的版本 ++(void)sdkVersion; + +/// 根据 Gif 创建 Bin +/// - Parameters: +/// - gifData: Gif 图片数据 +/// - level: 等级 +/// 1: 低码率 +/// 2: 中码率 +/// 3: 高码率 +/// - block: 回调内容 ++(void)makeDataToBin:(NSData *)gifData Level:(int)level Result:(JLGif2BinBlock)block __attribute__((deprecated("Use makeDataToBin:Level:ChipType:Result: instead."))); + + +/// 根据 Gif 创建 Bin +/// - Parameters: +/// - gifData: Gif 图片数据 +/// - level: 等级 +/// 1: 低码率 +/// 2: 中码率 (仅 JLGIFBinChipJL_701N 支持) +/// 3: 高码率 (仅 JLGIFBinChipJL_701N 支持) +/// - chip: 芯片类型 +/// - block: 回调内容 ++(void)makeDataToBin:(NSData *)gifData Level:(int)level ChipType:(JLGIFBinChipType)chip Result:(JLGif2BinBlock)block __attribute__((deprecated("Use makeDataToBin:Level:ChipType:PackageType:Result: instead."))); + + +/// 根据 Gif 创建 Bin +/// - Parameters: +/// - gifData: Gif 图片数据 +/// - level: 等级 +/// 1: 低码率 +/// 2: 中码率 (仅 JLGIFBinChipJL_701N 支持) +/// 3: 高码率 (仅 JLGIFBinChipJL_701N 支持) +/// - chip: 芯片类型 +/// - packageType: 打包类型 +/// 1: JLUI 杰理 UI 格式 +/// 0: 无 不打包 +/// - block: 回调内容 ++(void)makeDataToBin:(NSData *)gifData Level:(int)level ChipType:(JLGIFBinChipType)chip PackageType:(JLGIFBinPackageType)packageType Result:(JLGif2BinBlock)block; + + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/ios-arm64_x86_64-simulator/JLBmpConvertKit.framework/Headers/JLImageConvertResult.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/ios-arm64_x86_64-simulator/JLBmpConvertKit.framework/Headers/JLImageConvertResult.h new file mode 100644 index 000000000..0180e5784 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/ios-arm64_x86_64-simulator/JLBmpConvertKit.framework/Headers/JLImageConvertResult.h @@ -0,0 +1,34 @@ +// +// JLImageConvertResult.h +// JLBmpConvertKit +// +// Created by EzioChan on 2025/3/6. +// Copyright © 2025 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +/// 图像转换结果 +@interface JLImageConvertResult : NSObject +/// 结果码 +@property (nonatomic, assign) int result; +/// 数据大小 +@property (nonatomic, assign) int buf_size; +/// 图像格式 +@property (nonatomic, assign) int pixel_format; +/// 压缩模式 +@property (nonatomic, assign) int compress_mode; + +#if TARGET_OS_IOS || TARGET_OS_MACCATALYST +/// 输出文件路径 +@property (nullable, nonatomic, copy) NSString *outFilePath; +#endif + +/// 输出文件内容 +@property (nullable, nonatomic, copy) NSData *outFileData; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/ios-arm64_x86_64-simulator/JLBmpConvertKit.framework/Info.plist b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/ios-arm64_x86_64-simulator/JLBmpConvertKit.framework/Info.plist new file mode 100644 index 000000000..6296ca17e Binary files /dev/null and b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/ios-arm64_x86_64-simulator/JLBmpConvertKit.framework/Info.plist differ diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/ios-arm64_x86_64-simulator/JLBmpConvertKit.framework/JLBmpConvertKit b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/ios-arm64_x86_64-simulator/JLBmpConvertKit.framework/JLBmpConvertKit new file mode 100755 index 000000000..0566cc69e Binary files /dev/null and b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/ios-arm64_x86_64-simulator/JLBmpConvertKit.framework/JLBmpConvertKit differ diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/ios-arm64_x86_64-simulator/JLBmpConvertKit.framework/Modules/module.modulemap b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/ios-arm64_x86_64-simulator/JLBmpConvertKit.framework/Modules/module.modulemap new file mode 100644 index 000000000..b3d18e590 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/ios-arm64_x86_64-simulator/JLBmpConvertKit.framework/Modules/module.modulemap @@ -0,0 +1,6 @@ +framework module JLBmpConvertKit { + umbrella header "JLBmpConvertKit.h" + export * + + module * { export * } +} diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/ios-arm64_x86_64-simulator/JLBmpConvertKit.framework/_CodeSignature/CodeResources b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/ios-arm64_x86_64-simulator/JLBmpConvertKit.framework/_CodeSignature/CodeResources new file mode 100644 index 000000000..c9afe2ae9 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/ios-arm64_x86_64-simulator/JLBmpConvertKit.framework/_CodeSignature/CodeResources @@ -0,0 +1,192 @@ + + + + + files + + Headers/JLBmpConvert.h + + 5urDCSjpqHBbBhVbnkpZDUAqfUQ= + + Headers/JLBmpConvertKit.h + + rJo680NKOdjmobcOdHzU3oQ05lQ= + + Headers/JLBmpConvertOption.h + + bPMnU/cb1ZNEvx+6wLH+tNggsWM= + + Headers/JLGifBin.h + + +UKivjyP0JG0+mVZPKUAWwhParQ= + + Headers/JLImageConvertResult.h + + oTrRd0HS6yuPr1JxLpx1Qgr6sKw= + + Info.plist + + yF0Q5ofGeBGl7TtNvUrICUVzXe8= + + Modules/module.modulemap + + VG59AHi+XKWb6IYCdGbZKHPgBbA= + + + files2 + + Headers/JLBmpConvert.h + + hash + + 5urDCSjpqHBbBhVbnkpZDUAqfUQ= + + hash2 + + Ps103art4k9gGQecTWk7WrWV5o2nY38Acp7pydnv0oc= + + + Headers/JLBmpConvertKit.h + + hash + + rJo680NKOdjmobcOdHzU3oQ05lQ= + + hash2 + + 9kChXiw3D4JFaLjgBlaq+/2FazTsVCbA3kfmrYQ+9/A= + + + Headers/JLBmpConvertOption.h + + hash + + bPMnU/cb1ZNEvx+6wLH+tNggsWM= + + hash2 + + 4rgpTV2uvjOrNb0Bx7HOxoqBCtJjHaA7CcNBjIImXzY= + + + Headers/JLGifBin.h + + hash + + +UKivjyP0JG0+mVZPKUAWwhParQ= + + hash2 + + A8LhdAy5NiJx3J5nKUE53rzYmIKX6Cp9oTpGfJJk+tQ= + + + Headers/JLImageConvertResult.h + + hash + + oTrRd0HS6yuPr1JxLpx1Qgr6sKw= + + hash2 + + vacF3oh76vh4n8lafP3hAi/fYXjU4YoqA6CbjC05MYw= + + + Modules/module.modulemap + + hash + + VG59AHi+XKWb6IYCdGbZKHPgBbA= + + hash2 + + nU2jpsOghgGuDPwpIFZ+hGnZ5Xj24fG1pjw1H8vpwEs= + + + + rules + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^version.plist$ + + + rules2 + + .*\.dSYM($|/) + + weight + 11 + + ^(.*/)?\.DS_Store$ + + omit + + weight + 2000 + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^Info\.plist$ + + omit + + weight + 20 + + ^PkgInfo$ + + omit + + weight + 20 + + ^embedded\.provisionprofile$ + + weight + 20 + + ^version\.plist$ + + weight + 20 + + + + diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/macos-arm64_x86_64/JLBmpConvertKit.framework/Headers b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/macos-arm64_x86_64/JLBmpConvertKit.framework/Headers new file mode 120000 index 000000000..a177d2a6b --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/macos-arm64_x86_64/JLBmpConvertKit.framework/Headers @@ -0,0 +1 @@ +Versions/Current/Headers \ No newline at end of file diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/macos-arm64_x86_64/JLBmpConvertKit.framework/JLBmpConvertKit b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/macos-arm64_x86_64/JLBmpConvertKit.framework/JLBmpConvertKit new file mode 120000 index 000000000..3f7bc01c8 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/macos-arm64_x86_64/JLBmpConvertKit.framework/JLBmpConvertKit @@ -0,0 +1 @@ +Versions/Current/JLBmpConvertKit \ No newline at end of file diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/macos-arm64_x86_64/JLBmpConvertKit.framework/Modules b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/macos-arm64_x86_64/JLBmpConvertKit.framework/Modules new file mode 120000 index 000000000..5736f3186 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/macos-arm64_x86_64/JLBmpConvertKit.framework/Modules @@ -0,0 +1 @@ +Versions/Current/Modules \ No newline at end of file diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/macos-arm64_x86_64/JLBmpConvertKit.framework/Resources b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/macos-arm64_x86_64/JLBmpConvertKit.framework/Resources new file mode 120000 index 000000000..953ee36f3 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/macos-arm64_x86_64/JLBmpConvertKit.framework/Resources @@ -0,0 +1 @@ +Versions/Current/Resources \ No newline at end of file diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/macos-arm64_x86_64/JLBmpConvertKit.framework/Versions/A/Headers/JLBmpConvert.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/macos-arm64_x86_64/JLBmpConvertKit.framework/Versions/A/Headers/JLBmpConvert.h new file mode 100644 index 000000000..1d20bffaa --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/macos-arm64_x86_64/JLBmpConvertKit.framework/Versions/A/Headers/JLBmpConvert.h @@ -0,0 +1,95 @@ +// +// JLBmpCovert.h +// JLBmpCovertKit +// +// Created by EzioChan on 2024/9/9. +// Copyright © 2024 www.zh-jieli.com. All rights reserved. +// + +#import +#import +#if TARGET_OS_IOS || TARGET_OS_MACCATALYST +#import +#elif TARGET_OS_OSX +#import +#endif + + +NS_ASSUME_NONNULL_BEGIN +@class JLImageConvertResult; + +typedef void(^JLBmpCovertCallBack)(NSString *inFilePath,NSString *__nullable outFilePath,NSError *__nullable error) __deprecated_msg("This interface is deprecated. Please use convert:inFilePath:outFilePath: or convert:Image: instead."); + +typedef void(^JLBmpCovertCallBack2)(NSData *__nullable outFileData,NSError *__nullable error) __deprecated_msg("This interface is deprecated. Please use convert:inFilePath:outFilePath: or convert:Image: instead."); + + +/// 图像转换 +@interface JLBmpConvert : NSObject +#if TARGET_OS_IOS || TARGET_OS_MACCATALYST + +/// 图片转换 +/// - Parameters: +/// - type: 转换类型 +/// - inFilePath: 输入文件 +/// - outFilePath: 输出文件 +/// - completion: 回调 ++(void)covert:(JLBmpConvertType)type + inFilePath:(NSString *_Nonnull)inFilePath + outFilePath:(NSString * __nullable)outFilePath + completion:(JLBmpCovertCallBack _Nonnull)completion __deprecated_msg("This interface is deprecated. Please use convert:inFilePath:outFilePath: or convert:Image: instead."); + +/// 图片转换 +/// - Parameters: +/// - type: 转换类型 +/// - inImage: 输入图片 +/// - completion: 回调 ++(void)covert:(JLBmpConvertType)type + Image:(UIImage *)inImage + completion:(JLBmpCovertCallBack2 _Nonnull)completion __deprecated_msg("This interface is deprecated. Please use convert:inFilePath:outFilePath: or convert:Image: instead."); + +/// 图片转换 +/// - Parameters: +/// - option: 类型 +/// 当前仅仅 707N 系列芯片可指定图像格式 +/// - inFilePath: 输入文件 +/// - outFilePath: 输出文件 +/// 文件路径转换入口 ++ (JLImageConvertResult *)convert:(JLBmpConvertOption *)option + inFilePath:(NSString *)inFilePath + outFilePath:(NSString * __nullable)outFilePath; + +/// UIImage 转换 +/// 当前仅仅 707N 系列芯片可指定图像格式 +/// - Parameters: +/// - option: 类型 +/// - imgData: 图片的原始数据 ++(JLImageConvertResult *)convert:(JLBmpConvertOption *)option ImageData:(NSData *)imgData; + + +/// UIImage 转换成 BGRA +/// - Parameter image: 图片 ++(NSData*)convertImageToBGRABytes:(UIImage *)image; + +/// UIImage 转换成 RGBA +/// - Parameter image: 图片 ++(NSData*)convertImageToRGBABytes:(UIImage *)image; + + +/// 图片缩放 +/// - Parameters: +/// - image: 图片 +/// - newSize: 缩放大小 +/// - Returns: 缩放后的图片 ++(NSData *)resizeImage:(UIImage*)image andResizeTo:(CGSize)newSize; + +#elif TARGET_OS_OSX +/// 图片转换 +/// - Parameters: +/// - option: 转换类型 +/// - inImage: 输入图片 ++(JLImageConvertResult *)convert:(JLBmpConvertOption *)option Image:(NSImage *)image; + +#endif +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/macos-arm64_x86_64/JLBmpConvertKit.framework/Versions/A/Headers/JLBmpConvertKit.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/macos-arm64_x86_64/JLBmpConvertKit.framework/Versions/A/Headers/JLBmpConvertKit.h new file mode 100644 index 000000000..9ff73bf13 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/macos-arm64_x86_64/JLBmpConvertKit.framework/Versions/A/Headers/JLBmpConvertKit.h @@ -0,0 +1,24 @@ +// +// JLBmpConvertKit.h +// JLBmpConvertKit +// +// Created by EzioChan on 2024/9/9. +// Copyright © 2024 www.zh-jieli.com. All rights reserved. +// + +#import + +//! Project version number for JLBmpConvertKit. +FOUNDATION_EXPORT double JLBmpConvertKitVersionNumber; + +//! Project version string for JLBmpConvertKit. +FOUNDATION_EXPORT const unsigned char JLBmpConvertKitVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + + +#import +#import +#import +#import + diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/macos-arm64_x86_64/JLBmpConvertKit.framework/Versions/A/Headers/JLBmpConvertOption.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/macos-arm64_x86_64/JLBmpConvertKit.framework/Versions/A/Headers/JLBmpConvertOption.h new file mode 100644 index 000000000..41e05510c --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/macos-arm64_x86_64/JLBmpConvertKit.framework/Versions/A/Headers/JLBmpConvertOption.h @@ -0,0 +1,89 @@ +// +// JLBmpConvertOption.h +// JLBmpConvertKit +// +// Created by EzioChan on 2025/5/23. +// Copyright © 2025 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +/// 图像转换类型 +typedef NS_ENUM(NSUInteger, JLBmpConvertType) { + /// 695N 图像转换 RGB 转换成 695N 芯片对应的图像资源 + /// 对应原 BR23 转换算法 + JLBmpConvertType695N_RBG = 0, + /// 701N 图像转换 RGB 转换成 701N 芯片对应的图像资源 + /// 对应原 BR28 转换的算法 + JLBmpConvertType701N_RBG = 1, + /// 701N 图像转换 ARGB 转换成 701N 芯片对应的图像资源 + /// 对应原 BR28_ARBG 转换的算法 + JLBmpConvertType701N_ARBG = 2, + /// 701N 图像转换 RGB 转换成 701N 芯片对应的图像资源(不打包封装) + /// 对应原 BR28_RGB_NO_PACK 转换的算法(不打包封装) + JLBmpConvertType701N_RBG_NO_PACK = 3, + /// 701N 图像转换 ARGB 转换成 701N 芯片对应的图像资源(不打包封装) + /// 对应原 BR28_ARGB_NO_PACK 转换的算法(不打包封装) + JLBmpConvertType701N_ARGB_NO_PACK = 4, + /// 707N 图像转换 RGB 转换成 707N 芯片对应的图像资源 + /// 对应 BR35 转换的算法 + JLBmpConvertType707N_RBG = 5, + /// 707N 图像转换 ARGB 转换成 707N 芯片对应的图像资源 + /// 对应 BR35_ARGB 转换的算法 + JLBmpConvertType707N_ARGB = 6, + /// 707N 图像转换 RGB 转换成 707N 芯片对应的图像资源(不打包封装) + /// 对应 BR35_RGB_NO_PACK 转换的算法(不打包封装) + JLBmpConvertType707N_ARGB_NO_PACK = 7, + /// 707N 图像转换 RGB 转换成 707N 芯片对应的图像资源(不打包封装) + /// 对应 BR35_RGB_NO_PACK 转换的算法(不打包封装) + JLBmpConvertType707N_RBG_NO_PACK = 8, + /// 701N 图像转换 JPEG + /// 仅仅支持 JPEG 类型 + JLBmpConvertType701N_JPEG = 9 +}; + +/// 图像格式 +/// 仅(707N 系列芯片支持) +typedef NS_ENUM(NSUInteger, JLBmpPixelformat) { + /// ARBG8888/RBG888 格式 + JLBmpPixelformat_888, + /// ARBG8565/RBG565 格式 + JLBmpPixelformat_565, + /// 自动选择最小的格式 + JLBmpPixelformat_Auto, +}; + +/// LVGL 打包格式 +typedef NS_ENUM(NSUInteger, JLBmpPacketFormat) { + JLBmpPacketFormatNone = 0, + JLBmpPacketFormatJLUI = 1, + JLBmpPacketFormatLVGL = 2 +}; + +/// 图像转换选项 +@interface JLBmpConvertOption : NSObject + +/// 图像转换类型 +@property (nonatomic, assign) JLBmpConvertType convertType; + +/// 图像格式 +/// 默认为 auto +/// 仅(707N 系列芯片支持) +@property (nonatomic, assign) JLBmpPixelformat pixelformat; + +/// LVGL 打包格式 +/// 默认为 JLUI +/// 仅(707N 系列芯片支持) +@property (nonatomic, assign) JLBmpPacketFormat packetFormat; + +/// 是否转换成 BGRA +/// 当使用的是 JL 的 UI 框架时需要使用 +/// 使用其他第三方框架时,需要根据固件端框架进行调整 +/// default YES +@property (nonatomic, assign) BOOL convertToBGRA; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/macos-arm64_x86_64/JLBmpConvertKit.framework/Versions/A/Headers/JLGifBin.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/macos-arm64_x86_64/JLBmpConvertKit.framework/Versions/A/Headers/JLGifBin.h new file mode 100644 index 000000000..5b7cdc2d7 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/macos-arm64_x86_64/JLBmpConvertKit.framework/Versions/A/Headers/JLGifBin.h @@ -0,0 +1,77 @@ +// +// JLGifBin.h +// JLGifLib +// +// Created by EzioChan on 2024/1/18. +// Copyright © 2024 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +/// Gif 转 Bin 支持的芯片类型 +typedef NS_ENUM(NSUInteger, JLGIFBinChipType) { + /// 701N + JLGIFBinChipJL_701N, + /// 707N + JLGIFBinChipJL_707N, +}; + +///packet 是否打包 +typedef NS_ENUM(NSInteger, JLGIFBinPackageType) { + /// 不做其他打包使用源数据,适用 LVGL 的公版UI框架 + JLGIFBinPackageTypeLVGL = 0, + /// 杰理打包格式,适用 JLVGL 的杰理定制版 UI 框架 + JLGIFBinPackageTypeJLVGL = 1, +}; + +typedef void(^JLGif2BinBlock)(int code,NSData *_Nullable binData); + +/// Gif 转 Bin +@interface JLGifBin : NSObject + +/// 打印当前SDK的版本 ++(void)sdkVersion; + +/// 根据 Gif 创建 Bin +/// - Parameters: +/// - gifData: Gif 图片数据 +/// - level: 等级 +/// 1: 低码率 +/// 2: 中码率 +/// 3: 高码率 +/// - block: 回调内容 ++(void)makeDataToBin:(NSData *)gifData Level:(int)level Result:(JLGif2BinBlock)block __attribute__((deprecated("Use makeDataToBin:Level:ChipType:Result: instead."))); + + +/// 根据 Gif 创建 Bin +/// - Parameters: +/// - gifData: Gif 图片数据 +/// - level: 等级 +/// 1: 低码率 +/// 2: 中码率 (仅 JLGIFBinChipJL_701N 支持) +/// 3: 高码率 (仅 JLGIFBinChipJL_701N 支持) +/// - chip: 芯片类型 +/// - block: 回调内容 ++(void)makeDataToBin:(NSData *)gifData Level:(int)level ChipType:(JLGIFBinChipType)chip Result:(JLGif2BinBlock)block __attribute__((deprecated("Use makeDataToBin:Level:ChipType:PackageType:Result: instead."))); + + +/// 根据 Gif 创建 Bin +/// - Parameters: +/// - gifData: Gif 图片数据 +/// - level: 等级 +/// 1: 低码率 +/// 2: 中码率 (仅 JLGIFBinChipJL_701N 支持) +/// 3: 高码率 (仅 JLGIFBinChipJL_701N 支持) +/// - chip: 芯片类型 +/// - packageType: 打包类型 +/// 1: JLUI 杰理 UI 格式 +/// 0: 无 不打包 +/// - block: 回调内容 ++(void)makeDataToBin:(NSData *)gifData Level:(int)level ChipType:(JLGIFBinChipType)chip PackageType:(JLGIFBinPackageType)packageType Result:(JLGif2BinBlock)block; + + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/macos-arm64_x86_64/JLBmpConvertKit.framework/Versions/A/Headers/JLImageConvertResult.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/macos-arm64_x86_64/JLBmpConvertKit.framework/Versions/A/Headers/JLImageConvertResult.h new file mode 100644 index 000000000..0180e5784 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/macos-arm64_x86_64/JLBmpConvertKit.framework/Versions/A/Headers/JLImageConvertResult.h @@ -0,0 +1,34 @@ +// +// JLImageConvertResult.h +// JLBmpConvertKit +// +// Created by EzioChan on 2025/3/6. +// Copyright © 2025 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +/// 图像转换结果 +@interface JLImageConvertResult : NSObject +/// 结果码 +@property (nonatomic, assign) int result; +/// 数据大小 +@property (nonatomic, assign) int buf_size; +/// 图像格式 +@property (nonatomic, assign) int pixel_format; +/// 压缩模式 +@property (nonatomic, assign) int compress_mode; + +#if TARGET_OS_IOS || TARGET_OS_MACCATALYST +/// 输出文件路径 +@property (nullable, nonatomic, copy) NSString *outFilePath; +#endif + +/// 输出文件内容 +@property (nullable, nonatomic, copy) NSData *outFileData; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/macos-arm64_x86_64/JLBmpConvertKit.framework/Versions/A/JLBmpConvertKit b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/macos-arm64_x86_64/JLBmpConvertKit.framework/Versions/A/JLBmpConvertKit new file mode 100755 index 000000000..700cfacc9 Binary files /dev/null and b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/macos-arm64_x86_64/JLBmpConvertKit.framework/Versions/A/JLBmpConvertKit differ diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/macos-arm64_x86_64/JLBmpConvertKit.framework/Versions/A/Modules/module.modulemap b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/macos-arm64_x86_64/JLBmpConvertKit.framework/Versions/A/Modules/module.modulemap new file mode 100644 index 000000000..b3d18e590 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/macos-arm64_x86_64/JLBmpConvertKit.framework/Versions/A/Modules/module.modulemap @@ -0,0 +1,6 @@ +framework module JLBmpConvertKit { + umbrella header "JLBmpConvertKit.h" + export * + + module * { export * } +} diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/macos-arm64_x86_64/JLBmpConvertKit.framework/Versions/A/Resources/Info.plist b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/macos-arm64_x86_64/JLBmpConvertKit.framework/Versions/A/Resources/Info.plist new file mode 100644 index 000000000..038498a78 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/macos-arm64_x86_64/JLBmpConvertKit.framework/Versions/A/Resources/Info.plist @@ -0,0 +1,48 @@ + + + + + BuildMachineOSBuild + 25B78 + CFBundleDevelopmentRegion + en + CFBundleExecutable + JLBmpConvertKit + CFBundleIdentifier + com.zh-jieli.JLBmpConvertKit + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + JLBmpConvertKit + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.5.0 + CFBundleSupportedPlatforms + + MacOSX + + CFBundleVersion + 1 + DTCompiler + com.apple.compilers.llvm.clang.1_0 + DTPlatformBuild + 25C57 + DTPlatformName + macosx + DTPlatformVersion + 26.2 + DTSDKBuild + 25C57 + DTSDKName + macosx26.2 + DTXcode + 2620 + DTXcodeBuild + 17C52 + LSMinimumSystemVersion + 10.13 + NSHumanReadableCopyright + Copyright © 2024 www.zh-jieli.com. All rights reserved. + + diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/macos-arm64_x86_64/JLBmpConvertKit.framework/Versions/Current b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/macos-arm64_x86_64/JLBmpConvertKit.framework/Versions/Current new file mode 120000 index 000000000..8c7e5a667 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLBmpConvertKit.xcframework/macos-arm64_x86_64/JLBmpConvertKit.framework/Versions/Current @@ -0,0 +1 @@ +A \ No newline at end of file diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/Info.plist b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/Info.plist new file mode 100644 index 000000000..18c1d0ce0 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/Info.plist @@ -0,0 +1,44 @@ + + + + + AvailableLibraries + + + BinaryPath + JLDialUnit.framework/JLDialUnit + LibraryIdentifier + ios-arm64 + LibraryPath + JLDialUnit.framework + SupportedArchitectures + + arm64 + + SupportedPlatform + ios + + + BinaryPath + JLDialUnit.framework/JLDialUnit + LibraryIdentifier + ios-arm64_x86_64-simulator + LibraryPath + JLDialUnit.framework + SupportedArchitectures + + arm64 + x86_64 + + SupportedPlatform + ios + SupportedPlatformVariant + simulator + + + CFBundlePackageType + XFWK + XCFrameworkFormatVersion + 1.0 + + diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64/JLDialUnit.framework/Headers/DialManager.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64/JLDialUnit.framework/Headers/DialManager.h new file mode 100644 index 000000000..869a29e09 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64/JLDialUnit.framework/Headers/DialManager.h @@ -0,0 +1,127 @@ +// +// DialManager.h +// JLDialUnit +// +// Created by 杰理科技 on 2021/7/20. +// + +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN + + + +typedef NS_ENUM(NSInteger, DialOperateType) { + DialOperateTypeNoSpace = 0, //空间不足 + DialOperateTypeDoing = 1, //正在操作 + DialOperateTypeFail = 2, //操作失败 + DialOperateTypeSuccess = 3, //操作成功 + DialOperateTypeUnnecessary = 4, //无需重复打开文件系统 + DialOperateTypeResetFial = 5, //重置文件系统失败 + DialOperateTypeNormal = 6, //文件系统正常 + DialOperateTypeCmdFail = 7, //流程命令执行失败 +}; +typedef NS_ENUM(NSInteger, DialUpdateResult) { + DialUpdateResultFinished = 0, //更新资源完成 + DialUpdateResultNewest = 1, //资源已最新 + DialUpdateResultInvalid = 2, //资源无效 + DialUpdateResultEmpty = 3, //资源为空 + DialUpdateResultReplace = 4, //资源替换 + DialUpdateResultAdd = 5, //资源新增 + DialUpdateResultNoSpace = 6, //空间不足 + DialUpdateResultZipError = 7, //ZIP资源文件错误 + DialUpdateResultCompareFail = 8, //表盘资源对比失败 + DialUpdateResultUpdateUfw = 9, //更新固件 ufw +}; +typedef void(^DialOperateBK)(DialOperateType type, float progress); +typedef void(^DialListBK)(DialOperateType type, NSArray* __nullable array); +typedef void(^DialUpdateBK)(DialUpdateResult updateResult, + NSArray* __nullable array, + NSString * _Nullable filePath, + NSInteger index ,float progress); + +typedef void(^FatfsFreeBlock)(uint32_t freeSize); + +/// 表盘管理类 +@interface DialManager : NSObject + +#pragma mark - 连接成功后,必须调用一次! ++(void)openDialFileSystemWithCmdManager:(JL_ManagerM *)manager withResult:(DialOperateBK)result; + +#pragma mark - 重置表盘系统 ++(void)resetDialFileSystemWithCmdManager:(JL_ManagerM *)manager withResult:(DialOperateBK)result; + +#pragma mark - 查询文件 +/// 查询文件 +/// @param result 操作回调 ++(void)listFile:(DialListBK __nullable)result; + +#pragma mark - 添加文件 +/// 添加文件 +/// @param file 文件名需要加斜杠,类似@“/WACTH1”。 +/// @param content 文件数据 +/// @param result 操作回调 ++(void)addFile:(NSString*)file + Content:(NSData*)content + Result:(DialOperateBK)result; + +#pragma mark - 删除文件 +/// 删除文件(第一种) +/// @param file 文件名需要加斜杠,类似@“/WACTH1”。 +/// @param result 操作回调 ++(void)deleteFile:(NSString*)file + Result:(DialOperateBK)result; + +/// 删除文件(第二种) +/// @param fileModel JLModel_File类型 +/// @param result 操作回调 ++(void)deleteDialResourceWithFileModel:(JLModel_File*)fileModel Result:(DialOperateBK)result; + +#pragma mark - 替换文件 +/// 替换文件 +/// @param file 文件名需要加斜杠,类似@“/WACTH1”。 +/// @param content 文件数据 +/// @param result 操作回调 ++(void)repaceFile:(NSString*)file + Content:(NSData*)content + Result:(DialOperateBK)result; + +#pragma mark - 格式化外部Flash +/// 格式化外部Flash操作 +/// @param handle 设备句柄 +/// @param result 操作回调 ++(void)formatFlash:(NSString*)handle Result:(DialOperateBK)result; + +#pragma mark - 更新设备的表盘资源(异步调用) +/// 更新设备的表盘资源(异步调用) +/// @param path 资源文件 +/// @param array 表盘列表(当前) +/// @param result 更新结果 ++(void)updateResourcePath:(NSString*)path + List:(NSArray*)array + Result:(DialUpdateBK)result; + +/// 获取 fatfs 系统的剩余空间(仅仅fatfs 系统可用) +/// 需要异步执行 ++(uint32_t)getFatfsFree; + +/// 获取 fatfs 系统的剩余空间(仅仅fatfs 系统可用) +/// @param block 回调空间 ++(void)getFatfsFree:(FatfsFreeBlock) block; + +/// 获取某文件的文件大小 +/// @param fileName 文件名 ++(uint32_t)getSizeOfFileName:(NSString*)fileName; + + +/// 记录文件大小(私有接口) +/// @param size 文件大小 +/// @param fileName 文件名 ++(void)setFileSize:(uint32_t)size FileName:(NSString*)fileName; + + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64/JLDialUnit.framework/Headers/FatfsObject.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64/JLDialUnit.framework/Headers/FatfsObject.h new file mode 100644 index 000000000..c6fe7e0d1 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64/JLDialUnit.framework/Headers/FatfsObject.h @@ -0,0 +1,92 @@ +// +// FatfsObject.h +// JLDialUnit +// +// Created by 杰理科技 on 2021/7/20. +// + +#import +#import + + + +NS_ASSUME_NONNULL_BEGIN + +@interface FatfsObject : NSObject + +#pragma mark ---> FATFS API +/// 输入命令中心类,在JL_Entity内。 +/// @param manager 命令中心类 ++(void)makeCmdManager:(JL_ManagerM*)manager; + +/// 返回 当前 JL_ManagerM ++(JL_ManagerM*)outputCmdManager; + +/// 设置外挂Flash的大小,FATFS的大小。 +/// @param flashSize Flash大小 +/// @param fatsSize FATFS的大小 ++(BOOL)makeFlashSize:(uint32_t)flashSize + FatsSize:(uint32_t)fatsSize; + +/// 获取Flash上的文件 +/// @param path 文件名数组,其中"JL",“FONT”不能操作。 ++(NSArray*)makeListPath:(NSString*)path; + +typedef void(^FatfsCreateFile_BK)(float progress); +/// 新增文件 +/// @param path “/文件名” +/// @param data 文件数据内容 +/// @param result 进度 ++(BOOL)makeCreateFile:(NSString*)path + Content:(NSData* __nullable)data + Result:(FatfsCreateFile_BK __nullable)result; + +typedef void(^FatfsReplaceFile_BK)(float progress); +/// 替换文件 +/// @param path “/文件名” +/// @param data 文件数据内容 ++(BOOL)makeReplaceFile:(NSString*)path + Content:(NSData* __nullable)data + Result:(FatfsReplaceFile_BK __nullable)result; + +/// 删除文件 +/// @param path “/文件名” ++(BOOL)makeRemoveFile:(NSString*)path; + +/*--------------------------------------------------------------------------------- + FatSize -- FAT文件系统认为自己的大小 + 因为小机的FAT项按4K对齐了大小,所以实际上会认为FAT系统占用的空间比FLASH实际大小还要大 + 用 f_getfree 获取的是 FAT文件系统认为自己剩余的空间的簇个数,其中有一部分是在Flash上实际不存在的 + 所以需要减掉这部分 + 计算方式如下: + FatUsed = FatSize - FreeSize + FlashRemainSize = FlashSize - FatUsed + ----------------------------------------------------------------------------------*/ +/// 获取FATFS系统剩余空间,“FreeSize”。 ++(uint32_t)makeGetFree; + +/// 查看watch本间版本 +/// @param path 文件路径 ++(NSString*)makeVersionWatch:(NSString*)path; + +/// 获取文件前面512个字节 +/// @param path 文件路径 ++(NSData *)makeFileHead:(NSString*)path; + +/// 读文件 +/// @param path 文件路径 ++(NSData*)makeFileContent:(NSString*)path; + +/// 解压资源文件 +/// @param path 文件路径 +/// @param aimDirection 存放的路径 ++(NSArray*)unzipFileAtPath:(NSString *)path toDestination:(NSString *)aimDirection; + +/// 重置外部flash ++(BOOL)makeResetFlash; + + +@end + +NS_ASSUME_NONNULL_END + diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64/JLDialUnit.framework/Headers/JLDialSourceModel.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64/JLDialUnit.framework/Headers/JLDialSourceModel.h new file mode 100644 index 000000000..e32e99dad --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64/JLDialUnit.framework/Headers/JLDialSourceModel.h @@ -0,0 +1,27 @@ +// +// JLDialSourceModel.h +// JLDialUnit +// +// Created by EzioChan on 2025/3/19. +// Copyright © 2025 www.zh-jieli.com. All rights reserved. +// + +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface JLDialSourceModel : JLModel_File + +/// 文件大小 +@property (nonatomic, assign)int size; + +/// CRC +@property (nonatomic, assign)uint16_t crc; + ++(JLDialSourceModel *)createModel:(JLModel_File *)model; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64/JLDialUnit.framework/Headers/JLDialUnit.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64/JLDialUnit.framework/Headers/JLDialUnit.h new file mode 100644 index 000000000..07e55445b --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64/JLDialUnit.framework/Headers/JLDialUnit.h @@ -0,0 +1,30 @@ +// +// JLDialUnit.h +// JLDialUnit +// +// Created by EzioChan on 2023/2/28. +// Copyright © 2023 www.zh-jieli.com. All rights reserved. +// + +#import + +//! Project version number for JLDialUnit. +FOUNDATION_EXPORT double JLDialUnitVersionNumber; + +//! Project version string for JLDialUnit. +FOUNDATION_EXPORT const unsigned char JLDialUnitVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import + + diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64/JLDialUnit.framework/Headers/JLDialUnitMgr.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64/JLDialUnit.framework/Headers/JLDialUnitMgr.h new file mode 100644 index 000000000..88ce0d6f0 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64/JLDialUnit.framework/Headers/JLDialUnitMgr.h @@ -0,0 +1,115 @@ +// +// JLDialUnitMgr.h +// JLDialUnit +// +// Created by EzioChan on 2025/3/18. +// Copyright © 2025 www.zh-jieli.com. All rights reserved. +// + +#import +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN +@class JLDialSourceModel; +@interface JLDialUnitMgr : NSObject + +/// 设备文件列表 +@property (nonatomic,strong)NSMutableArray *fileArray; + +/// 当前 Flash 操控句柄 +@property (nonatomic, strong) JLFlashOpMgr *currentFlaghOpMgr; + +/// 当前使用的表盘文件 +@property (nonatomic,strong)JLDialSourceModel *currentFileSource; + +/// 当前使用的表盘背景 +@property (nonatomic,strong)JLDialSourceModel *_Nullable currentBackground; + +/// 初始化 +/// - Parameters: +/// - mgr: 蓝牙管理对象 +/// - completion: 回调 +-(instancetype)initWithManager:(JL_ManagerM*)mgr completion:(void (^)(NSError * _Nullable))completion; + +/// 获取文件列表 +/// - Parameters: +/// - cardType: 设备存储的类型 +/// - count: 请求的数目 +/// - completion: 回调 +/// 返回时,是返回累计数目 +-(void)getFileList:(JL_CardType)cardType count:(NSInteger)count completion:(void (^)(NSArray * _Nullable,NSError * _Nullable))completion; + +/// 清空文件列表 +/// - Parameter cardType: 设备存储的类型 +-(void)cleanFileList; + +/// 更新文件列表信息 +/// - Parameters: +/// - fileSources: NSArray +/// - completion: 回调 +-(void)updateFileSources:(NSArray *)fileSources completion:(void (^)(NSArray * _Nullable,NSError * _Nullable))completion; + +/// 更新文件到设备 +/// - Parameters: +/// - fileHandleType: 设备目标存储句柄 +/// - fileData: 文件数据 +/// - filePath: 文件存储路径 +/// - resultCompletion: 回调 +/// state: 0:成功 1:传输中 -1:失败 +/// progress: 传输进度 +/// error: 错误 +-(void)updateFileToDevice:(JL_FileHandleType)fileHandleType Data:(NSData *)fileData FilePath:(NSString *)filePath completion:(void (^)(int,double,NSError * _Nullable))resultCompletion; + +/// 删除文件 +/// - Parameters: +/// - filePath: 文件路径 +/// - resultCompletion: 回调 +-(void)deleteFile:(NSString *)filePath getFileList:(BOOL)isGet Completion:(void (^)(BOOL state, NSError * _Nullable error))resultCompletion; + +/// 删除多个文件 +/// - Parameters: +/// - filePathList: 文件路径 +/// - resultCompletion: 回调 +-(void)deleteFiles:(NSArray *) filePathList Completion:(void (^)(BOOL state, NSError * _Nullable error))resultCompletion; + +/// 获取剩余空间 +/// - Parameter completion: 回调 +-(void)getRemainingSpace:(void(^)(int freeSize, NSError * _Nullable error))completion; + +/// 获取剩余空间 V1 +/// - Parameter completion: 回调 +-(void)getFlashRemainingSpace:(void(^)(int freeSize, NSError * _Nullable error))completion; + +//MARK: 表盘操作 + +/// 获取当前正在使用的表盘 +/// - Parameter completion: 回调 +-(void)dialGetCurrent:(void (^)(JLDialSourceModel * _Nullable))completion; + +/// 设置当前表盘 +/// - Parameters: +/// - model: 表盘 +/// - resultCompletion: 回调 +-(void)dialSetCurrent:(JLDialSourceModel *)model Completion:(void (^)(BOOL state, NSError * _Nullable error))resultCompletion; + +/// 激活自定义表盘背景 +/// - Parameters: +/// - model: 表盘背景对象 +/// - resultCompletion: 回调 +-(void)dialActiveCustomBackground:(JLDialSourceModel *)model Completion:(void (^)(BOOL state, NSError * _Nullable error))resultCompletion; + +/// 重置自定义表盘背景 +/// - Parameter resultCompletion: 回调 +-(void)dialResetCustomBackground:(void (^)(BOOL state, NSError * _Nullable error))resultCompletion; + +/// 获取表盘背景 +/// - Parameters: +/// - path: 路径 诸如“/WATCH” +/// - resultCompletion: 回调 +-(void)dialGetDial:(NSString *)path BackgroundInfo:(void (^)(JLDialSourceModel * _Nullable model, NSError * _Nullable error))resultCompletion; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64/JLDialUnit.framework/Headers/JLSourceUpdate.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64/JLDialUnit.framework/Headers/JLSourceUpdate.h new file mode 100644 index 000000000..4c52a6d64 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64/JLDialUnit.framework/Headers/JLSourceUpdate.h @@ -0,0 +1,94 @@ +// +// JLSourceUpdate.h +// JLDialUnit +// +// Created by EzioChan on 2025/3/18. +// Copyright © 2025 www.zh-jieli.com. All rights reserved. +// + +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN +@class JLDialUnitMgr; + +typedef NS_ENUM(NSInteger, JLSourceUpdateType) { + /// 更新资源完成 + JLSourceUpdateTypeFinished = 0, + /// 资源已最新 + JLSourceUpdateTypeNewest = 1, + /// 资源无效 + JLSourceUpdateTypeInvalid = 2, + /// 资源为空 + JLSourceUpdateTypeEmpty = 3, + /// 资源更新错误 + JLSourceUpdateTypeSrcError = 4, + /// 资源更新中 + JLSourceUpdateTypeUpdateing = 5, + /// 空间不足 + JLSourceUpdateTypeNoSpace = 6, + /// ZIP 资源文件错误 + JLSourceUpdateTypeZipError = 7, + /// 表盘资源对比失败 + JLSourceUpdateTypeCompareFail = 8, + /// 更新固件 ufw + JLSourceUpdateTypeUpdateUfw = 9, + /// 不支持 + JLSourceUpdateTypeUpdateNotSupport = 10, +}; + + +@interface JLSourceInfo : NSObject + +@property(nonatomic,strong)NSString *filePath; +@property(nonatomic,strong,readonly)NSData * _Nullable fileData; +@property(nonatomic,strong,readonly)NSString *fileName; +@property(nonatomic,assign)NSInteger index; + +@end + +@protocol JLSourceUpdateDelegate + +- (void)updateProgress:(double)progress type:(JLSourceUpdateType)type source:(JLSourceInfo *_Nullable)source error:(NSError* _Nullable)error; + +- (void)updateUfwFirst:(NSString *)filePath ThenUpdateSrc:(NSArray *) filePaths; + +@end + +/// 资源更新 +@interface JLSourceUpdate : NSObject + +@property(nonatomic,weak)id delegate; + +/// 初始化 +/// - Parameters: +/// - mgr: 蓝牙管理对象 +/// - fileType: 文件句柄 +/// - dialMgr: JLDialUnitMgr +/// - delegate: 代理 +-(instancetype)initWithManager:(JL_ManagerM*)mgr HandleType:(JL_FileHandleType) fileType DialMgr:(JLDialUnitMgr *)dialMgr delegate:(id)delegate; + + +/// 更新资源 +/// - Parameters: +/// - path: zip包路径 +/// - mgr: JLDialUnitMgr +-(void)updateSources:(NSString*)path DialUnitMgr:(JLDialUnitMgr *)mgr; + + +/// 更新资源 AC707N 手表特殊升级流程 +/// - Parameters: +/// - path: zip 包路径 +/// - mgr: JLDialUnitMgr +-(void)updateSourcesV2:(NSString*)path DialUnitMgr:(JLDialUnitMgr *)mgr; + + +/// 更新资源任务 +/// @param targetUpdateList 需要更新的文件列表 +/// @param updateResult 更新结果 +-(void)updateAciton:(NSArray *)targetUpdateList Result:(void (^)(BOOL isFinish, NSError * _Nullable))updateResult; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64/JLDialUnit.framework/Headers/ZZArchive.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64/JLDialUnit.framework/Headers/ZZArchive.h new file mode 100644 index 000000000..a37e0a7e7 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64/JLDialUnit.framework/Headers/ZZArchive.h @@ -0,0 +1,131 @@ +// +// ZZArchive.h +// ZipZap +// +// Created by Glen Low on 25/09/12. +// Copyright (c) 2012, Pixelglow Software. All rights reserved. +// + +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// * Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS +// BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, +// OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF +// THE POSSIBILITY OF SUCH DAMAGE. +// + +#import +#import "ZZConstants.h" + +@class ZZArchiveEntry; + +NS_ASSUME_NONNULL_BEGIN + +/** + * The ZZArchive class represents a zip file for reading only. + */ +@interface ZZArchive : NSObject + +/** + * The URL representing this archive. + */ +@property (readonly, nullable, nonatomic) NSURL* URL; + +/** + * The uninterpreted contents of this archive. + */ +@property (readonly, nonatomic) NSData* contents; + +/** + * The array of ZZArchiveEntry entries within this archive. + */ +@property (readonly, nonatomic) NSArray* entries; + +/** + * Creates a new archive with the zip file at the given file URL. + * + * The archive will use UTF-8 encoding for reading entry file names and comments, and will not create the file if it is missing. + * + * @param URL The file URL of the zip file. + * @param error The error information when an error occurs. Pass in nil if you do not want error information. + * @return The initialized archive. Returns nil if the archive cannot be initialized. + */ ++ (nullable instancetype)archiveWithURL:(NSURL*)URL + error:(out NSError**)error; + +/** + * Creates a new archive with the raw zip file data given. + * + * The archive will use UTF-8 encoding for reading entry file names and comments, and will not create the data if it is missing. + * + * @param data The raw data of the zip file. + * @param error The error information when an error occurs. Pass in nil if you do not want error information. + * @return The initialized archive. Returns nil if the archive cannot be initialized. + */ ++ (nullable instancetype)archiveWithData:(NSData*)data + error:(out NSError**)error; + +/** + * This initializer should never be used. + */ +- (instancetype)init NS_UNAVAILABLE; + +/** + * Initializes a new archive with the zip file at the given file URL. + * + * @param URL The file URL of the zip file. + * @param options The options to consider when opening the zip file. + * @param error The error information when an error occurs. Pass in nil if you do not want error information. + * @return The initialized archive. Returns nil if the archive cannot be initialized. + */ +- (nullable instancetype)initWithURL:(NSURL*)URL + options:(nullable NSDictionary*)options + error:(out NSError**)error; + +/** + * Initializes a new archive with the raw zip file data given. + * + * @param data The raw data of the zip file + * @param options The options to consider when opening the zip file. + * @param error The error information when an error occurs. Pass in nil if you do not want error information. + * @return The initialized archive. Returns nil if the archive cannot be initialized. + */ +- (nullable instancetype)initWithData:(NSData*)data + options:(nullable NSDictionary*)options + error:(out NSError**)error; + +/** + * Updates the entries and writes them to the source. + * + * If the write fails and the entries are completely new, the existing zip file will be untouched. + * + * If the write fails and the entries contain some or all existing entries, the zip file may be corrupted. + * In this case, the error information will report the ZZReplaceWriteErrorCode error code. + * + * @param newEntries The entries to update to, may contain some or all existing entries. + * @param error The error information when an error occurs. Pass in nil if you do not want error information. + * @return Whether the update was successful or not. + * + */ +- (BOOL)updateEntries:(NSArray*)newEntries + error:(out NSError**)error; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64/JLDialUnit.framework/Headers/ZZArchiveEntry.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64/JLDialUnit.framework/Headers/ZZArchiveEntry.h new file mode 100644 index 000000000..2fa9b0836 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64/JLDialUnit.framework/Headers/ZZArchiveEntry.h @@ -0,0 +1,239 @@ +// +// ZZArchiveEntry.h +// ZipZap +// +// Created by Glen Low on 25/09/12. +// Copyright (c) 2012, Pixelglow Software. All rights reserved. +// + +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// * Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS +// BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, +// OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF +// THE POSSIBILITY OF SUCH DAMAGE. +// + +#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) +#include +#elif defined(__MAC_OS_X_VERSION_MIN_REQUIRED) +#include +#endif + +#import + +@protocol ZZArchiveEntryWriter; + +NS_ASSUME_NONNULL_BEGIN + +/** + * The ZZArchiveEntry class represents an entry in the ZZArchive instance. + */ +@interface ZZArchiveEntry : NSObject + +/** + * Whether the entry is compressed. + */ +@property (readonly, nonatomic) BOOL compressed; + +/** + * Whether the entry is encrypted. + */ +@property (readonly, nonatomic) BOOL encrypted; + +/** + * The last modified date and time of the entry. The time value is only accurate to 2 seconds. + */ +@property (readonly, nonatomic) NSDate* lastModified; + +/** + * The CRC32 code of the entry file: 0 for new entries. + */ +@property (readonly, nonatomic) NSUInteger crc32; + +/** + * The compressed size of the entry file: 0 for new entries. + */ +@property (readonly, nonatomic) NSUInteger compressedSize; + +/** + * The uncompressed size of the entry file: 0 for new entries. + */ +@property (readonly, nonatomic) NSUInteger uncompressedSize; + +/** + * The UNIX file mode for the entry: 0 for new or non-UNIX entries. This includes the file type bits. + */ +@property (readonly, nonatomic) mode_t fileMode; + +/** + * The file name of the entry. Encoding is either CP-437 or UTF-8, depending on the EFS flag of the general purpose bit flags. + */ +@property (readonly, nonatomic) NSString* fileName; + +/** + * The file name of the entry as array of bytes + */ +@property (readonly, nonatomic) NSData* rawFileName; + +/** + * The encoding of filename and comment fields, according to the EFS flag of the general purpose bit flags. + */ +@property (readonly, nonatomic) NSStringEncoding encoding; + +/** + * Creates a new file entry from a streaming callback. + * + * @param fileName The file name for the entry. + * @param compress Whether to compress the entry. + * @param streamBlock The callback to write the entry's data to the stream. Returns whether the write should be considered successful. + * @return The created entry. + */ ++ (instancetype)archiveEntryWithFileName:(NSString*)fileName + compress:(BOOL)compress + streamBlock:(BOOL(^)(NSOutputStream* stream, NSError** error))streamBlock; + +/** + * Creates a new file entry from a data callback. + * + * @param fileName The file name for the entry. + * @param compress Whether to compress the entry. + * @param dataBlock The callback to return the entry's data. Returns nil if the write should be considered unsuccessful. + * @return The created entry. + */ ++ (instancetype)archiveEntryWithFileName:(NSString*)fileName + compress:(BOOL)compress + dataBlock:(NSData* _Nullable(^)(NSError** error))dataBlock; + +/** + * Creates a new file entry from a data-consuming callback. + * + * @param fileName The file name for the entry. + * @param compress Whether to compress the entry. + * @param dataConsumerBlock The callback to put the entry's data into the data consumer. Returns whether the write should be considered successful. + * @return The created entry. + */ ++ (instancetype)archiveEntryWithFileName:(NSString*)fileName + compress:(BOOL)compress + dataConsumerBlock:(BOOL(^)(CGDataConsumerRef dataConsumer, NSError** error))dataConsumerBlock; + +/** + * Creates a new directory entry. + * + * @param directoryName The directory name for the entry. + * @return The created entry. + */ ++ (instancetype)archiveEntryWithDirectoryName:(NSString*)directoryName; + +/** + * Creates a new entry. + * + * The archive entry will choose the first non-nil dataBlock, streamBlock or dataConsumerBlock to supply its data. + * + * @param fileName The file name for the entry. + * @param fileMode The UNIX file mode for the entry. This includes the file type bits. + * @param lastModified The last modified date and time for the entry. The time value is only accurate to 2 seconds. + * @param compressionLevel The compression level for the entry: 0 for stored, -1 for default deflate, 1 - 9 for custom deflate levels. + * @param dataBlock The callback that returns the entry file data. Returns nil if the write should be considered unsuccessful. + * @param streamBlock The callback that writes the entry file to the stream. Returns whether the write should be considered successful. + * @param dataConsumerBlock The callback that writes the entry file to the data consumer. Returns whether the write should be considered successful. + * @return The created entry. + */ ++ (instancetype)archiveEntryWithFileName:(NSString*)fileName + fileMode:(mode_t)fileMode + lastModified:(NSDate*)lastModified + compressionLevel:(NSInteger)compressionLevel + dataBlock:(nullable NSData* _Nullable(^)(NSError** error))dataBlock + streamBlock:(nullable BOOL(^)(NSOutputStream* stream, NSError** error))streamBlock + dataConsumerBlock:(nullable BOOL(^)(CGDataConsumerRef dataConsumer, NSError** error))dataConsumerBlock; + +/** + * Checks whether the entry file is consistent. + * + * Checks whether the local file entry is consistent with the central file entry and also that + * the recorded and actual checksums of the data agree. + * + * @param error The error information when an error occurs. Pass in nil if you do not want error information. + * @return Whether entry file is consistent or not. + */ +- (BOOL)check:(out NSError**)error; + +/** + * The file name of the entry with the given encoding. + * + * @param encoding The encoding for the filename. + */ +- (NSString*)fileNameWithEncoding:(NSStringEncoding)encoding; + +/** + * Creates a stream to represent the entry file. + * + * @param error A pointer to a variable that will contain the error if any. + * @return The new stream: nil for new entries. + */ +- (nullable NSInputStream*)newStreamWithError:(NSError**)error; + +/** + * Creates a stream to represent the entry file. + * + * @param password The password to be used for decryption. + * @param error A pointer to a variable that will contain the error if any. + * @return The new stream: nil for new entries. + */ +- (nullable NSInputStream*)newStreamWithPassword:(nullable NSString*)password error:(NSError**)error; + +/** + * Creates data to represent the entry file. + * + * @param error A pointer to a variable that will contain the error if any. + * @return The new data: nil for new entries. + */ +- (nullable NSData*)newDataWithError:(NSError**)error; + +/** + * Creates data to represent the entry file. + * + * @param password The password to be used for decryption. + * @param error A pointer to a variable that will contain the error if any. + * @return The new data: nil for new entries. + */ +- (nullable NSData*)newDataWithPassword:(nullable NSString*)password error:(NSError**)error; + +/** + * Creates a data provider to represent the entry file. + * + * @param error A pointer to a variable that will contain the error if any. + * @return The new data provider: nil for new entries. + */ +- (nullable CGDataProviderRef)newDataProviderWithError:(NSError**)error CF_RETURNS_RETAINED; + +/** + * Creates a data provider to represent the entry file. + * + * @param password The password to be used for decryption. + * @param error A pointer to a variable that will contain the error if any. + * @return The new data provider: nil for new entries. + */ +- (nullable CGDataProviderRef)newDataProviderWithPassword:(nullable NSString*)password error:(NSError**)error CF_RETURNS_RETAINED; + +- (id)newWriterCanSkipLocalFile:(BOOL)canSkipLocalFile; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64/JLDialUnit.framework/Headers/ZZConstants.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64/JLDialUnit.framework/Headers/ZZConstants.h new file mode 100644 index 000000000..698841852 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64/JLDialUnit.framework/Headers/ZZConstants.h @@ -0,0 +1,79 @@ +// +// ZZConstants.h +// ZipZap +// +// Created by Daniel Cohen Gindi on 29/12/13. +// Copyright (c) 2013, Pixelglow Software. All rights reserved. +// + +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// * Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS +// BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, +// OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF +// THE POSSIBILITY OF SUCH DAMAGE. +// + +#import + +typedef NS_ENUM(NSInteger, ZZEncryptionMode) +{ + /** + * No encryption. + */ + ZZEncryptionModeNone, + + /** + * Standard PKZIP encryption. + */ + ZZEncryptionModeStandard, + + /** + * Strong PKZIP encryption. Currently not supported. + */ + ZZEncryptionModeStrong, + + /** + * WinZip encryption using AES. + */ + ZZEncryptionModeWinZipAES +}; + +typedef NS_ENUM(uint8_t, ZZAESEncryptionStrength) +{ + /** + * Use 128-bit AES for encryption. + */ + ZZAESEncryptionStrength128 = 0x01, + + /** + * Use 192-bit AES for encryption. + */ + ZZAESEncryptionStrength192 = 0x02, + + /** + * Use 256-bit AES for encryption. + */ + ZZAESEncryptionStrength256 = 0x03 +}; + +/** + * An NSNumber object that determines whether to create the archive file if it is missing. Creation occurs during -[ZZArchive updateEntries:error:]. Default is @NO. + */ +extern NSString* const ZZOpenOptionsCreateIfMissingKey; diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64/JLDialUnit.framework/Headers/ZZError.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64/JLDialUnit.framework/Headers/ZZError.h new file mode 100644 index 000000000..a307763cf --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64/JLDialUnit.framework/Headers/ZZError.h @@ -0,0 +1,136 @@ +// +// ZZError.h +// ZipZap +// +// Created by Glen Low on 25/01/13. +// Copyright (c) 2013, Pixelglow Software. All rights reserved. +// + +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// * Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS +// BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, +// OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF +// THE POSSIBILITY OF SUCH DAMAGE. +// + +#import + +/** + * The domain of ZipZap errors. + */ +extern NSString* const ZZErrorDomain; + +/** + * The index of the erroneous entry. + */ +extern NSString* const ZZEntryIndexKey; + +typedef NS_ENUM(NSInteger, ZZErrorCode) +{ + /** + * Cannot open an archive for reading. + */ + ZZOpenReadErrorCode, + + /** + * Cannot read the end of central directory. + */ + ZZEndOfCentralDirectoryReadErrorCode, + + /** + * Cannot read a central file header. + */ + ZZCentralFileHeaderReadErrorCode, + + /** + * Cannot read a local file. + */ + ZZLocalFileReadErrorCode, + + /** + * Cannot open an archive for writing. + */ + ZZOpenWriteErrorCode, + + /** + * Cannot write a local file. + */ + ZZLocalFileWriteErrorCode, + + /** + * Cannot write a central file header. + */ + ZZCentralFileHeaderWriteErrorCode, + + /** + * Cannot write the end of central directory. + */ + ZZEndOfCentralDirectoryWriteErrorCode, + + /** + * Cannot replace the zip file after writing. + */ + ZZReplaceWriteErrorCode, + + /** + * The compression used is currently unsupported. + */ + ZZUnsupportedCompressionMethod, + + /** + * The encryption used is currently unsupported. + */ + ZZUnsupportedEncryptionMethod, + + /** + * An invalid CRC checksum has been encountered. + */ + ZZInvalidCRChecksum, + + /** + * The wrong key was passed in. + */ + ZZWrongPassword, + + /** + * The data, stream or data consumer block failed but did not set the error. + * This will be set on the underlying error of the local file write. + */ + ZZBlockFailedWithoutError +}; + +static inline BOOL ZZRaiseErrorNo(NSError** error, ZZErrorCode errorCode, NSDictionary* userInfo) +{ + if (error) + *error = [NSError errorWithDomain:ZZErrorDomain + code:errorCode + userInfo:userInfo]; + return NO; +} + +static inline id ZZRaiseErrorNil(NSError** error, ZZErrorCode errorCode, NSDictionary* userInfo) +{ + if (error) + *error = [NSError errorWithDomain:ZZErrorDomain + code:errorCode + userInfo:userInfo]; + return nil; +} + diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64/JLDialUnit.framework/Headers/ZipZap.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64/JLDialUnit.framework/Headers/ZipZap.h new file mode 100644 index 000000000..068fc16a0 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64/JLDialUnit.framework/Headers/ZipZap.h @@ -0,0 +1,45 @@ +// +// ZipZap.h +// ZipZap +// +// Created by Glen Low on 31/10/12. +// Copyright (c) 2012, Pixelglow Software. All rights reserved. +// + +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// * Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS +// BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, +// OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF +// THE POSSIBILITY OF SUCH DAMAGE. +// + +#import + +#import "ZZArchive.h" +#import "ZZArchiveEntry.h" +#import "ZZConstants.h" +#import "ZZError.h" + +//! Project version number for ZipZap. +FOUNDATION_EXPORT double ZipZapVersionNumber; + +//! Project version string for ZipZap. +FOUNDATION_EXPORT const unsigned char ZipZapVersionString[]; + diff --git a/local_plugins/ota/ios/Frameworks/JL_HashPair.framework/Info.plist b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64/JLDialUnit.framework/Info.plist similarity index 66% rename from local_plugins/ota/ios/Frameworks/JL_HashPair.framework/Info.plist rename to local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64/JLDialUnit.framework/Info.plist index af468ba71..e883516d0 100644 Binary files a/local_plugins/ota/ios/Frameworks/JL_HashPair.framework/Info.plist and b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64/JLDialUnit.framework/Info.plist differ diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64/JLDialUnit.framework/JLDialUnit b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64/JLDialUnit.framework/JLDialUnit new file mode 100755 index 000000000..66c880b98 Binary files /dev/null and b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64/JLDialUnit.framework/JLDialUnit differ diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64/JLDialUnit.framework/Modules/module.modulemap b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64/JLDialUnit.framework/Modules/module.modulemap new file mode 100644 index 000000000..873f1cbf9 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64/JLDialUnit.framework/Modules/module.modulemap @@ -0,0 +1,6 @@ +framework module JLDialUnit { + umbrella header "JLDialUnit.h" + export * + + module * { export * } +} diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64_x86_64-simulator/JLDialUnit.framework/Headers/DialManager.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64_x86_64-simulator/JLDialUnit.framework/Headers/DialManager.h new file mode 100644 index 000000000..869a29e09 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64_x86_64-simulator/JLDialUnit.framework/Headers/DialManager.h @@ -0,0 +1,127 @@ +// +// DialManager.h +// JLDialUnit +// +// Created by 杰理科技 on 2021/7/20. +// + +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN + + + +typedef NS_ENUM(NSInteger, DialOperateType) { + DialOperateTypeNoSpace = 0, //空间不足 + DialOperateTypeDoing = 1, //正在操作 + DialOperateTypeFail = 2, //操作失败 + DialOperateTypeSuccess = 3, //操作成功 + DialOperateTypeUnnecessary = 4, //无需重复打开文件系统 + DialOperateTypeResetFial = 5, //重置文件系统失败 + DialOperateTypeNormal = 6, //文件系统正常 + DialOperateTypeCmdFail = 7, //流程命令执行失败 +}; +typedef NS_ENUM(NSInteger, DialUpdateResult) { + DialUpdateResultFinished = 0, //更新资源完成 + DialUpdateResultNewest = 1, //资源已最新 + DialUpdateResultInvalid = 2, //资源无效 + DialUpdateResultEmpty = 3, //资源为空 + DialUpdateResultReplace = 4, //资源替换 + DialUpdateResultAdd = 5, //资源新增 + DialUpdateResultNoSpace = 6, //空间不足 + DialUpdateResultZipError = 7, //ZIP资源文件错误 + DialUpdateResultCompareFail = 8, //表盘资源对比失败 + DialUpdateResultUpdateUfw = 9, //更新固件 ufw +}; +typedef void(^DialOperateBK)(DialOperateType type, float progress); +typedef void(^DialListBK)(DialOperateType type, NSArray* __nullable array); +typedef void(^DialUpdateBK)(DialUpdateResult updateResult, + NSArray* __nullable array, + NSString * _Nullable filePath, + NSInteger index ,float progress); + +typedef void(^FatfsFreeBlock)(uint32_t freeSize); + +/// 表盘管理类 +@interface DialManager : NSObject + +#pragma mark - 连接成功后,必须调用一次! ++(void)openDialFileSystemWithCmdManager:(JL_ManagerM *)manager withResult:(DialOperateBK)result; + +#pragma mark - 重置表盘系统 ++(void)resetDialFileSystemWithCmdManager:(JL_ManagerM *)manager withResult:(DialOperateBK)result; + +#pragma mark - 查询文件 +/// 查询文件 +/// @param result 操作回调 ++(void)listFile:(DialListBK __nullable)result; + +#pragma mark - 添加文件 +/// 添加文件 +/// @param file 文件名需要加斜杠,类似@“/WACTH1”。 +/// @param content 文件数据 +/// @param result 操作回调 ++(void)addFile:(NSString*)file + Content:(NSData*)content + Result:(DialOperateBK)result; + +#pragma mark - 删除文件 +/// 删除文件(第一种) +/// @param file 文件名需要加斜杠,类似@“/WACTH1”。 +/// @param result 操作回调 ++(void)deleteFile:(NSString*)file + Result:(DialOperateBK)result; + +/// 删除文件(第二种) +/// @param fileModel JLModel_File类型 +/// @param result 操作回调 ++(void)deleteDialResourceWithFileModel:(JLModel_File*)fileModel Result:(DialOperateBK)result; + +#pragma mark - 替换文件 +/// 替换文件 +/// @param file 文件名需要加斜杠,类似@“/WACTH1”。 +/// @param content 文件数据 +/// @param result 操作回调 ++(void)repaceFile:(NSString*)file + Content:(NSData*)content + Result:(DialOperateBK)result; + +#pragma mark - 格式化外部Flash +/// 格式化外部Flash操作 +/// @param handle 设备句柄 +/// @param result 操作回调 ++(void)formatFlash:(NSString*)handle Result:(DialOperateBK)result; + +#pragma mark - 更新设备的表盘资源(异步调用) +/// 更新设备的表盘资源(异步调用) +/// @param path 资源文件 +/// @param array 表盘列表(当前) +/// @param result 更新结果 ++(void)updateResourcePath:(NSString*)path + List:(NSArray*)array + Result:(DialUpdateBK)result; + +/// 获取 fatfs 系统的剩余空间(仅仅fatfs 系统可用) +/// 需要异步执行 ++(uint32_t)getFatfsFree; + +/// 获取 fatfs 系统的剩余空间(仅仅fatfs 系统可用) +/// @param block 回调空间 ++(void)getFatfsFree:(FatfsFreeBlock) block; + +/// 获取某文件的文件大小 +/// @param fileName 文件名 ++(uint32_t)getSizeOfFileName:(NSString*)fileName; + + +/// 记录文件大小(私有接口) +/// @param size 文件大小 +/// @param fileName 文件名 ++(void)setFileSize:(uint32_t)size FileName:(NSString*)fileName; + + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64_x86_64-simulator/JLDialUnit.framework/Headers/FatfsObject.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64_x86_64-simulator/JLDialUnit.framework/Headers/FatfsObject.h new file mode 100644 index 000000000..c6fe7e0d1 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64_x86_64-simulator/JLDialUnit.framework/Headers/FatfsObject.h @@ -0,0 +1,92 @@ +// +// FatfsObject.h +// JLDialUnit +// +// Created by 杰理科技 on 2021/7/20. +// + +#import +#import + + + +NS_ASSUME_NONNULL_BEGIN + +@interface FatfsObject : NSObject + +#pragma mark ---> FATFS API +/// 输入命令中心类,在JL_Entity内。 +/// @param manager 命令中心类 ++(void)makeCmdManager:(JL_ManagerM*)manager; + +/// 返回 当前 JL_ManagerM ++(JL_ManagerM*)outputCmdManager; + +/// 设置外挂Flash的大小,FATFS的大小。 +/// @param flashSize Flash大小 +/// @param fatsSize FATFS的大小 ++(BOOL)makeFlashSize:(uint32_t)flashSize + FatsSize:(uint32_t)fatsSize; + +/// 获取Flash上的文件 +/// @param path 文件名数组,其中"JL",“FONT”不能操作。 ++(NSArray*)makeListPath:(NSString*)path; + +typedef void(^FatfsCreateFile_BK)(float progress); +/// 新增文件 +/// @param path “/文件名” +/// @param data 文件数据内容 +/// @param result 进度 ++(BOOL)makeCreateFile:(NSString*)path + Content:(NSData* __nullable)data + Result:(FatfsCreateFile_BK __nullable)result; + +typedef void(^FatfsReplaceFile_BK)(float progress); +/// 替换文件 +/// @param path “/文件名” +/// @param data 文件数据内容 ++(BOOL)makeReplaceFile:(NSString*)path + Content:(NSData* __nullable)data + Result:(FatfsReplaceFile_BK __nullable)result; + +/// 删除文件 +/// @param path “/文件名” ++(BOOL)makeRemoveFile:(NSString*)path; + +/*--------------------------------------------------------------------------------- + FatSize -- FAT文件系统认为自己的大小 + 因为小机的FAT项按4K对齐了大小,所以实际上会认为FAT系统占用的空间比FLASH实际大小还要大 + 用 f_getfree 获取的是 FAT文件系统认为自己剩余的空间的簇个数,其中有一部分是在Flash上实际不存在的 + 所以需要减掉这部分 + 计算方式如下: + FatUsed = FatSize - FreeSize + FlashRemainSize = FlashSize - FatUsed + ----------------------------------------------------------------------------------*/ +/// 获取FATFS系统剩余空间,“FreeSize”。 ++(uint32_t)makeGetFree; + +/// 查看watch本间版本 +/// @param path 文件路径 ++(NSString*)makeVersionWatch:(NSString*)path; + +/// 获取文件前面512个字节 +/// @param path 文件路径 ++(NSData *)makeFileHead:(NSString*)path; + +/// 读文件 +/// @param path 文件路径 ++(NSData*)makeFileContent:(NSString*)path; + +/// 解压资源文件 +/// @param path 文件路径 +/// @param aimDirection 存放的路径 ++(NSArray*)unzipFileAtPath:(NSString *)path toDestination:(NSString *)aimDirection; + +/// 重置外部flash ++(BOOL)makeResetFlash; + + +@end + +NS_ASSUME_NONNULL_END + diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64_x86_64-simulator/JLDialUnit.framework/Headers/JLDialSourceModel.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64_x86_64-simulator/JLDialUnit.framework/Headers/JLDialSourceModel.h new file mode 100644 index 000000000..e32e99dad --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64_x86_64-simulator/JLDialUnit.framework/Headers/JLDialSourceModel.h @@ -0,0 +1,27 @@ +// +// JLDialSourceModel.h +// JLDialUnit +// +// Created by EzioChan on 2025/3/19. +// Copyright © 2025 www.zh-jieli.com. All rights reserved. +// + +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface JLDialSourceModel : JLModel_File + +/// 文件大小 +@property (nonatomic, assign)int size; + +/// CRC +@property (nonatomic, assign)uint16_t crc; + ++(JLDialSourceModel *)createModel:(JLModel_File *)model; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64_x86_64-simulator/JLDialUnit.framework/Headers/JLDialUnit.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64_x86_64-simulator/JLDialUnit.framework/Headers/JLDialUnit.h new file mode 100644 index 000000000..07e55445b --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64_x86_64-simulator/JLDialUnit.framework/Headers/JLDialUnit.h @@ -0,0 +1,30 @@ +// +// JLDialUnit.h +// JLDialUnit +// +// Created by EzioChan on 2023/2/28. +// Copyright © 2023 www.zh-jieli.com. All rights reserved. +// + +#import + +//! Project version number for JLDialUnit. +FOUNDATION_EXPORT double JLDialUnitVersionNumber; + +//! Project version string for JLDialUnit. +FOUNDATION_EXPORT const unsigned char JLDialUnitVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import + + diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64_x86_64-simulator/JLDialUnit.framework/Headers/JLDialUnitMgr.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64_x86_64-simulator/JLDialUnit.framework/Headers/JLDialUnitMgr.h new file mode 100644 index 000000000..88ce0d6f0 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64_x86_64-simulator/JLDialUnit.framework/Headers/JLDialUnitMgr.h @@ -0,0 +1,115 @@ +// +// JLDialUnitMgr.h +// JLDialUnit +// +// Created by EzioChan on 2025/3/18. +// Copyright © 2025 www.zh-jieli.com. All rights reserved. +// + +#import +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN +@class JLDialSourceModel; +@interface JLDialUnitMgr : NSObject + +/// 设备文件列表 +@property (nonatomic,strong)NSMutableArray *fileArray; + +/// 当前 Flash 操控句柄 +@property (nonatomic, strong) JLFlashOpMgr *currentFlaghOpMgr; + +/// 当前使用的表盘文件 +@property (nonatomic,strong)JLDialSourceModel *currentFileSource; + +/// 当前使用的表盘背景 +@property (nonatomic,strong)JLDialSourceModel *_Nullable currentBackground; + +/// 初始化 +/// - Parameters: +/// - mgr: 蓝牙管理对象 +/// - completion: 回调 +-(instancetype)initWithManager:(JL_ManagerM*)mgr completion:(void (^)(NSError * _Nullable))completion; + +/// 获取文件列表 +/// - Parameters: +/// - cardType: 设备存储的类型 +/// - count: 请求的数目 +/// - completion: 回调 +/// 返回时,是返回累计数目 +-(void)getFileList:(JL_CardType)cardType count:(NSInteger)count completion:(void (^)(NSArray * _Nullable,NSError * _Nullable))completion; + +/// 清空文件列表 +/// - Parameter cardType: 设备存储的类型 +-(void)cleanFileList; + +/// 更新文件列表信息 +/// - Parameters: +/// - fileSources: NSArray +/// - completion: 回调 +-(void)updateFileSources:(NSArray *)fileSources completion:(void (^)(NSArray * _Nullable,NSError * _Nullable))completion; + +/// 更新文件到设备 +/// - Parameters: +/// - fileHandleType: 设备目标存储句柄 +/// - fileData: 文件数据 +/// - filePath: 文件存储路径 +/// - resultCompletion: 回调 +/// state: 0:成功 1:传输中 -1:失败 +/// progress: 传输进度 +/// error: 错误 +-(void)updateFileToDevice:(JL_FileHandleType)fileHandleType Data:(NSData *)fileData FilePath:(NSString *)filePath completion:(void (^)(int,double,NSError * _Nullable))resultCompletion; + +/// 删除文件 +/// - Parameters: +/// - filePath: 文件路径 +/// - resultCompletion: 回调 +-(void)deleteFile:(NSString *)filePath getFileList:(BOOL)isGet Completion:(void (^)(BOOL state, NSError * _Nullable error))resultCompletion; + +/// 删除多个文件 +/// - Parameters: +/// - filePathList: 文件路径 +/// - resultCompletion: 回调 +-(void)deleteFiles:(NSArray *) filePathList Completion:(void (^)(BOOL state, NSError * _Nullable error))resultCompletion; + +/// 获取剩余空间 +/// - Parameter completion: 回调 +-(void)getRemainingSpace:(void(^)(int freeSize, NSError * _Nullable error))completion; + +/// 获取剩余空间 V1 +/// - Parameter completion: 回调 +-(void)getFlashRemainingSpace:(void(^)(int freeSize, NSError * _Nullable error))completion; + +//MARK: 表盘操作 + +/// 获取当前正在使用的表盘 +/// - Parameter completion: 回调 +-(void)dialGetCurrent:(void (^)(JLDialSourceModel * _Nullable))completion; + +/// 设置当前表盘 +/// - Parameters: +/// - model: 表盘 +/// - resultCompletion: 回调 +-(void)dialSetCurrent:(JLDialSourceModel *)model Completion:(void (^)(BOOL state, NSError * _Nullable error))resultCompletion; + +/// 激活自定义表盘背景 +/// - Parameters: +/// - model: 表盘背景对象 +/// - resultCompletion: 回调 +-(void)dialActiveCustomBackground:(JLDialSourceModel *)model Completion:(void (^)(BOOL state, NSError * _Nullable error))resultCompletion; + +/// 重置自定义表盘背景 +/// - Parameter resultCompletion: 回调 +-(void)dialResetCustomBackground:(void (^)(BOOL state, NSError * _Nullable error))resultCompletion; + +/// 获取表盘背景 +/// - Parameters: +/// - path: 路径 诸如“/WATCH” +/// - resultCompletion: 回调 +-(void)dialGetDial:(NSString *)path BackgroundInfo:(void (^)(JLDialSourceModel * _Nullable model, NSError * _Nullable error))resultCompletion; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64_x86_64-simulator/JLDialUnit.framework/Headers/JLSourceUpdate.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64_x86_64-simulator/JLDialUnit.framework/Headers/JLSourceUpdate.h new file mode 100644 index 000000000..4c52a6d64 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64_x86_64-simulator/JLDialUnit.framework/Headers/JLSourceUpdate.h @@ -0,0 +1,94 @@ +// +// JLSourceUpdate.h +// JLDialUnit +// +// Created by EzioChan on 2025/3/18. +// Copyright © 2025 www.zh-jieli.com. All rights reserved. +// + +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN +@class JLDialUnitMgr; + +typedef NS_ENUM(NSInteger, JLSourceUpdateType) { + /// 更新资源完成 + JLSourceUpdateTypeFinished = 0, + /// 资源已最新 + JLSourceUpdateTypeNewest = 1, + /// 资源无效 + JLSourceUpdateTypeInvalid = 2, + /// 资源为空 + JLSourceUpdateTypeEmpty = 3, + /// 资源更新错误 + JLSourceUpdateTypeSrcError = 4, + /// 资源更新中 + JLSourceUpdateTypeUpdateing = 5, + /// 空间不足 + JLSourceUpdateTypeNoSpace = 6, + /// ZIP 资源文件错误 + JLSourceUpdateTypeZipError = 7, + /// 表盘资源对比失败 + JLSourceUpdateTypeCompareFail = 8, + /// 更新固件 ufw + JLSourceUpdateTypeUpdateUfw = 9, + /// 不支持 + JLSourceUpdateTypeUpdateNotSupport = 10, +}; + + +@interface JLSourceInfo : NSObject + +@property(nonatomic,strong)NSString *filePath; +@property(nonatomic,strong,readonly)NSData * _Nullable fileData; +@property(nonatomic,strong,readonly)NSString *fileName; +@property(nonatomic,assign)NSInteger index; + +@end + +@protocol JLSourceUpdateDelegate + +- (void)updateProgress:(double)progress type:(JLSourceUpdateType)type source:(JLSourceInfo *_Nullable)source error:(NSError* _Nullable)error; + +- (void)updateUfwFirst:(NSString *)filePath ThenUpdateSrc:(NSArray *) filePaths; + +@end + +/// 资源更新 +@interface JLSourceUpdate : NSObject + +@property(nonatomic,weak)id delegate; + +/// 初始化 +/// - Parameters: +/// - mgr: 蓝牙管理对象 +/// - fileType: 文件句柄 +/// - dialMgr: JLDialUnitMgr +/// - delegate: 代理 +-(instancetype)initWithManager:(JL_ManagerM*)mgr HandleType:(JL_FileHandleType) fileType DialMgr:(JLDialUnitMgr *)dialMgr delegate:(id)delegate; + + +/// 更新资源 +/// - Parameters: +/// - path: zip包路径 +/// - mgr: JLDialUnitMgr +-(void)updateSources:(NSString*)path DialUnitMgr:(JLDialUnitMgr *)mgr; + + +/// 更新资源 AC707N 手表特殊升级流程 +/// - Parameters: +/// - path: zip 包路径 +/// - mgr: JLDialUnitMgr +-(void)updateSourcesV2:(NSString*)path DialUnitMgr:(JLDialUnitMgr *)mgr; + + +/// 更新资源任务 +/// @param targetUpdateList 需要更新的文件列表 +/// @param updateResult 更新结果 +-(void)updateAciton:(NSArray *)targetUpdateList Result:(void (^)(BOOL isFinish, NSError * _Nullable))updateResult; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64_x86_64-simulator/JLDialUnit.framework/Headers/ZZArchive.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64_x86_64-simulator/JLDialUnit.framework/Headers/ZZArchive.h new file mode 100644 index 000000000..a37e0a7e7 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64_x86_64-simulator/JLDialUnit.framework/Headers/ZZArchive.h @@ -0,0 +1,131 @@ +// +// ZZArchive.h +// ZipZap +// +// Created by Glen Low on 25/09/12. +// Copyright (c) 2012, Pixelglow Software. All rights reserved. +// + +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// * Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS +// BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, +// OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF +// THE POSSIBILITY OF SUCH DAMAGE. +// + +#import +#import "ZZConstants.h" + +@class ZZArchiveEntry; + +NS_ASSUME_NONNULL_BEGIN + +/** + * The ZZArchive class represents a zip file for reading only. + */ +@interface ZZArchive : NSObject + +/** + * The URL representing this archive. + */ +@property (readonly, nullable, nonatomic) NSURL* URL; + +/** + * The uninterpreted contents of this archive. + */ +@property (readonly, nonatomic) NSData* contents; + +/** + * The array of ZZArchiveEntry entries within this archive. + */ +@property (readonly, nonatomic) NSArray* entries; + +/** + * Creates a new archive with the zip file at the given file URL. + * + * The archive will use UTF-8 encoding for reading entry file names and comments, and will not create the file if it is missing. + * + * @param URL The file URL of the zip file. + * @param error The error information when an error occurs. Pass in nil if you do not want error information. + * @return The initialized archive. Returns nil if the archive cannot be initialized. + */ ++ (nullable instancetype)archiveWithURL:(NSURL*)URL + error:(out NSError**)error; + +/** + * Creates a new archive with the raw zip file data given. + * + * The archive will use UTF-8 encoding for reading entry file names and comments, and will not create the data if it is missing. + * + * @param data The raw data of the zip file. + * @param error The error information when an error occurs. Pass in nil if you do not want error information. + * @return The initialized archive. Returns nil if the archive cannot be initialized. + */ ++ (nullable instancetype)archiveWithData:(NSData*)data + error:(out NSError**)error; + +/** + * This initializer should never be used. + */ +- (instancetype)init NS_UNAVAILABLE; + +/** + * Initializes a new archive with the zip file at the given file URL. + * + * @param URL The file URL of the zip file. + * @param options The options to consider when opening the zip file. + * @param error The error information when an error occurs. Pass in nil if you do not want error information. + * @return The initialized archive. Returns nil if the archive cannot be initialized. + */ +- (nullable instancetype)initWithURL:(NSURL*)URL + options:(nullable NSDictionary*)options + error:(out NSError**)error; + +/** + * Initializes a new archive with the raw zip file data given. + * + * @param data The raw data of the zip file + * @param options The options to consider when opening the zip file. + * @param error The error information when an error occurs. Pass in nil if you do not want error information. + * @return The initialized archive. Returns nil if the archive cannot be initialized. + */ +- (nullable instancetype)initWithData:(NSData*)data + options:(nullable NSDictionary*)options + error:(out NSError**)error; + +/** + * Updates the entries and writes them to the source. + * + * If the write fails and the entries are completely new, the existing zip file will be untouched. + * + * If the write fails and the entries contain some or all existing entries, the zip file may be corrupted. + * In this case, the error information will report the ZZReplaceWriteErrorCode error code. + * + * @param newEntries The entries to update to, may contain some or all existing entries. + * @param error The error information when an error occurs. Pass in nil if you do not want error information. + * @return Whether the update was successful or not. + * + */ +- (BOOL)updateEntries:(NSArray*)newEntries + error:(out NSError**)error; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64_x86_64-simulator/JLDialUnit.framework/Headers/ZZArchiveEntry.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64_x86_64-simulator/JLDialUnit.framework/Headers/ZZArchiveEntry.h new file mode 100644 index 000000000..2fa9b0836 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64_x86_64-simulator/JLDialUnit.framework/Headers/ZZArchiveEntry.h @@ -0,0 +1,239 @@ +// +// ZZArchiveEntry.h +// ZipZap +// +// Created by Glen Low on 25/09/12. +// Copyright (c) 2012, Pixelglow Software. All rights reserved. +// + +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// * Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS +// BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, +// OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF +// THE POSSIBILITY OF SUCH DAMAGE. +// + +#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) +#include +#elif defined(__MAC_OS_X_VERSION_MIN_REQUIRED) +#include +#endif + +#import + +@protocol ZZArchiveEntryWriter; + +NS_ASSUME_NONNULL_BEGIN + +/** + * The ZZArchiveEntry class represents an entry in the ZZArchive instance. + */ +@interface ZZArchiveEntry : NSObject + +/** + * Whether the entry is compressed. + */ +@property (readonly, nonatomic) BOOL compressed; + +/** + * Whether the entry is encrypted. + */ +@property (readonly, nonatomic) BOOL encrypted; + +/** + * The last modified date and time of the entry. The time value is only accurate to 2 seconds. + */ +@property (readonly, nonatomic) NSDate* lastModified; + +/** + * The CRC32 code of the entry file: 0 for new entries. + */ +@property (readonly, nonatomic) NSUInteger crc32; + +/** + * The compressed size of the entry file: 0 for new entries. + */ +@property (readonly, nonatomic) NSUInteger compressedSize; + +/** + * The uncompressed size of the entry file: 0 for new entries. + */ +@property (readonly, nonatomic) NSUInteger uncompressedSize; + +/** + * The UNIX file mode for the entry: 0 for new or non-UNIX entries. This includes the file type bits. + */ +@property (readonly, nonatomic) mode_t fileMode; + +/** + * The file name of the entry. Encoding is either CP-437 or UTF-8, depending on the EFS flag of the general purpose bit flags. + */ +@property (readonly, nonatomic) NSString* fileName; + +/** + * The file name of the entry as array of bytes + */ +@property (readonly, nonatomic) NSData* rawFileName; + +/** + * The encoding of filename and comment fields, according to the EFS flag of the general purpose bit flags. + */ +@property (readonly, nonatomic) NSStringEncoding encoding; + +/** + * Creates a new file entry from a streaming callback. + * + * @param fileName The file name for the entry. + * @param compress Whether to compress the entry. + * @param streamBlock The callback to write the entry's data to the stream. Returns whether the write should be considered successful. + * @return The created entry. + */ ++ (instancetype)archiveEntryWithFileName:(NSString*)fileName + compress:(BOOL)compress + streamBlock:(BOOL(^)(NSOutputStream* stream, NSError** error))streamBlock; + +/** + * Creates a new file entry from a data callback. + * + * @param fileName The file name for the entry. + * @param compress Whether to compress the entry. + * @param dataBlock The callback to return the entry's data. Returns nil if the write should be considered unsuccessful. + * @return The created entry. + */ ++ (instancetype)archiveEntryWithFileName:(NSString*)fileName + compress:(BOOL)compress + dataBlock:(NSData* _Nullable(^)(NSError** error))dataBlock; + +/** + * Creates a new file entry from a data-consuming callback. + * + * @param fileName The file name for the entry. + * @param compress Whether to compress the entry. + * @param dataConsumerBlock The callback to put the entry's data into the data consumer. Returns whether the write should be considered successful. + * @return The created entry. + */ ++ (instancetype)archiveEntryWithFileName:(NSString*)fileName + compress:(BOOL)compress + dataConsumerBlock:(BOOL(^)(CGDataConsumerRef dataConsumer, NSError** error))dataConsumerBlock; + +/** + * Creates a new directory entry. + * + * @param directoryName The directory name for the entry. + * @return The created entry. + */ ++ (instancetype)archiveEntryWithDirectoryName:(NSString*)directoryName; + +/** + * Creates a new entry. + * + * The archive entry will choose the first non-nil dataBlock, streamBlock or dataConsumerBlock to supply its data. + * + * @param fileName The file name for the entry. + * @param fileMode The UNIX file mode for the entry. This includes the file type bits. + * @param lastModified The last modified date and time for the entry. The time value is only accurate to 2 seconds. + * @param compressionLevel The compression level for the entry: 0 for stored, -1 for default deflate, 1 - 9 for custom deflate levels. + * @param dataBlock The callback that returns the entry file data. Returns nil if the write should be considered unsuccessful. + * @param streamBlock The callback that writes the entry file to the stream. Returns whether the write should be considered successful. + * @param dataConsumerBlock The callback that writes the entry file to the data consumer. Returns whether the write should be considered successful. + * @return The created entry. + */ ++ (instancetype)archiveEntryWithFileName:(NSString*)fileName + fileMode:(mode_t)fileMode + lastModified:(NSDate*)lastModified + compressionLevel:(NSInteger)compressionLevel + dataBlock:(nullable NSData* _Nullable(^)(NSError** error))dataBlock + streamBlock:(nullable BOOL(^)(NSOutputStream* stream, NSError** error))streamBlock + dataConsumerBlock:(nullable BOOL(^)(CGDataConsumerRef dataConsumer, NSError** error))dataConsumerBlock; + +/** + * Checks whether the entry file is consistent. + * + * Checks whether the local file entry is consistent with the central file entry and also that + * the recorded and actual checksums of the data agree. + * + * @param error The error information when an error occurs. Pass in nil if you do not want error information. + * @return Whether entry file is consistent or not. + */ +- (BOOL)check:(out NSError**)error; + +/** + * The file name of the entry with the given encoding. + * + * @param encoding The encoding for the filename. + */ +- (NSString*)fileNameWithEncoding:(NSStringEncoding)encoding; + +/** + * Creates a stream to represent the entry file. + * + * @param error A pointer to a variable that will contain the error if any. + * @return The new stream: nil for new entries. + */ +- (nullable NSInputStream*)newStreamWithError:(NSError**)error; + +/** + * Creates a stream to represent the entry file. + * + * @param password The password to be used for decryption. + * @param error A pointer to a variable that will contain the error if any. + * @return The new stream: nil for new entries. + */ +- (nullable NSInputStream*)newStreamWithPassword:(nullable NSString*)password error:(NSError**)error; + +/** + * Creates data to represent the entry file. + * + * @param error A pointer to a variable that will contain the error if any. + * @return The new data: nil for new entries. + */ +- (nullable NSData*)newDataWithError:(NSError**)error; + +/** + * Creates data to represent the entry file. + * + * @param password The password to be used for decryption. + * @param error A pointer to a variable that will contain the error if any. + * @return The new data: nil for new entries. + */ +- (nullable NSData*)newDataWithPassword:(nullable NSString*)password error:(NSError**)error; + +/** + * Creates a data provider to represent the entry file. + * + * @param error A pointer to a variable that will contain the error if any. + * @return The new data provider: nil for new entries. + */ +- (nullable CGDataProviderRef)newDataProviderWithError:(NSError**)error CF_RETURNS_RETAINED; + +/** + * Creates a data provider to represent the entry file. + * + * @param password The password to be used for decryption. + * @param error A pointer to a variable that will contain the error if any. + * @return The new data provider: nil for new entries. + */ +- (nullable CGDataProviderRef)newDataProviderWithPassword:(nullable NSString*)password error:(NSError**)error CF_RETURNS_RETAINED; + +- (id)newWriterCanSkipLocalFile:(BOOL)canSkipLocalFile; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64_x86_64-simulator/JLDialUnit.framework/Headers/ZZConstants.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64_x86_64-simulator/JLDialUnit.framework/Headers/ZZConstants.h new file mode 100644 index 000000000..698841852 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64_x86_64-simulator/JLDialUnit.framework/Headers/ZZConstants.h @@ -0,0 +1,79 @@ +// +// ZZConstants.h +// ZipZap +// +// Created by Daniel Cohen Gindi on 29/12/13. +// Copyright (c) 2013, Pixelglow Software. All rights reserved. +// + +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// * Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS +// BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, +// OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF +// THE POSSIBILITY OF SUCH DAMAGE. +// + +#import + +typedef NS_ENUM(NSInteger, ZZEncryptionMode) +{ + /** + * No encryption. + */ + ZZEncryptionModeNone, + + /** + * Standard PKZIP encryption. + */ + ZZEncryptionModeStandard, + + /** + * Strong PKZIP encryption. Currently not supported. + */ + ZZEncryptionModeStrong, + + /** + * WinZip encryption using AES. + */ + ZZEncryptionModeWinZipAES +}; + +typedef NS_ENUM(uint8_t, ZZAESEncryptionStrength) +{ + /** + * Use 128-bit AES for encryption. + */ + ZZAESEncryptionStrength128 = 0x01, + + /** + * Use 192-bit AES for encryption. + */ + ZZAESEncryptionStrength192 = 0x02, + + /** + * Use 256-bit AES for encryption. + */ + ZZAESEncryptionStrength256 = 0x03 +}; + +/** + * An NSNumber object that determines whether to create the archive file if it is missing. Creation occurs during -[ZZArchive updateEntries:error:]. Default is @NO. + */ +extern NSString* const ZZOpenOptionsCreateIfMissingKey; diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64_x86_64-simulator/JLDialUnit.framework/Headers/ZZError.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64_x86_64-simulator/JLDialUnit.framework/Headers/ZZError.h new file mode 100644 index 000000000..a307763cf --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64_x86_64-simulator/JLDialUnit.framework/Headers/ZZError.h @@ -0,0 +1,136 @@ +// +// ZZError.h +// ZipZap +// +// Created by Glen Low on 25/01/13. +// Copyright (c) 2013, Pixelglow Software. All rights reserved. +// + +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// * Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS +// BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, +// OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF +// THE POSSIBILITY OF SUCH DAMAGE. +// + +#import + +/** + * The domain of ZipZap errors. + */ +extern NSString* const ZZErrorDomain; + +/** + * The index of the erroneous entry. + */ +extern NSString* const ZZEntryIndexKey; + +typedef NS_ENUM(NSInteger, ZZErrorCode) +{ + /** + * Cannot open an archive for reading. + */ + ZZOpenReadErrorCode, + + /** + * Cannot read the end of central directory. + */ + ZZEndOfCentralDirectoryReadErrorCode, + + /** + * Cannot read a central file header. + */ + ZZCentralFileHeaderReadErrorCode, + + /** + * Cannot read a local file. + */ + ZZLocalFileReadErrorCode, + + /** + * Cannot open an archive for writing. + */ + ZZOpenWriteErrorCode, + + /** + * Cannot write a local file. + */ + ZZLocalFileWriteErrorCode, + + /** + * Cannot write a central file header. + */ + ZZCentralFileHeaderWriteErrorCode, + + /** + * Cannot write the end of central directory. + */ + ZZEndOfCentralDirectoryWriteErrorCode, + + /** + * Cannot replace the zip file after writing. + */ + ZZReplaceWriteErrorCode, + + /** + * The compression used is currently unsupported. + */ + ZZUnsupportedCompressionMethod, + + /** + * The encryption used is currently unsupported. + */ + ZZUnsupportedEncryptionMethod, + + /** + * An invalid CRC checksum has been encountered. + */ + ZZInvalidCRChecksum, + + /** + * The wrong key was passed in. + */ + ZZWrongPassword, + + /** + * The data, stream or data consumer block failed but did not set the error. + * This will be set on the underlying error of the local file write. + */ + ZZBlockFailedWithoutError +}; + +static inline BOOL ZZRaiseErrorNo(NSError** error, ZZErrorCode errorCode, NSDictionary* userInfo) +{ + if (error) + *error = [NSError errorWithDomain:ZZErrorDomain + code:errorCode + userInfo:userInfo]; + return NO; +} + +static inline id ZZRaiseErrorNil(NSError** error, ZZErrorCode errorCode, NSDictionary* userInfo) +{ + if (error) + *error = [NSError errorWithDomain:ZZErrorDomain + code:errorCode + userInfo:userInfo]; + return nil; +} + diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64_x86_64-simulator/JLDialUnit.framework/Headers/ZipZap.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64_x86_64-simulator/JLDialUnit.framework/Headers/ZipZap.h new file mode 100644 index 000000000..068fc16a0 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64_x86_64-simulator/JLDialUnit.framework/Headers/ZipZap.h @@ -0,0 +1,45 @@ +// +// ZipZap.h +// ZipZap +// +// Created by Glen Low on 31/10/12. +// Copyright (c) 2012, Pixelglow Software. All rights reserved. +// + +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// * Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS +// BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, +// OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF +// THE POSSIBILITY OF SUCH DAMAGE. +// + +#import + +#import "ZZArchive.h" +#import "ZZArchiveEntry.h" +#import "ZZConstants.h" +#import "ZZError.h" + +//! Project version number for ZipZap. +FOUNDATION_EXPORT double ZipZapVersionNumber; + +//! Project version string for ZipZap. +FOUNDATION_EXPORT const unsigned char ZipZapVersionString[]; + diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64_x86_64-simulator/JLDialUnit.framework/Info.plist b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64_x86_64-simulator/JLDialUnit.framework/Info.plist new file mode 100644 index 000000000..e8a73fc24 Binary files /dev/null and b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64_x86_64-simulator/JLDialUnit.framework/Info.plist differ diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64_x86_64-simulator/JLDialUnit.framework/JLDialUnit b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64_x86_64-simulator/JLDialUnit.framework/JLDialUnit new file mode 100755 index 000000000..48eb602dc Binary files /dev/null and b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64_x86_64-simulator/JLDialUnit.framework/JLDialUnit differ diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64_x86_64-simulator/JLDialUnit.framework/Modules/module.modulemap b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64_x86_64-simulator/JLDialUnit.framework/Modules/module.modulemap new file mode 100644 index 000000000..873f1cbf9 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64_x86_64-simulator/JLDialUnit.framework/Modules/module.modulemap @@ -0,0 +1,6 @@ +framework module JLDialUnit { + umbrella header "JLDialUnit.h" + export * + + module * { export * } +} diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64_x86_64-simulator/JLDialUnit.framework/_CodeSignature/CodeResources b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64_x86_64-simulator/JLDialUnit.framework/_CodeSignature/CodeResources new file mode 100644 index 000000000..2e8376acb --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLDialUnit.xcframework/ios-arm64_x86_64-simulator/JLDialUnit.framework/_CodeSignature/CodeResources @@ -0,0 +1,282 @@ + + + + + files + + Headers/DialManager.h + + Mb2jV1CnOQ8OFCZUBx0Z3/6vUx4= + + Headers/FatfsObject.h + + kduOIsvKG9oOwJR5cZFVR744ZP0= + + Headers/JLDialSourceModel.h + + eIkUWVijyig9VgWIRPImfF9A2DM= + + Headers/JLDialUnit.h + + lDdkEIa40U/+f8NpGLO6SJHK/ZI= + + Headers/JLDialUnitMgr.h + + l6ivZmKQhFyNKu5Wy1Wp2IHCH3w= + + Headers/JLSourceUpdate.h + + gFCkm0vIO2ZW1DtpnDS6m1MI+yQ= + + Headers/ZZArchive.h + + fiHROZsQUJUlj+6a/iwZVg85QzM= + + Headers/ZZArchiveEntry.h + + a1D8K7lXbAyn/Q+LjNUtzBndzb8= + + Headers/ZZConstants.h + + k+fTTarqbjiDQ4X2wXehYKxH38Y= + + Headers/ZZError.h + + 29Dme+O1rSf3n+RCHQLmE7mPdoo= + + Headers/ZipZap.h + + RaXhaS0pUtZHPeOSQhDq2kmw38A= + + Info.plist + + UOVQW+J5hxFv4GqeGxCjfcQ+XtE= + + Modules/module.modulemap + + X9AQ9UbZdsaQnmASvtGbwRKrbwY= + + + files2 + + Headers/DialManager.h + + hash + + Mb2jV1CnOQ8OFCZUBx0Z3/6vUx4= + + hash2 + + DWCDneg/KpcPLEMS9W0V8GS8NAJRJQ3xU2vQ9wDNKGI= + + + Headers/FatfsObject.h + + hash + + kduOIsvKG9oOwJR5cZFVR744ZP0= + + hash2 + + tbux7Dz4wdT+oqHrgs9sZiQYnpSqKu9X0iKE/ZuhcNA= + + + Headers/JLDialSourceModel.h + + hash + + eIkUWVijyig9VgWIRPImfF9A2DM= + + hash2 + + OcwV19AMXbyLPjp7/nLR+O/wnumr3eppJtpyJ7JzVrw= + + + Headers/JLDialUnit.h + + hash + + lDdkEIa40U/+f8NpGLO6SJHK/ZI= + + hash2 + + H3VhMgaLiZwlRDQxjabXw2Jsw7KjIKg2P6SjQ69ztiA= + + + Headers/JLDialUnitMgr.h + + hash + + l6ivZmKQhFyNKu5Wy1Wp2IHCH3w= + + hash2 + + vCyZvP2a+LBqY0HXMyIKvdxpUrVJr9F9kknNsg5pzWY= + + + Headers/JLSourceUpdate.h + + hash + + gFCkm0vIO2ZW1DtpnDS6m1MI+yQ= + + hash2 + + cJV9DTlK3k4aIGNCEn3CpdQiCT5stcM6cNdC95AC39I= + + + Headers/ZZArchive.h + + hash + + fiHROZsQUJUlj+6a/iwZVg85QzM= + + hash2 + + Y2wNoNW2qcR6Kb51+8YoEZekVt5J8PMGJpfOcEfRPfI= + + + Headers/ZZArchiveEntry.h + + hash + + a1D8K7lXbAyn/Q+LjNUtzBndzb8= + + hash2 + + 7uQNNgDpWK2PbPtCFX+Y8mDCRo7c85NIpL8y58KonFM= + + + Headers/ZZConstants.h + + hash + + k+fTTarqbjiDQ4X2wXehYKxH38Y= + + hash2 + + 5gRNhwXKHN2OLt5jDVuXbYLLumdcEkNfenslGce1/Ec= + + + Headers/ZZError.h + + hash + + 29Dme+O1rSf3n+RCHQLmE7mPdoo= + + hash2 + + KpD5n8wFzDzn8wwMg6E7r3zYIOdZcWozb3hstntbEN0= + + + Headers/ZipZap.h + + hash + + RaXhaS0pUtZHPeOSQhDq2kmw38A= + + hash2 + + SfFE2DDepKHCHaP6yMkWN0t7/aZ2OOq5tWABp9ZQ958= + + + Modules/module.modulemap + + hash + + X9AQ9UbZdsaQnmASvtGbwRKrbwY= + + hash2 + + XvC1qrDmDLbId8N8voUZDEjYELULS2EUMos/IW53IuU= + + + + rules + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^version.plist$ + + + rules2 + + .*\.dSYM($|/) + + weight + 11 + + ^(.*/)?\.DS_Store$ + + omit + + weight + 2000 + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^Info\.plist$ + + omit + + weight + 20 + + ^PkgInfo$ + + omit + + weight + 20 + + ^embedded\.provisionprofile$ + + weight + 20 + + ^version\.plist$ + + weight + 20 + + + + diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLLogHelper.xcframework/Info.plist b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLLogHelper.xcframework/Info.plist new file mode 100644 index 000000000..1d5ad85ad --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLLogHelper.xcframework/Info.plist @@ -0,0 +1,59 @@ + + + + + AvailableLibraries + + + BinaryPath + JLLogHelper.framework/Versions/A/JLLogHelper + LibraryIdentifier + macos-arm64_x86_64 + LibraryPath + JLLogHelper.framework + SupportedArchitectures + + arm64 + x86_64 + + SupportedPlatform + macos + + + BinaryPath + JLLogHelper.framework/JLLogHelper + LibraryIdentifier + ios-arm64_x86_64-simulator + LibraryPath + JLLogHelper.framework + SupportedArchitectures + + arm64 + x86_64 + + SupportedPlatform + ios + SupportedPlatformVariant + simulator + + + BinaryPath + JLLogHelper.framework/JLLogHelper + LibraryIdentifier + ios-arm64 + LibraryPath + JLLogHelper.framework + SupportedArchitectures + + arm64 + + SupportedPlatform + ios + + + CFBundlePackageType + XFWK + XCFrameworkFormatVersion + 1.0 + + diff --git a/local_plugins/ota/ios/Frameworks/JLLogHelper.framework/Headers/JLLogHelper.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLLogHelper.xcframework/ios-arm64/JLLogHelper.framework/Headers/JLLogHelper.h similarity index 100% rename from local_plugins/ota/ios/Frameworks/JLLogHelper.framework/Headers/JLLogHelper.h rename to local_plugins/device_jieli/ios/device_jieli/Frameworks/JLLogHelper.xcframework/ios-arm64/JLLogHelper.framework/Headers/JLLogHelper.h diff --git a/local_plugins/ota/ios/Frameworks/JLLogHelper.framework/Headers/JLLogManager.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLLogHelper.xcframework/ios-arm64/JLLogHelper.framework/Headers/JLLogManager.h similarity index 86% rename from local_plugins/ota/ios/Frameworks/JLLogHelper.framework/Headers/JLLogManager.h rename to local_plugins/device_jieli/ios/device_jieli/Frameworks/JLLogHelper.xcframework/ios-arm64/JLLogHelper.framework/Headers/JLLogManager.h index db31d828f..8f16c2a12 100644 --- a/local_plugins/ota/ios/Frameworks/JLLogHelper.framework/Headers/JLLogManager.h +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLLogHelper.xcframework/ios-arm64/JLLogHelper.framework/Headers/JLLogManager.h @@ -35,6 +35,13 @@ typedef NS_ENUM(NSInteger, JLLOG_LEVEL) { */ +(void)openLogTextFile; +///重定向保存日志文件路径设置 +/// @param path 路径 ++(void)redirectLogPath:(NSString *)path; + +/// 收集日志回调接口 +/// @param block 回调 ++(void)collectLog:(void(^)(NSString *log))block; /// 打印时间 /// @param isTimeStamp 是否打印 default is false @@ -61,6 +68,12 @@ typedef NS_ENUM(NSInteger, JLLOG_LEVEL) { /// @param something 任意字符串内容 +(void)logSomething:(NSString *)something; +/// 打印对象 +/// @param object 任意对象 ++(void)logObject:(id)object; + + + /// 打印 /// @param level LOG等级 /// @param content 内容 diff --git a/local_plugins/ota/ios/Frameworks/JL_HashPair.framework/Frameworks/JLLogHelper.framework/Info.plist b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLLogHelper.xcframework/ios-arm64/JLLogHelper.framework/Info.plist similarity index 73% rename from local_plugins/ota/ios/Frameworks/JL_HashPair.framework/Frameworks/JLLogHelper.framework/Info.plist rename to local_plugins/device_jieli/ios/device_jieli/Frameworks/JLLogHelper.xcframework/ios-arm64/JLLogHelper.framework/Info.plist index 22f0b62eb..a4ba86f07 100644 Binary files a/local_plugins/ota/ios/Frameworks/JL_HashPair.framework/Frameworks/JLLogHelper.framework/Info.plist and b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLLogHelper.xcframework/ios-arm64/JLLogHelper.framework/Info.plist differ diff --git a/local_plugins/ota/ios/Frameworks/JL_OTALib.framework/Frameworks/JLLogHelper.framework/JLLogHelper b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLLogHelper.xcframework/ios-arm64/JLLogHelper.framework/JLLogHelper similarity index 53% rename from local_plugins/ota/ios/Frameworks/JL_OTALib.framework/Frameworks/JLLogHelper.framework/JLLogHelper rename to local_plugins/device_jieli/ios/device_jieli/Frameworks/JLLogHelper.xcframework/ios-arm64/JLLogHelper.framework/JLLogHelper index 83014387b..6c97bde0c 100755 Binary files a/local_plugins/ota/ios/Frameworks/JL_OTALib.framework/Frameworks/JLLogHelper.framework/JLLogHelper and b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLLogHelper.xcframework/ios-arm64/JLLogHelper.framework/JLLogHelper differ diff --git a/local_plugins/ota/ios/Frameworks/JLLogHelper.framework/Modules/module.modulemap b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLLogHelper.xcframework/ios-arm64/JLLogHelper.framework/Modules/module.modulemap similarity index 100% rename from local_plugins/ota/ios/Frameworks/JLLogHelper.framework/Modules/module.modulemap rename to local_plugins/device_jieli/ios/device_jieli/Frameworks/JLLogHelper.xcframework/ios-arm64/JLLogHelper.framework/Modules/module.modulemap diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLLogHelper.xcframework/ios-arm64_x86_64-simulator/JLLogHelper.framework/Headers/JLLogHelper.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLLogHelper.xcframework/ios-arm64_x86_64-simulator/JLLogHelper.framework/Headers/JLLogHelper.h new file mode 100644 index 000000000..a681462cc --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLLogHelper.xcframework/ios-arm64_x86_64-simulator/JLLogHelper.framework/Headers/JLLogHelper.h @@ -0,0 +1,19 @@ +// +// JLLogHelper.h +// JLLogHelper +// +// Created by EzioChan on 2024/5/8. +// Copyright © 2024 www.zh-jieli.com. All rights reserved. +// + +#import + +//! Project version number for JLLogHelper. +FOUNDATION_EXPORT double JLLogHelperVersionNumber; + +//! Project version string for JLLogHelper. +FOUNDATION_EXPORT const unsigned char JLLogHelperVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + +#import diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLLogHelper.xcframework/ios-arm64_x86_64-simulator/JLLogHelper.framework/Headers/JLLogManager.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLLogHelper.xcframework/ios-arm64_x86_64-simulator/JLLogHelper.framework/Headers/JLLogManager.h new file mode 100644 index 000000000..8f16c2a12 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLLogHelper.xcframework/ios-arm64_x86_64-simulator/JLLogHelper.framework/Headers/JLLogManager.h @@ -0,0 +1,88 @@ +// +// JLLogManager.h +// JLLogHelper +// +// Created by EzioChan on 2024/5/8. +// Copyright © 2024 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +/// 打印宏 +#define kJLLog(level,fmt...) [JLLogManager logLevel:level funcName:__FUNCTION__ line:__LINE__ format:fmt] + +typedef NS_ENUM(NSInteger, JLLOG_LEVEL) { + JLLOG_COMPLETE = 0, + JLLOG_DEBUG = 1, + JLLOG_INFO = 2, + JLLOG_WARN = 3, + JLLOG_ERROR = 4, +}; + +/// 日志打印 +@interface JLLogManager : NSObject + +/// 打印SDK版本 ++(void)sdkVersion; + +///清理已存储的打印 ++(void)clearLog; + +/** + * 打印文本 + */ ++(void)openLogTextFile; + +///重定向保存日志文件路径设置 +/// @param path 路径 ++(void)redirectLogPath:(NSString *)path; + +/// 收集日志回调接口 +/// @param block 回调 ++(void)collectLog:(void(^)(NSString *log))block; + +/// 打印时间 +/// @param isTimeStamp 是否打印 default is false ++(void)logWithTimestamp:(BOOL)isTimeStamp; + +/// 把日志保存存储起来 +/// @param isSave 是否保存 default is yes ++(void)saveLogAsFile:(BOOL)isSave; + +///LOG使能与等级,默认开启且debug等级。 +/// @param enable LOG使能 +/// @param isMore 是否打印【函数名&行号】 +/// @param level LOG等级 ++(void)setLog:(BOOL)enable IsMore:(BOOL)isMore Level:(JLLOG_LEVEL)level; + +/// 打印函数 +/// @param level LOG等级 +/// @param func 函数名 +/// @param line 行号 +/// @param format 内容 ++(void)logLevel:(JLLOG_LEVEL)level funcName:(const char* _Nullable)func line:(const int)line format:(NSString * _Nonnull)format,...; + +/// 打印 +/// @param something 任意字符串内容 ++(void)logSomething:(NSString *)something; + +/// 打印对象 +/// @param object 任意对象 ++(void)logObject:(id)object; + + + +/// 打印 +/// @param level LOG等级 +/// @param content 内容 ++(void)logLevel:(JLLOG_LEVEL)level content:(NSString *)content; + +/// 保存日志信息到文件中 +/// @param logContent 日志内容 ++(void)saveLog:(NSString *)logContent; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLLogHelper.xcframework/ios-arm64_x86_64-simulator/JLLogHelper.framework/Info.plist b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLLogHelper.xcframework/ios-arm64_x86_64-simulator/JLLogHelper.framework/Info.plist new file mode 100644 index 000000000..3a5d81280 Binary files /dev/null and b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLLogHelper.xcframework/ios-arm64_x86_64-simulator/JLLogHelper.framework/Info.plist differ diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLLogHelper.xcframework/ios-arm64_x86_64-simulator/JLLogHelper.framework/JLLogHelper b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLLogHelper.xcframework/ios-arm64_x86_64-simulator/JLLogHelper.framework/JLLogHelper new file mode 100755 index 000000000..4289a0bb2 Binary files /dev/null and b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLLogHelper.xcframework/ios-arm64_x86_64-simulator/JLLogHelper.framework/JLLogHelper differ diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLLogHelper.xcframework/ios-arm64_x86_64-simulator/JLLogHelper.framework/Modules/module.modulemap b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLLogHelper.xcframework/ios-arm64_x86_64-simulator/JLLogHelper.framework/Modules/module.modulemap new file mode 100644 index 000000000..21384c4ed --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLLogHelper.xcframework/ios-arm64_x86_64-simulator/JLLogHelper.framework/Modules/module.modulemap @@ -0,0 +1,6 @@ +framework module JLLogHelper { + umbrella header "JLLogHelper.h" + export * + + module * { export * } +} diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLLogHelper.xcframework/ios-arm64_x86_64-simulator/JLLogHelper.framework/_CodeSignature/CodeResources b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLLogHelper.xcframework/ios-arm64_x86_64-simulator/JLLogHelper.framework/_CodeSignature/CodeResources new file mode 100644 index 000000000..8ac50a58c --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLLogHelper.xcframework/ios-arm64_x86_64-simulator/JLLogHelper.framework/_CodeSignature/CodeResources @@ -0,0 +1,147 @@ + + + + + files + + Headers/JLLogHelper.h + + TahP/o16a5TgPGLNFs/QhND95FU= + + Headers/JLLogManager.h + + Be4QtnAF0IDSmlMZquwyK7LLd8w= + + Info.plist + + mJ09lIigUxIgwpwz1tMqaHs8roI= + + Modules/module.modulemap + + YwPsApnJXdp+uskVahraY2UK/Jk= + + + files2 + + Headers/JLLogHelper.h + + hash + + TahP/o16a5TgPGLNFs/QhND95FU= + + hash2 + + nD5WuwBhpaoCwOGeWB5OusXVP21nYy+/Hcn6nPideIk= + + + Headers/JLLogManager.h + + hash + + Be4QtnAF0IDSmlMZquwyK7LLd8w= + + hash2 + + vOgQgQVptNwQdUKpCW2EBNruc0PL6BnkSjxVpptJsf0= + + + Modules/module.modulemap + + hash + + YwPsApnJXdp+uskVahraY2UK/Jk= + + hash2 + + ViwpXSuoKoiEUwMpetyre+mlEz0+JE8UURyNSgBuylM= + + + + rules + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^version.plist$ + + + rules2 + + .*\.dSYM($|/) + + weight + 11 + + ^(.*/)?\.DS_Store$ + + omit + + weight + 2000 + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^Info\.plist$ + + omit + + weight + 20 + + ^PkgInfo$ + + omit + + weight + 20 + + ^embedded\.provisionprofile$ + + weight + 20 + + ^version\.plist$ + + weight + 20 + + + + diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLLogHelper.xcframework/macos-arm64_x86_64/JLLogHelper.framework/Headers b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLLogHelper.xcframework/macos-arm64_x86_64/JLLogHelper.framework/Headers new file mode 120000 index 000000000..a177d2a6b --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLLogHelper.xcframework/macos-arm64_x86_64/JLLogHelper.framework/Headers @@ -0,0 +1 @@ +Versions/Current/Headers \ No newline at end of file diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLLogHelper.xcframework/macos-arm64_x86_64/JLLogHelper.framework/JLLogHelper b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLLogHelper.xcframework/macos-arm64_x86_64/JLLogHelper.framework/JLLogHelper new file mode 120000 index 000000000..c49bd284e --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLLogHelper.xcframework/macos-arm64_x86_64/JLLogHelper.framework/JLLogHelper @@ -0,0 +1 @@ +Versions/Current/JLLogHelper \ No newline at end of file diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLLogHelper.xcframework/macos-arm64_x86_64/JLLogHelper.framework/Modules b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLLogHelper.xcframework/macos-arm64_x86_64/JLLogHelper.framework/Modules new file mode 120000 index 000000000..5736f3186 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLLogHelper.xcframework/macos-arm64_x86_64/JLLogHelper.framework/Modules @@ -0,0 +1 @@ +Versions/Current/Modules \ No newline at end of file diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLLogHelper.xcframework/macos-arm64_x86_64/JLLogHelper.framework/Resources b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLLogHelper.xcframework/macos-arm64_x86_64/JLLogHelper.framework/Resources new file mode 120000 index 000000000..953ee36f3 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLLogHelper.xcframework/macos-arm64_x86_64/JLLogHelper.framework/Resources @@ -0,0 +1 @@ +Versions/Current/Resources \ No newline at end of file diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLLogHelper.xcframework/macos-arm64_x86_64/JLLogHelper.framework/Versions/A/Headers/JLLogHelper.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLLogHelper.xcframework/macos-arm64_x86_64/JLLogHelper.framework/Versions/A/Headers/JLLogHelper.h new file mode 100644 index 000000000..a681462cc --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLLogHelper.xcframework/macos-arm64_x86_64/JLLogHelper.framework/Versions/A/Headers/JLLogHelper.h @@ -0,0 +1,19 @@ +// +// JLLogHelper.h +// JLLogHelper +// +// Created by EzioChan on 2024/5/8. +// Copyright © 2024 www.zh-jieli.com. All rights reserved. +// + +#import + +//! Project version number for JLLogHelper. +FOUNDATION_EXPORT double JLLogHelperVersionNumber; + +//! Project version string for JLLogHelper. +FOUNDATION_EXPORT const unsigned char JLLogHelperVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + +#import diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLLogHelper.xcframework/macos-arm64_x86_64/JLLogHelper.framework/Versions/A/Headers/JLLogManager.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLLogHelper.xcframework/macos-arm64_x86_64/JLLogHelper.framework/Versions/A/Headers/JLLogManager.h new file mode 100644 index 000000000..8f16c2a12 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLLogHelper.xcframework/macos-arm64_x86_64/JLLogHelper.framework/Versions/A/Headers/JLLogManager.h @@ -0,0 +1,88 @@ +// +// JLLogManager.h +// JLLogHelper +// +// Created by EzioChan on 2024/5/8. +// Copyright © 2024 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +/// 打印宏 +#define kJLLog(level,fmt...) [JLLogManager logLevel:level funcName:__FUNCTION__ line:__LINE__ format:fmt] + +typedef NS_ENUM(NSInteger, JLLOG_LEVEL) { + JLLOG_COMPLETE = 0, + JLLOG_DEBUG = 1, + JLLOG_INFO = 2, + JLLOG_WARN = 3, + JLLOG_ERROR = 4, +}; + +/// 日志打印 +@interface JLLogManager : NSObject + +/// 打印SDK版本 ++(void)sdkVersion; + +///清理已存储的打印 ++(void)clearLog; + +/** + * 打印文本 + */ ++(void)openLogTextFile; + +///重定向保存日志文件路径设置 +/// @param path 路径 ++(void)redirectLogPath:(NSString *)path; + +/// 收集日志回调接口 +/// @param block 回调 ++(void)collectLog:(void(^)(NSString *log))block; + +/// 打印时间 +/// @param isTimeStamp 是否打印 default is false ++(void)logWithTimestamp:(BOOL)isTimeStamp; + +/// 把日志保存存储起来 +/// @param isSave 是否保存 default is yes ++(void)saveLogAsFile:(BOOL)isSave; + +///LOG使能与等级,默认开启且debug等级。 +/// @param enable LOG使能 +/// @param isMore 是否打印【函数名&行号】 +/// @param level LOG等级 ++(void)setLog:(BOOL)enable IsMore:(BOOL)isMore Level:(JLLOG_LEVEL)level; + +/// 打印函数 +/// @param level LOG等级 +/// @param func 函数名 +/// @param line 行号 +/// @param format 内容 ++(void)logLevel:(JLLOG_LEVEL)level funcName:(const char* _Nullable)func line:(const int)line format:(NSString * _Nonnull)format,...; + +/// 打印 +/// @param something 任意字符串内容 ++(void)logSomething:(NSString *)something; + +/// 打印对象 +/// @param object 任意对象 ++(void)logObject:(id)object; + + + +/// 打印 +/// @param level LOG等级 +/// @param content 内容 ++(void)logLevel:(JLLOG_LEVEL)level content:(NSString *)content; + +/// 保存日志信息到文件中 +/// @param logContent 日志内容 ++(void)saveLog:(NSString *)logContent; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLLogHelper.xcframework/macos-arm64_x86_64/JLLogHelper.framework/Versions/A/JLLogHelper b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLLogHelper.xcframework/macos-arm64_x86_64/JLLogHelper.framework/Versions/A/JLLogHelper new file mode 100755 index 000000000..fe6317d02 Binary files /dev/null and b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLLogHelper.xcframework/macos-arm64_x86_64/JLLogHelper.framework/Versions/A/JLLogHelper differ diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLLogHelper.xcframework/macos-arm64_x86_64/JLLogHelper.framework/Versions/A/Modules/module.modulemap b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLLogHelper.xcframework/macos-arm64_x86_64/JLLogHelper.framework/Versions/A/Modules/module.modulemap new file mode 100644 index 000000000..21384c4ed --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLLogHelper.xcframework/macos-arm64_x86_64/JLLogHelper.framework/Versions/A/Modules/module.modulemap @@ -0,0 +1,6 @@ +framework module JLLogHelper { + umbrella header "JLLogHelper.h" + export * + + module * { export * } +} diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLLogHelper.xcframework/macos-arm64_x86_64/JLLogHelper.framework/Versions/A/Resources/Info.plist b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLLogHelper.xcframework/macos-arm64_x86_64/JLLogHelper.framework/Versions/A/Resources/Info.plist new file mode 100644 index 000000000..2641e5283 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLLogHelper.xcframework/macos-arm64_x86_64/JLLogHelper.framework/Versions/A/Resources/Info.plist @@ -0,0 +1,48 @@ + + + + + BuildMachineOSBuild + 25B78 + CFBundleDevelopmentRegion + en + CFBundleExecutable + JLLogHelper + CFBundleIdentifier + com.zh-jieli.JLLogHelper + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + JLLogHelper + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.2 + CFBundleSupportedPlatforms + + MacOSX + + CFBundleVersion + 1 + DTCompiler + com.apple.compilers.llvm.clang.1_0 + DTPlatformBuild + 25C57 + DTPlatformName + macosx + DTPlatformVersion + 26.2 + DTSDKBuild + 25C57 + DTSDKName + macosx26.2 + DTXcode + 2620 + DTXcodeBuild + 17C52 + LSMinimumSystemVersion + 26.2 + NSHumanReadableCopyright + Copyright © 2024 www.zh-jieli.com. All rights reserved. + + diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLLogHelper.xcframework/macos-arm64_x86_64/JLLogHelper.framework/Versions/Current b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLLogHelper.xcframework/macos-arm64_x86_64/JLLogHelper.framework/Versions/Current new file mode 120000 index 000000000..8c7e5a667 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLLogHelper.xcframework/macos-arm64_x86_64/JLLogHelper.framework/Versions/Current @@ -0,0 +1 @@ +A \ No newline at end of file diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLPackageResKit.xcframework/Info.plist b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLPackageResKit.xcframework/Info.plist new file mode 100644 index 000000000..6a1da49d2 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLPackageResKit.xcframework/Info.plist @@ -0,0 +1,44 @@ + + + + + AvailableLibraries + + + BinaryPath + JLPackageResKit.framework/JLPackageResKit + LibraryIdentifier + ios-arm64 + LibraryPath + JLPackageResKit.framework + SupportedArchitectures + + arm64 + + SupportedPlatform + ios + + + BinaryPath + JLPackageResKit.framework/JLPackageResKit + LibraryIdentifier + ios-arm64_x86_64-simulator + LibraryPath + JLPackageResKit.framework + SupportedArchitectures + + arm64 + x86_64 + + SupportedPlatform + ios + SupportedPlatformVariant + simulator + + + CFBundlePackageType + XFWK + XCFrameworkFormatVersion + 1.0 + + diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLPackageResKit.xcframework/ios-arm64/JLPackageResKit.framework/Headers/JLPackageResKit.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLPackageResKit.xcframework/ios-arm64/JLPackageResKit.framework/Headers/JLPackageResKit.h new file mode 100644 index 000000000..b414dcf73 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLPackageResKit.xcframework/ios-arm64/JLPackageResKit.framework/Headers/JLPackageResKit.h @@ -0,0 +1,23 @@ +// +// JLPackageResKit.h +// JLPackageResKit +// +// Created by EzioChan on 2025/4/28. +// Copyright © 2025 www.zh-jieli.com. All rights reserved. +// + +#import + +//! Project version number for JLPackageResKit. +FOUNDATION_EXPORT double JLPackageResKitVersionNumber; + +//! Project version string for JLPackageResKit. +FOUNDATION_EXPORT const unsigned char JLPackageResKitVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import +#import +#import +#import +#import +#import + diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLPackageResKit.xcframework/ios-arm64/JLPackageResKit.framework/Headers/JLPackageSourceMgr.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLPackageResKit.xcframework/ios-arm64/JLPackageResKit.framework/Headers/JLPackageSourceMgr.h new file mode 100644 index 000000000..3405e1d47 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLPackageResKit.xcframework/ios-arm64/JLPackageResKit.framework/Headers/JLPackageSourceMgr.h @@ -0,0 +1,34 @@ +// +// JLPackageSourceMgr.h +// JLPackageResKit +// +// Created by EzioChan on 2025/4/28. +// Copyright © 2025 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +/// 信息 +@interface JLPackageBaseInfo : NSObject + +/// 文件内容 +@property(nonatomic,strong)NSData *contentData; + +/// 文件名称 +@property(nonatomic,strong)NSString *fileName; + +@end + +/// 资源打包类 +@interface JLPackageSourceMgr : NSObject + +/// 打包多个文件成 xxx.package 数据 +/// - Parameters: +/// - infos: 文件信息 ++(NSData *)makePks:(NSArray*)infos; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLPackageResKit.xcframework/ios-arm64/JLPackageResKit.framework/Headers/JLPcmToWts.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLPackageResKit.xcframework/ios-arm64/JLPackageResKit.framework/Headers/JLPcmToWts.h new file mode 100644 index 000000000..1e1ba31e8 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLPackageResKit.xcframework/ios-arm64/JLPackageResKit.framework/Headers/JLPcmToWts.h @@ -0,0 +1,34 @@ +// +// JLPcmToWts.h +// JLWtsToCfgLib +// +// Created by EzioChan on 2024/1/18. +// Copyright © 2024 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +typedef void(^wtsResultBlock)(BOOL isSuccess,NSData *_Nullable wtsData,NSString *filePath); + +/// PCM 转换 WTS +@interface JLPcmToWts : NSObject + +/// 单例 ++(instancetype)share; + +/// PCM 文件编码 WTS 文件 +/// - Parameters: +/// - speechInFileName: PCM 文件路径 +/// - bitOutFileName: WTS 文件路径 +/// - targetRate: wts 文件的目标码率 +/// - sr_in: pcm 文件的采样率 +/// - vadthr: vad 阈值 +/// - usesavemodef: 0:位流优先 1:质量优先 +/// - block: 数据回调 +-(void)pcmToWts:(NSString *)speechInFileName bitOutFileName:(NSString *)bitOutFileName targetRate:(int)targetRate sr_in:(int)sr_in vadthr:(float)vadthr usesavemodef:(int)usesavemodef Result:(wtsResultBlock)block; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLPackageResKit.xcframework/ios-arm64/JLPackageResKit.framework/Headers/JLToneCfgModel.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLPackageResKit.xcframework/ios-arm64/JLPackageResKit.framework/Headers/JLToneCfgModel.h new file mode 100644 index 000000000..63569672d --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLPackageResKit.xcframework/ios-arm64/JLPackageResKit.framework/Headers/JLToneCfgModel.h @@ -0,0 +1,23 @@ +// +// JLToneCfgModel.h +// JLWtsToCfgLib +// +// Created by EzioChan on 2024/1/22. +// Copyright © 2024 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface JLToneCfgModel : NSObject + +/// 提示音文件名称 +@property(nonatomic, copy) NSString *fileName; + +/// 提示音文件内容 +@property(nonatomic, copy) NSData *data; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLPackageResKit.xcframework/ios-arm64/JLPackageResKit.framework/Headers/JLVoicePackageManager.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLPackageResKit.xcframework/ios-arm64/JLPackageResKit.framework/Headers/JLVoicePackageManager.h new file mode 100644 index 000000000..4bac0482a --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLPackageResKit.xcframework/ios-arm64/JLPackageResKit.framework/Headers/JLVoicePackageManager.h @@ -0,0 +1,36 @@ +// +// JLVoicePackageManager.h +// JL_BLEKit +// +// Created by EzioChan on 2024/1/16. +// Copyright © 2024 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN +@class JLToneCfgModel; +@class JLVoiceReplaceInfo; + + + +/// 提示音替换类 +@interface JLVoicePackageManager : NSObject + +/// 打包多个 .wts 文件成 tone.cfg 数据 +/// - Parameters: +/// - paths: 文件存放路径 +/// - names: 文件在设备端使用时的名称 +/// - info: 设备限制的信息 ++(NSData *)makePks:(NSArray *)paths FileNames:(NSArray *)names Info:(JLVoiceReplaceInfo*)info; + +/// 解包 tone.cfg 数据 +/// - Parameter data: tone.cfg 数据 ++(NSArray *)parsePks:(NSData *)data; + +/// 当前 SDK 版本 ++(NSString *)getVersion; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLPackageResKit.xcframework/ios-arm64/JLPackageResKit.framework/Headers/JLVoiceReplaceInfo.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLPackageResKit.xcframework/ios-arm64/JLPackageResKit.framework/Headers/JLVoiceReplaceInfo.h new file mode 100644 index 000000000..7866a9bcf --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLPackageResKit.xcframework/ios-arm64/JLPackageResKit.framework/Headers/JLVoiceReplaceInfo.h @@ -0,0 +1,54 @@ +// +// JLVoiceReplaceInfo.h +// JLWtsToCfgLib +// +// Created by EzioChan on 2024/1/23. +// Copyright © 2024 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +/// 提示音频信息 +@interface JLTipsVoiceInfo : NSObject + +/// 索引号 +@property(nonatomic,assign)uint8_t index; + +/// 偏移地址 +@property(nonatomic,assign)uint32_t offset; + +/// 文件大小 +@property(nonatomic,assign)uint32_t length; + +/// 文件名称 +@property(nonatomic,strong)NSString *fileName; + +/// 昵称名称 +@property(nonatomic,strong)NSString *nickName; +@end + +/// 提示音信息 +@interface JLVoiceReplaceInfo : NSObject + +/// 版本 +@property(nonatomic,assign)uint8_t version; + +/// 预留区域 +@property(nonatomic,assign)uint32_t blockSize; + +/// 最大音频数目 +@property(nonatomic,assign)uint8_t maxNum; + +/// 文件名称 +@property(nonatomic,strong)NSString *fileName; + +/// 文件列表细节 +@property(nonatomic,strong)NSArray *infoArray; + +-(instancetype)init:(NSData *)data; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/ota/ios/Frameworks/JL_AdvParse.framework/Info.plist b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLPackageResKit.xcframework/ios-arm64/JLPackageResKit.framework/Info.plist similarity index 51% rename from local_plugins/ota/ios/Frameworks/JL_AdvParse.framework/Info.plist rename to local_plugins/device_jieli/ios/device_jieli/Frameworks/JLPackageResKit.xcframework/ios-arm64/JLPackageResKit.framework/Info.plist index 178219d35..63c31bd3c 100644 Binary files a/local_plugins/ota/ios/Frameworks/JL_AdvParse.framework/Info.plist and b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLPackageResKit.xcframework/ios-arm64/JLPackageResKit.framework/Info.plist differ diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLPackageResKit.xcframework/ios-arm64/JLPackageResKit.framework/JLPackageResKit b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLPackageResKit.xcframework/ios-arm64/JLPackageResKit.framework/JLPackageResKit new file mode 100755 index 000000000..0116faefb Binary files /dev/null and b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLPackageResKit.xcframework/ios-arm64/JLPackageResKit.framework/JLPackageResKit differ diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLPackageResKit.xcframework/ios-arm64/JLPackageResKit.framework/Modules/module.modulemap b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLPackageResKit.xcframework/ios-arm64/JLPackageResKit.framework/Modules/module.modulemap new file mode 100644 index 000000000..ce93f978e --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLPackageResKit.xcframework/ios-arm64/JLPackageResKit.framework/Modules/module.modulemap @@ -0,0 +1,6 @@ +framework module JLPackageResKit { + umbrella header "JLPackageResKit.h" + export * + + module * { export * } +} diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLPackageResKit.xcframework/ios-arm64_x86_64-simulator/JLPackageResKit.framework/Headers/JLPackageResKit.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLPackageResKit.xcframework/ios-arm64_x86_64-simulator/JLPackageResKit.framework/Headers/JLPackageResKit.h new file mode 100644 index 000000000..b414dcf73 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLPackageResKit.xcframework/ios-arm64_x86_64-simulator/JLPackageResKit.framework/Headers/JLPackageResKit.h @@ -0,0 +1,23 @@ +// +// JLPackageResKit.h +// JLPackageResKit +// +// Created by EzioChan on 2025/4/28. +// Copyright © 2025 www.zh-jieli.com. All rights reserved. +// + +#import + +//! Project version number for JLPackageResKit. +FOUNDATION_EXPORT double JLPackageResKitVersionNumber; + +//! Project version string for JLPackageResKit. +FOUNDATION_EXPORT const unsigned char JLPackageResKitVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import +#import +#import +#import +#import +#import + diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLPackageResKit.xcframework/ios-arm64_x86_64-simulator/JLPackageResKit.framework/Headers/JLPackageSourceMgr.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLPackageResKit.xcframework/ios-arm64_x86_64-simulator/JLPackageResKit.framework/Headers/JLPackageSourceMgr.h new file mode 100644 index 000000000..3405e1d47 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLPackageResKit.xcframework/ios-arm64_x86_64-simulator/JLPackageResKit.framework/Headers/JLPackageSourceMgr.h @@ -0,0 +1,34 @@ +// +// JLPackageSourceMgr.h +// JLPackageResKit +// +// Created by EzioChan on 2025/4/28. +// Copyright © 2025 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +/// 信息 +@interface JLPackageBaseInfo : NSObject + +/// 文件内容 +@property(nonatomic,strong)NSData *contentData; + +/// 文件名称 +@property(nonatomic,strong)NSString *fileName; + +@end + +/// 资源打包类 +@interface JLPackageSourceMgr : NSObject + +/// 打包多个文件成 xxx.package 数据 +/// - Parameters: +/// - infos: 文件信息 ++(NSData *)makePks:(NSArray*)infos; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLPackageResKit.xcframework/ios-arm64_x86_64-simulator/JLPackageResKit.framework/Headers/JLPcmToWts.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLPackageResKit.xcframework/ios-arm64_x86_64-simulator/JLPackageResKit.framework/Headers/JLPcmToWts.h new file mode 100644 index 000000000..1e1ba31e8 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLPackageResKit.xcframework/ios-arm64_x86_64-simulator/JLPackageResKit.framework/Headers/JLPcmToWts.h @@ -0,0 +1,34 @@ +// +// JLPcmToWts.h +// JLWtsToCfgLib +// +// Created by EzioChan on 2024/1/18. +// Copyright © 2024 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +typedef void(^wtsResultBlock)(BOOL isSuccess,NSData *_Nullable wtsData,NSString *filePath); + +/// PCM 转换 WTS +@interface JLPcmToWts : NSObject + +/// 单例 ++(instancetype)share; + +/// PCM 文件编码 WTS 文件 +/// - Parameters: +/// - speechInFileName: PCM 文件路径 +/// - bitOutFileName: WTS 文件路径 +/// - targetRate: wts 文件的目标码率 +/// - sr_in: pcm 文件的采样率 +/// - vadthr: vad 阈值 +/// - usesavemodef: 0:位流优先 1:质量优先 +/// - block: 数据回调 +-(void)pcmToWts:(NSString *)speechInFileName bitOutFileName:(NSString *)bitOutFileName targetRate:(int)targetRate sr_in:(int)sr_in vadthr:(float)vadthr usesavemodef:(int)usesavemodef Result:(wtsResultBlock)block; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLPackageResKit.xcframework/ios-arm64_x86_64-simulator/JLPackageResKit.framework/Headers/JLToneCfgModel.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLPackageResKit.xcframework/ios-arm64_x86_64-simulator/JLPackageResKit.framework/Headers/JLToneCfgModel.h new file mode 100644 index 000000000..63569672d --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLPackageResKit.xcframework/ios-arm64_x86_64-simulator/JLPackageResKit.framework/Headers/JLToneCfgModel.h @@ -0,0 +1,23 @@ +// +// JLToneCfgModel.h +// JLWtsToCfgLib +// +// Created by EzioChan on 2024/1/22. +// Copyright © 2024 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface JLToneCfgModel : NSObject + +/// 提示音文件名称 +@property(nonatomic, copy) NSString *fileName; + +/// 提示音文件内容 +@property(nonatomic, copy) NSData *data; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLPackageResKit.xcframework/ios-arm64_x86_64-simulator/JLPackageResKit.framework/Headers/JLVoicePackageManager.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLPackageResKit.xcframework/ios-arm64_x86_64-simulator/JLPackageResKit.framework/Headers/JLVoicePackageManager.h new file mode 100644 index 000000000..4bac0482a --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLPackageResKit.xcframework/ios-arm64_x86_64-simulator/JLPackageResKit.framework/Headers/JLVoicePackageManager.h @@ -0,0 +1,36 @@ +// +// JLVoicePackageManager.h +// JL_BLEKit +// +// Created by EzioChan on 2024/1/16. +// Copyright © 2024 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN +@class JLToneCfgModel; +@class JLVoiceReplaceInfo; + + + +/// 提示音替换类 +@interface JLVoicePackageManager : NSObject + +/// 打包多个 .wts 文件成 tone.cfg 数据 +/// - Parameters: +/// - paths: 文件存放路径 +/// - names: 文件在设备端使用时的名称 +/// - info: 设备限制的信息 ++(NSData *)makePks:(NSArray *)paths FileNames:(NSArray *)names Info:(JLVoiceReplaceInfo*)info; + +/// 解包 tone.cfg 数据 +/// - Parameter data: tone.cfg 数据 ++(NSArray *)parsePks:(NSData *)data; + +/// 当前 SDK 版本 ++(NSString *)getVersion; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLPackageResKit.xcframework/ios-arm64_x86_64-simulator/JLPackageResKit.framework/Headers/JLVoiceReplaceInfo.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLPackageResKit.xcframework/ios-arm64_x86_64-simulator/JLPackageResKit.framework/Headers/JLVoiceReplaceInfo.h new file mode 100644 index 000000000..7866a9bcf --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLPackageResKit.xcframework/ios-arm64_x86_64-simulator/JLPackageResKit.framework/Headers/JLVoiceReplaceInfo.h @@ -0,0 +1,54 @@ +// +// JLVoiceReplaceInfo.h +// JLWtsToCfgLib +// +// Created by EzioChan on 2024/1/23. +// Copyright © 2024 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +/// 提示音频信息 +@interface JLTipsVoiceInfo : NSObject + +/// 索引号 +@property(nonatomic,assign)uint8_t index; + +/// 偏移地址 +@property(nonatomic,assign)uint32_t offset; + +/// 文件大小 +@property(nonatomic,assign)uint32_t length; + +/// 文件名称 +@property(nonatomic,strong)NSString *fileName; + +/// 昵称名称 +@property(nonatomic,strong)NSString *nickName; +@end + +/// 提示音信息 +@interface JLVoiceReplaceInfo : NSObject + +/// 版本 +@property(nonatomic,assign)uint8_t version; + +/// 预留区域 +@property(nonatomic,assign)uint32_t blockSize; + +/// 最大音频数目 +@property(nonatomic,assign)uint8_t maxNum; + +/// 文件名称 +@property(nonatomic,strong)NSString *fileName; + +/// 文件列表细节 +@property(nonatomic,strong)NSArray *infoArray; + +-(instancetype)init:(NSData *)data; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLPackageResKit.xcframework/ios-arm64_x86_64-simulator/JLPackageResKit.framework/Info.plist b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLPackageResKit.xcframework/ios-arm64_x86_64-simulator/JLPackageResKit.framework/Info.plist new file mode 100644 index 000000000..e72e0f50b Binary files /dev/null and b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLPackageResKit.xcframework/ios-arm64_x86_64-simulator/JLPackageResKit.framework/Info.plist differ diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLPackageResKit.xcframework/ios-arm64_x86_64-simulator/JLPackageResKit.framework/JLPackageResKit b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLPackageResKit.xcframework/ios-arm64_x86_64-simulator/JLPackageResKit.framework/JLPackageResKit new file mode 100755 index 000000000..d01bc546f Binary files /dev/null and b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLPackageResKit.xcframework/ios-arm64_x86_64-simulator/JLPackageResKit.framework/JLPackageResKit differ diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLPackageResKit.xcframework/ios-arm64_x86_64-simulator/JLPackageResKit.framework/Modules/module.modulemap b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLPackageResKit.xcframework/ios-arm64_x86_64-simulator/JLPackageResKit.framework/Modules/module.modulemap new file mode 100644 index 000000000..ce93f978e --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLPackageResKit.xcframework/ios-arm64_x86_64-simulator/JLPackageResKit.framework/Modules/module.modulemap @@ -0,0 +1,6 @@ +framework module JLPackageResKit { + umbrella header "JLPackageResKit.h" + export * + + module * { export * } +} diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLPackageResKit.xcframework/ios-arm64_x86_64-simulator/JLPackageResKit.framework/_CodeSignature/CodeResources b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLPackageResKit.xcframework/ios-arm64_x86_64-simulator/JLPackageResKit.framework/_CodeSignature/CodeResources new file mode 100644 index 000000000..c9aa7c031 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JLPackageResKit.xcframework/ios-arm64_x86_64-simulator/JLPackageResKit.framework/_CodeSignature/CodeResources @@ -0,0 +1,207 @@ + + + + + files + + Headers/JLPackageResKit.h + + Zn+ogIz2zOnYs97Pie6cIg0gX5s= + + Headers/JLPackageSourceMgr.h + + olIJ5vwreBtqSMoN5b4a4RRcUyI= + + Headers/JLPcmToWts.h + + sLvB3Fo/zOnvwkFlAIBmE93XWg4= + + Headers/JLToneCfgModel.h + + K6S94ANWmClkwIx8dpcsqPIQlD4= + + Headers/JLVoicePackageManager.h + + ZtAJcNPi5eVQpZEHCfwjVLot738= + + Headers/JLVoiceReplaceInfo.h + + 1emvE9YE7Ia6O/z3mnV5RZ6UpI8= + + Info.plist + + yXrlu2gHIrhBkMciWNVOUwLLmlU= + + Modules/module.modulemap + + TrKfgSNU2x6QJTo3He1Horza5No= + + + files2 + + Headers/JLPackageResKit.h + + hash + + Zn+ogIz2zOnYs97Pie6cIg0gX5s= + + hash2 + + f8vCb+BR9ICqRELJes+w7AW/6Jh1sjjQI7rIQALdStE= + + + Headers/JLPackageSourceMgr.h + + hash + + olIJ5vwreBtqSMoN5b4a4RRcUyI= + + hash2 + + fsZVvqbG86eqRGOnIE/0ZmZuDQ70TY4mirIQQkhBKuI= + + + Headers/JLPcmToWts.h + + hash + + sLvB3Fo/zOnvwkFlAIBmE93XWg4= + + hash2 + + GFVQ2EhEki3UZiQ+QUO76lInl9a68ww/0vB9KG6WIgI= + + + Headers/JLToneCfgModel.h + + hash + + K6S94ANWmClkwIx8dpcsqPIQlD4= + + hash2 + + D7E+i4SccjZT20HMTBlAl9/w9WXKQRUEJ6nF/bj+ve4= + + + Headers/JLVoicePackageManager.h + + hash + + ZtAJcNPi5eVQpZEHCfwjVLot738= + + hash2 + + asbhQigHJseKba2YZMOVUzmQHLdFkaTqUyqBZw0uyU0= + + + Headers/JLVoiceReplaceInfo.h + + hash + + 1emvE9YE7Ia6O/z3mnV5RZ6UpI8= + + hash2 + + /Fs5x+A6tm3gTNBeg/uBESk8MmF9u3OSLfui/uZLc0E= + + + Modules/module.modulemap + + hash + + TrKfgSNU2x6QJTo3He1Horza5No= + + hash2 + + 4PLXenv/w9G5pReCdRzQ2n5+LDT59uMegJDgTHA/c/Q= + + + + rules + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^version.plist$ + + + rules2 + + .*\.dSYM($|/) + + weight + 11 + + ^(.*/)?\.DS_Store$ + + omit + + weight + 2000 + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^Info\.plist$ + + omit + + weight + 20 + + ^PkgInfo$ + + omit + + weight + 20 + + ^embedded\.provisionprofile$ + + weight + 20 + + ^version\.plist$ + + weight + 20 + + + + diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_AdvParse.xcframework/Info.plist b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_AdvParse.xcframework/Info.plist new file mode 100644 index 000000000..4fcd4233a --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_AdvParse.xcframework/Info.plist @@ -0,0 +1,44 @@ + + + + + AvailableLibraries + + + BinaryPath + JL_AdvParse.framework/JL_AdvParse + LibraryIdentifier + ios-arm64_x86_64-simulator + LibraryPath + JL_AdvParse.framework + SupportedArchitectures + + arm64 + x86_64 + + SupportedPlatform + ios + SupportedPlatformVariant + simulator + + + BinaryPath + JL_AdvParse.framework/JL_AdvParse + LibraryIdentifier + ios-arm64 + LibraryPath + JL_AdvParse.framework + SupportedArchitectures + + arm64 + + SupportedPlatform + ios + + + CFBundlePackageType + XFWK + XCFrameworkFormatVersion + 1.0 + + diff --git a/local_plugins/ota/ios/Frameworks/JL_AdvParse.framework/Headers/JLAdvParse.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_AdvParse.xcframework/ios-arm64/JL_AdvParse.framework/Headers/JLAdvParse.h similarity index 90% rename from local_plugins/ota/ios/Frameworks/JL_AdvParse.framework/Headers/JLAdvParse.h rename to local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_AdvParse.xcframework/ios-arm64/JL_AdvParse.framework/Headers/JLAdvParse.h index 5293e9126..844238943 100644 --- a/local_plugins/ota/ios/Frameworks/JL_AdvParse.framework/Headers/JLAdvParse.h +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_AdvParse.xcframework/ios-arm64/JL_AdvParse.framework/Headers/JLAdvParse.h @@ -29,6 +29,7 @@ typedef NS_ENUM(NSInteger,JL_DeviceType) { JL_DeviceTypeHeadset = 3, //普通耳机类型 JL_DeviceTypeSoundCard = 4, //声卡类型 JL_DeviceTypeWatch = 5, //手表类型 + JL_DeviceTypeDongle = 6, //Dongle JL_DeviceTypeTradition = -1, //传统设备类型 }; @@ -44,6 +45,10 @@ typedef NS_ENUM(NSInteger,JL_DeviceType) { /// @param advertData 蓝牙广播字典 +(NSDictionary*)bluetoothAdvParse:(NSData *_Nullable)key AdvData:(NSDictionary*_Nonnull)advertData; +/// 解析蓝牙广播包 +/// @param advertData 蓝牙广播报字典 +/// @param rssi 蓝牙信号强度 ++(NSDictionary *)bluetoothAdvData:(NSDictionary *)advertData RSSI:(NSNumber *)rssi; #pragma mark - 回连广播包信息 /** diff --git a/local_plugins/ota/ios/Frameworks/JL_AdvParse.framework/Headers/JLChargingBoxAdv.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_AdvParse.xcframework/ios-arm64/JL_AdvParse.framework/Headers/JLChargingBoxAdv.h similarity index 100% rename from local_plugins/ota/ios/Frameworks/JL_AdvParse.framework/Headers/JLChargingBoxAdv.h rename to local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_AdvParse.xcframework/ios-arm64/JL_AdvParse.framework/Headers/JLChargingBoxAdv.h diff --git a/local_plugins/ota/ios/Frameworks/JL_AdvParse.framework/Headers/JLDevicesAdv.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_AdvParse.xcframework/ios-arm64/JL_AdvParse.framework/Headers/JLDevicesAdv.h similarity index 100% rename from local_plugins/ota/ios/Frameworks/JL_AdvParse.framework/Headers/JLDevicesAdv.h rename to local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_AdvParse.xcframework/ios-arm64/JL_AdvParse.framework/Headers/JLDevicesAdv.h diff --git a/local_plugins/ota/ios/Frameworks/JL_AdvParse.framework/Headers/JLEarphoneAdv.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_AdvParse.xcframework/ios-arm64/JL_AdvParse.framework/Headers/JLEarphoneAdv.h similarity index 100% rename from local_plugins/ota/ios/Frameworks/JL_AdvParse.framework/Headers/JLEarphoneAdv.h rename to local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_AdvParse.xcframework/ios-arm64/JL_AdvParse.framework/Headers/JLEarphoneAdv.h diff --git a/local_plugins/ota/ios/Frameworks/JL_AdvParse.framework/Headers/JLOtaAdv.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_AdvParse.xcframework/ios-arm64/JL_AdvParse.framework/Headers/JLOtaAdv.h similarity index 100% rename from local_plugins/ota/ios/Frameworks/JL_AdvParse.framework/Headers/JLOtaAdv.h rename to local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_AdvParse.xcframework/ios-arm64/JL_AdvParse.framework/Headers/JLOtaAdv.h diff --git a/local_plugins/ota/ios/Frameworks/JL_AdvParse.framework/Headers/JLSoundBoxAdv.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_AdvParse.xcframework/ios-arm64/JL_AdvParse.framework/Headers/JLSoundBoxAdv.h similarity index 100% rename from local_plugins/ota/ios/Frameworks/JL_AdvParse.framework/Headers/JLSoundBoxAdv.h rename to local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_AdvParse.xcframework/ios-arm64/JL_AdvParse.framework/Headers/JLSoundBoxAdv.h diff --git a/local_plugins/ota/ios/Frameworks/JL_AdvParse.framework/Headers/JLSoundCardAdv.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_AdvParse.xcframework/ios-arm64/JL_AdvParse.framework/Headers/JLSoundCardAdv.h similarity index 100% rename from local_plugins/ota/ios/Frameworks/JL_AdvParse.framework/Headers/JLSoundCardAdv.h rename to local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_AdvParse.xcframework/ios-arm64/JL_AdvParse.framework/Headers/JLSoundCardAdv.h diff --git a/local_plugins/ota/ios/Frameworks/JL_AdvParse.framework/Headers/JLTwsAdv.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_AdvParse.xcframework/ios-arm64/JL_AdvParse.framework/Headers/JLTwsAdv.h similarity index 72% rename from local_plugins/ota/ios/Frameworks/JL_AdvParse.framework/Headers/JLTwsAdv.h rename to local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_AdvParse.xcframework/ios-arm64/JL_AdvParse.framework/Headers/JLTwsAdv.h index ebe2eedd3..7137abdc1 100644 --- a/local_plugins/ota/ios/Frameworks/JL_AdvParse.framework/Headers/JLTwsAdv.h +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_AdvParse.xcframework/ios-arm64/JL_AdvParse.framework/Headers/JLTwsAdv.h @@ -58,6 +58,7 @@ NS_ASSUME_NONNULL_BEGIN /// 连接方式 /// 0x00 BLE 通迅 /// 0x01 SPP 通迅 +/// 0x02 GATT Over BR/EDR (V5/V6) @property(nonatomic, assign) uint8_t connectWay; /// 是否支持智能充电仓 @@ -65,6 +66,24 @@ NS_ASSUME_NONNULL_BEGIN //MARK: - Version 3 /// 左耳电量为挂脖耳机电量!!!,其他耳机电量使用 + +//MARK: - Version 4/5/6 扩展 +/// LeAudio连接状态值 +@property(nonatomic, assign) uint8_t leAudioStatus; +/// 是否支持LeAudio +@property(nonatomic, assign) BOOL supportLeAudio; +/// LeAudio是否已连接 +@property(nonatomic, assign) BOOL leAudioConnectedStatus; +/// RCSP是否使用LeAudio地址 +@property(nonatomic, assign) BOOL rcspUseLeAudioAddress; +/// 是否需要认证 +@property(nonatomic, assign) BOOL needAuth; +/// 协议版本号 +@property(nonatomic, assign) uint8_t protocolVersion; + +/// 设备数量 (V6) +@property(nonatomic, assign) uint8_t deviceQuantity; + @end NS_ASSUME_NONNULL_END diff --git a/local_plugins/ota/ios/Frameworks/JL_AdvParse.framework/Headers/JLWatchAdv.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_AdvParse.xcframework/ios-arm64/JL_AdvParse.framework/Headers/JLWatchAdv.h similarity index 100% rename from local_plugins/ota/ios/Frameworks/JL_AdvParse.framework/Headers/JLWatchAdv.h rename to local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_AdvParse.xcframework/ios-arm64/JL_AdvParse.framework/Headers/JLWatchAdv.h diff --git a/local_plugins/ota/ios/Frameworks/JL_AdvParse.framework/Headers/JL_AdvParse.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_AdvParse.xcframework/ios-arm64/JL_AdvParse.framework/Headers/JL_AdvParse.h similarity index 100% rename from local_plugins/ota/ios/Frameworks/JL_AdvParse.framework/Headers/JL_AdvParse.h rename to local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_AdvParse.xcframework/ios-arm64/JL_AdvParse.framework/Headers/JL_AdvParse.h diff --git a/local_plugins/ota/ios/Frameworks/JLLogHelper.framework/Info.plist b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_AdvParse.xcframework/ios-arm64/JL_AdvParse.framework/Info.plist similarity index 51% rename from local_plugins/ota/ios/Frameworks/JLLogHelper.framework/Info.plist rename to local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_AdvParse.xcframework/ios-arm64/JL_AdvParse.framework/Info.plist index 22f0b62eb..06d80536a 100644 Binary files a/local_plugins/ota/ios/Frameworks/JLLogHelper.framework/Info.plist and b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_AdvParse.xcframework/ios-arm64/JL_AdvParse.framework/Info.plist differ diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_AdvParse.xcframework/ios-arm64/JL_AdvParse.framework/JL_AdvParse b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_AdvParse.xcframework/ios-arm64/JL_AdvParse.framework/JL_AdvParse new file mode 100755 index 000000000..e05e588f5 Binary files /dev/null and b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_AdvParse.xcframework/ios-arm64/JL_AdvParse.framework/JL_AdvParse differ diff --git a/local_plugins/ota/ios/Frameworks/JL_AdvParse.framework/Modules/module.modulemap b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_AdvParse.xcframework/ios-arm64/JL_AdvParse.framework/Modules/module.modulemap similarity index 100% rename from local_plugins/ota/ios/Frameworks/JL_AdvParse.framework/Modules/module.modulemap rename to local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_AdvParse.xcframework/ios-arm64/JL_AdvParse.framework/Modules/module.modulemap diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_AdvParse.xcframework/ios-arm64_x86_64-simulator/JL_AdvParse.framework/Headers/JLAdvParse.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_AdvParse.xcframework/ios-arm64_x86_64-simulator/JL_AdvParse.framework/Headers/JLAdvParse.h new file mode 100644 index 000000000..844238943 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_AdvParse.xcframework/ios-arm64_x86_64-simulator/JL_AdvParse.framework/Headers/JLAdvParse.h @@ -0,0 +1,72 @@ +// +// JLAdvParse.h +// JL_AdvParse +// +// Created by EzioChan on 2023/1/31. +// Copyright © 2023 www.zh-jieli.com. All rights reserved. +// + +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +typedef NS_ENUM(UInt8,JL_AdvType) { + JL_AdvTypeSoundBox = 0, //音箱类型 + JL_AdvTypeChargingBin = 1, //充电仓类型 + JL_AdvTypeTWS = 2, //TWS耳机类型 + JL_AdvTypeHeadset = 3, //普通耳机类型 + JL_AdvTypeSoundCard = 4, //声卡类型 + JL_AdvTypeWatch = 5, //手表类型 + JL_AdvTypeTradition = 6, //传统设备类型 +}; + + +typedef NS_ENUM(NSInteger,JL_DeviceType) { + JL_DeviceTypeSoundBox = 0, //AI音箱类型 + JL_DeviceTypeChargingBin = 1, //充电仓类型 + JL_DeviceTypeTWS = 2, //TWS耳机类型 + JL_DeviceTypeHeadset = 3, //普通耳机类型 + JL_DeviceTypeSoundCard = 4, //声卡类型 + JL_DeviceTypeWatch = 5, //手表类型 + JL_DeviceTypeDongle = 6, //Dongle + JL_DeviceTypeTradition = -1, //传统设备类型 +}; + + +/// 广播包解析器 +@interface JLAdvParse : NSObject + +/// 打印当前SDK的版本 ++(void)sdkVersion; + +/// 解析设备广播包内容 +/// @param key 过滤码(只针对传统设备生效,默认填空即可) +/// @param advertData 蓝牙广播字典 ++(NSDictionary*)bluetoothAdvParse:(NSData *_Nullable)key AdvData:(NSDictionary*_Nonnull)advertData; + +/// 解析蓝牙广播包 +/// @param advertData 蓝牙广播报字典 +/// @param rssi 蓝牙信号强度 ++(NSDictionary *)bluetoothAdvData:(NSDictionary *)advertData RSSI:(NSNumber *)rssi; + +#pragma mark - 回连广播包信息 +/** + * 获取广播包kCBAdvDataManufacturerData里面 'JLOTA' 标识的蓝牙地址 + * @param kCBAdvDataManufacturerData 广播包 + */ ++ (NSString * _Nullable)otaBleMacAddressFromCBAdvDataManufacturerData:(NSData *)kCBAdvDataManufacturerData; + +/** + * 判断当前蓝牙地址是否等于广播包kCBAdvDataManufacturerData里面的蓝牙地址 + * @param otaBleMacAddress ota升级中设备的蓝牙地址 + * @param kCBAdvDataManufacturerData 广播包 + */ ++ (Boolean)otaBleMacAddress:(NSString *)otaBleMacAddress isEqualToCBAdvDataManufacturerData:(NSData *)kCBAdvDataManufacturerData; + + + + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_AdvParse.xcframework/ios-arm64_x86_64-simulator/JL_AdvParse.framework/Headers/JLChargingBoxAdv.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_AdvParse.xcframework/ios-arm64_x86_64-simulator/JL_AdvParse.framework/Headers/JLChargingBoxAdv.h new file mode 100644 index 000000000..27e16d177 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_AdvParse.xcframework/ios-arm64_x86_64-simulator/JL_AdvParse.framework/Headers/JLChargingBoxAdv.h @@ -0,0 +1,64 @@ +// +// JLChargingBoxAdv.h +// JL_AdvParse +// +// Created by EzioChan on 2023/12/12. +// Copyright © 2023 www.zh-jieli.com. All rights reserved. +// + +#import "JLDevicesAdv.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface JLChargingBoxAdv : JLDevicesAdv + +/// 经典蓝牙地址 +@property(nonatomic, strong) NSString *edrAddr; + +/// 是否已配对 +@property(nonatomic, assign) BOOL isParied; + +/// 是否已开盖 +@property(nonatomic, assign) BOOL isOpen; + +/// 耳机状态 +///0x00:不显示弹窗 +///0x01:经典蓝牙未连接 +///0x02:经典蓝牙已连接 +///0x03:设备正在回连 +///0x04:设备不可连接 (需要手动进入配对模式) +@property(nonatomic, assign) uint8_t status; + +/// 左耳电量 +@property(nonatomic, assign) uint8_t batteryLeft; + +/// 右耳电量 +@property(nonatomic, assign) uint8_t batteryRight; + +/// 充电仓电量 +@property(nonatomic, assign) uint8_t batteryBox; + +///左耳是否在充电中 +@property(nonatomic, assign) BOOL isChargingLeft; + +///右耳是否在充电中 +@property(nonatomic, assign) BOOL isChargingRight; + +///充电仓是否在充电中 +@property(nonatomic, assign) BOOL isChargingBox; + +/// seq +/// 用于区分是否同一次开机。每次开机或者断开连接后 增加1 +@property(nonatomic, assign) uint8_t seq; + +///模式 +/// 0x00:充电模式 +/// 0x01:发射模式 +@property(nonatomic, assign) uint8_t mode; + +/// 加密 Hash 校验值 +@property(nonatomic, copy) NSData *hashData; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_AdvParse.xcframework/ios-arm64_x86_64-simulator/JL_AdvParse.framework/Headers/JLDevicesAdv.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_AdvParse.xcframework/ios-arm64_x86_64-simulator/JL_AdvParse.framework/Headers/JLDevicesAdv.h new file mode 100644 index 000000000..432142d06 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_AdvParse.xcframework/ios-arm64_x86_64-simulator/JL_AdvParse.framework/Headers/JLDevicesAdv.h @@ -0,0 +1,54 @@ +// +// JLDevicesAdv.h +// JL_AdvParse +// +// Created by EzioChan on 2023/12/12. +// Copyright © 2023 www.zh-jieli.com. All rights reserved. +// + +#import +#import "JLAdvParse.h" + + +NS_ASSUME_NONNULL_BEGIN + +@interface JLDevicesAdv : NSObject + +/// 客户唯一标识 +@property(nonatomic,assign)uint16_t uid; + +/// 产品唯一标识 +@property(nonatomic,assign)uint16_t pid; + +/// 设备类型 +///JL_DeviceTypeSoundBox = 0, //AI音箱类型 +///JL_DeviceTypeChargingBin = 1, //充电仓类型 +///JL_DeviceTypeTWS = 2, //TWS耳机类型 +///JL_DeviceTypeHeadset = 3, //普通耳机类型 +///JL_DeviceTypeSoundCard = 4, //声卡类型 +///JL_DeviceTypeWatch = 5, //手表类型 +///JL_DeviceTypeTradition = -1, //传统设备类型 +@property(nonatomic,assign)JL_DeviceType type; + +/// 协议版本 +@property(nonatomic,assign)uint8_t version; + +/// 可变数据段 +@property(nonatomic,copy)NSData *variableData; + +- (instancetype)initWithData:(NSData *)data; + + +/// 转成model类型 +/// @param basicData 蓝牙广播数据 ++(JLDevicesAdv *__nullable)advertDataToModel:(NSData *)basicData; + +/// 转成model类型 +/// @param basicHexStr 蓝牙广播数据 ++(JLDevicesAdv *__nullable)advertDataHexStrToModel:(NSString *)basicHexStr; + +@end + + + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_AdvParse.xcframework/ios-arm64_x86_64-simulator/JL_AdvParse.framework/Headers/JLEarphoneAdv.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_AdvParse.xcframework/ios-arm64_x86_64-simulator/JL_AdvParse.framework/Headers/JLEarphoneAdv.h new file mode 100644 index 000000000..ab6475eb5 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_AdvParse.xcframework/ios-arm64_x86_64-simulator/JL_AdvParse.framework/Headers/JLEarphoneAdv.h @@ -0,0 +1,47 @@ +// +// JLEarphoneAdv.h +// JL_AdvParse +// +// Created by EzioChan on 2023/12/12. +// Copyright © 2023 www.zh-jieli.com. All rights reserved. +// + +#import "JLDevicesAdv.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface JLEarphoneAdv : JLDevicesAdv + +/// 左耳电量 +@property(nonatomic, assign) uint8_t batteryLeft; + +/// 右耳电量 +@property(nonatomic, assign) uint8_t batteryRight; + +///左耳是否在充电中 +@property(nonatomic, assign) BOOL isChargingLeft; + +///右耳是否在充电中 +@property(nonatomic, assign) BOOL isChargingRight; + +/// 是否已配对 +@property(nonatomic, assign) BOOL isParied; + +/// 是否主机 +@property(nonatomic, assign) BOOL isMaster; + +/// 是否允许连接 +@property(nonatomic, assign) BOOL enableConnect; + +/// 耳机状态 +///0x00:不显示弹窗 +///0x01:经典蓝牙未连接 +///0x02:经典蓝牙已连接 +///0x03:设备正在回连 +///0x04:设备不可连接 (需要手动进入配对模式) +@property(nonatomic, assign) uint8_t status; + + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_AdvParse.xcframework/ios-arm64_x86_64-simulator/JL_AdvParse.framework/Headers/JLOtaAdv.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_AdvParse.xcframework/ios-arm64_x86_64-simulator/JL_AdvParse.framework/Headers/JLOtaAdv.h new file mode 100644 index 000000000..da40339a7 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_AdvParse.xcframework/ios-arm64_x86_64-simulator/JL_AdvParse.framework/Headers/JLOtaAdv.h @@ -0,0 +1,25 @@ +// +// JLOtaAdv.h +// JL_AdvParse +// +// Created by EzioChan on 2023/12/12. +// Copyright © 2023 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface JLOtaAdv : JLDevicesAdv + +/// ble address before +@property(nonatomic,strong)NSString *BleAddrBefore; + +//MARK: - Version 1 +/// battery +@property(nonatomic,assign)uint8_t battery; + + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_AdvParse.xcframework/ios-arm64_x86_64-simulator/JL_AdvParse.framework/Headers/JLSoundBoxAdv.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_AdvParse.xcframework/ios-arm64_x86_64-simulator/JL_AdvParse.framework/Headers/JLSoundBoxAdv.h new file mode 100644 index 000000000..9ac104121 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_AdvParse.xcframework/ios-arm64_x86_64-simulator/JL_AdvParse.framework/Headers/JLSoundBoxAdv.h @@ -0,0 +1,19 @@ +// +// JLSoundBoxAdv.h +// JL_AdvParse +// +// Created by EzioChan on 2023/12/12. +// Copyright © 2023 www.zh-jieli.com. All rights reserved. +// + +#import "JLTwsAdv.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface JLSoundBoxAdv : JLTwsAdv + +@property(nonatomic,assign)uint8_t battery; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_AdvParse.xcframework/ios-arm64_x86_64-simulator/JL_AdvParse.framework/Headers/JLSoundCardAdv.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_AdvParse.xcframework/ios-arm64_x86_64-simulator/JL_AdvParse.framework/Headers/JLSoundCardAdv.h new file mode 100644 index 000000000..792c3b378 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_AdvParse.xcframework/ios-arm64_x86_64-simulator/JL_AdvParse.framework/Headers/JLSoundCardAdv.h @@ -0,0 +1,19 @@ +// +// JLSoundCardAdv.h +// JL_AdvParse +// +// Created by EzioChan on 2023/12/12. +// Copyright © 2023 www.zh-jieli.com. All rights reserved. +// + +#import "JLTwsAdv.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface JLSoundCardAdv : JLTwsAdv + +@property(nonatomic,assign)uint8_t battery; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_AdvParse.xcframework/ios-arm64_x86_64-simulator/JL_AdvParse.framework/Headers/JLTwsAdv.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_AdvParse.xcframework/ios-arm64_x86_64-simulator/JL_AdvParse.framework/Headers/JLTwsAdv.h new file mode 100644 index 000000000..7137abdc1 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_AdvParse.xcframework/ios-arm64_x86_64-simulator/JL_AdvParse.framework/Headers/JLTwsAdv.h @@ -0,0 +1,89 @@ +// +// JLTwsAdv.h +// JL_AdvParse +// +// Created by EzioChan on 2023/12/12. +// Copyright © 2023 www.zh-jieli.com. All rights reserved. +// + +#import "JLDevicesAdv.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface JLTwsAdv : JLDevicesAdv + +//MARK: - Version 0 + +/// 经典蓝牙地址 +@property(nonatomic, strong) NSString *edrAddr; + +/// 耳机状态 +///0x00:不显示弹窗 +///0x01:经典蓝牙未连接 +///0x02:经典蓝牙已连接 +///0x03:设备正在回连 +///0x04:设备不可连接 (需要手动进入配对模式) +@property(nonatomic, assign) uint8_t status; + +/// 左耳电量 +@property(nonatomic, assign) uint8_t batteryLeft; + +/// 右耳电量 +@property(nonatomic, assign) uint8_t batteryRight; + +/// 充电仓电量 +@property(nonatomic, assign) uint8_t batteryBox; + +///左耳是否在充电中 +@property(nonatomic, assign) BOOL isChargingLeft; + +///右耳是否在充电中 +@property(nonatomic, assign) BOOL isChargingRight; + +///充电仓是否在充电中 +@property(nonatomic, assign) BOOL isChargingBox; + +/// seq +/// 用于区分是否同一次开机。每次开机或者断开连接后 增加1 +@property(nonatomic, assign) uint8_t seq; + +/// 加密 Hash 校验值 +@property(nonatomic, copy) NSData *hashData; + +//MARK: - Version 1 +/// BLE连接属性(enableConnect) +@property(nonatomic, assign) BOOL bleEnable; + +//MARK: - Version 2 +/// 连接方式 +/// 0x00 BLE 通迅 +/// 0x01 SPP 通迅 +/// 0x02 GATT Over BR/EDR (V5/V6) +@property(nonatomic, assign) uint8_t connectWay; + +/// 是否支持智能充电仓 +@property(nonatomic, assign) BOOL isSupportChargBox; + +//MARK: - Version 3 +/// 左耳电量为挂脖耳机电量!!!,其他耳机电量使用 + +//MARK: - Version 4/5/6 扩展 +/// LeAudio连接状态值 +@property(nonatomic, assign) uint8_t leAudioStatus; +/// 是否支持LeAudio +@property(nonatomic, assign) BOOL supportLeAudio; +/// LeAudio是否已连接 +@property(nonatomic, assign) BOOL leAudioConnectedStatus; +/// RCSP是否使用LeAudio地址 +@property(nonatomic, assign) BOOL rcspUseLeAudioAddress; +/// 是否需要认证 +@property(nonatomic, assign) BOOL needAuth; +/// 协议版本号 +@property(nonatomic, assign) uint8_t protocolVersion; + +/// 设备数量 (V6) +@property(nonatomic, assign) uint8_t deviceQuantity; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_AdvParse.xcframework/ios-arm64_x86_64-simulator/JL_AdvParse.framework/Headers/JLWatchAdv.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_AdvParse.xcframework/ios-arm64_x86_64-simulator/JL_AdvParse.framework/Headers/JLWatchAdv.h new file mode 100644 index 000000000..696ad9284 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_AdvParse.xcframework/ios-arm64_x86_64-simulator/JL_AdvParse.framework/Headers/JLWatchAdv.h @@ -0,0 +1,35 @@ +// +// JLWatchAdv.h +// JL_AdvParse +// +// Created by EzioChan on 2023/12/12. +// Copyright © 2023 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface JLWatchAdv : JLDevicesAdv + +/// 经典蓝牙地址 +@property(nonatomic, strong) NSString *edrAddr; + +/// 连接方式 +/// 0x00 ble +/// 0x01 spp +@property(nonatomic, assign) int8_t connectWay; + + +/// 手表状态 +/// 0x00:经典蓝牙未连接 +/// 0x01:经典蓝牙已连接 0x02:设备正在回连 +/// 0x03:设备不可连接 (需要手动进入配对模式) +@property(nonatomic, assign) int8_t connectState; + +/// 是否需要先连上 ble +@property(nonatomic, assign) BOOL priorityConnection; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_AdvParse.xcframework/ios-arm64_x86_64-simulator/JL_AdvParse.framework/Headers/JL_AdvParse.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_AdvParse.xcframework/ios-arm64_x86_64-simulator/JL_AdvParse.framework/Headers/JL_AdvParse.h new file mode 100644 index 000000000..b599b7e9b --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_AdvParse.xcframework/ios-arm64_x86_64-simulator/JL_AdvParse.framework/Headers/JL_AdvParse.h @@ -0,0 +1,27 @@ +// +// JL_AdvParse.h +// JL_AdvParse +// +// Created by EzioChan on 2023/1/31. +// Copyright © 2023 www.zh-jieli.com. All rights reserved. +// + +#import + +//! Project version number for JL_AdvParse. +FOUNDATION_EXPORT double JL_AdvParseVersionNumber; + +//! Project version string for JL_AdvParse. +FOUNDATION_EXPORT const unsigned char JL_AdvParseVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import +#import +#import +#import +#import +#import +#import +#import +#import +#import + diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_AdvParse.xcframework/ios-arm64_x86_64-simulator/JL_AdvParse.framework/Info.plist b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_AdvParse.xcframework/ios-arm64_x86_64-simulator/JL_AdvParse.framework/Info.plist new file mode 100644 index 000000000..fbab0bff6 Binary files /dev/null and b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_AdvParse.xcframework/ios-arm64_x86_64-simulator/JL_AdvParse.framework/Info.plist differ diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_AdvParse.xcframework/ios-arm64_x86_64-simulator/JL_AdvParse.framework/JL_AdvParse b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_AdvParse.xcframework/ios-arm64_x86_64-simulator/JL_AdvParse.framework/JL_AdvParse new file mode 100755 index 000000000..fb68b813c Binary files /dev/null and b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_AdvParse.xcframework/ios-arm64_x86_64-simulator/JL_AdvParse.framework/JL_AdvParse differ diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_AdvParse.xcframework/ios-arm64_x86_64-simulator/JL_AdvParse.framework/Modules/module.modulemap b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_AdvParse.xcframework/ios-arm64_x86_64-simulator/JL_AdvParse.framework/Modules/module.modulemap new file mode 100644 index 000000000..c072084c5 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_AdvParse.xcframework/ios-arm64_x86_64-simulator/JL_AdvParse.framework/Modules/module.modulemap @@ -0,0 +1,6 @@ +framework module JL_AdvParse { + umbrella header "JL_AdvParse.h" + export * + + module * { export * } +} diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_AdvParse.xcframework/ios-arm64_x86_64-simulator/JL_AdvParse.framework/_CodeSignature/CodeResources b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_AdvParse.xcframework/ios-arm64_x86_64-simulator/JL_AdvParse.framework/_CodeSignature/CodeResources new file mode 100644 index 000000000..f3d7ac375 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_AdvParse.xcframework/ios-arm64_x86_64-simulator/JL_AdvParse.framework/_CodeSignature/CodeResources @@ -0,0 +1,267 @@ + + + + + files + + Headers/JLAdvParse.h + + 64SI1XBWnV1VmXIYu8XpmwMpE04= + + Headers/JLChargingBoxAdv.h + + dxEumtBFtKzehtXyVAacIJk/UU4= + + Headers/JLDevicesAdv.h + + WG6Ivw9lqj20J5OXda4lXMvAsig= + + Headers/JLEarphoneAdv.h + + fJODfMyuNuG59rHtw1StpNjde1A= + + Headers/JLOtaAdv.h + + 4Mj6y77mEbeHdo+4OgFL9yf+E0c= + + Headers/JLSoundBoxAdv.h + + 9psoYa5IuZ6p/X9FRRnLe5THJMQ= + + Headers/JLSoundCardAdv.h + + Q5T5xqjNDkTS+Niqp/KpoD9vipY= + + Headers/JLTwsAdv.h + + whLObetTxteRXS580FiZ1/A3Yzo= + + Headers/JLWatchAdv.h + + gK+FyDcSe6OVJK11wqqm1ppRE9k= + + Headers/JL_AdvParse.h + + gtcFkie1/FuAHO4WI/GUyN9chKY= + + Info.plist + + Yw+NwkpNMafTbGDLvF8mhT3Alh8= + + Modules/module.modulemap + + hBvb1e7FRkpwYoECUsVQBBscN38= + + + files2 + + Headers/JLAdvParse.h + + hash + + 64SI1XBWnV1VmXIYu8XpmwMpE04= + + hash2 + + ZG6RQ7l2Ko9IXNo517Aimfq7d03KANKIIPV09hZSFrg= + + + Headers/JLChargingBoxAdv.h + + hash + + dxEumtBFtKzehtXyVAacIJk/UU4= + + hash2 + + Bci4NCRbpGrT/YgMlRkA2DjX/lY/o8VmxkWPNtV+DjA= + + + Headers/JLDevicesAdv.h + + hash + + WG6Ivw9lqj20J5OXda4lXMvAsig= + + hash2 + + Mxf6qWhX6ctmSC0RVl7gdK4koCGeaUr8omEI9+9PMvc= + + + Headers/JLEarphoneAdv.h + + hash + + fJODfMyuNuG59rHtw1StpNjde1A= + + hash2 + + WThhDcnj1tcLW3Lrp2VUET7rXC/8iv9Y1dtAdPg0yWs= + + + Headers/JLOtaAdv.h + + hash + + 4Mj6y77mEbeHdo+4OgFL9yf+E0c= + + hash2 + + HuR8+O4ONYywZcporXuxlzO1xXOtZZqm/P9+s8yj+OI= + + + Headers/JLSoundBoxAdv.h + + hash + + 9psoYa5IuZ6p/X9FRRnLe5THJMQ= + + hash2 + + Iqjsp9NyRvmdlXu0gN7zltuwg75M+Kc9qFaTSHStolA= + + + Headers/JLSoundCardAdv.h + + hash + + Q5T5xqjNDkTS+Niqp/KpoD9vipY= + + hash2 + + WTBLq2+eyH5+TrY08Gh3/yReEWRnKg9UOCJmz56bnkE= + + + Headers/JLTwsAdv.h + + hash + + whLObetTxteRXS580FiZ1/A3Yzo= + + hash2 + + w6Ia/stHXZvCfmmPgTEpBj7A6haG6O+E0MeXH/fNKmA= + + + Headers/JLWatchAdv.h + + hash + + gK+FyDcSe6OVJK11wqqm1ppRE9k= + + hash2 + + 7iXBmticKJ52uKE+6RrHJt5ES0gq2Xan5WIG/w0sCyk= + + + Headers/JL_AdvParse.h + + hash + + gtcFkie1/FuAHO4WI/GUyN9chKY= + + hash2 + + t61emyM8slC+fTJM6XnBxjTDrpY7xvhUK5gCXfQf/3E= + + + Modules/module.modulemap + + hash + + hBvb1e7FRkpwYoECUsVQBBscN38= + + hash2 + + F65y3OGliGsHZpxzdTdQxUwgmJdHiihk1gvX6sJzhxA= + + + + rules + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^version.plist$ + + + rules2 + + .*\.dSYM($|/) + + weight + 11 + + ^(.*/)?\.DS_Store$ + + omit + + weight + 2000 + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^Info\.plist$ + + omit + + weight + 20 + + ^PkgInfo$ + + omit + + weight + 20 + + ^embedded\.provisionprofile$ + + weight + 20 + + ^version\.plist$ + + weight + 20 + + + + diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/Info.plist b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/Info.plist new file mode 100644 index 000000000..c49795494 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/Info.plist @@ -0,0 +1,44 @@ + + + + + AvailableLibraries + + + BinaryPath + JL_BLEKit.framework/JL_BLEKit + LibraryIdentifier + ios-arm64 + LibraryPath + JL_BLEKit.framework + SupportedArchitectures + + arm64 + + SupportedPlatform + ios + + + BinaryPath + JL_BLEKit.framework/JL_BLEKit + LibraryIdentifier + ios-arm64_x86_64-simulator + LibraryPath + JL_BLEKit.framework + SupportedArchitectures + + arm64 + x86_64 + + SupportedPlatform + ios + SupportedPlatformVariant + simulator + + + CFBundlePackageType + XFWK + XCFrameworkFormatVersion + 1.0 + + diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/ECBDTManager.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/ECBDTManager.h new file mode 100644 index 000000000..7dca27218 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/ECBDTManager.h @@ -0,0 +1,120 @@ +// +// ECBDTManager.h +// JL_BLEKit +// +// Created by EzioChan on 2023/11/20. +// Copyright © 2023 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@class JL_ManagerM; + +@protocol ECBDTManagerProtocol + +/// 大数据传输错误 +/// - Parameters: +/// - manager: 设备 +/// - type: 类型 +/// - error: 错误 +-(void)ecBDTManagerError:(JL_ManagerM *)manager Type:(uint8_t) type Error:(NSError *)error; + +/// 获取到设备端推送/ SDK 端读取的大数据内容 +/// - Parameters: +/// - manager: 设备 +/// - type: 类型 +/// - data: 数据块 +/// - progress: 进度 +-(void)ecBDTManager:(JL_ManagerM *)manager Type:(uint8_t) type GetBigData:(NSData *)data Progress:(float) progress; + +/// 获取到设备端推送/ SDK 端读取的大数据内容 结束 +/// - Parameters: +/// - manager: 设备 +/// - type: 类型 +/// - saveFilePath: 数据存放位置 +-(void)ecBDTManager:(JL_ManagerM *)manager Type:(uint8_t) type FinishBigData:(NSString *)saveFilePath; + + +@optional + +/// App 端主动发起的向写入数据进度 +/// - Parameters: +/// - manager: 设备 +/// - progress: 数据 +/// - finish: 是否完成 +-(void)ecBDTManager:(JL_ManagerM *)manager SendBigDataPresent:(float )progress Finish:(BOOL)finish; + +/// 设备端发起大数据写操作 +/// 设备端主动发起的向 App 端写入数据 +/// - Parameters: +/// - manager: 设备 +/// - type: 类型 +/// - req: 请求写入的内容 +-(void)ecBDTManager:(JL_ManagerM *)manager StartBigData:(ECBDTWriteReq *)req Type:(uint8_t) type; + + +/// 设备端发起大数据读取操作 +/// 开发者在这里需要对设备主动过来请求的内容进行回复 +/// -(void)responseDev:(JL_ManagerM *)manager resp:(ECBDTReadReq *)req Data:(NSData *)data +/// - Parameters: +/// - manager: 设备 +/// - type: 类型 +/// - req: 请求内容 +-(void)ecBDTManager:(JL_ManagerM *)manager ReadBigData:(ECBDTReadReq *)req Type:(uint8_t) type; + +/// 发送大数据完毕 +/// - Parameter manager: 设备 +/// - Parameter type: 类型 +-(void)ecBDTManagerSendFinish:(JL_ManagerM *)manager Type:(uint8_t) type; + +@end + +@interface ECBDTManager : ECOneToMorePtl + ++(instancetype)share; + +/// APP 读取设备数据 +/// - Parameters: +/// - manager: 设备 +/// - type: 数据类型 +/// * 0 :原始数据 +/// * 1 : 阿里云数据 +/// * 2:RTC数据 +/// * 3:AI云 +/// * 4:TTS语音合成 +/// * 5:平台接口认证信息 +/// * 6:esim 卡信息 +/// * 7:4G 模块升级数据 +/// * 8:提示音文件数据 +-(void)readData:(JL_ManagerM *)manager Type:(uint8_t)type; + +/// APP 写入设备数据 +/// - Parameters: +/// - manager: 设备 +/// - type: 数据类型 +/// * 0 :原始数据 +/// * 1 : 阿里云数据 +/// * 2:RTC数据 +/// * 3:AI云 +/// * 4:TTS语音合成 +/// * 5:平台接口认证信息 +/// * 6:esim 卡信息 +/// * 7:4G 模块升级数据 +/// * 8:提示音文件数据 +/// - data: 大数据内容 +-(void)writeData:(JL_ManagerM *)manager Type:(uint8_t) type Data:(NSData*)data; + +/// 回应设备主动读取内容 +/// 此方法需要配合使用 +/// -(void)ecBDTManager:(JL_ManagerM *)manager ReadBigData:(ECBDTReadReq *)req +/// - Parameters: +/// - manager: 设备 +/// - req: 设备端请求的对象 +/// - data: 需要下发的数据内容 +-(void)responseDev:(JL_ManagerM *)manager resp:(ECBDTReadReq *)req Data:(NSData *)data; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/ECBDTObjc.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/ECBDTObjc.h new file mode 100644 index 000000000..9416bee60 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/ECBDTObjc.h @@ -0,0 +1,166 @@ +// +// ECBDTObjc.h +// JL_BLEKit +// +// Created by EzioChan on 2023/11/21. +// Copyright © 2023 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface ECBDTObjc : NSObject + +@end + +/// 设备传输参数回复数据 +@interface ECBDTBasic : NSObject +/// 操作类型 +/// 0:设备传输参数 +/// 1:传输数据 +@property (nonatomic, assign) uint8_t op; + +/// 方式 +/// 0:读取数据 +/// 1:发送数据 +@property (nonatomic, assign) uint8_t way; + +/// 数据类型 +/// * 0 :原始数据 +/// * 1 : 阿里云数据 +/// * 2:RTC数据 +/// * 3:AI云 +/// * 4:TTS语音合成 +/// * 5:平台接口认证信息 +/// * 6:esim 卡信息 +/// * 7:4G 模块升级数据 +@property (nonatomic, assign) uint8_t type; + +/// 版本 +@property (nonatomic, assign) uint8_t version; + +/// 数据 +@property (nonatomic, copy)NSData *paramData; + +-(instancetype)initData:(NSData *)data; + +@end + + +//MARK: - 回复大数据数据解析(设备回复) + +/// 设备传输参数(读取回复) +@interface ECBDTReadResp : ECBDTBasic +/// 结果码 +@property (nonatomic, assign) uint8_t result; + +/// 数据长度 +@property (nonatomic, assign) uint32_t dtLen; + +/// 数据总 CRC +@property (nonatomic, assign) uint16_t crc; + +/// 发送 MTU 协商值 +@property (nonatomic, assign) uint16_t sendMtu; + +/// 接收 MTU 协商值 +@property (nonatomic, assign) uint16_t receiveMtu; + +@end + +/// 设备传输参数(发送回复) +@interface ECBDTWriteResp : ECBDTBasic +/// 结果码 +@property (nonatomic, assign) uint8_t result; + +/// 发送 MTU 协商值 +@property (nonatomic, assign) uint16_t sendMtu; + +/// 接收 MTU 协商值 +@property (nonatomic, assign) uint16_t receiveMtu; + +@end + +//MARK: - 请求大数据数据解析(设备请求) + +/// 设备传输参数(读取请求) +@interface ECBDTReadReq: ECBDTBasic + +/// 发送 MTU 协商值 +@property (nonatomic, assign) uint16_t sendMtu; + +/// 接收 MTU 协商值 +@property (nonatomic, assign) uint16_t receiveMtu; + +@end + + +/// 设备传输参数(发送请求) +@interface ECBDTWriteReq : ECBDTBasic + +/// 数据长度 +@property (nonatomic, assign) uint32_t dtLen; + +/// 数据总 CRC +@property (nonatomic, assign) uint16_t crc; + +/// 发送 MTU 协商值 +@property (nonatomic, assign) uint16_t sendMtu; + +/// 接收 MTU 协商值 +@property (nonatomic, assign) uint16_t receiveMtu; + +@end + + +//传输数据命令参数 +@interface ECBDTCmdData : NSObject +/// 数据类型 +/// * 0 :原始数据 +/// * 1 : 阿里云数据 +/// * 2:RTC数据 +/// * 3:AI云 +/// * 4:TTS语音合成 +/// * 5:平台接口认证信息 +/// * 6:esim 卡信息 +/// * 7:4G 模块升级数据 +@property (nonatomic, assign) uint8_t type; + + +/// 标识位 +/// YES:结束 +/// NO:继续 +@property (nonatomic, assign) BOOL isEnd; + +///序号 +@property (nonatomic, assign) uint32_t seq; + +/// crc +@property (nonatomic, assign) uint16_t crc; + +/// 数据偏移 +@property (nonatomic, assign) uint32_t offset; + +/// 数据长度 +@property (nonatomic, assign) uint16_t len; + +/// 数据 +@property (nonatomic, copy)NSData *data; + + +-(instancetype)initData:(NSData *)data; + +-(NSData *)beData; + +/// 切块分包数据 +/// - Parameters: +/// - mtu: 发送的 mtu +/// - type: 数据类型 +/// - dt: 文件数据 ++(NSArray*)makeWithMtu:(uint16_t)mtu Type:(uint8_t) type Data:(NSData *)dt; + +@end + + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/ota/ios/Classes/BleManager/HandleBroadcastPtl.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/ECOneToMorePtl.h similarity index 51% rename from local_plugins/ota/ios/Classes/BleManager/HandleBroadcastPtl.h rename to local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/ECOneToMorePtl.h index 96cfa4536..e88639a89 100644 --- a/local_plugins/ota/ios/Classes/BleManager/HandleBroadcastPtl.h +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/ECOneToMorePtl.h @@ -1,22 +1,28 @@ // -// HandleBroadcastPtl.h -// JL_OTA +// ECOneToMorePtl.h +// JL_BLEKit // -// Created by EzioChan on 2023/1/30. -// Copyright © 2023 Zhuhia Jieli Technology. All rights reserved. +// Created by EzioChan on 2021/10/27. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. // #import +#import "NSData+ToUnit.h" +#import "JL_ManagerM.h" NS_ASSUME_NONNULL_BEGIN -@interface HandleBroadcastPtl : NSObject +@interface ECOneToMorePtl : NSObject + @property(nonatomic,strong,readonly)NSHashTable *delegates; @property(nonatomic,strong)NSLock *delegateLock; -(void)addDelegate:(id)delegate; -(void)removeDelegate:(id)delegate; -(void)removeAll; +-(void)inputPKG:(JL_PKG*)pkg; +-(void)inputPKG:(JL_PKG *)pkg Manager:(JL_ManagerM *)mgr; + @end NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/ECThreadHelper.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/ECThreadHelper.h new file mode 100644 index 000000000..a648b9649 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/ECThreadHelper.h @@ -0,0 +1,41 @@ +// +// ECThreadHelper.h +// JL_BLEKit +// +// Created by EzioChan on 2023/11/20. +// Copyright © 2023 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@protocol ECThreadHelperPtl + +-(void)startAction:(id)objc; +-(void)finishThreadTaskAction; + +@end + +typedef void(^EcThreadAction)(id objc); + +@interface ECThreadHelper : NSObject + + +@property (nonatomic, weak) id delegate; + +@property (nonatomic, copy) EcThreadAction action; + ++(instancetype)share; + +-(instancetype)init; + +-(void)addTask:(id)any; + +-(void)nextTask; + +-(void)clean; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL4GUpgradeManager.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL4GUpgradeManager.h new file mode 100644 index 000000000..be3e20abf --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL4GUpgradeManager.h @@ -0,0 +1,82 @@ +// +// JL4GUpgradeManager.h +// JL_BLEKit +// +// Created by EzioChan on 2023/12/18. +// Copyright © 2023 www.zh-jieli.com. All rights reserved. +// + +#import +#import "JLPublicSettingBlocks.h" + +NS_ASSUME_NONNULL_BEGIN +/// 4G 升级状态枚举 +typedef NS_ENUM(uint8_t, JL4GUpgradeStatus) { + /// 完成 + JL4GUpgradeStatusFinish = 0x00, + /// 开始 + JL4GUpgradeStatusStart = 0x01, + /// 传输中 + JL4GUpgradeStatusTransporting = 0x02, + /// 设备处理中 + JL4GUpgradeStatusDeviceProcessing = 0xff +}; + +@class JL4GUpgradeManager; + +/// 4G 升级代理回调 +@protocol JL4GUpgradeDelegate + +/// 升级结果 +/// - Parameters: +/// - mgr:4G升级管理对象 +/// - status: 升级状态 +/// - progress: 升级进度 +/// - code: 结果码 +/// 0x00 升级成功 +/// 0x01 升级失败 +/// 0x02 升级超时 +/// - error: 错误信息 +-(void)jl4GUpgradeResult:(JL4GUpgradeManager *)mgr Status:(JL4GUpgradeStatus) status Progress:(float)progress Code:(uint8_t)code error:(NSError * _Nullable)error; + +/// 设备 4G 信息更新 +/// - Parameter g4Model: 4G信息 +-(void)jl4GGetDeviceInfo:(JLPublic4GModel *)g4Model; + +@end + +@class JL_ManagerM; + +/// 4G模块升级管理对象 +@interface JL4GUpgradeManager : NSObject + +/// 单例 ++(instancetype)share; + +/// 4G 升级信息 +/// ⚠️需要先执行获取模块信息后获得值 +@property(nonatomic,strong)JLPublic4GModel *g4Model; + +/// 4G升级代理回调 +@property(nonatomic,weak) id delegate; + +/// 获取4G模块信息 +/// - Parameters: +/// - manager: 设备 +/// - result: 回调结果 +-(void)cmdGetDevice4GInfo:(JL_ManagerM *)manager result:(JLPSSource4GCbk)result; + + +/// 开始4G升级 +/// - Parameters: +/// - manager: 设备 +/// - data: 升级数据 +-(void)cmdStartUpgrade4G:(JL_ManagerM *)manager Data:(NSData *)data; + +/// 取消4G升级 +/// - Parameter manager: 设备 +-(void)cmdCancel4GUpgrade:(JL_ManagerM *)manager; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLAIDialManager.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLAIDialManager.h new file mode 100644 index 000000000..ea34d7d8f --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLAIDialManager.h @@ -0,0 +1,77 @@ +// +// JLAIDialManager.h +// JL_BLEKit +// +// Created by EzioChan on 2023/10/12. +// Copyright © 2023 www.zh-jieli.com. All rights reserved. +// + +#import +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN +@class JL_ManagerM; +@class JLAIDialManager; + +@protocol JLAIDialManagerDelegate + +/// 设备通知App AI表盘界面变化 +/// - Parameters: +/// - manager: ai dial manager +/// - status:0x00: 退出AI表盘功能 0x01: 进入AI表盘功能 +-(void)aiDialManager:(JLAIDialManager *)manager didAiDialStatusChange:(uint8_t)status; + +/// 开始AI生成表盘 +/// - Parameter manager: ai dial manager +-(void)aiDialdidStartCreateManager:(JLAIDialManager *)manager; + +/// 重新录音 +/// - Parameter manager: ai dial manager +-(void)aiDialdidRestartRecordManager:(JLAIDialManager *)manager; + +/// AI表盘开始安装 +/// - Parameter manager: ai dial manager +-(void)aiDialdidStartInstallManager:(JLAIDialManager *)manager; + + +/// 重新生成表盘 +/// - Parameter manager: ai dial manager +-(void)aiDialdidReCreateManager:(JLAIDialManager *)manager; + +@end + + + +/// ai dial manager +@interface JLAIDialManager : NSObject + +/// 进入/退出AI表盘 +@property (nonatomic, assign) BOOL isCreateing; + +/// 缩略图尺寸 默认 200*200 +/// scale zoom size default 200*200 +@property (nonatomic, strong) JLDialSize *scaleZoomSize; + + +/// 代理 +@property (nonatomic, weak) id delegate; + + +/// AI 表盘风格显示设置 +/// - Parameter manager: 设备对象 +/// - Parameter style: 风格类型 +/// - Parameter result: 回调对象 +-(void)aiDialSetManager:(JL_ManagerM *)manager AiStyle:(NSString *)style Result:(JL_CMD_RESPOND)result; + + +/// AI表盘告诉设备缩略图发送完毕 +/// - Parameter manager: 设备对象 +/// - Parameter path: 目标缩略图路径(设备端的位置)默认 "/VIE_THUMB" +/// - Parameter result: 回调对象 +-(void)aiDialSendThumbAiImageTo:(JL_ManagerM *)manager withPath:(NSString *)path Result:(JL_CMD_RESPOND)result; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLAiManager.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLAiManager.h new file mode 100644 index 000000000..88abc8f81 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLAiManager.h @@ -0,0 +1,121 @@ +// +// JLAiManager.h +// JL_BLEKit +// +// Created by EzioChan on 2023/8/9. +// Copyright © 2023 www.zh-jieli.com. All rights reserved. +// + +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +//MARK: - JLOpenPlatformInfo +/// 平台接口认证信息 +@interface JLOpenPlatformInfo : NSObject +/// 版本号 +@property(nonatomic,assign)uint8_t version; +/// 平台 ID +@property(nonatomic,copy)NSString *appID; +/// app key +@property(nonatomic,copy)NSString *appKey; +/// app 的密钥 +@property(nonatomic,copy)NSString *appSecret; +/// 原始数据 +@property(nonatomic,copy)NSData *basicData; + +-(instancetype)initData:(NSData *)data; + +@end + +/// 平台接口认证信息 +@interface JLOpenPlatformMessage : NSObject +/// 版本号 +@property(nonatomic,assign)uint8_t version; +/// 支持平台信息 +@property(nonatomic,copy)NSArray * infoArray; + +-(instancetype)initData:(NSData *)dt; + +@end + +/// 屏幕尺寸 +@interface JLDialSize : NSObject + +/// width +@property(nonatomic,assign) uint16_t width; + +/// height +@property(nonatomic,assign) uint16_t height; + +/// 初始化 +/// - Parameters: +/// - width: width +/// - height: height ++(JLDialSize *)makeSize:(uint16_t)width Height:(uint16_t)height; + +@end + +//MARK: - JLAiManager +@class JL_ManagerM; +@class JLAiManager; + +@protocol JLAIManagerDelegate + +/// 设备回调/推送结果 +/// - Parameter mgr: JLAiManager +-(void)jlaiUpdateStatus:(JLAiManager *)mgr; + +@optional +/// 设备主动推送JLOpenPlatformInfo信息 +/// - Parameters: +/// - mgr: 设备 +/// - infoArray: [JLOpenPlatformInfo] +-(void)jlaiUpdateDevAiOpenPlatforms:(JLAiManager *)mgr Info:(JLOpenPlatformMessage *)info; + + +@end + +typedef void(^JLOpenPFBlock)(JLOpenPlatformMessage *message,JL_CMDStatus result); + +/// AI状态 管理类 +/// 当前接口适用于一些支持设备对讲的设备,在使用时需要先初始化当前类并接受代理:JLAIManagerDelegate +/// 在初始化后需要主动获取状态才可以获得首次的状态内容 +/// +@interface JLAiManager : NSObject + +/// 版本号 +@property(assign,nonatomic)uint8_t version; + +/// 0x00:默认状态 +/// 0x01:进入AI界面 +/// 0x02:退出AI界面 +@property(assign,nonatomic)uint8_t status; + +/// 回调代理 +@property(weak,nonatomic)id delegate; + +/// 获取AI 的状态 +///- Parameters: +/// - manager: 设备对象 +-(void)getStatus:(JL_ManagerM *)manager; + +/// 设置设备的状态 +/// - Parameters: +/// - manager: 设备对象 +/// - result: 回调结果 +-(void)setToDevice:(JL_ManagerM *)manager result:(JL_CMD_RESPOND _Nullable)result; + + +/// 获取平台接口认证信息,此信息需要先获取 JLDeviceConfig +/// 根据JLDeviceConfigModel 的 exportFunc 属性的 +/// spOpenInfo 判断是否支持平台开放接口信息获得 +/// - Parameters: +/// - manager: 设备对象 +/// - result: 回调结果 +-(void)getOpenPlatformInfo:(JL_ManagerM *)manager result:(JLOpenPFBlock _Nullable)result; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLAuracastDevStateModel.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLAuracastDevStateModel.h new file mode 100644 index 000000000..3e91da062 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLAuracastDevStateModel.h @@ -0,0 +1,35 @@ +// +// JLAuracastDevStateModel.h +// JL_BLEKit +// +// Created by EzioChan on 2025/11/17. +// Copyright © 2025 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +/** + Auracast 设备状态数据模型 + + */ +@interface JLAuracastDevStateModel : NSObject + +typedef NS_ENUM(uint8_t, JLAuracastDevStateType) { + JLAuracastDevStateTypeLogin = 0x01, +}; +typedef NS_ENUM(uint8_t, JLAuracastLoginState) { + JLAuracastLoginStateLogout = 0, + JLAuracastLoginStateLogin = 1, +}; +/// 登录状态 +@property(nonatomic, assign) JLAuracastLoginState loginState; + +- (instancetype)initParseData:(NSData *)data; + +- (void)updateParseData:(NSData *)data; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLAuracastLancerManager.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLAuracastLancerManager.h new file mode 100644 index 000000000..a7172d602 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLAuracastLancerManager.h @@ -0,0 +1,121 @@ +// +// JLAuracastLancerManager.h +// JL_BLEKit +// +// Created by EzioChan on 2025/11/17. +// Copyright © 2025 www.zh-jieli.com. All rights reserved. +// + +#import +#import +NS_ASSUME_NONNULL_BEGIN +@class JLAuracastLancerSettingMode; +@class JLAuracastLancerManager; + +@protocol JLAuracastLancerManagerDelegate +@optional +-(void)lancerManager:(JLAuracastLancerManager *)mgr didUpdateSetting:(JLAuracastLancerSettingMode *)mode; +/// 设备状态更新 +/// - Parameters: +/// - mgr: 管理器 +/// - state: 最新设备状态 +-(void)lancerManager:(JLAuracastLancerManager *)mgr didUpdateDeviceState:(JLAuracastDevStateModel *)state; +@end + +/// Lancer 验证 +typedef NS_ENUM(NSUInteger, JLAuracastLancerLoginVerifyType) { + /// 验证成功 + JLLancerLoginVerifyTypeSuccess = 0x00, + /// 验证失败 + JLLancerLoginVerifyTypeFail = 0x01, + /// 已登录 + JLLancerLoginVerifyTypeLogined = 0x02 +}; + +/// 修改密码结果 +typedef NS_ENUM(NSUInteger, JLAuracastLancerChangePwdResult) { + /// 修改成功 + JLAuracastLancerChangePwdSuccess = 0x00, + /// 旧密码错误 + JLAuracastLancerChangePwdOldError = 0x01, + /// 密码没有变化 + JLAuracastLancerChangePwdNoChange = 0x02, + /// 新密码长度不对 + JLAuracastLancerChangePwdLengthError = 0x03 +}; + + + +typedef void(^JLLancerLoginVerifyBlock)(JLAuracastLancerLoginVerifyType status); + +typedef void(^JLLancerChangePwdBlock)(JLAuracastLancerChangePwdResult status); + +@interface JLAuracastLancerManager : NSObject + +@property(nonatomic, strong) JLAuracastLancerSettingMode *__nullable settingMode; + +@property(nonatomic, weak) id delegate; + + +-(instancetype)initWithManager:(JL_ManagerM *)manager; + +/// 设备状态 +@property(nonatomic,strong)JLAuracastDevStateModel *devState; + +/// 登录 +/// - Parameters: +/// - password: 登录密码 +/// - result: 结果 +-(void)loginVerify:(NSString *)password Result:(JLLancerLoginVerifyBlock)result; + +/// 修改密码 +/// - Parameters: +/// - oldPwd: 旧密码 +/// - newPwd: 新密码 +/// - result: 结果 +-(void)changePassword:(NSString *)oldPwd newPassword:(NSString *)newPwd Result:(JLLancerChangePwdBlock)result; + +/// 获取Auracast设备状态 +-(void)auracastGetDevState; + +/// 获取广播音频发射设置 +/// - Parameter type: 类型 +/// 0x01 == 广播名称 +/// 0x02 == 音频格式序号 +/// 0x03 == 加密信息 +/// 0x04 == 发射功率 +-(void)getBroadcastLancerSetting:(UInt8)type; + +/// 获取广播音频发射设置 +-(void)getBroadcastLancerSetting; + +/// 单独设置广播名称 +-(void)setBroadcastName:(NSString *)name; + +/// 单独设置音频格式序号 +-(void)setAudioFormatIndex:(JLBroadcastSetAudioFormat)index; + +/// 单独设置加密与 Broadcast Code(长度16) +-(void)setEncryptEnabled:(BOOL)enabled code:(NSData *)code; + +/// 单独设置发射功率(1~10) +-(void)setPowerLevel:(uint8_t)level; + +/// 一次性下发全部设置(来自 settingMode 或参数) +-(void)setBroadcastLancerSetting:(JLAuracastLancerSettingMode *)mode; + +///关机 +-(void)shoudown; + +///重启 +-(void)restart; + +///恢复出厂设置 +-(void)reset; + +/// 销毁 +-(void)onDestory; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLAuracastLancerSettingMode.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLAuracastLancerSettingMode.h new file mode 100644 index 000000000..0d0a547dc --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLAuracastLancerSettingMode.h @@ -0,0 +1,148 @@ +// +// JLAuracastLancerSettingMode.h +// JL_BLEKit +// +// Created by EzioChan on 2025/11/17. +// Copyright © 2025 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN +/// 音频格式 +typedef NS_ENUM(UInt8, JLBroadcastSetAudioFormat) { + /// 名称: 8_1 + /// 采样率(Hz): 8000 + /// 帧间隔(us):7500 + /// 包长(Byte):26 + /// 码率(kbps):27.732 + /// 重发次数 :2 + /// 最大传输延时(ms) :8 + /// 演示延时(ms) :40 + JLBroadcastSetAudioFormat8_1 = 0x01, + /// 名称: 8_2 + /// 采样率(Hz): 8000 + /// 帧间隔(us):10000 + /// 包长(Byte):30 + /// 码率(kbps):24 + /// 重发次数:2 + /// 最大传输延时(ms):10 + /// 演示延时(ms):40 + JLBroadcastSetAudioFormat8_2 = 0x02, + /// 名称: 16_1_1 + /// 采样率(Hz): 16000 + /// 帧间隔(us):7500 + /// 包长(Byte):30 + /// 码率(kbps):32 + /// 重发次数:2 + /// 最大传输延时(ms):8 + /// 演示延时(ms):40 + JLBroadcastSetAudioFormat16_1_1 = 0x03, + /// 名称: 16_2_1 + /// 采样率(Hz): 16000 + /// 帧间隔(us):10000 + /// 包长(Byte):40 + /// 码率(kbps):48 + /// 重发次数:2 + /// 最大传输延时(ms):10 + /// 演示延时(ms):40 + JLBroadcastSetAudioFormat16_2_1 = 0x04, + /// 名称: 24_1_1 + /// 采样率(Hz): 24000 + /// 帧间隔(us):7500 + /// 包长(Byte):45 + /// 码率(kbps):48 + /// 重发次数:2 + /// 最大传输延时(ms):8 + /// 演示延时(ms):40 + JLBroadcastSetAudioFormat24_1_1 = 0x05, + /// 名称: 24_2_1 + /// 采样率(Hz): 24000 + /// 帧间隔(us):10000 + /// 包长(Byte):60 + /// 码率(kbps):48 + /// 重发次数:2 + /// 最大传输延时(ms):10 + /// 演示延时(ms):40 + JLBroadcastSetAudioFormat24_2_1 = 0x06, + /// 名称: 32_1_1 + /// 采样率(Hz): 32000 + /// 帧间隔(us):7500 + /// 包长(Byte):60 + /// 码率(kbps):64 + /// 重发次数:2 + /// 最大传输延时(ms):8 + /// 演示延时(ms):40 + JLBroadcastSetAudioFormat32_1_1 = 0x07, + /// 名称: 32_2_1 + /// 采样率(Hz): 32000 + /// 帧间隔(us):10000 + /// 包长(Byte):80 + /// 码率(kbps):64 + /// 重发次数:2 + /// 最大传输延时(ms):10 + /// 演示延时(ms):40 + JLBroadcastSetAudioFormat32_2_1 = 0x08, + /// 名称: 441_1_1 + /// 采样率(Hz): 44100 + /// 帧间隔(us):8163 + /// 包长(Byte):97 + /// 码率(kbps):95.06 + /// 重发次数:4 + /// 最大传输延时(ms):24 + /// 演示延时(ms):40 + JLBroadcastSetAudioFormat441_1_1 = 0x09, + /// 名称: 441_2_1 + /// 采样率(Hz): 44100 + /// 帧间隔(us):10884 + /// 包长(Byte):130 + /// 码率(kbps):95.55 + /// 重发次数:4 + /// 最大传输延时(ms):31 + /// 演示延时(ms):40 + JLBroadcastSetAudioFormat441_2_1 = 0x0A, + /// 名称: 48_1 + /// 采样率(Hz): 48000 + /// 帧间隔(us):7500 + /// 包长(Byte):75 + /// 码率(kbps):80 + /// 重发次数:4 + /// 最大传输延时(ms):15 + /// 演示延时(ms):40 + JLBroadcastSetAudioFormat48_1 = 0x0B, + /// 名称: 48_2 + /// 采样率(Hz): 48000 + /// 帧间隔(us):10000 + /// 包长(Byte):100 + /// 码率(kbps):80 + /// 重发次数:4 + /// 最大传输延时(ms):20 + /// 演示延时(ms):40 + JLBroadcastSetAudioFormat48_2 = 0x0C + +}; +/** + Auracast 发射端设置数据模型 + */ +@interface JLAuracastLancerSettingMode : NSObject + +/// 广播名称 +@property(nonatomic, copy) NSString *broadcastName; +/// 音频格式 +@property(nonatomic, assign) JLBroadcastSetAudioFormat audioFormatIndex; +/// 是否加密 +@property(nonatomic, assign) BOOL encryptEnabled; +/// 广播加密密码 +@property(nonatomic, copy) NSData * _Nullable broadcastCode; +/// 发射功率设置 +@property(nonatomic, assign) uint8_t powerLevel; + +-(instancetype)initParseData:(NSData *)data; + +-(void)updateParseData:(NSData *)data; + +-(NSData *)toLTVData; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLAuracastManager.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLAuracastManager.h new file mode 100644 index 000000000..053b987e2 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLAuracastManager.h @@ -0,0 +1,123 @@ +// +// JLAuracastManager.h +// JL_BLEKit +// +// Created by EzioChan on 2025/11/17. +// Copyright © 2025 www.zh-jieli.com. All rights reserved. +// + +#import +#import + +NS_ASSUME_NONNULL_BEGIN +@class JLBroadcastDataModel; +@class JLAuracastDevStateModel; +@class JLAuracastManager; + +/// 搜索状态 +typedef NS_ENUM(NSUInteger, JLAuracastScanState) { + ///操作成功/不在搜索状态 + JLAuracastScanStateSuccess = 0, + ///正在搜索,请勿重复操作 + JLAuracastScanStateScanning = 1, + ///收听广播过程不允许扫描 + JLAuracastScanStateForbidden = 2, + ///设备繁忙 + JLAuracastScanStateBusy = 3, +}; + +/// 扫描类型 +typedef NS_ENUM(NSUInteger, JLAuracastScanType) { + /// 停止 + JLAuracastScanTypeStop = 0, + /// 开始 + JLAuracastScanTypeStart = 1, + /// 查询 + JLAuracastScanTypeQuery = 2, +}; + +@protocol JLAuracastManagerDelegate +@optional + +/// 搜索状态 +/// - Parameters: +/// - mgr: 管理器 +/// - state: 搜索状态 +/// - error: 错误 +-(void)auracastManager:(JLAuracastManager *)mgr didUpdateSearchState:(BOOL)state Error:(NSError * _Nullable)error; + + +/// 广播列表更新 +/// - Parameters: +/// - mgr: 管理器 +/// - list: 最新的广播数据列表 +-(void)auracastManager:(JLAuracastManager *)mgr didUpdateBroadcastList:(NSArray *)list; + +/// 设备状态更新 +/// - Parameters: +/// - mgr: 管理器 +/// - state: 最新设备状态 +-(void)auracastManager:(JLAuracastManager *)mgr didUpdateDeviceState:(JLAuracastDevStateModel *)state; + +/// 当前播放源更新 +/// - Parameters: +/// - mgr: 管理器 +/// - source: 当前播放源(可空) +-(void)auracastManager:(JLAuracastManager *)mgr didUpdateCurrentSource:(JLBroadcastDataModel * _Nullable)source; +@end + +typedef void(^JLAuracastManagerResultBlock)(JL_CMDStatus status, NSError * _Nullable error); + +@interface JLAuracastManager : NSObject + +/// 扫描状态 +@property(nonatomic, assign)BOOL isScanning; + +/// 若干个搜索到的对象 +@property(nonatomic,strong)NSMutableArray * broadcastDataModels; + +/// 设备状态 +@property(nonatomic,strong)JLAuracastDevStateModel *devState; + +/// 当前播放源 +@property(nonatomic,strong)JLBroadcastDataModel *__nullable currentSource; + +/// 回调代理 +@property(nonatomic,weak)id delegate; + +/// 初始化 +-(instancetype)initWithManager:(JL_ManagerM *)manager; + + +/// 扫描Auracast广播 +/// - Parameter type: 扫描类型 +-(void)auracastScanBroadcast:(JLAuracastScanType)type; + +/// 获取Auracast设备状态 +-(void)auracastGetDevState; + + +/// 设置Auracast当前播放源 +/// - Parameter model: 播放源 +/// - Parameter block: 回调 +/// 这里的回调仅仅是命令收发的一个回复,设备回复成功不代表添加成功 +/// 只说明了此命令交互成功,开发者仍需监听 +/// -(void)auracastManager:(JLAuracastManager *)mgr didUpdateCurrentSource:(JLBroadcastDataModel * _Nullable)source 作为判断是否成功收听的重要指标 +-(void)addSourceToDev:(JLBroadcastDataModel *)model result:(JLAuracastManagerResultBlock _Nullable)block; + +/// 移除Auracast当前播放源 +/// - Parameter block: 回调 +-(void)removeDevCurrentSource:(JLAuracastManagerResultBlock _Nullable)block; + +/// 获取Auracast当前播放源 +/// - Parameter block: 回调 +-(void)getCurrentOperationSource:(void(^)(JLBroadcastDataModel *model))block; + +/// 销毁 +-(void)onDestory; + + + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLAutoConfigAnc.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLAutoConfigAnc.h new file mode 100644 index 000000000..67e2329af --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLAutoConfigAnc.h @@ -0,0 +1,87 @@ +// +// JLAutoConfigAnc.h +// JL_BLEKit +// +// Created by EzioChan on 2022/10/28. +// Copyright © 2022 www.zh-jieli.com. All rights reserved. +// + + +#import "ECOneToMorePtl.h" + +NS_ASSUME_NONNULL_BEGIN + +@class JL_ManagerM; + +typedef void(^AutoConfigResult)(BOOL status); + +@protocol JLAutoConfigAncPtl + + +/// 设备正在重新检测自适应降噪 +-(void)autoConfigDidConfiging; +///设置自适应降噪失败了 +-(void)autoConfigDidFailed; +///设置自适应降噪成功了 +-(void)autoConfigDidSucceed; +///关闭自适应降噪 +-(void)autoConfigDidClose; + +@end + + +/// 自适应降噪处理类 +@interface JLAutoConfigAnc : ECOneToMorePtl + +/// 设备开启/关闭自适应降噪的状态 +@property (assign,nonatomic)BOOL status; + +/// 开启设备自适应降噪 +/// 这里只是进入了设备开始适配降噪的命令过程 +/// 适配成功与否需要添加协议JLAutoConfigAncPtl进行监听 +/** + interface testView : UIView + + @end + + -(void)initData{ + JLAutoConfigAnc *anc = [[JLAutoConfigAnc alloc] init]; + [anc addDelegate:self]; + } + + -(void)autoConfigDidFailed{ + //设置自适应降噪失败了 + } + -(void)autoConfigDidSucceed{ + //设置自适应降噪成功了 + } + -(void)autoConfigDidClose{ + //关闭自适应降噪 + } +*/ +/// - Parameter manager: manager +-(void)atAncStartAutoConfigWithManager:(JL_ManagerM*)manager; + + +/// 打开设备自适应降噪 +/// 设备默认有一套已在运行的降噪算法 +/// 打开后设备会进入降噪模式,不会经历检测启动自适应的时间,相当于是即时生效 +/// - Parameter result: 这里回调的是一个设备命令处理的结果 +/// - Parameter manager: manager +-(void)atAncOpenAutoConfigResult:(JL_CMD_RESPOND)result Manager:(JL_ManagerM*)manager; + +/// 用户关闭设备的自适应降噪模式算法 +/// - Parameter result: 命令处理结果,不代表命令处理成功 +/// - Parameter manager: manager +-(void)atAncCloseAutoConfigResult:(JL_CMD_RESPOND)result Manager:(JL_ManagerM*)manager; + +/// 获取设备是否开启了自适应降噪 +/// - Parameter result: 这里处理的结果是,设备实际是否开启了的结果,无需从代理中获得结果 +/// - Parameter manager: manager +-(void)atAncGetAutoConfigResult:(AutoConfigResult)result Manager:(JL_ManagerM*)manager; + + +@end + + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLAutoPressureModel.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLAutoPressureModel.h new file mode 100644 index 000000000..c019440d1 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLAutoPressureModel.h @@ -0,0 +1,38 @@ +// +// JLAutoPressureModel.h +// JL_BLEKit +// +// Created by EzioChan on 2021/10/12. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import "JLwSettingModel.h" + +NS_ASSUME_NONNULL_BEGIN + +///压力自动检测模式 +typedef NS_ENUM(UInt8, WatchAPLeveType) { + ///放松 + WatchAPLeve_Relex = 0x00, + /// 正常 + WatchAPLeve_Normal = 0x01, + /// 中等 + WatchAPLeve_Middle = 0x02, + /// 偏高 + WatchAPLeve_Hight = 0x03 +}; + +@interface JLAutoPressureModel : JLwSettingModel + +///开关 +@property(nonatomic,assign)BOOL status; +/// 模式 +@property(nonatomic,assign)WatchAPLeveType model; + +-(instancetype)initWithData:(NSData *)data; + +-(instancetype)initWithModel:(WatchAPLeveType)model switchStatus:(BOOL)status; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLBroadcastDataModel.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLBroadcastDataModel.h new file mode 100644 index 000000000..a46f5a68d --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLBroadcastDataModel.h @@ -0,0 +1,65 @@ +// +// JLBroadcastDataModel.h +// JL_BLEKit +// +// Created by EzioChan on 2025/11/17. +// Copyright © 2025 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +/// Auracast 广播数据模型 +@interface JLBroadcastDataModel : NSObject + +/// 广播名称 +@property(nonatomic, copy) NSString *broadcastName; +/// 广播ID +@property(nonatomic, copy) NSData *broadcastID; +/// 广播特性 +@property(nonatomic, assign) uint8_t features; +/// 是否加密 +@property(nonatomic, assign) BOOL encrypted; +/// 广播地址 +@property(nonatomic, copy) NSData *advertiserAddress; +/// 广播地址 +@property(nonatomic, copy) NSString *advertiserAddressString; + +/// 广播密钥 +@property(nonatomic, copy) NSData *broadcastKey; + +typedef NS_ENUM(uint8_t, JLBroadcastSyncState) { + JLBroadcastSyncStateIdle = 0, + JLBroadcastSyncStateSyncing = 1, + JLBroadcastSyncStateSuccess = 2, +}; +/// 同步状态 +/// Broadcast sync state +/// 当此状态为空闲时,需要查看错误码检查是否存在错误 +@property(nonatomic, assign) JLBroadcastSyncState syncState; + +typedef NS_ENUM(uint8_t, JLBroadcastErrorCode) { + JLBroadcastErrorCodeNone = 0x00, + JLBroadcastErrorCodeName = 0x01, + JLBroadcastErrorCodeAddress = 0x02, + JLBroadcastErrorCodeID = 0x03, + JLBroadcastErrorCodeKey = 0x04, + JLBroadcastErrorCodeSyncFailed = 0x05, + JLBroadcastErrorCodeSyncTimeout = 0x06, + JLBroadcastErrorCodeSyncLost = 0x07, +}; +/// 错误码 +@property(nonatomic, assign) JLBroadcastErrorCode errorCode; + +@property(nonatomic, copy) NSData *ltvData; + +- (instancetype)initParseData:(NSData *)data; + + +/// 将当前模型内容按 LTV 规则编码为数据 +- (NSData *)toLTVData; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLCmdBasic.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLCmdBasic.h new file mode 100644 index 000000000..8efb36751 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLCmdBasic.h @@ -0,0 +1,23 @@ +// +// JLCmdBasic.h +// JL_BLEKit +// +// Created by EzioChan on 2023/9/13. +// Copyright © 2023 www.zh-jieli.com. All rights reserved. +// + +#import +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface JLCmdBasic : NSObject + +-(void)inputPKG:(JL_PKG *)pkg; + +-(void)makeCommandAction:(NSData *)targetData withManager:(JL_ManagerM *)manager Result:(JL_CMD_RESPOND _Nullable)result; +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLConsequentHeartRateModel.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLConsequentHeartRateModel.h new file mode 100644 index 000000000..3a407f6b5 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLConsequentHeartRateModel.h @@ -0,0 +1,45 @@ +// +// JLConsequentHeartRateModel.h +// JL_BLEKit +// +// Created by EzioChan on 2021/10/12. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import "JLwSettingModel.h" + +NS_ASSUME_NONNULL_BEGIN + +/// 测量心率传感器设置 +@interface JLConsequentHeartRateModel : JLwSettingModel +///开关 +@property(nonatomic,assign)BOOL status; +/// 测量模式 +@property(nonatomic,assign)WatchConsequentType rType; + +/// 上限心率 +@property(nonatomic,assign)UInt8 maxHeartRate; + +/// 下限心率 +@property(nonatomic,assign)UInt8 minHeartRate; + +/// 是否包含上下心率区间 +@property(nonatomic,assign)BOOL hasRange; + +-(instancetype)initWithData:(NSData *)data; + +/// 创建一个新的传感器设置对象 +/// @param type 测量类型 +/// @param status 开团状态 +- (instancetype)initWithModel:(WatchConsequentType)type Status:(BOOL)status; + +/// 创建一个新的传感器设置对象 +/// 携带心率上下限的 +/// @param type 测量类型 +/// @param status 开关状态 +/// @param min 心率下限 +/// @param max 心率上限 +- (instancetype)initWithModel:(WatchConsequentType)type Status:(BOOL)status Min:(UInt8) min Max:(UInt8)max; +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLDevAudioAIttsHandler.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLDevAudioAIttsHandler.h new file mode 100644 index 000000000..cfe5d57df --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLDevAudioAIttsHandler.h @@ -0,0 +1,55 @@ +// +// JLDevAudioAIttsHandler.h +// JL_BLEKit +// Created by EzioChan on 2025/12/12. +// Copyright © 2025 www.zh-jieli.com. All rights reserved. +// + +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +@class JL_ManagerM; +@protocol JLDevAudioAIttsHandlerDelegate +/// 设备回调ai云数据 +/// - Parameters: +/// - manager: 设备 +/// - aicloud: AI云数据对象 +- (void)receiveDataFrom:(JL_ManagerM *)manager WithAiCloud:(JLSpeechAiCloud *)aicloud; + +/// 设备返回tts合成数据 +/// - Parameters: +/// - manager: 设备 +/// - tts: tts数据对象 +- (void)receiveDataFrom:(JL_ManagerM *)manager WithTTS:(JLSpeechTTSSynthesis *)tts; +@end + +/// 语音 AI/tts 传输处理(新) +/// 对外接口与旧类一致,仅更换类名,内部转发至 JL_SpeechAIttsHandler +@interface JLDevAudioAIttsHandler : NSObject + +@property (nonatomic, weak) id delegate; + +/// 初始化一个语音大数据传输实例 +/// - Parameter mgr: JL_ManagerM +- (instancetype)initWithMgr:(JL_ManagerM *)mgr; + +/// 发送tts语音合成信息 +/// - Parameters: +/// - tts: tts语音对象内容 +/// - manager: 设备 +/// - result: 回调结果 +- (void)devAudioSendTTs:(JLSpeechTTSSynthesis *)tts manager:(JL_ManagerM *)manager result:(JL_BIGDATA_RT)result; + +/// 发送ai云数据到设备 +/// - Parameters: +/// - cloud: ai云数据 +/// - manager: 设备 +/// - result: 回调结果 +- (void)devAudioSendAiCloud:(JLSpeechAiCloud *)cloud manager:(JL_ManagerM *)manager result:(JL_BIGDATA_RT)result; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLDevAudioManager.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLDevAudioManager.h new file mode 100644 index 000000000..4767be2bc --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLDevAudioManager.h @@ -0,0 +1,95 @@ +// +// JLDevAudioManager.h +// JL_BLEKit +// Created by EzioChan on 2025/12/12. +// Copyright © 2025 www.zh-jieli.com. All rights reserved. +// + +#import +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +@class JL_ManagerM; +@class JLDevAudioManager; + +@protocol JLDevAudioManagerDelegate + /// 录音数据回调 + /// - Parameters: + /// - manager: 操作设备 + /// - data: 数据 + - (void)devAudioManager:(JLDevAudioManager *)manager Audio:(NSData *)data; + + /// 设备端开始录音 + /// - Parameters: + /// - manager: 操作设备 + /// - param: 录音参数 + - (void)devAudioManager:(JLDevAudioManager *)manager StartByDeviceWithParam:(JLRecordParams *)param; + + /// 设备端结束录音 + /// - Parameters: + /// - manager: 操作设备 + /// - param: 语音助手配置参数 + - (void)devAudioManager:(JLDevAudioManager *)manager StopByDeviceWithParam:(JLSpeechRecognition *)param; + + /// 录音状态回调 + /// - Parameters: + /// - manager: 操作设备 + /// - status: 状态 + - (void)devAudioManager:(JLDevAudioManager *)manager Status:(JL_SpeakType)status; + +@end + +/// 设备录音管理对象(新) +/// 对外接口与旧类一致,仅更换类名,内部转发至 JL_SpeexManager +@interface JLDevAudioManager : NSObject + +@property (nonatomic, weak) id delegate; + + /// 获取单例 + /// - Parameters: + /// - delegate: 代理 + /// - manager: 操作设备 + /// - Returns: 录音管理对象实例 + + (JLDevAudioManager *)shareDevAudioManager:(id)delegate WithManager:(JL_ManagerM *)manager; + + /// 获取录音状态 + /// - Returns: 当前录音状态 + - (JL_SpeakType)cmdCheckRecordStatus; + + /// 开始录音 + /// - Parameters: + /// - manager: 操作设备 + /// - params: 录音参数 + /// - result: 命令操作结果回调 + - (void)cmdStartRecord:(JL_ManagerM *)manager Params:(JLRecordParams *)params Result:(JL_CMD_RESPOND __nullable)result; + /// 停止录音 + /// - Parameters: + /// - manager: 操作设备 + /// - reason: VAD类型 + /// - result: 命令操作结果回调 + - (void)cmdStopRecord:(JL_ManagerM *)manager Reason:(JLSpeakDownReason)reason Result:(JL_CMD_RESPOND __nullable)result; + /// 停止录音2 + /// - Parameters: + /// - manager: 操作设备 + /// - reason: vad类型 + /// - schr: 语音设置助手 + /// - result: 回调结果 + - (void)cmdStopRecord:(JL_ManagerM *)manager Reason:(JLSpeakDownReason)reason SpeechHelper:(JLSpeechRecognition *)schr Result:(JL_CMD_RESPOND __nullable)result; + + /// 允许录音(设备端主动发起时的同意响应) + /// 在收到设备主动发起录音的回调后调用,设备会播放提示音 + - (void)cmdAllowSpeak; + /// 拒绝录音(设备端主动发起时的拒绝响应) + /// 在收到设备主动发起录音的回调后调用,拒绝设备开始录音 + - (void)cmdRejectSpeak; + + /// 停止语音 + /// 发送命令给音箱,停止接收数据,即检测到断句 + - (void)cmdSpeakingDone __attribute__((deprecated("当前命令已失效,请使用cmdStopRecord:(JL_ManagerM *)manager Reason:(JLSpeakDownReason) reason"))); + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLDevPlayerCtrl.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLDevPlayerCtrl.h new file mode 100644 index 000000000..74e171a03 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLDevPlayerCtrl.h @@ -0,0 +1,102 @@ +// +// JLDevPlayerCtrl.h +// JL_BLEKit +// +// Created by EzioChan on 2023/9/25. +// Copyright © 2023 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@class JL_ManagerM; +@class JLDevPlayerCtrl; + +/// 播放器回调 +@protocol JLDevPlayerCtrlDelegate + +/// 播放状态 +/// - Parameters: +/// - ctrl: 播放器 +/// - status: 播放模式 +-(void)jlDevPlayerCtrl:(JLDevPlayerCtrl *)ctrl playMode:(uint8_t)playMode; + +/// 播放状态回调 +/// - Parameters: +/// - ctrl: 播放器 +/// - status: 播放状态 +/// - card: 当前播放的设备 +/// - time: 当前播放的时间 +/// - total: 总时长 +-(void)jlDevPlayerCtrl:(JLDevPlayerCtrl *)ctrl playStatus:(uint8_t)status currentCard:(uint8_t)card currentTime:(uint32_t)time tolalTime:(uint32_t)total; + +/// 播放文件回调 +/// - Parameters: +/// - ctrl: 播放器 +/// - name: 文件名 +/// - clus: 文件簇号 +-(void)jlDevPlayerCtrl:(JLDevPlayerCtrl *)ctrl fileName:(NSString *)name currentClus:(uint32_t)clus; + +@end + + +/// 设备播放器管理类 +@interface JLDevPlayerCtrl : JLCmdBasic + +/// 播放状态 +@property(nonatomic,assign)uint8_t playStatus; + +/// 当前播放的设备 +/// 0x00 : USB +/// 0x01 : SD_0 +/// 0x02 : SD_1 +/// 0x03 : FLASH +/// 0x04 : LineIn +/// 0x05 : FLASH2 +@property(nonatomic,assign)uint8_t currentCard; + +/// 当前播放时间 +@property(nonatomic,assign)uint32_t currentTime; + +/// 歌曲总时长 +@property(nonatomic,assign)uint32_t tolalTime; + +/// 当前播放文件名 +@property(nonatomic,strong)NSString *fileName; + +/// 当前播放文件的簇号 +@property(nonatomic,assign)uint32_t currentClus; + +/// 当前播放模式 +/// 0x01:全部循环; +/// 0x02:设备循环; +/// 0x03:单曲循环; +/// 0x04:随机播放; +/// 0x05:文件夹循环 +@property (nonatomic,assign)uint8_t playMode; + +/// 代理 +@property(nonatomic,weak)id delegate; + +/// 操控设备播放器设置 +/// - Parameters: +/// - cmd: 操作命令 +/// 0x01:PP按钮 +/// 0x02:上一曲 +/// 0x03:下一曲 +/// 0x04:切换播放模式(当前播放模式:不可指定,设备播放模式自增) +/// 0x05:EQ +/// 0x06:快退 +/// 0x07:快进 +/// - sec: 时间(当快进/快退时需要,其他功能时值为0) +/// - manager: 设备对象 +/// - result: 返回结果 +-(void)cmdPlayerCtrl:(uint8_t)cmd + Second:(uint16_t)sec + Manager:(JL_ManagerM *)manager + Result:(JL_CMD_RESPOND __nullable)result; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLDeviceConfig.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLDeviceConfig.h new file mode 100644 index 000000000..404011f0a --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLDeviceConfig.h @@ -0,0 +1,113 @@ +// +// JLDeviceConfig.h +// JL_BLEKit +// +// Created by EzioChan on 2022/10/31. +// Copyright © 2022 www.zh-jieli.com. All rights reserved. +// + +#import +#import + +@class JL_ManagerM; +@class JLDeviceConfigModel; +@class JLDeviceConfigTws; +@class JLDeviceConfigDongle; +@class JLDeviceConfigSoundBox; + +NS_ASSUME_NONNULL_BEGIN +typedef void(^JLConfigRsp)(JL_CMDStatus status, uint8_t sn, JLDeviceConfigModel* __nullable config); + +typedef void(^JLConfigTwsRsp)(JL_CMDStatus status, uint8_t sn, JLDeviceConfigTws* __nullable config); + +typedef void(^JLConfigAuracastRsp)(JL_CMDStatus status, uint8_t sn, JLDeviceConfigDongle* __nullable config); + +typedef void (^JLConfigSoundBoxRsp)(JL_CMDStatus status, uint8_t sn, JLDeviceConfigSoundBox* __nullable config); + + +/// 固件设置配置回调协议 +/// 遵循时,可通过父类的- (void)addDelegate:(id)delegate方法添加遵循 +@protocol JLConfigPtl + +@optional +/// 监听回调协议 +/// - Parameter configModel: 固件设置配置回调 +-(void)deviceConfigWith:(JLDeviceConfigModel *)configModel; + +/// TWS监听回调协议 +/// - Parameter configModel: 固件设置配置回调 +-(void)deviceTwsConfigWith:(JLDeviceConfigTws *)configModel; + +/// SoundBox监听回调协议 +/// - Parameter configModel: 固件设置配置回调 +-(void)deviceSoundBoxConfigWith:(JLDeviceConfigSoundBox *)configModel; + +/// Dongle 监听回调协议 +/// - Parameter configModel: 固件设置配置回调 +-(void)deviceAuracastConfigWith:(JLDeviceConfigDongle *)configModel; + +@end + +@interface JLDeviceConfig : NSObject + + +@property(nonatomic,weak) id _Nullable delegate; + ++(instancetype)share; + +/// 获取设备配置信息 +-(void)deviceConfigGet:(JL_ManagerM *)manager; + + +/// 手表查询设备当前固件配置内容 +/// - Parameters: +/// - manager: manager +/// - result: 回调功能配置内容 +-(void)deviceGetConfig:(JL_ManagerM *)manager result:(JLConfigRsp)result; + +/// 手表多设备管理时,可通过对应的设备UUID 获取相关的设备配置 +/// - Parameter entity: 设备uuidStr +-(JLDeviceConfigModel *_Nullable)deviceGetConfigWithUUID:(NSString *)uuidStr; + +/// TWS查询设备当前固件配置内容 +/// - Parameters: +/// - manager: manager +/// - result: 回调功能配置内容 +-(void)deviceTwsGetConfig:(JL_ManagerM *)manager result:(JLConfigTwsRsp)result; + +/// Dongle 查询设备当前固件配置内容 +/// - Parameters: +/// - manager: manager +/// - result: 回调功能配置内容 +-(void)deviceDongleGetConfig:(JL_ManagerM *)manager result:(JLConfigAuracastRsp)result; + +/// SoundBox 查询设备当前固件配置内容 +/// - Parameters: +/// - manager: manager +/// - result: 回调功能配置内容 +-(void)deviceSoundBoxGetConfig:(JL_ManagerM *)manager result:(JLConfigSoundBoxRsp)result; + + +/// Tws多设备管理时,可通过对应的设备UUID 获取相关的设备配置 +/// - Parameter entity: 设备uuidStr +-(JLDeviceConfigTws *)deviceGetTwsConfigWithUUID:(NSString *)uuidStr; + +/// Dongle 查询设备当前固件配置内容 +/// - Parameters: +/// - uuidStr: 设备uuidStr +-(JLDeviceConfigDongle *)deviceGetAuracastConfigWithUUID:(NSString *)uuidStr; + + +/// SoundBox 多设备管理时,可通过对应的设备 UUID 获取相关的设备配置信息 +/// - Parameter uuidStr: 设备 uuid +-(JLDeviceConfigSoundBox *)deviceGetSoundBoxConfigWithUUID:(NSString *)uuidStr; + + +/// 私有测试接口请勿使用 +/// - Parameter data: 用于测试数据 +/// - Parameter st: 是否开启测试模式 +-(void)pDeviceTest:(NSData *)data Status:(BOOL)st; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLDeviceConfigDongle.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLDeviceConfigDongle.h new file mode 100644 index 000000000..dbdf7def0 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLDeviceConfigDongle.h @@ -0,0 +1,32 @@ +// +// JLDeviceConfigDongle.h +// JL_BLEKit +// +// Created by EzioChan on 2025/11/17. +// Copyright © 2025 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +/// Auracast +@interface JLDeviceConfigDongle : JLDeviceConfigBasic +/// 是否支持Auracast +@property (nonatomic, assign, readonly) BOOL isSupportAuracast; +/// 是否支持接收Auracast +@property (nonatomic, assign, readonly) BOOL isSupportReceiveAuracast; +/// 是否支持发射端 Auracast +@property (nonatomic, assign, readonly) BOOL isSupportLancerAuracast; + +/// 是否支持TWS +/// 说明设备支持TWS设备功能。 +/// 包含设备名称,弹窗快连,按键设置,灯效设置、工作模式等功能; +@property (nonatomic, assign, readonly)BOOL isSupportTwsFunc; + +/// 是否支持重命名 +/// 设备是否支持修改设备名 +@property (nonatomic, assign, readonly)BOOL isSupportRename; +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLDeviceConfigFuncModel.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLDeviceConfigFuncModel.h new file mode 100644 index 000000000..859b621eb --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLDeviceConfigFuncModel.h @@ -0,0 +1,242 @@ +// +// JLDeviceConfigFuncModel.h +// JL_BLEKit +// +// Created by EzioChan on 2022/10/31. +// Copyright © 2022 www.zh-jieli.com. All rights reserved. +// + +#import "ECOneToMorePtl.h" + +NS_ASSUME_NONNULL_BEGIN + +//MARK: - 必须功能 + +/// 必须功能 +@interface JLDeviceBasicFuncModel : NSObject + +/// 支持OTA +@property(nonatomic,assign)BOOL spOTA; + +/// 支持资源更新 +@property(nonatomic,assign)BOOL spSourceUpdate; + +/// 支持表盘增加/删除/查询 +@property(nonatomic,assign)BOOL spDialOperation; + +/// 支持表盘切换 +@property(nonatomic,assign)BOOL spDialSwitch; + +/// 支持表盘预览 +@property(nonatomic,assign)BOOL spDialPreview; + + +-(instancetype)init:(NSData *)data; + +@end + +//MARK: - 系统功能 +/// 系统功能 +@interface JLDeviceSystemFuncModel : NSObject + +/// 支持屏幕设置 +@property(nonatomic,assign)BOOL spScreenSetting; +/// 支持震动强度 +@property(nonatomic,assign)BOOL spVibrationIntensity; +/// 支持勿扰模式 +@property(nonatomic,assign)BOOL spDoNotDisturb; +/// 支持锻炼设置 +@property(nonatomic,assign)BOOL spExerciseSettings; +/// 支持断开提醒 +@property(nonatomic,assign)BOOL spDisconnectReminder; + +-(instancetype)init:(NSData *)data; + +@end + +//MARK: - 功能选项 +/// 功能选项 +@interface JLDeviceExportFuncModel : NSObject +/// 支持常用联系人 +@property(nonatomic,assign)BOOL spTopContacts; +/// 支持音乐文件浏览 +@property(nonatomic,assign)BOOL spMusicFileBrows; +/// 音乐文件删除、传输 +@property(nonatomic,assign)BOOL spMusicFileOp; +/// 支持闹钟设置 +@property(nonatomic,assign)BOOL spAlarmSettings; +/// 支持信息同步 +@property(nonatomic,assign)BOOL spSyncInfo; +/// 支持天气同步 +@property(nonatomic,assign)BOOL spSyncWeather; +/// 支持找手机/设备 +@property(nonatomic,assign)BOOL spFindPhoneOrDevice; +/// Ai 云功能 +@property(nonatomic,assign)BOOL spAiCloud; +/// Ai 表盘 +@property(nonatomic,assign)BOOL spAiDial; +/// 平台接口信息获取 +@property(nonatomic,assign)BOOL spOpenInfo; +/// 支持4G模块 +@property(nonatomic,assign)BOOL sp4GModel; + +/// 支持表盘信息拓展 +@property(nonatomic,assign)BOOL spDialInfoExtend; + +-(instancetype)init:(NSData *)data; + +@end + +//MARK: - 运动健康 + +/// 手表综合功能支持 +@interface JLHealthFuncComprehensive : NSObject + +/// 支持健康监控 +@property(nonatomic,assign)BOOL spHealthMonitor; +/// 支持个人信息 +@property(nonatomic,assign)BOOL spPersonInfo; +/// 支持睡眠检测 +@property(nonatomic,assign)BOOL spSleepMonitor; +/// 支持运动心率提醒 +@property(nonatomic,assign)BOOL spSportHeartRateRemind; +/// 支持久坐提醒 +@property(nonatomic,assign)BOOL spSedentaryRemind; +/// 支持压力自动检测 +@property(nonatomic,assign)BOOL spStressDetection; +/// 支持跌倒检测 +@property(nonatomic,assign)BOOL spFallDetection; +/// 支持传感器设置 +@property(nonatomic,assign)BOOL spSensorSetup; + +-(instancetype)init:(NSData *)data; + +@end + +/// 手表运动模式支持功能 +@interface JLHealthFuncSportModel : NSObject +/// 支持运动记录 +@property(nonatomic,assign)BOOL spRecord; +/// 支持运动统计 +@property(nonatomic,assign)BOOL spStatistics; +/// 支持室外运动 +@property(nonatomic,assign)BOOL spOutdoor; +/// 支持室内运动 +@property(nonatomic,assign)BOOL spIndoor; + +-(instancetype)init:(NSData *)data; +@end + +/// 手表计步功能支持功能 +@interface JLHealthFuncGSensorModel : NSObject +/// 是否存在该传感器 +@property(nonatomic,assign)BOOL spExist; +/// 支持运动步数 +@property(nonatomic,assign)BOOL spStep; + +-(instancetype)init:(NSData *)data; + +@end + + +/// 手表心率功能支持功能 +@interface JLHealthFuncHeartRateModel : NSObject +/// 是否存在该传感器 +@property(nonatomic,assign)BOOL spExist; +/// 支持连续测试 +@property(nonatomic,assign)BOOL spSerialTest; + +-(instancetype)init:(NSData *)data; + +@end + +/// 手表血氧功能支持功能 +@interface JLHealthFuncBloodOxygenModel : NSObject +/// 是否存在该传感器 +@property(nonatomic,assign)BOOL spExist; + +-(instancetype)init:(NSData *)data; + +@end + + +/// 手表海拔功能支持功能 +@interface JLHealthFuncAltitudeModel : NSObject +/// 是否存在该传感器 +@property(nonatomic,assign)BOOL spExist; + +-(instancetype)init:(NSData *)data; + +@end + +/// 手表GPS功能支持功能 +@interface JLHealthFuncGPSModel : NSObject +/// 是否存在该传感器 +@property(nonatomic,assign)BOOL spExist; + +-(instancetype)init:(NSData *)data; + +@end + + + +@interface JLDeviceHealthFuncModel : NSObject + +/// 手表综合功能支持 +@property(nonatomic,strong)JLHealthFuncComprehensive *spComprehensive; +/// 手表运动模式支持功能 +@property(nonatomic,strong)JLHealthFuncSportModel *spSportModel; +/// 手表计步功能支持功能 +@property(nonatomic,strong)JLHealthFuncGSensorModel *spGSensor; +/// 手表心率功能支持功能 +@property(nonatomic,strong)JLHealthFuncHeartRateModel *spHeartRate; +/// 手表血氧功能支持功能 +@property(nonatomic,strong)JLHealthFuncBloodOxygenModel *spBloodOxygen; +/// 手表海拔功能支持功能 +@property(nonatomic,strong)JLHealthFuncAltitudeModel *spAltitude; +/// 手表GPS功能支持功能 +@property(nonatomic,strong)JLHealthFuncGPSModel *spGPS; + +-(instancetype)init:(NSData *)data; + +@end + +//MARK: - 设备配置信息 + +/// 设备配置信息 +@interface JLDeviceConfigBasic:NSObject +/// 产品标志类型 +/// 0 - 手表 +/// 1 - TWS耳机 +/// 2 - SoundBox +/// 3 - Dongle 设备配置信息 +@property(nonatomic,assign)int deviceType; +/// 版本 +@property(nonatomic,assign)int version; + +/// 数据 +@property(nonatomic,copy)NSData *basicData; + +/// 功能配置所属设备的UUID +@property(nonatomic,strong)NSString * _Nullable mbleIdentifyStr; + +-(instancetype)init:(NSData *)data; + +@end + +//MARK: - 手表配置信息数据结构解析 + +/// 手表配置信息数据结构 +@interface JLDeviceConfigModel:JLDeviceConfigBasic +/// - 必须功能 +@property(nonatomic,strong)JLDeviceBasicFuncModel *basicFunc; +/// - 系统功能 +@property(nonatomic,strong)JLDeviceSystemFuncModel *systemFunc; +/// - 功能选项 +@property(nonatomic,strong)JLDeviceExportFuncModel * exportFunc; +/// - 运动健康 +@property(nonatomic,strong)JLDeviceHealthFuncModel *healthFunc; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLDeviceConfigSoundBox.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLDeviceConfigSoundBox.h new file mode 100644 index 000000000..b7f1bac94 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLDeviceConfigSoundBox.h @@ -0,0 +1,31 @@ +// +// JLDeviceConfigSoundBox.h +// JL_BLEKit +// +// Created by EzioChan on 2025/11/21. +// Copyright © 2025 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface JLDeviceConfigSoundBox : JLDeviceConfigBasic +/// 是否支持Auracast +@property (nonatomic, assign, readonly) BOOL isSupportAuracast; +/// 是否支持接收Auracast +@property (nonatomic, assign, readonly) BOOL isSupportReceiveAuracast; +/// 是否支持发射端 Auracast +@property (nonatomic, assign, readonly) BOOL isSupportLancerAuracast; +/// 是否支持TWS +/// 说明设备支持TWS设备功能。 +/// 包含设备名称,弹窗快连,按键设置,灯效设置、工作模式等功能; +@property (nonatomic, assign, readonly)BOOL isSupportTwsFunc; + +/// 是否支持重命名 +/// 设备是否支持修改设备名 +@property (nonatomic, assign, readonly)BOOL isSupportRename; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLDeviceConfigTws.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLDeviceConfigTws.h new file mode 100644 index 000000000..8cc50200d --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLDeviceConfigTws.h @@ -0,0 +1,59 @@ +// +// JLDeviceConfigTws.h +// JL_BLEKit +// +// Created by EzioChan on 2024/1/23. +// Copyright © 2024 www.zh-jieli.com. All rights reserved. +// + +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +/// TWS设备配置 +@interface JLDeviceConfigTws : JLDeviceConfigBasic + +/// 是否支持替换提示音 +@property(nonatomic, assign)BOOL isSupportReplaceTipsVoice; + +/// 是否支持语音翻译 +/// Voice translation +@property(nonatomic,assign,readonly)BOOL isSupportTranslate; + +/// 是否使用A2DP播放 +/// 翻译耳机功能扩展 +/// is use A2DP to play +@property(nonatomic,assign,readonly)BOOL isUseA2DP; + +/// 是否支持Opus立体声 +@property(nonatomic,assign,readonly)BOOL isSupportOpusStereo; + +/// 是否支持耳机健康功能 +/// is support ear health +@property(nonatomic,assign, readonly)BOOL isSupportHealthData; + +/// 是否支持Auracast +@property (nonatomic, assign, readonly) BOOL isSupportAuracast; + +/// 是否支持接收Auracast +@property (nonatomic, assign, readonly) BOOL isSupportReceiveAuracast; + +/// 是否支持发射端 Auracast +@property (nonatomic, assign, readonly) BOOL isSupportLancerAuracast; + +/// 是否支持心跳机制 +@property (nonatomic, assign, readonly) BOOL isSupportHeartBeat; + +/// 是否支持TWS +/// 说明设备支持TWS设备功能。 +/// 包含设备名称,弹窗快连,按键设置,灯效设置、工作模式等功能; +@property (nonatomic, assign, readonly)BOOL isSupportTwsFunc; + +/// 是否支持重命名 +/// 设备是否支持修改设备名 +@property (nonatomic, assign, readonly)BOOL isSupportRename; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLDhaFitting.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLDhaFitting.h new file mode 100644 index 000000000..61570c0e2 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLDhaFitting.h @@ -0,0 +1,111 @@ +// +// JLDhaFitting.h +// JL_BLEKit +// +// Created by EzioChan on 2022/6/28. +// Copyright © 2022 www.zh-jieli.com. All rights reserved. +// + +#import +#import + +NS_ASSUME_NONNULL_BEGIN + + + +@class JL_ManagerM; + +/// 左右声道类型 +typedef NS_ENUM(UInt8, DhaChannel) { + ///左声道 + DhaChannel_left = 0x00, + ///右声道 + DhaChannel_right = 0x01 +}; + +/// 左右耳验配类型 +typedef NS_ENUM(UInt8, DhaFittingType) { + ///验配左耳 + DhaFittingType_left = 0x00, + ///验配右耳 + DhaFittingType_right = 0x00, + ///验配左右耳 + DhaFittingType_All = 0x00, +}; + + +/// 辅听耳机的信息 +@interface DhaFittingInfo : NSObject +/// /*版本号:DHA_FITTING_VERSION*/ +@property(nonatomic,assign)uint8_t version; +/// /*通道数:DHA_FITTING_CHANNEL_MAX*/ +@property(nonatomic,assign)uint8_t ch_num; +/// /*通道频率组:获取通道对应的freq*/ +@property(nonatomic,strong)NSArray *ch_freq; + +- (instancetype)initWithData:(NSData *)basicData; + +@end + +@interface DhaFittingSwitch : NSObject + +@property(nonatomic,assign)BOOL leftOn; + +@property(nonatomic,assign)BOOL rightOn; + +@end + + +/// 辅听验配对象 +@interface DhaFittingData : NSObject +/// 左右声道 +@property(nonatomic,assign)DhaChannel channel; + +/// 左开关 +@property(nonatomic,assign)BOOL leftOn; +/// 右开关 +@property(nonatomic,assign)BOOL rightOn; + +/// 保留位 +@property(nonatomic,assign)uint8_t reserved; +/// 通道频率 +@property(nonatomic,assign)uint16_t freq; +/// 通道增益 +@property(nonatomic,assign)float gain; + +-(NSData*)beData; + +@end + + +typedef void(^DhaInfoBlock)(DhaFittingInfo *info,NSArray *gains); + + +@interface JLDhaFitting : NSObject + +/// 获取设备当前辅听的基础信息 +/// @param result 辅听耳机信息 +/// @param manager manager ++(void)auxiGetInfo:(DhaInfoBlock)result Manager:(JL_ManagerM*)manager; + +/// 进行辅听验配 +/// @param dhaFit 辅听设置对象 +/// @param manager manager +/// @param result 设备工作状态回调 +-(void)auxiCheckByStep:(DhaFittingData *)dhaFit Manager:(JL_ManagerM*)manager Result:(JL_CMD_RESPOND __nullable)result; + +/// 退出辅听验配 +/// @param manager 命令对象 +/// @param result 设备工作状态回调 +-(void)auxiCloseManager:(JL_ManagerM*)manager Result:(JL_CMD_RESPOND __nullable)result; + +/// 保存验配设置 +/// @param gains 验配的增益数组 +/// @param manager manager +/// @param type 左右耳类型 +/// @param result 回调结果 +-(void)auxiSaveGainsList:(NSArray *) gains Manager:(JL_ManagerM*)manager Type:(DhaFittingType)type Result:(JL_CMD_RESPOND __nullable)result; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLDialInfoExtentManager.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLDialInfoExtentManager.h new file mode 100644 index 000000000..c434e30f0 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLDialInfoExtentManager.h @@ -0,0 +1,38 @@ +// +// JLDialInfoExtentManager.h +// JL_BLEKit +// +// Created by EzioChan on 2024/2/20. +// Copyright © 2024 www.zh-jieli.com. All rights reserved. +// + +#import +#import "JL_TypeEnum.h" + +@class JLDialInfoExtentedModel; +@class JL_ManagerM; + +NS_ASSUME_NONNULL_BEGIN + +/// 表盘信息扩展内容回调 +/// Dial information extended content block +typedef void(^JLDialInfoExtentedBlock)(JL_CMDStatus status,JLDialInfoExtentedModel *_Nullable op); + +/// 请求设备表盘信息扩展内容类 +/// Request device dial information extended content class +@interface JLDialInfoExtentManager : NSObject + +/// 单例 +/// Single ++(instancetype)share; + +/// 开始请求表盘信息扩展内容 +/// Start request dial information extended content +/// - Parameters: +/// - manager: 设备 - Device manager +/// - block: 状态回调 - Dial information extended content block +-(void)getDialInfoExtented:(JL_ManagerM *)manager result:(JLDialInfoExtentedBlock)block; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLDialInfoExtentedModel.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLDialInfoExtentedModel.h new file mode 100644 index 000000000..f5c51807c --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLDialInfoExtentedModel.h @@ -0,0 +1,77 @@ +// +// JLDialInfoExtentedModel.h +// JL_BLEKit +// +// Created by EzioChan on 2024/2/20. +// Copyright © 2024 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@class JL_ManagerM; + +/// 设备表盘拓展信息 +/// device dial information extended model +@interface JLDialInfoExtentedModel : NSObject + + +/// 屏幕形状 +/// shape of screen +/// 默认形状 0x01 +/// default 0x01 circular +/// 0x01 - 圆形 circular +/// 0x02 - 矩形 rectangle +/// 0x03 - 圆角矩形 rounded rectangle +@property(nonatomic, assign) uint8_t shape; + + +/// 圆形半径 +/// radius of circle +@property(nonatomic, assign) CGFloat radius; + +/// 背景颜色 +/// background color +/// default is clean color +@property(nonatomic, strong) UIColor *backgroundColor; + +/// 屏幕尺寸 +/// 此项默认值为(240 * 240) +/// default is (240 * 240) +/// device screen sice +@property(nonatomic, assign) CGSize size; + +/// 是否支持多媒体(视频/GIF) +/// is support medias +@property(nonatomic, assign) BOOL isSupportMedias; + +/// 最大帧率(当支持多媒体时才有意义) +/// max fps +@property(nonatomic, assign) NSInteger maxFPS; + +/// 最大时长 +/// max duration +@property(nonatomic, assign) NSInteger maxDuration; + +/// 是否支持动画 ani 格式 +/// is support animation +@property(nonatomic, assign) BOOL isSupportAni; + +/// 是否支持视频 avi 格式 +@property(nonatomic, assign) BOOL isSupportAvi; + +/// 是否支持 Gif 格式 +/// is support gif +@property(nonatomic, assign) BOOL isSupportGif; + + +/// 初始化 +/// initialize +/// - Parameter data: 数据 data +/// - Returns: 实例 +-(instancetype)initWithData:(NSData *)data Manager:(JL_ManagerM*)manager; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLDisconnectRemindModel.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLDisconnectRemindModel.h new file mode 100644 index 000000000..e799fb084 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLDisconnectRemindModel.h @@ -0,0 +1,26 @@ +// +// JLDisconnectRemindModel.h +// JL_BLEKit +// +// Created by EzioChan on 2021/10/12. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import "JLwSettingModel.h" + +NS_ASSUME_NONNULL_BEGIN + +/// 手表蓝牙断开提醒设置 +@interface JLDisconnectRemindModel : JLwSettingModel +//开关 +@property(nonatomic,assign)BOOL status; +/// 提醒模式 +@property(nonatomic,assign)WatchRemindType rType; + +-(instancetype)initWithData:(NSData *)data; + +- (instancetype)initWithModel:(WatchRemindType)type Status:(BOOL)status; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLEcTimerHelper.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLEcTimerHelper.h new file mode 100644 index 000000000..57e83573f --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLEcTimerHelper.h @@ -0,0 +1,33 @@ +// +// JLEcTimerHelper.h +// JL_BLEKit +// +// Created by EzioChan on 2025/3/13. +// Copyright © 2025 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface JLEcTimerHelper : NSObject +/// 创建单次定时器 ++ (NSString *)startTimerWithTimeout:(NSTimeInterval)timeout completion:(void (^)(NSString *timerID))completion; + +/// 创建重复定时器 ++ (NSString *)setInterval:(NSTimeInterval)interval completion:(void (^)(NSString *timerID))completion; + +/// 停止定时器 ++ (void)stopTimer:(NSString *)timerID; + +/// 停止所有定时器 ++ (void)stopAllTimers; + +/// 开始计算耗时 ++ (NSUUID *)startCalculateTime; + +/// 停止计算耗时 ++ (NSTimeInterval) stopCalculateTime:(NSUUID *)uuid; +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLEmergencyContactModel.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLEmergencyContactModel.h new file mode 100644 index 000000000..ca5e0e6bc --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLEmergencyContactModel.h @@ -0,0 +1,26 @@ +// +// JLEmergencyContactModel.h +// JL_BLEKit +// +// Created by EzioChan on 2022/2/17. +// Copyright © 2022 www.zh-jieli.com. All rights reserved. +// + +#import "JLwSettingModel.h" + +NS_ASSUME_NONNULL_BEGIN + +/// 紧急联系人设置 +@interface JLEmergencyContactModel : JLwSettingModel + +/// 联系电话 +@property(nonatomic,strong)NSString *phoneNumber; + +-(instancetype)initWithData:(NSData *)data; + +-(instancetype)initWithPhoneNumber:(NSString *)phoneNumber; + + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLExerciseHeartRateRemindModel.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLExerciseHeartRateRemindModel.h new file mode 100644 index 000000000..f88b192e1 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLExerciseHeartRateRemindModel.h @@ -0,0 +1,31 @@ +// +// JLExerciseHeartRateRemindModel.h +// JL_BLEKit +// +// Created by EzioChan on 2021/10/12. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import "JLwSettingModel.h" +#import "JLWatchEnum.h" +NS_ASSUME_NONNULL_BEGIN + +/// 运动心率提醒设置 +@interface JLExerciseHeartRateRemindModel : JLwSettingModel +///开关 +@property(nonatomic,assign)BOOL status; +/// 上限心率0~255 +@property(nonatomic,assign)uint8_t maxRate; + +/// 心率区间划分方式: +/// 0x00:最大心率百分比 +/// 0x01:存储心率百分比s +@property(nonatomic,assign)WatchHeartRateType way; + +-(instancetype)initWithWay:(WatchHeartRateType)way maxRate:(uint8_t)max switchStatus:(BOOL)status; + +-(instancetype)initWithData:(NSData *)data; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLFallDetectionModel.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLFallDetectionModel.h new file mode 100644 index 000000000..fc9367ffb --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLFallDetectionModel.h @@ -0,0 +1,32 @@ +// +// JLFallDetectionModel.h +// JL_BLEKit +// +// Created by EzioChan on 2021/10/12. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import "JLwSettingModel.h" + +NS_ASSUME_NONNULL_BEGIN + +/// 跌到监测设置 +@interface JLFallDetectionModel : JLwSettingModel +///开关 +@property(nonatomic,assign)BOOL status; +/// 提醒模式 +@property(nonatomic,assign)WatchRemindType rType; +/// 电话号码 +@property(nonatomic,strong,readonly)NSString *phoneNumber; + +-(instancetype)initWithData:(NSData *)data; + +/// 构建一个跌倒监测的设置对象 +/// @param type 提醒类型 +/// @param status 开关 +/// @param pn 电话号码 +- (instancetype)initWithModel:(WatchRemindType)type Status:(BOOL)status phoneNumber:(NSString * _Nullable)pn; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLFlashOpMgr.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLFlashOpMgr.h new file mode 100644 index 000000000..af6fc6185 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLFlashOpMgr.h @@ -0,0 +1,163 @@ +// +// JLFlashOpMgr.h +// JL_BLEKit +// +// Created by EzioChan on 2025/3/14. +// Copyright © 2025 www.zh-jieli.com. All rights reserved. +// + +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +/// 表盘操作类型 +typedef NS_ENUM(NSUInteger, FlashDialOperationType) { + ///< 读取当前表盘 + FlashDialOperationTypeReadCurrent = 0, + ///< 设置表盘 + FlashDialOperationTypeSet, + ///< 通知表盘 + FlashDialOperationTypeNotify, + ///< 获取表盘额外信息 + FlashDialOperationTypeGetExtraInfo, + ///< 激活自定义表盘(设置表盘背景) + FlashDialOperationTypeActivateCustom, + ///< 获取表盘背景 + FlashDialOperationTypeGetBackground, + /// 通知表盘背景变更 + FlashDialOperationTypeNoteBackground +}; + +/// 设备 Flash 操作 +@interface JLFlashOpMgr : NSObject + +/// 超时 +@property(nonatomic, assign)NSInteger timeOutMax; + +/// 获取Flash信息 +/// - Parameters: +/// - managerM: 蓝牙管理对象 +/// - result: 回调 +-(void)flashGetInfoMode:(JL_ManagerM *)managerM + Result:(void (^)(JLModel_Flash *_Nullable model, NSError *_Nullable error))result; +/// 写数据 +/// @param managerM 蓝牙管理器 +/// @param offset 偏移 +/// @param data 写入数据 +/// @param isLast 是否是最后一次 +/// @param result 回调 +- (void)flashWriteData:(JL_ManagerM *)managerM + Offset:(uint32_t)offset + Data:(NSData*)data + isLast:(BOOL)isLast + Result:(void (^)(BOOL success, NSError *error))result; +/// 插入文件 +/// @param managerM 蓝牙管理器 +/// @param fileName 文件名称 +/// @param fileSize 文件大小 +/// @param isLast 是否是最后一次 +/// @param result 回调 +- (void)flashInsertFile:(JL_ManagerM *)managerM + fileName:(NSString *)fileName + fileSize:(uint32_t)fileSize + isLast:(BOOL)isLast + Result:(void (^)(BOOL, NSError * _Nullable error))result; +/// 操作表盘 +/// @param managerM 蓝牙管理器 +/// @param type 操作类型 +/// @param filePath 文件路径 +/// @param result 回调 +- (void)flashDialOperation:(JL_ManagerM *)managerM + type:(FlashDialOperationType)type + filePath:(nullable NSString *)filePath + result:(void (^)(BOOL success, NSData *_Nullable response, NSError *_Nullable error))result; +/// 擦除数据 +/// @param managerM 蓝牙管理器 +/// @param offset 偏移 +/// @param clusterSize 簇大小 +/// @param result 回调 +- (void)flashEraseData:(JL_ManagerM *)managerM + Offset:(uint32_t)offset + ClusterSize:(uint16_t)clusterSize + Result:(void (^)(BOOL success, NSError *_Nullable error))result; + +/// 删除文件 +/// @param managerM 蓝牙管理器 +/// @param filePath 文件路径 +/// @param isStart 是否是最后一次 +/// @param result 回调 +- (void)flashDeleteFile:(JL_ManagerM *)managerM + FilePath:(nullable NSString *)filePath + isStart:(BOOL)isStart + Result:(void (^)(BOOL success, NSError *_Nullable error))result; +/// 写保护 +/// @param managerM 蓝牙管理器 +/// @param isEnable 是否启用 +/// @param result 回调 +- (void)flashWriteProtect:(JL_ManagerM *)managerM + isEnable:(BOOL)isEnable + Result:(void (^)(BOOL success, NSError *_Nullable error))result; +/// 更新表盘标记 +/// @param managerM 蓝牙管理器 +/// @param isStart 是否开启 +/// @param result 回调 +- (void)flashUpdateWatchFace:(JL_ManagerM *)managerM + isStart:(BOOL)isStart + Result:(void (^)(BOOL success, NSError *_Nullable error))result; +/// 查询写入是否成功 版本 0 +/// @param managerM 蓝牙管理器 +/// @param crc16 crc +/// @param result 回调 +- (void)flashCheckWriteSuccessV0:(JL_ManagerM *)managerM + crc16:(uint16_t)crc16 + Result:(void (^)(BOOL success, NSError *_Nullable error))result; + +/// 查询写入是否成功 版本 1 +/// @param managerM 蓝牙管理器 +/// @param crc16 crc +/// @param isSplit 是否分包 +/// @param result 回调 +- (void)flashCheckWriteSuccessV1:(JL_ManagerM *)managerM + crc16:(uint16_t)crc16 + isSplit:(BOOL)isSplit + Result:(void (^)(BOOL success, uint16_t leftSize, NSError *_Nullable error))result; +/// 设置升级资源标志 +/// @param managerM 蓝牙管理器 +/// @param flag flag 0-2 +/// flag 0:结束 +/// flag 1:开始 +/// flag 2:特殊升级流程开启 +/// @param result 回调 +- (void)flashSetUpgradeFlag:(JL_ManagerM *)managerM + flag:(uint8_t)flag + result:(void (^)(BOOL success, NSError *_Nullable error))result; +/// 获取文件信息 +/// @param managerM 蓝牙管理器 +/// @param filePath 文件路径 +/// @param result 回调 +- (void)flashGetFileInfo:(JL_ManagerM *)managerM + filePath:(NSString *)filePath + result:(void (^)(uint32_t size, uint16_t crc16, NSError *_Nullable error))result; + +/// 获取 Flash 剩余空间 +/// @param managerM 蓝牙管理器 +/// @param result 回调 +- (void)flashGetRemainingSpace:(JL_ManagerM *)managerM + result:(void (^)(uint32_t clusterLeftNum, NSError *_Nullable error))result; +/// 还原系统 +/// @param managerM 蓝牙管理器 +/// @param result 回调 +- (void)flashRestoreSystem:(JL_ManagerM *)managerM + result:(void (^)(BOOL success, NSError *_Nullable error))result; + +/// 获取资源存储空间 +/// @param managerM 蓝牙管理器 +/// @param result 回调 +- (void)flashGetResourceSpace:(JL_ManagerM *)managerM + result:(void (^)(uint32_t resSpace, NSError *_Nullable error))result; + +@end + + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLHttpHelper.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLHttpHelper.h new file mode 100644 index 000000000..765483722 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLHttpHelper.h @@ -0,0 +1,24 @@ +// +// HttpHelper.h +// JL_BLEKit +// +// Created by EzioChan on 2022/7/2. +// Copyright © 2022 www.zh-jieli.com. All rights reserved. +// + +#import + +typedef void(^JLHttpDataCbk)(NSData * _Nullable data); +NS_ASSUME_NONNULL_BEGIN + +@interface JLHttpHelper : NSObject + ++(instancetype)share; + +-(void)dataTask:(NSURL *)url Result:(JLHttpDataCbk)result; + +-(NSData *)dataTaskSync:(NSURL *)url; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLModelCardInfo.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLModelCardInfo.h new file mode 100644 index 000000000..2377846ae --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLModelCardInfo.h @@ -0,0 +1,109 @@ +// +// JLModelCardInfo.h +// JL_BLEKit +// +// Created by EzioChan on 2023/11/30. +// Copyright © 2023 www.zh-jieli.com. All rights reserved. +// + +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface JLCardInfo : NSObject + +/// 存储类型 +/// 0x00 USB +/// 0x01 SD0 +/// 0x02 SD1 +/// 0x03 flash +/// 0x04 lineIn +/// 0x05 flash2 +/// 0x06 flash3 +/// 0x07 ReservedArea +@property(nonatomic,assign)uint8_t type; + +/// 是否在线 +@property(nonatomic,assign)BOOL isOnline; + +/// 文件句柄 +@property(nonatomic,copy)NSData *handle; + +@end + +/// 存储卡信息 +@interface JLModelCardInfo:NSObject + +/// 版本信息 +@property(nonatomic,assign)uint8_t version; + +/// 存储卡在线数组 +@property(nonatomic,strong,readonly)NSArray *cardArray; + +/// USB 在线状态 +@property (nonatomic, assign) BOOL usbOnline; + +/// SD0 在线状态 +@property (nonatomic, assign) BOOL sd0Online; + +/// SD1 在线状态 +@property (nonatomic, assign) BOOL sd1Online; + +/// lineIn 在线状态 +@property (nonatomic, assign) BOOL lineInOnline; + +/// flash 在线状态 +@property (nonatomic, assign) BOOL flashOnline; + +/// flash 2 在线状态 +@property (nonatomic, assign) BOOL flash2Online; + +/// flash 3 在线状态 +@property (nonatomic, assign) BOOL flash3Online; + +/// ReservedArea 在线状态 +@property (nonatomic, assign) BOOL reservedAreaOnline; + +/// 是否处于设备复用状态 +@property (nonatomic, assign) BOOL isComplex; + +/// USB 句柄 +@property (nonatomic, copy)NSData *usbHandle; + +/// SD0 句柄 +@property (nonatomic, copy)NSData *sd0Handle; + +/// SD1 句柄 +@property (nonatomic, copy)NSData *sd1Handle; + +/// flash 句柄 +@property (nonatomic, copy)NSData *flashHandle; + +/// flash2 句柄 +@property (nonatomic, copy)NSData *flash2Handle; + +/// flash3 句柄 +@property (nonatomic, copy)NSData *flash3Handle; + +/// ReservedArea 句柄 +@property (nonatomic, copy)NSData *reservedAreaHandle; + +/// 卡在线数组信息 +@property (nonatomic, strong)NSArray *cardInfos; + +-(instancetype)initData:(NSData *)data; + +/// 是否具备存储卡在线 +-(BOOL)hasStorageCard; + +/// 获取存储卡句柄 +/// - Parameter cardType: 存储卡类型 +-(NSData *_Nullable)getCardHandle:(JL_CardType)cardType; + +@end + + + + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLModelDevFunc.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLModelDevFunc.h new file mode 100644 index 000000000..c57d0ed32 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLModelDevFunc.h @@ -0,0 +1,70 @@ +// +// JLModelDevFunc.h +// JL_BLEKit +// +// Created by EzioChan on 2023/11/29. +// Copyright © 2023 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface JLModelDevFunc : NSObject + +/// 当前模式 +/// 0x16代表低功耗模式) +@property (nonatomic, assign) uint8_t currentModel; + +/// 设备是否支持蓝牙(EDR) +@property (nonatomic, assign) BOOL isSupportEDR; + +/// 设备是否支持音乐模式 +@property (nonatomic, assign) BOOL isSupportDevMusic; + +/// 设备是否支持 RTC +@property (nonatomic, assign) BOOL isSupportDevRTC; + +/// 设备是否支持 LineIn +@property (nonatomic, assign) BOOL isSupportDevLineIn; + +/// 设备是否支持 FM +@property (nonatomic, assign) BOOL isSupportDevFm; + +/// 设备是否支持氛围灯 +@property (nonatomic, assign) BOOL isSupportDevLight; + +/// 设备是否支持 FMTX +@property (nonatomic, assign) BOOL isSupportDevFMTX; + +/// 设备是否支持 EQ +@property (nonatomic, assign) BOOL isSupportDevEQ; + +/// 设备是否支持 SPDIF +@property (nonatomic, assign, readonly) BOOL isSupportSPDIF; + +/// 设备是否支持 PC Server +@property (nonatomic, assign, readonly) BOOL isSupportPCServer; + +/// 是否显示不在线的usb 、sd、linein功能 +@property (nonatomic, assign) BOOL isShowOfflineFunc; + +/// 设备是否持有 USB +@property (nonatomic, assign) BOOL isSupportUSB; + +/// 设备是否持有 SD0 +@property (nonatomic, assign) BOOL isSupportSD0; + +/// 设备是否持有 SD1 +@property (nonatomic, assign) BOOL isSupportSD1; + +/// 设备是否支持网络电台 +@property (nonatomic, assign) BOOL isSupportNetRadio; + +-(instancetype)initWithData:(NSData *)data; + +@end + + + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLModelNoiseDetection.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLModelNoiseDetection.h new file mode 100644 index 000000000..5b61f6797 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLModelNoiseDetection.h @@ -0,0 +1,49 @@ +// +// JLModelNoiseDetection.h +// JL_BLEKit +// +// Created by EzioChan on 2023/9/13. +// Copyright © 2023 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN +@class JLModelNoiseDetection; + +@protocol JLModelNoiseDetectionDelegate + +-(void)noiseDetectionGetInfo:(JLModelNoiseDetection *)model; + +@end + +typedef void(^JLModelNoiseDetectionBlock)(JLModelNoiseDetection *model); + +/// TWS风噪检测 +@interface JLModelNoiseDetection : JLCmdBasic + +/// 版本号 +@property(nonatomic,assign)uint8_t version; + +/// 风噪检测: +/// 0x00:关闭 +/// 0x01:开启 +@property(nonatomic,assign)uint8_t status; + +@property(nonatomic,weak)id delegate; + +/// 获取设备风噪检测 +/// - Parameter manager: 设备对象 +-(void)noiseDetectionStatusGet:(JL_ManagerM *)manager Result:(JLModelNoiseDetectionBlock)block; + +/// 设置设备风噪检测 +/// - Parameters: +/// - manager: 设备对象 +/// - status: 开关 +/// - result:回调 +-(void)noiseDetectionStatusSet:(JL_ManagerM *)manager Status:(uint8_t)status Result:(JL_CMD_RESPOND)result; + + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLModelPCServer.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLModelPCServer.h new file mode 100644 index 000000000..81ba71421 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLModelPCServer.h @@ -0,0 +1,39 @@ +// +// JLModelPCServer.h +// JL_BLEKit +// +// Created by EzioChan on 2024/10/15. +// Copyright © 2024 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +typedef NS_ENUM(NSUInteger, JLPcServerOpType) { + /// previous song + /// 上一首 + JLPcServerOpTypePrevious = 0x00, + /// next song + /// 下一首 + JLPcServerOpTypeNext = 0x01, +}; + +/// PC 从机模式 +@interface JLModelPCServer : NSObject + +/// 是否正在播放 +@property(nonatomic,assign)BOOL playStatus; + +/// 操作类型 +@property(nonatomic,assign)JLPcServerOpType opType; + +-(instancetype)initParseData:(NSData *)data; + +/// 更新 +/// - Parameter data: 数据 +- (void)updateParseData:(NSData *)data; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLModelSceneNoiseReduction.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLModelSceneNoiseReduction.h new file mode 100644 index 000000000..80963a2ee --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLModelSceneNoiseReduction.h @@ -0,0 +1,51 @@ +// +// JLModelSceneNoiseReduction.h +// JL_BLEKit +// +// Created by EzioChan on 2023/9/13. +// Copyright © 2023 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN +@class JLModelSceneNoiseReduction; + +@protocol JLModelSceneNoiseReductionDelegate + +-(void)sceneNoiseReductionGetInfo:(JLModelSceneNoiseReduction *)model; + +@end + +typedef void(^JLSceneNoiseReductionBlock)(JLModelSceneNoiseReduction *model); + +/// TWS场景降噪 +@interface JLModelSceneNoiseReduction : JLCmdBasic + +/// 版本号 +@property(nonatomic,assign)uint8_t version; + +/// 场景降噪模式: +/// 0x00:智能 +/// 0x01:轻度 +/// 0x02:均衡 +/// 0x03:深度 +@property(nonatomic,assign)uint8_t scene; + +@property(nonatomic,weak)id delegate; + +/// 获取设备场景降噪 +/// - Parameter manager: 设备对象 +-(void)sceneNoiseStatusGet:(JL_ManagerM *)manager Result:(JLSceneNoiseReductionBlock)block; + +/// 设置设备场景降噪 +/// - Parameters: +/// - manager: 设备对象 +/// - scene: 场景降噪 +/// - result:回调 +-(void)sceneNoiseStatusSet:(JL_ManagerM *)manager Scene:(uint8_t)scene Result:(JL_CMD_RESPOND)result; + + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLModelSmartPickFree.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLModelSmartPickFree.h new file mode 100644 index 000000000..cc0c0c24c --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLModelSmartPickFree.h @@ -0,0 +1,93 @@ +// +// JLModelSmartPickFree.h +// JL_BLEKit +// +// Created by EzioChan on 2023/9/12. +// Copyright © 2023 www.zh-jieli.com. All rights reserved. +// + +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +@class JL_ManagerM; +@class JLModelSmartPickFree; + +@protocol JLModelSmartPickFreeDelegate + +-(void)smartPickFreeGetInfo:(JLModelSmartPickFree *)model; + +@end + +/// 智能免摘的耳机管理类 +@interface JLModelSmartPickFree : NSObject + +/// 版本号 +@property(nonatomic,assign)uint8_t version; + +/// 功能类型 +/// 0x00:仅设置开关 +/// 0x01:仅设置灵敏度 +/// 0x02:仅设置启动后关闭时间 +/// 0xff:仅获取全部参数 +@property(nonatomic,assign)uint8_t funcType; + +/// 功能开关 +/// 当功能类型 funcType 为 0x00 时此属性需要对应设置 +/// 当功能类型 funcType 为 0xFF 时此属性为设备端功能开关状态 +@property(nonatomic,assign)BOOL funcStatus; + +/// 灵敏度 +/// 当功能类型 funcType 为 0x01 时此属性需要对应设置 +/// 当功能类型 funcType 为 0xFF 时此属性为设备端灵敏度 +/// 0x00:高灵敏度 +/// 0x01:低灵敏度 +@property(nonatomic,assign)uint8_t senivitiy; + +///启动后关闭时间 +///当功能类型 funcType 为 0x02 时此属性需要对应设置的时间 +///当功能类型 funcType 为 0xFF 时此属性为设备端启动后关闭时间 +///0x00:不自动关闭; +///0x01:短(5s); +///0x02:标准(15s); +///0x03:长(30s); +@property(nonatomic,assign)uint8_t autoInterval; + + +@property(nonatomic,weak)id delegate; + +/// 设置智能免摘功能开关 +/// - Parameters: +/// - manager: 设备对象 +/// - status: 开关 +/// - result: 结果回调 +-(void)smartPickFreeSetOn:(JL_ManagerM *)manager st:(BOOL)status Result:(JL_CMD_RESPOND)result; + +/// 设置智能免摘灵敏度 +/// - Parameters: +/// - manager: 设备对象 +/// - senivitiy: 灵敏度 +/// 0x00:高灵敏度 +/// 0x01:低灵敏度 +/// - result: 结果回调 +-(void)smartPickFreeSetSenivitiy:(JL_ManagerM *)manager Senivitiy:(uint8_t)senivitiy Result:(JL_CMD_RESPOND)result; + +/// 设置智能免摘启动后关闭时间 +/// - Parameters: +/// - manager: 设备对象 +/// - interval: 启动后关闭时间 +/// 0x01:短(5s); +/// 0x02:标准(15s); +/// 0x03:长(30s); +/// - result: 结果回调 +-(void)smartPickFreeSetAutoInterval:(JL_ManagerM *)manager Interval:(uint8_t)interval Result:(JL_CMD_RESPOND)result; + + +/// 查询设备状态 +/// - Parameter manager: 设备对象 +-(void)smartPickFreeGet:(JL_ManagerM *)manager; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLModelSpdif.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLModelSpdif.h new file mode 100644 index 000000000..da4007b33 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLModelSpdif.h @@ -0,0 +1,38 @@ +// +// JLModelSpdif.h +// JL_BLEKit +// +// Created by EzioChan on 2024/10/15. +// Copyright © 2024 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +typedef NS_ENUM(NSUInteger, JLSpdifAudioType) { + /// HDMI + JLSpdifAudioTypeHDMI = 0x00, + /// 光纤 Fiber Optics + JLSpdifAudioTypeFO = 0x01, + /// 同轴 + JLSpdifAudioTypeCoaxial = 0x02, +}; + +@interface JLModelSpdif : NSObject + +/// 是否正在播放 +@property(nonatomic,assign)BOOL playStatus; + +/// 音源 +@property(nonatomic,assign)JLSpdifAudioType audioType; + +-(instancetype)initParseData:(NSData *)data; + +/// 更新数据 +/// - Parameter data: 数据 +-(void)updateParseData:(NSData *)data; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLModelVocalBoost.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLModelVocalBoost.h new file mode 100644 index 000000000..0a64173cd --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLModelVocalBoost.h @@ -0,0 +1,54 @@ +// +// JLModelVocalBoost.h +// JL_BLEKit +// +// Created by EzioChan on 2023/9/13. +// Copyright © 2023 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + + +@class JLModelVocalBoost; + +@protocol JLModelVocalBoostDelegate + +-(void)vocalBoostGetInfo:(JLModelVocalBoost *)model; + +@end + +typedef void(^JLModelVocalBoostBlock)(JLModelVocalBoost *model); + + +/// TWS人声增强 +@interface JLModelVocalBoost : JLCmdBasic + +/// 版本号 +@property(nonatomic,assign)uint8_t version; + +/// 人声增强: +/// 0x00: 关闭人声增强模式; +/// 0x01: 开启人声增强模式 +@property(nonatomic,assign)uint8_t status; + +@property(nonatomic,weak)id delegate; + +/// 获取设备人声增强 +/// - Parameter manager: 设备对象 +-(void)vocalBoostStatusGet:(JL_ManagerM *)manager Result:(JLModelVocalBoostBlock)block; + +/// 设置设备人声增强 +/// - Parameters: +/// - manager: 设备对象 +/// - status: 开关 +/// 0x00: 关闭人声增强模式; +/// 0x01: 开启人声增强模式 +/// - result:回调 +-(void)vocalBoostStatusSet:(JL_ManagerM *)manager Status:(uint8_t)status Result:(JL_CMD_RESPOND)result; + + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLModel_ANC.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLModel_ANC.h new file mode 100644 index 000000000..7b586e92a --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLModel_ANC.h @@ -0,0 +1,47 @@ +// +// JLModel_ANC.h +// JL_BLEKit +// +// Created by 杰理科技 on 2021/10/15. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +typedef NS_ENUM(UInt8,JL_AncMode) { + JL_AncMode_Normal = 0, //普通模式 + JL_AncMode_NoiseReduction = 1, //降噪模式 + JL_AncMode_Transparent = 2, //通透模式 +}; + +@interface JLModel_ANC : NSObject +@property(assign,nonatomic)JL_AncMode mAncMode; //耳机降噪模式 +@property(assign,nonatomic) uint16_t mAncMax_L; //左耳最大增益 +@property(assign,nonatomic) uint16_t mAncCurrent_L; //左耳当前增益 +@property(assign,nonatomic) uint16_t mAncMax_R; //右耳最大增益 +@property(assign,nonatomic) uint16_t mAncCurrent_R; //右耳当前增益 +-(NSData*)dataModel; +@end + + + +/// 手机名/经典蓝牙地址信息 +@interface JLTWSAddrNameInfo : NSObject + +/// 是否被绑定 +@property(nonatomic,assign)uint8_t isBind; + +/// 手机蓝牙地址 +@property(nonatomic,strong)NSData *phoneEdrAddr; + +/// 手机名称 +@property(nonatomic,strong)NSString *phoneName; + +/// 初始化数据成对象 +/// - Parameter data: 数据内容 ++(NSArray*)dataBeObjc:(NSData *)data; + +@end +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLModel_AlarmSetting.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLModel_AlarmSetting.h new file mode 100644 index 000000000..a4b6f8535 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLModel_AlarmSetting.h @@ -0,0 +1,24 @@ +// +// JLModel_AlarmSetting.h +// JL_BLEKit +// +// Created by 杰理科技 on 2021/10/15. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface JLModel_AlarmSetting : NSObject +@property(assign,nonatomic)uint8_t index; //闹钟索引 +@property(assign,nonatomic)uint8_t isCount; //是否可以设置【闹铃次数】 +@property(assign,nonatomic)uint8_t count; //闹铃次数 +@property(assign,nonatomic)uint8_t isInterval; //是否可以设置【时间间隔】 +@property(assign,nonatomic)uint8_t interval; //时间间隔 +@property(assign,nonatomic)uint8_t isTime; //是否可以设置【时间长度】 +@property(assign,nonatomic)uint8_t time; //时间长度 +-(NSData*)dataModel; +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLModel_BT.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLModel_BT.h new file mode 100644 index 000000000..86b4a4098 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLModel_BT.h @@ -0,0 +1,20 @@ +// +// JLModel_BT.h +// JL_BLEKit +// +// Created by 杰理科技 on 2021/10/15. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface JLModel_BT : NSObject +@property(assign,nonatomic)uint32_t mBtType; +@property(strong,nonatomic)NSData *__nullable mBtAddress; +@property(assign,nonatomic)uint8_t mBtRssi; +@property(strong,nonatomic)NSString *__nullable mBtName; +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLModel_Device.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLModel_Device.h new file mode 100644 index 000000000..d3af4edfe --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLModel_Device.h @@ -0,0 +1,643 @@ +// +// JLModel_Device.h +// JL_BLEKit +// +// Created by 杰理科技 on 2021/10/15. +// Modify by EzioChan on 2023/03/16 +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +typedef NS_ENUM(UInt8, JL_DevicePlatform) { + JL_DevicePlatformTuring = 0, //适用于【图灵】 + JL_DevicePlatformDeepbrain = 1, //适用于【Deepbrain】 + JL_DevicePlatformUnknown, +}; +typedef NS_ENUM(UInt8, JL_SDKType) { + JL_SDKTypeAI = 0x0, //AI SDK AC692x + JL_SDKTypeST = 0x1, //标准 SDK AC692x + JL_SDKType693xTWS = 0x2, //TWS + JL_SDKType695xSDK = 0x3, // + JL_SDKType697xTWS = 0x4, //TWS + JL_SDKType696xSB = 0x5, //696x_soundbox + JL_SDKType696xTWS = 0x6, //TWS + JL_SDKType695xSC = 0x7, //695x_sound_card + JL_SDKType695xWATCH = 0x8, //BR23 Watch + JL_SDKType701xWATCH = 0x9, //BR28 Watch + JL_SDKTypeManifestEarphone = 0x0A, //ManifestEarphone + JL_SDKTypeManifestSoundbox = 0x0B, //ManifestSoundbox + JL_SDKTypeChargingCase = 0x0C, //ChargingCase 彩屏充电仓 + JL_SDKType707nWATCH = 0x0D, //707N Watch + JL_SDKTypeDongle = 0x0E, //Dongle + JL_SDKTypeCommon = 0x0F, //通用 + JL_SDKTypeUnknown, +}; +typedef NS_ENUM(UInt8, JL_FunctionCode) { + JL_FunctionCodeBT = 0, //BT + JL_FunctionCodeMUSIC = 1, //音乐 + JL_FunctionCodeRTC = 2, //闹钟 + JL_FunctionCodeLINEIN = 3, //LineIn + JL_FunctionCodeFM = 4, //FM + JL_FunctionCodeLIGHT = 5, //LIGHT + JL_FunctionCodeFMTX = 6, //发射频点 + JL_FunctionCodeEQ = 7, //EQ + JL_FunctionCodeSPDIF = 8, //SPDIF + JL_FunctionCodePCServer = 9, //PCServer + JL_FunctionCodeCOMMON = 0xff, //通用 +}; + +typedef NS_ENUM(UInt8, JL_FCmdMusic) { + JL_FCmdMusicPP = 0x01, //PP按钮 + JL_FCmdMusicPREV = 0x02, //上一曲 + JL_FCmdMusicNEXT = 0x03, //下一曲 + JL_FCmdMusicMODE = 0x04, //切换播放模式 + JL_FCmdMusicEQ = 0x05, //EQ + JL_FCmdMusicFastBack = 0x06, //快退 + JL_FCmdMusicFastPlay = 0x07, //快进 +}; + +typedef NS_ENUM(UInt8, JL_OtaBleAllowConnect) { + JL_OtaBleAllowConnectYES = 0, //OTA 允许BLE连接 + JL_OtaBleAllowConnectNO = 1, //OTA 禁止BLE连接 + JL_OtaBleAllowConnectUnknow = 2, //未定义 +}; +typedef NS_ENUM(UInt8, JL_BLEOnly) { //是否仅仅支持BLE + JL_BLEOnlyNO = 0, //否 + JL_BLEOnlyYES = 1, //是 +}; +typedef NS_ENUM(UInt8, JL_FasheEnable) { //是否发射模式 + JL_FasheEnableNO = 0, //否 + JL_FasheEnableYES = 1, //是 +}; +typedef NS_ENUM(UInt8, JL_FasheType) { //当前是否为发射模式 + JL_FasheTypeNO = 0, //否 + JL_FasheTypeYES = 1, //是 +}; +typedef NS_ENUM(UInt8, JL_MD5Type) { //是否支持MD5校验 + JL_MD5TypeNO = 0, //否 + JL_MD5TypeYES = 1, //是 +}; +typedef NS_ENUM(UInt8, JL_GameType) { //是否为游戏模式 + JL_GameTypeNO = 0, //否 + JL_GameTypeYES = 1, //是 +}; +typedef NS_ENUM(UInt8, JL_SearchType) { //是否支持查找设备 + JL_SearchTypeNO = 0, //否 + JL_SearchTypeYES = 1, //是 +}; +typedef NS_ENUM(UInt8, JL_KaraokeType) { //是否支持卡拉OK + JL_KaraokeTypeNO = 0, //否 + JL_KaraokeTypeYES = 1, //是 +}; +typedef NS_ENUM(UInt8,JL_KaraokeEQType){ //是否禁止app调节设备音效 + JL_KaraokeEQTypeNO = 0, //不禁止 + JL_KaraokeEQTypeYES = 1, //禁止 +}; +typedef NS_ENUM(UInt8,JL_FlashType){ //是否支持外挂Flash + JL_FlashTypeNO = 0, //不支持 + JL_FlashTypeYES = 1, //支持 +}; +typedef NS_ENUM(UInt8,JL_AncType){ //是否支持ANC + JL_AncTypeNO = 0, //不支持 + JL_AncTypeYES = 1, //支持 +}; +typedef NS_ENUM(UInt8, JL_AudioFileType) { //是否支持音频文件传输 + JL_AudioFileTypeNO = 0, //否 + JL_AudioFileTypeYES = 1, //是 +}; +typedef NS_ENUM(UInt8, JL_FileSubcontractTransferCrc16Type){//文件分包传输是否支持crc16方式 + JL_FileSubcontractTransferCrc16TypeNO = 0, //不支持 + JL_FileSubcontractTransferCrc16TypeYES = 1, //支持 +}; +typedef NS_ENUM(UInt8, JL_ReadFileInNewWayType){ //是否以新的方式读取固件文件 + JL_ReadFileInNewWayTypeNO = 0, //不支持 + JL_ReadFileInNewWayTypeYES = 1, //支持 +}; + +typedef NS_ENUM(UInt8, JL_SmallFileWayType){ //是否支持小文件传输 + JL_SmallFileWayTypeNO = 0, //不支持 + JL_SmallFileWayTypeYES = 1, //支持 +}; + +typedef NS_ENUM(UInt8,JL_CALLType) { + JL_CALLType_OFF = 0, //空闲 + JL_CALLType_ON = 1, //通话中 +}; + +typedef NS_ENUM(UInt8, JL_LightState) { + JL_LightStateClose = 0x00, //关闭 + JL_LightStateOpen = 0x01, //开启 + JL_LightStateSetting = 0x02, //设置模式 +}; +typedef NS_ENUM(UInt8, JL_LightMode) { + JL_LightModeNormal = 0x00, //彩色模式 + JL_LightModeFlash = 0x01, //闪烁模式 + JL_LightModeScene = 0x02, //情景模式 +}; +typedef NS_ENUM(UInt8, JL_LightFlashModeIndex) { + JL_LightModeIndexColorfulFlash = 0x00, //七彩闪烁 + JL_LightModeIndexRedFlash = 0x01, //红色闪烁 + JL_LightModeIndexOrangeFlash = 0x02, //橙色闪烁 + JL_LightModeIndexYeallowFlash = 0x03, //黄色闪烁 + JL_LightModeIndexGreenFlash = 0x04, //绿色闪烁 + JL_LightModeIndexCyanFlash = 0x05, //青色闪烁 + JL_LightModeIndexBlueFlash = 0x06, //蓝色闪烁 + JL_LightModeIndexPurpleFlash = 0x07, //紫色闪烁 +}; + +typedef NS_ENUM(UInt8, JL_LightFlashModeFrequency) { + JL_LightFlashModeFrequencyFast = 0x00, //快闪 + JL_LightFlashModeFrequencySlow = 0x01, //慢闪 + JL_LightFlashModeFrequencyNormal = 0x02, //缓闪 + JL_LightFlashModeFrequencyMusic = 0x03, //音乐闪烁 +}; + +typedef NS_ENUM(UInt8, JL_LightSceneMode) { + JL_LightSceneModeRainbow = 0x00, //彩虹 + JL_LightSceneModeHeartbeat = 0x01, //心跳 + JL_LightSceneModeCandlelight = 0x02, //烛火 + JL_LightSceneModeNightLight = 0x03, //夜灯 + JL_LightSceneModeStage = 0x04, //舞台 + JL_LightSceneModeDiffuseColourBreathing = 0x05, //漫彩呼吸 + JL_LightSceneModeDiffuseRedBreathing = 0x06, //漫红呼吸 + JL_LightSceneModeDiffuseGreenBreathing = 0x07, //漫绿呼吸 + JL_LightSceneModeDiffuseBlueBreathing = 0x08, //漫蓝呼吸 + JL_LightSceneModeGreenMood = 0x09, //绿色心情 + JL_LightSceneModeSettingSunView = 0x10, //夕阳美景 + JL_LightSceneModeMusicRhythm = 0x11, //音乐律动 +}; + +typedef NS_ENUM(UInt8, JL_FileHandleType) { //文件句柄 + JL_FileHandleTypeSD_0 = 0, //SD_0 + JL_FileHandleTypeSD_1 = 1, //SD_1 + JL_FileHandleTypeFLASH = 2, //FLASH + JL_FileHandleTypeUSB = 3, //USB + JL_FileHandleTypeLineIn = 4, //LineIn + JL_FileHandleTypeFLASH2 = 5, //FLASH2 + JL_FileHandleTypeFLASH3 = 6, //FLASH3 + JL_FileHandleTypeReservedArea = 7, //ReservedArea +}; + +typedef NS_ENUM(UInt8, JL_MusicMode) { + JL_MusicModeLoopAll = 0x01, //全部循环 + JL_MusicModeLoopDevice = 0x02, //单设备循环 + JL_MusicModeLoopOne = 0x03, //单曲循环 + JL_MusicModeRandomDevice = 0x04, //单设备随机 + JL_MusicModeLoopFolder = 0x05, //文件夹循环 +}; + +typedef NS_ENUM(UInt8, JL_MusicStatus) { + JL_MusicStatusPlay = 0x01, //播放 + JL_MusicStatusPause = 0x00, //暂停 +}; + +typedef NS_ENUM(UInt8, JL_EQType) { //EQ段数类型 + JL_EQType10 = 0, //固定10段式 + JL_EQTypeMutable = 1, //动态EQ段 +}; + +//---------------------------------------------------------// +#pragma mark - RTC +typedef NS_ENUM(UInt8, JL_RTCAlarmType) { //是否支持闹铃设置 + JL_RTCAlarmTypeNO = 0, //不支持 + JL_RTCAlarmTypeYES = 1, //支持 +}; +//---------------------------------------------------------// +#pragma mark - LINEIN +typedef NS_ENUM(UInt8, JL_LineInStatus) { + JL_LineInStatusPause = 0x00, //暂停 + JL_LineInStatusPlay = 0x01, //播放 + JL_LineInStatusUnknown, +}; +//---------------------------------------------------------// +#pragma mark - FM +typedef NS_ENUM(UInt8, JL_FMStatus) { + JL_FMStatusPause = 0x01, //播放 + JL_FMStatusPlay = 0x02, //暂停 + JL_FMStatusSearching = 0x03, //搜索中 + JL_FMStatusUnknown, +}; +typedef NS_ENUM(UInt8, JL_FMMode) { + JL_FMMode875Mhz = 0x00, //87.5-108.0Mhz + JL_FMMode760Mhz = 0x01, //76.5-108.0Mhz + JL_FMModeUnknown, +}; + +typedef NS_ENUM(UInt8,JL_ReverberationType) { + JL_ReverberationTypeNormal = 0, //混响 + JL_ReverberationTypeDynamic = 1, //限幅器 +}; + + +@interface JLModel_Device : NSObject + +///设备UUID +@property (copy, nonatomic) NSString *mBLE_UUID; + +///协议版本 +@property (copy, nonatomic) NSString *versionProtocol; + +///固件版本 +@property (copy, nonatomic) NSString *versionFirmware; + +/// 单包固件最大发送值,APP单次能收到最大的值 +@property (assign,nonatomic) NSInteger getMtu; + +/// 单包固件最大接收值(MaxMtu)APP单次可发送最大值 +@property (assign,nonatomic) NSInteger sendMtu; + +///SDK类型 +@property (assign,nonatomic) JL_SDKType sdkType; + +///电量0~9 +@property (assign,nonatomic) NSUInteger battery; + +/// 是否支持音量同步 +@property (assign,nonatomic) BOOL isSyncVoice; + +/// 最低允许升级资源/OTA电量 +@property (assign,nonatomic) NSInteger lowBattery; + +///当前音量 +@property (assign,nonatomic) NSUInteger currentVol; + +///最大音量 +@property (assign,nonatomic) NSUInteger maxVol; + +///经典蓝牙地址 +@property (copy, nonatomic) NSString *btAddr; + +///平台序列号 +@property (copy, nonatomic) NSString *license; + +///平台类型(图灵,Deepbrain) +@property (assign,nonatomic) JL_DevicePlatform platform; + +///经典蓝牙状态 +@property (assign,nonatomic) JL_DeviceBTStatus btStatus; + +///BIT(0):BT BIT(1):MUSIC BIT(2):RTC +@property (assign,nonatomic) uint32_t function __deprecated_msg("已过时,可使用deviceFuncs"); + +///当前处于的模式 +@property (assign,nonatomic) JL_FunctionCode currentFunc; + +///USb,SD,LineIn,网络电台是否在线 +@property (assign,nonatomic) uint8_t funcOnlineStatus; + +/// 设备功能模式支持 +@property (strong,nonatomic) JLModelDevFunc *deviceFuncs; + +///uboot版本 +@property (copy, nonatomic) NSString *versionUBoot; + +///设备单、双备份 +@property (assign,nonatomic) JL_Partition partitionType __deprecated_msg("已过时,可使用JL_OTAManager"); + + +/// 是否支持复用空间进行 OTA +@property (assign,nonatomic) BOOL isSupportReuseSpaceOTA __deprecated_msg("已过时,可使用JL_OTAManager"); + + +///OTA状态 +@property (assign,nonatomic) JL_OtaStatus otaStatus __deprecated_msg("已过时,可使用JL_OTAManager"); + +///耳机单备份 是否需要强制升级 +@property (assign,nonatomic) JL_OtaHeadset otaHeadset __deprecated_msg("已过时,可使用JL_OTAManager"); + +///手表资源 是否需要强制升级 +@property (assign,nonatomic) JL_OtaWatch otaWatch __deprecated_msg("已过时,可使用JL_OTAManager"); + +///资源是否需要强制升级 +@property (assign,nonatomic) JLOtaSourcesExtendMode otaSourceMode __deprecated_msg("已过时,可使用JL_OTAManager"); + + +///厂商ID +@property (copy, nonatomic) NSString *pidvid; + +///授权Key +@property (copy, nonatomic) NSString *authKey; + +///授权Code +@property (copy, nonatomic) NSString *proCode; + +///是否下载BootLoader +@property (assign,nonatomic) JL_BootLoader bootLoaderType; + +///OTA是否允许BLE连接 +@property (assign,nonatomic) JL_OtaBleAllowConnect otaBleAllowConnect; + +///是否仅仅支持BLE +@property (assign,nonatomic) JL_BLEOnly bleOnly; + +///ble蓝牙地址 +@property (copy, nonatomic) NSString *bleAddr; + +///是否支持发射模式 +@property (assign,nonatomic) JL_FasheEnable fasheEnable; + +///当前是否为发射模式 +@property (assign,nonatomic) JL_FasheType fasheType; + +///是否支持MD5固件校验 +@property (assign,nonatomic) JL_MD5Type md5Type; + +///是否为游戏模式 +@property (assign,nonatomic) JL_GameType gameType; + +///是否支持游戏模式 +@property (assign,nonatomic) BOOL isSupportGameModel; + +///是否支持查找设备 +@property (assign,nonatomic) JL_SearchType searchType; + +///是否支持卡拉OK +@property (assign,nonatomic) JL_KaraokeType karaokeType; + +///是否禁止app调节设备音效 +@property (assign,nonatomic) JL_KaraokeEQType karaokeEQType; + +///是否外挂flash +@property (assign,nonatomic) JL_FlashType flashType; + +///是否支持ANC +@property (assign,nonatomic) JL_AncType ancType; + +///是否支持音频文件传输功能 +@property (assign,nonatomic) JL_AudioFileType audioFileType; + +/// 是否支持日志获取 +@property (assign,nonatomic) BOOL isSupportLog; + +/// 是否支持辅听设置 +@property (assign,nonatomic) BOOL isSupportDhaFitting; + +///验配信息交互:版本、通道数、通道频率 +///Fitting information interaction: version, channel number, channel frequency +@property (strong,nonatomic) DhaFittingInfo *dhaFitInfo; + +/// 验配中断/开启的对象,仅限于监听 +/// Fitting interrupted/opened object, only for listening +@property (strong,nonatomic) DhaFittingSwitch *dhaFitSwitch; + +/// 通道增益值数组,先左耳后右耳,个数和验配信息中返回的一致 +/// Array of channel gain values, first left ear then right ear, the number is the same as the one returned in the fitting information +@property (strong,nonatomic) NSArray *dhaFittingList; + +/// 是否支持获取设备配置信息 +@property (assign,nonatomic) BOOL isSupportDevConfigInfo; + +/// 是否支持自适应ANC +@property (assign,nonatomic) BOOL isSupportAutoANC; + +///低音 +@property (assign,nonatomic) int pitchLow; + +///高音 +@property (assign,nonatomic) int pitchHigh; + +///外挂flash信息 +@property (copy, nonatomic) JLModel_Flash *flashInfo; + +/// 设备信息中指明,外部SD卡/U盘引脚是否被复用 +/// Specify in the device information, whether the external SD card/U disk pins are multiplexed +@property (assign,nonatomic) BOOL devPinMultiplex; + + +/*--- File INFO ---*/ +///当前文件传输句柄 +@property (assign,nonatomic) JL_FileHandleType currentFileHandleType; +///当前文件所存放的位置 +@property (assign,nonatomic,readonly) JL_CardType currentCardType; +///文件分包传输是否支持crc16方式 +@property (assign,nonatomic) JL_FileSubcontractTransferCrc16Type fileSubcontractTransferCrc16Type; +///是否以新的方式读取固件文件 +@property (assign,nonatomic) JL_ReadFileInNewWayType readFileInNewWayType; +///是否小文件方式传输 +@property (assign,nonatomic) JL_SmallFileWayType smallFileWayType; + +/*--- 公用INFO ---*/ +//MARK: - 存储信息 +///卡的数组 +@property (copy, nonatomic) NSArray *cardArray __attribute__((deprecated ( "Use the instance property cardArray of the JLModelCardInfo class instead, this property is about to become invalid"))); +///USB handle +@property (copy, nonatomic) NSString *handleUSB __attribute__((deprecated ( "Use the instance property usbHandle of the JLModelCardInfo class instead, this property is about to become invalid"))); +///SD_0 handle +@property (copy, nonatomic) NSString *handleSD_0 __attribute__((deprecated ( "Use the instance property sd0Handle of the JLModelCardInfo class instead, this property is about to become invalid"))); +///SD_1 handle +@property (copy, nonatomic) NSString *handleSD_1 __attribute__((deprecated ( "Use the instance property sd1Handle of the JLModelCardInfo class instead, this property is about to become invalid"))); +///Flash handle +@property (copy, nonatomic) NSString *handleFlash __attribute__((deprecated ( "Use the instance property flashHandle of the JLModelCardInfo class instead, this property is about to become invalid"))); +///Flash2 handle +@property (copy, nonatomic) NSString *handleFlash2 __attribute__((deprecated ( "Use the instance property flash2Handle of the JLModelCardInfo class instead, this property is about to become invalid"))); + +///Flash3 handle +@property (copy, nonatomic) NSString *handleFlash3 __attribute__((deprecated ( "Use the instance property flash3Handle of the JLModelCardInfo class instead, this property is about to become invalid"))); + +///USB handle Data +@property (copy, nonatomic) NSData *handleUSBData __attribute__((deprecated ( "Use the instance property usbHandle of the JLModelCardInfo class instead, this property is about to become invalid"))); +///SD_0 handle Data +@property (copy, nonatomic) NSData *handleSD_0Data __attribute__((deprecated ( "Use the instance property sd0Handle of the JLModelCardInfo class instead, this property is about to become invalid"))); +///SD_1 handle Data +@property (copy, nonatomic) NSData *handleSD_1Data __attribute__((deprecated ( "Use the instance property sd1Handle of the JLModelCardInfo class instead, this property is about to become invalid"))); +///Flash handle Data +@property (copy, nonatomic) NSData *handleFlashData __attribute__((deprecated ( "Use the instance property flashHandle of the JLModelCardInfo class instead, this property is about to become invalid"))); +///Flash2 handle Data +@property (copy, nonatomic) NSData *handleFlash2Data __attribute__((deprecated ( "Use the instance property flash2Handle of the JLModelCardInfo class instead, this property is about to become invalid"))); + +///Flash3 handle Data +@property (copy, nonatomic) NSData *handleFlash3Data __attribute__((deprecated ( "Use the instance property flash3Handle of the JLModelCardInfo class instead, this property is about to become invalid"))); + +/// 设备存储信息(卡信息) +@property (strong, nonatomic)JLModelCardInfo *cardInfo; + +/// 错误原因 +@property (copy, nonatomic) NSString *errReason; + +/// 发射频点 +@property (assign,nonatomic) uint16_t fmtxPoint; +/// 0x00:普通模式 0x01:发射模式 +@property (assign,nonatomic) uint8_t mTWS_Mode; +/// 0x00:未连接 0x01:已连接 +@property (assign,nonatomic) uint8_t mTWS_Status; +/// 发射模式中,连接的外设地址 +@property (copy ,nonatomic) NSString *mTWS_Addr; +/// 当前ANC的模式 +@property (copy ,nonatomic) JLModel_ANC *mAncModeCurrent; +/// ANC模式数组 +@property (copy ,nonatomic) NSMutableArray *mAncModeArray; +///通话状态 +@property (assign,nonatomic) JL_CALLType mCallType; + +/// 混响所支持的类型 +@property (strong,nonatomic) NSArray *reverberationTypes; +/// 混响的开关 +@property (assign,nonatomic) int reverberationSwitchState; +/// 深度值 +@property (assign,nonatomic) int depthValue; +/// 混响度值 +@property (assign,nonatomic) int intensityValue; +/// 混响幅值 +@property (assign,nonatomic) int dynamicLimiterValue; + +//MARK: - 卡拉OK +///卡拉OK 固件返回的掩码 +@property (assign,nonatomic)uint64_t kalaokMask __attribute__((deprecated ( "Use the instance property rtcVersion of the JL_SoundCardManager class instead, this property is about to become invalid"))); + +///卡拉OK 频率数组 +@property (strong,nonatomic)NSArray *mKaraokeMicFrequencyArray __attribute__((deprecated ( "Use the instance property rtcVersion of the JL_SoundCardManager class instead, this property is about to become invalid"))); + +///卡拉OK EQ数组 +@property (strong,nonatomic)NSArray *mKaraokeMicEQArray __attribute__((deprecated ( "Use the instance property rtcVersion of the JL_SoundCardManager class instead, this property is about to become invalid"))); + +//MARK: - EQ 属性列表 +/// EQ模式 +@property (assign,nonatomic) JL_EQMode eqMode __attribute__((deprecated ( "Use the instance property rtcVersion of the JL_SystemEQ class instead, this property is about to become invalid")));; +/// EQ参数值(只适用于EQ Mode == CUSTOM情况) +@property (copy, nonatomic) NSArray *eqArray __attribute__((deprecated ( "Use the instance property rtcVersion of the JL_SystemEQ class instead, this property is about to become invalid")));; +///自定义EQ +@property (copy, nonatomic) NSArray *eqCustomArray __attribute__((deprecated ( "Use the instance property rtcVersion of the JL_SystemEQ class instead, this property is about to become invalid")));; + +///EQ频率 +@property (copy, nonatomic) NSArray *eqFrequencyArray __attribute__((deprecated ( "Use the instance property rtcVersion of the JL_SystemEQ class instead, this property is about to become invalid")));; +///EQ段数类型 +@property (assign,nonatomic) JL_EQType eqType __attribute__((deprecated ( "Use the instance property rtcVersion of the JL_SystemEQ class instead, this property is about to become invalid")));; + +///EQ的预设值数组 数组元素类型-->【JLEQModel】 +@property (strong,nonatomic) NSArray *eqDefaultArray __attribute__((deprecated ( "Use the instance property rtcVersion of the JL_SystemEQ class instead, this property is about to become invalid")));; + +//MARK: - 灯光属性列表 +/// 0:关闭 1:打开 2:设置模式(彩色/闪烁/情景) +@property (assign,nonatomic) JL_LightState lightState __attribute__((deprecated ( "Use the instance property rtcVersion of the JL_LightManager class instead, this property is about to become invalid"))); +/// 0:彩色 1:闪烁 2: 情景 +@property (assign,nonatomic) JL_LightMode lightMode __attribute__((deprecated ( "Use the instance property rtcVersion of the JL_LightManager class instead, this property is about to become invalid"))); +/// 灯光红色 +@property (assign,nonatomic) uint8_t lightRed __attribute__((deprecated ( "Use the instance property rtcVersion of the JL_LightManager class instead, this property is about to become invalid"))); +/// 灯光绿色 +@property (assign,nonatomic) uint8_t lightGreen __attribute__((deprecated ( "Use the instance property rtcVersion of the JL_LightManager class instead, this property is about to become invalid"))); +/// 灯光蓝色 +@property (assign,nonatomic) uint8_t lightBlue __attribute__((deprecated ( "Use the instance property rtcVersion of the JL_LightManager class instead, this property is about to become invalid"))); +/// 闪烁模式Index +@property (assign,nonatomic) JL_LightFlashModeIndex lightFlashIndex __attribute__((deprecated ( "Use the instance property rtcVersion of the JL_LightManager class instead, this property is about to become invalid"))); +/// 闪烁频率Index +@property (assign,nonatomic) JL_LightFlashModeFrequency lightFrequencyIndex __attribute__((deprecated ( "Use the instance property rtcVersion of the JL_LightManager class instead, this property is about to become invalid"))); +/// 情景模式Index +@property (assign,nonatomic) JL_LightSceneMode lightSceneIndex __attribute__((deprecated ( "Use the instance property rtcVersion of the JL_LightManager class instead, this property is about to become invalid"))); +/// 色调,范围0-360 +@property (assign,nonatomic) uint16_t lightHue __attribute__((deprecated ( "Use the instance property rtcVersion of the JL_LightManager class instead, this property is about to become invalid"))); +/// 饱和度,0-100 +@property (assign,nonatomic) uint8_t lightSat __attribute__((deprecated ( "Use the instance property rtcVersion of the JL_LightManager class instead, this property is about to become invalid"))); +/// 亮度,0-100 +@property (assign,nonatomic) uint8_t lightLightness __attribute__((deprecated ( "Use the instance property rtcVersion of the JL_LightManager class instead, this property is about to become invalid"))); + + +//MARK: - BT INFO +@property (strong,nonatomic) NSString *ID3_Title; +@property (strong,nonatomic) NSString *ID3_Artist; +@property (strong,nonatomic) NSString *ID3_AlBum; +@property (assign,nonatomic) uint8_t ID3_Number; +@property (assign,nonatomic) uint16_t ID3_Total; +@property (strong,nonatomic) NSString *ID3_Genre; +@property (assign,nonatomic) uint32_t ID3_Time; +/// 0x01:播放 0x00:暂停 +@property (assign,nonatomic) uint8_t ID3_Status; + +@property (assign,nonatomic) uint32_t ID3_CurrentTime; + +//MARK: - Music INFO +///播放状态 +@property (assign,nonatomic) JL_MusicStatus playStatus __attribute__((deprecated ( "Use the instance property rtcVersion of the JLDevPlayerCtrl class instead, this property is about to become invalid"))); + +///播放模式 +@property (assign,nonatomic) JL_MusicMode playMode __attribute__((deprecated ( "Use the instance property rtcVersion of the JLDevPlayerCtrl class instead, this property is about to become invalid"))); + +///当前播放文件的簇号 +@property (assign,nonatomic) uint32_t currentClus __attribute__((deprecated ( "Use the instance property rtcVersion of the JLDevPlayerCtrl class instead, this property is about to become invalid"))); + +///当前时间 +@property (assign,nonatomic) uint32_t currentTime __attribute__((deprecated ( "Use the instance property rtcVersion of the JLDevPlayerCtrl class instead, this property is about to become invalid"))); + +///总时长 +@property (assign,nonatomic) uint32_t tolalTime __attribute__((deprecated ( "Use the instance property rtcVersion of the JLDevPlayerCtrl class instead, this property is about to become invalid"))); + +///当前卡 +@property (assign,nonatomic) JL_CardType currentCard __attribute__((deprecated ( "Use the instance property rtcVersion of the JLDevPlayerCtrl class instead, this property is about to become invalid"))); + +///名字 +@property (copy, nonatomic) NSString *fileName __attribute__((deprecated ( "Use the instance property rtcVersion of the JLDevPlayerCtrl class instead, this property is about to become invalid"))); + +///目录浏览文件类型(所支持解码音频格式) +@property (copy, nonatomic) NSString *typeSupport; + +//MARK: - RTC INFO + +///RTC 版本 +@property (assign,nonatomic) uint8_t rtcVersion __attribute__((deprecated ( "Use the instance property rtcVersion of the JL_AlarmClockManager class instead, this property is about to become invalid"))); + +///是否支持闹铃设置 +@property (assign,nonatomic) JL_RTCAlarmType rtcAlarmType __attribute__((deprecated ( "Use the instance property rtcAlarmType of the JL_AlarmClockManager class instead, this property is about to become invalid"))); + +///设备当前时间 +@property (strong,nonatomic) JLModel_RTC *rtcModel __attribute__((deprecated ( "Use the instance property rtcModel of the JL_AlarmClockManager class instead, this property is about to become invalid"))); + +///设备闹钟数组 +@property (strong,nonatomic) NSMutableArray *rtcAlarms __attribute__((deprecated ( "Use the instance property rtcAlarms of the JL_AlarmClockManager class instead, this property is about to become invalid"))); + +///默认铃声 +@property (strong,nonatomic) NSMutableArray *rtcDfRings __attribute__((deprecated ( "Use the instance property rtcDfRings of the JL_AlarmClockManager class instead, this property is about to become invalid"))); + +//MARK: - LineIn INFO + +///LineIn状态 +@property (assign,nonatomic) JL_LineInStatus lineInStatus; + + +//MARK: - Fm 模式 +///Fm状态 +@property (assign,nonatomic) JL_FMStatus fmStatus; + +///Fm 频段范围 +///76.5-108.0Mhz +///87.5-108.0Mhz +@property (assign,nonatomic) JL_FMMode fmMode; + +///当前fm +@property (strong,nonatomic) JLModel_FM *currentFm; + +///Fm列表 +@property (strong,nonatomic) NSArray *fmArray; + +//MARK: - custom version info +/// 自定义版本信息 +@property(strong,nonatomic) NSData *customizeInfo; + + +-(void)cleanMe; ++(void)observeModelProperty:(NSString*)prty Action:(SEL)action Own:(id)own __attribute__((deprecated("This method has been abandoned. You can use the system's KVO to monitor object changes."))); ++(void)removeModelProperty:(NSString*)prty Own:(id)own __attribute__((deprecated("This method has been abandoned. You can use the system's KVO to monitor object changes."))); + +#pragma mark ---> 设备信息 +-(void)deviceInfoData:(NSData*)infoData; + +#pragma mark ---> 各个模式信息 +-(void)deviceModeInfoData:(NSData*)infoData; + + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLModel_EQ.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLModel_EQ.h new file mode 100644 index 000000000..0d3cc7820 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLModel_EQ.h @@ -0,0 +1,31 @@ +// +// JLModel_EQ.h +// JL_BLEKit +// +// Created by 杰理科技 on 2021/10/15. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +typedef NS_ENUM(UInt8, JL_EQMode) { + JL_EQModeNORMAL = 0, //自然 + JL_EQModeROCK = 1, //摇滚 + JL_EQModePOP = 2, //流行 + JL_EQModeCLASSIC = 3, //经典 + JL_EQModeJAZZ = 4, //爵士 + JL_EQModeCOUNTRY = 5, //乡村 + JL_EQModeCUSTOM = 6, //用户自定义 + JL_EQModeLATIN = 7, //拉丁 + JL_EQModeDANCE = 8, //舞蹈 +}; + +@interface JLModel_EQ : NSObject +@property(assign,nonatomic)JL_EQMode mMode; +@property(strong,nonatomic)NSArray *__nullable mEqArray; +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLModel_FM.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLModel_FM.h new file mode 100644 index 000000000..34cd84535 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLModel_FM.h @@ -0,0 +1,18 @@ +// +// JLModel_FM.h +// JL_BLEKit +// +// Created by 杰理科技 on 2021/10/15. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface JLModel_FM : NSObject +@property (assign,nonatomic) uint8_t fmChannel; +@property (assign,nonatomic) uint16_t fmFrequency; +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLModel_File.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLModel_File.h new file mode 100644 index 000000000..b2d508dc4 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLModel_File.h @@ -0,0 +1,40 @@ +// +// JLModel_File.h +// JL_BLEKit +// +// Created by 杰理科技 on 2021/10/15. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +typedef NS_ENUM(UInt8, JL_BrowseType) { + JL_BrowseTypeFolder = 0, //文件夹 + JL_BrowseTypeFile = 1, //文件 +}; +typedef NS_ENUM(UInt8, JL_CardType) { + JL_CardTypeUSB = 0, //USB + JL_CardTypeSD_0 = 1, //SD_0 + JL_CardTypeSD_1 = 2, //SD_1 + JL_CardTypeFLASH = 3, //FLASH + JL_CardTypeLineIn = 4, //LineIn + JL_CardTypeFLASH2 = 5, //FLASH2 + JL_CardTypeFLASH3 = 6, //FLASH3 + JL_CardTypeReservedArea = 7, //ReservedArea +}; + +@interface JLModel_File : NSObject +@property (assign,nonatomic) JL_BrowseType fileType; +@property (assign,nonatomic) JL_CardType cardType; +@property (assign,nonatomic) uint32_t fileClus; +@property (assign,nonatomic) uint16_t fileIndex; +@property (copy, nonatomic) NSString *fileHandle; +@property (copy, nonatomic) NSString *fileName; +@property (copy, nonatomic) NSString *folderName; +@property (copy, nonatomic) NSData *__nullable pathData; +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLModel_Flash.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLModel_Flash.h new file mode 100644 index 000000000..293ab53bf --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLModel_Flash.h @@ -0,0 +1,58 @@ +// +// JLModel_Flash.h +// JL_BLEKit +// +// Created by 杰理科技 on 2021/10/15. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +typedef NS_ENUM(UInt8, JL_FlashSystemType) { + JL_FlashSystemType_FATFS = 0, + JL_FlashSystemType_RCSP = 1, +}; + +@interface JLModel_Flash : NSObject + +/// flash大小 +@property(assign,nonatomic)uint32_t mFlashSize; + +/// FAT系统大小 +@property(assign,nonatomic)uint32_t mFatfsSize; + +/// 系统类型 0:FATFS,1:RCSP +@property(assign,nonatomic)JL_FlashSystemType mFlashType; + +/// 系统当前状态,0x00正常,0x01异常 +@property(assign,nonatomic)uint8_t mFlashStatus; + +/// Flash版本 +@property(assign,nonatomic)uint16_t mFlashVersion; + +/// 读数MTU +@property(assign,nonatomic)uint16_t mFlashReadMtu; + +/// 扇区大小 +@property(assign,nonatomic)uint16_t mFlashCluster; + +/// 手表兼容列表"W001,W002,W003" +@property(strong,nonatomic)NSString *mFlashMatchVersion; + +/// 写数MTU +@property(assign,nonatomic)uint16_t mFlashWriteMtu; + +/// 屏幕宽度 +@property(assign,nonatomic)uint16_t mScreenWidth; + +/// 屏幕高度 +@property(assign,nonatomic)uint16_t mScreenHeight; + ++(JLModel_Flash*)modelWithFlash:(NSData *)flashData; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLModel_Headset.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLModel_Headset.h new file mode 100644 index 000000000..6c4d84336 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLModel_Headset.h @@ -0,0 +1,31 @@ +// +// JLModel_Headset.h +// JL_BLEKit +// +// Created by 杰理科技 on 2021/10/15. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface JLModel_Headset : NSObject +@property(assign,nonatomic)BOOL mCharging_L; +@property(assign,nonatomic)BOOL mCharging_R; +@property(assign,nonatomic)BOOL mCharging_C; +@property(assign,nonatomic)uint8_t mPower; +@property(assign,nonatomic)uint8_t mPower_L; +@property(assign,nonatomic)uint8_t mPower_R; +@property(assign,nonatomic)uint8_t mPower_C; +@property(assign,nonatomic)uint8_t mLedScene; +@property(assign,nonatomic)uint8_t mLedEffect; +@property(assign,nonatomic)uint8_t mKeyLR; +@property(assign,nonatomic)uint8_t mKeyAction; +@property(assign,nonatomic)uint8_t mKeyFunction; +@property(assign,nonatomic)uint8_t mMicMode; +@property(assign,nonatomic)uint8_t mWorkMode; +@property(strong,nonatomic)NSString *mEdr; +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLModel_RTC.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLModel_RTC.h new file mode 100644 index 000000000..e9731e9d5 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLModel_RTC.h @@ -0,0 +1,64 @@ +// +// JLModel_RTC.h +// JL_BLEKit +// +// Created by 杰理科技 on 2021/10/15. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface JLModel_RTC : NSObject + +/// 年 +@property (assign,nonatomic) uint16_t rtcYear; + +/// 月 +@property (assign,nonatomic) uint8_t rtcMonth; + +/// 日 +@property (assign,nonatomic) uint8_t rtcDay; + +/// 时 +@property (assign,nonatomic) uint8_t rtcHour; + +/// 分 +@property (assign,nonatomic) uint8_t rtcMin; + +/// 秒 +@property (assign,nonatomic) uint8_t rtcSec; + +/// RTC使能 +@property (assign,nonatomic) BOOL rtcEnable; + +/// RTC循环模式 +/// mode: 值为 0 时只响一次 +/// bit0: 每天 +/// bit1: 周一 +/// bit2: 周二 +/// bit3: 周三 +/// bit4: 周四 +/// bit5: 周五 +/// bit6: 周六 +/// bit7: 周日 +@property (assign,nonatomic) uint8_t rtcMode; + + +/// RTC索引 +@property (assign,nonatomic) uint8_t rtcIndex; + +/// 名称 +@property (copy ,nonatomic) NSString *rtcName; + +/// 自定义闹铃内容 +/// 这部分内容取自设备音乐浏览所获得的句柄以及簇号 +@property (strong,nonatomic) RTC_RingInfo *ringInfo; + +/// 闹铃数据 +@property (strong,nonatomic) NSData *RingData; +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLModel_Ring.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLModel_Ring.h new file mode 100644 index 000000000..c227fa6d2 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLModel_Ring.h @@ -0,0 +1,24 @@ +// +// JLModel_Ring.h +// JL_BLEKit +// +// Created by 杰理科技 on 2021/10/15. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface JLModel_Ring : NSObject + +/// 默认铃声序号 +/// alarm default rings index +@property(assign,nonatomic) uint8_t index; + +/// 默认铃声名称 +/// alarm default rings name +@property(strong,nonatomic) NSString *name; +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLModel_SPEEX.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLModel_SPEEX.h new file mode 100644 index 000000000..9fba122d5 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLModel_SPEEX.h @@ -0,0 +1,142 @@ +// +// JLModel_SPEEX.h +// JL_BLEKit +// +// Created by 杰理科技 on 2021/10/15. +// Modify By EzioChan on 2023/03/27. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +typedef NS_ENUM(UInt8, JL_SpeakType) { + JL_SpeakTypeDo = 0, //开始录音 + JL_SpeakTypeDone = 1, //结束录音 + JL_SpeakTypeDoing = 2, //正在录音 + JL_SpeakTypeDoneFail = 0x0f, //结束失败 +}; +typedef NS_ENUM(UInt8, JL_SpeakDataType) { + JL_SpeakDataTypePCM = 0x00, //PCM数据 + JL_SpeakDataTypeSPEEX = 0x01, //SPEEX数据 + JL_SpeakDataTypeOPUS = 0x02, //OPUS数据 + JL_SpeakDataTypeMSBC = 0x03, //MSBC数据 + JL_SpeakDataTypeJLA_V2 = 0x04, //JLA_V2 +}; + +/// 结束原因 +typedef NS_ENUM(UInt8, JLSpeakDownReason) { + ///正常 + JLSpeakDownNormal = 0x00, + ///取消 + JLSpeakDownByDevice = 0x01 +}; + +/// SampleRate +typedef NS_ENUM(UInt8, JLRecordSampleRate) { + ///8000 + JLRecordSampleRate8K = 0x08, + ///16000 + JLRecordSampleRate16K = 0x10 +}; + + + + + + +@interface JLModel_SPEEX : NSObject +@property(assign,nonatomic)JL_SpeakType mSpeakType; +@property(assign,nonatomic)JL_SpeakDataType mDataType; +@property(assign,nonatomic)JLSpeakDownReason mDownReason; +@property(assign,nonatomic)uint8_t mSampleRate; //0x08=8k,0x10=16k +@property(assign,nonatomic)uint8_t mVad; //断句方: 0:固件 1:APP +@end + + +///语音助手配置参数 +@interface JLSpeechRecognition:NSObject + +///是否下发识别文本,0:否 1:是 +@property(assign,nonatomic)BOOL sendText; + +/// 是否下发AI文本,0:否 1:是 +@property(assign,nonatomic)BOOL sendAIText; + +/// 是否播放AI TTS语音,0:否 1:是 +@property(assign,nonatomic)BOOL needPlayTTS; + ++(JLSpeechRecognition *)beObjc:(NSData *)data; + +-(NSData *)beData; + +@end + + +/// 录音参数对象 +@interface JLRecordParams : NSObject + +/// 音频类型 +@property(nonatomic,assign)JL_SpeakDataType mDataType; + +/// VAD方式 +@property(assign,nonatomic)JLSpeakDownReason mVadWay; + +/// 采样率 +@property(assign,nonatomic)JLRecordSampleRate mSampleRate; + +/// 语音助手配置参数 +@property(strong,nonatomic)JLSpeechRecognition *speechRecognit; + +@end + + +/// speech 语音:AI云数据格式 +@interface JLSpeechAiCloud : NSObject + +/// 版本信息 +@property(nonatomic,assign)uint8_t version; + +/// 文本类型 +/// 0 : 手表本地文本(语音识别) +/// 1 : AI应答文本 +/// 2 : 错误提示文本 +@property(nonatomic,assign)uint8_t type; + +/// 供应商 +/// 0 : 杰理 +/// 1 : 科大讯飞 +@property(nonatomic,assign)uint8_t vendorID; + +/// 有效数据长度 +@property(nonatomic,assign)uint16_t lenght; + +/// 数据内容 +@property(nonatomic,strong)NSData *playload; + ++(JLSpeechAiCloud *)beObject:(NSData *)data; + +-(NSData *)beData; + +@end + +/// TTS语音合成数据格式 +@interface JLSpeechTTSSynthesis : NSObject + +/// 版本信息 +@property(nonatomic,assign)uint8_t version; + +/// 有效数据长度 +@property(nonatomic,assign)uint16_t lenght; + +/// 数据内容 +@property(nonatomic,strong)NSData *playload; + +-(NSData *)beData; + ++(JLSpeechTTSSynthesis *)beObject:(NSData *)data; +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLModel_SmallFile.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLModel_SmallFile.h new file mode 100644 index 000000000..88bc3b756 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLModel_SmallFile.h @@ -0,0 +1,32 @@ +// +// JLModel_SmallFile.h +// JL_BLEKit +// +// Created by 杰理科技 on 2021/10/14. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN +typedef NS_ENUM(UInt8, JL_SmallFileType) { + JL_SmallFileTypeContacts = 0x01, //联系人 + JL_SmallFileTypeMotionRecord = 0x02, //运动记录 + JL_SmallFileTypeHeartRate = 0x03, //心率数据 + JL_SmallFileTypeSpoData = 0x04, //血氧数据 + JL_SmallFileTypeSleepData = 0x05, //睡眠数据 + JL_SmallFileTypeMassage = 0x06, //消息数据 + JL_SmallFileTypeWeather = 0x07, //天气数据 + JL_SmallFileTypeCallLog = 0x08, //通话记录 + JL_SmallFileTypeStepCount = 0x09, //步数数据 + JL_SmallFileTypeWeight = 0xFF, //体重数据 +}; + +@interface JLModel_SmallFile : NSObject +@property(nonatomic,assign)JL_SmallFileType file_type; +@property(nonatomic,assign)uint8_t file_ver; +@property(nonatomic,assign)uint16_t file_id; +@property(nonatomic,assign)uint16_t file_size; +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLOxygenSturationRemindModel.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLOxygenSturationRemindModel.h new file mode 100644 index 000000000..0474d40f7 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLOxygenSturationRemindModel.h @@ -0,0 +1,29 @@ +// +// JLOxygenSturationRemindModel.h +// JL_BLEKit +// +// Created by EzioChan on 2022/2/17. +// Copyright © 2022 www.zh-jieli.com. All rights reserved. +// + +#import "JLwSettingModel.h" + +NS_ASSUME_NONNULL_BEGIN + +/// 血氧检测控制 +@interface JLOxygenSturationRemindModel : JLwSettingModel +///开关 +@property(nonatomic,assign)BOOL status; +/// 测量模式 +@property(nonatomic,assign)WatchOxygenMsmType rType; + + +-(instancetype)initWithData:(NSData *)data; + +/// 创建一个新的传感器设置对象 +/// @param type 测量类型 +/// @param status 开闭状态 +- (instancetype)initWithModel:(WatchOxygenMsmType)type Status:(BOOL)status; +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLPersonInfoModel.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLPersonInfoModel.h new file mode 100644 index 000000000..9cf61b11a --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLPersonInfoModel.h @@ -0,0 +1,33 @@ +// +// JLPersonInfoModel.h +// JL_BLEKit +// +// Created by EzioChan on 2021/10/12. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import "JLwSettingModel.h" + +NS_ASSUME_NONNULL_BEGIN + +/// 个人信息设置 +@interface JLPersonInfoModel : JLwSettingModel + +/// 身高,cm +@property(nonatomic,assign)uint16_t height; +/// 体重,kg +@property(nonatomic,assign)uint16_t weight; +/// 生日 +@property(nonatomic,strong)NSDate *birthDay; +/// 性别 +/// 女性:0x00 +/// 男性:0x01 +@property(nonatomic,assign)uint8_t gender; + +-(instancetype)initWith:(NSDate *)birthDay height:(uint16_t)h weight:(uint16_t)w gener:(uint8_t)gender; + +-(instancetype)initWithData:(NSData *)data; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLPublicSetting.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLPublicSetting.h new file mode 100644 index 000000000..c905ac186 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLPublicSetting.h @@ -0,0 +1,135 @@ +// +// JLPublicSetting.h +// JL_BLEKit +// +// Created by EzioChan on 2023/12/1. +// Copyright © 2023 www.zh-jieli.com. All rights reserved. +// + +#import +#import "JLPublicSettingBlocks.h" + + +NS_ASSUME_NONNULL_BEGIN +@class JL_ManagerM; + +/// 公共 设置/通知/读取 交互类 0x33 回调协议 +@protocol JLPublicSettingProtocol +@optional + +/// 屏幕亮度设置回调/通知 +/// - Parameters: +/// - manager: 设备 +/// - light: 亮度 +-(void)publicSettingScreenLight:(JL_ManagerM *)manager Value:(uint8_t)light; + +/// 手电筒设置回调/通知 +/// - Parameters: +/// - manager: 设备 +/// - isOn: 是否打开 +-(void)publicSettingFlashLight:(JL_ManagerM *)manager Value:(BOOL)isOn; + +/// 设备绑定状态回调/通知 +/// - Parameters: +/// - manager: 设备 +/// - model: 绑定信息 +-(void)publicSettingBindStatus:(JL_ManagerM *)manager Model:(JLPublicBindDeviceModel *)model; + +/// 功能使用资源通知/回调 +/// - Parameters: +/// - manager: 设备 +/// - model: 资源信息 +-(void)publicSettingFuncSource:(JL_ManagerM *)manager Model:(JLPublicSourceInfoModel *)model; + +/// 功能使用资源通知/回调 +/// - Parameters: +/// - manager: 设备 +/// - model: +/// 0x00 结束 +/// 0x01 开始推送 +-(void)publicSettingReplaceTipsVoiceStatus:(JL_ManagerM *)manager Model:(uint8_t )model Reason:(NSError *_Nullable)err; + +/// +/// - Parameters: +/// - manager: 设备 +/// - mode: 设备 SDK 信息 +-(void)publicSettingDeviceSDKMessage:(JL_ManagerM *)manager Mode:(JLPublicSDKInfoModel *_Nullable)mode; + +@end + + +/// 公共 设置/通知/读取 交互类 0x33 +@interface JLPublicSetting : NSObject + +/// 代理 +@property(nonatomic,assign)id delegate; + +/// 读取设备当前屏幕亮度 +/// - Parameters: +/// - manager: 设备 +/// - block: 回调 +-(void)cmdScreenLightGet:(JL_ManagerM *)manager result:(JLPSScreenLightCbk)block; + +/// 设置设备的屏幕亮度 +/// - Parameters: +/// - manager: 设备 +/// - value: 亮度值 0~100 +/// - block: 回调 +-(void)cmdScreenLightSet:(JL_ManagerM *)manager Value:(uint8_t)value result:(JLPSScreenLightCbk)block; + +/// 读取手电筒开关 +/// - Parameters: +/// - manager: 设备 +/// - block: 回调 +-(void)cmdFlashLightGet:(JL_ManagerM *)manager result:(JLPSFlashLightCbk)block; + +/// 设置手电筒开关 +/// - Parameters: +/// - manager: 设备 +/// - isOn: 开关 +/// - block: 回调 +-(void)cmdFlashLightSet:(JL_ManagerM *)manager Status:(BOOL)isOn result:(JLPSFlashLightCbk)block; + + +/// 获取绑定设备状态 +/// - Parameters: +/// - manager: 设备 +/// - block: 回调 +-(void)cmdDeviceBindStatusGet:(JL_ManagerM *)manager result:(JLPSBindStatusCbk)block; + + +/// 获取功能使用资源设置(彩屏舱) +/// - Parameters: +/// - manager: 设备 +/// - funcType: 功能码 +/// 0x01 屏幕保护程序 +/// 0x02 开机动画 +/// 0x03 墙纸 +/// - block: 回调 +-(void)cmdDeviceFuncUsedSourceGet:(JL_ManagerM *)manager Type:(uint8_t)funcType result:(JLPSSourceInfoCbk)block; + +/// 设置功能使用资源(彩屏舱) +/// - Parameters: +/// - manager: 设备 +/// - info: 设置内容对象 +/// - block: 回调 +-(void)cmdDeviceFuncUseSourceSet:(JL_ManagerM *)manager Info:(JLPublicSourceInfoModel *)info result:(JLPSSourceInfoCbk)block; + + +/// 开始发起替换提示音 +/// - Parameters: +/// - manager: 设备 +/// - info: 提示音包 tone.cfg 信息 +/// - block: 状态回调 +-(void)cmdDeviceReplaceTipsVoiceStart:(JL_ManagerM *)manager Info:(JLPublicTipsVoiceRpInfo *)info result:(JLPSTipsVoiceRpCbk)block; + + +/// 获取设备 SDK 信息 +/// - Parameters: +/// - manager: 设备 +/// - block: 回调 +-(void)cmdDeviceGetDeviceSDKInfo:(JL_ManagerM *)manager result:(JLPSSDKInfoCbk)block; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLPublicSettingBlocks.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLPublicSettingBlocks.h new file mode 100644 index 000000000..f43f6c086 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLPublicSettingBlocks.h @@ -0,0 +1,183 @@ +// +// JLPublicSettingBlocks.h +// JL_BLEKit +// +// Created by EzioChan on 2023/12/1. +// Copyright © 2023 www.zh-jieli.com. All rights reserved. +// + +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +#define PUBLIC_SCREEN_LIGHT 0x0001 //屏幕亮度 +#define PUBLIC_FLASH_LIGHT 0x0002 //手电筒 +#define PUBLIC_DEVICE_BIND_STATUS 0x0003 //设备绑定 +#define PUBLIC_FUNC_SOURCE 0x0004 //功能使用资源(彩屏舱) +#define PUBLIC_FUNC_4G 0x0005 //4G功能升级功能 +#define PUBLIC_TIPS_VOICE 0x0006 //替换提示音 +#define PUBLIC_SDK_INFO 0x0008 //SDK信息 +#define PUBLIC_TWS_HEALTH_INFO 0x0009 //TWS健康信息 + +@class JLPublicBindDeviceModel; +@class JLPublicSourceInfoModel; +@class JLPublic4GModel; +@class JLPublicSDKInfoModel; + +/// 屏幕亮度回调 +typedef void(^JLPSScreenLightCbk)(JL_CMDStatus status,uint8_t value); + +/// 手电筒开关 +typedef void(^JLPSFlashLightCbk)(JL_CMDStatus status,BOOL isOn); + +/// 绑定状态 +typedef void(^JLPSBindStatusCbk)(JL_CMDStatus status,JLPublicBindDeviceModel *_Nullable model); +/// 彩屏舱资源 +typedef void (^JLPSSourceInfoCbk)(JL_CMDStatus status,JLPublicSourceInfoModel *_Nullable model); + +/// 4G模块升级回调 +typedef void (^JLPSSource4GCbk)(JL_CMDStatus status,JLPublic4GModel *_Nullable model); + +/// 替换提示音回调 +typedef void(^JLPSTipsVoiceRpCbk)(JL_CMDStatus status,uint8_t op); + +/// 设备 SDK 信息回调 +typedef void(^JLPSSDKInfoCbk)(JL_CMDStatus status,JLPublicSDKInfoModel *_Nullable model); + +//MARK: - 绑定设备状态(彩屏舱) +/// 绑定设备状态 +@interface JLPublicBindDeviceModel : NSObject + +/// 设备类型 +/// 1 耳机 +/// 2 充电仓 +@property(nonatomic,assign)uint8_t type; + +/// 经典蓝牙地址 +/// 若不支持经典蓝牙,此值为 0 +@property(nonatomic,copy)NSString *edrAddr; + +/// ble 蓝牙地址 +/// 若不支持 ble 蓝牙,此值为 0 +@property(nonatomic,copy)NSString *bleAddr; + +/// 连接状态 +/// 0 未连接 +/// 1 已连接 +/// 2 正在回连 +/// 0xff 不可连接 +@property(nonatomic,assign)uint8_t status; + +/// 连接方式 +/// 0 BLE +/// 1 SPP +@property(nonatomic,assign)uint8_t way; + ++(JLPublicBindDeviceModel *)initData:(NSData *)data; +@end + +//MARK: -公有设置的资源信息(彩屏舱) +/// 公有设置的资源信息 +@interface JLPublicSourceInfoModel:NSObject + +/// 功能码 +/// 0x01 屏幕保护程序 +/// 0x02 开机动画 +/// 0x03 墙纸 +@property(nonatomic,assign)uint8_t type; + +/// 存储器的句柄 +@property(nonatomic,copy)NSData *fileHandle; + +/// 文件簇号 +/// 设置时当前字段设为 0 +@property(nonatomic,assign)uint32_t cluster; + +/// 文件内容 CRC +/// 设置时当前字段为 0 +@property(nonatomic,assign)uint16_t crc; + +/// 文件路径数据 +@property(nonatomic,strong)NSString *filePath; + +-(NSData *)beData; + ++(JLPublicSourceInfoModel *)initData:(NSData *)data; + +@end + +//MARK: - 4G 模块基本信息 + +/// 4G 模块基本信息 +@interface JLPublic4GModel:NSObject + +/// 供应商信息 +/// 0x01:紫光展锐 +/// 0x02:归芯科技 +@property(nonatomic,assign)uint8_t vendor; + +/// 强制升级标识位 +/// 0x00:不强制 +/// 0x01:强制升级 +@property(nonatomic,assign)uint8_t updateStatus; + +/// 版本 +@property(nonatomic,copy)NSString *version; + +/// 开始 OTA 等待时间 +@property(nonatomic,assign)NSTimeInterval startOtaMaxTimeout; + +/// 结束 OTA 等待时间 +@property(nonatomic,assign)NSTimeInterval endOtaMaxTimeout; + + ++(JLPublic4GModel *)initData:(NSData *)data; + +@end + +//MARK: - 替换提示音参数 +@interface JLPublicTipsVoiceRpInfo : NSObject + +/// 目标存储器句柄 +/// 这个要从 JLModel_Device 中获得 +/// JLModelCardInfo *cardInfo; +@property(nonatomic,copy)NSData *devHandle; + +/// 下发的文件名 +@property(nonatomic,strong)NSString *fileName; + +/// 下发的文件内容 +@property(nonatomic,copy)NSData *sendData; + +-(NSData *)createData; + +@end + +// MARK: - 设备 SDK 信息 + +/// 设备 SDK 信息 +@interface JLPublicSDKInfoModel : NSObject + +/// 项目对应 ID +/// 0x0001 充电仓 +@property(nonatomic,assign)uint16_t projectId; + +/// 产品对应 ID +/// 0x0001 彩屏舱 +@property(nonatomic,assign)uint16_t productId; + +/// 芯片 ID +/// 0x0001 AC701N +/// 0x0002 AC707N +@property(nonatomic,assign)uint16_t chipId; + +/// 是否支持 gif +@property(nonatomic,assign)BOOL isSupportGif; + +/// 初始化 +/// - Parameter data: 数据 ++ (JLPublicSDKInfoModel *)initData:(NSData *)data; + +@end +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLSedentaryRmdModel.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLSedentaryRmdModel.h new file mode 100644 index 000000000..06cf049ec --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLSedentaryRmdModel.h @@ -0,0 +1,43 @@ +// +// JLSedentaryRmdModel.h +// JL_BLEKit +// +// Created by EzioChan on 2021/10/12. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import "JLwSettingModel.h" + +NS_ASSUME_NONNULL_BEGIN + +/// 久坐提醒 +@interface JLSedentaryRmdModel : JLwSettingModel + +///开关 +@property(nonatomic,assign)BOOL status; + +/// 提醒模式 +@property(nonatomic,assign)WatchRemindType rType; + +/// 午休免打扰:关闭/打开(午休时段为12:00-14:00) +@property(nonatomic,assign)BOOL doNotDisturb; + +/// 开始时间 +@property(nonatomic,strong)WatchTimer *begin; + +/// 结束时间 +@property(nonatomic,strong)WatchTimer *end; + +- (instancetype)initWithData:(NSData *)data; + +/// 创建一个设置久坐提醒的位置 +/// @param type 提醒模式 +/// @param status 开关 +/// @param dnd 午休免打扰 +/// @param start 开始时间 +/// @param ed 结束时间 +- (instancetype)initWithModel:(WatchRemindType)type Status:(BOOL)status DoNotDisturb:(BOOL)dnd Begin:(WatchTimer *)start End:(WatchTimer *)ed; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLSensorFuncModel.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLSensorFuncModel.h new file mode 100644 index 000000000..39779cfea --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLSensorFuncModel.h @@ -0,0 +1,47 @@ +// +// JLSensorFuncModel.h +// JL_BLEKit +// +// Created by EzioChan on 2021/10/12. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import "JLwSettingModel.h" +#import "JLWatchEnum.h" + +NS_ASSUME_NONNULL_BEGIN + + +/// 传感器开关设置 +@interface JLSensorFuncModel : JLwSettingModel + +/// 计步器开关 +@property(nonatomic,assign)BOOL pedometerStatus; +/// 计步器记录开关 +@property(nonatomic,assign)BOOL pedometerRecordStatus; +/// 心率传感器开关 +@property(nonatomic,assign)BOOL heartRateStatus; +/// 心率传感器记录开关 +@property(nonatomic,assign)BOOL heartRateRecordStatus; +/// 血氧传感器开关 +@property(nonatomic,assign)BOOL bloodOxygenStatus; +/// 血氧传感器记录开关 +@property(nonatomic,assign)BOOL bloodOxygenRecordStatus; +///海拔气压传感器开关 +@property(nonatomic,assign)BOOL AltitudeAirPressureStatus; +///海拔气压传感器记录开关 +@property(nonatomic,assign)BOOL AltitudeAirPressureRecordStatus; + + +/// 传感器功能 +/// @param status 功能的开关状态 +-(void)setFuncBy:(JL_SENSOR_FUNC_SWITCH)status; + +/// @param funcByte 功能的开关状态 +-(instancetype)initWhthFuncByte:(JL_SENSOR_FUNC_SWITCH)funcByte; + +-(instancetype)initWithData:(NSData *)data; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLSleepMonitorModel.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLSleepMonitorModel.h new file mode 100644 index 000000000..5e51a67d3 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLSleepMonitorModel.h @@ -0,0 +1,33 @@ +// +// JLSleepMonitorModel.h +// JL_BLEKit +// +// Created by EzioChan on 2021/10/12. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import "JLwSettingModel.h" + +NS_ASSUME_NONNULL_BEGIN + +/// 睡眠监测设置 +@interface JLSleepMonitorModel : JLwSettingModel +///开关类型 +@property(nonatomic,assign)WatchSwitchType status; +///开始时间 +@property(nonatomic,strong)WatchTimer *start; +/// 结束时间 +@property(nonatomic,strong)WatchTimer *end; + +-(instancetype)initWithData:(NSData *)data; + +/// 构建一个睡眠监测设置 +/// @param status 状态开关 +/// @param begin 开始时间 +/// @param end 结束时间 +-(instancetype)initWithSwitchStatus:(WatchSwitchType)status Begin:(WatchTimer *)begin End:(WatchTimer *)end; + + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLSpdifPCManager.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLSpdifPCManager.h new file mode 100644 index 000000000..d2c594c0c --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLSpdifPCManager.h @@ -0,0 +1,74 @@ +// +// JLSpdifPCManager.h +// JL_BLEKit +// +// Created by EzioChan on 2024/10/15. +// Copyright © 2024 www.zh-jieli.com. All rights reserved. +// + +#import +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +@protocol JLSpdifPCProtocol + +/// 更新 SPDIF 模式 +/// - Parameter spdifModel: SPDIF 模式 +-(void)updateSpdifModel:(JLModelSpdif *)spdifModel; + +/// 更新 PC 从者模式 +/// - Parameter pcServerModel: PC Server +-(void)updatePcServerModel:(JLModelPCServer *)pcServerModel; + +@end + +/// SPDIF 与 PC 从者模式管理 +@interface JLSpdifPCManager : ECOneToMorePtl + +/// SPDIF 模式信息 +@property(nonatomic,strong)JLModelSpdif *spdifModel; + +/// PC 从者模式信息 +@property(nonatomic,strong)JLModelPCServer *pcServerModel; + + +/// 获取 SPDIF 模式的状态 +/// - Parameter manager: 设备对象 +/// - Parameter callBack: 回调 +-(void)getSpdifStatus:(JL_ManagerM *)manager callBack:(JL_CMD_RESPOND)callBack; + +/// 获取 PC 从者模式的状态 +/// - Parameter manager: 设备对象 +/// - Parameter callBack: 回调 +-(void)getPcServerStatus:(JL_ManagerM *)manager callBack: (JL_CMD_RESPOND)callBack; + +/// 设置 SPDIF 模式的播放状态 +/// - Parameter status: 播放状态 +/// - Parameter manager: 设备对象 +/// - Parameter callBack: 回调 +-(void)setSpdifPlayStatus:(BOOL)status Manager:(JL_ManagerM *)manager callBack:(JL_CMD_RESPOND)callBack; + +/// 设置 SPDIF 模式音源 +/// - Parameter type: 音源类型 +/// - Parameter manager: 设备对象 +/// - Parameter callBack: 回调 +-(void)setSpdifAction:(JLSpdifAudioType)type Manager:(JL_ManagerM *)manager callBack:(JL_CMD_RESPOND)callBack; + +/// 设置 PC 从者模式的播放状态 +/// - Parameter status: 播放状态 +/// - Parameter manager: 设备对象 +/// - Parameter callBack: 回调 +-(void)setPcServerPlayStatus:(BOOL)status Manager:(JL_ManagerM *)manager callBack:(JL_CMD_RESPOND)callBack; + +/// 设置 PC 从者模式的操作类型 +/// - Parameter type: 操作类型 +/// - Parameter manager: 设备对象 +/// - Parameter callBack: 回调 +-(void)setPcServerAction:(JLPcServerOpType)type Manager:(JL_ManagerM *)manager callBack:(JL_CMD_RESPOND)callBack; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLSportDataModel.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLSportDataModel.h new file mode 100644 index 000000000..4483e041f --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLSportDataModel.h @@ -0,0 +1,27 @@ +// +// JLSportDataModel.h +// Test +// +// Created by EzioChan on 2021/4/6. +// Copyright © 2021 Zhuhai Jieli Technology Co.,Ltd. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface JLSportDataModel : NSObject + +/// 设备的UUID +@property(nonatomic,strong)NSString *dev_uuid; + +/// 请求内容数据 +@property(nonatomic,strong)NSData *rqData; + +/// 功能掩码 +@property(nonatomic,assign)uint32_t funcMask; + + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLTaskChain.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLTaskChain.h new file mode 100644 index 000000000..8d5d33661 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLTaskChain.h @@ -0,0 +1,117 @@ +// +// TaskChain.h +// JL_BLEKit +// +// Created by EzioChan on 2025/3/20. +// + +#import + +/** + JLTaskChain 任务链 + 用于按顺序执行一组异步任务,每个任务接收上一个任务的输出并通过 completion 回传结果或错误。 + 特性: + - 串行执行:内部使用 `NSOperationQueue` 串行队列保证顺序执行 + - 错误中断:任意任务返回错误后链路立即中断并回调最终 completion + - 取消能力:支持全局与实例级取消 + - 运行保护:运行中禁止追加任务,避免并发修改导致的不确定行为 + */ + +NS_ASSUME_NONNULL_BEGIN +/* + // 创建 TaskChain 实例 + JLTaskChain *chain = [[JLTaskChain alloc] init]; + + // 添加第一个任务:模拟耗时操作返回结果 + [chain addTask:^(id input, void (^completion)(id, NSError *)) { + NSLog(@"任务1开始执行"); + dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ + [NSThread sleepForTimeInterval:2]; + NSLog(@"任务1执行完毕"); + completion(@"结果1", nil); + }); + }]; + + // 添加第二个任务:接收任务1的结果,模拟错误情况 + [chain addTask:^(id input, void (^completion)(id, NSError *)) { + NSLog(@"任务2接收到结果:%@", input); + dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ + [NSThread sleepForTimeInterval:2]; + NSLog(@"任务2发生错误"); + NSError *error = [NSError errorWithDomain:@"com.example.task" code:100 userInfo:@{NSLocalizedDescriptionKey:@"任务2失败"}]; + completion(nil, error); + }); + }]; + + // 添加第三个任务:如果前面的任务成功则执行,否则不会被执行 + [chain addTask:^(id input, void (^completion)(id, NSError *)) { + NSLog(@"任务3接收到结果:%@", input); + dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ + [NSThread sleepForTimeInterval:2]; + NSLog(@"任务3执行完毕"); + completion(@"结果3", nil); + }); + }]; + + // 启动任务链,并传入初始输入 + [chain runWithInitialInput:nil completion:^(id result, NSError *error) { + if (error) { + NSLog(@"任务链执行中断,错误:%@", error.localizedDescription); + } else { + NSLog(@"任务链全部执行完毕,最终结果:%@", result); + } + }]; +*/ + + +/****************************************************************************************************************************** +// 假设 JLTaskChain 和 TaskOperation 已经定义好 +// 模拟一个任务链处理一个字符串列表 +NSArray *taskList = @[@"任务A", @"任务B", @"任务C"]; + + JLTaskChain *chain = [[JLTaskChain alloc] init]; + +// 遍历列表,为每个元素添加一个任务 +for (NSString *taskName in taskList) { + [chain addTask:^(id input, void (^completion)(id, NSError *)) { + NSLog(@"开始处理:%@", taskName); + // 模拟异步耗时操作 + dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ + [NSThread sleepForTimeInterval:1.0]; + // 模拟:如果任务名称为“任务B”,产生错误,后续任务不再执行 + if ([taskName isEqualToString:@"任务B"]) { + NSError *error = [NSError errorWithDomain:@"com.example.task" code:100 userInfo:@{NSLocalizedDescriptionKey:@"任务B 执行失败"}]; + NSLog(@"处理 %@ 时发生错误", taskName); + completion(nil, error); + } else { + // 模拟正常处理,返回结果 + NSString *result = [NSString stringWithFormat:@"%@ 已处理", taskName]; + NSLog(@"处理完成:%@", result); + completion(result, nil); + } + }); + }]; +} + +// 启动任务链,初始输入可以为 nil(或者根据需求传递其他数据) +[chain runWithInitialInput:nil completion:^(id result, NSError *error) { + if (error) { + NSLog(@"任务链中断,错误信息:%@", error.localizedDescription); + } else { + NSLog(@"所有任务完成,最终结果:%@", result); + } +}]; + */ + + +@interface JLTaskChain : NSObject + +// 任务块数组,每个任务块的签名:^(id input, void(^completion)(id output, NSError *error)) +@property (nonatomic, strong) NSMutableArray *taskBlocks; ++ (void)cancelAllTasks; +- (void)addTask:(void (^)(id _Nullable input, void (^completion)(id _Nullable output, NSError *_Nullable error)))task; +- (void)runWithInitialInput:(id _Nullable)input completion:(void (^ _Nullable)(id _Nullable result, NSError *_Nullable error))completion; +- (void)cancel; +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLTipsSoundReplaceMgr.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLTipsSoundReplaceMgr.h new file mode 100644 index 000000000..a0d19f7df --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLTipsSoundReplaceMgr.h @@ -0,0 +1,48 @@ +// +// JLTipsSoundReplay.h +// JL_BLEKit +// +// Created by EzioChan on 2025/5/14. +// Copyright © 2025 www.zh-jieli.com. All rights reserved. +// + +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +typedef void(^JLTipsVoiceBlock)(JL_CMDStatus,NSData *_Nullable info); + +/// 提示音替换 +@interface JLTipsSoundReplaceMgr : NSObject + +/// 单例 ++(instancetype)share; + +/// 是否处于替换中 +-(BOOL)isReplacing; + +/// 是否支持提示音替换查询 +/// - Parameters: +/// - manager: 设备 +/// - result: 回调结果 +-(void)isSupportTipsVoiceReplace:(JL_ManagerM *)manager result:(JLConfigTwsRsp)result; + +/// 获取设备端提示音的信息 +/// - Parameters: +/// - manager: 设备 +/// - result: 回调 +-(void)voicesReplaceGetVoiceInfo:(JL_ManagerM *)manager Result:(JLTipsVoiceBlock)result; + +/// 推送提示音数据到设备 +/// - Parameters: +/// - mgr: 设备 +/// - devhandle: 设备句柄,当前句柄需要通过获取设备存储信息获得,可参考 JLModel_Device 类的 cardInfo 属性,当设备不作要求时,此值填 0xffffffff +/// - path: 提示音本地存放路径 +/// - isReborn: 完成后是否重启设备 +/// - result: 回调结果 +-(void)voicesReplacePushDataRequest:(JL_ManagerM *)mgr DevHandle:(NSData *)devhandle TonePath:(NSString *)path IsReborn:(BOOL)isReborn Result:(JL_BIGFILE_RT __nullable)result; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLTranslateAudio.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLTranslateAudio.h new file mode 100644 index 000000000..e93155045 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLTranslateAudio.h @@ -0,0 +1,61 @@ +// +// JLTranslateAudio.h +// JL_BLEKit +// +// Created by EzioChan on 2024/12/31. +// Copyright © 2024 www.zh-jieli.com. All rights reserved. +// + +#import +#import "JLModel_SPEEX.h" + +NS_ASSUME_NONNULL_BEGIN + +/// 音频类型 +typedef NS_ENUM(NSUInteger, JLTranslateAudioSourceType) { + /// 音频文件 + JLTranslateAudioTypeFile = 0, + /// 设备麦克风 + JLTranslateAudioTypeDeviceMic = 1, + /// 手机麦克风 + JLTranslateAudioTypePhoneMic = 2, + /// eSCO上行 + JLTranslateAudioTypeESCOUp = 3, + /// eSCO下行 + JLTranslateAudioTypeESCODown = 4, + /// A2DP + JLTranslateAudioTypeA2DP = 5, + /// eSCO_Max 上下行 + JLTranslateAudioTypeESCOMax = 6 +}; + +/// 翻译音频 +@interface JLTranslateAudio : NSObject + +/// 来源类型 +@property (assign, nonatomic) JLTranslateAudioSourceType sourceType; + +/// 音频数据类型 +@property (assign, nonatomic) JL_SpeakDataType audioType; + +/// 包计数,倒序,0 为结束包 +@property (assign, nonatomic) int count; + +/// 音频数据的CRC +@property (assign, nonatomic) uint16_t crc; + +/// 数据长度 +@property (assign, nonatomic) int len; + +/// 音频数据 +@property (strong, nonatomic) NSData *data; + ++(JLTranslateAudio *)beObjc:(NSData *)data; + +-(NSData *)toData; + + + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLTranslateSet.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLTranslateSet.h new file mode 100644 index 000000000..caa5547a5 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLTranslateSet.h @@ -0,0 +1,105 @@ +// +// JLTranslateSet.h +// JL_BLEKit +// +// Created by EzioChan on 2024/12/31. +// Copyright © 2024 www.zh-jieli.com. All rights reserved. +// + +#import +#import + +NS_ASSUME_NONNULL_BEGIN +@class JLTranslateSetMode; + +/// 翻译设置结果 +typedef NS_ENUM(NSUInteger, JLTranslateSetResultType) { + /// 成功 + JLTranslateSetResultTypeSuccess = 0x00, + /// 模式相同 + JLTranslateSetResultTypeSameMode = 0x01, + /// 参数错误 + JLTranslateSetResultTypeParamErr = 0x02, + /// 通话中 + JLTranslateSetResultTypeCall = 0x03, + /// 音频播放中 + JLTranslateSetResultTypeAudioPlaying = 0x04, + /// 系统繁忙 + JLTranslateSetResultTypeBusy = 0x05, + /// 操作失败 + JLTranslateSetResultTypeFail = 0x06 +}; + +@protocol JLTranslateSetDelegate + +/// 翻译模式通知 +/// - Parameter mode: 翻译模式 +-(void)translateNotifyMode:(JLTranslateSetMode *)mode; + +/// 翻译音频通知 +/// - Parameter mode: 翻译音频 +-(void)translateReceiveAudioMode:(JLTranslateAudio *)mode; + +/// 翻译缓存 +/// - Parameters: +/// - sourceType: 来源类型 +/// - cacheSize: 剩余缓存大小 +-(void)translateNoteCacheInfo:(JLTranslateAudioSourceType)sourceType cacheSize:(uint32_t)cacheSize; + +@end + + + +typedef void(^JLTranslateGetModeInfoBlock)(JLTranslateSetMode *_Nullable mode,JL_CMDStatus status); + +typedef void(^JLTranslateSetModeBlock)(JLTranslateSetResultType type,JL_CMDStatus status); + +typedef void(^JLTranslateGetCacheInfoBlock)(JL_CMDStatus status,JLTranslateAudioSourceType sourceType,uint32_t cacheSize); + +/// 翻译交互 API +@interface JLTranslateSet : ECOneToMorePtl + +@property(nonatomic, assign)NSTimeInterval cmdMaxTime; + +/// 获取翻译模式 +/// - Parameters: +/// - manager: 设备对象 +/// - result: 结果回调 +-(void)cmdGetModeInfo:(JL_ManagerM *)manager + Result:(JLTranslateGetModeInfoBlock)result; + +/// 设置翻译模式 +/// - Parameters: +/// - mode: 模式 +/// - manager: 设备 +/// - result: 结果 +-(void)cmdSetMode:(JLTranslateSetMode *)mode + Manager:(JL_ManagerM *)manager + Result:(JLTranslateSetModeBlock)result; + + +/// 获取设备可用缓存 +/// - Parameters: +/// - manager: 设备 +/// - type: 来源类型 +/// - result: 结果 +-(void)cmdCheckCache:(JL_ManagerM *)manager SourceType:(JLTranslateAudioSourceType) type Result:(JLTranslateGetCacheInfoBlock)result; + +/// 通知翻译模式 +/// - Parameters: +/// - mode: 模式 +/// - manager: 设备 +-(void)cmdNoteMode:(JLTranslateSetMode *)mode + Manager:(JL_ManagerM *)manager; + +/// 推送翻译音频 +/// - Parameters: +/// - audio: 音频 +/// - manager: 设备 +-(void)cmdPushAudioMode:(JLTranslateAudio *)audio + Manager:(JL_ManagerM *)manager; + + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLTranslateSetMode.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLTranslateSetMode.h new file mode 100644 index 000000000..fae797576 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLTranslateSetMode.h @@ -0,0 +1,65 @@ +// +// JLTranslateSetMode.h +// JL_BLEKit +// +// Created by EzioChan on 2024/12/31. +// Copyright © 2024 www.zh-jieli.com. All rights reserved. +// + +#import +#import "JLModel_SPEEX.h" + +NS_ASSUME_NONNULL_BEGIN + +/// 翻译模式 +typedef NS_ENUM(NSUInteger, JLTranslateSetModeType) { + /// 空闲 + JLTranslateSetModeTypeIdle = 0x00, + /// 仅录音 + JLTranslateSetModeTypeOnlyRecord = 0x01, + /// 录音翻译 + JLTranslateSetModeTypeRecordTranslate = 0x02, + /// 通话翻译 + JLTranslateSetModeTypeCallTranslate = 0x03, + /// 音频翻译 + JLTranslateSetModeTypeAudioTranslate = 0x04, + /// 面对面翻译 + JLTranslateSetModeTypeFaceToFaceTranslate = 0x05, + /// 通话翻译立体声模式 + JLTranslateSetModeTypeCallTranslateStereo = 0x06 +}; + +/// 录音策略 +typedef NS_ENUM(NSInteger, JLTranslateRecordType) { + /// 手机端录音 + JLTranslateRecordByPhone = 0x00, + /// 设备录音 + JLTranslateRecordByDevice = 0x01 +}; + +/// 翻译模式 +@interface JLTranslateSetMode : NSObject + +/// 翻译模式 +/// default is JLTranslateSetModeTypeIdle +@property (nonatomic, assign) JLTranslateSetModeType modeType; + +/// 音频数据类型 +/// default is JL_SpeakDataTypeOPUS +@property (nonatomic, assign) JL_SpeakDataType dataType; + +/// 声道 +/// 默认是1 +@property (nonatomic, assign) NSInteger channel; + +/// 采样率 +/// 默认是16000 +@property (nonatomic, assign) NSInteger sampleRate; + ++(JLTranslateSetMode *)beObjc:(NSData *)data; + +-(NSData *)toData; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLTranslationManager.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLTranslationManager.h new file mode 100644 index 000000000..46243dfc9 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLTranslationManager.h @@ -0,0 +1,160 @@ +// +// JLTranslationManager.h +// JL_BLEKit +// +// Created by EzioChan on 2025/1/3. +// Copyright © 2025 www.zh-jieli.com. All rights reserved. +// + +#import +#import "JLTranslateAudio.h" +#import "JLModel_SPEEX.h" +#import "JLTranslateSetMode.h" +#import "JLTranslateSet.h" + +NS_ASSUME_NONNULL_BEGIN + +@class JL_ManagerM; + +/// 翻译回调 +@protocol JLTranslationManagerDelegate + +/// 初始化成功 +/// @param uuid 设备UUID +-(void)onInitSuccess:(NSString *)uuid; + +/// 模式改变 +/// @param uuid 设备UUID +/// @param mode 翻译模式 +-(void)onModeChange:(NSString *)uuid Mode:(JLTranslateSetMode *)mode; + +/// 音频数据 +/// @param uuid 设备UUID +/// @param data 音频数据 +-(void)onReceiveAudioData:(NSString *)uuid AudioData:(JLTranslateAudio *)data; + +/// 错误 +/// @param uuid 设备UUID +/// @param err 错误 +-(void)onError:(NSString *)uuid Error:(NSError *) err; + +@optional + +/// 通话状态 +/// @param isCalling 是否在通话 +/// @param uuid 设备UUID +-(void)isOnCalling:(BOOL)isCalling UUID:(NSString *)uuid; + + +/// 音频队列结束(或空闲/已结束/中间传输时短暂的播空了) +/// @param uuid 设备UUID +-(void)onSendAudioQueueOver:(NSString *)uuid; + +@end + +typedef void(^JLTranslationManagerGetBlock)(JLTranslateSetMode *_Nullable mode,NSError *_Nullable err); + +typedef void(^JLTranslationManagerSetBlock)(JLTranslateSetResultType status,NSError *_Nullable err); + +/// 翻译传输管理对象 +/// Translation transmission management object +@interface JLTranslationManager : NSObject + +/// 代理 +@property (nonatomic, weak) id delegate; + +/// 命令最大超时时间 +/// 默认是 10s +/// Command maximum timeout time +/// Default is 10s +@property (nonatomic, assign) NSTimeInterval cmdMaxTimeOut; + + + +/// 设备蓝牙 UUID +/// Device Bluetooth UUID +@property (nonatomic, strong, readonly) NSString *uuid; + +/// 当前的翻译模式 +/// Current translation mode +@property (nonatomic, strong, readonly) JLTranslateSetMode *translateMode; + +/// 录音策略,默认是手机端录音 +/// Recording policy, the default is to record on the phone +@property (nonatomic, assign) JLTranslateRecordType recordtype; + +/// 是否在通话中 +/// Whether in a call +@property (nonatomic, assign) BOOL isCalling; + +/// 设备对象 +/// Device object +@property (nonatomic, strong, readonly) JL_ManagerM *manager; + +/// 初始化 +/// init +/// - Parameters: +/// - delegate: 代理 JLTranslationManagerDelegate +/// - manager: 设备对象 DeviceManager +/// - result: 回调 +- (instancetype)initWithDelegate:(id)delegate Manager:(JL_ManagerM *)manager Result:(void(^)(BOOL success, NSError *_Nullable err))result; + +/// 是否支持翻译功能 +/// Does it support translation function +- (BOOL)trIsSupportTranslate; + +/// 是否通过 a2dp 播放 +/// Is it played through a2dp +- (BOOL)trIsPlayWithA2dp; + + +/// 是否正在工作 +/// Is it working +- (BOOL)trIsWorking; + +/// 获取当前翻译模式 +/// Get the current translation mode +/// 回复的内容通过 JLTranslationManagerDelegate 代理回调 +/// Reply content through JLTranslationManagerDelegate delegate +/// - Parameter block: 回调 +- (void)trGetCurrentTranslationMode:(JLTranslationManagerGetBlock _Nullable)block; + +/// 开始翻译模式 +/// Start translation mode +/// - Parameter mode: 翻译模式 translation mode +/// - Parameter block: 回调 +- (void)trStartTranslateMode:(JLTranslateSetMode *)mode Block:(JLTranslationManagerSetBlock _Nullable)block; + +/// 退出翻译模式 +/// Exit translation mode +/// - Parameter block: 回调 +- (void)trExitMode:(JLTranslationManagerSetBlock _Nullable)block; + +/// 写入翻译音频,翻译完/操作完后的音频需要携带原音频的音频类型 JLTranslateAudio 进行回复 +/// Write in translation audio, translation complete/operation complete audio need to carry the original audio JLTranslateAudio reply +/// - Parameters: +/// - audio: JLTranslateAudio 原返回音频类型 +/// - audioData: 处理完的音频数据 +- (void)trWriteAudio:(JLTranslateAudio *)audio TranslateData:(NSData *)audioData; + + +/// 写入翻译音频,翻译完/操作完后的音频需要携带原音频的音频类型 JLTranslateAudio 进行回复 +/// 此方案是采取无交互式的下发方法,根据数据对应可能需要的播放时长来进行直接下发,可能存在风险 +/// 当前默认的时长是 20ms 42 byte 的 jlv2 压缩数据,不支持修改 +/// - Parameters: +/// - audio: JLTranslateAudio 原返回音频类型 +/// - audioData: 处理完的音频数据 +-(void)trWriteAudioV2:(JLTranslateAudio *)audio TranslateData:(NSData *)audioData; + +/// 已准备好发送队列 +-(void)trSendIsRelay; + +/// 销毁 +/// Destroy +/// 如果销毁,需要重新生成对象,此对象的回调将会失效 +/// Destroy, if it is destroyed, the callback of this object will be invalidated +- (void)trDestory; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLTwsHealthConfig.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLTwsHealthConfig.h new file mode 100644 index 000000000..61006d6eb --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLTwsHealthConfig.h @@ -0,0 +1,89 @@ +// +// JLTwsHealthMode.h +// JL_BLEKit +// +// Created by EzioChan on 2025/10/11. +// Copyright © 2025 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN +/// tws 健康配置 +@interface JLTwsHealthConfig : NSObject + +//是否支持单次心率采集 +@property (nonatomic, assign) BOOL isSupportOnceHeartRate; + +//是否支持全天心率采集 +@property (nonatomic, assign) BOOL isSupportAllDayHeartRate; + +//是否支持单次血氧采集 +@property (nonatomic, assign) BOOL isSupportOnceBloodOxygen; + +//是否支持全天步数采集 +@property (nonatomic, assign) BOOL isSupportAllDayStep; + + +-(JLTwsHealthConfig *)initWithData:(NSData *)data; + +@end + +/// 心率模型 +@interface JLTwsHeartRateModel : NSObject + +/// 实时心率 +@property(nonatomic,assign)NSInteger avgHeartRate; +/// 静息心率 +@property(nonatomic,assign)NSInteger restHeartRate; +/// 最大心率 +@property(nonatomic,assign)NSInteger maxHeartRate; +/// 单次测量心率 +@property(nonatomic,assign)NSInteger onceHeartRate; + +/// 初始化心率模型 +/// @param data 数据 +/// @param subMask 子掩码 +-(instancetype)initWithData:(NSData *)data subMask:(uint8_t)subMask; + +@end + + +/// 血氧模型 +@interface JLTwsSpO2Model : NSObject + +///血氧饱和度 +@property(nonatomic,assign)NSInteger avgSpO2; +/// 最大值 +@property(nonatomic,assign)NSInteger maxSpO2; +/// 最小值 +@property(nonatomic,assign)NSInteger minSpO2; +/// 单次测量血氧饱和度 +@property(nonatomic,assign)NSInteger onceSpO2; + +/// 初始化血氧模型 +/// @param data 数据 +/// @param subMask 子掩码 +-(instancetype)initWithData:(NSData *)data subMask:(uint8_t)subMask; + +@end + + +/// 步数模型 +@interface JLTwsStepModel : NSObject + +/// 实时步数 +@property(nonatomic,assign)NSInteger realTimeStep; +/// 距离,单位:0.01公里 +@property(nonatomic,assign)NSInteger distance; +/// 热量:单位:千卡 +@property(nonatomic,assign)NSInteger calorie; + +/// 初始化步数模型 +/// @param data 数据 +/// @param subMask 子掩码 +-(instancetype)initWithData:(NSData *)data subMask:(uint8_t)subMask; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLTwsHealthHeartRateModel.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLTwsHealthHeartRateModel.h new file mode 100644 index 000000000..d79e78cf5 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLTwsHealthHeartRateModel.h @@ -0,0 +1,22 @@ +// +// JLTwsHealthHeartRateModel.h +// JL_BLEKit +// +// Created by EzioChan on 2025/12/9. +// Copyright © 2025 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface JLTwsHealthHeartRateModel : NSObject + +/// 全天心率数组,需要使用小文件格式解析进行解读 +@property (strong, nonatomic) NSArray *heartRateList; + +-(JLTwsHealthHeartRateModel *)initWithData:(NSData *)data; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLTwsHealthManager.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLTwsHealthManager.h new file mode 100644 index 000000000..ae24850fa --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLTwsHealthManager.h @@ -0,0 +1,210 @@ +// +// JLTwsHealthManager.h +// JL_BLEKit +// +// Created by EzioChan on 2025/10/11. +// Copyright © 2025 www.zh-jieli.com. All rights reserved. +// + +#import +#import + +NS_ASSUME_NONNULL_BEGIN +@class JL_ManagerM; +@class JLTwsHealthConfig; +@class JLTwsSpO2Model; +@class JLTwsHeartRateModel; +@class JLTwsStepModel; +@class JLTwsHealthHeartRateModel; + +/// 心率、血氧、步数回调 +@protocol JLTwsHealthManagerDelegate + +/// Tws 耳机设备的心率、血氧、步数 +/// @param model Tws 耳机设备的心率、血氧、步数 +-(void)twsHealthConfigModel:(JLTwsHealthConfig *)model; + +/// Tws 耳机设备的心率、血氧、步数传感器状态 +/// @param heartRateStatus 心率传感器状态 +/// @param bloodOxygenStatus 血氧传感器状态 +/// @param stepStatus 步数传感器状态 +/// @param inEarSensorStatus 入耳检测传感器状态 +-(void)twsHealthSensorStatus:(BOOL)heartRateStatus bloodOxygenStatus:(BOOL)bloodOxygenStatus stepStatus:(BOOL)stepStatus inEarSensorStatus:(BOOL)inEarSensorStatus; + +@optional +/// Tws 耳机设备的心率 +/// @param heartRate 心率 +-(void)twsHealthHeartRate:(JLTwsHeartRateModel *) heartRate; + +/// Tws 耳机设备的血氧 +/// @param spO2 血氧 +-(void)twsHealthBloodOxygen:(JLTwsSpO2Model *) spO2; + +/// Tws 耳机设备的步数 +/// @param step 步数 +-(void)twsHealthStep:(JLTwsStepModel *) step; + +/// Tws 耳机设备的全天心率 +/// @param dailyHeartRate 全天心率 +-(void)twsHealthDailyHeartRate:(JLTwsHealthHeartRateModel *) dailyHeartRate; + +/// Tws 耳机设备开启了心率监测 +-(void)twsHealthStartHeartRate; + +/// Tws 耳机设备取消了心率监测 +-(void)twsHealthCancelHeartRate; + +/// Tws 耳机设备开启了血氧监测 +-(void)twsHealthStartBloodOxygen; + +/// Tws 耳机设备取消了血氧监测 +-(void)twsHealthCancelBloodOxygen; + +/// Tws 耳机设备开启了步数监测 +-(void)twsHealthStartStep; + +/// Tws 耳机设备取消了步数监测 +-(void)twsHealthCancelStep; + +/// Tws 耳机设备开启同步全天心率数据 +-(void)twsHealthStartDailyHeartSync; + +/// Tws 耳机设备结束同步全天心率数据 +-(void)twsHealthEndDailyHeartSync; + +@end + +typedef NS_ENUM(NSUInteger, JLTwsHealthOpType) { + JLTwsHealthOpTypeStartHeartRate = 1, + JLTwsHealthOpTypeCancelHeartRate = 2, + JLTwsHealthOpTypeStartBloodOxygen = 3, + JLTwsHealthOpTypeCancelBloodOxygen = 4, + JLTwsHealthOpTypeStartStep = 5, + JLTwsHealthOpTypeCancelStep = 6, + JLTwsHealthOpTypeStartDailyHeartSync = 32, + JLTwsHealthOpTypeEndDailyHeartSync = 33, +}; + +typedef void(^JLTwsHealthModeBlock)(JLTwsHealthConfig *_Nullable mode, NSError * _Nullable error); + +typedef void(^JLTwsHealthSensorStatusBlock)(BOOL heartRateStatus, BOOL bloodOxygenStatus, BOOL stepStatus, BOOL inEarSensorStatus, NSError * _Nullable error); + +typedef void(^JLTwsHealthResultBlock)(NSError * _Nullable error); + +/// 管理 TWS 耳机健康数据的统一入口,负责: +/// 1) 发送健康相关指令(心率、血氧、步数、全天心率同步等) +/// 2) 解析设备应答与设备主动推送事件,并通过回调/代理分发 +/// 3) 管理传感器状态、最近一次检测结果与超时配置 +@interface JLTwsHealthManager : ECOneToMorePtl + +/// 心率传感器状态 +/// YES:开启检测中 +/// NO:关闭 +@property(nonatomic, assign)BOOL heartRateSensorStatus; + +/// 血氧传感器状态 +/// YES:开启检测中 +/// NO:关闭 +@property(nonatomic, assign)BOOL bloodOxygenSensorStatus; + +/// 步数传感器状态 +/// YES:开启检测中 +/// NO:关闭 +@property(nonatomic, assign)BOOL stepSensorStatus; + +/// 入耳检测传感器状态 +/// YES:入耳 +/// NO:出耳 +@property(nonatomic, assign)BOOL inEarSensorStatus; + +/// 代理 +@property(nonatomic, weak)id delegate; + +-(instancetype)init NS_UNAVAILABLE; + +-(instancetype) init:(JL_ManagerM *)manager delegate:(id)delegate; + +/// 查询配置 +/// - Parameters: +/// - block: 回调 +-(void)cmdGetHealthConfigWithResult:(JLTwsHealthModeBlock)block; + +/// 查询状态 +/// - Parameters: +/// - block: 回调 +-(void)cmdCheckSensorStatus:(JLTwsHealthSensorStatusBlock __nullable)block; + + +/// 控制耳机进行健康数据相关的操作 +/// 操作类型: +/// JLTwsHealthOpTypeStartHeartRate 开启心率监测 +/// JLTwsHealthOpTypeCancelHeartRate 取消心率监测 +/// JLTwsHealthOpTypeStartBloodOxygen 开启血氧监测 +/// JLTwsHealthOpTypeCancelBloodOxygen 取消血氧监测 +/// JLTwsHealthOpTypeStartStep 开启步数监测 +/// JLTwsHealthOpTypeCancelStep 取消步数监测 +/// JLTwsHealthOpTypeStartDailyHeartSync 开启同步全天心率数据 +/// JLTwsHealthOpTypeEndDailyHeartSync 结束同步全天心率数据 +/// 示例:开启心率监测 +/// [manager twsHealthOpActionWithType:JLTwsHealthOpTypeStartHeartRate result:^(void){ +/// NSLog(@"心率监测已开启"); +/// }]; +/// +/// 示例:取消心率监测 +/// [manager twsHealthOpActionWithType:JLTwsHealthOpTypeCancelHeartRate result:^(void){ +/// NSLog(@"心率监测已取消"); +/// }]; +/// +/// 示例:开启血氧监测 +/// [manager twsHealthOpActionWithType:JLTwsHealthOpTypeStartBloodOxygen result:^(void){ +/// NSLog(@"血氧监测已开启"); +/// }]; +/// +/// 示例:取消血氧监测 +/// [manager twsHealthOpActionWithType:JLTwsHealthOpTypeCancelBloodOxygen result:^(void){ +/// NSLog(@"血氧监测已取消"); +/// }]; +/// +/// 示例:开启步数监测 +/// [manager twsHealthOpActionWithType:JLTwsHealthOpTypeStartStep result:^(void){ +/// NSLog(@"步数监测已开启"); +/// }]; +/// +/// 示例:取消步数监测 +/// [manager twsHealthOpActionWithType:JLTwsHealthOpTypeCancelStep result:^(void){ +/// NSLog(@"步数监测已取消"); +/// }]; +/// +/// 示例:开启同步全天心率数据 +/// [manager twsHealthOpActionWithType:JLTwsHealthOpTypeStartDailyHeartSync result:^(void){ +/// NSLog(@"全天心率同步已开启"); +/// }]; +/// +/// 示例:结束同步全天心率数据 +/// [manager twsHealthOpActionWithType:JLTwsHealthOpTypeEndDailyHeartSync result:^(void){ +/// NSLog(@"全天心率同步已结束"); +/// }]; +/// - Parameters: +/// - type: 操作类型 +/// - block: 回调 +-(void)twsHealthOpActionWithType:(JLTwsHealthOpType)type result:(JLTwsHealthResultBlock __nullable)block; + +/// 查询实时步数 +/// 轮询策略 +/// - Parameter time: 轮询间隔 单位 s +/// 一般固件要求时间为 5min 内轮询一次 +/// 例子:[manager loopQueryRealStep:4 * 60]; +-(void)loopQueryRealStep:(NSTimeInterval)time; + +/// 取消轮询 +/// 例子:[manager cancelLoopQueryRealStep]; +-(void)cancelLoopQueryRealStep; + +/// 查询实时步数 +/// 例子:[manager queryRealStep]; +-(void)queryRealStep; + + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLTwsSupportFuncs.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLTwsSupportFuncs.h new file mode 100644 index 000000000..49cb420bb --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLTwsSupportFuncs.h @@ -0,0 +1,51 @@ +// +// JLTwsSupportFuncs.h +// JL_BLEKit +// +// Created by EzioChan on 2024/12/31. +// Copyright © 2024 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface JLTwsSupportFuncs : NSObject + +/// 是否支持ANC功能 +@property(nonatomic,assign)BOOL isSupportAnc; + +/// 是否支持游戏模式 +@property(nonatomic,assign)BOOL isSupportGameMode; + +/// 是否支持自适应ANC +@property(nonatomic,assign)BOOL isSupportAutoAnc; + +/// 是否支持智能免摘 +@property(nonatomic,assign)BOOL isSupportSmartPickFree; + +/// 是否支持场景降噪 +/// scene noise reduction +@property(nonatomic,assign)BOOL isSupportSceneNoiseReduction; + +/// 是否支持风噪检测 +/// Noise detection +@property(nonatomic,assign)BOOL isSupportNoiseDetection; + +/// 是否支持人声增强模式 +/// Vocal Boost Mode +@property(nonatomic,assign)BOOL isSupportVocalBoostMode; + +/// 固件是否支持“一拖二”开 关功能 +/// Does the firmware support the "one drag two" switch function +@property(nonatomic,assign)BOOL isSupportDragWithMore; + + + +-(void)configWithTargetFeature:(NSData *)data; + + + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLWatchEnum.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLWatchEnum.h new file mode 100644 index 000000000..b939ec1eb --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLWatchEnum.h @@ -0,0 +1,228 @@ +// +// JLWatchEnum.h +// JL_BLEKit +// +// Created by EzioChan on 2021/8/2. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import + +extern NSString *_Nonnull const JL_Watch_HeartRate; +extern NSString *_Nonnull const JL_Watch_AirPressure; +extern NSString *_Nonnull const JL_Watch_Altitude; +extern NSString *_Nonnull const JL_Watch_MoveSteps; +extern NSString *_Nonnull const JL_Watch_Stress; +extern NSString *_Nonnull const JL_Watch_Oxsaturation; +extern NSString *_Nonnull const JL_Watch_MaxOxg; +extern NSString *_Nonnull const JL_Watch_RecTime; +extern NSString *_Nonnull const JL_Watch_SportMsg; +extern NSString *_Nonnull const JL_Watch_WatchLog; + +NS_ASSUME_NONNULL_BEGIN + +typedef NS_ENUM(UInt8, JL_WATCH_LOG_MASK) { + /// 加速度 + JL_WATCH_LOG_MASK_Acceleration = 0x80000000 >> 31, + /// 心率和血氧 + JL_WATCH_LOG_MASK_HeartRate_BloodOxy = 0x80000000 >> 30, +}; + +typedef NS_ENUM(UInt8, JL_WATCH_LOG_TYPE) { + ///设备回的加速度 + JL_WATCH_LOG_TYPE_Res_Acceleration = 0x00, + /// 设备回的心率血氧 + JL_WATCH_LOG_TYPE_Res_HeartRate_BloodOxy = 0x01, +}; + +/// 运动记录标记包类型 +typedef NS_ENUM(UInt8, JL_SRMDataType) { + ///开始包 + JL_SRM_Start = 0x00, + ///基础包 + JL_SRM_Basic = 0x01, + ///暂停包 + JL_SRM_Pause = 0x02, + ///每公里配速包 + JL_SRM_Pace = 0x03, + ///结束包 + JL_SRM_End = 0xff, +}; + +// 实时健康数据类型 +typedef NS_ENUM(UInt8, JL_SportDataType) { + ///心率 + JL_SportDataTypeHeartRate = 0, + ///空气压强 + JL_SportDataTypeAirPressure = 1, + ///海拔高度 + JL_SportDataTypeAltitude = 2, + ///运动步数 + JL_SportDataTypeMovementSteps = 3, + ///压力 + JL_SportDataTypeStress = 4, + ///血氧饱和度 + JL_SportDataTypeOxygenSaturation = 5, + ///训练负荷 + JL_SportDataTypeTrainingLoad = 6, + ///最大摄氧量 + JL_SportDataTypeMaxOxygenUptake = 7, + ///运动恢复时间 + JL_SportDataTypeRecoveryTime = 8, + ///运动信息 + JL_SportDataTypeSportMessage = 9, +}; + +// 运动模式 +typedef NS_ENUM(UInt8, JL_SportPattern) { + JL_SportPatternRun = 0, ///跑步 + JL_SportPatternClimb = 1, ///爬山 + JL_SportPatternSwim = 2, ///游泳 +}; + +// 运动数据格式 +typedef NS_ENUM(UInt8, JL_SportDataFormat) { + JL_SportDataFormatBeUint8 = 1, + JL_SportDataFormatBeBigendUint16 = 2, + JL_SportDataFormatBeBigendUint32 = 4, +}; + +typedef NS_ENUM(UInt8, JL_WATCH_SETTING_MASK) { + JL_WATCH_SETTING_MASK_READ_INFO = 0x00,///App读取设备信息 + JL_WATCH_SETTING_MASK_SET_INFO = 0x01,///向设备写入设置信 息 + JL_WATCH_SETTING_MASK_RECIVE_INFO = 0x02,///收到设备推送设置信息 +}; + +/// 查询读取设备信息 +///使用示例: +/// 如查询:传感器、连续测量心率、跌到监察 +/// 则对应的uint32_t 为:0x0000008A +/// 即对应的Bit位指示为:0000 0000 0000 0000 0000 0000 1000 1010 +/// Bit0:保留(考虑是否用于做功能支持位)------ 0 +/// Bit1:传感器功能 +/// Bit2:久坐提醒 +/// Bit3:连续测量心率 +/// Bit4:运动心率提醒 +/// Bit5:压力自动检测 +/// Bit6:睡眠检测 +/// Bit7:跌到监察 +/// Bit8:抬腕监察 +/// Bit9:个人信息 +/// Bit10:蓝牙断开提醒 +/// Bit11:血氧测量提醒 +/// Bit12:紧急联系人 +typedef NS_ENUM(uint32_t, JL_WATCH_SETTING) { + JL_WATCH_SETTING_SENSOR_FUNC = 0x0002, // Bit1:传感器功能 + JL_WATCH_SETTING_SEDENTARY_REMIND = 0x0004, // Bit2:久坐提醒 + JL_WATCH_SETTING_CONTINUOUS_HEARTRATE_MEASUREMENT = 0x0008, // Bit3:连续测量心率 + JL_WATCH_SETTING_EXERCISE_HEARTRATE_REMINDER = 0x0010, // Bit4:运动心率提醒 + JL_WATCH_SETTING_AUTOMATIC_PRESSURE_DETECTION = 0x0020, // Bit5:压力自动检测 + JL_WATCH_SETTING_SLEEP_DETECTION = 0x0040, // Bit6:睡眠检测 + JL_WATCH_SETTING_FALL_DETECTION = 0x0080, // Bit7:跌到监察 + JL_WATCH_SETTING_LIFTWRIST_DETECTION = 0x0100, // Bit8:抬腕监察 + JL_WATCH_SETTING_PERSONAL_INFO = 0x0200, // Bit9:个人信息 + JL_WATCH_SETTING_BLUETOOTH_DISCONECTED_REMINDER = 0x0400, // Bit10:蓝牙断开提醒 + JL_WATCH_SETTING_OXIMETRY = 0x0800, //Bit11:血氧测量提醒 + JL_WATCH_SETTING_EMERGENCY_CONTACT = 0x1000, //Bit12:紧急联系人 +}; + +/// 传感器功能开关 +/// ///使用示例: +/// 如设置打开:计步器、计步器记录、血氧、血氧记录、海拔 +/// 则对应的uint16_t 为:0x73 +/// 即对应的Bit位指示为: 0111 0011 +/// Bit0:计步器开关 +/// Bit1:计步器记录开关 +/// Bit2:心率传感器开关 +/// Bit3:心率传感器记录开关 +/// Bit4:血氧传感器开关 +/// Bit5:血氧传感器记录开关 +/// Bit6:海拔气压传感器开关 +/// Bit7:海拔气压传感器记录开关 +typedef NS_ENUM(uint16_t, JL_SENSOR_FUNC_SWITCH) { + JL_SENSOR_FUNC_SWITCH_PEDOMETER = 0x01, // Bit0:计步器开关 + JL_SENSOR_FUNC_SWITCH_PEDOMETER_RECORD = 0x02, // Bit1:计步器记录开关 + JL_SENSOR_FUNC_SWITCH_HEARTRATE = 0x04, // Bit2:心率传感器开关 + JL_SENSOR_FUNC_SWITCH_HEARTRATE_RECORD = 0x08, // Bit3:心率传感器记录开关 + JL_SENSOR_FUNC_SWITCH_BLOODOXYGEN = 0x10, // Bit4:血氧传感器开关 + JL_SENSOR_FUNC_SWITCH_BLOODOXYGEN_RECORD = 0x20, // Bit5:血氧传感器记录开关 + JL_SENSOR_FUNC_SWITCH_ALTITUDE_AIRPRESSURE = 0x40, // Bit6:海拔气压传感器开关 + JL_SENSOR_FUNC_SWITCH_ALTITUDE_AIRPRESSURE_RECORD = 0x80, // Bit7:海拔气压传感器记录开关 +}; + +///运动状态同步相关命令 +typedef NS_ENUM(UInt8, JL_WearSyncStatus) { + /// 读取运动信息 + JL_WearSyncStatus_ReadInfo = 0x00, + /// 开始运动 + JL_WearSyncStatus_Start = 0x01, + /// APP结束运动 + JL_WearSyncStatus_EndByApp = 0x02, + /// 固件结束运动 + JL_WearSyncStatus_EndByDevice = 0x03, + /// 暂停运动 + JL_WearSyncStatus_Pause = 0x04, + /// 继续运动 + JL_WearSyncStatus_Continue = 0x05, + /// 请求运动实时数据 + JL_WearSyncStatus_RealTimeInfoRequire = 0x06, +}; + + +///运动状态 +typedef NS_ENUM(UInt8, WatchSportStatus) { + /// 暂停 + WatchSportStatus_Pause = 0x00, + /// 运动中 + WatchSportStatus_Motion = 0x01 +}; + +///心率模式 +typedef NS_ENUM(UInt8, WatchHeartRateType) { + ///最大心率模式 + WatchHeartRate_Max = 0x00, + ///存储心率模式 + WatchHeartRate_Save = 0x01 +}; +/// 运动强度类型 +typedef NS_ENUM(UInt8, WatchExerciseIntensityType) { + ///非运动模式 + WatchExercise_Not = 0x00, + ///最大心率模式:热身 储备心率模式:有氧基础 + WatchExercise_Level1 = 0x01, + ///最大心率模式:燃脂 储备心率模式:有氧进阶 + WatchExercise_Level2 = 0x02, + ///最大心率模式:有氧耐力 储备心率模式:乳酸阈值 + WatchExercise_Level3 = 0x03, + ///最大心率模式:无氧耐力 储备心率模式:无氧基础 + WatchExercise_Level4 = 0x04, + ///最大心率模式:极限 储备心率模式:无氧进阶 + WatchExercise_Level5 = 0x05 +}; +///睡眠类型 +typedef NS_ENUM(UInt8, WatchSleepType) { + ///清醒 + WatchSleep_WideAwake = 0xFF, + /// 浅睡 + WatchSleep_Light = 0x01, + /// 深睡 + WatchSleep_Deep = 0x02, + /// 快速眼动 + WatchSleep_RapidEyeMovement = 0x03, + /// 零星小睡 + WatchSleep_SporadicNaps = 0x04 +}; + + +@interface JLWatchEnum : NSObject + +/** + * 运动数据类型转换为运动数据格式 + * @param sportDataType 运动数据类型 + * @return JL_SportDataFormat 运动数据格式 + */ ++ (JL_SportDataFormat)sportDataFormatFromSportDataType:(JL_SportDataType)sportDataType; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLWearSync.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLWearSync.h new file mode 100644 index 000000000..b4cd9509d --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLWearSync.h @@ -0,0 +1,76 @@ +// +// JLWearSync.h +// JL_BLEKit +// +// Created by EzioChan on 2021/10/26. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import +#import "JL_RCSP.h" +#import "JLWatchEnum.h" +#import "JL_EntityM.h" +#import "JL_SDM_Header.h" +#import "JL_WatchSyncProtocol.h" + + +NS_ASSUME_NONNULL_BEGIN + +/// 穿戴设备状态同步指令 +@interface JLWearSync : NSObject + ++(instancetype)share; + +/// 加入协议响应 +/// @param delegate 对象 +-(void)addProtocol:(id)delegate; + +/// 移除协议响应 +/// @param delegate 对象 +-(void)removeProtocol:(id)delegate; + +/// 读取运动信息 +/// @param entity 设备entity +/// @param block JLWearSyncInfoModel 回调 +/// 本条命令的回调通过JLWearSyncProtocol协议 +///-(void)jlWearSyncSportInfo:(JLWearSyncInfoModel *_Nonnull)model; +-(void)w_requireSportInfoWith:(JL_EntityM *)entity Block:(JL_CB_SyncSportInfo _Nullable)block; + +///开始运动命令 +/// @param type 运动类型 +/// 0x00 :非运动模式 +/// 0x01 :室外跑步 +/// 0x02 :室内跑步 +/// @param entity 设备entity +/// @param block 命令成功与否回调 +-(void)w_SportStart:(uint8_t)type With:(JL_EntityM *)entity Block:(JL_CB_Status _Nullable)block; + +/// 结束运动命令 +/// @param entity 设备entity +///本条命令的回调通过JLWearSyncProtocol协议 +///-(void)jlWearSyncStopMotion:(JLWearSyncFinishModel *_Nonnull)model With:(JL_EntityM *_Nonnull)entity; +-(void)w_SportFinishWith:(JL_EntityM*)entity; + +///暂停运动命令 +/// @param entity 设备entity +/// @param block 命令成功与否回调 +-(void)w_SportPauseWith:(JL_EntityM*)entity Block:(JL_CB_Status _Nullable)block; + +///继续运动命令 +/// @param entity 设备entity +/// @param block 命令成功与否回调 +-(void)w_SportContinueWith:(JL_EntityM*)entity Block:(JL_CB_Status _Nullable)block; + +/// 读取运动实时数据 +/// @param entity 设备entity +///本条命令的回调通过JLWearSyncProtocol协议 +-(void)w_requireRealTimeSportInfoWith:(JL_EntityM *)entity; + +/// 实时数据获取时间间隔设置 +/// @param interval 时间间隔,单位:ms +/// @param entity 设备entity +-(void)pr_setTimeInterval:(UInt16)interval With:(JL_EntityM *)entity; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLWearSyncCustom.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLWearSyncCustom.h new file mode 100644 index 000000000..130e23941 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLWearSyncCustom.h @@ -0,0 +1,97 @@ +// +// JLWearSyncCustom.h +// JL_BLEKit +// +// Created by EzioChan on 2022/4/13. +// Copyright © 2022 www.zh-jieli.com. All rights reserved. +// + +#import +#import "JL_RCSP.h" +#import "JL_EntityM.h" +#import "JL_SDM_Header.h" + + + +NS_ASSUME_NONNULL_BEGIN + +@protocol JLWearSyncCustomPtl + +/// 运动信息返回 +/// @param model 运动信息对象 +/// @param entity 设备entity +-(void)jlWearSyncSportInfo:(JLWearSyncDataModel *_Nonnull)model With:(JL_EntityM *_Nonnull)entity; + +/// 结束运动返回内容 +/// @param model 结束时间相隔信息对象 +/// @param entity 设备entity +-(void)jlWearSyncStopMotion:(JLWearSyncFinishDataModel *_Nonnull)model With:(JL_EntityM *_Nonnull)entity; + +/// 开始运动返回消息 +/// @param entity 设备entity +-(void)jlWearSyncStartMotionWith:(JL_EntityM *_Nonnull)entity; + +/// 暂停运动 +/// @param entity 设备entity +-(void)jlWearSyncStatusPauseWith:(JL_EntityM *_Nonnull)entity; + +/// 继续运动 +/// @param entity 设备entity +-(void)jlWearSyncStatusContiuneWith:(JL_EntityM *_Nonnull)entity; + +/// 实时数据回调 +/// @param model 实时数据模型 +/// @param entity 设备entity +-(void)jlWearSyncRealTimeData:(JLWearSyncRealTimeData *_Nonnull)model With:(JL_EntityM *_Nonnull)entity; + +@end + + + +@interface JLWearSyncCustom : NSObject + +@property(nonatomic,weak)id delegate; + +/// 读取运动信息 +/// @param entity 设备entity +/// @param block JLWearSyncInfoModel 回调 +/// 本条命令的回调通过JLWearSyncProtocol协议 +///-(void)jlWearSyncSportInfo:(JLWearSyncInfoModel *_Nonnull)model; +-(void)w_requireSportInfoWith:(JL_EntityM *)entity Block:(JL_CB_SyncSportDataInfo _Nullable)block; + +///开始运动命令 +/// @param type 运动类型 +/// @param entity 设备entity +/// @param block 命令成功与否回调 +-(void)w_SportStart:(UInt8)type With:(JL_EntityM *)entity Block:(JL_CB_Status _Nullable)block; + +/// 结束运动命令 +/// @param entity 设备entity +///本条命令的回调通过JLWearSyncProtocol协议 +///-(void)jlWearSyncStopMotion:(JLWearSyncFinishModel *_Nonnull)model With:(JL_EntityM *_Nonnull)entity; +-(void)w_SportFinishWith:(JL_EntityM*)entity; + +///暂停运动命令 +/// @param entity 设备entity +/// @param block 命令成功与否回调 +-(void)w_SportPauseWith:(JL_EntityM*)entity Block:(JL_CB_Status _Nullable)block; + +///继续运动命令 +/// @param entity 设备entity +/// @param block 命令成功与否回调 +-(void)w_SportContinueWith:(JL_EntityM*)entity Block:(JL_CB_Status _Nullable)block; + +/// 读取运动实时数据 +/// @param entity 设备entity +///本条命令的回调通过JLWearSyncProtocol协议 +-(void)w_requireRealTimeSportInfoWith:(JL_EntityM *)entity; + +/// 实时数据获取时间间隔设置 +/// @param interval 时间间隔,单位:ms +/// @param entity 设备entity +-(void)pr_setTimeInterval:(UInt16)interval With:(JL_EntityM *)entity; + + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLWearSyncFinishModel.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLWearSyncFinishModel.h new file mode 100644 index 000000000..8ef17f472 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLWearSyncFinishModel.h @@ -0,0 +1,54 @@ +// +// JLWearSyncFinishModel.h +// JL_BLEKit +// +// Created by EzioChan on 2021/10/27. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import +#import "JLWatchEnum.h" +NS_ASSUME_NONNULL_BEGIN + + +@interface JLWearSyncFinishDataModel:NSObject + +@property(nonatomic,strong)NSData *basicData; + +@end + + +@interface JLWatchExerciseIntens:NSObject + +/// 运动强度类型 +@property(nonatomic,assign)WatchExerciseIntensityType type; + +/// 持续时间 +@property(nonatomic,assign)UInt32 duration; + +@end + +@interface JLWearSyncFinishModel : JLWearSyncFinishDataModel + +/// 结束时间 +@property(nonatomic,strong)NSDate *endTime; + +/// 运动恢复时间 +/// 格式 :hour : min +@property(nonatomic,strong)NSString *recyleTime; + +/// 运动记录文件ID +@property(nonatomic,assign)UInt16 sportId; + +/// 运动记录文件大小 +@property(nonatomic,assign)UInt16 fileSize; + +/// 运动强度类型数组 +@property(nonatomic,strong)NSArray *durationArray; + + ++(JLWearSyncFinishModel *)initWithData:(NSData*)data; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLWearSyncInfoModel.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLWearSyncInfoModel.h new file mode 100644 index 000000000..9dc5086a3 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLWearSyncInfoModel.h @@ -0,0 +1,51 @@ +// +// JLWearSyncInfoModel.h +// JL_BLEKit +// +// Created by EzioChan on 2021/10/27. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import +#import "JLWatchEnum.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface JLWearSyncDataModel : NSObject + +/// 基础返回对象 +@property(nonatomic,strong)NSData *basicData; + +@end + + +@interface JLWearSyncInfoModel : JLWearSyncDataModel + +///运动模式类型 +/// 0x00 非运动模式 +/// 0x01 户外跑步 +/// 0x02 室内跑步 +@property(nonatomic,assign)uint8_t sportType; + +/// 运动状态 +@property(nonatomic,assign)WatchSportStatus status; + +///运动Id +@property(nonatomic,assign)double sportID; + +///设备是否包含GPS +@property(nonatomic,assign)BOOL hasGPS; + +///心率模式 +@property(nonatomic,assign)WatchHeartRateType heartRateType; + +///建议实时数据读取时间间隔,单位:ms +@property(nonatomic,assign)UInt16 interval; + +/// 利用设备返回的数据初始化一个运动信息对象 +/// @param data 设备返回数据 ++(JLWearSyncInfoModel *)initWithData:(NSData *)data; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLWearSyncRealTimeModel.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLWearSyncRealTimeModel.h new file mode 100644 index 000000000..ed10d1e50 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLWearSyncRealTimeModel.h @@ -0,0 +1,57 @@ +// +// JLWearSyncRealTimeModel.h +// JL_BLEKit +// +// Created by EzioChan on 2021/10/27. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import +#import "JLWatchEnum.h" + +NS_ASSUME_NONNULL_BEGIN + + +@interface JLWearSyncRealTimeData : NSObject + +@property(nonatomic,strong)NSData *basicData; + +@end + +@interface JLWearSyncRealTimeModel : JLWearSyncRealTimeData + +/// 类型 +@property(nonatomic,assign)UInt8 type; + +/// 运动步数 +@property(nonatomic,assign)UInt32 sportStep; + +/// 运动距离,单位:0.01公里 +@property(nonatomic,assign)UInt16 distance; + +/// 运动时长:单位:秒 +@property(nonatomic,assign)UInt32 exerciseTime; + +/// 速度,单位0:0.01公里/小时,(倒数为配速,单位:秒/公里) +@property(nonatomic,assign)UInt16 speed; + +/// 热量,单位:千卡 +@property(nonatomic,assign)UInt16 calories; + +/// 步频,单位:步/分钟 +@property(nonatomic,assign)UInt16 cadence; + +///步幅,单位:厘米 +@property(nonatomic,assign)UInt16 stride; + +///实时运动强度状态 +@property(nonatomic,assign)WatchExerciseIntensityType statusType; + +///运动实时心率 +@property(nonatomic,assign)UInt8 heartRate; + ++(JLWearSyncRealTimeModel *)initWithData:(NSData *)data; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLWearable.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLWearable.h new file mode 100644 index 000000000..6096f3264 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLWearable.h @@ -0,0 +1,137 @@ +// +// JLWearable.h +// Test +// +// Created by EzioChan on 2021/4/6. +// Copyright © 2021 Zhuhai Jieli Technology Co.,Ltd. All rights reserved. +// + +#import +#import "JL_RCSP.h" +#import "JL_EntityM.h" +#import "JL_SDM_Header.h" +#import "JL_WatchProtocol.h" +#import "JLWearSync.h" +#import "JLWearSyncCustom.h" + +NS_ASSUME_NONNULL_BEGIN + +#define JL_RECIVED_DATA @"JL_RECIVED_DATA" + + +/// 穿戴设备基础命令控制 +@interface JLWearable : NSObject + +@property(nonatomic,assign,readonly)uint8_t version; +@property(nonatomic,strong)JL_CB_HeartRate heartRate; +@property(nonatomic,strong)JL_CB_AirPressure airPressure; +@property(nonatomic,strong)JL_CB_Altitude alititude; +@property(nonatomic,strong)JL_CB_MoveSteps moveStep; +@property(nonatomic,strong)JL_CB_Stress stress; +@property(nonatomic,strong)JL_CB_Oxsaturation oxStaturation; +@property(nonatomic,strong)JL_CB_TrainLoad trainLoad; +@property(nonatomic,strong)JL_CB_MaxOxg maxOxg; +@property(nonatomic,strong)JL_CB_RecTime rectime; +@property(nonatomic,strong)JL_CB_SportMsg sportMsg; +@property(nonatomic,strong)JL_CB_WatchLog logMsg; +@property(nonatomic,strong,readonly)JL_EntityM* responseEntity; + ++(instancetype)sharedInstance; + +/// 把对象加入协议 +/// @param delegate 对象 +-(void)w_addDelegate:(id)delegate; + +/// 移除对象的协议 +/// @param delegate 对象 +-(void)w_removeDelegate:(id)delegate; + +/// 移除所有对象的协议 +-(void)w_removeAll; + +/// 请求穿戴设备的数据 +/// 使用例子: +/** + JLWearable *w = [JLWearable sharedInstance]; + NSMutableArray *array = [NSMutableArray new]; + [array addObject:[JL_SDM_HeartRate requireRealTime:YES Resting:YES Max:YES]]; + [array addObject:[JL_SDM_Altitude requireRealTime:YES min:NO Max:NO]]; + [array addObject:[JL_SDM_MoveSteps require]]; + w.heartRate = ^(JL_SDM_HeartRate *heartRate) { + //心率信息 + }; + w.alititude = ^(JL_SDM_Altitude *altitude) { + //海拔信息 + }; + JL_EntityM *entity = [[JL_EntityM alloc] init]; + [w requestSportData:array withEntity:entity]; +*/ +/// @param reqModels 数据模型,可参考JL_SDM_相关的类型请求,这是个父类,这里是通过多态的方式来实现选择性的请求 +/// @param entity 当前设备的entity +/// +-(void)w_requestSportData:(NSMutableArray*)reqModels withEntity:(JL_EntityM *)entity; + +/// 私有测试接口 +/// @param data 数据 +/// @param entity 当前设备entity +/// @param opcode 操作 +-(void)pr_requestSportDataMask:(NSData *)data withEntity:(JL_EntityM *)entity opCode:(uint16_t)opcode; + + +/// 收到数据解析 +/// @param pkg 收到的数据包 +/// @param entity 当前的entity +-(void)w_inputPKG:(JL_PKG*)pkg withEntity:(JL_EntityM *)entity; + +/// 推送天气到手表 +/// @param weather 天气内容 +/// @param entity 服务对象 +/// @param block 推送回调 +-(void)w_syncWeather:(JL_MSG_Weather *)weather withEntity:(JL_EntityM *)entity result:(JL_CB_Status)block; + + +/** + 请求设备传感器的log + 使用示例 + [[JLWearable shareInstance] w_transportLog:Log_Acceleration | Log_HeartRate_BloodOxy withEntity:entity]; + */ +/// 请求设备传感器的log +/// @param model 请求类型(Log_Acceleration | Log_HeartRate_BloodOxy) +/// @param entity 当前的entity +-(void)w_transportLog:(JL_WATCH_LOG_MASK)model withEntity:(JL_EntityM *)entity; + + +//MARK: - 设备设置命令 + +/// 查询读取设备信息 +/// @param target JL_WATCH_SETTING枚举,支持|运算同时设置多个设备类型信息 +/// @param entity 当前的entity +/// /// 本方法的返回结果,需要接收对应的协议:JL_WatchProtocol ,并把遵循协议的对象加入到本单例中 +/// -(void)w_addDelegate:(id)delegate; +-(void)w_InquireDeviceFuncWith:(JL_WATCH_SETTING)target withEntity:(JL_EntityM *)entity; + +/// 向设备写入设置信息 +/// @param models 设置对应的功能模型 +/// @param entity 当前的entity +/// @param block 回复设置的状态 +/// 使用示例: +/// 如设置:传感器、久坐提醒、蓝牙断开提醒 +/// NSMutableArray * models = [NSMutableArray new]; +/// /*计步相关传感器*/ +/// JLSensorFuncModel *model = [[JLSensorFuncModel alloc] initWhthFuncByte:0x0073];//详情设置可参考相关接口 +/// [models addObject:model]; +/// /*久坐设置*/ +/// JLSedentaryRmdModel *model1 = [[JLSedentaryRmdModel alloc] initWithModel:s_Shake Status:true]; +/// [models addObject:model1]; +/// /*蓝牙断开提醒*/ +/// JLDisconnectRemindModel *model2 = [[JLDisconnectRemindModel alloc] initWithModel:s_BrightScreen Status:true]; +/// [models addObject:model2]; +/// [[JLWearable sharedInstance] w_SettingDeviceFuncWith:models withEntity:requestEntity] +/// 本方法的返回结果,需要接收对应的协议:JL_WatchProtocol ,并把遵循协议的对象加入到本单例中 +/// -(void)w_addDelegate:(id)delegate; +-(void)w_SettingDeviceFuncWith:(NSArray *)models withEntity:(JL_EntityM *)entity result:(JL_CB_Status)block; + + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLWristLiftDetectionModel.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLWristLiftDetectionModel.h new file mode 100644 index 000000000..c7a838e27 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLWristLiftDetectionModel.h @@ -0,0 +1,37 @@ +// +// JLWristLiftDetectionModel.h +// JL_BLEKit +// +// Created by EzioChan on 2021/10/12. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import "JLwSettingModel.h" + +NS_ASSUME_NONNULL_BEGIN + +/// 抬腕监测设置 +@interface JLWristLiftDetectionModel : JLwSettingModel +///开关 +@property(nonatomic,assign)WatchSwitchType status; +/// 提醒模式 +@property(nonatomic,assign)WatchRemindType rType; +/// 开始时间 +@property(nonatomic,strong)WatchTimer *start; + +/// 结束时间 +@property(nonatomic,strong)WatchTimer *end; + + +-(instancetype)initWithData:(NSData *)data; + +/// 构建一个抬腕提醒设置对象 +/// @param type 提醒类型 +/// @param status 开关类型 +/// @param begin 开始时间 +/// @param ed 结束时间 +- (instancetype)initWithModel:(WatchRemindType)type Status:(WatchSwitchType )status Begin:(WatchTimer *)begin End:(WatchTimer *)ed; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_AlarmClockManager.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_AlarmClockManager.h new file mode 100644 index 000000000..5b2f837f2 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_AlarmClockManager.h @@ -0,0 +1,116 @@ +// +// JL_AlarmClockManager.h +// JL_BLEKit +// +// Created by EzioChan on 2021/12/16. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import +#import +#import +#import +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +typedef NS_ENUM(UInt8, JL_RtcOperate) { + JL_FlashOperateFlagRead = 0x00, //读取 + JL_FlashOperateFlagWrite = 0x01, //设置 +}; + +typedef void(^JL_RTC_ALARM_BK)(NSArray * __nullable array, uint8_t flag); + +typedef void(^JL_RTC_GET_ALARM_BK)(NSArray * __nullable alarms,NSError * __nullable error); + +#pragma mark ---> 闹钟响与停止 +///闹钟正在响 +extern NSString *kJL_MANAGER_RTC_RINGING; + +///闹钟停止响 +extern NSString *kJL_MANAGER_RTC_RINGSTOP; + +//闹钟铃声试听 +extern NSString *kJL_MANAGER_RTC_AUDITION; + + +/// RTC闹钟管理者 +@interface JL_AlarmClockManager : JL_FunctionBaseManager + +///RTC 版本 +@property (assign,nonatomic) uint8_t rtcVersion; +///是否支持闹铃设置 +@property (assign,nonatomic) JL_RTCAlarmType rtcAlarmType; +///设备当前时间 +@property (strong,nonatomic) JLModel_RTC *rtcModel; +///设备闹钟数组 +@property (strong,nonatomic) NSMutableArray *rtcAlarms; +///默认铃声 +@property (strong,nonatomic) NSMutableArray *rtcDfRings; + + +/// 查询设备闹钟 +/// - Parameter result: 设备回调 +-(void)cmdRtcGetAlarms:(JL_RTC_GET_ALARM_BK)result; + + +/// 设置/增加闹钟 +/// - Parameters: +/// - array: array 闹钟模型数组 +/// - result: 结果回调 +-(void)cmdRtcSetArray:(NSArray*)array Result:(JL_CMD_RESPOND __nullable)result; + + +/// 删除闹钟 +/// - Parameters: +/// - array: 闹钟序号数组 +/// - result: 设备回复 +-(void)cmdRtcDeleteIndexArray:(NSArray*)array Result:(JL_CMD_RESPOND __nullable)result; + + +/// 停止闹钟响声 +/// - Parameter result: 设备回复 +-(void)cmdRtcStopResult:(JL_CMD_RESPOND __nullable)result; + + +/// 闹钟试听响铃 +/// - Parameters: +/// - rtc: 闹钟模型 +/// - option: 启停标记 +/// - result: 设备回复 +-(void)cmdRtcAudition:(JLModel_RTC *)rtc Option:(BOOL)option result:(JL_CMD_RESPOND __nullable)result; + + +/// 闹铃设置 +/// @param operate 0x00:读取 0x01:设置 +/// @param index 掩码 (0x01设置第1个闹钟,0x03设置第一个和第二个闹钟) +/// @param setting 设置选项,读取时无需传入 +/// @param result 设备回复 +-(void)cmdRtcOperate:(JL_RtcOperate)operate + Index:(uint8_t)index + Setting:(JLModel_AlarmSetting* __nullable)setting + Result:(JL_RTC_ALARM_BK __nullable)result; + + +/// 解析闹钟数据内容 +/// @param infoData 数据内容 +/// @param ltvVersion LTV的版本 +-(void)parseData:(NSData *)infoData WithLtyType:(uint8_t)ltvVersion; + +/// 【闹钟信息】解析 +/// - Parameters: +/// - data: 需要解析的数据 +/// - rtcType: RTC类型 ++(NSMutableArray *)makeOutRtc:(NSData*)data RtcType:(uint8_t)rtcType; + + +/// [默认闹钟铃声]解析 +/// - Parameter data: [默认闹钟铃声]数据 ++(NSMutableArray *)makeOutRtcDefaultRing:(NSData *)data; + + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_Assist.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_Assist.h new file mode 100644 index 000000000..15453d0b9 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_Assist.h @@ -0,0 +1,82 @@ +// +// JL_Assist.h +// QCY_Demo +// +// Created by 杰理科技 on 2021/8/12. +// Copyright © 2021 杰理科技. All rights reserved. +// + +#import +#import + + +@protocol JL_AssistDelegate + +-(void)assistDidWriteData:(NSData *_Nonnull)data; + +@end + +NS_ASSUME_NONNULL_BEGIN +typedef void(^JL_Assist_BK)(BOOL isPaired); + +@class JL_ManagerM; + +@interface JL_Assist : NSObject +@property(strong,nonatomic)JL_ManagerM *mCmdManager; //命令中心 +@property(strong,nonatomic)NSString *mService; //服务号 +@property(strong,nonatomic)NSString *mRcsp_W; //特征:RCSP写 +@property(strong,nonatomic)NSString *mRcsp_R; //特征:RCSP读 +///握手(配对)秘钥 +@property(strong,nonatomic)NSData *__nullable mPairKey __attribute__((deprecated("Use mAuthKey instead"))); +@property(assign,nonatomic)BOOL mNeedPaired __attribute__((deprecated("Use mAuthEnable instead"))); //是否需要配对 +/// 设备认证密钥 +@property(strong,nonatomic)NSData *__nullable mAuthKey; +/// 是否需要设备认证 +@property(assign,nonatomic)BOOL mAuthEnable; +@property(assign,nonatomic)BOOL mLogData; //是否打印裸数据 +@property(assign,nonatomic)NSInteger mLimitMtu; //(默认40)在最大的MTU基础上减少数据量 +@property(assign,nonatomic)NSInteger mMaxMtu; //最大MTU(初始化不一定准确,可以再实际使用时再次获取一下)[peripheral maximumWriteValueLengthForType:CBCharacteristicWriteWithoutResponse]; +@property(strong,nonatomic)CBPeripheral *__nullable mRcspPeripheral; +@property(strong,nonatomic)CBCharacteristic *__nullable mRcspWrite; +@property(strong,nonatomic)CBCharacteristic *__nullable mRcspRead; +@property(strong,nonatomic)NSString *mBleName; //设备名字 + +///代理,如果实现了此代理则发出的数据都需要走回调发送,内部不处理 +/// @discussion JL_AssistDelegate +@property(assign,nonatomic)id __nullable mDelegate; + +/// Execute in a method 「- (void)centralManagerDidUpdateState:」 +/// @param state CBManagerState +-(void)assistUpdateState:(CBManagerState)state; + +/// Execute in a method 「- (void)centralManager:didDisconnectPeripheral:error:」 +/// @param peripheral CBPeripheral +-(void)assistDisconnectPeripheral:(CBPeripheral *)peripheral; + + +/// Execute in a method 「- (void)peripheral:didDiscoverServices:」 +/// @param service CBService +/// @param peripheral CBPeripheral +-(void)assistDiscoverCharacteristicsForService:(CBService*)service + Peripheral:(CBPeripheral*)peripheral; + +/// Execute in a method 「- (void)peripheral:didUpdateNotificationStateForCharacteristic:error:」 +/// @param characteristic CBCharacteristic +/// @param peripheral CBPeripheral +/// @param result JL_Assist_BK (YES:配对成功 NO:配对失败) +-(void)assistUpdateCharacteristic:(nonnull CBCharacteristic *)characteristic + Peripheral:(CBPeripheral*)peripheral + Result:(JL_Assist_BK)result; + +/// Execute in a method 「- (void)peripheral:didUpdateValueForCharacteristic:error:」 +/// @param characteristic CBCharacteristic +-(void)assistUpdateValueForCharacteristic:(CBCharacteristic *)characteristic; + + +/// Execute in a method 「- (void)peripheral:didWriteValueForCharacteristic:error:」 +/// Execute in a method 「- (void)peripheral:didIsReadyForWrite:error:」 +-(void)assistDidReady; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_BLEAction.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_BLEAction.h new file mode 100644 index 000000000..7a5a3f66b --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_BLEAction.h @@ -0,0 +1,66 @@ +// +// JL_BLEAction.h +// JL_BLEKit +// +// Created by zhihui liang on 2018/11/10. +// Copyright © 2018 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +/** + * BLE数据通知 + */ +extern NSString *kJL_RCSP_RECEIVE; //Rcsp数据【接收】 +extern NSString *kJL_RCSP_SEND; //Rcsp数据【发送】 + + +typedef void(^ATC_Block)(BOOL ret); +@protocol JL_BLEActionDelegate +@optional +-(void)onPairOutputData:(NSData*)data; + +@end + +@interface JL_BLEAction : NSObject +@property(nonatomic,weak)iddelegate; + ++(id)sharedMe; + +/** + 过滤其余蓝牙设备 + @param key 过滤码 + @param advertData 蓝牙广播字典 + @return NSDictionary 广播包含信息字典 + */ ++(NSDictionary*)bluetoothKey_1:(NSData*)key Filter:(NSDictionary*)advertData; + +/** + 蓝牙设备配对 + @param pKey 配对码 + @param bk 配对回调YES:成功 NO:失败 + */ +-(void)bluetoothPairingKey:(NSData *__nullable)pKey Result:(ATC_Block)bk; +-(void)inputPairData:(NSData*)rData; +-(void)cancelPair; + +#pragma mark - 蓝牙根据广播包回连 + +/** + * 获取广播包kCBAdvDataManufacturerData里面 'JLOTA' 标识的蓝牙地址 + * @param kCBAdvDataManufacturerData 广播包 + */ ++ (NSString * _Nullable)otaBleMacAddressFromCBAdvDataManufacturerData:(NSData *)kCBAdvDataManufacturerData; + +/** + * 判断当前蓝牙地址是否等于广播包kCBAdvDataManufacturerData里面的蓝牙地址 + * @param otaBleMacAddress ota升级中设备的蓝牙地址 + * @param kCBAdvDataManufacturerData 广播包 + */ ++ (Boolean)otaBleMacAddress:(NSString *)otaBleMacAddress isEqualToCBAdvDataManufacturerData:(NSData *)kCBAdvDataManufacturerData; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_BLEKit.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_BLEKit.h new file mode 100644 index 000000000..6cb524ff9 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_BLEKit.h @@ -0,0 +1,138 @@ +// +// JL_BLEKit.h +// JL_BLEKit +// +// Created by zhihui liang on 2018/11/9. +// Copyright © 2018 www.zh-jieli.com. All rights reserved. +// + +#import +#import +//! Project version number for JL_BLEKit. +FOUNDATION_EXPORT double JL_BLEKitVersionNumber; + +//! Project version string for JL_BLEKit. +FOUNDATION_EXPORT const unsigned char JL_BLEKitVersionString[]; + +#import +#import +#import +#import +#import +#import +#import +#import +#import + +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import + +#import +#import +#import +#import + +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import + + +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import + +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import + +#import +#import +#import + +#import +#import +#import +#import +#import +#import +#import + diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_BLEMultiple.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_BLEMultiple.h new file mode 100644 index 000000000..d935e6bfa --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_BLEMultiple.h @@ -0,0 +1,153 @@ +// +// JL_BLEMultiple.h +// JL_BLEKit +// +// Created by 杰理科技 on 2020/9/1. +// Copyright © 2020 www.zh-jieli.com. All rights reserved. +// + +#import +#import +#import +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + +/** + * BLE状态通知 + */ +extern NSString *kJL_BLE_M_FOUND; //发现设备 +extern NSString *kJL_BLE_M_FOUND_SINGLE; //发现单个设备 +extern NSString *kJL_BLE_M_ENTITY_CONNECTED; //连接有更新 +extern NSString *kJL_BLE_M_ENTITY_DISCONNECTED; //断开连接 +extern NSString *kJL_BLE_M_ON; //BLE开启 +extern NSString *kJL_BLE_M_OFF; //BLE关闭 +extern NSString *kJL_BLE_M_EDR_CHANGE; //经典蓝牙输出通道变化 +extern NSString *kJL_BLE_M_SAVE_BLEADDR; //存储EDR地址 +extern NSString *kJL_BLE_M_ANCS_UPDATE; //设备ANCS权限变更 + + +@interface JL_BLEMultiple : NSObject +@property (strong, nonatomic) NSData *__nullable filterKey; //过滤码 +@property (strong, nonatomic) NSData *__nullable pairKey __attribute__((deprecated("use authKey instead"))); //配对码 +@property (copy, nonatomic) NSData *__nullable authKey; //配对码 +@property (assign, nonatomic) BOOL BLE_IS_CONNECTING; //是否有设备正在连接 +@property (assign, nonatomic) BOOL BLE_FILTER_ENABLE; //是否【开启过滤】 +///是否【开启配对】 +@property (assign, nonatomic) BOOL BLE_PAIR_ENABLE __attribute__((deprecated("Use authEnable instead"))); +///是否【开启认证】 +@property (assign, nonatomic) BOOL authEnable; +@property (assign, nonatomic) int BLE_TIMEOUT; //连接超时时间 + +@property (strong, nonatomic) NSMutableArray *blePeripheralArr; //发现的设备 +@property (strong, nonatomic) NSArray *bleAttDevices; //ATT发现的设备 +@property (strong, nonatomic) NSMutableArray *bleConnectedArr; //已连接的设备 +@property (assign, nonatomic) CBManagerState bleManagerState; //蓝牙状态 +@property (strong, nonatomic) NSArray *__nullable bleDeviceTypeArr; //选择的设备类型<@(JL_DeviceType)> +@property (strong, nonatomic) NSArray *__nullable managerClassArr; //实例化的业务逻辑<@(JL_CLASS)> + + +@property (strong, nonatomic) NSString *JL_BLE_SERVICE; //服务号 +@property (strong, nonatomic) NSString *JL_BLE_RCSP_W; //命令【写】通道 +@property (strong, nonatomic) NSString *JL_BLE_RCSP_R; //命令【读】通道 + ++(NSString*)versionOfSDK; + +/** + 开始搜索 + */ +-(void)scanStart; + +/** + 继续搜索 + */ +-(void)scanContinue; + +/** + 停止搜索 + */ +-(void)scanStop; + + +/// 蓝牙中心管理器 +-(CBCentralManager *)getCenterManaer; + +/** + 通过UUID生成Entity。 + */ +-(JL_EntityM *_Nullable)makeEntityWithUUID:(NSString*)uuid; + +/// 通过UUID获得一个已连接过的entity +/// @param uuid uuid +/// @param status 获取后是否继续蓝牙搜索 +/// @param result 结果 +-(void)getEntityWithSearchUUID:(NSString *)uuid SearchStatus:(BOOL)status Result:(void(^)(JL_EntityM *_Nullable entity))result; +/** + 连接设备 + @param entity 蓝牙设备类 + */ +-(void)connectEntity:(JL_EntityM*)entity Result:(JL_EntityM_STATUS_BK)result; + + +/// 根据设备 ADV 广播报中的 Mac 连接设备 +/// ADV 的数据格式必须满足 JL 设备的标准 TWS 系列的数据结构 +/// @param advMac 广播报中的蓝牙地址 +/// 一般是指 EDR 地址,当然开发者也可以跟固件端协商,采取其他的地址,但是要求数据结构不变 +/// @param result 回调 +-(void)connectEntityWithAdvMac:(NSString *)advMac Result:(JL_EntityM_STATUS_BK) result; + +/// 根据设备Mac去回连 +/// @param mac Mac地址 +/// @param result 回调 +-(void)connectEntityForMac:(NSString *)mac Result:(JL_EntityM_STATUS_BK)result; + +/** + 断开连接 + */ +-(void)disconnectEntity:(JL_EntityM*)entity Result:(JL_EntityM_STATUS_BK)result; + +/** + 更新名字信息 +*/ +-(void)updateHistoryRename:(NSString*)name withUuid:(NSString*)uuid; + +/// 清除历史记录 +/// 删除后,可能会导致使用历史纪录回连时,信息为空 +/// 一般是在删除了绑定设备后使用 +-(void)cleanHistoryDeviceCache; + +/// 获取当前正在连接的entity +-(JL_EntityM *__nullable)connectingEntity; + +/** + 返回经典蓝牙信息 + @return @{@"ADDRESS":@"7c9a1da7330e", + @"TYPE" :@"BluetoothA2DPOutput", + @"NAME" :@"earphone"} + */ ++(NSDictionary*)outputEdrInfo; + +/** + 返回经典蓝牙edr列表 + @return 蓝牙edr列表 + */ ++(NSArray*)outputEdrList; + + +#pragma mark - ota升级 +/** + * ota升级功能 + * @param mBleEntityM 当前ota升级的蓝牙设备(JL_EntityM) + * @param otaFilePath ota升级文件路径 + * @param result ota升级过程回调 + */ +- (void)otaFuncWithEntityM:(JL_EntityM *)mBleEntityM + withFilePath:(NSString *)otaFilePath + Result:(JL_OTA_RT __nullable)result; +- (void)setOtaReconnectBleAddr:(NSString* __nullable)addr; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_BatchManger.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_BatchManger.h new file mode 100644 index 000000000..c28d75b66 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_BatchManger.h @@ -0,0 +1,47 @@ +// +// JL_BatchManger.h +// JL_BLEKit +// +// Created by 李放 on 2021/12/21. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +typedef NS_ENUM(UInt8, JL_BatchType) { + ///开始 + BatchType_Begin = 0x00, + ///结束 + BatchType_Finish = 0x80, + ///取消 + BatchType_Cancel = 0x81, +}; + +typedef NS_ENUM(NSUInteger, JL_BatchOptionType) { + /// 格式化操作 + BatchOption_Format = 0x00, + /// 未知操作 + BatchOption_unKnow = 0xFF, +}; + +@interface JL_BatchManger : JL_FunctionBaseManager + +#pragma mark ---> 批操作命令 +typedef void(^JL_BATCH_BK)(uint8_t flag); +/** + @param type 0x00:开始 0x80:结束 0x81:结束 + @param array @[@(JL_BatchOptionType)],0x00代表格式化操作。 + @param result 操作回调 0x00:成功 0x01:失败 + */ +-(void)cmdBatchType:(JL_BatchType)type + Operations:(NSArray*)array + Result:(JL_BATCH_BK __nullable)result; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_BigDataManager.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_BigDataManager.h new file mode 100644 index 000000000..c1b94cffa --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_BigDataManager.h @@ -0,0 +1,57 @@ +// +// JL_BigDataManager.h +// JL_BLEKit +// +// Created by 杰理科技 on 2022/12/7. +// Copyright © 2022 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + + +@class JL_BigData; + +typedef NS_ENUM(UInt8, JL_BigDataStatus) { + JL_BigDataStatusSendSuccess = 0, //成功 + JL_BigDataStatusSendFailCRC = 1, //CRC校验失败 + JL_BigDataStatusSendFailSEQ = 2, //SEQ不对 + JL_BigDataStatusSendFailFormat = 3, //数据类型不支持 + JL_BigDataStatusSendFailWay = 4, //传输方式不支持 + JL_BigDataStatusSendFailOutOfRange = 5, //数据长度超范围 + JL_BigDataStatusSendFailWrite = 6, //写入数据失败 + JL_BigDataStatusSendFailMissingParameter = 7, //缺少配置参数 + JL_BigDataStatusSendFailCmd = 8, //命令错误 + JL_BigDataStatusSendFailTimeout = 9, //超时 + JL_BigDataStatusGet = 10, //收到数据 + JL_BigDataStatusSendFailUnknown = 0xff, //未知错误 +}; +typedef void(^JL_BIGDATA_RT)(JL_BigData *bigData); + +@interface JL_BigDataManager : JL_FunctionBaseManager + +//设立大数据监听(接收阿里数据,必须放在单利类中!!!) +-(void)cmdBigDataMonitor:(JL_BIGDATA_RT)result; + +//发送大数据 +-(void)cmdInputBigData:(JL_BigData*)data; + +@end + +@interface JL_BigData : NSObject +@property(nonatomic,assign)JL_BigDataStatus mResult; +@property(nonatomic,assign)NSInteger mIndex; + +///0:原始数据 +///1:阿里云数据 +///2:RTC数据 +///3: AI云 +///4:TTS语音合成 +///5: 平台接口认证信息 +@property(nonatomic,assign)uint8_t mType; +@property(nonatomic,assign)uint8_t mVersion; +@property(nonatomic,strong)NSData *mData; +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_BinChargeManager.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_BinChargeManager.h new file mode 100644 index 000000000..2077c2e47 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_BinChargeManager.h @@ -0,0 +1,116 @@ +// +// JL_BinCharge.h +// JL_BLEKit +// +// Created by 杰理科技 on 2021/12/16. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +typedef NS_ENUM(UInt8, JL_ScanSetting) { + JL_ScanTimeout = 0x00, //超时结束 + JL_ScanInterrupt = 0x01, //打断结束 + JL_ScanFail = 0x02, //开启扫描失败 + JL_Scaning = 0x03, //正在扫描 +}; + +typedef NS_ENUM(UInt8, JL_ReverberationFunType) { + JL_ReverberationAndDynamicType = 0x00, //支持混响和动态限幅器 + JL_OnlyReverberationType = 0x01, //仅支持混响 + JL_OnlyDynamicLimiterType = 0x02, //仅支持动态限幅器 +}; + +typedef void(^JL_CMD_VALUE_BK)(uint32_t value); +typedef void(^JL_LOW_DELAY_BK)(uint16_t mtu, uint32_t delay); + +@interface JL_BinChargeManager : JL_FunctionBaseManager + +#pragma mark ---> 通知固件App的信息 +// @param flag 未知 +-(void)cmdSetAppInfo:(uint8_t)flag; + +#pragma mark ---> 设置通讯MTU +// @param mtu app请求mtu⼤⼩ +// @param result 实际设置的Mtu⼤⼩ +-(void)cmdSetMTU:(uint16_t)mtu Result:(JL_CMD_VALUE_BK __nullable)result; + +#pragma mark ---> 开启蓝⽛扫描 +// @param timeout 超时时间 +// @param result 0:成功 1:失败 +-(void)cmdBTScanStartTimeout:(uint16_t)timeout Result:(JL_CMD_VALUE_BK __nullable)result; + +#pragma mark ---> 推送蓝⽛扫描结果 +// 返回【蓝⽛数据结构】数组 +// @see JLBTModel +extern NSString *kJL_MANAGER_BT_LIST_RESULT; + +#pragma mark ---> 停⽌蓝⽛扫描(APP-->固件) +// @param reason 0:超时结束 1:打断结束 2:开启扫描失败 3:正在扫描 +// @param result 0:成功 1:失败 +-(void)cmdBTScanStopReason:(JL_ScanSetting)reason Result:(JL_CMD_VALUE_BK __nullable)result; + +#pragma mark ---> 停⽌蓝⽛扫描(固件-->APP) +// 0:超时结束 1:打断结束 2:开启扫描失败 3:正在扫描 +extern NSString *kJL_MANAGER_BT_SCAN_STOP_NOTE; + +#pragma mark ---> 通知固件连接指定的蓝⽛设备 +// @param addr 蓝⽛设备地址【设置0x00 00 00 00 00 00 则是断开外设的连接】 +// @param result 0:成功 1:失败 +-(void)cmdBTConnectAddress:(NSData*)addr Result:(JL_CMD_VALUE_BK __nullable)result; + +extern NSString *kJL_MANAGER_ID3_Title; +extern NSString *kJL_MANAGER_ID3_Artist; +extern NSString *kJL_MANAGER_ID3_Album; +extern NSString *kJL_MANAGER_ID3_Time; +extern NSString *kJL_MANAGER_ID3_Current; +extern NSString *kJL_MANAGER_ID3_PlayPush; + +#pragma mark ---> 主动设置ID3播放状态 +-(void)setID3_Status:(uint8_t)st; + +#pragma mark ---> ID3 播放/暂停 +-(void)cmdID3_PP; + +#pragma mark ---> ID3 上一曲 +-(void)cmdID3_Before; + +#pragma mark ---> ID3 下一曲 +-(void)cmdID3_Next; + +#pragma mark ---> ID3 开启/暂停 音乐信息推送 +-(void)cmdID3_PushEnable:(BOOL)enable; + +#pragma mark ---> 设置高低音 [-12,+12] + +/// 设置高低音 +/// - Parameters: +/// - p_low: 低音 (-12,12) +/// - p_high: 高音 (-12,12) +-(void)cmdSetLowPitch:(int)p_low HighPitch:(int)p_high; + +#pragma mark ---> 设置混响值[深度和强度][0,100]、限幅值[-60,0] +/// 设置混响值 +/// @param depthValue 深度 0-100 +/// @param intensityValue 强度 0-100 +/// @param dynamicLimiterValue 动态限幅值 -60 - 0 +/// @param reverOn 是否开启 +/// @param type 混响类型 +-(void)cmdSetReverberation:(int)depthValue + IntensityValue:(int)intensityValue + DynamicLimiterValue:(int)dynamicLimiterValue + SwtichReverState:(int)reverOn + FunType:(JL_ReverberationFunType)type; + +#pragma mark ---> 获取低延时参数 +-(void)cmdGetLowDelay:(JL_LOW_DELAY_BK __nullable)result; + + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_CallManager.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_CallManager.h new file mode 100644 index 000000000..2b704cdb6 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_CallManager.h @@ -0,0 +1,37 @@ +// +// JL_CallManager.h +// JL_BLEKit +// +// Created by 杰理科技 on 2021/12/16. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import +#import +#import +#import +NS_ASSUME_NONNULL_BEGIN + +@interface JL_CallManager : JL_FunctionBaseManager + +#pragma mark ---> 拨打电话 +/** + @param number 电话号码 + @param result 回复 + */ +-(void)cmdPhoneCall:(NSString*)number Result:(JL_CMD_RESPOND __nullable)result; + +#pragma mark ---> 设备通话状态 +extern NSString *kJL_MANAGER_CALL_STATUS; + +#pragma mark - 案子API +#pragma mark ---> 通知设备播放来电号码的方式 +/** + 通知设备播放来电号码的方式 + @param way 正常模式:0x00 播放文件模式:0x01 + */ +-(void)cmdPhoneNumberOnWay:(uint8_t)way; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_CustomManager.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_CustomManager.h new file mode 100644 index 000000000..f2224efc2 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_CustomManager.h @@ -0,0 +1,73 @@ +// +// JL_CustomManager.h +// JL_BLEKit +// Created by 李放 on 2021/12/21. +// Modify by EzioChan on 2023/03/16. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import +#import "JL_FunctionBaseManager.h" +#import "JL_TypeEnum.h" +#import "JL_Tools.h" + +NS_ASSUME_NONNULL_BEGIN + +///设备返回的自定义数据 +extern NSString *kJL_MANAGER_CUSTOM_DATA; +/// 设备返回的自定义数据(回复包) +extern NSString *kJL_MANAGER_CUSTOM_DATA_RSP; + + +@protocol JLCustomCmdPtl + +/// 设备回复自定义数据内容 +/// - Parameters: +/// - device: 设备句柄 +/// - data: 回复数据内容 +-(void)customCmdResponse:(JL_ManagerM *)manager Status:(uint8_t)status WithData:(NSData *)data; + +/// 设备主动请求 +/// - Parameters: +/// - device: 设备 +/// - data: 请求数据内容 +/// - isNeedResponse: 是否需要回复 +/// - sn: 序号 +-(void)customCmdRequire:(JL_ManagerM *)manager WithData:(NSData *)data isNeedResponse:(BOOL)isNeedResponse SN:(uint8_t)sn; + + +@end + +/// 用户自定义数据 +@interface JL_CustomManager : JL_FunctionBaseManager + +/// 数据回调委托 +@property(nonatomic,weak)id delegate; + +/// timeout max +/// default 3s +@property(nonatomic,assign)NSInteger maxTime; + +#pragma mark ---> 用户自定义数据 + +/// 用户自定义数据 +/// @param data 数据内容 +/// @param result 回复 +-(void)cmdCustomData:(NSData* __nullable)data + Result:(JL_CMD_RESPOND __nullable)result __attribute__((deprecated("use cmdCustomData:isNeedResponse:Result:"))); + +/// 用户自定义数据 +/// @param data 数据内容 +/// @param isNeedResponse 是否需要回复 +/// @param result 回复 +-(void)cmdCustomData:(NSData *)data isNeedResponse:(BOOL)isNeedResponse Result:(JL_CMD_RESPOND __nullable)result; + +/// 用户自定义数据回复 +/// @param sn 序号(设备发过来的序号) +/// @param data 数据 +-(void)cmdCustomResponse:(uint8_t)sn + Data:(NSData* __nullable)data; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_DeviceLogs.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_DeviceLogs.h new file mode 100644 index 000000000..01d1776f9 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_DeviceLogs.h @@ -0,0 +1,32 @@ +// +// JL_DeviceLogs.h +// JL_BLEKit +// +// Created by EzioChan on 2022/5/12. +// Copyright © 2022 www.zh-jieli.com. All rights reserved. +// + +#import "JL_FunctionBaseManager.h" + +NS_ASSUME_NONNULL_BEGIN + +typedef enum : UInt8 { + LogTypeDownloading = 0x00, + LogTypeFailed = 0x01, + LogTypeSucceed = 0x02, + LogTypeNoLog = 0x03 +} DeviceLogType; + +typedef void(^JLDeviceLogBK)(DeviceLogType type,float progress,NSString *_Nullable tempSavePath); + +@interface JL_DeviceLogs : JL_FunctionBaseManager + + +/// 检查获取设备log日志 +/// @param block 回调结果 +-(void)deviceLogDownload:(JLDeviceLogBK)block; + + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_EntityM.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_EntityM.h new file mode 100644 index 000000000..613aa5a73 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_EntityM.h @@ -0,0 +1,222 @@ +// +// JL_EntityM.h +// JL_BLEKit +// +// Created by 杰理科技 on 2020/9/1. +// Copyright © 2020 www.zh-jieli.com. All rights reserved. +// + +#import +#import +#import +#import +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN +//@class JL_EntityM; +typedef NS_ENUM(NSInteger, JL_EntityM_Status) { + JL_EntityM_StatusBleOFF = 0, //BLE蓝牙未开启 + JL_EntityM_StatusConnectFail = 1, //BLE连接失败 + JL_EntityM_StatusConnecting = 2, //BLE正在连接 + JL_EntityM_StatusConnectRepeat = 3, //BLE重复连接 + JL_EntityM_StatusConnectTimeout = 4, //BLE连接超时 + JL_EntityM_StatusConnectRefuse = 5, //BLE被拒绝 + JL_EntityM_StatusPairFail = 6, //配对失败 + JL_EntityM_StatusPairTimeout = 7, //配对超时 + JL_EntityM_StatusPaired = 8, //已配对 + JL_EntityM_StatusMasterChanging = 9, //正在主从切换 + JL_EntityM_StatusDisconnectOk = 10, //已断开成功 + JL_EntityM_StatusNull = 11, //Entity为空 +}; + +/// 连接类型 +typedef NS_ENUM(NSUInteger, JLEntityConnectType) { + JLEntityConnectTypeBLE = 0, + JLEntityConnectTypeSPP = 1, + JLEntityConnectTypeATT = 2, +}; + +typedef void(^JL_EntityM_STATUS_BK)(JL_EntityM_Status status); + +@interface JL_EntityM : NSObject + +///命令中心 +@property(nonatomic,strong) JL_ManagerM *mCmdManager; + +/// BLE外设备 +@property(nonatomic,readonly,copy) CBPeripheral *mPeripheral; +///服务号AE00 +@property(nonatomic,strong) NSString *mSERVICE; +///命令【写】通道AE01 +@property(nonatomic,strong) NSString *mRCSP_W; +///命令【读】通道AE02 +@property(nonatomic,strong) NSString *mRCSP_R; +///过滤码 +@property(nonatomic,strong) NSData *__nullable mFilterKey; +///配对码 +@property(nonatomic,strong) NSData *__nullable mPairKey __attribute__((deprecated("Use mAuthKey instead"))); +/// 设备认证码 +@property(nonatomic,copy) NSData *__nullable mAuthKey; +///广播数据 +@property(strong,nonatomic) NSData *mAdvData; + +///连接超时时间 +@property(nonatomic,assign) int mBLE_TIMEOUT; +///是否【开启过滤】 +@property(nonatomic,assign) BOOL mBLE_FILTER_ENABLE; +///是否【开启配对】 +@property(nonatomic,assign) BOOL mBLE_PAIR_ENABLE __attribute__((deprecated("Use mAuthEnable instead"))); +/// 是否开启设备认证 +@property(nonatomic,assign) BOOL mAuthEnable; +///是否完成配对 +@property(nonatomic,assign) BOOL mBLE_IS_PAIRED __attribute__((deprecated("Use mIsAuth instead"))); +/// 是否已认证 +@property(nonatomic,assign) BOOL mIsAuth; +///是否需要OTA +@property(nonatomic,assign) BOOL mBLE_NEED_OTA; +@property(nonatomic,assign) BOOL isFrom_HISTROY; +@property(nonatomic,assign) BOOL isBLE_CHANGE; +@property(nonatomic,assign) BOOL isCMD_PREPARED; + +@property(strong,nonatomic) NSString *mUUID; +@property(strong,nonatomic) NSNumber *mRSSI; +@property(readonly,copy,nonatomic)NSString *mItem; +/** + * mType值说明: + * -1:传统设备 + * 0:AI音箱 + * 1:TWS + * 2:数码充电仓 + * 3:普通耳机 + * 4:声卡类型 + * 5:手表类型 + */ +@property(assign,nonatomic) JL_DeviceType mType; +@property(assign,nonatomic) BOOL isExclusive; +@property(assign,nonatomic) BOOL isBound; +@property(assign,nonatomic) BOOL isEdrLinked; +@property(assign,nonatomic) BOOL isCharging; +@property(assign,nonatomic) BOOL isCharging_L; +@property(assign,nonatomic) BOOL isCharging_R; +@property(assign,nonatomic) BOOL isCharging_C; +@property(assign,nonatomic) uint8_t mPower; +@property(assign,nonatomic) uint8_t mPower_L; +@property(assign,nonatomic) uint8_t mPower_R; +@property(assign,nonatomic) uint8_t mPower_C; +@property(strong,nonatomic) NSString *mVID __attribute__((deprecated("Deprecated, use mUID instead"))); +@property(strong,nonatomic) NSString *mUID; +@property(strong,nonatomic) NSString *mPID; +@property(strong,nonatomic) NSString *mEdr; +@property(strong,nonatomic) NSString *mBleAddr; //OTA设备需要 +@property(assign,nonatomic) uint8_t mChipType; //0:690x 1:692x 2:693x +@property(assign,nonatomic) uint8_t mProtocolType; //默认0x00 +/** + 0x00 - dismiss 不显示弹窗 + 0x01 - unconnected 经典蓝牙未连接 + iOS : 不显示电量,请手动连接XXX + Android:不显示电量,显示连接按钮 + 0x02 - connected 经典蓝牙已连接 + iOS:判断已连接的经典蓝牙名是否一致,若未连接或蓝牙名不一致, + 显示“设备已被占用”。若一致,显示电量等信息。 + Android:判断已连接的经典蓝牙Mac是否一致,若未连接或蓝牙Mac不一致, + 显示“设备已被占用”。若一致,显示电量等信息。 + 0x03 - connecting 设备正在自动回连 + Android 和 iOS 显示“设备正在自动回连 ” + 0x04 - connectionless 设备不可连接(需要按下配对按键) + Android 和 iOS 显示配对操作方式 + */ +@property(assign,nonatomic) int8_t mScene; + +///Seq 每次开机会加 1,用于app区分是否同一次开机 +@property(assign,nonatomic) uint8_t mSeq; + +///TWS配对标识,0:未配对 1:已配对 +@property(assign,nonatomic) uint8_t mTWS_Paired; + +///0:关盖 1:开盖 +@property(assign,nonatomic) uint8_t mTWS_Cap; + +///0:充电模式 1:发射模式 +@property(assign,nonatomic) uint8_t mTWS_Mode; +///主从标识 (0:从机, 1:主机) +@property(assign,nonatomic) uint8_t mHeadsetMaster; + +///连接标识 (0:可以连接 1:不可连接) +@property(assign,nonatomic) uint8_t mHeadsetLinkEnable; +/** + * mWatchScene值说明: + * 0x00:经典蓝牙未连接 + * 0x01:经典蓝牙已连接 + * 0x02:设备正在回连 + * 0x03:设备不可连接 (需要手动进入配对模式) + */ +///连接标识 (0:可以连接 1:不可连接) +@property(assign,nonatomic) uint8_t mWatchScene; + +///连接方式 +///0:ble +///1:spp +///2:att +@property(assign,nonatomic) JLEntityConnectType mConnectWay; + +/// 是否支持充电仓 +@property(assign,nonatomic) BOOL mIsSupportChargeBin; + +/// 是否支持蓝牙Le Audio音频 +@property(assign,nonatomic) BOOL mIsSupportLeAudio; + +/// Le Audio 的连接状态 +@property(assign,nonatomic) BOOL mLeAudioConnected; + +/// RCSP 是否复用 LEAudio 的地址 +@property(assign,nonatomic) BOOL mLeAudioIsReUseRCSPAddr; + +/// 设备特殊类型 +@property(assign,nonatomic) JLDevSpecialType mSpecialType; + +-(void)setBlePeripheral:(CBPeripheral *)mPeripheral; +-(void)setBleItem:(NSString *)mItem; + +/** + 更新代理 +*/ +-(void)updateDelegate; + +/** + 释放定时器 +*/ +-(void)releaseEntityTimer; + +/** + 发送RCSP数据 + @param data 数据 + @return 是否已发送 + */ +-(BOOL)writeRcspData:(NSData*)data; + +/** +调整发数参数 +@param isGame 是否为游戏模式 +@param mtu 每包发数字节数 +@param delay 延时时间 (毫秒) +*/ +-(void)setGameMode:(BOOL)isGame MTU:(NSUInteger)mtu Delay:(int)delay; + + +-(void)flashFinishedAction; + + +#pragma mark - 连接超时管理 +-(void)startTimeout:(int)code; +-(void)stopTimeout; +-(void)cancelAuthPair; +#pragma mark - EntityM 模型转换 +-(void)updateEntity:(NSDictionary*)dic; ++(JL_EntityM*)changeToEntity:(NSDictionary*)dic; ++(NSArray*)turnToEntityArray:(NSArray*)array; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_FileManager.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_FileManager.h new file mode 100644 index 000000000..582b95659 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_FileManager.h @@ -0,0 +1,249 @@ +// +// JL_FileManager.h +// JL_BLEKit +// +// Created by 凌煊峰 on 2021/12/13. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN +//MARK: - 枚举 +typedef NS_ENUM(UInt8, JL_FileOperationEnvironmentType) { + JL_FileOperationEnvironmentTypeBigFileTransmission = 0x00, //大文件传输 + JL_FileOperationEnvironmentTypeDeleteFile = 0x01, //删除文件 + JL_FileOperationEnvironmentTypeFormatting = 0x02, //格式化 + JL_FileOperationEnvironmentTypeFatfsTransmission = 0x03, //FAT文件传输 +}; +typedef NS_ENUM(UInt8, JL_DeleteFileLastType) { + JL_DeleteFileLastTypeIsNotLast = 0x00, //不是最后一个文件 + JL_DeleteFileLastTypeIsLast = 0x01, //是最后一个文件 +}; +typedef NS_ENUM(UInt8, JL_BrowseReason) { + JL_BrowseReasonCommandEnd = 0, //读取完当前命令请求的文件 + JL_BrowseReasonFolderEnd = 1, //读取完当前目录的文件 + JL_BrowseReasonPlaySuccess = 2, //点播成功 + JL_BrowseReasonBusy = 3, //设备繁忙 + JL_BrowseReasonDataFail = 4, //目录数据发送失败 + JL_BrowseReasonReading = 0x0f, //正在读取中 + JL_BrowseReasonUnknown, //未知原因 +}; +typedef NS_ENUM(UInt8, JL_FileContentResult) { + JL_FileContentResultStart = 0x00, //开始传输 + JL_FileContentResultReading = 0x01, //正在读取 + JL_FileContentResultEnd = 0x02, //读取结束 + JL_FileContentResultCancel = 0x03, //取消读取 + JL_FileContentResultFail = 0x04, //读取失败 + JL_FileContentResultNull = 0x05, //文件不存在 + JL_FileContentResultDataError = 0x06, //数据错误 + JL_FileContentResultCrcFail = 0x07, //crc校验失败 +}; +typedef NS_ENUM(UInt8, JL_FileDataType) { + JL_FileDataTypeDo = 0, //开始传输文件数据 + JL_FileDataTypeDone = 1, //结束传输文件数据 + JL_FileDataTypeDoing = 2, //正在传输文件数据 + JL_FileDataTypeCancel = 3, //取消传输文件数据 + JL_FileDataTypeError = 4, //传输文件数据出错 + JL_FileDataTypeUnknown, +}; +typedef NS_ENUM(UInt8, JL_BigFileTransferCode) { + JL_BigFileTransferCodeSuccess = 0x00, //成功 + JL_BigFileTransferCodeFail = 0x01, //写失败 + JL_BigFileTransferCodeOutOfRange = 0x02, //数据超出范围 + JL_BigFileTransferCodeCrcFail = 0x03, //crc校验失败 + JL_BigFileTransferCodeOutOfMemory = 0x04, //内存不足 +}; +typedef NS_ENUM(UInt8, JL_BigFileResult) { + JL_BigFileTransferStart = 0x00, //开始大文件数据传输 + JL_BigFileTransferDownload = 0x01, //传输大文件有效数据 + JL_BigFileTransferEnd = 0x02, //结束大文件数据传输 + JL_BigFileTransferOutOfRange = 0x03, //大文件传输数据超范围 + JL_BigFileTransferFail = 0x04, //大文件传输失败 + JL_BigFileCrcError = 0x05, //大文件校验失败 + JL_BigFileOutOfMemory = 0x06, //空间不足 + JL_BigFileTransferCancel = 0x07, //取消传输 + JL_BigFileTransferNoResponse = 0xF1, //设备没有响应 +}; + +//MARK: - 回调 + +typedef void(^JL_FILE_BK)(NSArray* __nullable array,JL_BrowseReason reason); +typedef void(^JL_FILE_CONTENT_BK)(JL_FileContentResult result, uint32_t size, NSData* __nullable data, float progress); +typedef void(^JL_FILE_DATA_BK)(NSData* __nullable data, NSString* __nullable path, uint16_t size, JL_FileDataType type); +typedef void(^JL_BIGFILE_BK)(NSArray* __nullable array); +typedef void(^JL_BIGFILE_RT)(JL_BigFileResult result, float progress); + + +/// 文件浏览与下载、上载、删除等相关的操作类 +@interface JL_FileManager : JL_FunctionBaseManager + +/// 超时时间 +@property(nonatomic,assign)NSInteger maxTimeout; + +///大文件名是否使用其他编码 +///Default:false +///短文件名:GBK CFStringConvertEncodingToNSStringEncoding(kCFStringEncodingGB_18030_2000) +///长文件名:Unicode16L (NSUTF16LittleEndianStringEncoding) +///Other: true +///需要设置encodeType属性的值,默认为Unicode16L +@property(nonatomic,assign)BOOL isOtherEncode; + +/// 大文件名使用的编码 +/// default :NSUTF16LittleEndianStringEncoding +@property(nonatomic,assign)NSStringEncoding encodeType; + +/// 停止超时计算 +- (void)closeTimer; + + +//MARK: - 浏览目录 + +/// 发起文件目录浏览 +/// - Parameters: +/// - model: 文件Model +/// - number: 读取的数量 单次请求建议 < 20 条 +/// - result: 回调操作结果 +-(void)cmdBrowseModel:(JLModel_File*)model + Number:(uint8_t)number + Result:(JL_CMD_RESPOND __nullable)result; + +/// 监听目录数据回调 +/// - Parameter result: 回调内容 +-(void)cmdBrowseMonitorResult:(JL_FILE_BK __nullable)result; + + + +//MARK: - 删除文件 + +/// 删除文件(必须异步执行) +/// @param array 文件Model数组 +-(BOOL)cmdDeleteFileModels:(NSArray*)array; + +/// 删除单个JLModel_File文件 +/// @param model 文件对象 JLModel_File +/// @param last 是否最后一个文件 +/// @param result 删除成功回调 +-(void)cmdDeleteFile:(JLModel_File*)model + IsLast:(JL_DeleteFileLastType)last + Result:(JL_CMD_RESPOND __nullable)result; + +/// 通过名字删除文件 +/// 仅部分设备支持(设备要求支持文件系统支持唯一文件名) +/// - Parameters: +/// - name: 文件名 +/// - result: 回调结果 +-(void)cmdFileDeleteWithName:(NSString*)name Result:(JL_CMD_RESPOND __nullable)result; + + + +/// 设备格式化 +/// @param handle 设备句柄 +/// @param result 格式化回调 +-(void)cmdDeviceFormat:(NSString*)handle Result:(JL_CMD_RESPOND __nullable)result; + +/// 清除设备音乐缓存记录 +/// @param type 卡的类型 +-(void)cmdCleanCacheType:(JL_CardType)type; + + +//MARK: - 通讯文件句柄相关 + +/// 设置文件传输句柄 +/// 大文件传输,设置当前传输句柄 +/// - Parameter currentFileHandleType: 传输句柄 +- (void)setCurrentFileHandleType:(JL_FileHandleType)currentFileHandleType; + +/// 获取当前的传输文件句柄 +- (JL_FileHandleType)getCurrentFileHandleType; + +/// 文件传输的句柄数据 +- (NSData *)currentDeviceHandleData; + +/// 设置当前使用的存储设备 +/// @param devHandle 存储设备句柄 +/// 可参考JLModel_Device 中获取到的设备句柄内容 +/// @param result 命令回调结果 +-(void)cmdSetDeviceStorage:(NSData *)devHandle Result:(JL_CMD_RESPOND)result; + + +//MARK: - 文件传输 固件-->APP + +/// 监听文件数据 固件-->APP +/// - Parameter result: 数据内容监听回调 +-(void)cmdFileDataMonitorResult:(JL_FILE_DATA_BK __nullable)result __attribute__((deprecated("This method is deprecated. Use newMethod cmdFileReadContentWithName:(NSString*)name Result:(JL_FILE_CONTENT_BK __nullable)result"))); + +/// app 端回复设备的请求文件传输 固件-->APP +/// 允许传输文件数据 +-(void)cmdAllowFileData __attribute__((deprecated("This method is deprecated. Use newMethod cmdFileReadContentWithName:(NSString*)name Result:(JL_FILE_CONTENT_BK __nullable)result"))); + +/// app 端回复设备的请求文件传输 固件-->APP +/// 拒绝传输文件数据 +-(void)cmdRejectFileData __attribute__((deprecated("This method is deprecated. Use newMethod cmdFileReadContentWithName:(NSString*)name Result:(JL_FILE_CONTENT_BK __nullable)result"))); + +/// 传输文件数据 固件-->APP +/// 停止传输文件数据 +-(void)cmdStopFileData __attribute__((deprecated("This method is deprecated. Use newMethod cmdFileReadContentCancel"))); + +/// 读取外置卡的文件内容 固件-->APP +/// 此方法针对部分设备(要求设备文件系统支持唯一文件名) +/// - Parameters: +/// - name: 文件名 +/// - result: 回调结果 +-(void)cmdFileReadContentWithName:(NSString*)name Result:(JL_FILE_CONTENT_BK __nullable)result; + +/// 簇号方式读取外置卡的文件内容 固件-->APP +/// - Parameters: +/// - fileClus: 文件簇号 +/// - result: 回调 +- (void)cmdFileReadContentWithFileClus:(uint32_t)fileClus Result:(JL_FILE_CONTENT_BK __nullable)result; + +/// 取消读取外置卡的文件内容 +-(void)cmdFileReadContentCancel; + + +//MARK: - 文件传输 APP-->固件 + +/// 请求传输文件给设备 +/// - Parameters: +/// - size: 文件大小 +/// - path: 存放路径 +-(void)cmdFileDataSize:(uint8_t)size + SavePath:(NSString*)path __attribute__((deprecated("This method is deprecated. Use newMethod cmdBigFileData:(NSString *)path WithFileName:(NSString *)fileName Result:(JL_BIGFILE_RT __nullable)result"))); + + +/// 推送文件数据给设备 +/// - Parameter data:文件数据 +-(void)cmdPushFileData:(NSData*)data __attribute__((deprecated("This method is deprecated. Use newMethod cmdBigFileData:(NSString *)path WithFileName:(NSString *)fileName Result:(JL_BIGFILE_RT __nullable)result"))); + + +/// 大文件传输 App-->固件 +/// - Parameters: +/// - path: 本地大文件下载文件路径 +/// - fileName: 目标文件路径 +/// 如想指定文件夹路径,可以使用 Download/abc/def.txt +/// 否则可以直接添加 def.txt 由系统存放到默认的文件夹下 +/// - result: 回调结果 +-(void)cmdBigFileData:(NSString *)path WithFileName:(NSString *)fileName + Result:(JL_BIGFILE_RT __nullable)result; + +/// 取消文件传输 App-->固件 +-(void)cmdStopBigFileData; + +/// 通知固件进行环境准备 +/// - Parameters: +/// - environment: +/// 0:大文件传输 +/// 1:删除文件 +/// 2:格式化 +/// - result: 回调结果 +-(void)cmdPreEnvironment:(JL_FileOperationEnvironmentType)environment Result:(JL_CMD_RESPOND __nullable)result; + + + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_FindDeviceManager.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_FindDeviceManager.h new file mode 100644 index 000000000..f4ce71cb8 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_FindDeviceManager.h @@ -0,0 +1,130 @@ +// +// JL_FindDeviceManager.h +// JL_BLEKit +// +// Created by 杰理科技 on 2021/12/17. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN + + +/// 查找设备参数 +@interface JLFindDeviceOperation : NSObject + +/// 播放方式 way: +/// 0. 全部播放 +/// 1.左侧播放 +/// 2.右侧播放 +/// 3.全部暂停 +@property(nonatomic,assign)uint8_t playWay; + +/// 超时时间 +/// 0 表示不限制时间 +/// 默认时间 60 +@property(nonatomic,assign)uint16_t timeout; + +/// 铃声操作 +/// 0x00: 关闭铃声 +/// 0x01: 播放铃声 +@property(nonatomic,assign)uint8_t sound; + + +@end + + +/// 查找手机参数 +@interface JLFindPhoneModel : NSObject + +/// 铃声操作 +/// 0x00: 关闭铃声 +/// 0x01: 播放铃声 +@property(nonatomic,assign)uint8_t sound; + +/// 超时时间 +/// 0 表示不限制时间 +/// 默认时间 10 +@property(nonatomic,assign)uint16_t timeout; + +@end + + + +@protocol JL_FindDeviceDelegate + + +/// 设备查找手机回调 +/// - Parameter model:JLFindPhoneModel +-(void)findDeviceStartFindMyPhone:(JLFindPhoneModel *)model; + +/// 查询设备当前状态 +/// 当前回调需要先查询设备状态cmdFindDeviceCheckStatus +/// - Parameter model: JLFindDeviceOperation +-(void)findDeviceCheckStatus:(JLFindDeviceOperation *)model; + +@end + +/// 查找设备类 +/// 查找设备/设备查找手机 +@interface JL_FindDeviceManager : JL_FunctionBaseManager + +#pragma mark ---> 查找设备 +// 设备查找手机的通知 +// 携带了响铃时长🔔 +// dict = @{@"op":@(操作类型),@"timeout":@(超时时间)}; +extern NSString *kJL_MANAGER_FIND_PHONE; + +// 手机查找设备 +// 携带是否停止响铃 +// dict = @{@"op":@(操作类型),@"timeout":@(超时时间)}; +extern NSString *kJL_MANAGER_FIND_DEVICE; + +/// 查询固件设备查找状态回调 +/// JLFindDeviceOperation 作为回调对象 +extern NSString *kJL_MANAGER_FIND_DEVICE_STATUS; + + +typedef void(^JL_FIND_DEVICE_CHECK_RESPOND)(JL_CMDStatus status, JLFindDeviceOperation * _Nullable model); + +/// 代理 +@property(nonatomic,weak)id delegate; + +// 查找设备命令 +// @param isVoice 是否发声 +// @param timeout 超时时间 +// @param isIphone 是否设备查找手机(默认是手机找设备) +// @param opDict 这是一个可选项,若tws未连接,则该值无效,默认是全部播放 +// 字典键值对说明: +// 播放方式 way: 0 全部播放 +// 1 左侧播放 +// 2 右侧播放 +// 播放源 player: 0 APP端播放 +// 1 设备端播放 +// etc.全部播放&APP播放音效 +// opDict:{@"way":@"0",@"player":@"0"} +-(void)cmdFindDevice:(BOOL)isVoice + timeOut:(uint16_t)timeout + findIphone:(BOOL)isIphone + Operation:( NSDictionary * _Nullable )opDict __attribute__((deprecated ( "This method will be replaced with subcommands cmdFindDeviceWith and proxy etc."))); + + + +/// 查找设备命令 +/// - Parameter operation: 查找设备对象 +-(void)cmdFindDeviceWith:(JLFindDeviceOperation *)operation; + + + +/// 查询一次固件查找设备的状态 +/// - Parameter result: 状态回调 +-(void)cmdFindDeviceCheckStatus:(JL_FIND_DEVICE_CHECK_RESPOND _Nullable)result; + + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_FlashOperateManager.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_FlashOperateManager.h new file mode 100644 index 000000000..925f528c2 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_FlashOperateManager.h @@ -0,0 +1,189 @@ +// +// JL_FlashOperateManager.h +// JL_BLEKit +// +// Created by 杰理科技 on 2021/12/13. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark - 外挂FLASH操作命令 +typedef NS_ENUM(UInt8, JL_FlashOperationOPType) { + JL_FlashOperationOPTypeWriteData = 0x00, //写数据 + JL_FlashOperationOPTypeReadData = 0x01, //读数据 + JL_FlashOperationOPTypeInsertFile = 0x02, //插入文件 + JL_FlashOperationOPTypeDialOperation = 0x03, //表盘操作 + JL_FlashOperationOPTypeEraseData = 0x04, //擦除数据 + JL_FlashOperationOPTypeDeleteFile = 0x05, //删除文件 + JL_FlashOperationOPTypeWriteFileProtection = 0x06, //写文件保护 + JL_FlashOperationOPTypeUpdateDialResource = 0x07, //更新表盘资源 + JL_FlashOperationOPTypeCheckWriteDataSuccess = 0x08, //查询写数据是否成功 + JL_FlashOperationOPTypeUpdateResourceFlag = 0x09, //升级资源标志操作 + JL_FlashOperationOPTypeRestoreSystem = 0x0A, //还原系统 + JL_FlashOperationOPTypeGetFileInfo = 0x0B, //获取文件信息 + JL_FlashOperationOPTypeGetRemainingSpace = 0x0C, //获取剩余空间 + JL_FlashOperationOpTypeGetSourceStorageInfo = 0x0D, //获取源存储信息 +}; + +typedef NS_ENUM(UInt8, JL_DialSetting) { + JL_DialSettingReadCurrentDial = 0x00, //读取当前表盘 + JL_DialSettingSetDial = 0x01, //设置表盘 + JL_DialSettingVersion = 0x03, //获取表盘额外信息,如版本 + JL_DialSettingActivateCustomDial = 0x04, //激活自定义表盘 + JL_DialSettingGetDialName = 0x05, //获取对应的自定义表盘名字 +}; +typedef NS_ENUM(UInt8, JL_FlashOperateFlag) { + JL_FlashOperateFlagFinish = 0x00, //结束 + JL_FlashOperateFlagStart = 0x01, //开始 +}; + +@interface JL_FlashOperateManager : JL_FunctionBaseManager + +typedef void(^JL_FlashInfo_BK)(JLModel_Flash* __nullable model); +typedef void(^JL_FlashWrite_BK)(uint8_t flag); +typedef void(^JL_FlashWriteStatus_BK)(uint8_t flag,uint16_t leftSize); +typedef void(^JL_FlashWriteSize_BK)(uint8_t flag,uint32_t size); +typedef void(^JL_FlashRead_BK)(uint8_t flag,NSData *__nullable data); +typedef void(^JL_FlashAddOrDel_BK)(uint8_t flag); +typedef void(^JL_FlashWatch_BK)(uint8_t flag, uint32_t size, + NSString *__nullable path, + NSString *__nullable describe); +typedef void(^JL_FlashClean_BK)(uint8_t flag); +typedef void(^JL_FlashProtect_BK)(uint8_t flag); +typedef void(^JL_FlashUpdate_BK)(uint8_t flag); +typedef void(^JL_FlashFileInfo_BK)(uint32_t size,uint16_t crc16); +typedef void(^JL_FlashLeftSize_BK)(uint32_t leftSize); + +/// Flash Info +@property(nonatomic,strong)JLModel_Flash *flashInfo; + +#pragma mark ---> 获取外置Flash信息 +/** + 获取外置Flash信息 + @param result 回复 + */ +-(void)cmdGetFlashInfoResult:(JL_FlashInfo_BK __nullable)result; + +#pragma mark ---> 写数据到Flash +/** + 写数据到Flash + @param data 数据 + @param offset 偏移 + @param mtu 每包大小 + @param result 回复 + */ +-(void)cmdWriteToFlashAllData:(NSData*)data + Offset:(uint32_t)offset + Mtu:(uint16_t)mtu + Result:(JL_FlashWriteSize_BK __nullable)result; + +#pragma mark ---> 读数据从Flash +/** + 读数据从Flash + @param offset 偏移 + @param size 大小 + @param mtu 每包大小 + @param result 回复 + */ +-(void)cmdReadFromFlashAllDataOffset:(uint32_t)offset + Size:(uint16_t)size + Mtu:(uint16_t)mtu + Result:(JL_FlashRead_BK __nullable)result; + +#pragma mark ---> [开始/结束]增加表盘(文件) +/** + 开始/结束 插入文件 + @param path 路径 + @param size 大小 + @param flag 开始:0x01 结束:0x00 + @param result 回复 + */ +-(void)cmdInsertFlashPath:(NSString* __nullable)path + Size:(uint32_t)size + Flag:(JL_FlashOperateFlag)flag + Result:(JL_FlashAddOrDel_BK __nullable)result; + +#pragma mark ---> 设置表盘(文件) + +/** + 表盘操作 + @param path 路径 + @param flag 0x00:读取当前表盘 + 0x01:设置表盘 + 0x03:获取表盘额外信息,如版本 + 0x04:激活自定义表盘 + 0x05:获取对应的自定义表盘名字 + @param result 回复 + */ +-(void)cmdWatchFlashPath:(NSString*__nullable)path + Flag:(JL_DialSetting)flag + Result:(JL_FlashWatch_BK __nullable)result; + +#pragma mark ---> 设备更新表盘(文件) 【kJL_MANAGER_WATCH_FACE】?// 返回 字符串 +extern NSString *kJL_MANAGER_WATCH_FACE; + +#pragma mark ---> [开始/结束]删除表盘(文件) +/** + 开始/结束 删除文件 + @param path 路径 + @param flag 开始:0x01 结束:0x00 + @param result 回复 + */ +-(void)cmdDeleteFlashPath:(NSString* __nullable)path + Flag:(JL_FlashOperateFlag)flag + Result:(JL_FlashAddOrDel_BK __nullable)result; + +#pragma mark ---> 外挂Flash【写保护】操作 +/** + 开始/结束 + @param flag 开始:0x01 结束:0x00 + */ +-(void)cmdWriteProtectFlashFlag:(JL_FlashOperateFlag)flag Result:(JL_FlashProtect_BK __nullable)result; + +#pragma mark ---> 外挂Flash【资源更新】操作 +/** + 开始/结束 更新UI + @param flag 开始:0x01 结束:0x00 + */ +-(void)cmdUpdateResourceFlashFlag:(JL_FlashOperateFlag)flag Result:(JL_FlashUpdate_BK __nullable)result __attribute__((deprecated ( "The current interface is about to be canceled in version 2.0.0, please use cmdUpdateResourceFlashFlagAsync:Result: instead"))); +-(void)cmdUpdateResourceFlashFlag:(JL_FlashOperateFlag)flag; +/// 外挂Flash(资源更新)操作 +/// 异步回调 +/// - Parameters: +/// - flag: flag +/// - result: 操作结果 +-(void)cmdUpdateResourceFlashFlagAsync:(JL_FlashOperateFlag)flag Result:(JL_FlashUpdate_BK __nullable)result; + +#pragma mark ---> 断开连接,对FATFS处理。 +-(void)cmdFlashActionDisconnect; + +#pragma mark ---> 外挂Flash 手表资源更新标志位 +-(void)cmdWatchUpdateResource __attribute__((deprecated ( "The current interface is about to be canceled in version 2.0.0, please use cmdWatchUpdateResourceWith:(JL_CMD_RESPOND __nullable)result instead"))); + +/// 打开设备升级资源标记操作 +/// - Parameter result: 设备回复结果 +/// 当设备回复的cmd代号为非 0 时,属于异常结束,不可继续升级 +-(void)cmdWatchUpdateResourceWith:(JL_CMD_RESPOND __nullable)result; + +#pragma mark ---> 外挂Flash 还原系统 +-(void)cmdFlashRecovery; + +#pragma mark ---> 外挂Flash 获取文件信息 +-(void)cmdFlashInformationOfFile:(NSString*)file Result:(JL_FlashFileInfo_BK)result; + +#pragma mark ---> 外挂Flash 剩余空间 +-(void)cmdFlashLeftSizeResult:(JL_FlashLeftSize_BK)result; + +/// 获取资源存储空间 +/// 例如:res_space= 8192 (Kb), 即realSize = res_space* 1024= 8192 * 1024 = 8Mb +/// - Parameter result: 回复 +-(void)cmdFlashGetSourceStorageInfo:(JL_FlashLeftSize_BK)result; +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_FmManager.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_FmManager.h new file mode 100644 index 000000000..d912b6af7 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_FmManager.h @@ -0,0 +1,70 @@ +// +// JL_FmManager.h +// JL_BLEKit +// +// Created by 李放 on 2021/12/20. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import +#import +#import +#import + + +typedef NS_ENUM(UInt8, JL_FCmdFM) { + JL_FCmdFMPP = 0x01, //FM 暂停/播放 + JL_FCmdFMPonitBefore = 0x02, //上一个频点 + JL_FCmdFMPonitNext = 0x03, //下一个频点 + JL_FCmdFMChannelBefore = 0x04, //上一个频道 + JL_FCmdFMChannelNext = 0x05, //下一个频道 + JL_FCmdFMSearch = 0x06, //扫描 + JL_FCmdFMChannelSelect = 0x07, //选择频道 + JL_FCmdFMChannelDelete = 0x08, //删除频道 + JL_FCmdFMFrequencySelect = 0x09, //选择频点 + JL_FCmdFMFrequencyDelete = 0x0a, //删除频点 +}; + +typedef NS_ENUM(UInt8, JL_FMSearch) { + JL_FMSearchALL = 0x00, //FM 暂停/播放 + JL_FMSearchForward = 0x01, //向前搜索 + JL_FMSearchBackward = 0x02, //向后搜索 + JL_FMSearchStop = 0x03, //停止搜索 +}; + +NS_ASSUME_NONNULL_BEGIN + +@interface JL_FmManager : JL_FunctionBaseManager + +///Fm状态 +@property (assign,nonatomic) JL_FMStatus fmStatus; + +///Fm 频段范围 +///76.5-108.0Mhz +///87.5-108.0Mhz +@property (assign,nonatomic) JL_FMMode fmMode; + +///当前fm +@property (strong,nonatomic) JLModel_FM *currentFm; + +///Fm列表 +@property (strong,nonatomic) NSArray *fmArray; + +#pragma mark ---> FM相关操作 +/** + @param cmd FM功能 + @param search FM搜索 + @param channel FM频道 + @param frequency FM频点 + @param result 返回结果 + */ +-(void)cmdFm:(JL_FCmdFM)cmd + Saerch:(JL_FMSearch)search + Channel:(uint8_t)channel + Frequency:(uint16_t)frequency + Result:(JL_CMD_RESPOND __nullable)result; + +@end + +NS_ASSUME_NONNULL_END + diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_FunctionBaseManager.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_FunctionBaseManager.h new file mode 100644 index 000000000..7a3a0b5f8 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_FunctionBaseManager.h @@ -0,0 +1,28 @@ +// +// JL_FunctionBaseManager.h +// JL_BLEKit +// +// Created by 凌煊峰 on 2021/12/13. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +@class JL_ManagerM; +@interface JL_FunctionBaseManager : NSObject + +@property (assign, nonatomic) uint8_t mCmdSN; +@property (strong, nonatomic) NSString *mBLE_UUID; +@property (strong, nonatomic) NSString *mBLE_NAME; +@property (weak , nonatomic) JLModel_Device *deviceModel; +@property (weak , nonatomic) JL_ManagerM *centerManagerM; + +- (void)inputPKG:(JL_PKG *)pkg; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_Handle.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_Handle.h new file mode 100644 index 000000000..add95b44e --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_Handle.h @@ -0,0 +1,46 @@ +// +// JL_Handle.h +// JL_BLEKit +// +// Created by zhihui liang on 2018/11/10. +// Copyright © 2018 www.zh-jieli.com. All rights reserved. +// + +#import +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +/** + * 收到设备返回的XM_PKG的回调。 + */ +extern NSString *kJL_CMD_RECEIVE; //XM_RCSP【接收】 + +@protocol JL_HandleDelegate +@optional +-(void)onHandleOutputPKG:(JL_PKG*)pkg; +@end + +@interface JL_Handle : NSObject +@property(nonatomic,weak)iddelegate; + +/** +输入BLE数据 +@param data 设备过来的数据 +*/ +-(void)inputHandleData:(NSData*)data; + +/**[实例] +向设备发送JL_PKG数据包。 +@param pkg JL_PKG数据模型 +@param name 设备名字 +*/ +-(NSData*)sendPackage:(JL_PKG*)pkg WithName:(NSString*)name; + ++(void)logPackage:(JL_PKG*)pkg WithName:(NSString *__nullable)name IsSend:(BOOL)isSend; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_LRCManager.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_LRCManager.h new file mode 100644 index 000000000..1a4942643 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_LRCManager.h @@ -0,0 +1,35 @@ +// +// JL_LRCManager.h +// JL_BLEKit +// +// Created by 杰理科技 on 2021/12/17. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +typedef NS_ENUM(UInt8, JL_LRCType) { + JL_LRCTypeDone = 1, //LRC已传输完 + JL_LRCTypeBusy = 2, //设备忙碌 + JL_LRCTypeDoneFail = 0x0e, //传输失败 +}; +typedef void(^JL_LRC_BK)(NSString* __nullable lrc, JL_LRCType type); +typedef void(^JL_LRC_BK_1)(NSData* __nullable lrc, JL_LRCType type); + +@interface JL_LRCManager : JL_FunctionBaseManager + +#pragma mark ---> 获取LRC歌词 +/** + @param result 返回LRC数据 + */ +-(void)cmdLrcMonitorResult:(JL_LRC_BK __nullable)result; +-(void)cmdLrcMonitorResult_1:(JL_LRC_BK_1 __nullable)result; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_LightManager.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_LightManager.h new file mode 100644 index 000000000..22b7c87ae --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_LightManager.h @@ -0,0 +1,99 @@ +// +// JL_LightManager.h +// JL_BLEKit +// +// Created by 李放 on 2021/12/16. +// Modify by EzioChan on 2023/03/16 +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import +#import +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +@class JL_LightManager; + +@protocol JLLightStatusPtl + +-(void)jlLightStatus:(JL_LightManager *)lightManager; + +@end + + +@interface JL_LightManager : JL_FunctionBaseManager + +/// 当前设备是否支持灯光设置 +@property(nonatomic,assign)BOOL isSupportLight; + +/// 0:关闭 1:打开 2:设置模式(彩色/闪烁/情景) +@property (assign,nonatomic) JL_LightState lightState; + +// 0:彩色 1:闪烁 2: 情景 +@property (assign,nonatomic) JL_LightMode lightMode; + +/// 灯光红色 +@property (assign,nonatomic) uint8_t lightRed; + +/// 灯光绿色 +@property (assign,nonatomic) uint8_t lightGreen; + +/// 灯光蓝色 +@property (assign,nonatomic) uint8_t lightBlue; + +/// 闪烁模式Index +@property (assign,nonatomic) JL_LightFlashModeIndex lightFlashIndex; + +/// 闪烁频率Index +@property (assign,nonatomic) JL_LightFlashModeFrequency lightFrequencyIndex; + +/// 情景模式Index +@property (assign,nonatomic) JL_LightSceneMode lightSceneIndex; + +// 色调,范围0-360 +@property (assign,nonatomic) uint16_t lightHue; + +// 饱和度,0-100 +@property (assign,nonatomic) uint8_t lightSat; + +// 亮度,0-100 +@property (assign,nonatomic) uint8_t lightLightness; + +/// 状态更新代理委托 +@property (weak,nonatomic)id delegate; + + +/// 获取灯光设置,通过代理返回 +-(void)cmdGetLightStatus; +/** + * 设置灯光 + * @param lightState 灯光状态 + * @param lightMode 灯光模式 + * @param red 红色色值 + * @param green 绿色色值 + * @param blue 蓝色色值 + * @param flashIndex 闪烁模式index + * @param flashFreqIndex 闪烁频率 + * @param sceneIndex 情景模式 + * @param hue 色调,范围0-360 + * @param saturation 饱和度,0-100 + * @param lightness 亮度,0-100 + */ +-(void)cmdSetState:(JL_LightState)lightState + Mode:(JL_LightMode)lightMode + Red:(uint8_t)red + Green:(uint8_t)green + Blue:(uint8_t)blue + FlashInex:(JL_LightFlashModeIndex)flashIndex + FlashFreq:(JL_LightFlashModeFrequency)flashFreqIndex + SceneIndex:(JL_LightSceneMode)sceneIndex + Hue:(uint16_t)hue + Saturation:(uint8_t)saturation + Lightness:(uint8_t)lightness; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_MSG_Func.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_MSG_Func.h new file mode 100644 index 000000000..91d914f48 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_MSG_Func.h @@ -0,0 +1,22 @@ +// +// JL_MSG_Func.h +// JL_BLEKit +// +// Created by EzioChan on 2021/5/13. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN +typedef enum : uint8_t { + Func_Location, + Func_Weather, + Func_Notify, +} FuncMsgType; + +@interface JL_MSG_Func : NSObject + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_MSG_Weather.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_MSG_Weather.h new file mode 100644 index 000000000..6ff75d805 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_MSG_Weather.h @@ -0,0 +1,143 @@ +// +// JL_MSG_Weather.h +// JL_BLEKit +// +// Created by EzioChan on 2021/5/13. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + + +typedef NS_ENUM(UInt8, JLWeatherType) { + ///晴 + JLWeatherTypeSunny = 0x00, + ///少云 + JLWeatherTypeCloudLess, + ///晴间多云 + JLWeatherTypePartlyCloudy, + ///多云 + JLWeatherTypeCloudiness, + ///阴 + JLWeatherTypeOvercastSky, + ///有风/和风/清风/微风 + JLWeatherTypeBreeze, + ///平静 + JLWeatherTypeCalmWind, + ///大风/强风/劲风/疾风 + JLWeatherTypeHighWind, + ///飓风/狂爆风 + JLWeatherTypeHurricane, + ///热带风暴/风暴 + JLWeatherTypeTropicalStorm, + ///霾/中度霾/重度霾/严重霾 + JLWeatherTypeHaze, + ///阵雨 + JLWeatherTypeShower, + ///雷阵雨 + JLWeatherTypeThunderShower, + ///雷阵雨并伴有冰雹 + JLWeatherTypeHallThunderShower, + ///雨/小雨/毛毛雨/细雨/小雨-中雨 + JLWeatherTypeLightRain, + ///中雨/中雨-大雨 + JLWeatherTypeModerateRain, + ///大雨/大雨-暴雨 + JLWeatherTypeHeavyRain, + ///暴雨/暴雨-大暴雨 + JLWeatherTypeDownpour, + ///大暴雨/大暴雨-特大暴雨 + JLWeatherTypeExtraordinaryRainstorm, + ///特大暴雨 + JLWeatherTypeHeavyDownpour, + ///强阵雨 + JLWeatherTypeStrongRainShower, + ///强雷阵雨 + JLWeatherTypeStrongThunderShower, + ///极端降雨 + JLWeatherTypeExtremeRainfall, + ///雨夹雪/阵雨夹雪/冻雨/雨雪天气 + JLWeatherTypeRainySnowy, + ///雪 + JLWeatherTypeSnowy, + ///阵雪 + JLWeatherTypeSnowShower, + ///小雪/小雪-中雪 + JLWeatherTypeLightSnow, + ///中雪/中雪-大雪 + JLWeatherTypeModerateSnow, + ///大雪/大雪-暴雪 + JLWeatherTypeHeavySnow, + ///暴雪 + JLWeatherTypeSnowstorm, + ///浮尘 + JLWeatherTypeDust, + ///扬沙 + JLWeatherTypeblowingSand, + ///沙尘暴 + JLWeatherTypedustStorm, + ///强沙尘暴 + JLWeatherTypeSevereSandstorm, + ///龙卷风 + JLWeatherTypeTornado, + ///雾/轻雾/浓雾/强浓雾/特强浓雾 + JLWeatherTypeFog, + ///未知 + JLWeatherTypeUnknow, + ///冷 + JLWeatherTypeCold, + ///未知2 + JLWeatherTypeUnknown1, + +}; + +typedef NS_ENUM(UInt8, JLWindDirectionType) { + ///无风向 + JLWindDirectionTypeNone = 0x00, + ///东 + JLWindDirectionTypeEast, + ///南 + JLWindDirectionTypeSouth, + ///西 + JLWindDirectionTypeWest, + ///北 + JLWindDirectionTypeNorth, + ///东南 + JLWindDirectionTypeEastSouth, + ///东北 + JLWindDirectionTypeEastNorth, + ///西北 + JLWindDirectionTypeWestNorth, + ///西南 + JLWindDirectionTypeWestSouth, + ///旋转不定 + JLWindDirectionTypeUnknow +}; + +@interface JL_MSG_Weather : NSObject + +/// 省份 +@property(nonatomic,strong)NSString *province; +///城市 +@property(nonatomic,strong)NSString *city; +///天气编码 +@property(nonatomic,assign)JLWeatherType code; +///温度 +@property(nonatomic,assign)NSInteger temperature; +///湿度 +@property(nonatomic,assign)NSInteger humidity; +///风向编码 +@property(nonatomic,assign)JLWindDirectionType direction; +///风力 +@property(nonatomic,assign)NSInteger wind; +/// 时间 +@property(nonatomic,strong)NSDate *date; + + +-(NSData *)beData; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_ManagerM.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_ManagerM.h new file mode 100644 index 000000000..e95426053 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_ManagerM.h @@ -0,0 +1,232 @@ +// +// JL_ManagerM.h +// JL_BLEKit +// +// Created by 杰理科技 on 2020/9/4. +// Modify By EzioChan on 2023/03/27. +// Copyright © 2020 www.zh-jieli.com. All rights reserved. +// + +#import +#import +#import + +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import + +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +/* + * 从JL_ManagerM发出去的通知都是字典,如下所示: + * + * @{ kJL_MANAGER_KEY_UUID :当前设备的UUID, + * kJL_MANAGER_KEY_OBJECT:外抛的对象 } + */ +extern NSString *kJL_MANAGER_KEY_UUID; //KEY --> UUID +extern NSString *kJL_MANAGER_KEY_OBJECT; //KEY --> 对象 + + +@protocol JL_ManagerMDelegate +@optional +-(void)onManagerSendPackage:(JL_PKG*)pkg; +@end + +@class JL_EntityM; +@interface JL_ManagerM : NSObject +@property(nonatomic,weak)iddelegate; +@property(nonatomic,readonly,copy)NSString *mBLE_UUID; +@property(nonatomic,readonly,copy)NSString *mBLE_NAME; +@property(nonatomic,readonly,assign)uint8_t mCmdSN; +@property(nonatomic,weak)JL_EntityM *mEntity; + +@property(nonatomic,strong)JL_SmallFileManager *mSmallFileManager; +@property(nonatomic,strong)JL_FileManager *mFileManager; +@property(nonatomic,strong)JL_OTAManager *mOTAManager; +@property(nonatomic,strong)JL_FlashOperateManager *mFlashManager; +@property(nonatomic,strong)JL_BinChargeManager *mChargingBinManager; +@property(nonatomic,strong)JL_CallManager *mCallManager; +@property(nonatomic,strong)JL_AlarmClockManager *mAlarmClockManager; +@property(nonatomic,strong)JL_LightManager *mLightManager; +@property(nonatomic,strong)JL_TwsManager *mTwsManager; +@property(nonatomic,strong)JL_SpeexManager *mSpeexManager __attribute__((deprecated("alloc with JL_SpeexManager shareSpeexManager"))); +@property(nonatomic,strong)JL_LRCManager *mLrcManager; +@property(nonatomic,strong)JL_FindDeviceManager *mFindDeviceManager; +@property(nonatomic,strong)JL_MusicControlManager *mMusicControlManager; +@property(nonatomic,strong)JL_FmManager *mFmManager; +@property(nonatomic,strong)JL_SystemEQ *mSystemEQ; +@property(nonatomic,strong)JL_SystemTime *mSystemTime; +@property(nonatomic,strong)JL_SystemVolume *mSystemVolume; +@property(nonatomic,strong)JL_CustomManager *mCustomManager; +@property(nonatomic,strong)JL_BatchManger *mBatchManger; + +@property(nonatomic,strong)JL_SoundCardManager *mSoundCardManager; +@property(nonatomic,strong)JL_DeviceLogs *mDeviceLogs; + +@property(nonatomic,strong)JL_BigDataManager *mBigDataManager; + + +-(void)setPropertyUpdate:(BOOL)isUpdate; +-(void)setBleUuid:(NSString*)uuid; +-(void)setBleName:(NSString*)name; +-(void)inputPKG:(JL_PKG*)pkg; + +-(void)noteEntityConnected; +-(void)noteEntityDisconnected; +-(void)noteEntityBleOff; + +/** + 发送【命令包】 + @param cmdCode 具体要发送的命令 + @param needResponse 是否需要回复 + @param sendData 具体要发送的数据 + @discussion 只有isCommand是YES时needResponse才有意义,即只有命令才需要回复 + */ +-(void)xmCommandCode:(uint8_t)cmdCode + needRep:(BOOL)needResponse + data:(NSData *)sendData; + +/** + 发送【回复包】 + @param code 命令号 + @param sn 序号 + @param st 状态码 + @param data 回复的命令的内容 + */ +-(void)cmdResponseCode:(uint8_t)code + OpSN:(UInt8)sn + Status:(JL_CMDStatus)st + Data:(NSData* __nullable)data; + +/** + 发送【通知命令】 + @param name 通知名字 + @param obj 携带对象 + */ +-(void)managerPost:(NSString*)name Object:(id __nullable)obj; + +/** + 获取当前命令序号 + */ +-(uint8_t)xmCommandSN; + +#pragma mark ---> 取出设备信息 + +/// copy出来的原值 +-(JLModel_Device *)outputDeviceModel; + +/// 取出原本的值 +-(JLModel_Device *)getDeviceModel; + +#pragma mark ---> 获取设备信息 +extern NSString *kJL_MANAGER_TARGET_INFO; +-(void)cmdTargetFeatureResult:(JL_CMD_RESPOND __nullable)result; +-(void)cmdTargetFeature:(uint32_t)feature Result:(JL_CMD_RESPOND __nullable)result; + +#pragma mark ---> 断开经典蓝牙 +-(void)cmdDisconnectEdrResult:(JL_CMD_RESPOND __nullable)result; + +#pragma mark ---> 重置配对流程标志(使适配连接ANCS设备) +-(void)cmdResetPairingResult:(JL_CMD_RESPOND __nullable)result; + +#pragma mark ---> 获取系统信息(全获取) +/** + @param function JL_FunctionCode + @param result 回复 + */ +-(void)cmdGetSystemInfo:(JL_FunctionCode)function + Result:(JL_CMD_RESPOND __nullable)result; +-(void)cmdGetSystemInfoResult; + +#pragma mark ---> 获取系统信息(选择性获取) +/** + @param function JL_FunctionCode + @param result 回复 + */ +-(void)cmdGetSystemInfo:(JL_FunctionCode)function + SelectionBit:(uint32_t)bits + Result:(JL_CMD_RESPOND __nullable)result; +-(void)cmdGetSystemInfoResult_1; + +#pragma mark ---> 设备主动返回的系统信息 +extern NSString *kJL_MANAGER_SYSTEM_INFO; + +#pragma mark ---> 通用、BT、Music、RTC、Aux +/** + @param function 功能类型 + @param cmd 操作命令 + @param ext 扩展数据 + @param result 回复 + */ +-(void)cmdFunction:(JL_FunctionCode)function + Command:(UInt8)cmd + Extend:(UInt8)ext + Result:(JL_CMD_RESPOND __nullable)result; + +typedef void(^JL_IMAGE_RT)(NSMutableDictionary* __nullable dict); +#pragma mark ---> 获取设备的图片 +/** + @param vid 设备vid + @param pid 设备pid + @param result 图片数据 + */ +-(void)cmdRequestDeviceImageVid:(NSString*)vid + Pid:(NSString*)pid + Result:(JL_IMAGE_RT __nullable)result; + +-(void)cmdRequestDeviceImageVid:(NSString*)vid + Pid:(NSString*)pid + ItemArray:(NSArray *__nullable)itemArray + Result:(JL_IMAGE_RT __nullable)result; + +-(NSDictionary*)localDeviceImage:(NSString*)jsonFile; + +#pragma mark ---> 通知固件开始播放TTS内容 + +/// 通知固件SDK播放tts +/// @param status 0:开始播放,1:播放结束 +-(void)cmdStartTTSNote:(uint8_t)status; + + +/// 获取MD5信息 +/// @param result 回调 +-(void)cmdGetMD5_Result:(JL_CMD_RESPOND)result; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_MusicControlManager.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_MusicControlManager.h new file mode 100644 index 000000000..bfa2d952d --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_MusicControlManager.h @@ -0,0 +1,40 @@ +// +// JL_MusicControlManager.h +// JL_BLEKit +// +// Created by 李放 on 2021/12/20. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +__attribute__((deprecated("已废弃,请使用JLDevPlayerCtrl类"))) + +@interface JL_MusicControlManager : JL_FunctionBaseManager + + +#pragma mark ---> 设置播放模式 +/** + @param mode 模式 + 0x01:全部循环; 0x02:设备循环; 0x03:单曲循环; 0x04:随机播放; 0x05:文件夹循环 + */ +-(void)cmdSetSystemPlayMode:(JL_MusicMode)mode __attribute__((deprecated("cmdSetPlayMode:已废弃"))); + +#pragma mark ---> 快进快退 +/** + @param cmd 快进或者快退枚举 + @param sec 时间 + @param result 返回结果 + */ +-(void)cmdFastPlay:(JL_FCmdMusic)cmd + Second:(uint16_t)sec + Result:(JL_CMD_RESPOND __nullable)result __attribute__((deprecated("cmdFastPlay:已废弃,需要使用JLDevPlayerCtrl类里的方法设置"))); + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_NFC.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_NFC.h new file mode 100644 index 000000000..a3be1d723 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_NFC.h @@ -0,0 +1,96 @@ +// +// JL_NFC.h +// JL_BLEKit +// +// Created by EzioChan on 2021/8/2. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import +#import "JL_TypeEnum.h" +#import "JL_ManagerM.h" + +@class JL_RCSP; +@class JL_EntityM; +@class NfcFileModel; +@class NfcModel; +NS_ASSUME_NONNULL_BEGIN + +typedef void(^NfcSyncResult)(UInt8 result,NSArray * _Nullable models); + +typedef void(^NfcIDResult)(UInt16 result); + +typedef void(^NfcDefaultResult)(BOOL result); + +typedef void(^NfcBeginAddResult)(JL_EntityM *entity); + + +@interface JL_NFC : NSObject + +-(instancetype)initWith:(JL_EntityM *)entity FileHandler:(JL_FileHandleType)handler; + + +/// 同步NFC信息开始 +-(void)w_syncNfcStart:(NfcSyncResult)result; + + +/// 修改NFC的信息 +/// @param dict 修改的内容 +/** + dict 的内容 + { + @"timestamp" : NSDate() + @"nickname" : @"我的家" + } + 如果key值找不到对应的value,那就说明该项值不参与被修改 + */ +-(void)w_modifyNfc:(NSDictionary *)dict WithID:(UInt16)nfcID; + + +/// 删除NFC信息 +/// @param model nfc头部model +-(void)w_deleteNfc:(NfcModel *)model; + + +/// 获取当前正在使用着的默认NFC卡ID +/// @param result NFC卡id +-(void)w_getNfcDefaultCard:(NfcIDResult)result; + + +/// 设置默认的NFC信息 +/// @param model NFC头部model +-(void)w_setNfcDefalutCard:(NfcModel *)model result:(NfcDefaultResult)result; + + +/// 通知默认NFC改变 +/// @param model NFC信息头部 +-(void)w_NfcDefaultNotify:(NfcModel *)model; + +/// 添加NFC文件 +/// @param model NFC文件模型 +/// @param result 开始传输操作 +/** examp. + NfcFileModel *fm = [[NfcFileModel alloc] init]; +// fm.idCard = ... +// fm.nfcFileName = ... + JL_NFC *mgr = [[JL_NFC alloc] init]; + [mgr w_NfcAddCard:fm BeginAdd:^(JL_EntityM * _Nonnull entity) { + //大文件传输开始 + [entity.mCmdManager cmdBigFileData:#path WithFileName:#fileName Result:^(JL_BigFileResult result, float progress) { + if (result == JL_BigFileTransferEnd) { + //结束NFC文件添加 + [mgr w_NfcEndAdd:fm]; + } + + }]; + }]; + */ +-(void)w_NfcAddCard:(NfcFileModel *)model BeginAdd:(NfcBeginAddResult)result; + +/// 添加NFC文件结束 +/// @param model NFC文件模型 +-(void)w_NfcEndAdd:(NfcFileModel *)model; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_OpCode.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_OpCode.h new file mode 100644 index 000000000..a7b9e7c86 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_OpCode.h @@ -0,0 +1,97 @@ +// +// JL_OpCode.h +// JL_BLEKit +// +// Created by 杰理科技 on 2022/12/28. +// Copyright © 2022 www.zh-jieli.com. All rights reserved. +// + +#ifndef JL_OpCode_h +#define JL_OpCode_h + +#define kJL_DATA_CMD 0x0001 +#define kJL_GET_TARGET_FEATURE_MAP 0x0002 //保留 +#define kJL_GET_TARGET_FEATURE 0x0003 +#define kJL_VOICE_START 0x0004 +#define kJL_VOICE_STOP 0x0005 +#define kJL_VOICE_DISCONNECT_EDR 0x0006 +#define kJL_SYS_INFO_GET 0x0007 +#define kJL_SYS_INFO_SET 0x0008 +#define kJL_SYS_INFO_AUTO_UPDATE 0x0009 +#define kJL_PHONE_CALL_REQUEST 0x000a +#define kJL_FILE_BROWSE_START 0x000c +#define kJL_FILE_BROWSE_STOP 0x000d +#define kJL_FILE_STRUCT_CHANGE 0x00f2 //通知文件结构变化 +#define kJL_FUNCTION_CMD 0x000e +#define kJL_LRC_GET_START 0x000f +#define kJL_LRC_GET_STOP 0x0010 +#define kJL_A2F_TTS_START 0x0011 +#define kJL_BT_SCAN_START 0x0012 +#define kJL_BT_SCAN_RESULT 0x0013 +#define kJL_BT_SCAN_STOP 0x0014 +//#define kJL_BT_CONNECT 0x0015 +#define kJL_FILE_START 0x0016 +#define kJL_FILE_STOP 0x0017 +#define kJL_FIND_DEVICE 0x0019 +#define kJL_CUSTOMER_USER 0x00ff + +#define kJL_OTA_INFO_OFFSET 0x00e1 +#define kJL_OTA_CAN_UPDATE 0x00e2 +#define kJL_OTA_ENTER_UPDATE 0x00e3 +#define kJL_OTA_EXIT_UPDATE 0x00e4 +#define kJL_OTA_GET_DATA 0x00e5 +#define kJL_OTA_STATUS_UPDATE 0x00e6 +#define kJL_OTA_REBOOT 0x00e7 +#define kJL_OTA_BLE_SPP 0x000b +#define kJL_OTA_LENGTH 0x00e8 + +#define kJL_SET_ADV 0x00C0 +#define kJL_GET_ADV 0x00C1 +#define kJL_ADV_NOTIFY_DEVICE 0x00C2 +#define kJL_ADV_NOTIFY_ENABLE 0x00C3 +#define kJL_ADV_NOTIFY_TIPS 0x00C4 //主要用于ADV设置同步后需要主机操作的行为。 + +#define kJL_SET_APP_INFO 0x00D0 +#define kJL_SET_MTU 0x00D1 +#define kJL_GET_MD5 0x00D4 +#define kJL_GET_LOW_DELAY 0x00D5 +#define kJL_GET_FLASH_INFO 0x00D6 +#define kJL_SET_DEV_STORAGE 0x00D8 //设置当前使用的存储设备 +#define kJL_GET_DEV_CONFIG 0x00D9 //获取设备配置信息 +#define kJL_GET_FLASH_W_R 0x001A + +#define kJL_BIGFILE_START 0x001B +#define kJL_BIGFILE_END 0x001C +#define kJL_BIGFILE_GET_FILE 0x001D +#define kJL_BIGFILE_STOP 0x001E +#define kJL_FILE_DELETE 0x001F +#define kJL_GET_FILENAME 0x0020 +#define kJL_PRE_ENVIRONMENT 0x0021 +#define kJL_FILE_FORMAT 0x0022 +#define kJL_FILE_NAME_DEL 0x0023 +#define kJL_FILE_READ_CONTENT 0x0024 + +#define kJL_RTC_PLUS 0x0025 +#define kJL_BATCH_OPERATE 0x0026 +#define kJL_FILE_GET_CRC 0x0027 +#define kJL_SMALL_FILE 0x0028 + +#define kJL_DEVICE_LOG 0x0029 +#define kJL_BIG_DATA 0x0030 +#define kJL_TWS_NAME_LIST 0x0031 //一拖二/获取设备已连接手机名 +#define kJL_AI_CONTROL 0x0032 //AI控制命令 +#define kJL_PUBLIC_SET 0x0033 //公共设置命令 +#define kJL_TRAMSLATE 0x0034 //翻译命令 +#define kJL_AURACASTE 0x0035 //Auracast命令 + + +#define kJL_WEAR_REQ_OPCODE 0x00A0 //获取运动信息 +#define kJL_WEAR_SET_OPCODE 0x00A1 //设置运动信息 +#define kJL_WEAR_RES_OPCODE 0x00A2 //设备主动推的运动信息 +#define kJL_WEAR_CMD_LOG 0x00A3 //传感器log传输命令 +#define kJL_WEAR_CMD_SETTING 0x00A5 //健康设备设置命令 +#define kJL_WEAR_SYNC_SPORT 0x00A6 //运动模式相关命令(同步数据) + +#define kJL_PHONE_NUMBER_WAY 0x00F1 + +#endif /* JL_OpCode_h */ diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_RCSP.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_RCSP.h new file mode 100644 index 000000000..8816e633d --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_RCSP.h @@ -0,0 +1,73 @@ +// +// JL_RCSP.h +// JL_BLEKit +// +// Created by zhihui liang on 2018/11/9. +// Copyright © 2018 www.zh-jieli.com. All rights reserved. +// + +#import +#import + +NS_ASSUME_NONNULL_BEGIN + + + +@class JL_PKG; +@interface JL_RCSP : NSObject + +/** + 解析JL数据包 + + @param data 把数据转成JL_PKG模型。 + @return JL_PKG数据模型 + */ ++(JL_PKG*)rcspAnalysisData:(NSData*)data; + +/** + 生成XM数据包 + + @param pkg 把JL_PKG模型转成data。 + @return 数据 + */ ++(NSData*)rcspMakePackage:(JL_PKG*)pkg; + +/** + 分析JL_PKG参数 + + @param pkg 把JL_PKG的xmData参数部分解析成一列数组。 + @return 参数数组 + */ ++(NSArray*)rcspAnalysisParams:(JL_PKG*)pkg; + +/** + 分解dJL_PKG信息 + + @param data JL_PKG中的信息数据 + @return 参数c数组 + */ ++(NSArray*)rcspInfoArrFromData:(NSData*)data; + +/// 拆分LTV数据 +/// 当前方法针对的是 L 长度为 2Byte +/// @param data LTV数据 ++(NSArray*)rcspInfoFromData2ByteSize:(NSData*)data; + +/** + 生成JL_PKG参数 + + @param array 把参数数组变成data(注意:数组元素必须是NSData类型)。 + @return 数据 + */ ++(NSData*)rcspMakeParams:(NSArray*)array; +@end + +@interface JL_PKG : NSObject +@property(assign,nonatomic) uint16_t pkgIsCommand; //1Bit +@property(assign,nonatomic) uint16_t pkgNeedResponse; //1Bit +@property(assign,nonatomic) uint16_t pkgUnused; //6Bits +@property(assign,nonatomic) uint16_t pkgOpCode; //8Bits +@property(assign,nonatomic) uint16_t pkgLength; //参数长度(本身不计) +@property(strong,nonatomic) NSData *pkgData; //参数数据 +@end +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_SDM_AirPressure.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_SDM_AirPressure.h new file mode 100644 index 000000000..766e37c23 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_SDM_AirPressure.h @@ -0,0 +1,37 @@ +// +// JL_SDM_AirPressure.h +// Test +// +// Created by EzioChan on 2021/4/6. +// Copyright © 2021 Zhuhai Jieli Technology Co.,Ltd. All rights reserved. +// + +#import "JLSportDataModel.h" + +NS_ASSUME_NONNULL_BEGIN + +/// 压力实时 +@interface JL_SDM_AirPressure : JLSportDataModel +/// 实时 +@property(nonatomic,assign)int realTime; +/// 最高 +@property(nonatomic,assign)int max; +/// 最低 +@property(nonatomic,assign)int min; + +/// 处理回复数据内容 +/// @param value 数据内容 +/// @param submask 功能标记位 ++(JL_SDM_AirPressure*)responseData:(NSData *)value subMask:(NSData *)submask; + +/// 请求内容设置 +/// @param rt 是否需要实时气压 +/// @param min 是否需要最小气压 +/// @param max 是否需要最大气压 ++(JL_SDM_AirPressure*)requireRealTime:(BOOL)rt min:(BOOL)min Max:(BOOL)max; + + + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_SDM_Altitude.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_SDM_Altitude.h new file mode 100644 index 000000000..e4e73c39d --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_SDM_Altitude.h @@ -0,0 +1,38 @@ +// +// JL_SDM_Altitude.h +// Test +// +// Created by EzioChan on 2021/4/6. +// Copyright © 2021 Zhuhai Jieli Technology Co.,Ltd. All rights reserved. +// + +#import "JLSportDataModel.h" + +NS_ASSUME_NONNULL_BEGIN + +///海拔高度相关 +@interface JL_SDM_Altitude : JLSportDataModel + +/// 最大值 +@property(nonatomic,assign)float max; +/// 最小值 +@property(nonatomic,assign)float min; +/// 实时的 +@property(nonatomic,assign)float realTime; + +/// 处理回复数据内容 +/// @param value 数据内容 +/// @param submask 功能标记位 ++(JL_SDM_Altitude*)responseData:(NSData *)value subMask:(NSData *)submask; + +/// 请求海拔内容设置 +/// @param rt 是否需要实时海拔 +/// @param min 是否需要最小海拔 +/// @param max 是否需要最大海拔 ++(JL_SDM_Altitude*)requireRealTime:(BOOL)rt min:(BOOL)min Max:(BOOL)max; + + + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_SDM_Header.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_SDM_Header.h new file mode 100644 index 000000000..d106663d0 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_SDM_Header.h @@ -0,0 +1,153 @@ +// +// JL_SDM_Header.h +// JL_BLEKit +// +// Created by EzioChan on 2021/4/8. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#ifndef JL_SDM_Header_h +#define JL_SDM_Header_h + +#import +#import "JL_SDM_Stress.h" +#import "JL_SDM_Altitude.h" +#import "JL_SDM_MaxOxg.h" +#import "JL_SDM_RecTime.h" +#import "JL_SDM_HeartRate.h" +#import "JL_SDM_MoveSteps.h" +#import "JL_SDM_TrainLoad.h" +#import "JL_SDM_AirPressure.h" +#import "JL_SDM_OxSaturation.h" +#import "JL_SDM_SportMessage.h" +#import "JL_MSG_Weather.h" +#import "JL_MSG_Func.h" +#import "JLWatchEnum.h" +#import "NfcModel.h" +#import "JLwSettingModel.h" +#import "JLSensorFuncModel.h" +#import "JLSedentaryRmdModel.h" +#import "JLConsequentHeartRateModel.h" +#import "JLExerciseHeartRateRemindModel.h" +#import "JLAutoPressureModel.h" +#import "JLSleepMonitorModel.h" +#import "JLFallDetectionModel.h" +#import "JLEmergencyContactModel.h" +#import "JLOxygenSturationRemindModel.h" +#import "JLWristLiftDetectionModel.h" +#import "JLPersonInfoModel.h" +#import "JLDisconnectRemindModel.h" +#import "JLWearSyncInfoModel.h" +#import "JLWearSyncFinishModel.h" +#import "JLWearSyncRealTimeModel.h" +#import "JLeSimManager.h" + + +#include +#ifndef JL_IOS +#define JL_IOS +#endif + +#pragma - Please select your log mode and log level + +// Note: Only debug mode will print log. You could also set mode for log level. +#define kJLDebugMode +// JLLogLevelFatal , JLLogLevelError , JLLogLevelWarn , JLLogLevelInfo , JLLogLevelDebug +#define JLLogLevelError +//Note: print method name +#define kModuleName __func__ + +#pragma ---------------------------------- + +#ifdef kJLDebugMode + +static const int JL_IOS_FLAG_FATAL = 0x10; +static const int JL_IOS_FLAG_ERROR = 0x08; +static const int JL_IOS_FLAG_WARN = 0x04; +static const int JL_IOS_FLAG_INFO = 0x02; +static const int JL_IOS_FLAG_DEBUG = 0x01; + +#ifdef JLLogLevelFatal +static const int JL_IOS_LOG_LEVEL = JL_IOS_FLAG_FATAL; +#elif defined(JLLogLevelError) +static const int JL_IOS_LOG_LEVEL = (JL_IOS_FLAG_FATAL | JL_IOS_FLAG_ERROR); +#elif defined(JLLogLevelWarn) +static const int JL_IOS_LOG_LEVEL = (JL_IOS_FLAG_FATAL | JL_IOS_FLAG_ERROR | JL_IOS_FLAG_WARN); +#elif defined(JLLogLevelInfo) +static const int JL_IOS_LOG_LEVEL = (JL_IOS_FLAG_FATAL | JL_IOS_FLAG_ERROR | JL_IOS_FLAG_WARN | JL_IOS_FLAG_INFO); +#elif defined(JLLogLevelDebug) +static const int JL_IOS_LOG_LEVEL = (JL_IOS_FLAG_FATAL | JL_IOS_FLAG_ERROR | JL_IOS_FLAG_WARN | JL_IOS_FLAG_INFO | JL_IOS_FLAG_DEBUG); +#endif + + + +#define log4cplus_fatal(category, logFmt, ...) \ +if(JL_IOS_LOG_LEVEL & JL_IOS_FLAG_FATAL) \ +syslog(LOG_CRIT, "%s:" logFmt, category,##__VA_ARGS__); \ + +#define log4cplus_error(category, logFmt, ...) \ +if(JL_IOS_LOG_LEVEL & JL_IOS_FLAG_ERROR) \ +syslog(LOG_ERR, "%s:" logFmt, category,##__VA_ARGS__); \ + +#define log4cplus_warn(category, logFmt, ...) \ +if(JL_IOS_LOG_LEVEL & JL_IOS_FLAG_WARN) \ +syslog(LOG_WARNING, "%s:" logFmt, category,##__VA_ARGS__); \ + +#define log4cplus_info(category, logFmt, ...) \ +if(JL_IOS_LOG_LEVEL & JL_IOS_FLAG_INFO) \ +syslog(LOG_WARNING, "%s:" logFmt, category,##__VA_ARGS__); \ + +#define log4cplus_debug(category, logFmt, ...) \ +if(JL_IOS_LOG_LEVEL & JL_IOS_FLAG_DEBUG) \ +syslog(LOG_WARNING, "%s:" logFmt, category,##__VA_ARGS__); \ + + +#else + +#define log4cplus_fatal(category, logFmt, ...); \ + +#define log4cplus_error(category, logFmt, ...); \ + +#define log4cplus_warn(category, logFmt, ...); \ + +#define log4cplus_info(category, logFmt, ...); \ + +#define log4cplus_debug(category, logFmt, ...); \ + +#endif + +///心率 +typedef void(^JL_CB_HeartRate)(JL_SDM_HeartRate *heartRate); +///气压 +typedef void(^JL_CB_AirPressure)(JL_SDM_AirPressure *ap); +///海拔 +typedef void(^JL_CB_Altitude)(JL_SDM_Altitude *altitude); +///运动步数 +typedef void(^JL_CB_MoveSteps)(JL_SDM_MoveSteps *ms); +///压力检测 +typedef void(^JL_CB_Stress)(JL_SDM_Stress *stress); +///血氧饱和度 +typedef void(^JL_CB_Oxsaturation)(JL_SDM_OxSaturation *oxs); +///训练负荷 +typedef void(^JL_CB_TrainLoad)(JL_SDM_TrainLoad *tl); +///最大摄氧量 +typedef void(^JL_CB_MaxOxg)(JL_SDM_MaxOxg *mo); +///运动恢复时间 +typedef void(^JL_CB_RecTime)(JL_SDM_RecTime *rt); +///运动信息 +typedef void(^JL_CB_SportMsg)(JL_SDM_SportMessage *sm); +///传感器log +typedef void(^JL_CB_WatchLog)(JL_WATCH_LOG_TYPE type,NSData *data); + +//MARK:设置相关 +///设置状态回复 +typedef void(^JL_CB_Status)(BOOL succeed); + +//MARK: - 同步相关 +///读取同步运动状态 +typedef void(^JL_CB_SyncSportInfo)(JLWearSyncInfoModel *infoModel); +/// 读取同步状态 +typedef void(^JL_CB_SyncSportDataInfo)(JLWearSyncDataModel *infoModel); + + +#endif /* JL_SDM_Header_h */ diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_SDM_HeartRate.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_SDM_HeartRate.h new file mode 100644 index 000000000..0a9925ded --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_SDM_HeartRate.h @@ -0,0 +1,49 @@ +// +// JL_SDM_HeartBeat.h +// Test +// +// Created by EzioChan on 2021/4/6. +// Copyright © 2021 Zhuhai Jieli Technology Co.,Ltd. All rights reserved. +// +/* + * 这是一个Sport Data Model的对象 + */ +///心率model +#import "JLSportDataModel.h" + +NS_ASSUME_NONNULL_BEGIN + +/// 心率相关内容 +@interface JL_SDM_HeartRate : JLSportDataModel +/// 实时心率 +@property(nonatomic,assign)uint8_t realTime; +/// 静息心率 +@property(nonatomic,assign)uint8_t resting; +/// 最大心率 +@property(nonatomic,assign)uint8_t max; + +/// 单次测量的心率 +@property(nonatomic,assign)uint8_t singleRate; + +/// 是否为单次测量的数据 +@property(nonatomic,assign)BOOL isSingle; + +/// 处理回复数据内容 +/// @param value 数据内容 +/// @param submask 功能标记位 ++(JL_SDM_HeartRate*)responseData:(NSData *)value subMask:(NSData *)submask; + +/// 请求心率内容设置 +/// @param rt 是否需要实时心率 +/// @param rting 是否需要静息心率 +/// @param max 是否需要最大心率 ++(JL_SDM_HeartRate*)requireRealTime:(BOOL)rt Resting:(BOOL)rting Max:(BOOL)max; + +/// 单次测量 ++(JL_SDM_HeartRate*)requireSingle; + + + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_SDM_MaxOxg.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_SDM_MaxOxg.h new file mode 100644 index 000000000..a0bf6d539 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_SDM_MaxOxg.h @@ -0,0 +1,29 @@ +// +// JL_SDM_MaxOxg.h +// Test +// +// Created by EzioChan on 2021/4/7. +// Copyright © 2021 Zhuhai Jieli Technology Co.,Ltd. All rights reserved. +// + +#import "JLSportDataModel.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface JL_SDM_MaxOxg : JLSportDataModel + +@property(nonatomic,assign)int max; + +///最大摄氧量 +/// 处理回复数据内容 +/// @param value 数据内容 +/// @param submask 功能标记位 ++(JL_SDM_MaxOxg*)responseData:(NSData *)value subMask:(NSData *)submask; + +/// 请求内容 ++(JL_SDM_MaxOxg*)require; + + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_SDM_MoveSteps.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_SDM_MoveSteps.h new file mode 100644 index 000000000..46fa1076f --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_SDM_MoveSteps.h @@ -0,0 +1,34 @@ +// +// JL_SDM_MoveSteps.h +// Test +// +// Created by EzioChan on 2021/4/6. +// Copyright © 2021 Zhuhai Jieli Technology Co.,Ltd. All rights reserved. +// + +#import "JLSportDataModel.h" + +NS_ASSUME_NONNULL_BEGIN + +///实时步数 +@interface JL_SDM_MoveSteps : JLSportDataModel +/// 实时步数 +@property(nonatomic,assign)NSInteger rtStep; + +/// 热量,单位:千卡 +@property(nonatomic,assign)NSInteger calories; + +/// 距离,单位:0.01公里 +@property(nonatomic,assign)NSInteger distance; +/// 处理回复数据内容 +/// @param value 数据内容 +/// @param submask 功能标记位 ++(JL_SDM_MoveSteps*)responseData:(NSData *)value subMask:(NSData *)submask; + +/// 选择性请求内容 ++(JL_SDM_MoveSteps*)require:(BOOL)rst distance:(BOOL)dts calories:(BOOL)ca; + + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_SDM_OxSaturation.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_SDM_OxSaturation.h new file mode 100644 index 000000000..f594e25c3 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_SDM_OxSaturation.h @@ -0,0 +1,59 @@ +// +// JL_SDM_OxSaturation.h +// Test +// +// Created by EzioChan on 2021/4/7. +// Copyright © 2021 Zhuhai Jieli Technology Co.,Ltd. All rights reserved. +// + +#import "JLSportDataModel.h" + +NS_ASSUME_NONNULL_BEGIN + +typedef NS_ENUM(UInt8, JLOxSaturationType) { + //当前血氧饱和度 + JLOxSaturation_nowSta = 0x01, + //最大血氧 + JLOxSaturation_max = 0x01 << 1, + //最小血氧 + JLOxSaturation_min = 0x01 << 2, + //单次测量 + JLOxSaturation_single = 0x01 << 3 +}; + +/// 血氧饱和度 +@interface JL_SDM_OxSaturation : JLSportDataModel + +/// 饱和度 +@property(nonatomic,assign)int staturation; +/// 最大饱和度 +@property(nonatomic,assign)uint8_t max; +/// 最小饱和度 +@property(nonatomic,assign)uint8_t min; + +/// 单次测量的饱和度 +@property(nonatomic,assign)uint8_t singleStaturation; + +/// 是否为单次测量的数据 +@property(nonatomic,assign)BOOL isSingle; + + +/// 血氧饱和度 +/// 处理回复数据内容 +/// @param value 数据内容 +/// @param submask 功能标记位 ++(JL_SDM_OxSaturation*)responseData:(NSData *)value subMask:(NSData *)submask; + +/// 请求内容 ++(JL_SDM_OxSaturation*)require; + + +/// 请求血氧浓度 +/// @param type 类型 +/// 该类型可以同时请求多个,诸如:JLOxSaturation_nowSta | JLOxSaturation_max | JLOxSaturation_min ++(JL_SDM_OxSaturation*)requireByBit:(JLOxSaturationType)type; + + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_SDM_RecTime.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_SDM_RecTime.h new file mode 100644 index 000000000..3e0f3c577 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_SDM_RecTime.h @@ -0,0 +1,28 @@ +// +// JL_SDM_RecTime.h +// Test +// +// Created by EzioChan on 2021/4/7. +// Copyright © 2021 Zhuhai Jieli Technology Co.,Ltd. All rights reserved. +// + +#import "JLSportDataModel.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface JL_SDM_RecTime : JLSportDataModel + +@property(nonatomic,assign)int hour; +@property(nonatomic,assign)int min; + +/// 处理回复数据内容 +/// @param value 数据内容 +/// @param submask 功能标记位 ++(JL_SDM_RecTime*)responseData:(NSData *)value subMask:(NSData *)submask; + +/// 请求内容 ++(JL_SDM_RecTime*)require; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_SDM_SportMessage.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_SDM_SportMessage.h new file mode 100644 index 000000000..38e84d940 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_SDM_SportMessage.h @@ -0,0 +1,50 @@ +// +// JL_SDM_SportMessage.h +// JL_BLEKit +// +// Created by EzioChan on 2021/4/8. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import "JLSportDataModel.h" +#import "JLWatchEnum.h" +NS_ASSUME_NONNULL_BEGIN + +@interface JL_SDM_SportMessage : JLSportDataModel + +/// 运动模式 +@property(nonatomic,assign)JL_SportPattern sportPattern; +/// 距离,单位:0.01km +@property(nonatomic,assign)int distance; +/// 开始时间 +@property(nonatomic,strong)NSDate *startTime; +/// 结束时间 +@property(nonatomic,strong)NSDate *endTime; +/// 热量,单位:千卡 Kcal +@property(nonatomic,assign)int xkcal; +/// 速度。单位:0.01 km/h +@property(nonatomic,assign)int speed; + + +/// 分析返回的数据 +/// @param value subData +/// @param submask submask ++(JL_SDM_SportMessage *)responseData:(NSData *)value subMask:(NSData *)submask; + +/// 请求要获取的内容 +/// @param m 是否请求模式 +/// @param d 是否请求距离 +/// @param st 是否请求开始时间 +/// @param et 是否请求结束时间 +/// @param kcal 是否请求卡路里 +/// @param sp 是否请求速度 ++(JL_SDM_SportMessage *)requireModel:(BOOL)m distance:(BOOL)d start:(BOOL)st end:(BOOL)et kcal:(BOOL)kcal speed:(BOOL)sp; + +/// 请求全部数据 ++(JL_SDM_SportMessage *)requireAll; + + + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_SDM_Stress.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_SDM_Stress.h new file mode 100644 index 000000000..75d9260ad --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_SDM_Stress.h @@ -0,0 +1,28 @@ +// +// JL_SDM_Stress.h +// Test +// +// Created by EzioChan on 2021/4/7. +// Copyright © 2021 Zhuhai Jieli Technology Co.,Ltd. All rights reserved. +// + +#import "JLSportDataModel.h" + +NS_ASSUME_NONNULL_BEGIN + +/// 实时压力 +@interface JL_SDM_Stress : JLSportDataModel + +@property(nonatomic,assign)int stress; + +/// 处理回复数据内容 +/// @param value 数据内容 +/// @param submask 功能标记位 ++(JL_SDM_Stress*)responseData:(NSData *)value subMask:(NSData *)submask; + +/// 请求内容 ++(JL_SDM_Stress*)require; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_SDM_TrainLoad.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_SDM_TrainLoad.h new file mode 100644 index 000000000..c93ff24c1 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_SDM_TrainLoad.h @@ -0,0 +1,30 @@ +// +// JL_SDM_TrainLoad.h +// Test +// +// Created by EzioChan on 2021/4/7. +// Copyright © 2021 Zhuhai Jieli Technology Co.,Ltd. All rights reserved. +// + +#import "JLSportDataModel.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface JL_SDM_TrainLoad : JLSportDataModel + +@property(nonatomic,assign)int load; + +///训练负荷 +/// 处理回复数据内容 +/// @param value 数据内容 +/// @param submask 功能标记位 ++(JL_SDM_TrainLoad*)responseData:(NSData *)value subMask:(NSData *)submask; + +/// 请求内容 ++(JL_SDM_TrainLoad*)require; + + + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_SmallFileManager.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_SmallFileManager.h new file mode 100644 index 000000000..fae3600ba --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_SmallFileManager.h @@ -0,0 +1,151 @@ +// +// JL_SmallFileManager.h +// JL_BLEKit +// +// Created by 杰理科技 on 2021/12/13. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import + +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +typedef NS_ENUM(UInt8, JL_SmallFileOperate) { + JL_SmallFileOperateFail = 0x00, //失败 + JL_SmallFileOperateDoing = 0x01, //操作中 + JL_SmallFileOperateSuceess = 0x02, //成功 + JL_SmallFileOperateUnknown = 0x03, //未知 + JL_SmallFileOperateExcess = 0x04, //超量 + JL_SmallFileOperateCrcError = 0x05, //CRC错误 + JL_SmallFileOperateTimeout = 0x06, //超时 +}; +typedef void(^JL_SMALLFILE_DEL)(JL_SmallFileOperate status); +typedef void(^JL_SMALLFILE_READ)(JL_SmallFileOperate status, + float progress, NSData* __nullable data); +typedef void(^JL_SMALLFILE_NEW)(JL_SmallFileOperate status, + float progress, uint16_t fileID); +typedef void(^JL_SMALLFILE_UPDATE)(JL_SmallFileOperate status, + float progress); +typedef void(^JL_SMALLFILE_LIST)(NSArray * __nullable array); +typedef void(^JL_SMALLFILE_RT)(uint8_t flag, uint16_t fileID,NSData* __nullable data); + +@interface JL_SmallFileManager : JL_FunctionBaseManager + +#pragma mark - 查询文件 + +/// 查询文件 +/// @param type 文件类型 +/// 文件类型除了已有的文件外,还可以扩展类型是Uint8的值 +/// @param result 列表回调 +-(void)cmdSmallFileQueryType:(JL_SmallFileType)type + Result:(JL_SMALLFILE_LIST __nullable)result; + +#pragma mark - 删除文件 + +/// 删除文件 +/// @param file 文件模型:JLModel_SmallFile +/// @param result 操作回调结果 +-(void)cmdSmallFileDelete:(JLModel_SmallFile*)file Result:(JL_SMALLFILE_DEL)result; + +#pragma mark - 读取文件 + +/// 读取文件 +/// @param file 文件模型:JLModel_SmallFile +/// @param result 回调文件数据以及进度,通过分包式回调。 +-(void)cmdSmallFileRead:(JLModel_SmallFile*)file + Result:(JL_SMALLFILE_READ)result; + +-(void)cmdSmallFileReadSync:(JLModel_SmallFile*)file + Result:(JL_SMALLFILE_READ)result;//同步 + +#pragma mark - 新增文件 + +/// 新增文件 +/// @param data 文件数据 +/// @param type 文件类型 +/// @param result 回调的结果,包含分包进度 +-(void)cmdSmallFileNew:(NSData*)data + Type:(JL_SmallFileType)type + Result:(JL_SMALLFILE_NEW)result; + +-(void)cmdSmallFileNewSync:(NSData*)data + Type:(JL_SmallFileType)type + Result:(JL_SMALLFILE_NEW)result; + +#pragma mark - 更新文件 + +/// 更新文件 +/// @param file 文件模型:JLModel_SmallFile +/// @param data 文件数据 +/// @param result 回调进度 +-(void)cmdSmallFileUpdate:(JLModel_SmallFile*)file + Data:(NSData*)data + Result:(JL_SMALLFILE_UPDATE)result; + +-(void)cmdSmallFileUpdateSync:(JLModel_SmallFile*)file + Data:(NSData*)data + Result:(JL_SMALLFILE_UPDATE)result; + +#pragma mark - 底层API + +/// 读取文件,更低等级的API +/// @param type 文件类型 +/// @param fileId 文件ID +/// @param offset 偏移值 +/// @param fileSize 数据大小 +/// @param flag 是否为第一包查询 +/// @param result 回调文件结果 +-(void)cmdSmallFileReadType:(uint8_t)type + FileID:(uint16_t)fileId + Offset:(uint16_t)offset + FileSize:(uint16_t)fileSize + Flag:(uint8_t)flag + Result:(JL_SMALLFILE_RT __nullable)result; + + +/// 插入新文件,更低等级的API +/// @param type 文件类型 +/// @param offset 偏移值 +/// @param fileSize 数据量大小 +/// @param crc16 crc校验码 +/// @param data 要插入的数据 +/// @param result 回调结果 +-(void)cmdSmallFileNewType:(uint8_t)type + Offset:(uint16_t)offset + FileSize:(uint16_t)fileSize + Crc16:(uint16_t)crc16 + FileData:(NSData*)data + Result:(JL_SMALLFILE_RT __nullable)result; + +/// 更新文件,更低等级的API +/// @param type 文件类型 +/// @param fileId 文件ID +/// @param offset 偏移值 +/// @param fileSize 数据包的大小 +/// @param crc16 数据包的crc校验 +/// @param data 数据包 +/// @param result 回调结果 +-(void)cmdSmallFileUpdateType:(uint8_t)type + FileID:(uint16_t)fileId + Offset:(uint16_t)offset + FileSize:(uint16_t)fileSize + Crc16:(uint16_t)crc16 + FileData:(NSData*)data + Result:(JL_SMALLFILE_RT __nullable)result; + +/// 小文件删除,更低等级的API +/// @param type 文件类型 +/// @param fileId 文件id +/// @param result 回调结果 +-(void)cmdSmallFileDeleteType:(uint8_t)type + FileID:(uint16_t)fileId + Result:(JL_SMALLFILE_RT __nullable)result; + +-(void)closeTimer; +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_SoundCardManager.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_SoundCardManager.h new file mode 100644 index 000000000..6e23c4ce3 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_SoundCardManager.h @@ -0,0 +1,97 @@ +// +// JL_SoundCardManager.h +// JL_BLEKit +// +// Created by 李放 on 2021/12/20. +// Modify by EzioChan on 2023/09/25. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN + + +typedef NS_ENUM(uint8_t, JL_KalaoIndex) { + ///卡拉OK 混响 + JL_KalaoIndexReverberation = 0, + ///卡拉OK 延时 + JL_KalaoIndexDelayed = 1, + ///卡拉OK 音量 + JL_KalaoIndexVolume = 2, +}; + +@class JL_ManagerM; + +/// 声卡功能 +@interface JLSoundCardIndexValue : NSObject + +@property (assign,nonatomic)uint8_t index; + +@property (assign,nonatomic)uint16_t value; + +@end + +@protocol JLSoundCardMgrDelegate + +/// 声卡控制回调 +/// - Parameters: +/// - mask: 掩码 +/// - items: 掩码对应的值 +-(void)jlsoundCardMask:(uint64_t)mask values:(NSArray *)items; + +/// 声卡控制回调 +/// - Parameter frequencyArray: 频率数组 +-(void)jlsoundCardMicFrequency:(NSArray*)frequencyArray; + +/// 声卡控制回调 +/// - Parameter eqArray: EQ数组 +-(void)jlsoundCardMicEQ:(NSArray*)eqArray; + +@end + + +/// 卡拉OK(声卡控制相关) +@interface JL_SoundCardManager : NSObject + +/// 卡拉OK 组件索引 +@property (assign,nonatomic)long index; + +/// 卡拉OK 组件的值 +@property (assign,nonatomic)long value; + +/// 卡拉OK 固件返回的掩码 +@property (assign,nonatomic)uint64_t mask; + +/// 声卡功能参数列表 +@property (strong,nonatomic)NSArray * iVitems; + +/// 卡拉OK 频率数组 +@property (strong,nonatomic)NSArray *micFrequencyArray; + +/// 卡拉OK EQ数组 +@property (strong,nonatomic)NSArray *micEQArray; + +/// 代理 +@property (weak,nonatomic)id delegate; + +/// 设置卡拉OK【index、value】 +/// - Parameters: +/// - manager: 设备对象 +/// - index: index 参数类型 JL_KalaoIndex 目前支持混响、延时、音量的设置。(具体可以看固件的json文件) +/// - value: 0-100 +/// - result: 设置结果 +-(void)cmdSetKalaok:(JL_ManagerM *)manager Index:(JL_KalaoIndex)index Value:(uint16_t)value result:(JL_CMD_RESPOND)result; + +/// 设置卡拉OK【MIC EQ增益】 +/// - Parameters: +/// - manager: 设备对象 +/// - array: @[@(0),@(0),@(0),@(0),@(0)] 单个取值范围 [-8.0 , +8.0]。 +/// - result: 设置结果 +-(void)cmdSetKaraoke:(JL_ManagerM *)manager micEQ:(NSArray*)array result:(JL_CMD_RESPOND)result; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_SpeechAIttsHandler.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_SpeechAIttsHandler.h new file mode 100644 index 000000000..0ade1d9e8 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_SpeechAIttsHandler.h @@ -0,0 +1,59 @@ +// +// JL_SpeechAIttsHandler.h +// JL_BLEKit +// +// Created by EzioChan on 2023/7/22. +// Copyright © 2023 www.zh-jieli.com. All rights reserved. +// + +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +@class JL_ManagerM; +@protocol JL_SpeechAIttsHandlerDelegate + +/// 设备回调ai云数据 +/// - Parameters: +/// - manager: 设备 +/// - aicloud: AI云数据对象 +-(void)receiveDataFrom:(JL_ManagerM *)manager WithAiCloud:(JLSpeechAiCloud *)aicloud; + +/// 设备返回tts合成数据 +/// - Parameters: +/// - manager: 设备 +/// - tts: tts数据对象 +-(void)receiveDataFrom:(JL_ManagerM *)manager WithTTS:(JLSpeechTTSSynthesis *)tts; + +@end + +/// 语音 AI/tts 传输处理(旧) +DEPRECATED_MSG_ATTRIBUTE("Use JL_SpeechAIttsHandler instead.") +@interface JL_SpeechAIttsHandler : NSObject + +@property(nonatomic,weak)id delegate; + + +/// 初始化一个语音大数据传输实例 +/// - Parameter mgr: JL_ManagerM +- (instancetype)initWithMgr:(JL_ManagerM *)mgr; + +/// 发送tts语音合成信息 +/// - Parameters: +/// - tts: tts语音对象内容 +/// - manager: 设备 +/// - result: 回调结果 +-(void)speechSendTTs:(JLSpeechTTSSynthesis *)tts manager:(JL_ManagerM *)manager result:(JL_BIGDATA_RT)result; + +/// 发送ai云数据到设备 +/// - Parameters: +/// - cloud: ai云数据 +/// - manager: 设备 +/// - result: 回调结果 +-(void)speechSendAiCloud:(JLSpeechAiCloud *)cloud manager:(JL_ManagerM *)manager result:(JL_BIGDATA_RT)result; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_SpeexManager.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_SpeexManager.h new file mode 100644 index 000000000..28c69e572 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_SpeexManager.h @@ -0,0 +1,125 @@ +// +// JL_SpeexManager.h +// JL_BLEKit +// +// Created by 杰理科技 on 2021/12/17. +// Modify By EzioChan on 2023/03/27. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +@class JL_ManagerM; +@class JL_SpeexManager; + +/// 录音状态代理处理 +@protocol JL_SpeexManagerDelegate +/// 录音数据回调 +/// - Parameters: +/// - manager: 操作设备 +/// - data: 数据 +-(void)speexManager:(JL_SpeexManager *)manager Audio:(NSData *)data; + +/// 设备端开始录音 +/// - Parameters: +/// - manager: 操作设备 +/// - param: 录音参数 +-(void)speexManager:(JL_SpeexManager *) manager StartByDeviceWithParam:(JLRecordParams *)param; + +/// 设备端结束录音 +/// - Parameters: +/// - manager: 操作设备 +/// - param: 语音助手配置参数 +-(void)speexManager:(JL_SpeexManager *) manager StopByDeviceWithParam:(JLSpeechRecognition *)param; + +/// 录音状态回调 +/// - Parameters: +/// - manager: 操作设备 +/// - status: 状态 +-(void)speexManager:(JL_SpeexManager *)manager Status:(JL_SpeakType)status; + +@optional +/// 录音状态回调 +/// - Parameters: +/// - manager: 操作设备 +/// - status: 录音状态 +/// - originator: 状态变更发起端 +/// 当发起者是Device时,才会具备params的参数,其中结束录音时,params的属性仅有mVadWay为可使用内容 +/// - params: 录音参数 +-(void)speexManager:(JL_SpeexManager *)manager Status:(JL_SpeakType)status By:(JLCMDOriginator)originator With:(JLRecordParams *_Nullable) params __attribute__((deprecated("Use several other callbacks to implement callback methods"))); +@end + +/// 设备录音管理对象 +DEPRECATED_MSG_ATTRIBUTE("Use JLDevAudioManager instead.") +@interface JL_SpeexManager : NSObject + +//MARK: - Sync Android Interface + +@property(nonatomic,weak)id delegate; + +-(instancetype)init __attribute__((unavailable("Use +shareSpeexManager:WithManager: instead."))); + + +/// 获取单例 +/// - Parameters: +/// - delegate: 代理 +/// - manager: 操作设备 ++(JL_SpeexManager *)shareSpeexManager:(id) delegate WithManager:(JL_ManagerM *)manager; + + +/// 获取录音状态 +-(JL_SpeakType)cmdCheckRecordStatus; + + + +/// 开始录音 +/// - Parameters: +/// - manager: 操作设备 +/// - params: 录音参数 +/// - result: 命令操作结果回调 +-(void)cmdStartRecord:(JL_ManagerM *)manager Params:(JLRecordParams *)params Result:(JL_CMD_RESPOND __nullable)result; + + +/// 停止录音 +/// - Parameters: +/// - manager: 操作设备 +/// - reason: VAD类型 +/// - result: 命令操作结果回调 +-(void)cmdStopRecord:(JL_ManagerM *)manager Reason:(JLSpeakDownReason) reason Result:(JL_CMD_RESPOND __nullable)result; + +/// 停止录音2 +/// - Parameters: +/// - manager: 操作设备 +/// - reason: vad类型 +/// - schr: 语音设置助手 +/// - result: 回调结果 +-(void)cmdStopRecord:(JL_ManagerM *)manager Reason:(JLSpeakDownReason)reason SpeechHelper:(JLSpeechRecognition *)schr Result:(JL_CMD_RESPOND __nullable)result; + + +/// 发送命令给音箱,允许音箱端开始接收语音,音箱收到这个消息后会发一个提示音 +/// 当前命令用于收到设备主动发起的录音时,同意开始录音。 +/// 即在 speexManagerStatus:(JL_SpeakType)status By:(JLCMDOriginator)originator With:(JLRecordParams *_Nullable) params 的代理回调收到之后的回复处理 +-(void)cmdAllowSpeak; + + +/// 拒绝录音 +/// 发送命令给音箱,不允许接收语音 +/// 当前命令用于收到设备主动发起的录音时,拒绝开始录音。 +/// 即在 speexManagerStatus:(JL_SpeakType)status By:(JLCMDOriginator)originator With:(JLRecordParams *_Nullable) params 的代理回调收到之后的回复处理 +-(void)cmdRejectSpeak; + +/** 停止语音 + 发发送命令给音箱,停止接收数据,即检测到断句 + */ +-(void)cmdSpeakingDone __attribute__((deprecated ( "当前命令已失效,请使用cmdStopRecord:(JL_ManagerM *)manager Reason:(JLSpeakDownReason) reason"))); + + + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_SystemEQ.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_SystemEQ.h new file mode 100644 index 000000000..3286776c9 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_SystemEQ.h @@ -0,0 +1,54 @@ +// +// JL_SystemEQ.h +// JL_BLEKit +// +// Created by 李放 on 2021/12/20. +// Modify by EzioChan on 2023/09/22 +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import +#import +#import +#import + + +NS_ASSUME_NONNULL_BEGIN +@class JL_SystemEQ; +typedef void(^JLSystemEQResult)(JL_CMDStatus status,JL_SystemEQ * _Nullable model); + +@interface JL_SystemEQ : JL_FunctionBaseManager + +/// 当前EQ模式 +@property (assign,nonatomic) JL_EQMode eqMode; + +/// EQ段数类型 +@property (assign,nonatomic) JL_EQType eqType; + +/// EQ参数值 +/// (只适用于EQ Mode == CUSTOM情况) +@property (strong, nonatomic) NSArray *eqArray; + +/// 自定义 EQ数组 +@property (strong, nonatomic) NSArray *eqCustomArray; + +/// EQ频率 +@property (strong, nonatomic) NSArray *eqFrequencyArray; + +/// EQ的预设值数组 +@property (strong,nonatomic) NSArray *eqDefaultArray; + + +/// 设置系统EQ +/// - Parameters: +/// - eqMode: EQ模式 +/// - params: EQ参数 +-(void)cmdSetSystemEQ:(JL_EQMode)eqMode Params:(NSArray* __nullable)params; + +/// 查询系统EQ内容 +-(void)cmdGetSystemEQ:(JLSystemEQResult)result; + + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_SystemTime.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_SystemTime.h new file mode 100644 index 000000000..9e862aaeb --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_SystemTime.h @@ -0,0 +1,45 @@ +// +// JL_SystemTime.h +// JL_BLEKit +// +// Created by 李放 on 2021/12/20. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface JL_SystemTime : JL_FunctionBaseManager + + +/// 设备当前时间 +@property(nonatomic,strong)JLModel_RTC *rtc; + +#pragma mark ---> 设置系统时间 +/** + @param date 时间类 + */ +-(void)cmdSetSystemTime:(NSDate*)date __attribute__((deprecated ( "Please use the (cmdSetSystemYear: Month: Day: Hour: Minute: Second) method instead. The current method will be invalid"))); + + +/// 设置系统年月日时分秒 +/// @param year 年 +/// @param month 月 +/// @param day 日 +/// @param hour 时 +/// @param min 分 +/// @param sec 秒 +-(void)cmdSetSystemYear:(uint16_t)year + Month:(uint8_t)month + Day:(uint8_t)day + Hour:(uint8_t)hour + Minute:(uint8_t)min + Second:(uint8_t)sec; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_SystemVolume.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_SystemVolume.h new file mode 100644 index 000000000..490d8ce10 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_SystemVolume.h @@ -0,0 +1,27 @@ +// +// JL_SystemVolume.h +// JL_BLEKit +// +// Created by 李放 on 2021/12/20. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface JL_SystemVolume : JL_FunctionBaseManager + +#pragma mark ---> 设置系统音量 +/** + @param volume 音量值 + */ +-(void)cmdSetSystemVolume:(UInt8)volume; +-(void)cmdSetSystemVolume:(UInt8)volume Result:(JL_CMD_RESPOND __nullable)result; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_Tools.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_Tools.h new file mode 100644 index 000000000..64d4c42c1 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_Tools.h @@ -0,0 +1,412 @@ +// +// JL_Tools.h +// JL_BLEKit +// +// Created by zhihui liang on 2018/11/9. +// Copyright © 2018 www.zh-jieli.com. All rights reserved. +// + +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN +typedef void(^JL_Action)(void); +typedef void(^JL_Timer_BK)(void); + +@class JL_Timer; +@interface JL_Tools : NSObject + + +/** + Data自定义截取。 + + @param data 数据 + @param index 偏移 + @param length 长度 + @return 截取后的数据 + */ ++(NSData*)data:(NSData*)data R:(NSInteger)index L:(NSInteger)length; ++(NSDictionary*)dictionaryData:(NSData*)data R:(NSInteger)index L:(NSInteger)length; + +/** + NSData 转成 10进制 + + @param data 数据类型 + @return NSInteger类型 + */ ++(NSInteger)dataToInt:(NSData*)data; + +/** + NSData 转成 NSString + + @param data 数据 + @return 字符串 + */ ++(NSString*)dataChangeToString:(NSData*)data; + +/** + uint8_t 转成 NSData + + @param value uint8_t类型 + @return NSData + */ ++(NSData*)uInt8_data:(uint8_t)value; + +/** + uint16_t 转成 NSData + + @param value uint16_t类型 + @param endian YES:小端 NO:大端 + @return NSData + */ ++(NSData*)uInt16_data:(uint16_t)value Endian:(BOOL)endian; + +/** + uint32_t 转成 NSData + + @param value uint32_t类型 + @param endian YES:小端 NO:大端 + @return NSData + */ ++(NSData*)uInt32_data:(uint32_t)value Endian:(BOOL)endian; + +/** + uint64_t 转成 NSData + + @param value uint64_t类型 + @param endian YES:小端 NO:大端 + @return NSData + */ ++(NSData*)uInt64_data:(uint64_t)value Endian:(BOOL)endian; + +/** + int64_t 转成 NSData + + @param value int64_t类型 + @param endian YES:小端 NO:大端 + @return NSData + */ ++(NSData*)int64_data:(int64_t)value Endian:(BOOL)endian; + +/** + 大小端转换 + + @param data 数据 + @return 转换后的数据 + */ ++(NSData*)changeBigOrSmall:(NSData*)data; + +/** + @"ffff0000" 转成 ,16进制的字符串变成NSData。 + + @param hex 类似@"ffff0000" + @return NSData类型 => + */ ++(NSMutableData*)HexToData:(NSString*)hex; +/** + * 去除结束符 + */ ++(NSData*)cleanEOF:(NSData*)data; +/** + 求自然数:aByte ==> -2 -1 0 1 2 3... + @param aByte 数据 + @return 自然数 + */ ++(int)getNaturalNumber:(NSData*)aByte; ++(int)getNaturalNumber_u16:(NSData*)u16Bytes; ++(int)getNaturalNumber_u32:(NSData*)u32Bytes; + +/** + 发出通知事件 + + @param name 通知名字 + @param object 传递的对象 + */ ++(void)post:(NSString*)name Object:(id __nullable)object; + +/** + 发出通知事件 + + @param name 通知名字 + @param object 传递的对象 + @param info 传递的信息 + */ ++(void)post:(NSString*)name Object:(id __nullable)object UserInfo:(NSDictionary* __nullable)info; +/** + 监听通知事件 + + @param name 通知名字 + @param action 实现方法 + @param own 监听者 + */ ++(void)add:(NSString*__nullable)name Action:(SEL)action Own:(id)own; + +/** + 取消通知监听 + + @param name 通知名字 + @param own 监听者 + */ ++(void)remove:(NSString*__nullable)name Own:(id)own; + +/** + 往NSUserDefault存入对象(注意:可变类型对象不适用)。 + + @param objc 对象 + @param key 键值 + */ ++(void)setUser:(id)objc forKey:(NSString*)key; + +/** + 从NSUserDefault取出对象(注意:可变类型对象不适用)。 + + @param key 键值 + @return 返回对象 + */ ++(id _Nullable)getUserByKey:(NSString*)key; + +/** + 移除NSUserDefault相对应的对象 + + @param key 键值 + */ ++(void)removeUserByKey:(NSString*)key; + + +/** + 延时执行block。 + + @param sec 延时时间(秒) + @param block 代码块 + */ ++(void)delay:(double)sec Task:(JL_Action)block; + +/** + 异步执行block。 + + @param block 代码块 + */ ++(void)subTask:(JL_Action)block; + +/** + 主线程执行block。 + + @param block 代码块 + */ ++(void)mainTask:(JL_Action)block; + + +/** + 新建定时器 + + @param sel 执行方法 + @param objc 执行对象 + @param sec 间隔时间(秒) + @return NSTimer + */ ++(NSTimer*)timingStart:(SEL)sel target:(id)objc Time:(NSTimeInterval)sec; + + +/** + 暂停定时间器 + + @param timer 定时器指针 + */ ++(void)timingPause:(__weak NSTimer*)timer; + +/** + 继续定时器 + + @param timer 定时器指针 + */ ++(void)timingContinue:(__weak NSTimer*)timer; + + +/** + 摧毁定时器 + + @param timer 定时器指针 + */ ++(void)timingStop:(__weak NSTimer*)timer; + + +/** + 在存在的文件路径上,建立新的文件。 + + @param sPath 沙盒 + @param mPath 中间路径 + @param file 文件名 + @return 完成路径 + */ ++(NSString*)createOn:(NSSearchPathDirectory)sPath + MiddlePath:(NSString*)mPath + File:(NSString*)file; + +/** + 列出文件路径 + + @param sPath 沙盒 + @param mPath 中间路径 + @param file 文件名 + @return 完整路径 + */ ++(NSString*)listPath:(NSSearchPathDirectory)sPath + MiddlePath:(NSString*)mPath + File:(NSString*)file; + +/** + * 用途:【查找】一个文件,在你想要的路径下。 + * @param sPath 系统路径 + * @param mPath 中途路径 -->> @"test1/test2/test3" <<-- + * @param file 文件名 + */ ++(NSString*)findPath:(NSSearchPathDirectory)sPath + MiddlePath:(NSString*)mPath + File:(NSString*)file; + +/** + * 用途:从Project资源里寻找文件。 + * (先把资源文件添加至工程内的Copy Bundle Resources内。) + * @param file 文件名 + * @return 该文件的路径。 + */ ++(NSString*)find:(NSString *)file; + +/** + * 是否存在某个路径。 + * @param path 文件路径 + * @return YES or NO。 + */ ++(BOOL)isExistsPath:(NSString*)path; +/** + 删除文件 + @param path 完整路径 + @return 成功与否 + */ ++(BOOL)removePath:(NSString*)path; + +/** + * 用途:文件夹内文件元素。 + * @param path 文件夹路径 + */ ++(NSArray*)subPaths:(NSString*)path; + +/** + * 用途:解析JSON文件。 + * @param path 文件路径 + */ ++(id)JsonPath:(NSString*)path; + +/** + * NSArray ==> NSString. + */ ++(NSString*)arrayToJson:(NSArray *)array; + +/** + 数据覆盖写进文件 + + @param data 数据 + @param path 文件路径 + @return 成功与否 + */ ++(BOOL)writeData:(NSData*)data fillFile:(NSString*)path; + +/** + 数据写进文件的末端 + + @param data 数据 + @param path 文件路径 + */ ++(void)writeData:(NSData*)data endFile:(NSString*)path; + +/** + 数据写进文件的偏移位置 + + @param data 数据 + @param seek 偏移 + @param path 文件路径 + */ ++(void)writeData:(NSData*)data Seek:(unsigned long long)seek File:(NSString*)path; + +/** + * UNICODE 编码字符串(小端) + */ ++(NSString*)stringUnicode:(NSData*)data; + +/** + * UNICODE 编码字符串(大端) + */ ++(NSString*)stringUnicodeBig:(NSData*)data; + +/** + * ANSI 编码字符串 + */ ++(NSString*)stringANSI:(NSData*)data; + +/** + * GBK 编码字符串 + */ ++(NSString*)stringGBK:(NSData*)data; + +/** + * 大文件传输,长短文件名(移除不必要字符) + */ ++(NSData*)stringBigFileWithNeedRemoveUnnecessaryPunctuationCharactersWithString:(NSString*)name withFileNameIndex:(int)fileNameIndex; + + +/// 大文件传输文件名设置 +/// Unicode编码 +/// - Parameters: +/// - name: 文件名 +/// - fileNameIndex: index +/// - encodeType: 编码格式 ++(NSData *)stringBigFileUnicode:(NSString *)name withFileNameIndex:(int)fileNameIndex WithEncode:(NSStringEncoding) encodeType; +/** + * 移除不必要字符 \ / : " < > . + */ ++(NSString *)removeUnnecessaryPunctuationCharactersWithString:(NSString *)textString; + +/** + * 名字移除目标字符 + * @param pattern 目标需要移除的字符 + * NSString *pattern = @"[/:*?\"<>|]"; + * @param textString 源字符串 + */ ++(NSString *)removeCharacters:(NSString*)pattern WithString:(NSString *)textString; + +/** + * 大文件传输,长短文件名 + */ ++(NSData*)stringBigFile:(NSString*)name withFileNameIndex:(int)fileNameIndex; + +/** + * 去除特殊字符串 + */ ++(NSString*)removeSpecialStrings:(NSString*)name; +/** + * 返回时间戳(单位:秒) + */ ++(long)dateCurrent; + + +/// 把data变成LTV格式 +/// @param type 类型 +/// @param data 数据 ++(NSData *)beLtv:(uint8_t)type Data:(NSData*)data; + + + +@end + +@interface JL_Timer : NSObject +@property(nonatomic,assign)NSInteger subTimeout; //超时时间(默认5s) +@property(nonatomic,assign)NSTimeInterval subScale; //默认1.0s +-(void)waitForTimeoutResult:(JL_Timer_BK)result; +-(void)continueTimeout; +-(void)cancelTimeout; +-(void)threadWait; +-(void)threadContinue; +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_TwsManager.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_TwsManager.h new file mode 100644 index 000000000..d3f8cf977 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_TwsManager.h @@ -0,0 +1,367 @@ +// +// JL_TwsManager.h +// JL_BLEKit +// +// Created by 凌煊峰 on 2021/12/17. +// Modify by EzioChan on 2023/08/18 +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import +#import +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +//MARK: - 耳机电量 +/// 耳机电量 +/// TWS earphones Electricity +@interface TwsElectricity:NSObject +/// 左耳充电中 +@property(nonatomic,assign) BOOL isChargingLeft; + +/// 右耳充电中 +@property(nonatomic,assign) BOOL isChargingRight; + +/// 充电仓正在充电中 +@property(nonatomic,assign) BOOL isChargingCenter; + +/// 左耳电量 +@property(nonatomic,assign) int powerLeft; + +/// 右耳电量 +@property(nonatomic,assign) int powerRight; + +/// 充电舱电量 +@property(nonatomic,assign) int powerCenter; + +@end + + + +//MARK: - TWS 控制类 +/// TWS 管理者 +@interface JL_TwsManager : JL_FunctionBaseManager + +/// 扩展功能支持 +@property(nonatomic,strong,readonly)JLTwsSupportFuncs *supports; + +///耳机电量 +///TWS earphones Electricity +@property (nonatomic,strong)TwsElectricity *electricity; + +/// 设备名称 +@property (nonatomic,strong)NSString *edrName; + +/// 按键功能设置 +@property (nonatomic,strong)NSArray *keySettings; + +/// 灯光场景类型 +@property (nonatomic,assign)int ledScen; + +/// 灯光效果类型 +@property (nonatomic,assign)int ledEffect; + +/// 设备麦克风channel +/// 若为空或者0则视为此功能不支持 +/// 1:自动切换 +/// 2:始终左耳 +/// 3:始终右耳 +@property (nonatomic,assign)int micMode; + +/// 工作模式 +/// 若为空或者0则视为此功能不支持 +/// 1:普通模式 +/// 2:游戏模式 +@property (nonatomic,assign)int workMode; + +/// 供应商ID +@property (nonatomic,assign)uint16_t vid; + +/// 厂商ID +@property (nonatomic,assign)uint16_t uid; + +/// 产品ID +@property (nonatomic,assign)uint16_t pid; + +/// 连接时长 +@property (nonatomic,assign)uint32_t linkTime; + +/// 入耳检测 +/// 0 -- 不支持此功能 +/// 1 -- 关闭 +/// 2 -- 打开 +@property (nonatomic,assign)uint8_t earEntryDection; + +/// 设备语言类型 +/// zh -- 中文 +/// en -- 英文 +@property (nonatomic,strong)NSString *deviceLanguage; + +///ANC的模式数组 +@property (nonatomic,strong)NSArray *ancModels; + +/// HeadSetInfoDict +/// 耳机信息字典 +/// 当app端收到设备返回的信息时会更新此值 +/// 此值变化较大不适合作为唯一判断依据,容易发生部分值获取失败的问题 +@property (nonatomic,strong)NSDictionary *_Nullable headSetInfoDict; + + +/// 一拖二开关状态 +@property(nonatomic,readonly,assign)BOOL dragWithMore; + + + +/// 设置设备名称 +/// - Parameter name: 设置对耳设备的EDR名字 +-(void)cmdHeadsetEdrName:(NSData*)name; + +#pragma mark ---> 按键设置(对耳) +typedef NS_ENUM(UInt8, JL_HeadsetButtonSettingKey) { + JL_HeadsetButtonSettingKeyOnlyLeftEar = 0x01, //左耳 + JL_HeadsetButtonSettingKeyOnlyRightEar = 0x02, //右耳 +}; +typedef NS_ENUM(UInt8, JL_HeadsetButtonSettingAction) { + JL_HeadsetButtonSettingActionClick = 0x01, //单击 + JL_HeadsetButtonSettingActionDoubleClick = 0x02, //双击 +}; +typedef NS_ENUM(UInt8, JL_HeadsetButtonSettingFunction) { + JL_HeadsetButtonSettingFunctionNone = 0x00, //无作用 + JL_HeadsetButtonSettingFunctionBoot = 0x01, //开机 + JL_HeadsetButtonSettingFunctionTurnOff = 0x02, //关机 + JL_HeadsetButtonSettingFunctionPlayPrevious = 0x03, //上一曲 + JL_HeadsetButtonSettingFunctionPlayNext = 0x04, //下一曲 + JL_HeadsetButtonSettingFunctionPlayOrPause = 0x05, //播放/暂停 + JL_HeadsetButtonSettingFunctionAnswerOrHangup = 0x06, //接听/挂断 + JL_HeadsetButtonSettingFunctionReject = 0x07, //拒听 + JL_HeadsetButtonSettingFunctionTakePhoto = 0x08, //拍照 +}; +/** + @param key 左耳0x01 右耳0x02 + @param act 单击0x01 双击0x02 + @param fuc 0x00 无作用 + 0x01 开机 + 0x02 关机 + 0x03 上一曲 + 0x04 下一曲 + 0x05 播放/暂停 + 0x06 接听/挂断 + 0x07 拒听 + 0x08 拍照 + */ +-(void)cmdHeadsetKeySettingKey:(uint8_t)key + Action:(uint8_t)act + Function:(uint8_t)fuc; + +#pragma mark ---> LED设置(对耳) + +typedef NS_ENUM(UInt8, JL_HeadsetScene) { + JL_HeadsetSceneNotPaired = 0x01, //未配对 + JL_HeadsetSceneDisConnected = 0x02, //未连接 + JL_HeadsetSceneConnected = 0x03, //已连接 + JL_HeadsetScenePlayDeviceMusic = 0x04, //播放设备音乐 + JL_HeadsetScenePauseDeviceMusic = 0x05, //暂停设备音乐 + JL_HeadsetScenePlayExternalAudioSource = 0x06, //外部音源播放 + JL_HeadsetScenePauseExternalAudioSource = 0x07, //外部音源暂停 +}; +typedef NS_ENUM(UInt8, JL_HeadsetLedEffect) { + JL_HeadsetLedEffectAllClose = 0x00, //全灭 + JL_HeadsetLedEffectRedLightOn = 0x01, //红灯常亮 + JL_HeadsetLedEffectBlueLightOn = 0x02, //蓝灯常亮 + JL_HeadsetLedEffectRedLightBreathing = 0x03, //红灯呼吸 + JL_HeadsetLedEffectBlueLightBreathing = 0x04, //蓝灯呼吸 + JL_HeadsetLedEffectRedBlueLightQuickFlash = 0x05, //红蓝交替快闪 + JL_HeadsetLedEffectRedBlueLightSlowFlash = 0x06, //红蓝交替慢闪 +}; +/** + @param scene 0x01 未配对 + 0x02 未连接 + 0x03 连接 + 0x04: 播放设备音乐 + 0x05:暂停设备音乐 + 0x06:外部音源播放 + 0x07:外部音源暂停 + @param effect 0x00 全灭 + 0x01 红灯常亮 + 0x02 蓝灯常亮 + 0x03 红灯呼吸 + 0x04 蓝灯呼吸 + 0x05 红蓝交替快闪 + 0x06 红蓝交替慢闪 + */ +-(void)cmdHeadsetLedSettingScene:(uint8_t)scene + Effect:(uint8_t)effect; + +#pragma mark ---> MIC设置(耳机) +typedef NS_ENUM(UInt8, JL_HeadsetMicSettingMode) { + JL_HeadsetMicSettingModeOnlyLeftEar = 0x00, //仅左耳 + JL_HeadsetMicSettingModeOnlyRightEar = 0x01, //仅右耳 + JL_HeadsetMicSettingModeAutomatic = 0x02, //自动选择 +}; +/** + @param mode JL_HeadsetMicSettingMode + */ +-(void)cmdHeadsetMicSettingMode:(JL_HeadsetMicSettingMode)mode + Result:(JL_CMD_RESPOND __nullable)result; + +#pragma mark ---> 工作模式(耳机) +typedef NS_ENUM(UInt8, JL_HeadsetWorkingMode) { + JL_HeadsetWorkingModeNormal = 0x01, //普通模式 + JL_HeadsetWorkingModeGame = 0x02, //游戏模式 +}; +/** + @param mode 1: 普通模式 + 2: 游戏模式 + */ +-(void)cmdHeadsetWorkSettingMode:(uint8_t)mode; + +#pragma mark ---> 同步时间戳(耳机) +/** + @param date 当前系统时间 +*/ +-(void)cmdHeadsetTimeSetting:(NSDate*)date; + +#pragma mark ---> 获取设备信息(耳机) +typedef void(^JL_HEADSET_BK)(NSDictionary* __nullable dict); +typedef NS_ENUM(uint32_t, JL_HeadsetAdviceFlag) { + JL_HeadsetAdviceFlagGetElectricity = 1, //小机电量获取 + JL_HeadsetAdviceFlagEdrName = 1 << 1, //Edr名称 + JL_HeadsetAdviceFlagButtonFunction = 1 << 2, //按键功能 + JL_HeadsetAdviceFlagLedStatus = 1 << 3, //LED显示状态 + JL_HeadsetAdviceFlagMicMode = 1 << 4, //MIC模式 + JL_HeadsetAdviceFlagWorkMode = 1 << 5, //工作模式 + JL_HeadsetAdviceFlagProductInfo = 1 << 6, //产品信息 + JL_HeadsetAdviceFlagConnectingTime = 1 << 7, //连接时间 + JL_HeadsetAdviceFlagEarDetection = 1 << 8, //入耳检测 + JL_HeadsetAdviceFlagLanguage = 1 << 9, //语言类型 + JL_HeadsetAdviceFlagAll = 0xFFFFFFFF //全部 +}; +/** + @param flag BIT0 小机电量获取 格式为3个字节 参考广播包格式 + BIT1 Edr 名称 + BIT2 按键功能 + BIT3 LED 显示状态 + BIT4 MIC 模式 + BIT5 工作模式 + BIT6 产品信息 + BIT7 连接时间 + BIT8 入耳检测 + BIT9 语言类型 + @param result 返回字典: + @"ISCHARGING_L" + @"ISCHARGING_R" + @"ISCHARGING_C" + @"POWER_L" + @"POWER_R" + @"POWER_C" + @"EDR_NAME" + @"KEY_LR" + @"KEY_ACTION" + @"KEY_FUNCTION" + @"LED_SCENE" + @"LED_EFFECT" + @"MIC_MODE" + @"WORK_MODE" + @"UID" + @"UID" + @"PID" + @"LINK_TIME" + @""IN_EAR_TEST" + @"DEVICE_LANGUAGE" + @"KEY_ANC_MODE" ANC的模式数组 + */ +-(void)cmdHeadsetGetAdvFlag:(JL_HeadsetAdviceFlag)flag + Result:(JL_HEADSET_BK __nullable)result; + +#pragma mark ---> 设备广播通知(耳机) +/** + @{@"JLID": 杰理ID, + @"UID": , + @"PID": , + @"EDR": , + @"SCENE": , + @"ISCHARGING_L": , + @"ISCHARGING_R": , + @"ISCHARGING_C": , + @"POWER_L": , + @"POWER_R": , + @"POWER_C": , + @"CHIP_TYPE": , + @"PROTOCOL_TYPE": , + @"SEQ":}; + */ +extern NSString *kJL_MANAGER_HEADSET_ADV; + +#pragma mark ---> 设置命令成功/错误回复(耳机) +/** + 0x00:成功 + 0x01:游戏模式导致设置失效 + 0x02:蓝牙名字长度超出限制 + 0x03:非蓝牙模式设置闪灯失败 + */ +extern NSString *kJL_MANAGER_HEADSET_SET_ERR; + +#pragma mark ---> 关闭或开启设备广播(耳机) +/** + @param enable 使能位 + */ +-(void)cmdHeadsetAdvEnable:(BOOL)enable; + +#pragma mark ---> 用于ADV设置同步后需要主机操作的行为。 +/** + 1:更新配置信息,需要重启生效。 + 2:同步时间戳 + 3:请求手机回连BLE + 4:同步设备信息 + */ +extern NSString *kJL_MANAGER_HEADSET_TIPS; + +#pragma mark ---> 发射频点 +/** +@param fmtx 频点 +*/ +-(void)cmdSetFMTX:(uint16_t)fmtx; + +#pragma mark ---> 设置耳机ANC模式列表 +/** + * 设置耳机ANC模式列表 + * @param array 频点 JL_AncMode的NSNumber对象数组 @[@(JL_AncMode_Normal), @(JL_AncMode_NoiseReduction)] + */ +-(void)cmdHeadsetAncArray:(NSArray*)array; + +#pragma mark ---> 耳机主动降噪ANC设置 +-(void)cmdSetANC:(JLModel_ANC*)model; + + + +//MARK: - 一拖二相关命令 + +typedef void(^JL_MulitLinksInfo_BK)(JL_CMDStatus status,NSArray * __nullable phoneInfos); + +/// 设备上传一拖二设备信息列表 +extern NSString* kJL_MULIT_NAME_LIST; + +/// 获取设备已连接手机名 +/// 通知设备上传一拖二设备信息列表 +/// @param result 设备所连接的手机名字列表 +-(void)cmdGetDeviceInfoListResult:(JL_MulitLinksInfo_BK)result; + +/// 通知设备一连上手机地址和绑定信息 +/// - Parameters: +/// - addr: 手机EDR地址 +/// - name: 手机蓝牙名称 +/// - result: 结果 +-(void)cmdBindDeviceInfo:(NSData *)addr phone:(NSString *)name result:(JL_MulitLinksInfo_BK)result; + +/// 一拖二开关 +/// @param dragWithMore 开关状态 +/// @param addr 手机的经典蓝牙地址(通过cmdGetDeviceInfoList 获取) +/// @param result 结果回调 +-(void)setDragWithMore:(BOOL)dragWithMore phoneBleAddr:(NSData *) addr result:(JL_CMD_RESPOND)result; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_TypeEnum.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_TypeEnum.h new file mode 100644 index 000000000..c231c9177 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_TypeEnum.h @@ -0,0 +1,83 @@ +// +// JL_TypeEnum.h +// JL_BLEKit +// +// Created by DFung on 2018/11/29. +// Copyright © 2018 www.zh-jieli.com. All rights reserved. +// + +#import +#import + +typedef NS_ENUM(NSInteger, JL_BLEStatus) { + JL_BLEStatusFound, //发现设备,对应 kUI_JL_BLE_FOUND + JL_BLEStatusPaired, //已配对, 对应 kUI_JL_BLE_PAIRED + JL_BLEStatusDisconnected, //断开连接,对应 kUI_JL_BLE_DISCONNECTED + JL_BLEStatusOn, //蓝牙开启,对应 kUI_JL_BLE_ON + JL_BLEStatusOff, //蓝牙关闭,对应 kUI_JL_BLE_OFF + JL_BLEStatusUnknown, //状态未知 +}; +typedef NS_ENUM(NSInteger, JL_DeviceBTStatus) { + JL_DeviceBTStatusDisconnected = 0, //设备经典蓝牙已断开 + JL_DeviceBTStatusConnected = 1, //设备经典蓝牙已连接 + JL_DeviceBTStatusUnknown, +}; +typedef NS_ENUM(UInt8, JL_CMDStatus) { + JL_CMDStatusSuccess = 0x00, //成功 + JL_CMDStatusFail = 0x01, //失败 + JL_CMDStatusUnknownCmd = 0x02, //未定义命令 + JL_CMDStatusBusy = 0x03, //忙碌 + JL_CMDStatusNoResponse = 0x04, //没有收到回复 + JL_CMDStatusCrcErr = 0x05, //CRC错误 + JL_CMDStatusDataCrcErr = 0x06, //数据CRC错误 + JL_CMDStatusParamErr = 0x07, //参数错误 + JL_CMDStatusOverLimit = 0x08, //数据溢出 + JL_CMDStatusLrcError = 0x09, //LRC获取出错 + JL_CMDStatusUnknown, +}; +typedef void(^JL_CMD_RESPOND)(JL_CMDStatus status, uint8_t sn, NSData* __nullable data); + +//---------------------------------------------------------// + +typedef NS_ENUM(UInt8,JLDevSpecialType) { + ///普通正常设备 + JLDevSpecialType_Normal = 0x00, + ///回连设备 + JLDevSpecialType_Reconnect = 0x01, +}; + +typedef NS_ENUM(int64_t,JL_CLASS) { + JL_CLASS_SmallFile = 0, + JL_CLASS_File = 1, + JL_CLASS_OTA = 2, + JL_CLASS_Flash = 3, + JL_CLASS_ChargingBin = 4, + JL_CLASS_AlarmClock = 5, + JL_CLASS_Light = 6, + JL_CLASS_Tws = 7, + JL_CLASS_SoundCard = 8, + JL_CLASS_Call = 9, + JL_CLASS_Speex = 10, + JL_CLASS_Lrc = 11, + JL_CLASS_FindDevice = 12, + JL_CLASS_MusicControl = 13, + JL_CLASS_Fm = 14, + JL_CLASS_SystemEQ = 15, + JL_CLASS_SystemTime = 16, + JL_CLASS_SystemVolume = 17, + JL_CLASS_Custom = 18, + JL_CLASS_Batch = 19, + JL_CLASS_DeviceLogs = 20, + JL_CLASS_BigData = 21, +}; + +//---------------------------------------------------------// + + +///命令发起者 +typedef NS_ENUM(UInt8, JLCMDOriginator) { + ///SDK端发起 + JLCMDOriginatorApp = 0x00, + ///设备端发起 + JLCMDOriginatorDevice = 0x01 +}; diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_WatchProtocol.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_WatchProtocol.h new file mode 100644 index 000000000..7dec3d76b --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_WatchProtocol.h @@ -0,0 +1,126 @@ +// +// JL_WatchProtocolDelegate.h +// JL_BLEKit +// +// Created by EzioChan on 2021/8/11. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import +#import "JL_SDM_Header.h" + + +NS_ASSUME_NONNULL_BEGIN + +@protocol JL_WatchProtocol + +@optional +/// 设备回调心率相关内容 +/// @param heartRate 心率对象 +-(void)jlWatchHeartRate:(JL_SDM_HeartRate *)heartRate; + +/// 设备回调大气压强相关内容 +/// @param airPressure 气压对象 +-(void)jlWatchAirPressure:(JL_SDM_AirPressure *)airPressure; + +/// 设备回调海拔高度相关内容 +/// @param alititude 海拔对象 +-(void)jlWatchAltitude:(JL_SDM_Altitude *)alititude; + +/// 设备回调步数相关内容 +/// @param moveStep 步数对象 +-(void)jlWatchMoveSteps:(JL_SDM_MoveSteps *)moveStep; + +/// 设备回调压力相关内容 +/// @param stress 压力对象 +-(void)jlWatchStress:(JL_SDM_Stress *)stress; + +/// 设备回调血氧饱和度相关内容 +/// @param oxStaturation 血氧饱和度对象 +-(void)jlWatchOxsaturation:(JL_SDM_OxSaturation*)oxStaturation; + +/// 设备回调训练负荷相关内容 +/// @param trainLoad 训练负荷对象 +-(void)jlWatchTrainLoad:(JL_SDM_TrainLoad *)trainLoad; + +/// 设备回调最大摄氧量相关内容 +/// @param maxOxg 最大摄氧量对象 +-(void)jlWatchMaxOxg:(JL_SDM_MaxOxg *)maxOxg; + +/// 设备回调运动恢复时间相关内容 +/// @param rectime 运动恢复时间对象 +-(void)jlWatchRecTime:(JL_SDM_RecTime *)rectime; + +/// 设备回调运动数据的相关内容 +/// @param sportMsg 运动数据对象 +-(void)jlWatchSportMessage:(JL_SDM_SportMessage *)sportMsg; + + +/// 设备回调无法区分的数据内容 +/// @param value 数据区域,根据类型解析数据 +/// @param submask 对应查询的参数,描述功能类型,作用域 +/// @param type 数据类型 +-(void)jlWatchUnDefineData:(NSData *)value subMask:(NSData *)submask Type:(UInt8)type; + +/// 设备回调传感器相关数据 +/// @param type 数据类型 +/// @param data 数据内容 +-(void)jlWatchWatchLog:(JL_WATCH_LOG_TYPE) type with:(NSData *)data; + +//MARK: - 健康设置回调 + +/// 接收整个设置返回的数组 +/// @param models JLwSettingModels +-(void)jlWatchSetAllFunc:(NSArray *)models; + +/// 回调传感器相关设置 +/// @param model 传感器功能 +-(void)jlWatchSetSensorFunc:(JLSensorFuncModel *)model; + +/// 久坐提醒 +/// @param model 久坐提醒功能 +-(void)jlWatchSetSedentaryRmd:(JLSedentaryRmdModel *)model; + +/// 心率测量功能 +/// @param model 心率模块 +-(void)jlWatchSetConsequentHeartRate:(JLConsequentHeartRateModel *)model; + +/// 运动心率测试功能 +/// @param model 运动心率 +-(void)jlWatchSetExerciseHeartRateRemind:(JLExerciseHeartRateRemindModel *)model; + +/// 自动压力测试 +/// @param model 压力测试 +-(void)jlWatchSetAutoPressure:(JLAutoPressureModel *)model; + +/// 睡眠监测 +/// @param model 睡眠 +-(void)jlWatchSetSleepMonitor:(JLSleepMonitorModel *)model; + +/// 跌到监测 +/// @param model 跌倒监测 +-(void)jlWatchSetFallDetectionModel:(JLFallDetectionModel *)model; + +/// 抬腕监测 +/// @param model 抬腕监测 +-(void)jlWatchSetWristLiftDetectionModel:(JLWristLiftDetectionModel *)model; + +/// 个人信息 +/// @param model 个人信息 +-(void)jlWatchSetPersonInfoModel:(JLPersonInfoModel *)model; + +/// 蓝牙断开设置 +/// @param model 断开设置 +-(void)jlWatchSetDisconnectRemindModel:(JLDisconnectRemindModel *)model; + +/// 紧急联系人 +/// @param model 紧急联系人设置 +-(void)jlWatchSetEmergencyContactModel:(JLEmergencyContactModel *)model; + +/// 血氧测量 +/// @param model 血氧测量模式 +-(void)jlWatchSetOxygenSturationRemindModel:(JLOxygenSturationRemindModel *)model; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_WatchSyncProtocol.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_WatchSyncProtocol.h new file mode 100644 index 000000000..132a29179 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_WatchSyncProtocol.h @@ -0,0 +1,47 @@ +// +// JL_WatchSyncProtocol.h +// JL_BLEKit +// +// Created by EzioChan on 2021/10/27. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// +#import +#import "JL_SDM_Header.h" +#import "JL_EntityM.h" + +#ifndef JL_WatchSyncProtocol_h +#define JL_WatchSyncProtocol_h + +@protocol JLWearSyncProtocol + +@optional +/// 运动信息返回 +/// @param model 运动信息对象 +/// @param entity 设备entity +-(void)jlWearSyncSportInfo:(JLWearSyncInfoModel *_Nonnull)model With:(JL_EntityM *_Nonnull)entity; + +/// 结束运动返回内容 +/// @param model 结束时间相隔信息对象 +/// @param entity 设备entity +-(void)jlWearSyncStopMotion:(JLWearSyncFinishModel *_Nonnull)model With:(JL_EntityM *_Nonnull)entity; + +/// 开始运动返回消息 +/// @param entity 设备entity +-(void)jlWearSyncStartMotionWith:(JL_EntityM *_Nonnull)entity; + +/// 暂停运动 +/// @param entity 设备entity +-(void)jlWearSyncStatusPauseWith:(JL_EntityM *_Nonnull)entity; + +/// 继续运动 +/// @param entity 设备entity +-(void)jlWearSyncStatusContiuneWith:(JL_EntityM *_Nonnull)entity; + +/// 实时数据回调 +/// @param model 实时数据模型 +/// @param entity 设备entity +-(void)jlWearSyncRealTimeData:(JLWearSyncRealTimeModel *_Nonnull)model With:(JL_EntityM *_Nonnull)entity; + +@end + +#endif /* JL_WatchSyncProtocol_h */ diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_vad.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_vad.h new file mode 100644 index 000000000..9b8719250 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JL_vad.h @@ -0,0 +1,144 @@ +// +// JL_vad.h +// Test +// +// Created by DFung on 2018/2/28. +// Copyright © 2018年 DFung. All rights reserved. +// + +#ifndef JL_vad_h +#define JL_vad_h + + + +#define CONT_AD_ADFRMSIZE 16 +#define DEFAULT_RADIX 12 +#define SMOOTH_WINDOW 4 +#define MIN_FIXLOG -2829416 +#define KWSNUM 1 //¥˝ ∂±¥ ∏ˆ ˝ + + +//typedef long long __int64; +typedef int int32; +typedef short int16; +typedef signed char int8; +typedef unsigned int uint32; +typedef unsigned short uint16; +typedef unsigned char uint8; +typedef long long int64; +typedef int32 fixed32; +typedef float float32; + + + + +struct noise_stats_s { + /* Smoothed power */ + int power[40]; + int max_power[40]; + /* Noise estimate */ + int noise[40]; + int max_noise[40]; + /* Signal floor estimate */ + int floor[40]; + int max_floor[40]; + /* Peak for temporal masking */ + int peak[40]; + int max_peak[40]; + + int signal[40]; + int gain[40]; + char remove_noi; + /* Initialize it next time */ + uint8 undefined; + /* Number of items to process */ + uint32 num_filters; + + /* Sum of slow peaks for VAD */ + int64 slow_peak_sum; + int64 max_slow_peak_sum; + + /* Precomputed constants */ + int lambda_power; + int comp_lambda_power; + int lambda_a; + int comp_lambda_a; + int lambda_b; + int comp_lambda_b; + int lambda_t; + int mu_t; + int max_gain; + int inv_max_gain; + + int smooth_scaling[2 * 4 + 3]; +}; +typedef struct noise_stats_s noise_stats_t; +struct htk_fe_s +{ + unsigned short pow_hist[98]; + noise_stats_t *noise_stats; + + + int fe_prior; + uint32 int_frame; + char int_flag; + + + unsigned char sum_cnt; + + uint8 voice_state; + uint8 in_speech; + int16 pre_speech_frames; + int16 post_speech_frames; + + int16 inout_spch[410]; + int fe_tmp_spch[250]; + int fe_fft_buf[512]; + int fe_mfspec[40]; + int cmn_sum[13]; + int mfcc_fifo[9][13]; + int *cmn_mfcc_fifo[9]; + //int fe_prior; + char speech_fifo[16]; + char init_speech_n; + char vad_cnt; + int buf_cep[21][13]; + int buf_pow[21]; + uint8 speech_indexw; + uint8 speech_indexr; + uint8 speech_cnt; + + + int16 sp_threshold; + int16 nsp_threshold; +}; + +typedef struct htk_fe_s htk_fe_t; +/* + * How to use? See follow... + * + * 1、开启录音前: + * /--- 开启Vad ---/ + * int need_buf_size = vad_get_need_buf_size(); + * vad_hdl = malloc(need_buf_size); + * vad_init(vad_hdl, 10, 51); + * + * 2、结束录音后: + * /--- 关闭Vad ---/ + * free(vad_hdl); + * + * 3、录音数据回调: + * buf:录音数据 ,需要320Bytes! + * ret:0->静音状态 1->正在说话 2->结束说话 + * int ret = vad_main(vad_hdl, (int*)buf); + */ +int vad_get_need_buf_size(void); +int vad_init(void *p, short sp_threshold, short nsp_threshold); +int vad_main(void *p,int *inout_spch); + +fixed32 fe_log_add(fixed32 x, fixed32 y); +fixed32 fe_log_sub(fixed32 x, fixed32 y); +int32 fixlog2(uint32 x); +int fixlog(uint32 x); + +#endif /* JL_vad_h */ diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLeSimManager.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLeSimManager.h new file mode 100644 index 000000000..0d1f4e10d --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLeSimManager.h @@ -0,0 +1,41 @@ +// +// JLeSimManager.h +// JL_BLEKit +// +// Created by EzioChan on 2023/12/4. +// Copyright © 2023 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@class JL_ManagerM; + +@protocol JLEsimFinishDelegate + +/// 设备推送esim 信息内容 +/// - Parameters: +/// - version: 版本 +/// - data: 内容 +-(void)jlEsimDidGetData:(uint8_t)version ESimData:(NSData *)data; + +@end + +typedef void(^JLESimFinishBlock)(NSError * _Nullable err); + +/// esim 信息交互类 +@interface JLeSimManager : NSObject + +@property(nonatomic,assign)id delegate; + +/// 下发 esim 信息到设备 +/// - Parameters: +/// - mgr: 设备 +/// - data: esim 信息 +/// - block: 完成回调 +-(void)sendToDev:(JL_ManagerM *)mgr Data:(NSData *)data Result:(JLESimFinishBlock)block; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLwSettingModel.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLwSettingModel.h new file mode 100644 index 000000000..17be0dc71 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/JLwSettingModel.h @@ -0,0 +1,104 @@ +// +// LtvSettingModel.h +// JL_BLEKit +// +// Created by EzioChan on 2021/10/12. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import + + +typedef NS_ENUM(UInt8, WatchSettingFunc) { + ///传感器功能 + WatchSettingFunc_SensorFunction = 0x01 , + ///久坐提醒 + WatchSettingFunc_SedentaryReminder = 0x02, + ///连续测量心率 + WatchSettingFunc_ContinuousHeartRateMeasurement = 0x03, + ///运动心率提醒 + WatchSettingFunc_ExerciseHeartRateReminder = 0x04, + ///压力自动检测 + WatchSettingFunc_AutomaticPressureDetection = 0x05, + ///睡眠检测 + WatchSettingFunc_SleepMonitoring = 0x06, + ///跌倒检测 + WatchSettingFunc_FallDetection = 0x07, + ///抬腕检测 + WatchSettingFunc_WristLiftDetection = 0x08, + ///个人信息 + WatchSettingFunc_PersonInfo = 0x09, + /// 蓝牙断开提醒 + WatchSettingFunc_DisconnectReminder = 0xA, + /// 血氧测量提醒 + WatchSettingFunc_OxygenSturation = 0x0B, + /// 紧急联系人 + WatchSettingFunc_EmergencyContact = 0x0C +}; + +///提醒模式 +typedef NS_ENUM(UInt8, WatchRemindType) { + /// 亮屏 + WatchRemind_BrightScreen = 0x00, + ///震动 + WatchRemind_Shake = 0x01, + /// 打电话(抬腕不支持该提示) + WatchRemind_Call = 0x02 +}; + +///连续测量心率模式 +typedef NS_ENUM(UInt8, WatchConsequentType) { + //智能 + WatchConsequent_Intelligent = 0x00, + //实时 + WatchConsequent_realTime = 0x01 +}; + +/// 连续血氧测量模式 +typedef NS_ENUM(UInt8,WatchOxygenMsmType){ + //智能 + WatchOxygenMsm_Intelligent = 0x00, + //定时 + WatchOxygenMsm_runTime = 0x01 +}; + +///监察开关类型 +typedef NS_ENUM(UInt8, WatchSwitchType) { + ///关闭 + WatchSwitchType_Close = 0x00, + ///全天开启 + WatchSwitchType_AllDay = 0x01, + ///自定义时间 + WatchSwitchType_Customer = 0x02, +}; + +@interface WatchTimer : NSObject +/// 时 +@property(nonatomic,assign,readonly)UInt8 hour; +/// 分 +@property(nonatomic,assign,readonly)UInt8 min; + +-(instancetype _Nonnull)initWithData:(NSData *_Nonnull)data; + +-(instancetype _Nonnull)initWith:(uint8_t)h Min:(uint8_t)m; + +@end + +NS_ASSUME_NONNULL_BEGIN + +@interface JLwSettingModel : NSObject +@property(nonatomic,assign)uint8_t length; +@property(nonatomic,assign)WatchSettingFunc type; +@property(nonatomic,strong)NSData *value; + +/// 设备UUID +@property(nonatomic,strong)NSString *deviceID; + + +-(NSData *)beData; + + + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/NSData+ToUnit.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/NSData+ToUnit.h new file mode 100644 index 000000000..ec6140e85 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/NSData+ToUnit.h @@ -0,0 +1,64 @@ +// +// NSData+ToUnit.h +// JL_BLEKit +// +// Created by EzioChan on 2021/4/7. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface NSData (ToUnit) + + +-(BOOL)beBool; + +-(uint8_t)beUint8; + +-(UInt16)beLittleUint16; + +-(UInt16)beBigendUint16; + +-(UInt32)beLittleUint32; + +-(UInt32)beBigendUint32; + +-(UInt64)beLittleUint64; + +-(UInt64)beBigendUint64; + +-(NSString *)dataToAltitude; + +-(NSString *)beHexStr; + +-(NSDate *)toDate; + +/// 裁剪Data +/// @param from 开始 +/// @param to 长度 +-(NSData *)subf:(NSInteger)from t:(NSInteger)to; + +-(uint16_t)crc:(uint16_t)baseCrc; + +@end + + +@interface NSMutableData(WithUnit) + +-(void)appendUint8:(uint8_t)k; + +-(void)appendUint16:(uint16_t)k; + +-(void)appendUint32:(uint32_t)k; +@end + + +@interface NSString(WithUnit) + +-(NSString *)formatLog; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/NSObject+JLTools.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/NSObject+JLTools.h new file mode 100644 index 000000000..68deb4ed1 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/NSObject+JLTools.h @@ -0,0 +1,20 @@ +// +// NSObject+JLTools.h +// JL_BLEKit +// +// Created by EzioChan on 2023/8/17. +// Copyright © 2023 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface NSObject (JLTools) + + +- (NSString *) logProperties; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/NfcModel.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/NfcModel.h new file mode 100644 index 000000000..eee6a69fc --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/NfcModel.h @@ -0,0 +1,69 @@ +// +// NfcModel.h +// JL_BLEKit +// +// Created by EzioChan on 2021/8/3. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + + +@interface NfcModel : NSObject + +/// NFC标签 +@property(nonatomic,assign)UInt16 idCard; + +/// 保留位 +@property(nonatomic,strong)NSData *reserver; + +/// 设备索引 +@property(nonatomic,strong)NSData *devHandler; + +/// 更新时间戳,用于排序 +@property(nonatomic,strong)NSDate *updateTime; + +/// nfc数据文件名,格式如下:XX.nfc,XX是0~9 +@property(nonatomic,strong)NSString *nfcFileName; + +/// 别名,最大字符长度为26, 不足部分补‘\0’ 编码格式:UTF-8(以后可以保留位决定) 例如:公司门禁卡,家里门禁等等 +@property(nonatomic,strong)NSString *nickName; + +/// 可变字段长度,包含crc + nfc_id +@property(nonatomic,assign)UInt16 variableLength; + +/// NFC 数据的CRC +@property(nonatomic,strong)NSData *crc; + +/// nfc数据的唯一值 +@property(nonatomic,strong)NSData *nfc_id; + + ++(NfcModel *)initMsgModel:(NSData *)data; + +/// 解析NFC头部数据 +/// @param basicData 裸数据 ++(NSArray *)initMSGModels:(NSData *)basicData; + +@end + +NS_ASSUME_NONNULL_END + + + + + +@interface NfcFileModel : NfcModel + +/// NFC 数据 +@property(nonatomic,strong)NSData * _Nonnull nfcData; +@property(nonatomic,assign,readonly)UInt32 length; ++(NfcFileModel *_Nonnull)initFileModel:(NSData *_Nonnull)data; + +@end + + + + diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/RTC_RingInfo.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/RTC_RingInfo.h new file mode 100644 index 000000000..f995c1a9e --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Headers/RTC_RingInfo.h @@ -0,0 +1,39 @@ +// +// RTC_RingInfo.h +// JL_BLEKit +// +// Created by 杰理科技 on 2021/10/15. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +/// 闹铃信息 +@interface RTC_RingInfo : NSObject + +/// 铃声类型 +/// 0x00 设备默认 +/// 0x01 多媒体选取 +@property (assign,nonatomic) uint8_t type; + +/// 设备索引 +/// 当type = 0时,dev保留 +/// 当type = 1时,dev为选取的设备 +@property (assign,nonatomic) uint8_t dev; + +/// 闹铃文件簇号 +/// 当type = 0时,clust 为对应 JLModel_Ring 的 index +/// 当type = 1时,clust为选取的闹铃文件簇号 +@property (assign,nonatomic) uint32_t clust; + +/// 铃声名称长度 +@property (assign,nonatomic) uint8_t len; + +/// 铃声名称 +@property (strong,nonatomic) NSData *data; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Info.plist b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Info.plist new file mode 100644 index 000000000..038f93f66 Binary files /dev/null and b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Info.plist differ diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/JL_BLEKit b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/JL_BLEKit new file mode 100755 index 000000000..3bebb0940 Binary files /dev/null and b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/JL_BLEKit differ diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Modules/module.modulemap b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Modules/module.modulemap new file mode 100644 index 000000000..ee22d27e6 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64/JL_BLEKit.framework/Modules/module.modulemap @@ -0,0 +1,6 @@ +framework module JL_BLEKit { + umbrella header "JL_BLEKit.h" + export * + + module * { export * } +} diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/ECBDTManager.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/ECBDTManager.h new file mode 100644 index 000000000..7dca27218 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/ECBDTManager.h @@ -0,0 +1,120 @@ +// +// ECBDTManager.h +// JL_BLEKit +// +// Created by EzioChan on 2023/11/20. +// Copyright © 2023 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@class JL_ManagerM; + +@protocol ECBDTManagerProtocol + +/// 大数据传输错误 +/// - Parameters: +/// - manager: 设备 +/// - type: 类型 +/// - error: 错误 +-(void)ecBDTManagerError:(JL_ManagerM *)manager Type:(uint8_t) type Error:(NSError *)error; + +/// 获取到设备端推送/ SDK 端读取的大数据内容 +/// - Parameters: +/// - manager: 设备 +/// - type: 类型 +/// - data: 数据块 +/// - progress: 进度 +-(void)ecBDTManager:(JL_ManagerM *)manager Type:(uint8_t) type GetBigData:(NSData *)data Progress:(float) progress; + +/// 获取到设备端推送/ SDK 端读取的大数据内容 结束 +/// - Parameters: +/// - manager: 设备 +/// - type: 类型 +/// - saveFilePath: 数据存放位置 +-(void)ecBDTManager:(JL_ManagerM *)manager Type:(uint8_t) type FinishBigData:(NSString *)saveFilePath; + + +@optional + +/// App 端主动发起的向写入数据进度 +/// - Parameters: +/// - manager: 设备 +/// - progress: 数据 +/// - finish: 是否完成 +-(void)ecBDTManager:(JL_ManagerM *)manager SendBigDataPresent:(float )progress Finish:(BOOL)finish; + +/// 设备端发起大数据写操作 +/// 设备端主动发起的向 App 端写入数据 +/// - Parameters: +/// - manager: 设备 +/// - type: 类型 +/// - req: 请求写入的内容 +-(void)ecBDTManager:(JL_ManagerM *)manager StartBigData:(ECBDTWriteReq *)req Type:(uint8_t) type; + + +/// 设备端发起大数据读取操作 +/// 开发者在这里需要对设备主动过来请求的内容进行回复 +/// -(void)responseDev:(JL_ManagerM *)manager resp:(ECBDTReadReq *)req Data:(NSData *)data +/// - Parameters: +/// - manager: 设备 +/// - type: 类型 +/// - req: 请求内容 +-(void)ecBDTManager:(JL_ManagerM *)manager ReadBigData:(ECBDTReadReq *)req Type:(uint8_t) type; + +/// 发送大数据完毕 +/// - Parameter manager: 设备 +/// - Parameter type: 类型 +-(void)ecBDTManagerSendFinish:(JL_ManagerM *)manager Type:(uint8_t) type; + +@end + +@interface ECBDTManager : ECOneToMorePtl + ++(instancetype)share; + +/// APP 读取设备数据 +/// - Parameters: +/// - manager: 设备 +/// - type: 数据类型 +/// * 0 :原始数据 +/// * 1 : 阿里云数据 +/// * 2:RTC数据 +/// * 3:AI云 +/// * 4:TTS语音合成 +/// * 5:平台接口认证信息 +/// * 6:esim 卡信息 +/// * 7:4G 模块升级数据 +/// * 8:提示音文件数据 +-(void)readData:(JL_ManagerM *)manager Type:(uint8_t)type; + +/// APP 写入设备数据 +/// - Parameters: +/// - manager: 设备 +/// - type: 数据类型 +/// * 0 :原始数据 +/// * 1 : 阿里云数据 +/// * 2:RTC数据 +/// * 3:AI云 +/// * 4:TTS语音合成 +/// * 5:平台接口认证信息 +/// * 6:esim 卡信息 +/// * 7:4G 模块升级数据 +/// * 8:提示音文件数据 +/// - data: 大数据内容 +-(void)writeData:(JL_ManagerM *)manager Type:(uint8_t) type Data:(NSData*)data; + +/// 回应设备主动读取内容 +/// 此方法需要配合使用 +/// -(void)ecBDTManager:(JL_ManagerM *)manager ReadBigData:(ECBDTReadReq *)req +/// - Parameters: +/// - manager: 设备 +/// - req: 设备端请求的对象 +/// - data: 需要下发的数据内容 +-(void)responseDev:(JL_ManagerM *)manager resp:(ECBDTReadReq *)req Data:(NSData *)data; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/ECBDTObjc.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/ECBDTObjc.h new file mode 100644 index 000000000..9416bee60 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/ECBDTObjc.h @@ -0,0 +1,166 @@ +// +// ECBDTObjc.h +// JL_BLEKit +// +// Created by EzioChan on 2023/11/21. +// Copyright © 2023 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface ECBDTObjc : NSObject + +@end + +/// 设备传输参数回复数据 +@interface ECBDTBasic : NSObject +/// 操作类型 +/// 0:设备传输参数 +/// 1:传输数据 +@property (nonatomic, assign) uint8_t op; + +/// 方式 +/// 0:读取数据 +/// 1:发送数据 +@property (nonatomic, assign) uint8_t way; + +/// 数据类型 +/// * 0 :原始数据 +/// * 1 : 阿里云数据 +/// * 2:RTC数据 +/// * 3:AI云 +/// * 4:TTS语音合成 +/// * 5:平台接口认证信息 +/// * 6:esim 卡信息 +/// * 7:4G 模块升级数据 +@property (nonatomic, assign) uint8_t type; + +/// 版本 +@property (nonatomic, assign) uint8_t version; + +/// 数据 +@property (nonatomic, copy)NSData *paramData; + +-(instancetype)initData:(NSData *)data; + +@end + + +//MARK: - 回复大数据数据解析(设备回复) + +/// 设备传输参数(读取回复) +@interface ECBDTReadResp : ECBDTBasic +/// 结果码 +@property (nonatomic, assign) uint8_t result; + +/// 数据长度 +@property (nonatomic, assign) uint32_t dtLen; + +/// 数据总 CRC +@property (nonatomic, assign) uint16_t crc; + +/// 发送 MTU 协商值 +@property (nonatomic, assign) uint16_t sendMtu; + +/// 接收 MTU 协商值 +@property (nonatomic, assign) uint16_t receiveMtu; + +@end + +/// 设备传输参数(发送回复) +@interface ECBDTWriteResp : ECBDTBasic +/// 结果码 +@property (nonatomic, assign) uint8_t result; + +/// 发送 MTU 协商值 +@property (nonatomic, assign) uint16_t sendMtu; + +/// 接收 MTU 协商值 +@property (nonatomic, assign) uint16_t receiveMtu; + +@end + +//MARK: - 请求大数据数据解析(设备请求) + +/// 设备传输参数(读取请求) +@interface ECBDTReadReq: ECBDTBasic + +/// 发送 MTU 协商值 +@property (nonatomic, assign) uint16_t sendMtu; + +/// 接收 MTU 协商值 +@property (nonatomic, assign) uint16_t receiveMtu; + +@end + + +/// 设备传输参数(发送请求) +@interface ECBDTWriteReq : ECBDTBasic + +/// 数据长度 +@property (nonatomic, assign) uint32_t dtLen; + +/// 数据总 CRC +@property (nonatomic, assign) uint16_t crc; + +/// 发送 MTU 协商值 +@property (nonatomic, assign) uint16_t sendMtu; + +/// 接收 MTU 协商值 +@property (nonatomic, assign) uint16_t receiveMtu; + +@end + + +//传输数据命令参数 +@interface ECBDTCmdData : NSObject +/// 数据类型 +/// * 0 :原始数据 +/// * 1 : 阿里云数据 +/// * 2:RTC数据 +/// * 3:AI云 +/// * 4:TTS语音合成 +/// * 5:平台接口认证信息 +/// * 6:esim 卡信息 +/// * 7:4G 模块升级数据 +@property (nonatomic, assign) uint8_t type; + + +/// 标识位 +/// YES:结束 +/// NO:继续 +@property (nonatomic, assign) BOOL isEnd; + +///序号 +@property (nonatomic, assign) uint32_t seq; + +/// crc +@property (nonatomic, assign) uint16_t crc; + +/// 数据偏移 +@property (nonatomic, assign) uint32_t offset; + +/// 数据长度 +@property (nonatomic, assign) uint16_t len; + +/// 数据 +@property (nonatomic, copy)NSData *data; + + +-(instancetype)initData:(NSData *)data; + +-(NSData *)beData; + +/// 切块分包数据 +/// - Parameters: +/// - mtu: 发送的 mtu +/// - type: 数据类型 +/// - dt: 文件数据 ++(NSArray*)makeWithMtu:(uint16_t)mtu Type:(uint8_t) type Data:(NSData *)dt; + +@end + + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/ECOneToMorePtl.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/ECOneToMorePtl.h new file mode 100644 index 000000000..e88639a89 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/ECOneToMorePtl.h @@ -0,0 +1,28 @@ +// +// ECOneToMorePtl.h +// JL_BLEKit +// +// Created by EzioChan on 2021/10/27. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import +#import "NSData+ToUnit.h" +#import "JL_ManagerM.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface ECOneToMorePtl : NSObject + +@property(nonatomic,strong,readonly)NSHashTable *delegates; +@property(nonatomic,strong)NSLock *delegateLock; + +-(void)addDelegate:(id)delegate; +-(void)removeDelegate:(id)delegate; +-(void)removeAll; +-(void)inputPKG:(JL_PKG*)pkg; +-(void)inputPKG:(JL_PKG *)pkg Manager:(JL_ManagerM *)mgr; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/ECThreadHelper.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/ECThreadHelper.h new file mode 100644 index 000000000..a648b9649 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/ECThreadHelper.h @@ -0,0 +1,41 @@ +// +// ECThreadHelper.h +// JL_BLEKit +// +// Created by EzioChan on 2023/11/20. +// Copyright © 2023 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@protocol ECThreadHelperPtl + +-(void)startAction:(id)objc; +-(void)finishThreadTaskAction; + +@end + +typedef void(^EcThreadAction)(id objc); + +@interface ECThreadHelper : NSObject + + +@property (nonatomic, weak) id delegate; + +@property (nonatomic, copy) EcThreadAction action; + ++(instancetype)share; + +-(instancetype)init; + +-(void)addTask:(id)any; + +-(void)nextTask; + +-(void)clean; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL4GUpgradeManager.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL4GUpgradeManager.h new file mode 100644 index 000000000..be3e20abf --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL4GUpgradeManager.h @@ -0,0 +1,82 @@ +// +// JL4GUpgradeManager.h +// JL_BLEKit +// +// Created by EzioChan on 2023/12/18. +// Copyright © 2023 www.zh-jieli.com. All rights reserved. +// + +#import +#import "JLPublicSettingBlocks.h" + +NS_ASSUME_NONNULL_BEGIN +/// 4G 升级状态枚举 +typedef NS_ENUM(uint8_t, JL4GUpgradeStatus) { + /// 完成 + JL4GUpgradeStatusFinish = 0x00, + /// 开始 + JL4GUpgradeStatusStart = 0x01, + /// 传输中 + JL4GUpgradeStatusTransporting = 0x02, + /// 设备处理中 + JL4GUpgradeStatusDeviceProcessing = 0xff +}; + +@class JL4GUpgradeManager; + +/// 4G 升级代理回调 +@protocol JL4GUpgradeDelegate + +/// 升级结果 +/// - Parameters: +/// - mgr:4G升级管理对象 +/// - status: 升级状态 +/// - progress: 升级进度 +/// - code: 结果码 +/// 0x00 升级成功 +/// 0x01 升级失败 +/// 0x02 升级超时 +/// - error: 错误信息 +-(void)jl4GUpgradeResult:(JL4GUpgradeManager *)mgr Status:(JL4GUpgradeStatus) status Progress:(float)progress Code:(uint8_t)code error:(NSError * _Nullable)error; + +/// 设备 4G 信息更新 +/// - Parameter g4Model: 4G信息 +-(void)jl4GGetDeviceInfo:(JLPublic4GModel *)g4Model; + +@end + +@class JL_ManagerM; + +/// 4G模块升级管理对象 +@interface JL4GUpgradeManager : NSObject + +/// 单例 ++(instancetype)share; + +/// 4G 升级信息 +/// ⚠️需要先执行获取模块信息后获得值 +@property(nonatomic,strong)JLPublic4GModel *g4Model; + +/// 4G升级代理回调 +@property(nonatomic,weak) id delegate; + +/// 获取4G模块信息 +/// - Parameters: +/// - manager: 设备 +/// - result: 回调结果 +-(void)cmdGetDevice4GInfo:(JL_ManagerM *)manager result:(JLPSSource4GCbk)result; + + +/// 开始4G升级 +/// - Parameters: +/// - manager: 设备 +/// - data: 升级数据 +-(void)cmdStartUpgrade4G:(JL_ManagerM *)manager Data:(NSData *)data; + +/// 取消4G升级 +/// - Parameter manager: 设备 +-(void)cmdCancel4GUpgrade:(JL_ManagerM *)manager; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLAIDialManager.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLAIDialManager.h new file mode 100644 index 000000000..ea34d7d8f --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLAIDialManager.h @@ -0,0 +1,77 @@ +// +// JLAIDialManager.h +// JL_BLEKit +// +// Created by EzioChan on 2023/10/12. +// Copyright © 2023 www.zh-jieli.com. All rights reserved. +// + +#import +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN +@class JL_ManagerM; +@class JLAIDialManager; + +@protocol JLAIDialManagerDelegate + +/// 设备通知App AI表盘界面变化 +/// - Parameters: +/// - manager: ai dial manager +/// - status:0x00: 退出AI表盘功能 0x01: 进入AI表盘功能 +-(void)aiDialManager:(JLAIDialManager *)manager didAiDialStatusChange:(uint8_t)status; + +/// 开始AI生成表盘 +/// - Parameter manager: ai dial manager +-(void)aiDialdidStartCreateManager:(JLAIDialManager *)manager; + +/// 重新录音 +/// - Parameter manager: ai dial manager +-(void)aiDialdidRestartRecordManager:(JLAIDialManager *)manager; + +/// AI表盘开始安装 +/// - Parameter manager: ai dial manager +-(void)aiDialdidStartInstallManager:(JLAIDialManager *)manager; + + +/// 重新生成表盘 +/// - Parameter manager: ai dial manager +-(void)aiDialdidReCreateManager:(JLAIDialManager *)manager; + +@end + + + +/// ai dial manager +@interface JLAIDialManager : NSObject + +/// 进入/退出AI表盘 +@property (nonatomic, assign) BOOL isCreateing; + +/// 缩略图尺寸 默认 200*200 +/// scale zoom size default 200*200 +@property (nonatomic, strong) JLDialSize *scaleZoomSize; + + +/// 代理 +@property (nonatomic, weak) id delegate; + + +/// AI 表盘风格显示设置 +/// - Parameter manager: 设备对象 +/// - Parameter style: 风格类型 +/// - Parameter result: 回调对象 +-(void)aiDialSetManager:(JL_ManagerM *)manager AiStyle:(NSString *)style Result:(JL_CMD_RESPOND)result; + + +/// AI表盘告诉设备缩略图发送完毕 +/// - Parameter manager: 设备对象 +/// - Parameter path: 目标缩略图路径(设备端的位置)默认 "/VIE_THUMB" +/// - Parameter result: 回调对象 +-(void)aiDialSendThumbAiImageTo:(JL_ManagerM *)manager withPath:(NSString *)path Result:(JL_CMD_RESPOND)result; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLAiManager.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLAiManager.h new file mode 100644 index 000000000..88abc8f81 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLAiManager.h @@ -0,0 +1,121 @@ +// +// JLAiManager.h +// JL_BLEKit +// +// Created by EzioChan on 2023/8/9. +// Copyright © 2023 www.zh-jieli.com. All rights reserved. +// + +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +//MARK: - JLOpenPlatformInfo +/// 平台接口认证信息 +@interface JLOpenPlatformInfo : NSObject +/// 版本号 +@property(nonatomic,assign)uint8_t version; +/// 平台 ID +@property(nonatomic,copy)NSString *appID; +/// app key +@property(nonatomic,copy)NSString *appKey; +/// app 的密钥 +@property(nonatomic,copy)NSString *appSecret; +/// 原始数据 +@property(nonatomic,copy)NSData *basicData; + +-(instancetype)initData:(NSData *)data; + +@end + +/// 平台接口认证信息 +@interface JLOpenPlatformMessage : NSObject +/// 版本号 +@property(nonatomic,assign)uint8_t version; +/// 支持平台信息 +@property(nonatomic,copy)NSArray * infoArray; + +-(instancetype)initData:(NSData *)dt; + +@end + +/// 屏幕尺寸 +@interface JLDialSize : NSObject + +/// width +@property(nonatomic,assign) uint16_t width; + +/// height +@property(nonatomic,assign) uint16_t height; + +/// 初始化 +/// - Parameters: +/// - width: width +/// - height: height ++(JLDialSize *)makeSize:(uint16_t)width Height:(uint16_t)height; + +@end + +//MARK: - JLAiManager +@class JL_ManagerM; +@class JLAiManager; + +@protocol JLAIManagerDelegate + +/// 设备回调/推送结果 +/// - Parameter mgr: JLAiManager +-(void)jlaiUpdateStatus:(JLAiManager *)mgr; + +@optional +/// 设备主动推送JLOpenPlatformInfo信息 +/// - Parameters: +/// - mgr: 设备 +/// - infoArray: [JLOpenPlatformInfo] +-(void)jlaiUpdateDevAiOpenPlatforms:(JLAiManager *)mgr Info:(JLOpenPlatformMessage *)info; + + +@end + +typedef void(^JLOpenPFBlock)(JLOpenPlatformMessage *message,JL_CMDStatus result); + +/// AI状态 管理类 +/// 当前接口适用于一些支持设备对讲的设备,在使用时需要先初始化当前类并接受代理:JLAIManagerDelegate +/// 在初始化后需要主动获取状态才可以获得首次的状态内容 +/// +@interface JLAiManager : NSObject + +/// 版本号 +@property(assign,nonatomic)uint8_t version; + +/// 0x00:默认状态 +/// 0x01:进入AI界面 +/// 0x02:退出AI界面 +@property(assign,nonatomic)uint8_t status; + +/// 回调代理 +@property(weak,nonatomic)id delegate; + +/// 获取AI 的状态 +///- Parameters: +/// - manager: 设备对象 +-(void)getStatus:(JL_ManagerM *)manager; + +/// 设置设备的状态 +/// - Parameters: +/// - manager: 设备对象 +/// - result: 回调结果 +-(void)setToDevice:(JL_ManagerM *)manager result:(JL_CMD_RESPOND _Nullable)result; + + +/// 获取平台接口认证信息,此信息需要先获取 JLDeviceConfig +/// 根据JLDeviceConfigModel 的 exportFunc 属性的 +/// spOpenInfo 判断是否支持平台开放接口信息获得 +/// - Parameters: +/// - manager: 设备对象 +/// - result: 回调结果 +-(void)getOpenPlatformInfo:(JL_ManagerM *)manager result:(JLOpenPFBlock _Nullable)result; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLAuracastDevStateModel.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLAuracastDevStateModel.h new file mode 100644 index 000000000..3e91da062 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLAuracastDevStateModel.h @@ -0,0 +1,35 @@ +// +// JLAuracastDevStateModel.h +// JL_BLEKit +// +// Created by EzioChan on 2025/11/17. +// Copyright © 2025 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +/** + Auracast 设备状态数据模型 + + */ +@interface JLAuracastDevStateModel : NSObject + +typedef NS_ENUM(uint8_t, JLAuracastDevStateType) { + JLAuracastDevStateTypeLogin = 0x01, +}; +typedef NS_ENUM(uint8_t, JLAuracastLoginState) { + JLAuracastLoginStateLogout = 0, + JLAuracastLoginStateLogin = 1, +}; +/// 登录状态 +@property(nonatomic, assign) JLAuracastLoginState loginState; + +- (instancetype)initParseData:(NSData *)data; + +- (void)updateParseData:(NSData *)data; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLAuracastLancerManager.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLAuracastLancerManager.h new file mode 100644 index 000000000..a7172d602 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLAuracastLancerManager.h @@ -0,0 +1,121 @@ +// +// JLAuracastLancerManager.h +// JL_BLEKit +// +// Created by EzioChan on 2025/11/17. +// Copyright © 2025 www.zh-jieli.com. All rights reserved. +// + +#import +#import +NS_ASSUME_NONNULL_BEGIN +@class JLAuracastLancerSettingMode; +@class JLAuracastLancerManager; + +@protocol JLAuracastLancerManagerDelegate +@optional +-(void)lancerManager:(JLAuracastLancerManager *)mgr didUpdateSetting:(JLAuracastLancerSettingMode *)mode; +/// 设备状态更新 +/// - Parameters: +/// - mgr: 管理器 +/// - state: 最新设备状态 +-(void)lancerManager:(JLAuracastLancerManager *)mgr didUpdateDeviceState:(JLAuracastDevStateModel *)state; +@end + +/// Lancer 验证 +typedef NS_ENUM(NSUInteger, JLAuracastLancerLoginVerifyType) { + /// 验证成功 + JLLancerLoginVerifyTypeSuccess = 0x00, + /// 验证失败 + JLLancerLoginVerifyTypeFail = 0x01, + /// 已登录 + JLLancerLoginVerifyTypeLogined = 0x02 +}; + +/// 修改密码结果 +typedef NS_ENUM(NSUInteger, JLAuracastLancerChangePwdResult) { + /// 修改成功 + JLAuracastLancerChangePwdSuccess = 0x00, + /// 旧密码错误 + JLAuracastLancerChangePwdOldError = 0x01, + /// 密码没有变化 + JLAuracastLancerChangePwdNoChange = 0x02, + /// 新密码长度不对 + JLAuracastLancerChangePwdLengthError = 0x03 +}; + + + +typedef void(^JLLancerLoginVerifyBlock)(JLAuracastLancerLoginVerifyType status); + +typedef void(^JLLancerChangePwdBlock)(JLAuracastLancerChangePwdResult status); + +@interface JLAuracastLancerManager : NSObject + +@property(nonatomic, strong) JLAuracastLancerSettingMode *__nullable settingMode; + +@property(nonatomic, weak) id delegate; + + +-(instancetype)initWithManager:(JL_ManagerM *)manager; + +/// 设备状态 +@property(nonatomic,strong)JLAuracastDevStateModel *devState; + +/// 登录 +/// - Parameters: +/// - password: 登录密码 +/// - result: 结果 +-(void)loginVerify:(NSString *)password Result:(JLLancerLoginVerifyBlock)result; + +/// 修改密码 +/// - Parameters: +/// - oldPwd: 旧密码 +/// - newPwd: 新密码 +/// - result: 结果 +-(void)changePassword:(NSString *)oldPwd newPassword:(NSString *)newPwd Result:(JLLancerChangePwdBlock)result; + +/// 获取Auracast设备状态 +-(void)auracastGetDevState; + +/// 获取广播音频发射设置 +/// - Parameter type: 类型 +/// 0x01 == 广播名称 +/// 0x02 == 音频格式序号 +/// 0x03 == 加密信息 +/// 0x04 == 发射功率 +-(void)getBroadcastLancerSetting:(UInt8)type; + +/// 获取广播音频发射设置 +-(void)getBroadcastLancerSetting; + +/// 单独设置广播名称 +-(void)setBroadcastName:(NSString *)name; + +/// 单独设置音频格式序号 +-(void)setAudioFormatIndex:(JLBroadcastSetAudioFormat)index; + +/// 单独设置加密与 Broadcast Code(长度16) +-(void)setEncryptEnabled:(BOOL)enabled code:(NSData *)code; + +/// 单独设置发射功率(1~10) +-(void)setPowerLevel:(uint8_t)level; + +/// 一次性下发全部设置(来自 settingMode 或参数) +-(void)setBroadcastLancerSetting:(JLAuracastLancerSettingMode *)mode; + +///关机 +-(void)shoudown; + +///重启 +-(void)restart; + +///恢复出厂设置 +-(void)reset; + +/// 销毁 +-(void)onDestory; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLAuracastLancerSettingMode.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLAuracastLancerSettingMode.h new file mode 100644 index 000000000..0d0a547dc --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLAuracastLancerSettingMode.h @@ -0,0 +1,148 @@ +// +// JLAuracastLancerSettingMode.h +// JL_BLEKit +// +// Created by EzioChan on 2025/11/17. +// Copyright © 2025 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN +/// 音频格式 +typedef NS_ENUM(UInt8, JLBroadcastSetAudioFormat) { + /// 名称: 8_1 + /// 采样率(Hz): 8000 + /// 帧间隔(us):7500 + /// 包长(Byte):26 + /// 码率(kbps):27.732 + /// 重发次数 :2 + /// 最大传输延时(ms) :8 + /// 演示延时(ms) :40 + JLBroadcastSetAudioFormat8_1 = 0x01, + /// 名称: 8_2 + /// 采样率(Hz): 8000 + /// 帧间隔(us):10000 + /// 包长(Byte):30 + /// 码率(kbps):24 + /// 重发次数:2 + /// 最大传输延时(ms):10 + /// 演示延时(ms):40 + JLBroadcastSetAudioFormat8_2 = 0x02, + /// 名称: 16_1_1 + /// 采样率(Hz): 16000 + /// 帧间隔(us):7500 + /// 包长(Byte):30 + /// 码率(kbps):32 + /// 重发次数:2 + /// 最大传输延时(ms):8 + /// 演示延时(ms):40 + JLBroadcastSetAudioFormat16_1_1 = 0x03, + /// 名称: 16_2_1 + /// 采样率(Hz): 16000 + /// 帧间隔(us):10000 + /// 包长(Byte):40 + /// 码率(kbps):48 + /// 重发次数:2 + /// 最大传输延时(ms):10 + /// 演示延时(ms):40 + JLBroadcastSetAudioFormat16_2_1 = 0x04, + /// 名称: 24_1_1 + /// 采样率(Hz): 24000 + /// 帧间隔(us):7500 + /// 包长(Byte):45 + /// 码率(kbps):48 + /// 重发次数:2 + /// 最大传输延时(ms):8 + /// 演示延时(ms):40 + JLBroadcastSetAudioFormat24_1_1 = 0x05, + /// 名称: 24_2_1 + /// 采样率(Hz): 24000 + /// 帧间隔(us):10000 + /// 包长(Byte):60 + /// 码率(kbps):48 + /// 重发次数:2 + /// 最大传输延时(ms):10 + /// 演示延时(ms):40 + JLBroadcastSetAudioFormat24_2_1 = 0x06, + /// 名称: 32_1_1 + /// 采样率(Hz): 32000 + /// 帧间隔(us):7500 + /// 包长(Byte):60 + /// 码率(kbps):64 + /// 重发次数:2 + /// 最大传输延时(ms):8 + /// 演示延时(ms):40 + JLBroadcastSetAudioFormat32_1_1 = 0x07, + /// 名称: 32_2_1 + /// 采样率(Hz): 32000 + /// 帧间隔(us):10000 + /// 包长(Byte):80 + /// 码率(kbps):64 + /// 重发次数:2 + /// 最大传输延时(ms):10 + /// 演示延时(ms):40 + JLBroadcastSetAudioFormat32_2_1 = 0x08, + /// 名称: 441_1_1 + /// 采样率(Hz): 44100 + /// 帧间隔(us):8163 + /// 包长(Byte):97 + /// 码率(kbps):95.06 + /// 重发次数:4 + /// 最大传输延时(ms):24 + /// 演示延时(ms):40 + JLBroadcastSetAudioFormat441_1_1 = 0x09, + /// 名称: 441_2_1 + /// 采样率(Hz): 44100 + /// 帧间隔(us):10884 + /// 包长(Byte):130 + /// 码率(kbps):95.55 + /// 重发次数:4 + /// 最大传输延时(ms):31 + /// 演示延时(ms):40 + JLBroadcastSetAudioFormat441_2_1 = 0x0A, + /// 名称: 48_1 + /// 采样率(Hz): 48000 + /// 帧间隔(us):7500 + /// 包长(Byte):75 + /// 码率(kbps):80 + /// 重发次数:4 + /// 最大传输延时(ms):15 + /// 演示延时(ms):40 + JLBroadcastSetAudioFormat48_1 = 0x0B, + /// 名称: 48_2 + /// 采样率(Hz): 48000 + /// 帧间隔(us):10000 + /// 包长(Byte):100 + /// 码率(kbps):80 + /// 重发次数:4 + /// 最大传输延时(ms):20 + /// 演示延时(ms):40 + JLBroadcastSetAudioFormat48_2 = 0x0C + +}; +/** + Auracast 发射端设置数据模型 + */ +@interface JLAuracastLancerSettingMode : NSObject + +/// 广播名称 +@property(nonatomic, copy) NSString *broadcastName; +/// 音频格式 +@property(nonatomic, assign) JLBroadcastSetAudioFormat audioFormatIndex; +/// 是否加密 +@property(nonatomic, assign) BOOL encryptEnabled; +/// 广播加密密码 +@property(nonatomic, copy) NSData * _Nullable broadcastCode; +/// 发射功率设置 +@property(nonatomic, assign) uint8_t powerLevel; + +-(instancetype)initParseData:(NSData *)data; + +-(void)updateParseData:(NSData *)data; + +-(NSData *)toLTVData; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLAuracastManager.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLAuracastManager.h new file mode 100644 index 000000000..053b987e2 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLAuracastManager.h @@ -0,0 +1,123 @@ +// +// JLAuracastManager.h +// JL_BLEKit +// +// Created by EzioChan on 2025/11/17. +// Copyright © 2025 www.zh-jieli.com. All rights reserved. +// + +#import +#import + +NS_ASSUME_NONNULL_BEGIN +@class JLBroadcastDataModel; +@class JLAuracastDevStateModel; +@class JLAuracastManager; + +/// 搜索状态 +typedef NS_ENUM(NSUInteger, JLAuracastScanState) { + ///操作成功/不在搜索状态 + JLAuracastScanStateSuccess = 0, + ///正在搜索,请勿重复操作 + JLAuracastScanStateScanning = 1, + ///收听广播过程不允许扫描 + JLAuracastScanStateForbidden = 2, + ///设备繁忙 + JLAuracastScanStateBusy = 3, +}; + +/// 扫描类型 +typedef NS_ENUM(NSUInteger, JLAuracastScanType) { + /// 停止 + JLAuracastScanTypeStop = 0, + /// 开始 + JLAuracastScanTypeStart = 1, + /// 查询 + JLAuracastScanTypeQuery = 2, +}; + +@protocol JLAuracastManagerDelegate +@optional + +/// 搜索状态 +/// - Parameters: +/// - mgr: 管理器 +/// - state: 搜索状态 +/// - error: 错误 +-(void)auracastManager:(JLAuracastManager *)mgr didUpdateSearchState:(BOOL)state Error:(NSError * _Nullable)error; + + +/// 广播列表更新 +/// - Parameters: +/// - mgr: 管理器 +/// - list: 最新的广播数据列表 +-(void)auracastManager:(JLAuracastManager *)mgr didUpdateBroadcastList:(NSArray *)list; + +/// 设备状态更新 +/// - Parameters: +/// - mgr: 管理器 +/// - state: 最新设备状态 +-(void)auracastManager:(JLAuracastManager *)mgr didUpdateDeviceState:(JLAuracastDevStateModel *)state; + +/// 当前播放源更新 +/// - Parameters: +/// - mgr: 管理器 +/// - source: 当前播放源(可空) +-(void)auracastManager:(JLAuracastManager *)mgr didUpdateCurrentSource:(JLBroadcastDataModel * _Nullable)source; +@end + +typedef void(^JLAuracastManagerResultBlock)(JL_CMDStatus status, NSError * _Nullable error); + +@interface JLAuracastManager : NSObject + +/// 扫描状态 +@property(nonatomic, assign)BOOL isScanning; + +/// 若干个搜索到的对象 +@property(nonatomic,strong)NSMutableArray * broadcastDataModels; + +/// 设备状态 +@property(nonatomic,strong)JLAuracastDevStateModel *devState; + +/// 当前播放源 +@property(nonatomic,strong)JLBroadcastDataModel *__nullable currentSource; + +/// 回调代理 +@property(nonatomic,weak)id delegate; + +/// 初始化 +-(instancetype)initWithManager:(JL_ManagerM *)manager; + + +/// 扫描Auracast广播 +/// - Parameter type: 扫描类型 +-(void)auracastScanBroadcast:(JLAuracastScanType)type; + +/// 获取Auracast设备状态 +-(void)auracastGetDevState; + + +/// 设置Auracast当前播放源 +/// - Parameter model: 播放源 +/// - Parameter block: 回调 +/// 这里的回调仅仅是命令收发的一个回复,设备回复成功不代表添加成功 +/// 只说明了此命令交互成功,开发者仍需监听 +/// -(void)auracastManager:(JLAuracastManager *)mgr didUpdateCurrentSource:(JLBroadcastDataModel * _Nullable)source 作为判断是否成功收听的重要指标 +-(void)addSourceToDev:(JLBroadcastDataModel *)model result:(JLAuracastManagerResultBlock _Nullable)block; + +/// 移除Auracast当前播放源 +/// - Parameter block: 回调 +-(void)removeDevCurrentSource:(JLAuracastManagerResultBlock _Nullable)block; + +/// 获取Auracast当前播放源 +/// - Parameter block: 回调 +-(void)getCurrentOperationSource:(void(^)(JLBroadcastDataModel *model))block; + +/// 销毁 +-(void)onDestory; + + + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLAutoConfigAnc.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLAutoConfigAnc.h new file mode 100644 index 000000000..67e2329af --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLAutoConfigAnc.h @@ -0,0 +1,87 @@ +// +// JLAutoConfigAnc.h +// JL_BLEKit +// +// Created by EzioChan on 2022/10/28. +// Copyright © 2022 www.zh-jieli.com. All rights reserved. +// + + +#import "ECOneToMorePtl.h" + +NS_ASSUME_NONNULL_BEGIN + +@class JL_ManagerM; + +typedef void(^AutoConfigResult)(BOOL status); + +@protocol JLAutoConfigAncPtl + + +/// 设备正在重新检测自适应降噪 +-(void)autoConfigDidConfiging; +///设置自适应降噪失败了 +-(void)autoConfigDidFailed; +///设置自适应降噪成功了 +-(void)autoConfigDidSucceed; +///关闭自适应降噪 +-(void)autoConfigDidClose; + +@end + + +/// 自适应降噪处理类 +@interface JLAutoConfigAnc : ECOneToMorePtl + +/// 设备开启/关闭自适应降噪的状态 +@property (assign,nonatomic)BOOL status; + +/// 开启设备自适应降噪 +/// 这里只是进入了设备开始适配降噪的命令过程 +/// 适配成功与否需要添加协议JLAutoConfigAncPtl进行监听 +/** + interface testView : UIView + + @end + + -(void)initData{ + JLAutoConfigAnc *anc = [[JLAutoConfigAnc alloc] init]; + [anc addDelegate:self]; + } + + -(void)autoConfigDidFailed{ + //设置自适应降噪失败了 + } + -(void)autoConfigDidSucceed{ + //设置自适应降噪成功了 + } + -(void)autoConfigDidClose{ + //关闭自适应降噪 + } +*/ +/// - Parameter manager: manager +-(void)atAncStartAutoConfigWithManager:(JL_ManagerM*)manager; + + +/// 打开设备自适应降噪 +/// 设备默认有一套已在运行的降噪算法 +/// 打开后设备会进入降噪模式,不会经历检测启动自适应的时间,相当于是即时生效 +/// - Parameter result: 这里回调的是一个设备命令处理的结果 +/// - Parameter manager: manager +-(void)atAncOpenAutoConfigResult:(JL_CMD_RESPOND)result Manager:(JL_ManagerM*)manager; + +/// 用户关闭设备的自适应降噪模式算法 +/// - Parameter result: 命令处理结果,不代表命令处理成功 +/// - Parameter manager: manager +-(void)atAncCloseAutoConfigResult:(JL_CMD_RESPOND)result Manager:(JL_ManagerM*)manager; + +/// 获取设备是否开启了自适应降噪 +/// - Parameter result: 这里处理的结果是,设备实际是否开启了的结果,无需从代理中获得结果 +/// - Parameter manager: manager +-(void)atAncGetAutoConfigResult:(AutoConfigResult)result Manager:(JL_ManagerM*)manager; + + +@end + + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLAutoPressureModel.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLAutoPressureModel.h new file mode 100644 index 000000000..c019440d1 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLAutoPressureModel.h @@ -0,0 +1,38 @@ +// +// JLAutoPressureModel.h +// JL_BLEKit +// +// Created by EzioChan on 2021/10/12. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import "JLwSettingModel.h" + +NS_ASSUME_NONNULL_BEGIN + +///压力自动检测模式 +typedef NS_ENUM(UInt8, WatchAPLeveType) { + ///放松 + WatchAPLeve_Relex = 0x00, + /// 正常 + WatchAPLeve_Normal = 0x01, + /// 中等 + WatchAPLeve_Middle = 0x02, + /// 偏高 + WatchAPLeve_Hight = 0x03 +}; + +@interface JLAutoPressureModel : JLwSettingModel + +///开关 +@property(nonatomic,assign)BOOL status; +/// 模式 +@property(nonatomic,assign)WatchAPLeveType model; + +-(instancetype)initWithData:(NSData *)data; + +-(instancetype)initWithModel:(WatchAPLeveType)model switchStatus:(BOOL)status; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLBroadcastDataModel.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLBroadcastDataModel.h new file mode 100644 index 000000000..a46f5a68d --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLBroadcastDataModel.h @@ -0,0 +1,65 @@ +// +// JLBroadcastDataModel.h +// JL_BLEKit +// +// Created by EzioChan on 2025/11/17. +// Copyright © 2025 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +/// Auracast 广播数据模型 +@interface JLBroadcastDataModel : NSObject + +/// 广播名称 +@property(nonatomic, copy) NSString *broadcastName; +/// 广播ID +@property(nonatomic, copy) NSData *broadcastID; +/// 广播特性 +@property(nonatomic, assign) uint8_t features; +/// 是否加密 +@property(nonatomic, assign) BOOL encrypted; +/// 广播地址 +@property(nonatomic, copy) NSData *advertiserAddress; +/// 广播地址 +@property(nonatomic, copy) NSString *advertiserAddressString; + +/// 广播密钥 +@property(nonatomic, copy) NSData *broadcastKey; + +typedef NS_ENUM(uint8_t, JLBroadcastSyncState) { + JLBroadcastSyncStateIdle = 0, + JLBroadcastSyncStateSyncing = 1, + JLBroadcastSyncStateSuccess = 2, +}; +/// 同步状态 +/// Broadcast sync state +/// 当此状态为空闲时,需要查看错误码检查是否存在错误 +@property(nonatomic, assign) JLBroadcastSyncState syncState; + +typedef NS_ENUM(uint8_t, JLBroadcastErrorCode) { + JLBroadcastErrorCodeNone = 0x00, + JLBroadcastErrorCodeName = 0x01, + JLBroadcastErrorCodeAddress = 0x02, + JLBroadcastErrorCodeID = 0x03, + JLBroadcastErrorCodeKey = 0x04, + JLBroadcastErrorCodeSyncFailed = 0x05, + JLBroadcastErrorCodeSyncTimeout = 0x06, + JLBroadcastErrorCodeSyncLost = 0x07, +}; +/// 错误码 +@property(nonatomic, assign) JLBroadcastErrorCode errorCode; + +@property(nonatomic, copy) NSData *ltvData; + +- (instancetype)initParseData:(NSData *)data; + + +/// 将当前模型内容按 LTV 规则编码为数据 +- (NSData *)toLTVData; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLCmdBasic.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLCmdBasic.h new file mode 100644 index 000000000..8efb36751 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLCmdBasic.h @@ -0,0 +1,23 @@ +// +// JLCmdBasic.h +// JL_BLEKit +// +// Created by EzioChan on 2023/9/13. +// Copyright © 2023 www.zh-jieli.com. All rights reserved. +// + +#import +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface JLCmdBasic : NSObject + +-(void)inputPKG:(JL_PKG *)pkg; + +-(void)makeCommandAction:(NSData *)targetData withManager:(JL_ManagerM *)manager Result:(JL_CMD_RESPOND _Nullable)result; +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLConsequentHeartRateModel.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLConsequentHeartRateModel.h new file mode 100644 index 000000000..3a407f6b5 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLConsequentHeartRateModel.h @@ -0,0 +1,45 @@ +// +// JLConsequentHeartRateModel.h +// JL_BLEKit +// +// Created by EzioChan on 2021/10/12. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import "JLwSettingModel.h" + +NS_ASSUME_NONNULL_BEGIN + +/// 测量心率传感器设置 +@interface JLConsequentHeartRateModel : JLwSettingModel +///开关 +@property(nonatomic,assign)BOOL status; +/// 测量模式 +@property(nonatomic,assign)WatchConsequentType rType; + +/// 上限心率 +@property(nonatomic,assign)UInt8 maxHeartRate; + +/// 下限心率 +@property(nonatomic,assign)UInt8 minHeartRate; + +/// 是否包含上下心率区间 +@property(nonatomic,assign)BOOL hasRange; + +-(instancetype)initWithData:(NSData *)data; + +/// 创建一个新的传感器设置对象 +/// @param type 测量类型 +/// @param status 开团状态 +- (instancetype)initWithModel:(WatchConsequentType)type Status:(BOOL)status; + +/// 创建一个新的传感器设置对象 +/// 携带心率上下限的 +/// @param type 测量类型 +/// @param status 开关状态 +/// @param min 心率下限 +/// @param max 心率上限 +- (instancetype)initWithModel:(WatchConsequentType)type Status:(BOOL)status Min:(UInt8) min Max:(UInt8)max; +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLDevAudioAIttsHandler.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLDevAudioAIttsHandler.h new file mode 100644 index 000000000..cfe5d57df --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLDevAudioAIttsHandler.h @@ -0,0 +1,55 @@ +// +// JLDevAudioAIttsHandler.h +// JL_BLEKit +// Created by EzioChan on 2025/12/12. +// Copyright © 2025 www.zh-jieli.com. All rights reserved. +// + +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +@class JL_ManagerM; +@protocol JLDevAudioAIttsHandlerDelegate +/// 设备回调ai云数据 +/// - Parameters: +/// - manager: 设备 +/// - aicloud: AI云数据对象 +- (void)receiveDataFrom:(JL_ManagerM *)manager WithAiCloud:(JLSpeechAiCloud *)aicloud; + +/// 设备返回tts合成数据 +/// - Parameters: +/// - manager: 设备 +/// - tts: tts数据对象 +- (void)receiveDataFrom:(JL_ManagerM *)manager WithTTS:(JLSpeechTTSSynthesis *)tts; +@end + +/// 语音 AI/tts 传输处理(新) +/// 对外接口与旧类一致,仅更换类名,内部转发至 JL_SpeechAIttsHandler +@interface JLDevAudioAIttsHandler : NSObject + +@property (nonatomic, weak) id delegate; + +/// 初始化一个语音大数据传输实例 +/// - Parameter mgr: JL_ManagerM +- (instancetype)initWithMgr:(JL_ManagerM *)mgr; + +/// 发送tts语音合成信息 +/// - Parameters: +/// - tts: tts语音对象内容 +/// - manager: 设备 +/// - result: 回调结果 +- (void)devAudioSendTTs:(JLSpeechTTSSynthesis *)tts manager:(JL_ManagerM *)manager result:(JL_BIGDATA_RT)result; + +/// 发送ai云数据到设备 +/// - Parameters: +/// - cloud: ai云数据 +/// - manager: 设备 +/// - result: 回调结果 +- (void)devAudioSendAiCloud:(JLSpeechAiCloud *)cloud manager:(JL_ManagerM *)manager result:(JL_BIGDATA_RT)result; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLDevAudioManager.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLDevAudioManager.h new file mode 100644 index 000000000..4767be2bc --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLDevAudioManager.h @@ -0,0 +1,95 @@ +// +// JLDevAudioManager.h +// JL_BLEKit +// Created by EzioChan on 2025/12/12. +// Copyright © 2025 www.zh-jieli.com. All rights reserved. +// + +#import +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +@class JL_ManagerM; +@class JLDevAudioManager; + +@protocol JLDevAudioManagerDelegate + /// 录音数据回调 + /// - Parameters: + /// - manager: 操作设备 + /// - data: 数据 + - (void)devAudioManager:(JLDevAudioManager *)manager Audio:(NSData *)data; + + /// 设备端开始录音 + /// - Parameters: + /// - manager: 操作设备 + /// - param: 录音参数 + - (void)devAudioManager:(JLDevAudioManager *)manager StartByDeviceWithParam:(JLRecordParams *)param; + + /// 设备端结束录音 + /// - Parameters: + /// - manager: 操作设备 + /// - param: 语音助手配置参数 + - (void)devAudioManager:(JLDevAudioManager *)manager StopByDeviceWithParam:(JLSpeechRecognition *)param; + + /// 录音状态回调 + /// - Parameters: + /// - manager: 操作设备 + /// - status: 状态 + - (void)devAudioManager:(JLDevAudioManager *)manager Status:(JL_SpeakType)status; + +@end + +/// 设备录音管理对象(新) +/// 对外接口与旧类一致,仅更换类名,内部转发至 JL_SpeexManager +@interface JLDevAudioManager : NSObject + +@property (nonatomic, weak) id delegate; + + /// 获取单例 + /// - Parameters: + /// - delegate: 代理 + /// - manager: 操作设备 + /// - Returns: 录音管理对象实例 + + (JLDevAudioManager *)shareDevAudioManager:(id)delegate WithManager:(JL_ManagerM *)manager; + + /// 获取录音状态 + /// - Returns: 当前录音状态 + - (JL_SpeakType)cmdCheckRecordStatus; + + /// 开始录音 + /// - Parameters: + /// - manager: 操作设备 + /// - params: 录音参数 + /// - result: 命令操作结果回调 + - (void)cmdStartRecord:(JL_ManagerM *)manager Params:(JLRecordParams *)params Result:(JL_CMD_RESPOND __nullable)result; + /// 停止录音 + /// - Parameters: + /// - manager: 操作设备 + /// - reason: VAD类型 + /// - result: 命令操作结果回调 + - (void)cmdStopRecord:(JL_ManagerM *)manager Reason:(JLSpeakDownReason)reason Result:(JL_CMD_RESPOND __nullable)result; + /// 停止录音2 + /// - Parameters: + /// - manager: 操作设备 + /// - reason: vad类型 + /// - schr: 语音设置助手 + /// - result: 回调结果 + - (void)cmdStopRecord:(JL_ManagerM *)manager Reason:(JLSpeakDownReason)reason SpeechHelper:(JLSpeechRecognition *)schr Result:(JL_CMD_RESPOND __nullable)result; + + /// 允许录音(设备端主动发起时的同意响应) + /// 在收到设备主动发起录音的回调后调用,设备会播放提示音 + - (void)cmdAllowSpeak; + /// 拒绝录音(设备端主动发起时的拒绝响应) + /// 在收到设备主动发起录音的回调后调用,拒绝设备开始录音 + - (void)cmdRejectSpeak; + + /// 停止语音 + /// 发送命令给音箱,停止接收数据,即检测到断句 + - (void)cmdSpeakingDone __attribute__((deprecated("当前命令已失效,请使用cmdStopRecord:(JL_ManagerM *)manager Reason:(JLSpeakDownReason) reason"))); + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLDevPlayerCtrl.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLDevPlayerCtrl.h new file mode 100644 index 000000000..74e171a03 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLDevPlayerCtrl.h @@ -0,0 +1,102 @@ +// +// JLDevPlayerCtrl.h +// JL_BLEKit +// +// Created by EzioChan on 2023/9/25. +// Copyright © 2023 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@class JL_ManagerM; +@class JLDevPlayerCtrl; + +/// 播放器回调 +@protocol JLDevPlayerCtrlDelegate + +/// 播放状态 +/// - Parameters: +/// - ctrl: 播放器 +/// - status: 播放模式 +-(void)jlDevPlayerCtrl:(JLDevPlayerCtrl *)ctrl playMode:(uint8_t)playMode; + +/// 播放状态回调 +/// - Parameters: +/// - ctrl: 播放器 +/// - status: 播放状态 +/// - card: 当前播放的设备 +/// - time: 当前播放的时间 +/// - total: 总时长 +-(void)jlDevPlayerCtrl:(JLDevPlayerCtrl *)ctrl playStatus:(uint8_t)status currentCard:(uint8_t)card currentTime:(uint32_t)time tolalTime:(uint32_t)total; + +/// 播放文件回调 +/// - Parameters: +/// - ctrl: 播放器 +/// - name: 文件名 +/// - clus: 文件簇号 +-(void)jlDevPlayerCtrl:(JLDevPlayerCtrl *)ctrl fileName:(NSString *)name currentClus:(uint32_t)clus; + +@end + + +/// 设备播放器管理类 +@interface JLDevPlayerCtrl : JLCmdBasic + +/// 播放状态 +@property(nonatomic,assign)uint8_t playStatus; + +/// 当前播放的设备 +/// 0x00 : USB +/// 0x01 : SD_0 +/// 0x02 : SD_1 +/// 0x03 : FLASH +/// 0x04 : LineIn +/// 0x05 : FLASH2 +@property(nonatomic,assign)uint8_t currentCard; + +/// 当前播放时间 +@property(nonatomic,assign)uint32_t currentTime; + +/// 歌曲总时长 +@property(nonatomic,assign)uint32_t tolalTime; + +/// 当前播放文件名 +@property(nonatomic,strong)NSString *fileName; + +/// 当前播放文件的簇号 +@property(nonatomic,assign)uint32_t currentClus; + +/// 当前播放模式 +/// 0x01:全部循环; +/// 0x02:设备循环; +/// 0x03:单曲循环; +/// 0x04:随机播放; +/// 0x05:文件夹循环 +@property (nonatomic,assign)uint8_t playMode; + +/// 代理 +@property(nonatomic,weak)id delegate; + +/// 操控设备播放器设置 +/// - Parameters: +/// - cmd: 操作命令 +/// 0x01:PP按钮 +/// 0x02:上一曲 +/// 0x03:下一曲 +/// 0x04:切换播放模式(当前播放模式:不可指定,设备播放模式自增) +/// 0x05:EQ +/// 0x06:快退 +/// 0x07:快进 +/// - sec: 时间(当快进/快退时需要,其他功能时值为0) +/// - manager: 设备对象 +/// - result: 返回结果 +-(void)cmdPlayerCtrl:(uint8_t)cmd + Second:(uint16_t)sec + Manager:(JL_ManagerM *)manager + Result:(JL_CMD_RESPOND __nullable)result; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLDeviceConfig.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLDeviceConfig.h new file mode 100644 index 000000000..404011f0a --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLDeviceConfig.h @@ -0,0 +1,113 @@ +// +// JLDeviceConfig.h +// JL_BLEKit +// +// Created by EzioChan on 2022/10/31. +// Copyright © 2022 www.zh-jieli.com. All rights reserved. +// + +#import +#import + +@class JL_ManagerM; +@class JLDeviceConfigModel; +@class JLDeviceConfigTws; +@class JLDeviceConfigDongle; +@class JLDeviceConfigSoundBox; + +NS_ASSUME_NONNULL_BEGIN +typedef void(^JLConfigRsp)(JL_CMDStatus status, uint8_t sn, JLDeviceConfigModel* __nullable config); + +typedef void(^JLConfigTwsRsp)(JL_CMDStatus status, uint8_t sn, JLDeviceConfigTws* __nullable config); + +typedef void(^JLConfigAuracastRsp)(JL_CMDStatus status, uint8_t sn, JLDeviceConfigDongle* __nullable config); + +typedef void (^JLConfigSoundBoxRsp)(JL_CMDStatus status, uint8_t sn, JLDeviceConfigSoundBox* __nullable config); + + +/// 固件设置配置回调协议 +/// 遵循时,可通过父类的- (void)addDelegate:(id)delegate方法添加遵循 +@protocol JLConfigPtl + +@optional +/// 监听回调协议 +/// - Parameter configModel: 固件设置配置回调 +-(void)deviceConfigWith:(JLDeviceConfigModel *)configModel; + +/// TWS监听回调协议 +/// - Parameter configModel: 固件设置配置回调 +-(void)deviceTwsConfigWith:(JLDeviceConfigTws *)configModel; + +/// SoundBox监听回调协议 +/// - Parameter configModel: 固件设置配置回调 +-(void)deviceSoundBoxConfigWith:(JLDeviceConfigSoundBox *)configModel; + +/// Dongle 监听回调协议 +/// - Parameter configModel: 固件设置配置回调 +-(void)deviceAuracastConfigWith:(JLDeviceConfigDongle *)configModel; + +@end + +@interface JLDeviceConfig : NSObject + + +@property(nonatomic,weak) id _Nullable delegate; + ++(instancetype)share; + +/// 获取设备配置信息 +-(void)deviceConfigGet:(JL_ManagerM *)manager; + + +/// 手表查询设备当前固件配置内容 +/// - Parameters: +/// - manager: manager +/// - result: 回调功能配置内容 +-(void)deviceGetConfig:(JL_ManagerM *)manager result:(JLConfigRsp)result; + +/// 手表多设备管理时,可通过对应的设备UUID 获取相关的设备配置 +/// - Parameter entity: 设备uuidStr +-(JLDeviceConfigModel *_Nullable)deviceGetConfigWithUUID:(NSString *)uuidStr; + +/// TWS查询设备当前固件配置内容 +/// - Parameters: +/// - manager: manager +/// - result: 回调功能配置内容 +-(void)deviceTwsGetConfig:(JL_ManagerM *)manager result:(JLConfigTwsRsp)result; + +/// Dongle 查询设备当前固件配置内容 +/// - Parameters: +/// - manager: manager +/// - result: 回调功能配置内容 +-(void)deviceDongleGetConfig:(JL_ManagerM *)manager result:(JLConfigAuracastRsp)result; + +/// SoundBox 查询设备当前固件配置内容 +/// - Parameters: +/// - manager: manager +/// - result: 回调功能配置内容 +-(void)deviceSoundBoxGetConfig:(JL_ManagerM *)manager result:(JLConfigSoundBoxRsp)result; + + +/// Tws多设备管理时,可通过对应的设备UUID 获取相关的设备配置 +/// - Parameter entity: 设备uuidStr +-(JLDeviceConfigTws *)deviceGetTwsConfigWithUUID:(NSString *)uuidStr; + +/// Dongle 查询设备当前固件配置内容 +/// - Parameters: +/// - uuidStr: 设备uuidStr +-(JLDeviceConfigDongle *)deviceGetAuracastConfigWithUUID:(NSString *)uuidStr; + + +/// SoundBox 多设备管理时,可通过对应的设备 UUID 获取相关的设备配置信息 +/// - Parameter uuidStr: 设备 uuid +-(JLDeviceConfigSoundBox *)deviceGetSoundBoxConfigWithUUID:(NSString *)uuidStr; + + +/// 私有测试接口请勿使用 +/// - Parameter data: 用于测试数据 +/// - Parameter st: 是否开启测试模式 +-(void)pDeviceTest:(NSData *)data Status:(BOOL)st; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLDeviceConfigDongle.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLDeviceConfigDongle.h new file mode 100644 index 000000000..dbdf7def0 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLDeviceConfigDongle.h @@ -0,0 +1,32 @@ +// +// JLDeviceConfigDongle.h +// JL_BLEKit +// +// Created by EzioChan on 2025/11/17. +// Copyright © 2025 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +/// Auracast +@interface JLDeviceConfigDongle : JLDeviceConfigBasic +/// 是否支持Auracast +@property (nonatomic, assign, readonly) BOOL isSupportAuracast; +/// 是否支持接收Auracast +@property (nonatomic, assign, readonly) BOOL isSupportReceiveAuracast; +/// 是否支持发射端 Auracast +@property (nonatomic, assign, readonly) BOOL isSupportLancerAuracast; + +/// 是否支持TWS +/// 说明设备支持TWS设备功能。 +/// 包含设备名称,弹窗快连,按键设置,灯效设置、工作模式等功能; +@property (nonatomic, assign, readonly)BOOL isSupportTwsFunc; + +/// 是否支持重命名 +/// 设备是否支持修改设备名 +@property (nonatomic, assign, readonly)BOOL isSupportRename; +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLDeviceConfigFuncModel.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLDeviceConfigFuncModel.h new file mode 100644 index 000000000..859b621eb --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLDeviceConfigFuncModel.h @@ -0,0 +1,242 @@ +// +// JLDeviceConfigFuncModel.h +// JL_BLEKit +// +// Created by EzioChan on 2022/10/31. +// Copyright © 2022 www.zh-jieli.com. All rights reserved. +// + +#import "ECOneToMorePtl.h" + +NS_ASSUME_NONNULL_BEGIN + +//MARK: - 必须功能 + +/// 必须功能 +@interface JLDeviceBasicFuncModel : NSObject + +/// 支持OTA +@property(nonatomic,assign)BOOL spOTA; + +/// 支持资源更新 +@property(nonatomic,assign)BOOL spSourceUpdate; + +/// 支持表盘增加/删除/查询 +@property(nonatomic,assign)BOOL spDialOperation; + +/// 支持表盘切换 +@property(nonatomic,assign)BOOL spDialSwitch; + +/// 支持表盘预览 +@property(nonatomic,assign)BOOL spDialPreview; + + +-(instancetype)init:(NSData *)data; + +@end + +//MARK: - 系统功能 +/// 系统功能 +@interface JLDeviceSystemFuncModel : NSObject + +/// 支持屏幕设置 +@property(nonatomic,assign)BOOL spScreenSetting; +/// 支持震动强度 +@property(nonatomic,assign)BOOL spVibrationIntensity; +/// 支持勿扰模式 +@property(nonatomic,assign)BOOL spDoNotDisturb; +/// 支持锻炼设置 +@property(nonatomic,assign)BOOL spExerciseSettings; +/// 支持断开提醒 +@property(nonatomic,assign)BOOL spDisconnectReminder; + +-(instancetype)init:(NSData *)data; + +@end + +//MARK: - 功能选项 +/// 功能选项 +@interface JLDeviceExportFuncModel : NSObject +/// 支持常用联系人 +@property(nonatomic,assign)BOOL spTopContacts; +/// 支持音乐文件浏览 +@property(nonatomic,assign)BOOL spMusicFileBrows; +/// 音乐文件删除、传输 +@property(nonatomic,assign)BOOL spMusicFileOp; +/// 支持闹钟设置 +@property(nonatomic,assign)BOOL spAlarmSettings; +/// 支持信息同步 +@property(nonatomic,assign)BOOL spSyncInfo; +/// 支持天气同步 +@property(nonatomic,assign)BOOL spSyncWeather; +/// 支持找手机/设备 +@property(nonatomic,assign)BOOL spFindPhoneOrDevice; +/// Ai 云功能 +@property(nonatomic,assign)BOOL spAiCloud; +/// Ai 表盘 +@property(nonatomic,assign)BOOL spAiDial; +/// 平台接口信息获取 +@property(nonatomic,assign)BOOL spOpenInfo; +/// 支持4G模块 +@property(nonatomic,assign)BOOL sp4GModel; + +/// 支持表盘信息拓展 +@property(nonatomic,assign)BOOL spDialInfoExtend; + +-(instancetype)init:(NSData *)data; + +@end + +//MARK: - 运动健康 + +/// 手表综合功能支持 +@interface JLHealthFuncComprehensive : NSObject + +/// 支持健康监控 +@property(nonatomic,assign)BOOL spHealthMonitor; +/// 支持个人信息 +@property(nonatomic,assign)BOOL spPersonInfo; +/// 支持睡眠检测 +@property(nonatomic,assign)BOOL spSleepMonitor; +/// 支持运动心率提醒 +@property(nonatomic,assign)BOOL spSportHeartRateRemind; +/// 支持久坐提醒 +@property(nonatomic,assign)BOOL spSedentaryRemind; +/// 支持压力自动检测 +@property(nonatomic,assign)BOOL spStressDetection; +/// 支持跌倒检测 +@property(nonatomic,assign)BOOL spFallDetection; +/// 支持传感器设置 +@property(nonatomic,assign)BOOL spSensorSetup; + +-(instancetype)init:(NSData *)data; + +@end + +/// 手表运动模式支持功能 +@interface JLHealthFuncSportModel : NSObject +/// 支持运动记录 +@property(nonatomic,assign)BOOL spRecord; +/// 支持运动统计 +@property(nonatomic,assign)BOOL spStatistics; +/// 支持室外运动 +@property(nonatomic,assign)BOOL spOutdoor; +/// 支持室内运动 +@property(nonatomic,assign)BOOL spIndoor; + +-(instancetype)init:(NSData *)data; +@end + +/// 手表计步功能支持功能 +@interface JLHealthFuncGSensorModel : NSObject +/// 是否存在该传感器 +@property(nonatomic,assign)BOOL spExist; +/// 支持运动步数 +@property(nonatomic,assign)BOOL spStep; + +-(instancetype)init:(NSData *)data; + +@end + + +/// 手表心率功能支持功能 +@interface JLHealthFuncHeartRateModel : NSObject +/// 是否存在该传感器 +@property(nonatomic,assign)BOOL spExist; +/// 支持连续测试 +@property(nonatomic,assign)BOOL spSerialTest; + +-(instancetype)init:(NSData *)data; + +@end + +/// 手表血氧功能支持功能 +@interface JLHealthFuncBloodOxygenModel : NSObject +/// 是否存在该传感器 +@property(nonatomic,assign)BOOL spExist; + +-(instancetype)init:(NSData *)data; + +@end + + +/// 手表海拔功能支持功能 +@interface JLHealthFuncAltitudeModel : NSObject +/// 是否存在该传感器 +@property(nonatomic,assign)BOOL spExist; + +-(instancetype)init:(NSData *)data; + +@end + +/// 手表GPS功能支持功能 +@interface JLHealthFuncGPSModel : NSObject +/// 是否存在该传感器 +@property(nonatomic,assign)BOOL spExist; + +-(instancetype)init:(NSData *)data; + +@end + + + +@interface JLDeviceHealthFuncModel : NSObject + +/// 手表综合功能支持 +@property(nonatomic,strong)JLHealthFuncComprehensive *spComprehensive; +/// 手表运动模式支持功能 +@property(nonatomic,strong)JLHealthFuncSportModel *spSportModel; +/// 手表计步功能支持功能 +@property(nonatomic,strong)JLHealthFuncGSensorModel *spGSensor; +/// 手表心率功能支持功能 +@property(nonatomic,strong)JLHealthFuncHeartRateModel *spHeartRate; +/// 手表血氧功能支持功能 +@property(nonatomic,strong)JLHealthFuncBloodOxygenModel *spBloodOxygen; +/// 手表海拔功能支持功能 +@property(nonatomic,strong)JLHealthFuncAltitudeModel *spAltitude; +/// 手表GPS功能支持功能 +@property(nonatomic,strong)JLHealthFuncGPSModel *spGPS; + +-(instancetype)init:(NSData *)data; + +@end + +//MARK: - 设备配置信息 + +/// 设备配置信息 +@interface JLDeviceConfigBasic:NSObject +/// 产品标志类型 +/// 0 - 手表 +/// 1 - TWS耳机 +/// 2 - SoundBox +/// 3 - Dongle 设备配置信息 +@property(nonatomic,assign)int deviceType; +/// 版本 +@property(nonatomic,assign)int version; + +/// 数据 +@property(nonatomic,copy)NSData *basicData; + +/// 功能配置所属设备的UUID +@property(nonatomic,strong)NSString * _Nullable mbleIdentifyStr; + +-(instancetype)init:(NSData *)data; + +@end + +//MARK: - 手表配置信息数据结构解析 + +/// 手表配置信息数据结构 +@interface JLDeviceConfigModel:JLDeviceConfigBasic +/// - 必须功能 +@property(nonatomic,strong)JLDeviceBasicFuncModel *basicFunc; +/// - 系统功能 +@property(nonatomic,strong)JLDeviceSystemFuncModel *systemFunc; +/// - 功能选项 +@property(nonatomic,strong)JLDeviceExportFuncModel * exportFunc; +/// - 运动健康 +@property(nonatomic,strong)JLDeviceHealthFuncModel *healthFunc; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLDeviceConfigSoundBox.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLDeviceConfigSoundBox.h new file mode 100644 index 000000000..b7f1bac94 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLDeviceConfigSoundBox.h @@ -0,0 +1,31 @@ +// +// JLDeviceConfigSoundBox.h +// JL_BLEKit +// +// Created by EzioChan on 2025/11/21. +// Copyright © 2025 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface JLDeviceConfigSoundBox : JLDeviceConfigBasic +/// 是否支持Auracast +@property (nonatomic, assign, readonly) BOOL isSupportAuracast; +/// 是否支持接收Auracast +@property (nonatomic, assign, readonly) BOOL isSupportReceiveAuracast; +/// 是否支持发射端 Auracast +@property (nonatomic, assign, readonly) BOOL isSupportLancerAuracast; +/// 是否支持TWS +/// 说明设备支持TWS设备功能。 +/// 包含设备名称,弹窗快连,按键设置,灯效设置、工作模式等功能; +@property (nonatomic, assign, readonly)BOOL isSupportTwsFunc; + +/// 是否支持重命名 +/// 设备是否支持修改设备名 +@property (nonatomic, assign, readonly)BOOL isSupportRename; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLDeviceConfigTws.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLDeviceConfigTws.h new file mode 100644 index 000000000..8cc50200d --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLDeviceConfigTws.h @@ -0,0 +1,59 @@ +// +// JLDeviceConfigTws.h +// JL_BLEKit +// +// Created by EzioChan on 2024/1/23. +// Copyright © 2024 www.zh-jieli.com. All rights reserved. +// + +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +/// TWS设备配置 +@interface JLDeviceConfigTws : JLDeviceConfigBasic + +/// 是否支持替换提示音 +@property(nonatomic, assign)BOOL isSupportReplaceTipsVoice; + +/// 是否支持语音翻译 +/// Voice translation +@property(nonatomic,assign,readonly)BOOL isSupportTranslate; + +/// 是否使用A2DP播放 +/// 翻译耳机功能扩展 +/// is use A2DP to play +@property(nonatomic,assign,readonly)BOOL isUseA2DP; + +/// 是否支持Opus立体声 +@property(nonatomic,assign,readonly)BOOL isSupportOpusStereo; + +/// 是否支持耳机健康功能 +/// is support ear health +@property(nonatomic,assign, readonly)BOOL isSupportHealthData; + +/// 是否支持Auracast +@property (nonatomic, assign, readonly) BOOL isSupportAuracast; + +/// 是否支持接收Auracast +@property (nonatomic, assign, readonly) BOOL isSupportReceiveAuracast; + +/// 是否支持发射端 Auracast +@property (nonatomic, assign, readonly) BOOL isSupportLancerAuracast; + +/// 是否支持心跳机制 +@property (nonatomic, assign, readonly) BOOL isSupportHeartBeat; + +/// 是否支持TWS +/// 说明设备支持TWS设备功能。 +/// 包含设备名称,弹窗快连,按键设置,灯效设置、工作模式等功能; +@property (nonatomic, assign, readonly)BOOL isSupportTwsFunc; + +/// 是否支持重命名 +/// 设备是否支持修改设备名 +@property (nonatomic, assign, readonly)BOOL isSupportRename; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLDhaFitting.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLDhaFitting.h new file mode 100644 index 000000000..61570c0e2 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLDhaFitting.h @@ -0,0 +1,111 @@ +// +// JLDhaFitting.h +// JL_BLEKit +// +// Created by EzioChan on 2022/6/28. +// Copyright © 2022 www.zh-jieli.com. All rights reserved. +// + +#import +#import + +NS_ASSUME_NONNULL_BEGIN + + + +@class JL_ManagerM; + +/// 左右声道类型 +typedef NS_ENUM(UInt8, DhaChannel) { + ///左声道 + DhaChannel_left = 0x00, + ///右声道 + DhaChannel_right = 0x01 +}; + +/// 左右耳验配类型 +typedef NS_ENUM(UInt8, DhaFittingType) { + ///验配左耳 + DhaFittingType_left = 0x00, + ///验配右耳 + DhaFittingType_right = 0x00, + ///验配左右耳 + DhaFittingType_All = 0x00, +}; + + +/// 辅听耳机的信息 +@interface DhaFittingInfo : NSObject +/// /*版本号:DHA_FITTING_VERSION*/ +@property(nonatomic,assign)uint8_t version; +/// /*通道数:DHA_FITTING_CHANNEL_MAX*/ +@property(nonatomic,assign)uint8_t ch_num; +/// /*通道频率组:获取通道对应的freq*/ +@property(nonatomic,strong)NSArray *ch_freq; + +- (instancetype)initWithData:(NSData *)basicData; + +@end + +@interface DhaFittingSwitch : NSObject + +@property(nonatomic,assign)BOOL leftOn; + +@property(nonatomic,assign)BOOL rightOn; + +@end + + +/// 辅听验配对象 +@interface DhaFittingData : NSObject +/// 左右声道 +@property(nonatomic,assign)DhaChannel channel; + +/// 左开关 +@property(nonatomic,assign)BOOL leftOn; +/// 右开关 +@property(nonatomic,assign)BOOL rightOn; + +/// 保留位 +@property(nonatomic,assign)uint8_t reserved; +/// 通道频率 +@property(nonatomic,assign)uint16_t freq; +/// 通道增益 +@property(nonatomic,assign)float gain; + +-(NSData*)beData; + +@end + + +typedef void(^DhaInfoBlock)(DhaFittingInfo *info,NSArray *gains); + + +@interface JLDhaFitting : NSObject + +/// 获取设备当前辅听的基础信息 +/// @param result 辅听耳机信息 +/// @param manager manager ++(void)auxiGetInfo:(DhaInfoBlock)result Manager:(JL_ManagerM*)manager; + +/// 进行辅听验配 +/// @param dhaFit 辅听设置对象 +/// @param manager manager +/// @param result 设备工作状态回调 +-(void)auxiCheckByStep:(DhaFittingData *)dhaFit Manager:(JL_ManagerM*)manager Result:(JL_CMD_RESPOND __nullable)result; + +/// 退出辅听验配 +/// @param manager 命令对象 +/// @param result 设备工作状态回调 +-(void)auxiCloseManager:(JL_ManagerM*)manager Result:(JL_CMD_RESPOND __nullable)result; + +/// 保存验配设置 +/// @param gains 验配的增益数组 +/// @param manager manager +/// @param type 左右耳类型 +/// @param result 回调结果 +-(void)auxiSaveGainsList:(NSArray *) gains Manager:(JL_ManagerM*)manager Type:(DhaFittingType)type Result:(JL_CMD_RESPOND __nullable)result; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLDialInfoExtentManager.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLDialInfoExtentManager.h new file mode 100644 index 000000000..c434e30f0 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLDialInfoExtentManager.h @@ -0,0 +1,38 @@ +// +// JLDialInfoExtentManager.h +// JL_BLEKit +// +// Created by EzioChan on 2024/2/20. +// Copyright © 2024 www.zh-jieli.com. All rights reserved. +// + +#import +#import "JL_TypeEnum.h" + +@class JLDialInfoExtentedModel; +@class JL_ManagerM; + +NS_ASSUME_NONNULL_BEGIN + +/// 表盘信息扩展内容回调 +/// Dial information extended content block +typedef void(^JLDialInfoExtentedBlock)(JL_CMDStatus status,JLDialInfoExtentedModel *_Nullable op); + +/// 请求设备表盘信息扩展内容类 +/// Request device dial information extended content class +@interface JLDialInfoExtentManager : NSObject + +/// 单例 +/// Single ++(instancetype)share; + +/// 开始请求表盘信息扩展内容 +/// Start request dial information extended content +/// - Parameters: +/// - manager: 设备 - Device manager +/// - block: 状态回调 - Dial information extended content block +-(void)getDialInfoExtented:(JL_ManagerM *)manager result:(JLDialInfoExtentedBlock)block; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLDialInfoExtentedModel.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLDialInfoExtentedModel.h new file mode 100644 index 000000000..f5c51807c --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLDialInfoExtentedModel.h @@ -0,0 +1,77 @@ +// +// JLDialInfoExtentedModel.h +// JL_BLEKit +// +// Created by EzioChan on 2024/2/20. +// Copyright © 2024 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@class JL_ManagerM; + +/// 设备表盘拓展信息 +/// device dial information extended model +@interface JLDialInfoExtentedModel : NSObject + + +/// 屏幕形状 +/// shape of screen +/// 默认形状 0x01 +/// default 0x01 circular +/// 0x01 - 圆形 circular +/// 0x02 - 矩形 rectangle +/// 0x03 - 圆角矩形 rounded rectangle +@property(nonatomic, assign) uint8_t shape; + + +/// 圆形半径 +/// radius of circle +@property(nonatomic, assign) CGFloat radius; + +/// 背景颜色 +/// background color +/// default is clean color +@property(nonatomic, strong) UIColor *backgroundColor; + +/// 屏幕尺寸 +/// 此项默认值为(240 * 240) +/// default is (240 * 240) +/// device screen sice +@property(nonatomic, assign) CGSize size; + +/// 是否支持多媒体(视频/GIF) +/// is support medias +@property(nonatomic, assign) BOOL isSupportMedias; + +/// 最大帧率(当支持多媒体时才有意义) +/// max fps +@property(nonatomic, assign) NSInteger maxFPS; + +/// 最大时长 +/// max duration +@property(nonatomic, assign) NSInteger maxDuration; + +/// 是否支持动画 ani 格式 +/// is support animation +@property(nonatomic, assign) BOOL isSupportAni; + +/// 是否支持视频 avi 格式 +@property(nonatomic, assign) BOOL isSupportAvi; + +/// 是否支持 Gif 格式 +/// is support gif +@property(nonatomic, assign) BOOL isSupportGif; + + +/// 初始化 +/// initialize +/// - Parameter data: 数据 data +/// - Returns: 实例 +-(instancetype)initWithData:(NSData *)data Manager:(JL_ManagerM*)manager; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLDisconnectRemindModel.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLDisconnectRemindModel.h new file mode 100644 index 000000000..e799fb084 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLDisconnectRemindModel.h @@ -0,0 +1,26 @@ +// +// JLDisconnectRemindModel.h +// JL_BLEKit +// +// Created by EzioChan on 2021/10/12. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import "JLwSettingModel.h" + +NS_ASSUME_NONNULL_BEGIN + +/// 手表蓝牙断开提醒设置 +@interface JLDisconnectRemindModel : JLwSettingModel +//开关 +@property(nonatomic,assign)BOOL status; +/// 提醒模式 +@property(nonatomic,assign)WatchRemindType rType; + +-(instancetype)initWithData:(NSData *)data; + +- (instancetype)initWithModel:(WatchRemindType)type Status:(BOOL)status; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLEcTimerHelper.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLEcTimerHelper.h new file mode 100644 index 000000000..57e83573f --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLEcTimerHelper.h @@ -0,0 +1,33 @@ +// +// JLEcTimerHelper.h +// JL_BLEKit +// +// Created by EzioChan on 2025/3/13. +// Copyright © 2025 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface JLEcTimerHelper : NSObject +/// 创建单次定时器 ++ (NSString *)startTimerWithTimeout:(NSTimeInterval)timeout completion:(void (^)(NSString *timerID))completion; + +/// 创建重复定时器 ++ (NSString *)setInterval:(NSTimeInterval)interval completion:(void (^)(NSString *timerID))completion; + +/// 停止定时器 ++ (void)stopTimer:(NSString *)timerID; + +/// 停止所有定时器 ++ (void)stopAllTimers; + +/// 开始计算耗时 ++ (NSUUID *)startCalculateTime; + +/// 停止计算耗时 ++ (NSTimeInterval) stopCalculateTime:(NSUUID *)uuid; +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLEmergencyContactModel.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLEmergencyContactModel.h new file mode 100644 index 000000000..ca5e0e6bc --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLEmergencyContactModel.h @@ -0,0 +1,26 @@ +// +// JLEmergencyContactModel.h +// JL_BLEKit +// +// Created by EzioChan on 2022/2/17. +// Copyright © 2022 www.zh-jieli.com. All rights reserved. +// + +#import "JLwSettingModel.h" + +NS_ASSUME_NONNULL_BEGIN + +/// 紧急联系人设置 +@interface JLEmergencyContactModel : JLwSettingModel + +/// 联系电话 +@property(nonatomic,strong)NSString *phoneNumber; + +-(instancetype)initWithData:(NSData *)data; + +-(instancetype)initWithPhoneNumber:(NSString *)phoneNumber; + + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLExerciseHeartRateRemindModel.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLExerciseHeartRateRemindModel.h new file mode 100644 index 000000000..f88b192e1 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLExerciseHeartRateRemindModel.h @@ -0,0 +1,31 @@ +// +// JLExerciseHeartRateRemindModel.h +// JL_BLEKit +// +// Created by EzioChan on 2021/10/12. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import "JLwSettingModel.h" +#import "JLWatchEnum.h" +NS_ASSUME_NONNULL_BEGIN + +/// 运动心率提醒设置 +@interface JLExerciseHeartRateRemindModel : JLwSettingModel +///开关 +@property(nonatomic,assign)BOOL status; +/// 上限心率0~255 +@property(nonatomic,assign)uint8_t maxRate; + +/// 心率区间划分方式: +/// 0x00:最大心率百分比 +/// 0x01:存储心率百分比s +@property(nonatomic,assign)WatchHeartRateType way; + +-(instancetype)initWithWay:(WatchHeartRateType)way maxRate:(uint8_t)max switchStatus:(BOOL)status; + +-(instancetype)initWithData:(NSData *)data; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLFallDetectionModel.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLFallDetectionModel.h new file mode 100644 index 000000000..fc9367ffb --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLFallDetectionModel.h @@ -0,0 +1,32 @@ +// +// JLFallDetectionModel.h +// JL_BLEKit +// +// Created by EzioChan on 2021/10/12. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import "JLwSettingModel.h" + +NS_ASSUME_NONNULL_BEGIN + +/// 跌到监测设置 +@interface JLFallDetectionModel : JLwSettingModel +///开关 +@property(nonatomic,assign)BOOL status; +/// 提醒模式 +@property(nonatomic,assign)WatchRemindType rType; +/// 电话号码 +@property(nonatomic,strong,readonly)NSString *phoneNumber; + +-(instancetype)initWithData:(NSData *)data; + +/// 构建一个跌倒监测的设置对象 +/// @param type 提醒类型 +/// @param status 开关 +/// @param pn 电话号码 +- (instancetype)initWithModel:(WatchRemindType)type Status:(BOOL)status phoneNumber:(NSString * _Nullable)pn; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLFlashOpMgr.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLFlashOpMgr.h new file mode 100644 index 000000000..af6fc6185 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLFlashOpMgr.h @@ -0,0 +1,163 @@ +// +// JLFlashOpMgr.h +// JL_BLEKit +// +// Created by EzioChan on 2025/3/14. +// Copyright © 2025 www.zh-jieli.com. All rights reserved. +// + +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +/// 表盘操作类型 +typedef NS_ENUM(NSUInteger, FlashDialOperationType) { + ///< 读取当前表盘 + FlashDialOperationTypeReadCurrent = 0, + ///< 设置表盘 + FlashDialOperationTypeSet, + ///< 通知表盘 + FlashDialOperationTypeNotify, + ///< 获取表盘额外信息 + FlashDialOperationTypeGetExtraInfo, + ///< 激活自定义表盘(设置表盘背景) + FlashDialOperationTypeActivateCustom, + ///< 获取表盘背景 + FlashDialOperationTypeGetBackground, + /// 通知表盘背景变更 + FlashDialOperationTypeNoteBackground +}; + +/// 设备 Flash 操作 +@interface JLFlashOpMgr : NSObject + +/// 超时 +@property(nonatomic, assign)NSInteger timeOutMax; + +/// 获取Flash信息 +/// - Parameters: +/// - managerM: 蓝牙管理对象 +/// - result: 回调 +-(void)flashGetInfoMode:(JL_ManagerM *)managerM + Result:(void (^)(JLModel_Flash *_Nullable model, NSError *_Nullable error))result; +/// 写数据 +/// @param managerM 蓝牙管理器 +/// @param offset 偏移 +/// @param data 写入数据 +/// @param isLast 是否是最后一次 +/// @param result 回调 +- (void)flashWriteData:(JL_ManagerM *)managerM + Offset:(uint32_t)offset + Data:(NSData*)data + isLast:(BOOL)isLast + Result:(void (^)(BOOL success, NSError *error))result; +/// 插入文件 +/// @param managerM 蓝牙管理器 +/// @param fileName 文件名称 +/// @param fileSize 文件大小 +/// @param isLast 是否是最后一次 +/// @param result 回调 +- (void)flashInsertFile:(JL_ManagerM *)managerM + fileName:(NSString *)fileName + fileSize:(uint32_t)fileSize + isLast:(BOOL)isLast + Result:(void (^)(BOOL, NSError * _Nullable error))result; +/// 操作表盘 +/// @param managerM 蓝牙管理器 +/// @param type 操作类型 +/// @param filePath 文件路径 +/// @param result 回调 +- (void)flashDialOperation:(JL_ManagerM *)managerM + type:(FlashDialOperationType)type + filePath:(nullable NSString *)filePath + result:(void (^)(BOOL success, NSData *_Nullable response, NSError *_Nullable error))result; +/// 擦除数据 +/// @param managerM 蓝牙管理器 +/// @param offset 偏移 +/// @param clusterSize 簇大小 +/// @param result 回调 +- (void)flashEraseData:(JL_ManagerM *)managerM + Offset:(uint32_t)offset + ClusterSize:(uint16_t)clusterSize + Result:(void (^)(BOOL success, NSError *_Nullable error))result; + +/// 删除文件 +/// @param managerM 蓝牙管理器 +/// @param filePath 文件路径 +/// @param isStart 是否是最后一次 +/// @param result 回调 +- (void)flashDeleteFile:(JL_ManagerM *)managerM + FilePath:(nullable NSString *)filePath + isStart:(BOOL)isStart + Result:(void (^)(BOOL success, NSError *_Nullable error))result; +/// 写保护 +/// @param managerM 蓝牙管理器 +/// @param isEnable 是否启用 +/// @param result 回调 +- (void)flashWriteProtect:(JL_ManagerM *)managerM + isEnable:(BOOL)isEnable + Result:(void (^)(BOOL success, NSError *_Nullable error))result; +/// 更新表盘标记 +/// @param managerM 蓝牙管理器 +/// @param isStart 是否开启 +/// @param result 回调 +- (void)flashUpdateWatchFace:(JL_ManagerM *)managerM + isStart:(BOOL)isStart + Result:(void (^)(BOOL success, NSError *_Nullable error))result; +/// 查询写入是否成功 版本 0 +/// @param managerM 蓝牙管理器 +/// @param crc16 crc +/// @param result 回调 +- (void)flashCheckWriteSuccessV0:(JL_ManagerM *)managerM + crc16:(uint16_t)crc16 + Result:(void (^)(BOOL success, NSError *_Nullable error))result; + +/// 查询写入是否成功 版本 1 +/// @param managerM 蓝牙管理器 +/// @param crc16 crc +/// @param isSplit 是否分包 +/// @param result 回调 +- (void)flashCheckWriteSuccessV1:(JL_ManagerM *)managerM + crc16:(uint16_t)crc16 + isSplit:(BOOL)isSplit + Result:(void (^)(BOOL success, uint16_t leftSize, NSError *_Nullable error))result; +/// 设置升级资源标志 +/// @param managerM 蓝牙管理器 +/// @param flag flag 0-2 +/// flag 0:结束 +/// flag 1:开始 +/// flag 2:特殊升级流程开启 +/// @param result 回调 +- (void)flashSetUpgradeFlag:(JL_ManagerM *)managerM + flag:(uint8_t)flag + result:(void (^)(BOOL success, NSError *_Nullable error))result; +/// 获取文件信息 +/// @param managerM 蓝牙管理器 +/// @param filePath 文件路径 +/// @param result 回调 +- (void)flashGetFileInfo:(JL_ManagerM *)managerM + filePath:(NSString *)filePath + result:(void (^)(uint32_t size, uint16_t crc16, NSError *_Nullable error))result; + +/// 获取 Flash 剩余空间 +/// @param managerM 蓝牙管理器 +/// @param result 回调 +- (void)flashGetRemainingSpace:(JL_ManagerM *)managerM + result:(void (^)(uint32_t clusterLeftNum, NSError *_Nullable error))result; +/// 还原系统 +/// @param managerM 蓝牙管理器 +/// @param result 回调 +- (void)flashRestoreSystem:(JL_ManagerM *)managerM + result:(void (^)(BOOL success, NSError *_Nullable error))result; + +/// 获取资源存储空间 +/// @param managerM 蓝牙管理器 +/// @param result 回调 +- (void)flashGetResourceSpace:(JL_ManagerM *)managerM + result:(void (^)(uint32_t resSpace, NSError *_Nullable error))result; + +@end + + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLHttpHelper.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLHttpHelper.h new file mode 100644 index 000000000..765483722 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLHttpHelper.h @@ -0,0 +1,24 @@ +// +// HttpHelper.h +// JL_BLEKit +// +// Created by EzioChan on 2022/7/2. +// Copyright © 2022 www.zh-jieli.com. All rights reserved. +// + +#import + +typedef void(^JLHttpDataCbk)(NSData * _Nullable data); +NS_ASSUME_NONNULL_BEGIN + +@interface JLHttpHelper : NSObject + ++(instancetype)share; + +-(void)dataTask:(NSURL *)url Result:(JLHttpDataCbk)result; + +-(NSData *)dataTaskSync:(NSURL *)url; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLModelCardInfo.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLModelCardInfo.h new file mode 100644 index 000000000..2377846ae --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLModelCardInfo.h @@ -0,0 +1,109 @@ +// +// JLModelCardInfo.h +// JL_BLEKit +// +// Created by EzioChan on 2023/11/30. +// Copyright © 2023 www.zh-jieli.com. All rights reserved. +// + +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface JLCardInfo : NSObject + +/// 存储类型 +/// 0x00 USB +/// 0x01 SD0 +/// 0x02 SD1 +/// 0x03 flash +/// 0x04 lineIn +/// 0x05 flash2 +/// 0x06 flash3 +/// 0x07 ReservedArea +@property(nonatomic,assign)uint8_t type; + +/// 是否在线 +@property(nonatomic,assign)BOOL isOnline; + +/// 文件句柄 +@property(nonatomic,copy)NSData *handle; + +@end + +/// 存储卡信息 +@interface JLModelCardInfo:NSObject + +/// 版本信息 +@property(nonatomic,assign)uint8_t version; + +/// 存储卡在线数组 +@property(nonatomic,strong,readonly)NSArray *cardArray; + +/// USB 在线状态 +@property (nonatomic, assign) BOOL usbOnline; + +/// SD0 在线状态 +@property (nonatomic, assign) BOOL sd0Online; + +/// SD1 在线状态 +@property (nonatomic, assign) BOOL sd1Online; + +/// lineIn 在线状态 +@property (nonatomic, assign) BOOL lineInOnline; + +/// flash 在线状态 +@property (nonatomic, assign) BOOL flashOnline; + +/// flash 2 在线状态 +@property (nonatomic, assign) BOOL flash2Online; + +/// flash 3 在线状态 +@property (nonatomic, assign) BOOL flash3Online; + +/// ReservedArea 在线状态 +@property (nonatomic, assign) BOOL reservedAreaOnline; + +/// 是否处于设备复用状态 +@property (nonatomic, assign) BOOL isComplex; + +/// USB 句柄 +@property (nonatomic, copy)NSData *usbHandle; + +/// SD0 句柄 +@property (nonatomic, copy)NSData *sd0Handle; + +/// SD1 句柄 +@property (nonatomic, copy)NSData *sd1Handle; + +/// flash 句柄 +@property (nonatomic, copy)NSData *flashHandle; + +/// flash2 句柄 +@property (nonatomic, copy)NSData *flash2Handle; + +/// flash3 句柄 +@property (nonatomic, copy)NSData *flash3Handle; + +/// ReservedArea 句柄 +@property (nonatomic, copy)NSData *reservedAreaHandle; + +/// 卡在线数组信息 +@property (nonatomic, strong)NSArray *cardInfos; + +-(instancetype)initData:(NSData *)data; + +/// 是否具备存储卡在线 +-(BOOL)hasStorageCard; + +/// 获取存储卡句柄 +/// - Parameter cardType: 存储卡类型 +-(NSData *_Nullable)getCardHandle:(JL_CardType)cardType; + +@end + + + + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLModelDevFunc.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLModelDevFunc.h new file mode 100644 index 000000000..c57d0ed32 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLModelDevFunc.h @@ -0,0 +1,70 @@ +// +// JLModelDevFunc.h +// JL_BLEKit +// +// Created by EzioChan on 2023/11/29. +// Copyright © 2023 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface JLModelDevFunc : NSObject + +/// 当前模式 +/// 0x16代表低功耗模式) +@property (nonatomic, assign) uint8_t currentModel; + +/// 设备是否支持蓝牙(EDR) +@property (nonatomic, assign) BOOL isSupportEDR; + +/// 设备是否支持音乐模式 +@property (nonatomic, assign) BOOL isSupportDevMusic; + +/// 设备是否支持 RTC +@property (nonatomic, assign) BOOL isSupportDevRTC; + +/// 设备是否支持 LineIn +@property (nonatomic, assign) BOOL isSupportDevLineIn; + +/// 设备是否支持 FM +@property (nonatomic, assign) BOOL isSupportDevFm; + +/// 设备是否支持氛围灯 +@property (nonatomic, assign) BOOL isSupportDevLight; + +/// 设备是否支持 FMTX +@property (nonatomic, assign) BOOL isSupportDevFMTX; + +/// 设备是否支持 EQ +@property (nonatomic, assign) BOOL isSupportDevEQ; + +/// 设备是否支持 SPDIF +@property (nonatomic, assign, readonly) BOOL isSupportSPDIF; + +/// 设备是否支持 PC Server +@property (nonatomic, assign, readonly) BOOL isSupportPCServer; + +/// 是否显示不在线的usb 、sd、linein功能 +@property (nonatomic, assign) BOOL isShowOfflineFunc; + +/// 设备是否持有 USB +@property (nonatomic, assign) BOOL isSupportUSB; + +/// 设备是否持有 SD0 +@property (nonatomic, assign) BOOL isSupportSD0; + +/// 设备是否持有 SD1 +@property (nonatomic, assign) BOOL isSupportSD1; + +/// 设备是否支持网络电台 +@property (nonatomic, assign) BOOL isSupportNetRadio; + +-(instancetype)initWithData:(NSData *)data; + +@end + + + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLModelNoiseDetection.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLModelNoiseDetection.h new file mode 100644 index 000000000..5b61f6797 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLModelNoiseDetection.h @@ -0,0 +1,49 @@ +// +// JLModelNoiseDetection.h +// JL_BLEKit +// +// Created by EzioChan on 2023/9/13. +// Copyright © 2023 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN +@class JLModelNoiseDetection; + +@protocol JLModelNoiseDetectionDelegate + +-(void)noiseDetectionGetInfo:(JLModelNoiseDetection *)model; + +@end + +typedef void(^JLModelNoiseDetectionBlock)(JLModelNoiseDetection *model); + +/// TWS风噪检测 +@interface JLModelNoiseDetection : JLCmdBasic + +/// 版本号 +@property(nonatomic,assign)uint8_t version; + +/// 风噪检测: +/// 0x00:关闭 +/// 0x01:开启 +@property(nonatomic,assign)uint8_t status; + +@property(nonatomic,weak)id delegate; + +/// 获取设备风噪检测 +/// - Parameter manager: 设备对象 +-(void)noiseDetectionStatusGet:(JL_ManagerM *)manager Result:(JLModelNoiseDetectionBlock)block; + +/// 设置设备风噪检测 +/// - Parameters: +/// - manager: 设备对象 +/// - status: 开关 +/// - result:回调 +-(void)noiseDetectionStatusSet:(JL_ManagerM *)manager Status:(uint8_t)status Result:(JL_CMD_RESPOND)result; + + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLModelPCServer.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLModelPCServer.h new file mode 100644 index 000000000..81ba71421 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLModelPCServer.h @@ -0,0 +1,39 @@ +// +// JLModelPCServer.h +// JL_BLEKit +// +// Created by EzioChan on 2024/10/15. +// Copyright © 2024 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +typedef NS_ENUM(NSUInteger, JLPcServerOpType) { + /// previous song + /// 上一首 + JLPcServerOpTypePrevious = 0x00, + /// next song + /// 下一首 + JLPcServerOpTypeNext = 0x01, +}; + +/// PC 从机模式 +@interface JLModelPCServer : NSObject + +/// 是否正在播放 +@property(nonatomic,assign)BOOL playStatus; + +/// 操作类型 +@property(nonatomic,assign)JLPcServerOpType opType; + +-(instancetype)initParseData:(NSData *)data; + +/// 更新 +/// - Parameter data: 数据 +- (void)updateParseData:(NSData *)data; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLModelSceneNoiseReduction.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLModelSceneNoiseReduction.h new file mode 100644 index 000000000..80963a2ee --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLModelSceneNoiseReduction.h @@ -0,0 +1,51 @@ +// +// JLModelSceneNoiseReduction.h +// JL_BLEKit +// +// Created by EzioChan on 2023/9/13. +// Copyright © 2023 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN +@class JLModelSceneNoiseReduction; + +@protocol JLModelSceneNoiseReductionDelegate + +-(void)sceneNoiseReductionGetInfo:(JLModelSceneNoiseReduction *)model; + +@end + +typedef void(^JLSceneNoiseReductionBlock)(JLModelSceneNoiseReduction *model); + +/// TWS场景降噪 +@interface JLModelSceneNoiseReduction : JLCmdBasic + +/// 版本号 +@property(nonatomic,assign)uint8_t version; + +/// 场景降噪模式: +/// 0x00:智能 +/// 0x01:轻度 +/// 0x02:均衡 +/// 0x03:深度 +@property(nonatomic,assign)uint8_t scene; + +@property(nonatomic,weak)id delegate; + +/// 获取设备场景降噪 +/// - Parameter manager: 设备对象 +-(void)sceneNoiseStatusGet:(JL_ManagerM *)manager Result:(JLSceneNoiseReductionBlock)block; + +/// 设置设备场景降噪 +/// - Parameters: +/// - manager: 设备对象 +/// - scene: 场景降噪 +/// - result:回调 +-(void)sceneNoiseStatusSet:(JL_ManagerM *)manager Scene:(uint8_t)scene Result:(JL_CMD_RESPOND)result; + + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLModelSmartPickFree.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLModelSmartPickFree.h new file mode 100644 index 000000000..cc0c0c24c --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLModelSmartPickFree.h @@ -0,0 +1,93 @@ +// +// JLModelSmartPickFree.h +// JL_BLEKit +// +// Created by EzioChan on 2023/9/12. +// Copyright © 2023 www.zh-jieli.com. All rights reserved. +// + +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +@class JL_ManagerM; +@class JLModelSmartPickFree; + +@protocol JLModelSmartPickFreeDelegate + +-(void)smartPickFreeGetInfo:(JLModelSmartPickFree *)model; + +@end + +/// 智能免摘的耳机管理类 +@interface JLModelSmartPickFree : NSObject + +/// 版本号 +@property(nonatomic,assign)uint8_t version; + +/// 功能类型 +/// 0x00:仅设置开关 +/// 0x01:仅设置灵敏度 +/// 0x02:仅设置启动后关闭时间 +/// 0xff:仅获取全部参数 +@property(nonatomic,assign)uint8_t funcType; + +/// 功能开关 +/// 当功能类型 funcType 为 0x00 时此属性需要对应设置 +/// 当功能类型 funcType 为 0xFF 时此属性为设备端功能开关状态 +@property(nonatomic,assign)BOOL funcStatus; + +/// 灵敏度 +/// 当功能类型 funcType 为 0x01 时此属性需要对应设置 +/// 当功能类型 funcType 为 0xFF 时此属性为设备端灵敏度 +/// 0x00:高灵敏度 +/// 0x01:低灵敏度 +@property(nonatomic,assign)uint8_t senivitiy; + +///启动后关闭时间 +///当功能类型 funcType 为 0x02 时此属性需要对应设置的时间 +///当功能类型 funcType 为 0xFF 时此属性为设备端启动后关闭时间 +///0x00:不自动关闭; +///0x01:短(5s); +///0x02:标准(15s); +///0x03:长(30s); +@property(nonatomic,assign)uint8_t autoInterval; + + +@property(nonatomic,weak)id delegate; + +/// 设置智能免摘功能开关 +/// - Parameters: +/// - manager: 设备对象 +/// - status: 开关 +/// - result: 结果回调 +-(void)smartPickFreeSetOn:(JL_ManagerM *)manager st:(BOOL)status Result:(JL_CMD_RESPOND)result; + +/// 设置智能免摘灵敏度 +/// - Parameters: +/// - manager: 设备对象 +/// - senivitiy: 灵敏度 +/// 0x00:高灵敏度 +/// 0x01:低灵敏度 +/// - result: 结果回调 +-(void)smartPickFreeSetSenivitiy:(JL_ManagerM *)manager Senivitiy:(uint8_t)senivitiy Result:(JL_CMD_RESPOND)result; + +/// 设置智能免摘启动后关闭时间 +/// - Parameters: +/// - manager: 设备对象 +/// - interval: 启动后关闭时间 +/// 0x01:短(5s); +/// 0x02:标准(15s); +/// 0x03:长(30s); +/// - result: 结果回调 +-(void)smartPickFreeSetAutoInterval:(JL_ManagerM *)manager Interval:(uint8_t)interval Result:(JL_CMD_RESPOND)result; + + +/// 查询设备状态 +/// - Parameter manager: 设备对象 +-(void)smartPickFreeGet:(JL_ManagerM *)manager; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLModelSpdif.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLModelSpdif.h new file mode 100644 index 000000000..da4007b33 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLModelSpdif.h @@ -0,0 +1,38 @@ +// +// JLModelSpdif.h +// JL_BLEKit +// +// Created by EzioChan on 2024/10/15. +// Copyright © 2024 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +typedef NS_ENUM(NSUInteger, JLSpdifAudioType) { + /// HDMI + JLSpdifAudioTypeHDMI = 0x00, + /// 光纤 Fiber Optics + JLSpdifAudioTypeFO = 0x01, + /// 同轴 + JLSpdifAudioTypeCoaxial = 0x02, +}; + +@interface JLModelSpdif : NSObject + +/// 是否正在播放 +@property(nonatomic,assign)BOOL playStatus; + +/// 音源 +@property(nonatomic,assign)JLSpdifAudioType audioType; + +-(instancetype)initParseData:(NSData *)data; + +/// 更新数据 +/// - Parameter data: 数据 +-(void)updateParseData:(NSData *)data; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLModelVocalBoost.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLModelVocalBoost.h new file mode 100644 index 000000000..0a64173cd --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLModelVocalBoost.h @@ -0,0 +1,54 @@ +// +// JLModelVocalBoost.h +// JL_BLEKit +// +// Created by EzioChan on 2023/9/13. +// Copyright © 2023 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + + +@class JLModelVocalBoost; + +@protocol JLModelVocalBoostDelegate + +-(void)vocalBoostGetInfo:(JLModelVocalBoost *)model; + +@end + +typedef void(^JLModelVocalBoostBlock)(JLModelVocalBoost *model); + + +/// TWS人声增强 +@interface JLModelVocalBoost : JLCmdBasic + +/// 版本号 +@property(nonatomic,assign)uint8_t version; + +/// 人声增强: +/// 0x00: 关闭人声增强模式; +/// 0x01: 开启人声增强模式 +@property(nonatomic,assign)uint8_t status; + +@property(nonatomic,weak)id delegate; + +/// 获取设备人声增强 +/// - Parameter manager: 设备对象 +-(void)vocalBoostStatusGet:(JL_ManagerM *)manager Result:(JLModelVocalBoostBlock)block; + +/// 设置设备人声增强 +/// - Parameters: +/// - manager: 设备对象 +/// - status: 开关 +/// 0x00: 关闭人声增强模式; +/// 0x01: 开启人声增强模式 +/// - result:回调 +-(void)vocalBoostStatusSet:(JL_ManagerM *)manager Status:(uint8_t)status Result:(JL_CMD_RESPOND)result; + + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLModel_ANC.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLModel_ANC.h new file mode 100644 index 000000000..7b586e92a --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLModel_ANC.h @@ -0,0 +1,47 @@ +// +// JLModel_ANC.h +// JL_BLEKit +// +// Created by 杰理科技 on 2021/10/15. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +typedef NS_ENUM(UInt8,JL_AncMode) { + JL_AncMode_Normal = 0, //普通模式 + JL_AncMode_NoiseReduction = 1, //降噪模式 + JL_AncMode_Transparent = 2, //通透模式 +}; + +@interface JLModel_ANC : NSObject +@property(assign,nonatomic)JL_AncMode mAncMode; //耳机降噪模式 +@property(assign,nonatomic) uint16_t mAncMax_L; //左耳最大增益 +@property(assign,nonatomic) uint16_t mAncCurrent_L; //左耳当前增益 +@property(assign,nonatomic) uint16_t mAncMax_R; //右耳最大增益 +@property(assign,nonatomic) uint16_t mAncCurrent_R; //右耳当前增益 +-(NSData*)dataModel; +@end + + + +/// 手机名/经典蓝牙地址信息 +@interface JLTWSAddrNameInfo : NSObject + +/// 是否被绑定 +@property(nonatomic,assign)uint8_t isBind; + +/// 手机蓝牙地址 +@property(nonatomic,strong)NSData *phoneEdrAddr; + +/// 手机名称 +@property(nonatomic,strong)NSString *phoneName; + +/// 初始化数据成对象 +/// - Parameter data: 数据内容 ++(NSArray*)dataBeObjc:(NSData *)data; + +@end +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLModel_AlarmSetting.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLModel_AlarmSetting.h new file mode 100644 index 000000000..a4b6f8535 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLModel_AlarmSetting.h @@ -0,0 +1,24 @@ +// +// JLModel_AlarmSetting.h +// JL_BLEKit +// +// Created by 杰理科技 on 2021/10/15. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface JLModel_AlarmSetting : NSObject +@property(assign,nonatomic)uint8_t index; //闹钟索引 +@property(assign,nonatomic)uint8_t isCount; //是否可以设置【闹铃次数】 +@property(assign,nonatomic)uint8_t count; //闹铃次数 +@property(assign,nonatomic)uint8_t isInterval; //是否可以设置【时间间隔】 +@property(assign,nonatomic)uint8_t interval; //时间间隔 +@property(assign,nonatomic)uint8_t isTime; //是否可以设置【时间长度】 +@property(assign,nonatomic)uint8_t time; //时间长度 +-(NSData*)dataModel; +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLModel_BT.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLModel_BT.h new file mode 100644 index 000000000..86b4a4098 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLModel_BT.h @@ -0,0 +1,20 @@ +// +// JLModel_BT.h +// JL_BLEKit +// +// Created by 杰理科技 on 2021/10/15. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface JLModel_BT : NSObject +@property(assign,nonatomic)uint32_t mBtType; +@property(strong,nonatomic)NSData *__nullable mBtAddress; +@property(assign,nonatomic)uint8_t mBtRssi; +@property(strong,nonatomic)NSString *__nullable mBtName; +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLModel_Device.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLModel_Device.h new file mode 100644 index 000000000..d3af4edfe --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLModel_Device.h @@ -0,0 +1,643 @@ +// +// JLModel_Device.h +// JL_BLEKit +// +// Created by 杰理科技 on 2021/10/15. +// Modify by EzioChan on 2023/03/16 +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +typedef NS_ENUM(UInt8, JL_DevicePlatform) { + JL_DevicePlatformTuring = 0, //适用于【图灵】 + JL_DevicePlatformDeepbrain = 1, //适用于【Deepbrain】 + JL_DevicePlatformUnknown, +}; +typedef NS_ENUM(UInt8, JL_SDKType) { + JL_SDKTypeAI = 0x0, //AI SDK AC692x + JL_SDKTypeST = 0x1, //标准 SDK AC692x + JL_SDKType693xTWS = 0x2, //TWS + JL_SDKType695xSDK = 0x3, // + JL_SDKType697xTWS = 0x4, //TWS + JL_SDKType696xSB = 0x5, //696x_soundbox + JL_SDKType696xTWS = 0x6, //TWS + JL_SDKType695xSC = 0x7, //695x_sound_card + JL_SDKType695xWATCH = 0x8, //BR23 Watch + JL_SDKType701xWATCH = 0x9, //BR28 Watch + JL_SDKTypeManifestEarphone = 0x0A, //ManifestEarphone + JL_SDKTypeManifestSoundbox = 0x0B, //ManifestSoundbox + JL_SDKTypeChargingCase = 0x0C, //ChargingCase 彩屏充电仓 + JL_SDKType707nWATCH = 0x0D, //707N Watch + JL_SDKTypeDongle = 0x0E, //Dongle + JL_SDKTypeCommon = 0x0F, //通用 + JL_SDKTypeUnknown, +}; +typedef NS_ENUM(UInt8, JL_FunctionCode) { + JL_FunctionCodeBT = 0, //BT + JL_FunctionCodeMUSIC = 1, //音乐 + JL_FunctionCodeRTC = 2, //闹钟 + JL_FunctionCodeLINEIN = 3, //LineIn + JL_FunctionCodeFM = 4, //FM + JL_FunctionCodeLIGHT = 5, //LIGHT + JL_FunctionCodeFMTX = 6, //发射频点 + JL_FunctionCodeEQ = 7, //EQ + JL_FunctionCodeSPDIF = 8, //SPDIF + JL_FunctionCodePCServer = 9, //PCServer + JL_FunctionCodeCOMMON = 0xff, //通用 +}; + +typedef NS_ENUM(UInt8, JL_FCmdMusic) { + JL_FCmdMusicPP = 0x01, //PP按钮 + JL_FCmdMusicPREV = 0x02, //上一曲 + JL_FCmdMusicNEXT = 0x03, //下一曲 + JL_FCmdMusicMODE = 0x04, //切换播放模式 + JL_FCmdMusicEQ = 0x05, //EQ + JL_FCmdMusicFastBack = 0x06, //快退 + JL_FCmdMusicFastPlay = 0x07, //快进 +}; + +typedef NS_ENUM(UInt8, JL_OtaBleAllowConnect) { + JL_OtaBleAllowConnectYES = 0, //OTA 允许BLE连接 + JL_OtaBleAllowConnectNO = 1, //OTA 禁止BLE连接 + JL_OtaBleAllowConnectUnknow = 2, //未定义 +}; +typedef NS_ENUM(UInt8, JL_BLEOnly) { //是否仅仅支持BLE + JL_BLEOnlyNO = 0, //否 + JL_BLEOnlyYES = 1, //是 +}; +typedef NS_ENUM(UInt8, JL_FasheEnable) { //是否发射模式 + JL_FasheEnableNO = 0, //否 + JL_FasheEnableYES = 1, //是 +}; +typedef NS_ENUM(UInt8, JL_FasheType) { //当前是否为发射模式 + JL_FasheTypeNO = 0, //否 + JL_FasheTypeYES = 1, //是 +}; +typedef NS_ENUM(UInt8, JL_MD5Type) { //是否支持MD5校验 + JL_MD5TypeNO = 0, //否 + JL_MD5TypeYES = 1, //是 +}; +typedef NS_ENUM(UInt8, JL_GameType) { //是否为游戏模式 + JL_GameTypeNO = 0, //否 + JL_GameTypeYES = 1, //是 +}; +typedef NS_ENUM(UInt8, JL_SearchType) { //是否支持查找设备 + JL_SearchTypeNO = 0, //否 + JL_SearchTypeYES = 1, //是 +}; +typedef NS_ENUM(UInt8, JL_KaraokeType) { //是否支持卡拉OK + JL_KaraokeTypeNO = 0, //否 + JL_KaraokeTypeYES = 1, //是 +}; +typedef NS_ENUM(UInt8,JL_KaraokeEQType){ //是否禁止app调节设备音效 + JL_KaraokeEQTypeNO = 0, //不禁止 + JL_KaraokeEQTypeYES = 1, //禁止 +}; +typedef NS_ENUM(UInt8,JL_FlashType){ //是否支持外挂Flash + JL_FlashTypeNO = 0, //不支持 + JL_FlashTypeYES = 1, //支持 +}; +typedef NS_ENUM(UInt8,JL_AncType){ //是否支持ANC + JL_AncTypeNO = 0, //不支持 + JL_AncTypeYES = 1, //支持 +}; +typedef NS_ENUM(UInt8, JL_AudioFileType) { //是否支持音频文件传输 + JL_AudioFileTypeNO = 0, //否 + JL_AudioFileTypeYES = 1, //是 +}; +typedef NS_ENUM(UInt8, JL_FileSubcontractTransferCrc16Type){//文件分包传输是否支持crc16方式 + JL_FileSubcontractTransferCrc16TypeNO = 0, //不支持 + JL_FileSubcontractTransferCrc16TypeYES = 1, //支持 +}; +typedef NS_ENUM(UInt8, JL_ReadFileInNewWayType){ //是否以新的方式读取固件文件 + JL_ReadFileInNewWayTypeNO = 0, //不支持 + JL_ReadFileInNewWayTypeYES = 1, //支持 +}; + +typedef NS_ENUM(UInt8, JL_SmallFileWayType){ //是否支持小文件传输 + JL_SmallFileWayTypeNO = 0, //不支持 + JL_SmallFileWayTypeYES = 1, //支持 +}; + +typedef NS_ENUM(UInt8,JL_CALLType) { + JL_CALLType_OFF = 0, //空闲 + JL_CALLType_ON = 1, //通话中 +}; + +typedef NS_ENUM(UInt8, JL_LightState) { + JL_LightStateClose = 0x00, //关闭 + JL_LightStateOpen = 0x01, //开启 + JL_LightStateSetting = 0x02, //设置模式 +}; +typedef NS_ENUM(UInt8, JL_LightMode) { + JL_LightModeNormal = 0x00, //彩色模式 + JL_LightModeFlash = 0x01, //闪烁模式 + JL_LightModeScene = 0x02, //情景模式 +}; +typedef NS_ENUM(UInt8, JL_LightFlashModeIndex) { + JL_LightModeIndexColorfulFlash = 0x00, //七彩闪烁 + JL_LightModeIndexRedFlash = 0x01, //红色闪烁 + JL_LightModeIndexOrangeFlash = 0x02, //橙色闪烁 + JL_LightModeIndexYeallowFlash = 0x03, //黄色闪烁 + JL_LightModeIndexGreenFlash = 0x04, //绿色闪烁 + JL_LightModeIndexCyanFlash = 0x05, //青色闪烁 + JL_LightModeIndexBlueFlash = 0x06, //蓝色闪烁 + JL_LightModeIndexPurpleFlash = 0x07, //紫色闪烁 +}; + +typedef NS_ENUM(UInt8, JL_LightFlashModeFrequency) { + JL_LightFlashModeFrequencyFast = 0x00, //快闪 + JL_LightFlashModeFrequencySlow = 0x01, //慢闪 + JL_LightFlashModeFrequencyNormal = 0x02, //缓闪 + JL_LightFlashModeFrequencyMusic = 0x03, //音乐闪烁 +}; + +typedef NS_ENUM(UInt8, JL_LightSceneMode) { + JL_LightSceneModeRainbow = 0x00, //彩虹 + JL_LightSceneModeHeartbeat = 0x01, //心跳 + JL_LightSceneModeCandlelight = 0x02, //烛火 + JL_LightSceneModeNightLight = 0x03, //夜灯 + JL_LightSceneModeStage = 0x04, //舞台 + JL_LightSceneModeDiffuseColourBreathing = 0x05, //漫彩呼吸 + JL_LightSceneModeDiffuseRedBreathing = 0x06, //漫红呼吸 + JL_LightSceneModeDiffuseGreenBreathing = 0x07, //漫绿呼吸 + JL_LightSceneModeDiffuseBlueBreathing = 0x08, //漫蓝呼吸 + JL_LightSceneModeGreenMood = 0x09, //绿色心情 + JL_LightSceneModeSettingSunView = 0x10, //夕阳美景 + JL_LightSceneModeMusicRhythm = 0x11, //音乐律动 +}; + +typedef NS_ENUM(UInt8, JL_FileHandleType) { //文件句柄 + JL_FileHandleTypeSD_0 = 0, //SD_0 + JL_FileHandleTypeSD_1 = 1, //SD_1 + JL_FileHandleTypeFLASH = 2, //FLASH + JL_FileHandleTypeUSB = 3, //USB + JL_FileHandleTypeLineIn = 4, //LineIn + JL_FileHandleTypeFLASH2 = 5, //FLASH2 + JL_FileHandleTypeFLASH3 = 6, //FLASH3 + JL_FileHandleTypeReservedArea = 7, //ReservedArea +}; + +typedef NS_ENUM(UInt8, JL_MusicMode) { + JL_MusicModeLoopAll = 0x01, //全部循环 + JL_MusicModeLoopDevice = 0x02, //单设备循环 + JL_MusicModeLoopOne = 0x03, //单曲循环 + JL_MusicModeRandomDevice = 0x04, //单设备随机 + JL_MusicModeLoopFolder = 0x05, //文件夹循环 +}; + +typedef NS_ENUM(UInt8, JL_MusicStatus) { + JL_MusicStatusPlay = 0x01, //播放 + JL_MusicStatusPause = 0x00, //暂停 +}; + +typedef NS_ENUM(UInt8, JL_EQType) { //EQ段数类型 + JL_EQType10 = 0, //固定10段式 + JL_EQTypeMutable = 1, //动态EQ段 +}; + +//---------------------------------------------------------// +#pragma mark - RTC +typedef NS_ENUM(UInt8, JL_RTCAlarmType) { //是否支持闹铃设置 + JL_RTCAlarmTypeNO = 0, //不支持 + JL_RTCAlarmTypeYES = 1, //支持 +}; +//---------------------------------------------------------// +#pragma mark - LINEIN +typedef NS_ENUM(UInt8, JL_LineInStatus) { + JL_LineInStatusPause = 0x00, //暂停 + JL_LineInStatusPlay = 0x01, //播放 + JL_LineInStatusUnknown, +}; +//---------------------------------------------------------// +#pragma mark - FM +typedef NS_ENUM(UInt8, JL_FMStatus) { + JL_FMStatusPause = 0x01, //播放 + JL_FMStatusPlay = 0x02, //暂停 + JL_FMStatusSearching = 0x03, //搜索中 + JL_FMStatusUnknown, +}; +typedef NS_ENUM(UInt8, JL_FMMode) { + JL_FMMode875Mhz = 0x00, //87.5-108.0Mhz + JL_FMMode760Mhz = 0x01, //76.5-108.0Mhz + JL_FMModeUnknown, +}; + +typedef NS_ENUM(UInt8,JL_ReverberationType) { + JL_ReverberationTypeNormal = 0, //混响 + JL_ReverberationTypeDynamic = 1, //限幅器 +}; + + +@interface JLModel_Device : NSObject + +///设备UUID +@property (copy, nonatomic) NSString *mBLE_UUID; + +///协议版本 +@property (copy, nonatomic) NSString *versionProtocol; + +///固件版本 +@property (copy, nonatomic) NSString *versionFirmware; + +/// 单包固件最大发送值,APP单次能收到最大的值 +@property (assign,nonatomic) NSInteger getMtu; + +/// 单包固件最大接收值(MaxMtu)APP单次可发送最大值 +@property (assign,nonatomic) NSInteger sendMtu; + +///SDK类型 +@property (assign,nonatomic) JL_SDKType sdkType; + +///电量0~9 +@property (assign,nonatomic) NSUInteger battery; + +/// 是否支持音量同步 +@property (assign,nonatomic) BOOL isSyncVoice; + +/// 最低允许升级资源/OTA电量 +@property (assign,nonatomic) NSInteger lowBattery; + +///当前音量 +@property (assign,nonatomic) NSUInteger currentVol; + +///最大音量 +@property (assign,nonatomic) NSUInteger maxVol; + +///经典蓝牙地址 +@property (copy, nonatomic) NSString *btAddr; + +///平台序列号 +@property (copy, nonatomic) NSString *license; + +///平台类型(图灵,Deepbrain) +@property (assign,nonatomic) JL_DevicePlatform platform; + +///经典蓝牙状态 +@property (assign,nonatomic) JL_DeviceBTStatus btStatus; + +///BIT(0):BT BIT(1):MUSIC BIT(2):RTC +@property (assign,nonatomic) uint32_t function __deprecated_msg("已过时,可使用deviceFuncs"); + +///当前处于的模式 +@property (assign,nonatomic) JL_FunctionCode currentFunc; + +///USb,SD,LineIn,网络电台是否在线 +@property (assign,nonatomic) uint8_t funcOnlineStatus; + +/// 设备功能模式支持 +@property (strong,nonatomic) JLModelDevFunc *deviceFuncs; + +///uboot版本 +@property (copy, nonatomic) NSString *versionUBoot; + +///设备单、双备份 +@property (assign,nonatomic) JL_Partition partitionType __deprecated_msg("已过时,可使用JL_OTAManager"); + + +/// 是否支持复用空间进行 OTA +@property (assign,nonatomic) BOOL isSupportReuseSpaceOTA __deprecated_msg("已过时,可使用JL_OTAManager"); + + +///OTA状态 +@property (assign,nonatomic) JL_OtaStatus otaStatus __deprecated_msg("已过时,可使用JL_OTAManager"); + +///耳机单备份 是否需要强制升级 +@property (assign,nonatomic) JL_OtaHeadset otaHeadset __deprecated_msg("已过时,可使用JL_OTAManager"); + +///手表资源 是否需要强制升级 +@property (assign,nonatomic) JL_OtaWatch otaWatch __deprecated_msg("已过时,可使用JL_OTAManager"); + +///资源是否需要强制升级 +@property (assign,nonatomic) JLOtaSourcesExtendMode otaSourceMode __deprecated_msg("已过时,可使用JL_OTAManager"); + + +///厂商ID +@property (copy, nonatomic) NSString *pidvid; + +///授权Key +@property (copy, nonatomic) NSString *authKey; + +///授权Code +@property (copy, nonatomic) NSString *proCode; + +///是否下载BootLoader +@property (assign,nonatomic) JL_BootLoader bootLoaderType; + +///OTA是否允许BLE连接 +@property (assign,nonatomic) JL_OtaBleAllowConnect otaBleAllowConnect; + +///是否仅仅支持BLE +@property (assign,nonatomic) JL_BLEOnly bleOnly; + +///ble蓝牙地址 +@property (copy, nonatomic) NSString *bleAddr; + +///是否支持发射模式 +@property (assign,nonatomic) JL_FasheEnable fasheEnable; + +///当前是否为发射模式 +@property (assign,nonatomic) JL_FasheType fasheType; + +///是否支持MD5固件校验 +@property (assign,nonatomic) JL_MD5Type md5Type; + +///是否为游戏模式 +@property (assign,nonatomic) JL_GameType gameType; + +///是否支持游戏模式 +@property (assign,nonatomic) BOOL isSupportGameModel; + +///是否支持查找设备 +@property (assign,nonatomic) JL_SearchType searchType; + +///是否支持卡拉OK +@property (assign,nonatomic) JL_KaraokeType karaokeType; + +///是否禁止app调节设备音效 +@property (assign,nonatomic) JL_KaraokeEQType karaokeEQType; + +///是否外挂flash +@property (assign,nonatomic) JL_FlashType flashType; + +///是否支持ANC +@property (assign,nonatomic) JL_AncType ancType; + +///是否支持音频文件传输功能 +@property (assign,nonatomic) JL_AudioFileType audioFileType; + +/// 是否支持日志获取 +@property (assign,nonatomic) BOOL isSupportLog; + +/// 是否支持辅听设置 +@property (assign,nonatomic) BOOL isSupportDhaFitting; + +///验配信息交互:版本、通道数、通道频率 +///Fitting information interaction: version, channel number, channel frequency +@property (strong,nonatomic) DhaFittingInfo *dhaFitInfo; + +/// 验配中断/开启的对象,仅限于监听 +/// Fitting interrupted/opened object, only for listening +@property (strong,nonatomic) DhaFittingSwitch *dhaFitSwitch; + +/// 通道增益值数组,先左耳后右耳,个数和验配信息中返回的一致 +/// Array of channel gain values, first left ear then right ear, the number is the same as the one returned in the fitting information +@property (strong,nonatomic) NSArray *dhaFittingList; + +/// 是否支持获取设备配置信息 +@property (assign,nonatomic) BOOL isSupportDevConfigInfo; + +/// 是否支持自适应ANC +@property (assign,nonatomic) BOOL isSupportAutoANC; + +///低音 +@property (assign,nonatomic) int pitchLow; + +///高音 +@property (assign,nonatomic) int pitchHigh; + +///外挂flash信息 +@property (copy, nonatomic) JLModel_Flash *flashInfo; + +/// 设备信息中指明,外部SD卡/U盘引脚是否被复用 +/// Specify in the device information, whether the external SD card/U disk pins are multiplexed +@property (assign,nonatomic) BOOL devPinMultiplex; + + +/*--- File INFO ---*/ +///当前文件传输句柄 +@property (assign,nonatomic) JL_FileHandleType currentFileHandleType; +///当前文件所存放的位置 +@property (assign,nonatomic,readonly) JL_CardType currentCardType; +///文件分包传输是否支持crc16方式 +@property (assign,nonatomic) JL_FileSubcontractTransferCrc16Type fileSubcontractTransferCrc16Type; +///是否以新的方式读取固件文件 +@property (assign,nonatomic) JL_ReadFileInNewWayType readFileInNewWayType; +///是否小文件方式传输 +@property (assign,nonatomic) JL_SmallFileWayType smallFileWayType; + +/*--- 公用INFO ---*/ +//MARK: - 存储信息 +///卡的数组 +@property (copy, nonatomic) NSArray *cardArray __attribute__((deprecated ( "Use the instance property cardArray of the JLModelCardInfo class instead, this property is about to become invalid"))); +///USB handle +@property (copy, nonatomic) NSString *handleUSB __attribute__((deprecated ( "Use the instance property usbHandle of the JLModelCardInfo class instead, this property is about to become invalid"))); +///SD_0 handle +@property (copy, nonatomic) NSString *handleSD_0 __attribute__((deprecated ( "Use the instance property sd0Handle of the JLModelCardInfo class instead, this property is about to become invalid"))); +///SD_1 handle +@property (copy, nonatomic) NSString *handleSD_1 __attribute__((deprecated ( "Use the instance property sd1Handle of the JLModelCardInfo class instead, this property is about to become invalid"))); +///Flash handle +@property (copy, nonatomic) NSString *handleFlash __attribute__((deprecated ( "Use the instance property flashHandle of the JLModelCardInfo class instead, this property is about to become invalid"))); +///Flash2 handle +@property (copy, nonatomic) NSString *handleFlash2 __attribute__((deprecated ( "Use the instance property flash2Handle of the JLModelCardInfo class instead, this property is about to become invalid"))); + +///Flash3 handle +@property (copy, nonatomic) NSString *handleFlash3 __attribute__((deprecated ( "Use the instance property flash3Handle of the JLModelCardInfo class instead, this property is about to become invalid"))); + +///USB handle Data +@property (copy, nonatomic) NSData *handleUSBData __attribute__((deprecated ( "Use the instance property usbHandle of the JLModelCardInfo class instead, this property is about to become invalid"))); +///SD_0 handle Data +@property (copy, nonatomic) NSData *handleSD_0Data __attribute__((deprecated ( "Use the instance property sd0Handle of the JLModelCardInfo class instead, this property is about to become invalid"))); +///SD_1 handle Data +@property (copy, nonatomic) NSData *handleSD_1Data __attribute__((deprecated ( "Use the instance property sd1Handle of the JLModelCardInfo class instead, this property is about to become invalid"))); +///Flash handle Data +@property (copy, nonatomic) NSData *handleFlashData __attribute__((deprecated ( "Use the instance property flashHandle of the JLModelCardInfo class instead, this property is about to become invalid"))); +///Flash2 handle Data +@property (copy, nonatomic) NSData *handleFlash2Data __attribute__((deprecated ( "Use the instance property flash2Handle of the JLModelCardInfo class instead, this property is about to become invalid"))); + +///Flash3 handle Data +@property (copy, nonatomic) NSData *handleFlash3Data __attribute__((deprecated ( "Use the instance property flash3Handle of the JLModelCardInfo class instead, this property is about to become invalid"))); + +/// 设备存储信息(卡信息) +@property (strong, nonatomic)JLModelCardInfo *cardInfo; + +/// 错误原因 +@property (copy, nonatomic) NSString *errReason; + +/// 发射频点 +@property (assign,nonatomic) uint16_t fmtxPoint; +/// 0x00:普通模式 0x01:发射模式 +@property (assign,nonatomic) uint8_t mTWS_Mode; +/// 0x00:未连接 0x01:已连接 +@property (assign,nonatomic) uint8_t mTWS_Status; +/// 发射模式中,连接的外设地址 +@property (copy ,nonatomic) NSString *mTWS_Addr; +/// 当前ANC的模式 +@property (copy ,nonatomic) JLModel_ANC *mAncModeCurrent; +/// ANC模式数组 +@property (copy ,nonatomic) NSMutableArray *mAncModeArray; +///通话状态 +@property (assign,nonatomic) JL_CALLType mCallType; + +/// 混响所支持的类型 +@property (strong,nonatomic) NSArray *reverberationTypes; +/// 混响的开关 +@property (assign,nonatomic) int reverberationSwitchState; +/// 深度值 +@property (assign,nonatomic) int depthValue; +/// 混响度值 +@property (assign,nonatomic) int intensityValue; +/// 混响幅值 +@property (assign,nonatomic) int dynamicLimiterValue; + +//MARK: - 卡拉OK +///卡拉OK 固件返回的掩码 +@property (assign,nonatomic)uint64_t kalaokMask __attribute__((deprecated ( "Use the instance property rtcVersion of the JL_SoundCardManager class instead, this property is about to become invalid"))); + +///卡拉OK 频率数组 +@property (strong,nonatomic)NSArray *mKaraokeMicFrequencyArray __attribute__((deprecated ( "Use the instance property rtcVersion of the JL_SoundCardManager class instead, this property is about to become invalid"))); + +///卡拉OK EQ数组 +@property (strong,nonatomic)NSArray *mKaraokeMicEQArray __attribute__((deprecated ( "Use the instance property rtcVersion of the JL_SoundCardManager class instead, this property is about to become invalid"))); + +//MARK: - EQ 属性列表 +/// EQ模式 +@property (assign,nonatomic) JL_EQMode eqMode __attribute__((deprecated ( "Use the instance property rtcVersion of the JL_SystemEQ class instead, this property is about to become invalid")));; +/// EQ参数值(只适用于EQ Mode == CUSTOM情况) +@property (copy, nonatomic) NSArray *eqArray __attribute__((deprecated ( "Use the instance property rtcVersion of the JL_SystemEQ class instead, this property is about to become invalid")));; +///自定义EQ +@property (copy, nonatomic) NSArray *eqCustomArray __attribute__((deprecated ( "Use the instance property rtcVersion of the JL_SystemEQ class instead, this property is about to become invalid")));; + +///EQ频率 +@property (copy, nonatomic) NSArray *eqFrequencyArray __attribute__((deprecated ( "Use the instance property rtcVersion of the JL_SystemEQ class instead, this property is about to become invalid")));; +///EQ段数类型 +@property (assign,nonatomic) JL_EQType eqType __attribute__((deprecated ( "Use the instance property rtcVersion of the JL_SystemEQ class instead, this property is about to become invalid")));; + +///EQ的预设值数组 数组元素类型-->【JLEQModel】 +@property (strong,nonatomic) NSArray *eqDefaultArray __attribute__((deprecated ( "Use the instance property rtcVersion of the JL_SystemEQ class instead, this property is about to become invalid")));; + +//MARK: - 灯光属性列表 +/// 0:关闭 1:打开 2:设置模式(彩色/闪烁/情景) +@property (assign,nonatomic) JL_LightState lightState __attribute__((deprecated ( "Use the instance property rtcVersion of the JL_LightManager class instead, this property is about to become invalid"))); +/// 0:彩色 1:闪烁 2: 情景 +@property (assign,nonatomic) JL_LightMode lightMode __attribute__((deprecated ( "Use the instance property rtcVersion of the JL_LightManager class instead, this property is about to become invalid"))); +/// 灯光红色 +@property (assign,nonatomic) uint8_t lightRed __attribute__((deprecated ( "Use the instance property rtcVersion of the JL_LightManager class instead, this property is about to become invalid"))); +/// 灯光绿色 +@property (assign,nonatomic) uint8_t lightGreen __attribute__((deprecated ( "Use the instance property rtcVersion of the JL_LightManager class instead, this property is about to become invalid"))); +/// 灯光蓝色 +@property (assign,nonatomic) uint8_t lightBlue __attribute__((deprecated ( "Use the instance property rtcVersion of the JL_LightManager class instead, this property is about to become invalid"))); +/// 闪烁模式Index +@property (assign,nonatomic) JL_LightFlashModeIndex lightFlashIndex __attribute__((deprecated ( "Use the instance property rtcVersion of the JL_LightManager class instead, this property is about to become invalid"))); +/// 闪烁频率Index +@property (assign,nonatomic) JL_LightFlashModeFrequency lightFrequencyIndex __attribute__((deprecated ( "Use the instance property rtcVersion of the JL_LightManager class instead, this property is about to become invalid"))); +/// 情景模式Index +@property (assign,nonatomic) JL_LightSceneMode lightSceneIndex __attribute__((deprecated ( "Use the instance property rtcVersion of the JL_LightManager class instead, this property is about to become invalid"))); +/// 色调,范围0-360 +@property (assign,nonatomic) uint16_t lightHue __attribute__((deprecated ( "Use the instance property rtcVersion of the JL_LightManager class instead, this property is about to become invalid"))); +/// 饱和度,0-100 +@property (assign,nonatomic) uint8_t lightSat __attribute__((deprecated ( "Use the instance property rtcVersion of the JL_LightManager class instead, this property is about to become invalid"))); +/// 亮度,0-100 +@property (assign,nonatomic) uint8_t lightLightness __attribute__((deprecated ( "Use the instance property rtcVersion of the JL_LightManager class instead, this property is about to become invalid"))); + + +//MARK: - BT INFO +@property (strong,nonatomic) NSString *ID3_Title; +@property (strong,nonatomic) NSString *ID3_Artist; +@property (strong,nonatomic) NSString *ID3_AlBum; +@property (assign,nonatomic) uint8_t ID3_Number; +@property (assign,nonatomic) uint16_t ID3_Total; +@property (strong,nonatomic) NSString *ID3_Genre; +@property (assign,nonatomic) uint32_t ID3_Time; +/// 0x01:播放 0x00:暂停 +@property (assign,nonatomic) uint8_t ID3_Status; + +@property (assign,nonatomic) uint32_t ID3_CurrentTime; + +//MARK: - Music INFO +///播放状态 +@property (assign,nonatomic) JL_MusicStatus playStatus __attribute__((deprecated ( "Use the instance property rtcVersion of the JLDevPlayerCtrl class instead, this property is about to become invalid"))); + +///播放模式 +@property (assign,nonatomic) JL_MusicMode playMode __attribute__((deprecated ( "Use the instance property rtcVersion of the JLDevPlayerCtrl class instead, this property is about to become invalid"))); + +///当前播放文件的簇号 +@property (assign,nonatomic) uint32_t currentClus __attribute__((deprecated ( "Use the instance property rtcVersion of the JLDevPlayerCtrl class instead, this property is about to become invalid"))); + +///当前时间 +@property (assign,nonatomic) uint32_t currentTime __attribute__((deprecated ( "Use the instance property rtcVersion of the JLDevPlayerCtrl class instead, this property is about to become invalid"))); + +///总时长 +@property (assign,nonatomic) uint32_t tolalTime __attribute__((deprecated ( "Use the instance property rtcVersion of the JLDevPlayerCtrl class instead, this property is about to become invalid"))); + +///当前卡 +@property (assign,nonatomic) JL_CardType currentCard __attribute__((deprecated ( "Use the instance property rtcVersion of the JLDevPlayerCtrl class instead, this property is about to become invalid"))); + +///名字 +@property (copy, nonatomic) NSString *fileName __attribute__((deprecated ( "Use the instance property rtcVersion of the JLDevPlayerCtrl class instead, this property is about to become invalid"))); + +///目录浏览文件类型(所支持解码音频格式) +@property (copy, nonatomic) NSString *typeSupport; + +//MARK: - RTC INFO + +///RTC 版本 +@property (assign,nonatomic) uint8_t rtcVersion __attribute__((deprecated ( "Use the instance property rtcVersion of the JL_AlarmClockManager class instead, this property is about to become invalid"))); + +///是否支持闹铃设置 +@property (assign,nonatomic) JL_RTCAlarmType rtcAlarmType __attribute__((deprecated ( "Use the instance property rtcAlarmType of the JL_AlarmClockManager class instead, this property is about to become invalid"))); + +///设备当前时间 +@property (strong,nonatomic) JLModel_RTC *rtcModel __attribute__((deprecated ( "Use the instance property rtcModel of the JL_AlarmClockManager class instead, this property is about to become invalid"))); + +///设备闹钟数组 +@property (strong,nonatomic) NSMutableArray *rtcAlarms __attribute__((deprecated ( "Use the instance property rtcAlarms of the JL_AlarmClockManager class instead, this property is about to become invalid"))); + +///默认铃声 +@property (strong,nonatomic) NSMutableArray *rtcDfRings __attribute__((deprecated ( "Use the instance property rtcDfRings of the JL_AlarmClockManager class instead, this property is about to become invalid"))); + +//MARK: - LineIn INFO + +///LineIn状态 +@property (assign,nonatomic) JL_LineInStatus lineInStatus; + + +//MARK: - Fm 模式 +///Fm状态 +@property (assign,nonatomic) JL_FMStatus fmStatus; + +///Fm 频段范围 +///76.5-108.0Mhz +///87.5-108.0Mhz +@property (assign,nonatomic) JL_FMMode fmMode; + +///当前fm +@property (strong,nonatomic) JLModel_FM *currentFm; + +///Fm列表 +@property (strong,nonatomic) NSArray *fmArray; + +//MARK: - custom version info +/// 自定义版本信息 +@property(strong,nonatomic) NSData *customizeInfo; + + +-(void)cleanMe; ++(void)observeModelProperty:(NSString*)prty Action:(SEL)action Own:(id)own __attribute__((deprecated("This method has been abandoned. You can use the system's KVO to monitor object changes."))); ++(void)removeModelProperty:(NSString*)prty Own:(id)own __attribute__((deprecated("This method has been abandoned. You can use the system's KVO to monitor object changes."))); + +#pragma mark ---> 设备信息 +-(void)deviceInfoData:(NSData*)infoData; + +#pragma mark ---> 各个模式信息 +-(void)deviceModeInfoData:(NSData*)infoData; + + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLModel_EQ.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLModel_EQ.h new file mode 100644 index 000000000..0d3cc7820 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLModel_EQ.h @@ -0,0 +1,31 @@ +// +// JLModel_EQ.h +// JL_BLEKit +// +// Created by 杰理科技 on 2021/10/15. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +typedef NS_ENUM(UInt8, JL_EQMode) { + JL_EQModeNORMAL = 0, //自然 + JL_EQModeROCK = 1, //摇滚 + JL_EQModePOP = 2, //流行 + JL_EQModeCLASSIC = 3, //经典 + JL_EQModeJAZZ = 4, //爵士 + JL_EQModeCOUNTRY = 5, //乡村 + JL_EQModeCUSTOM = 6, //用户自定义 + JL_EQModeLATIN = 7, //拉丁 + JL_EQModeDANCE = 8, //舞蹈 +}; + +@interface JLModel_EQ : NSObject +@property(assign,nonatomic)JL_EQMode mMode; +@property(strong,nonatomic)NSArray *__nullable mEqArray; +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLModel_FM.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLModel_FM.h new file mode 100644 index 000000000..34cd84535 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLModel_FM.h @@ -0,0 +1,18 @@ +// +// JLModel_FM.h +// JL_BLEKit +// +// Created by 杰理科技 on 2021/10/15. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface JLModel_FM : NSObject +@property (assign,nonatomic) uint8_t fmChannel; +@property (assign,nonatomic) uint16_t fmFrequency; +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLModel_File.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLModel_File.h new file mode 100644 index 000000000..b2d508dc4 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLModel_File.h @@ -0,0 +1,40 @@ +// +// JLModel_File.h +// JL_BLEKit +// +// Created by 杰理科技 on 2021/10/15. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +typedef NS_ENUM(UInt8, JL_BrowseType) { + JL_BrowseTypeFolder = 0, //文件夹 + JL_BrowseTypeFile = 1, //文件 +}; +typedef NS_ENUM(UInt8, JL_CardType) { + JL_CardTypeUSB = 0, //USB + JL_CardTypeSD_0 = 1, //SD_0 + JL_CardTypeSD_1 = 2, //SD_1 + JL_CardTypeFLASH = 3, //FLASH + JL_CardTypeLineIn = 4, //LineIn + JL_CardTypeFLASH2 = 5, //FLASH2 + JL_CardTypeFLASH3 = 6, //FLASH3 + JL_CardTypeReservedArea = 7, //ReservedArea +}; + +@interface JLModel_File : NSObject +@property (assign,nonatomic) JL_BrowseType fileType; +@property (assign,nonatomic) JL_CardType cardType; +@property (assign,nonatomic) uint32_t fileClus; +@property (assign,nonatomic) uint16_t fileIndex; +@property (copy, nonatomic) NSString *fileHandle; +@property (copy, nonatomic) NSString *fileName; +@property (copy, nonatomic) NSString *folderName; +@property (copy, nonatomic) NSData *__nullable pathData; +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLModel_Flash.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLModel_Flash.h new file mode 100644 index 000000000..293ab53bf --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLModel_Flash.h @@ -0,0 +1,58 @@ +// +// JLModel_Flash.h +// JL_BLEKit +// +// Created by 杰理科技 on 2021/10/15. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +typedef NS_ENUM(UInt8, JL_FlashSystemType) { + JL_FlashSystemType_FATFS = 0, + JL_FlashSystemType_RCSP = 1, +}; + +@interface JLModel_Flash : NSObject + +/// flash大小 +@property(assign,nonatomic)uint32_t mFlashSize; + +/// FAT系统大小 +@property(assign,nonatomic)uint32_t mFatfsSize; + +/// 系统类型 0:FATFS,1:RCSP +@property(assign,nonatomic)JL_FlashSystemType mFlashType; + +/// 系统当前状态,0x00正常,0x01异常 +@property(assign,nonatomic)uint8_t mFlashStatus; + +/// Flash版本 +@property(assign,nonatomic)uint16_t mFlashVersion; + +/// 读数MTU +@property(assign,nonatomic)uint16_t mFlashReadMtu; + +/// 扇区大小 +@property(assign,nonatomic)uint16_t mFlashCluster; + +/// 手表兼容列表"W001,W002,W003" +@property(strong,nonatomic)NSString *mFlashMatchVersion; + +/// 写数MTU +@property(assign,nonatomic)uint16_t mFlashWriteMtu; + +/// 屏幕宽度 +@property(assign,nonatomic)uint16_t mScreenWidth; + +/// 屏幕高度 +@property(assign,nonatomic)uint16_t mScreenHeight; + ++(JLModel_Flash*)modelWithFlash:(NSData *)flashData; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLModel_Headset.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLModel_Headset.h new file mode 100644 index 000000000..6c4d84336 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLModel_Headset.h @@ -0,0 +1,31 @@ +// +// JLModel_Headset.h +// JL_BLEKit +// +// Created by 杰理科技 on 2021/10/15. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface JLModel_Headset : NSObject +@property(assign,nonatomic)BOOL mCharging_L; +@property(assign,nonatomic)BOOL mCharging_R; +@property(assign,nonatomic)BOOL mCharging_C; +@property(assign,nonatomic)uint8_t mPower; +@property(assign,nonatomic)uint8_t mPower_L; +@property(assign,nonatomic)uint8_t mPower_R; +@property(assign,nonatomic)uint8_t mPower_C; +@property(assign,nonatomic)uint8_t mLedScene; +@property(assign,nonatomic)uint8_t mLedEffect; +@property(assign,nonatomic)uint8_t mKeyLR; +@property(assign,nonatomic)uint8_t mKeyAction; +@property(assign,nonatomic)uint8_t mKeyFunction; +@property(assign,nonatomic)uint8_t mMicMode; +@property(assign,nonatomic)uint8_t mWorkMode; +@property(strong,nonatomic)NSString *mEdr; +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLModel_RTC.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLModel_RTC.h new file mode 100644 index 000000000..e9731e9d5 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLModel_RTC.h @@ -0,0 +1,64 @@ +// +// JLModel_RTC.h +// JL_BLEKit +// +// Created by 杰理科技 on 2021/10/15. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface JLModel_RTC : NSObject + +/// 年 +@property (assign,nonatomic) uint16_t rtcYear; + +/// 月 +@property (assign,nonatomic) uint8_t rtcMonth; + +/// 日 +@property (assign,nonatomic) uint8_t rtcDay; + +/// 时 +@property (assign,nonatomic) uint8_t rtcHour; + +/// 分 +@property (assign,nonatomic) uint8_t rtcMin; + +/// 秒 +@property (assign,nonatomic) uint8_t rtcSec; + +/// RTC使能 +@property (assign,nonatomic) BOOL rtcEnable; + +/// RTC循环模式 +/// mode: 值为 0 时只响一次 +/// bit0: 每天 +/// bit1: 周一 +/// bit2: 周二 +/// bit3: 周三 +/// bit4: 周四 +/// bit5: 周五 +/// bit6: 周六 +/// bit7: 周日 +@property (assign,nonatomic) uint8_t rtcMode; + + +/// RTC索引 +@property (assign,nonatomic) uint8_t rtcIndex; + +/// 名称 +@property (copy ,nonatomic) NSString *rtcName; + +/// 自定义闹铃内容 +/// 这部分内容取自设备音乐浏览所获得的句柄以及簇号 +@property (strong,nonatomic) RTC_RingInfo *ringInfo; + +/// 闹铃数据 +@property (strong,nonatomic) NSData *RingData; +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLModel_Ring.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLModel_Ring.h new file mode 100644 index 000000000..c227fa6d2 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLModel_Ring.h @@ -0,0 +1,24 @@ +// +// JLModel_Ring.h +// JL_BLEKit +// +// Created by 杰理科技 on 2021/10/15. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface JLModel_Ring : NSObject + +/// 默认铃声序号 +/// alarm default rings index +@property(assign,nonatomic) uint8_t index; + +/// 默认铃声名称 +/// alarm default rings name +@property(strong,nonatomic) NSString *name; +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLModel_SPEEX.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLModel_SPEEX.h new file mode 100644 index 000000000..9fba122d5 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLModel_SPEEX.h @@ -0,0 +1,142 @@ +// +// JLModel_SPEEX.h +// JL_BLEKit +// +// Created by 杰理科技 on 2021/10/15. +// Modify By EzioChan on 2023/03/27. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +typedef NS_ENUM(UInt8, JL_SpeakType) { + JL_SpeakTypeDo = 0, //开始录音 + JL_SpeakTypeDone = 1, //结束录音 + JL_SpeakTypeDoing = 2, //正在录音 + JL_SpeakTypeDoneFail = 0x0f, //结束失败 +}; +typedef NS_ENUM(UInt8, JL_SpeakDataType) { + JL_SpeakDataTypePCM = 0x00, //PCM数据 + JL_SpeakDataTypeSPEEX = 0x01, //SPEEX数据 + JL_SpeakDataTypeOPUS = 0x02, //OPUS数据 + JL_SpeakDataTypeMSBC = 0x03, //MSBC数据 + JL_SpeakDataTypeJLA_V2 = 0x04, //JLA_V2 +}; + +/// 结束原因 +typedef NS_ENUM(UInt8, JLSpeakDownReason) { + ///正常 + JLSpeakDownNormal = 0x00, + ///取消 + JLSpeakDownByDevice = 0x01 +}; + +/// SampleRate +typedef NS_ENUM(UInt8, JLRecordSampleRate) { + ///8000 + JLRecordSampleRate8K = 0x08, + ///16000 + JLRecordSampleRate16K = 0x10 +}; + + + + + + +@interface JLModel_SPEEX : NSObject +@property(assign,nonatomic)JL_SpeakType mSpeakType; +@property(assign,nonatomic)JL_SpeakDataType mDataType; +@property(assign,nonatomic)JLSpeakDownReason mDownReason; +@property(assign,nonatomic)uint8_t mSampleRate; //0x08=8k,0x10=16k +@property(assign,nonatomic)uint8_t mVad; //断句方: 0:固件 1:APP +@end + + +///语音助手配置参数 +@interface JLSpeechRecognition:NSObject + +///是否下发识别文本,0:否 1:是 +@property(assign,nonatomic)BOOL sendText; + +/// 是否下发AI文本,0:否 1:是 +@property(assign,nonatomic)BOOL sendAIText; + +/// 是否播放AI TTS语音,0:否 1:是 +@property(assign,nonatomic)BOOL needPlayTTS; + ++(JLSpeechRecognition *)beObjc:(NSData *)data; + +-(NSData *)beData; + +@end + + +/// 录音参数对象 +@interface JLRecordParams : NSObject + +/// 音频类型 +@property(nonatomic,assign)JL_SpeakDataType mDataType; + +/// VAD方式 +@property(assign,nonatomic)JLSpeakDownReason mVadWay; + +/// 采样率 +@property(assign,nonatomic)JLRecordSampleRate mSampleRate; + +/// 语音助手配置参数 +@property(strong,nonatomic)JLSpeechRecognition *speechRecognit; + +@end + + +/// speech 语音:AI云数据格式 +@interface JLSpeechAiCloud : NSObject + +/// 版本信息 +@property(nonatomic,assign)uint8_t version; + +/// 文本类型 +/// 0 : 手表本地文本(语音识别) +/// 1 : AI应答文本 +/// 2 : 错误提示文本 +@property(nonatomic,assign)uint8_t type; + +/// 供应商 +/// 0 : 杰理 +/// 1 : 科大讯飞 +@property(nonatomic,assign)uint8_t vendorID; + +/// 有效数据长度 +@property(nonatomic,assign)uint16_t lenght; + +/// 数据内容 +@property(nonatomic,strong)NSData *playload; + ++(JLSpeechAiCloud *)beObject:(NSData *)data; + +-(NSData *)beData; + +@end + +/// TTS语音合成数据格式 +@interface JLSpeechTTSSynthesis : NSObject + +/// 版本信息 +@property(nonatomic,assign)uint8_t version; + +/// 有效数据长度 +@property(nonatomic,assign)uint16_t lenght; + +/// 数据内容 +@property(nonatomic,strong)NSData *playload; + +-(NSData *)beData; + ++(JLSpeechTTSSynthesis *)beObject:(NSData *)data; +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLModel_SmallFile.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLModel_SmallFile.h new file mode 100644 index 000000000..88bc3b756 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLModel_SmallFile.h @@ -0,0 +1,32 @@ +// +// JLModel_SmallFile.h +// JL_BLEKit +// +// Created by 杰理科技 on 2021/10/14. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN +typedef NS_ENUM(UInt8, JL_SmallFileType) { + JL_SmallFileTypeContacts = 0x01, //联系人 + JL_SmallFileTypeMotionRecord = 0x02, //运动记录 + JL_SmallFileTypeHeartRate = 0x03, //心率数据 + JL_SmallFileTypeSpoData = 0x04, //血氧数据 + JL_SmallFileTypeSleepData = 0x05, //睡眠数据 + JL_SmallFileTypeMassage = 0x06, //消息数据 + JL_SmallFileTypeWeather = 0x07, //天气数据 + JL_SmallFileTypeCallLog = 0x08, //通话记录 + JL_SmallFileTypeStepCount = 0x09, //步数数据 + JL_SmallFileTypeWeight = 0xFF, //体重数据 +}; + +@interface JLModel_SmallFile : NSObject +@property(nonatomic,assign)JL_SmallFileType file_type; +@property(nonatomic,assign)uint8_t file_ver; +@property(nonatomic,assign)uint16_t file_id; +@property(nonatomic,assign)uint16_t file_size; +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLOxygenSturationRemindModel.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLOxygenSturationRemindModel.h new file mode 100644 index 000000000..0474d40f7 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLOxygenSturationRemindModel.h @@ -0,0 +1,29 @@ +// +// JLOxygenSturationRemindModel.h +// JL_BLEKit +// +// Created by EzioChan on 2022/2/17. +// Copyright © 2022 www.zh-jieli.com. All rights reserved. +// + +#import "JLwSettingModel.h" + +NS_ASSUME_NONNULL_BEGIN + +/// 血氧检测控制 +@interface JLOxygenSturationRemindModel : JLwSettingModel +///开关 +@property(nonatomic,assign)BOOL status; +/// 测量模式 +@property(nonatomic,assign)WatchOxygenMsmType rType; + + +-(instancetype)initWithData:(NSData *)data; + +/// 创建一个新的传感器设置对象 +/// @param type 测量类型 +/// @param status 开闭状态 +- (instancetype)initWithModel:(WatchOxygenMsmType)type Status:(BOOL)status; +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLPersonInfoModel.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLPersonInfoModel.h new file mode 100644 index 000000000..9cf61b11a --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLPersonInfoModel.h @@ -0,0 +1,33 @@ +// +// JLPersonInfoModel.h +// JL_BLEKit +// +// Created by EzioChan on 2021/10/12. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import "JLwSettingModel.h" + +NS_ASSUME_NONNULL_BEGIN + +/// 个人信息设置 +@interface JLPersonInfoModel : JLwSettingModel + +/// 身高,cm +@property(nonatomic,assign)uint16_t height; +/// 体重,kg +@property(nonatomic,assign)uint16_t weight; +/// 生日 +@property(nonatomic,strong)NSDate *birthDay; +/// 性别 +/// 女性:0x00 +/// 男性:0x01 +@property(nonatomic,assign)uint8_t gender; + +-(instancetype)initWith:(NSDate *)birthDay height:(uint16_t)h weight:(uint16_t)w gener:(uint8_t)gender; + +-(instancetype)initWithData:(NSData *)data; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLPublicSetting.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLPublicSetting.h new file mode 100644 index 000000000..c905ac186 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLPublicSetting.h @@ -0,0 +1,135 @@ +// +// JLPublicSetting.h +// JL_BLEKit +// +// Created by EzioChan on 2023/12/1. +// Copyright © 2023 www.zh-jieli.com. All rights reserved. +// + +#import +#import "JLPublicSettingBlocks.h" + + +NS_ASSUME_NONNULL_BEGIN +@class JL_ManagerM; + +/// 公共 设置/通知/读取 交互类 0x33 回调协议 +@protocol JLPublicSettingProtocol +@optional + +/// 屏幕亮度设置回调/通知 +/// - Parameters: +/// - manager: 设备 +/// - light: 亮度 +-(void)publicSettingScreenLight:(JL_ManagerM *)manager Value:(uint8_t)light; + +/// 手电筒设置回调/通知 +/// - Parameters: +/// - manager: 设备 +/// - isOn: 是否打开 +-(void)publicSettingFlashLight:(JL_ManagerM *)manager Value:(BOOL)isOn; + +/// 设备绑定状态回调/通知 +/// - Parameters: +/// - manager: 设备 +/// - model: 绑定信息 +-(void)publicSettingBindStatus:(JL_ManagerM *)manager Model:(JLPublicBindDeviceModel *)model; + +/// 功能使用资源通知/回调 +/// - Parameters: +/// - manager: 设备 +/// - model: 资源信息 +-(void)publicSettingFuncSource:(JL_ManagerM *)manager Model:(JLPublicSourceInfoModel *)model; + +/// 功能使用资源通知/回调 +/// - Parameters: +/// - manager: 设备 +/// - model: +/// 0x00 结束 +/// 0x01 开始推送 +-(void)publicSettingReplaceTipsVoiceStatus:(JL_ManagerM *)manager Model:(uint8_t )model Reason:(NSError *_Nullable)err; + +/// +/// - Parameters: +/// - manager: 设备 +/// - mode: 设备 SDK 信息 +-(void)publicSettingDeviceSDKMessage:(JL_ManagerM *)manager Mode:(JLPublicSDKInfoModel *_Nullable)mode; + +@end + + +/// 公共 设置/通知/读取 交互类 0x33 +@interface JLPublicSetting : NSObject + +/// 代理 +@property(nonatomic,assign)id delegate; + +/// 读取设备当前屏幕亮度 +/// - Parameters: +/// - manager: 设备 +/// - block: 回调 +-(void)cmdScreenLightGet:(JL_ManagerM *)manager result:(JLPSScreenLightCbk)block; + +/// 设置设备的屏幕亮度 +/// - Parameters: +/// - manager: 设备 +/// - value: 亮度值 0~100 +/// - block: 回调 +-(void)cmdScreenLightSet:(JL_ManagerM *)manager Value:(uint8_t)value result:(JLPSScreenLightCbk)block; + +/// 读取手电筒开关 +/// - Parameters: +/// - manager: 设备 +/// - block: 回调 +-(void)cmdFlashLightGet:(JL_ManagerM *)manager result:(JLPSFlashLightCbk)block; + +/// 设置手电筒开关 +/// - Parameters: +/// - manager: 设备 +/// - isOn: 开关 +/// - block: 回调 +-(void)cmdFlashLightSet:(JL_ManagerM *)manager Status:(BOOL)isOn result:(JLPSFlashLightCbk)block; + + +/// 获取绑定设备状态 +/// - Parameters: +/// - manager: 设备 +/// - block: 回调 +-(void)cmdDeviceBindStatusGet:(JL_ManagerM *)manager result:(JLPSBindStatusCbk)block; + + +/// 获取功能使用资源设置(彩屏舱) +/// - Parameters: +/// - manager: 设备 +/// - funcType: 功能码 +/// 0x01 屏幕保护程序 +/// 0x02 开机动画 +/// 0x03 墙纸 +/// - block: 回调 +-(void)cmdDeviceFuncUsedSourceGet:(JL_ManagerM *)manager Type:(uint8_t)funcType result:(JLPSSourceInfoCbk)block; + +/// 设置功能使用资源(彩屏舱) +/// - Parameters: +/// - manager: 设备 +/// - info: 设置内容对象 +/// - block: 回调 +-(void)cmdDeviceFuncUseSourceSet:(JL_ManagerM *)manager Info:(JLPublicSourceInfoModel *)info result:(JLPSSourceInfoCbk)block; + + +/// 开始发起替换提示音 +/// - Parameters: +/// - manager: 设备 +/// - info: 提示音包 tone.cfg 信息 +/// - block: 状态回调 +-(void)cmdDeviceReplaceTipsVoiceStart:(JL_ManagerM *)manager Info:(JLPublicTipsVoiceRpInfo *)info result:(JLPSTipsVoiceRpCbk)block; + + +/// 获取设备 SDK 信息 +/// - Parameters: +/// - manager: 设备 +/// - block: 回调 +-(void)cmdDeviceGetDeviceSDKInfo:(JL_ManagerM *)manager result:(JLPSSDKInfoCbk)block; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLPublicSettingBlocks.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLPublicSettingBlocks.h new file mode 100644 index 000000000..f43f6c086 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLPublicSettingBlocks.h @@ -0,0 +1,183 @@ +// +// JLPublicSettingBlocks.h +// JL_BLEKit +// +// Created by EzioChan on 2023/12/1. +// Copyright © 2023 www.zh-jieli.com. All rights reserved. +// + +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +#define PUBLIC_SCREEN_LIGHT 0x0001 //屏幕亮度 +#define PUBLIC_FLASH_LIGHT 0x0002 //手电筒 +#define PUBLIC_DEVICE_BIND_STATUS 0x0003 //设备绑定 +#define PUBLIC_FUNC_SOURCE 0x0004 //功能使用资源(彩屏舱) +#define PUBLIC_FUNC_4G 0x0005 //4G功能升级功能 +#define PUBLIC_TIPS_VOICE 0x0006 //替换提示音 +#define PUBLIC_SDK_INFO 0x0008 //SDK信息 +#define PUBLIC_TWS_HEALTH_INFO 0x0009 //TWS健康信息 + +@class JLPublicBindDeviceModel; +@class JLPublicSourceInfoModel; +@class JLPublic4GModel; +@class JLPublicSDKInfoModel; + +/// 屏幕亮度回调 +typedef void(^JLPSScreenLightCbk)(JL_CMDStatus status,uint8_t value); + +/// 手电筒开关 +typedef void(^JLPSFlashLightCbk)(JL_CMDStatus status,BOOL isOn); + +/// 绑定状态 +typedef void(^JLPSBindStatusCbk)(JL_CMDStatus status,JLPublicBindDeviceModel *_Nullable model); +/// 彩屏舱资源 +typedef void (^JLPSSourceInfoCbk)(JL_CMDStatus status,JLPublicSourceInfoModel *_Nullable model); + +/// 4G模块升级回调 +typedef void (^JLPSSource4GCbk)(JL_CMDStatus status,JLPublic4GModel *_Nullable model); + +/// 替换提示音回调 +typedef void(^JLPSTipsVoiceRpCbk)(JL_CMDStatus status,uint8_t op); + +/// 设备 SDK 信息回调 +typedef void(^JLPSSDKInfoCbk)(JL_CMDStatus status,JLPublicSDKInfoModel *_Nullable model); + +//MARK: - 绑定设备状态(彩屏舱) +/// 绑定设备状态 +@interface JLPublicBindDeviceModel : NSObject + +/// 设备类型 +/// 1 耳机 +/// 2 充电仓 +@property(nonatomic,assign)uint8_t type; + +/// 经典蓝牙地址 +/// 若不支持经典蓝牙,此值为 0 +@property(nonatomic,copy)NSString *edrAddr; + +/// ble 蓝牙地址 +/// 若不支持 ble 蓝牙,此值为 0 +@property(nonatomic,copy)NSString *bleAddr; + +/// 连接状态 +/// 0 未连接 +/// 1 已连接 +/// 2 正在回连 +/// 0xff 不可连接 +@property(nonatomic,assign)uint8_t status; + +/// 连接方式 +/// 0 BLE +/// 1 SPP +@property(nonatomic,assign)uint8_t way; + ++(JLPublicBindDeviceModel *)initData:(NSData *)data; +@end + +//MARK: -公有设置的资源信息(彩屏舱) +/// 公有设置的资源信息 +@interface JLPublicSourceInfoModel:NSObject + +/// 功能码 +/// 0x01 屏幕保护程序 +/// 0x02 开机动画 +/// 0x03 墙纸 +@property(nonatomic,assign)uint8_t type; + +/// 存储器的句柄 +@property(nonatomic,copy)NSData *fileHandle; + +/// 文件簇号 +/// 设置时当前字段设为 0 +@property(nonatomic,assign)uint32_t cluster; + +/// 文件内容 CRC +/// 设置时当前字段为 0 +@property(nonatomic,assign)uint16_t crc; + +/// 文件路径数据 +@property(nonatomic,strong)NSString *filePath; + +-(NSData *)beData; + ++(JLPublicSourceInfoModel *)initData:(NSData *)data; + +@end + +//MARK: - 4G 模块基本信息 + +/// 4G 模块基本信息 +@interface JLPublic4GModel:NSObject + +/// 供应商信息 +/// 0x01:紫光展锐 +/// 0x02:归芯科技 +@property(nonatomic,assign)uint8_t vendor; + +/// 强制升级标识位 +/// 0x00:不强制 +/// 0x01:强制升级 +@property(nonatomic,assign)uint8_t updateStatus; + +/// 版本 +@property(nonatomic,copy)NSString *version; + +/// 开始 OTA 等待时间 +@property(nonatomic,assign)NSTimeInterval startOtaMaxTimeout; + +/// 结束 OTA 等待时间 +@property(nonatomic,assign)NSTimeInterval endOtaMaxTimeout; + + ++(JLPublic4GModel *)initData:(NSData *)data; + +@end + +//MARK: - 替换提示音参数 +@interface JLPublicTipsVoiceRpInfo : NSObject + +/// 目标存储器句柄 +/// 这个要从 JLModel_Device 中获得 +/// JLModelCardInfo *cardInfo; +@property(nonatomic,copy)NSData *devHandle; + +/// 下发的文件名 +@property(nonatomic,strong)NSString *fileName; + +/// 下发的文件内容 +@property(nonatomic,copy)NSData *sendData; + +-(NSData *)createData; + +@end + +// MARK: - 设备 SDK 信息 + +/// 设备 SDK 信息 +@interface JLPublicSDKInfoModel : NSObject + +/// 项目对应 ID +/// 0x0001 充电仓 +@property(nonatomic,assign)uint16_t projectId; + +/// 产品对应 ID +/// 0x0001 彩屏舱 +@property(nonatomic,assign)uint16_t productId; + +/// 芯片 ID +/// 0x0001 AC701N +/// 0x0002 AC707N +@property(nonatomic,assign)uint16_t chipId; + +/// 是否支持 gif +@property(nonatomic,assign)BOOL isSupportGif; + +/// 初始化 +/// - Parameter data: 数据 ++ (JLPublicSDKInfoModel *)initData:(NSData *)data; + +@end +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLSedentaryRmdModel.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLSedentaryRmdModel.h new file mode 100644 index 000000000..06cf049ec --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLSedentaryRmdModel.h @@ -0,0 +1,43 @@ +// +// JLSedentaryRmdModel.h +// JL_BLEKit +// +// Created by EzioChan on 2021/10/12. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import "JLwSettingModel.h" + +NS_ASSUME_NONNULL_BEGIN + +/// 久坐提醒 +@interface JLSedentaryRmdModel : JLwSettingModel + +///开关 +@property(nonatomic,assign)BOOL status; + +/// 提醒模式 +@property(nonatomic,assign)WatchRemindType rType; + +/// 午休免打扰:关闭/打开(午休时段为12:00-14:00) +@property(nonatomic,assign)BOOL doNotDisturb; + +/// 开始时间 +@property(nonatomic,strong)WatchTimer *begin; + +/// 结束时间 +@property(nonatomic,strong)WatchTimer *end; + +- (instancetype)initWithData:(NSData *)data; + +/// 创建一个设置久坐提醒的位置 +/// @param type 提醒模式 +/// @param status 开关 +/// @param dnd 午休免打扰 +/// @param start 开始时间 +/// @param ed 结束时间 +- (instancetype)initWithModel:(WatchRemindType)type Status:(BOOL)status DoNotDisturb:(BOOL)dnd Begin:(WatchTimer *)start End:(WatchTimer *)ed; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLSensorFuncModel.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLSensorFuncModel.h new file mode 100644 index 000000000..39779cfea --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLSensorFuncModel.h @@ -0,0 +1,47 @@ +// +// JLSensorFuncModel.h +// JL_BLEKit +// +// Created by EzioChan on 2021/10/12. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import "JLwSettingModel.h" +#import "JLWatchEnum.h" + +NS_ASSUME_NONNULL_BEGIN + + +/// 传感器开关设置 +@interface JLSensorFuncModel : JLwSettingModel + +/// 计步器开关 +@property(nonatomic,assign)BOOL pedometerStatus; +/// 计步器记录开关 +@property(nonatomic,assign)BOOL pedometerRecordStatus; +/// 心率传感器开关 +@property(nonatomic,assign)BOOL heartRateStatus; +/// 心率传感器记录开关 +@property(nonatomic,assign)BOOL heartRateRecordStatus; +/// 血氧传感器开关 +@property(nonatomic,assign)BOOL bloodOxygenStatus; +/// 血氧传感器记录开关 +@property(nonatomic,assign)BOOL bloodOxygenRecordStatus; +///海拔气压传感器开关 +@property(nonatomic,assign)BOOL AltitudeAirPressureStatus; +///海拔气压传感器记录开关 +@property(nonatomic,assign)BOOL AltitudeAirPressureRecordStatus; + + +/// 传感器功能 +/// @param status 功能的开关状态 +-(void)setFuncBy:(JL_SENSOR_FUNC_SWITCH)status; + +/// @param funcByte 功能的开关状态 +-(instancetype)initWhthFuncByte:(JL_SENSOR_FUNC_SWITCH)funcByte; + +-(instancetype)initWithData:(NSData *)data; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLSleepMonitorModel.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLSleepMonitorModel.h new file mode 100644 index 000000000..5e51a67d3 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLSleepMonitorModel.h @@ -0,0 +1,33 @@ +// +// JLSleepMonitorModel.h +// JL_BLEKit +// +// Created by EzioChan on 2021/10/12. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import "JLwSettingModel.h" + +NS_ASSUME_NONNULL_BEGIN + +/// 睡眠监测设置 +@interface JLSleepMonitorModel : JLwSettingModel +///开关类型 +@property(nonatomic,assign)WatchSwitchType status; +///开始时间 +@property(nonatomic,strong)WatchTimer *start; +/// 结束时间 +@property(nonatomic,strong)WatchTimer *end; + +-(instancetype)initWithData:(NSData *)data; + +/// 构建一个睡眠监测设置 +/// @param status 状态开关 +/// @param begin 开始时间 +/// @param end 结束时间 +-(instancetype)initWithSwitchStatus:(WatchSwitchType)status Begin:(WatchTimer *)begin End:(WatchTimer *)end; + + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLSpdifPCManager.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLSpdifPCManager.h new file mode 100644 index 000000000..d2c594c0c --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLSpdifPCManager.h @@ -0,0 +1,74 @@ +// +// JLSpdifPCManager.h +// JL_BLEKit +// +// Created by EzioChan on 2024/10/15. +// Copyright © 2024 www.zh-jieli.com. All rights reserved. +// + +#import +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +@protocol JLSpdifPCProtocol + +/// 更新 SPDIF 模式 +/// - Parameter spdifModel: SPDIF 模式 +-(void)updateSpdifModel:(JLModelSpdif *)spdifModel; + +/// 更新 PC 从者模式 +/// - Parameter pcServerModel: PC Server +-(void)updatePcServerModel:(JLModelPCServer *)pcServerModel; + +@end + +/// SPDIF 与 PC 从者模式管理 +@interface JLSpdifPCManager : ECOneToMorePtl + +/// SPDIF 模式信息 +@property(nonatomic,strong)JLModelSpdif *spdifModel; + +/// PC 从者模式信息 +@property(nonatomic,strong)JLModelPCServer *pcServerModel; + + +/// 获取 SPDIF 模式的状态 +/// - Parameter manager: 设备对象 +/// - Parameter callBack: 回调 +-(void)getSpdifStatus:(JL_ManagerM *)manager callBack:(JL_CMD_RESPOND)callBack; + +/// 获取 PC 从者模式的状态 +/// - Parameter manager: 设备对象 +/// - Parameter callBack: 回调 +-(void)getPcServerStatus:(JL_ManagerM *)manager callBack: (JL_CMD_RESPOND)callBack; + +/// 设置 SPDIF 模式的播放状态 +/// - Parameter status: 播放状态 +/// - Parameter manager: 设备对象 +/// - Parameter callBack: 回调 +-(void)setSpdifPlayStatus:(BOOL)status Manager:(JL_ManagerM *)manager callBack:(JL_CMD_RESPOND)callBack; + +/// 设置 SPDIF 模式音源 +/// - Parameter type: 音源类型 +/// - Parameter manager: 设备对象 +/// - Parameter callBack: 回调 +-(void)setSpdifAction:(JLSpdifAudioType)type Manager:(JL_ManagerM *)manager callBack:(JL_CMD_RESPOND)callBack; + +/// 设置 PC 从者模式的播放状态 +/// - Parameter status: 播放状态 +/// - Parameter manager: 设备对象 +/// - Parameter callBack: 回调 +-(void)setPcServerPlayStatus:(BOOL)status Manager:(JL_ManagerM *)manager callBack:(JL_CMD_RESPOND)callBack; + +/// 设置 PC 从者模式的操作类型 +/// - Parameter type: 操作类型 +/// - Parameter manager: 设备对象 +/// - Parameter callBack: 回调 +-(void)setPcServerAction:(JLPcServerOpType)type Manager:(JL_ManagerM *)manager callBack:(JL_CMD_RESPOND)callBack; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLSportDataModel.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLSportDataModel.h new file mode 100644 index 000000000..4483e041f --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLSportDataModel.h @@ -0,0 +1,27 @@ +// +// JLSportDataModel.h +// Test +// +// Created by EzioChan on 2021/4/6. +// Copyright © 2021 Zhuhai Jieli Technology Co.,Ltd. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface JLSportDataModel : NSObject + +/// 设备的UUID +@property(nonatomic,strong)NSString *dev_uuid; + +/// 请求内容数据 +@property(nonatomic,strong)NSData *rqData; + +/// 功能掩码 +@property(nonatomic,assign)uint32_t funcMask; + + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLTaskChain.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLTaskChain.h new file mode 100644 index 000000000..8d5d33661 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLTaskChain.h @@ -0,0 +1,117 @@ +// +// TaskChain.h +// JL_BLEKit +// +// Created by EzioChan on 2025/3/20. +// + +#import + +/** + JLTaskChain 任务链 + 用于按顺序执行一组异步任务,每个任务接收上一个任务的输出并通过 completion 回传结果或错误。 + 特性: + - 串行执行:内部使用 `NSOperationQueue` 串行队列保证顺序执行 + - 错误中断:任意任务返回错误后链路立即中断并回调最终 completion + - 取消能力:支持全局与实例级取消 + - 运行保护:运行中禁止追加任务,避免并发修改导致的不确定行为 + */ + +NS_ASSUME_NONNULL_BEGIN +/* + // 创建 TaskChain 实例 + JLTaskChain *chain = [[JLTaskChain alloc] init]; + + // 添加第一个任务:模拟耗时操作返回结果 + [chain addTask:^(id input, void (^completion)(id, NSError *)) { + NSLog(@"任务1开始执行"); + dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ + [NSThread sleepForTimeInterval:2]; + NSLog(@"任务1执行完毕"); + completion(@"结果1", nil); + }); + }]; + + // 添加第二个任务:接收任务1的结果,模拟错误情况 + [chain addTask:^(id input, void (^completion)(id, NSError *)) { + NSLog(@"任务2接收到结果:%@", input); + dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ + [NSThread sleepForTimeInterval:2]; + NSLog(@"任务2发生错误"); + NSError *error = [NSError errorWithDomain:@"com.example.task" code:100 userInfo:@{NSLocalizedDescriptionKey:@"任务2失败"}]; + completion(nil, error); + }); + }]; + + // 添加第三个任务:如果前面的任务成功则执行,否则不会被执行 + [chain addTask:^(id input, void (^completion)(id, NSError *)) { + NSLog(@"任务3接收到结果:%@", input); + dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ + [NSThread sleepForTimeInterval:2]; + NSLog(@"任务3执行完毕"); + completion(@"结果3", nil); + }); + }]; + + // 启动任务链,并传入初始输入 + [chain runWithInitialInput:nil completion:^(id result, NSError *error) { + if (error) { + NSLog(@"任务链执行中断,错误:%@", error.localizedDescription); + } else { + NSLog(@"任务链全部执行完毕,最终结果:%@", result); + } + }]; +*/ + + +/****************************************************************************************************************************** +// 假设 JLTaskChain 和 TaskOperation 已经定义好 +// 模拟一个任务链处理一个字符串列表 +NSArray *taskList = @[@"任务A", @"任务B", @"任务C"]; + + JLTaskChain *chain = [[JLTaskChain alloc] init]; + +// 遍历列表,为每个元素添加一个任务 +for (NSString *taskName in taskList) { + [chain addTask:^(id input, void (^completion)(id, NSError *)) { + NSLog(@"开始处理:%@", taskName); + // 模拟异步耗时操作 + dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ + [NSThread sleepForTimeInterval:1.0]; + // 模拟:如果任务名称为“任务B”,产生错误,后续任务不再执行 + if ([taskName isEqualToString:@"任务B"]) { + NSError *error = [NSError errorWithDomain:@"com.example.task" code:100 userInfo:@{NSLocalizedDescriptionKey:@"任务B 执行失败"}]; + NSLog(@"处理 %@ 时发生错误", taskName); + completion(nil, error); + } else { + // 模拟正常处理,返回结果 + NSString *result = [NSString stringWithFormat:@"%@ 已处理", taskName]; + NSLog(@"处理完成:%@", result); + completion(result, nil); + } + }); + }]; +} + +// 启动任务链,初始输入可以为 nil(或者根据需求传递其他数据) +[chain runWithInitialInput:nil completion:^(id result, NSError *error) { + if (error) { + NSLog(@"任务链中断,错误信息:%@", error.localizedDescription); + } else { + NSLog(@"所有任务完成,最终结果:%@", result); + } +}]; + */ + + +@interface JLTaskChain : NSObject + +// 任务块数组,每个任务块的签名:^(id input, void(^completion)(id output, NSError *error)) +@property (nonatomic, strong) NSMutableArray *taskBlocks; ++ (void)cancelAllTasks; +- (void)addTask:(void (^)(id _Nullable input, void (^completion)(id _Nullable output, NSError *_Nullable error)))task; +- (void)runWithInitialInput:(id _Nullable)input completion:(void (^ _Nullable)(id _Nullable result, NSError *_Nullable error))completion; +- (void)cancel; +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLTipsSoundReplaceMgr.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLTipsSoundReplaceMgr.h new file mode 100644 index 000000000..a0d19f7df --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLTipsSoundReplaceMgr.h @@ -0,0 +1,48 @@ +// +// JLTipsSoundReplay.h +// JL_BLEKit +// +// Created by EzioChan on 2025/5/14. +// Copyright © 2025 www.zh-jieli.com. All rights reserved. +// + +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +typedef void(^JLTipsVoiceBlock)(JL_CMDStatus,NSData *_Nullable info); + +/// 提示音替换 +@interface JLTipsSoundReplaceMgr : NSObject + +/// 单例 ++(instancetype)share; + +/// 是否处于替换中 +-(BOOL)isReplacing; + +/// 是否支持提示音替换查询 +/// - Parameters: +/// - manager: 设备 +/// - result: 回调结果 +-(void)isSupportTipsVoiceReplace:(JL_ManagerM *)manager result:(JLConfigTwsRsp)result; + +/// 获取设备端提示音的信息 +/// - Parameters: +/// - manager: 设备 +/// - result: 回调 +-(void)voicesReplaceGetVoiceInfo:(JL_ManagerM *)manager Result:(JLTipsVoiceBlock)result; + +/// 推送提示音数据到设备 +/// - Parameters: +/// - mgr: 设备 +/// - devhandle: 设备句柄,当前句柄需要通过获取设备存储信息获得,可参考 JLModel_Device 类的 cardInfo 属性,当设备不作要求时,此值填 0xffffffff +/// - path: 提示音本地存放路径 +/// - isReborn: 完成后是否重启设备 +/// - result: 回调结果 +-(void)voicesReplacePushDataRequest:(JL_ManagerM *)mgr DevHandle:(NSData *)devhandle TonePath:(NSString *)path IsReborn:(BOOL)isReborn Result:(JL_BIGFILE_RT __nullable)result; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLTranslateAudio.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLTranslateAudio.h new file mode 100644 index 000000000..e93155045 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLTranslateAudio.h @@ -0,0 +1,61 @@ +// +// JLTranslateAudio.h +// JL_BLEKit +// +// Created by EzioChan on 2024/12/31. +// Copyright © 2024 www.zh-jieli.com. All rights reserved. +// + +#import +#import "JLModel_SPEEX.h" + +NS_ASSUME_NONNULL_BEGIN + +/// 音频类型 +typedef NS_ENUM(NSUInteger, JLTranslateAudioSourceType) { + /// 音频文件 + JLTranslateAudioTypeFile = 0, + /// 设备麦克风 + JLTranslateAudioTypeDeviceMic = 1, + /// 手机麦克风 + JLTranslateAudioTypePhoneMic = 2, + /// eSCO上行 + JLTranslateAudioTypeESCOUp = 3, + /// eSCO下行 + JLTranslateAudioTypeESCODown = 4, + /// A2DP + JLTranslateAudioTypeA2DP = 5, + /// eSCO_Max 上下行 + JLTranslateAudioTypeESCOMax = 6 +}; + +/// 翻译音频 +@interface JLTranslateAudio : NSObject + +/// 来源类型 +@property (assign, nonatomic) JLTranslateAudioSourceType sourceType; + +/// 音频数据类型 +@property (assign, nonatomic) JL_SpeakDataType audioType; + +/// 包计数,倒序,0 为结束包 +@property (assign, nonatomic) int count; + +/// 音频数据的CRC +@property (assign, nonatomic) uint16_t crc; + +/// 数据长度 +@property (assign, nonatomic) int len; + +/// 音频数据 +@property (strong, nonatomic) NSData *data; + ++(JLTranslateAudio *)beObjc:(NSData *)data; + +-(NSData *)toData; + + + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLTranslateSet.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLTranslateSet.h new file mode 100644 index 000000000..caa5547a5 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLTranslateSet.h @@ -0,0 +1,105 @@ +// +// JLTranslateSet.h +// JL_BLEKit +// +// Created by EzioChan on 2024/12/31. +// Copyright © 2024 www.zh-jieli.com. All rights reserved. +// + +#import +#import + +NS_ASSUME_NONNULL_BEGIN +@class JLTranslateSetMode; + +/// 翻译设置结果 +typedef NS_ENUM(NSUInteger, JLTranslateSetResultType) { + /// 成功 + JLTranslateSetResultTypeSuccess = 0x00, + /// 模式相同 + JLTranslateSetResultTypeSameMode = 0x01, + /// 参数错误 + JLTranslateSetResultTypeParamErr = 0x02, + /// 通话中 + JLTranslateSetResultTypeCall = 0x03, + /// 音频播放中 + JLTranslateSetResultTypeAudioPlaying = 0x04, + /// 系统繁忙 + JLTranslateSetResultTypeBusy = 0x05, + /// 操作失败 + JLTranslateSetResultTypeFail = 0x06 +}; + +@protocol JLTranslateSetDelegate + +/// 翻译模式通知 +/// - Parameter mode: 翻译模式 +-(void)translateNotifyMode:(JLTranslateSetMode *)mode; + +/// 翻译音频通知 +/// - Parameter mode: 翻译音频 +-(void)translateReceiveAudioMode:(JLTranslateAudio *)mode; + +/// 翻译缓存 +/// - Parameters: +/// - sourceType: 来源类型 +/// - cacheSize: 剩余缓存大小 +-(void)translateNoteCacheInfo:(JLTranslateAudioSourceType)sourceType cacheSize:(uint32_t)cacheSize; + +@end + + + +typedef void(^JLTranslateGetModeInfoBlock)(JLTranslateSetMode *_Nullable mode,JL_CMDStatus status); + +typedef void(^JLTranslateSetModeBlock)(JLTranslateSetResultType type,JL_CMDStatus status); + +typedef void(^JLTranslateGetCacheInfoBlock)(JL_CMDStatus status,JLTranslateAudioSourceType sourceType,uint32_t cacheSize); + +/// 翻译交互 API +@interface JLTranslateSet : ECOneToMorePtl + +@property(nonatomic, assign)NSTimeInterval cmdMaxTime; + +/// 获取翻译模式 +/// - Parameters: +/// - manager: 设备对象 +/// - result: 结果回调 +-(void)cmdGetModeInfo:(JL_ManagerM *)manager + Result:(JLTranslateGetModeInfoBlock)result; + +/// 设置翻译模式 +/// - Parameters: +/// - mode: 模式 +/// - manager: 设备 +/// - result: 结果 +-(void)cmdSetMode:(JLTranslateSetMode *)mode + Manager:(JL_ManagerM *)manager + Result:(JLTranslateSetModeBlock)result; + + +/// 获取设备可用缓存 +/// - Parameters: +/// - manager: 设备 +/// - type: 来源类型 +/// - result: 结果 +-(void)cmdCheckCache:(JL_ManagerM *)manager SourceType:(JLTranslateAudioSourceType) type Result:(JLTranslateGetCacheInfoBlock)result; + +/// 通知翻译模式 +/// - Parameters: +/// - mode: 模式 +/// - manager: 设备 +-(void)cmdNoteMode:(JLTranslateSetMode *)mode + Manager:(JL_ManagerM *)manager; + +/// 推送翻译音频 +/// - Parameters: +/// - audio: 音频 +/// - manager: 设备 +-(void)cmdPushAudioMode:(JLTranslateAudio *)audio + Manager:(JL_ManagerM *)manager; + + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLTranslateSetMode.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLTranslateSetMode.h new file mode 100644 index 000000000..fae797576 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLTranslateSetMode.h @@ -0,0 +1,65 @@ +// +// JLTranslateSetMode.h +// JL_BLEKit +// +// Created by EzioChan on 2024/12/31. +// Copyright © 2024 www.zh-jieli.com. All rights reserved. +// + +#import +#import "JLModel_SPEEX.h" + +NS_ASSUME_NONNULL_BEGIN + +/// 翻译模式 +typedef NS_ENUM(NSUInteger, JLTranslateSetModeType) { + /// 空闲 + JLTranslateSetModeTypeIdle = 0x00, + /// 仅录音 + JLTranslateSetModeTypeOnlyRecord = 0x01, + /// 录音翻译 + JLTranslateSetModeTypeRecordTranslate = 0x02, + /// 通话翻译 + JLTranslateSetModeTypeCallTranslate = 0x03, + /// 音频翻译 + JLTranslateSetModeTypeAudioTranslate = 0x04, + /// 面对面翻译 + JLTranslateSetModeTypeFaceToFaceTranslate = 0x05, + /// 通话翻译立体声模式 + JLTranslateSetModeTypeCallTranslateStereo = 0x06 +}; + +/// 录音策略 +typedef NS_ENUM(NSInteger, JLTranslateRecordType) { + /// 手机端录音 + JLTranslateRecordByPhone = 0x00, + /// 设备录音 + JLTranslateRecordByDevice = 0x01 +}; + +/// 翻译模式 +@interface JLTranslateSetMode : NSObject + +/// 翻译模式 +/// default is JLTranslateSetModeTypeIdle +@property (nonatomic, assign) JLTranslateSetModeType modeType; + +/// 音频数据类型 +/// default is JL_SpeakDataTypeOPUS +@property (nonatomic, assign) JL_SpeakDataType dataType; + +/// 声道 +/// 默认是1 +@property (nonatomic, assign) NSInteger channel; + +/// 采样率 +/// 默认是16000 +@property (nonatomic, assign) NSInteger sampleRate; + ++(JLTranslateSetMode *)beObjc:(NSData *)data; + +-(NSData *)toData; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLTranslationManager.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLTranslationManager.h new file mode 100644 index 000000000..46243dfc9 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLTranslationManager.h @@ -0,0 +1,160 @@ +// +// JLTranslationManager.h +// JL_BLEKit +// +// Created by EzioChan on 2025/1/3. +// Copyright © 2025 www.zh-jieli.com. All rights reserved. +// + +#import +#import "JLTranslateAudio.h" +#import "JLModel_SPEEX.h" +#import "JLTranslateSetMode.h" +#import "JLTranslateSet.h" + +NS_ASSUME_NONNULL_BEGIN + +@class JL_ManagerM; + +/// 翻译回调 +@protocol JLTranslationManagerDelegate + +/// 初始化成功 +/// @param uuid 设备UUID +-(void)onInitSuccess:(NSString *)uuid; + +/// 模式改变 +/// @param uuid 设备UUID +/// @param mode 翻译模式 +-(void)onModeChange:(NSString *)uuid Mode:(JLTranslateSetMode *)mode; + +/// 音频数据 +/// @param uuid 设备UUID +/// @param data 音频数据 +-(void)onReceiveAudioData:(NSString *)uuid AudioData:(JLTranslateAudio *)data; + +/// 错误 +/// @param uuid 设备UUID +/// @param err 错误 +-(void)onError:(NSString *)uuid Error:(NSError *) err; + +@optional + +/// 通话状态 +/// @param isCalling 是否在通话 +/// @param uuid 设备UUID +-(void)isOnCalling:(BOOL)isCalling UUID:(NSString *)uuid; + + +/// 音频队列结束(或空闲/已结束/中间传输时短暂的播空了) +/// @param uuid 设备UUID +-(void)onSendAudioQueueOver:(NSString *)uuid; + +@end + +typedef void(^JLTranslationManagerGetBlock)(JLTranslateSetMode *_Nullable mode,NSError *_Nullable err); + +typedef void(^JLTranslationManagerSetBlock)(JLTranslateSetResultType status,NSError *_Nullable err); + +/// 翻译传输管理对象 +/// Translation transmission management object +@interface JLTranslationManager : NSObject + +/// 代理 +@property (nonatomic, weak) id delegate; + +/// 命令最大超时时间 +/// 默认是 10s +/// Command maximum timeout time +/// Default is 10s +@property (nonatomic, assign) NSTimeInterval cmdMaxTimeOut; + + + +/// 设备蓝牙 UUID +/// Device Bluetooth UUID +@property (nonatomic, strong, readonly) NSString *uuid; + +/// 当前的翻译模式 +/// Current translation mode +@property (nonatomic, strong, readonly) JLTranslateSetMode *translateMode; + +/// 录音策略,默认是手机端录音 +/// Recording policy, the default is to record on the phone +@property (nonatomic, assign) JLTranslateRecordType recordtype; + +/// 是否在通话中 +/// Whether in a call +@property (nonatomic, assign) BOOL isCalling; + +/// 设备对象 +/// Device object +@property (nonatomic, strong, readonly) JL_ManagerM *manager; + +/// 初始化 +/// init +/// - Parameters: +/// - delegate: 代理 JLTranslationManagerDelegate +/// - manager: 设备对象 DeviceManager +/// - result: 回调 +- (instancetype)initWithDelegate:(id)delegate Manager:(JL_ManagerM *)manager Result:(void(^)(BOOL success, NSError *_Nullable err))result; + +/// 是否支持翻译功能 +/// Does it support translation function +- (BOOL)trIsSupportTranslate; + +/// 是否通过 a2dp 播放 +/// Is it played through a2dp +- (BOOL)trIsPlayWithA2dp; + + +/// 是否正在工作 +/// Is it working +- (BOOL)trIsWorking; + +/// 获取当前翻译模式 +/// Get the current translation mode +/// 回复的内容通过 JLTranslationManagerDelegate 代理回调 +/// Reply content through JLTranslationManagerDelegate delegate +/// - Parameter block: 回调 +- (void)trGetCurrentTranslationMode:(JLTranslationManagerGetBlock _Nullable)block; + +/// 开始翻译模式 +/// Start translation mode +/// - Parameter mode: 翻译模式 translation mode +/// - Parameter block: 回调 +- (void)trStartTranslateMode:(JLTranslateSetMode *)mode Block:(JLTranslationManagerSetBlock _Nullable)block; + +/// 退出翻译模式 +/// Exit translation mode +/// - Parameter block: 回调 +- (void)trExitMode:(JLTranslationManagerSetBlock _Nullable)block; + +/// 写入翻译音频,翻译完/操作完后的音频需要携带原音频的音频类型 JLTranslateAudio 进行回复 +/// Write in translation audio, translation complete/operation complete audio need to carry the original audio JLTranslateAudio reply +/// - Parameters: +/// - audio: JLTranslateAudio 原返回音频类型 +/// - audioData: 处理完的音频数据 +- (void)trWriteAudio:(JLTranslateAudio *)audio TranslateData:(NSData *)audioData; + + +/// 写入翻译音频,翻译完/操作完后的音频需要携带原音频的音频类型 JLTranslateAudio 进行回复 +/// 此方案是采取无交互式的下发方法,根据数据对应可能需要的播放时长来进行直接下发,可能存在风险 +/// 当前默认的时长是 20ms 42 byte 的 jlv2 压缩数据,不支持修改 +/// - Parameters: +/// - audio: JLTranslateAudio 原返回音频类型 +/// - audioData: 处理完的音频数据 +-(void)trWriteAudioV2:(JLTranslateAudio *)audio TranslateData:(NSData *)audioData; + +/// 已准备好发送队列 +-(void)trSendIsRelay; + +/// 销毁 +/// Destroy +/// 如果销毁,需要重新生成对象,此对象的回调将会失效 +/// Destroy, if it is destroyed, the callback of this object will be invalidated +- (void)trDestory; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLTwsHealthConfig.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLTwsHealthConfig.h new file mode 100644 index 000000000..61006d6eb --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLTwsHealthConfig.h @@ -0,0 +1,89 @@ +// +// JLTwsHealthMode.h +// JL_BLEKit +// +// Created by EzioChan on 2025/10/11. +// Copyright © 2025 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN +/// tws 健康配置 +@interface JLTwsHealthConfig : NSObject + +//是否支持单次心率采集 +@property (nonatomic, assign) BOOL isSupportOnceHeartRate; + +//是否支持全天心率采集 +@property (nonatomic, assign) BOOL isSupportAllDayHeartRate; + +//是否支持单次血氧采集 +@property (nonatomic, assign) BOOL isSupportOnceBloodOxygen; + +//是否支持全天步数采集 +@property (nonatomic, assign) BOOL isSupportAllDayStep; + + +-(JLTwsHealthConfig *)initWithData:(NSData *)data; + +@end + +/// 心率模型 +@interface JLTwsHeartRateModel : NSObject + +/// 实时心率 +@property(nonatomic,assign)NSInteger avgHeartRate; +/// 静息心率 +@property(nonatomic,assign)NSInteger restHeartRate; +/// 最大心率 +@property(nonatomic,assign)NSInteger maxHeartRate; +/// 单次测量心率 +@property(nonatomic,assign)NSInteger onceHeartRate; + +/// 初始化心率模型 +/// @param data 数据 +/// @param subMask 子掩码 +-(instancetype)initWithData:(NSData *)data subMask:(uint8_t)subMask; + +@end + + +/// 血氧模型 +@interface JLTwsSpO2Model : NSObject + +///血氧饱和度 +@property(nonatomic,assign)NSInteger avgSpO2; +/// 最大值 +@property(nonatomic,assign)NSInteger maxSpO2; +/// 最小值 +@property(nonatomic,assign)NSInteger minSpO2; +/// 单次测量血氧饱和度 +@property(nonatomic,assign)NSInteger onceSpO2; + +/// 初始化血氧模型 +/// @param data 数据 +/// @param subMask 子掩码 +-(instancetype)initWithData:(NSData *)data subMask:(uint8_t)subMask; + +@end + + +/// 步数模型 +@interface JLTwsStepModel : NSObject + +/// 实时步数 +@property(nonatomic,assign)NSInteger realTimeStep; +/// 距离,单位:0.01公里 +@property(nonatomic,assign)NSInteger distance; +/// 热量:单位:千卡 +@property(nonatomic,assign)NSInteger calorie; + +/// 初始化步数模型 +/// @param data 数据 +/// @param subMask 子掩码 +-(instancetype)initWithData:(NSData *)data subMask:(uint8_t)subMask; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLTwsHealthHeartRateModel.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLTwsHealthHeartRateModel.h new file mode 100644 index 000000000..d79e78cf5 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLTwsHealthHeartRateModel.h @@ -0,0 +1,22 @@ +// +// JLTwsHealthHeartRateModel.h +// JL_BLEKit +// +// Created by EzioChan on 2025/12/9. +// Copyright © 2025 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface JLTwsHealthHeartRateModel : NSObject + +/// 全天心率数组,需要使用小文件格式解析进行解读 +@property (strong, nonatomic) NSArray *heartRateList; + +-(JLTwsHealthHeartRateModel *)initWithData:(NSData *)data; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLTwsHealthManager.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLTwsHealthManager.h new file mode 100644 index 000000000..ae24850fa --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLTwsHealthManager.h @@ -0,0 +1,210 @@ +// +// JLTwsHealthManager.h +// JL_BLEKit +// +// Created by EzioChan on 2025/10/11. +// Copyright © 2025 www.zh-jieli.com. All rights reserved. +// + +#import +#import + +NS_ASSUME_NONNULL_BEGIN +@class JL_ManagerM; +@class JLTwsHealthConfig; +@class JLTwsSpO2Model; +@class JLTwsHeartRateModel; +@class JLTwsStepModel; +@class JLTwsHealthHeartRateModel; + +/// 心率、血氧、步数回调 +@protocol JLTwsHealthManagerDelegate + +/// Tws 耳机设备的心率、血氧、步数 +/// @param model Tws 耳机设备的心率、血氧、步数 +-(void)twsHealthConfigModel:(JLTwsHealthConfig *)model; + +/// Tws 耳机设备的心率、血氧、步数传感器状态 +/// @param heartRateStatus 心率传感器状态 +/// @param bloodOxygenStatus 血氧传感器状态 +/// @param stepStatus 步数传感器状态 +/// @param inEarSensorStatus 入耳检测传感器状态 +-(void)twsHealthSensorStatus:(BOOL)heartRateStatus bloodOxygenStatus:(BOOL)bloodOxygenStatus stepStatus:(BOOL)stepStatus inEarSensorStatus:(BOOL)inEarSensorStatus; + +@optional +/// Tws 耳机设备的心率 +/// @param heartRate 心率 +-(void)twsHealthHeartRate:(JLTwsHeartRateModel *) heartRate; + +/// Tws 耳机设备的血氧 +/// @param spO2 血氧 +-(void)twsHealthBloodOxygen:(JLTwsSpO2Model *) spO2; + +/// Tws 耳机设备的步数 +/// @param step 步数 +-(void)twsHealthStep:(JLTwsStepModel *) step; + +/// Tws 耳机设备的全天心率 +/// @param dailyHeartRate 全天心率 +-(void)twsHealthDailyHeartRate:(JLTwsHealthHeartRateModel *) dailyHeartRate; + +/// Tws 耳机设备开启了心率监测 +-(void)twsHealthStartHeartRate; + +/// Tws 耳机设备取消了心率监测 +-(void)twsHealthCancelHeartRate; + +/// Tws 耳机设备开启了血氧监测 +-(void)twsHealthStartBloodOxygen; + +/// Tws 耳机设备取消了血氧监测 +-(void)twsHealthCancelBloodOxygen; + +/// Tws 耳机设备开启了步数监测 +-(void)twsHealthStartStep; + +/// Tws 耳机设备取消了步数监测 +-(void)twsHealthCancelStep; + +/// Tws 耳机设备开启同步全天心率数据 +-(void)twsHealthStartDailyHeartSync; + +/// Tws 耳机设备结束同步全天心率数据 +-(void)twsHealthEndDailyHeartSync; + +@end + +typedef NS_ENUM(NSUInteger, JLTwsHealthOpType) { + JLTwsHealthOpTypeStartHeartRate = 1, + JLTwsHealthOpTypeCancelHeartRate = 2, + JLTwsHealthOpTypeStartBloodOxygen = 3, + JLTwsHealthOpTypeCancelBloodOxygen = 4, + JLTwsHealthOpTypeStartStep = 5, + JLTwsHealthOpTypeCancelStep = 6, + JLTwsHealthOpTypeStartDailyHeartSync = 32, + JLTwsHealthOpTypeEndDailyHeartSync = 33, +}; + +typedef void(^JLTwsHealthModeBlock)(JLTwsHealthConfig *_Nullable mode, NSError * _Nullable error); + +typedef void(^JLTwsHealthSensorStatusBlock)(BOOL heartRateStatus, BOOL bloodOxygenStatus, BOOL stepStatus, BOOL inEarSensorStatus, NSError * _Nullable error); + +typedef void(^JLTwsHealthResultBlock)(NSError * _Nullable error); + +/// 管理 TWS 耳机健康数据的统一入口,负责: +/// 1) 发送健康相关指令(心率、血氧、步数、全天心率同步等) +/// 2) 解析设备应答与设备主动推送事件,并通过回调/代理分发 +/// 3) 管理传感器状态、最近一次检测结果与超时配置 +@interface JLTwsHealthManager : ECOneToMorePtl + +/// 心率传感器状态 +/// YES:开启检测中 +/// NO:关闭 +@property(nonatomic, assign)BOOL heartRateSensorStatus; + +/// 血氧传感器状态 +/// YES:开启检测中 +/// NO:关闭 +@property(nonatomic, assign)BOOL bloodOxygenSensorStatus; + +/// 步数传感器状态 +/// YES:开启检测中 +/// NO:关闭 +@property(nonatomic, assign)BOOL stepSensorStatus; + +/// 入耳检测传感器状态 +/// YES:入耳 +/// NO:出耳 +@property(nonatomic, assign)BOOL inEarSensorStatus; + +/// 代理 +@property(nonatomic, weak)id delegate; + +-(instancetype)init NS_UNAVAILABLE; + +-(instancetype) init:(JL_ManagerM *)manager delegate:(id)delegate; + +/// 查询配置 +/// - Parameters: +/// - block: 回调 +-(void)cmdGetHealthConfigWithResult:(JLTwsHealthModeBlock)block; + +/// 查询状态 +/// - Parameters: +/// - block: 回调 +-(void)cmdCheckSensorStatus:(JLTwsHealthSensorStatusBlock __nullable)block; + + +/// 控制耳机进行健康数据相关的操作 +/// 操作类型: +/// JLTwsHealthOpTypeStartHeartRate 开启心率监测 +/// JLTwsHealthOpTypeCancelHeartRate 取消心率监测 +/// JLTwsHealthOpTypeStartBloodOxygen 开启血氧监测 +/// JLTwsHealthOpTypeCancelBloodOxygen 取消血氧监测 +/// JLTwsHealthOpTypeStartStep 开启步数监测 +/// JLTwsHealthOpTypeCancelStep 取消步数监测 +/// JLTwsHealthOpTypeStartDailyHeartSync 开启同步全天心率数据 +/// JLTwsHealthOpTypeEndDailyHeartSync 结束同步全天心率数据 +/// 示例:开启心率监测 +/// [manager twsHealthOpActionWithType:JLTwsHealthOpTypeStartHeartRate result:^(void){ +/// NSLog(@"心率监测已开启"); +/// }]; +/// +/// 示例:取消心率监测 +/// [manager twsHealthOpActionWithType:JLTwsHealthOpTypeCancelHeartRate result:^(void){ +/// NSLog(@"心率监测已取消"); +/// }]; +/// +/// 示例:开启血氧监测 +/// [manager twsHealthOpActionWithType:JLTwsHealthOpTypeStartBloodOxygen result:^(void){ +/// NSLog(@"血氧监测已开启"); +/// }]; +/// +/// 示例:取消血氧监测 +/// [manager twsHealthOpActionWithType:JLTwsHealthOpTypeCancelBloodOxygen result:^(void){ +/// NSLog(@"血氧监测已取消"); +/// }]; +/// +/// 示例:开启步数监测 +/// [manager twsHealthOpActionWithType:JLTwsHealthOpTypeStartStep result:^(void){ +/// NSLog(@"步数监测已开启"); +/// }]; +/// +/// 示例:取消步数监测 +/// [manager twsHealthOpActionWithType:JLTwsHealthOpTypeCancelStep result:^(void){ +/// NSLog(@"步数监测已取消"); +/// }]; +/// +/// 示例:开启同步全天心率数据 +/// [manager twsHealthOpActionWithType:JLTwsHealthOpTypeStartDailyHeartSync result:^(void){ +/// NSLog(@"全天心率同步已开启"); +/// }]; +/// +/// 示例:结束同步全天心率数据 +/// [manager twsHealthOpActionWithType:JLTwsHealthOpTypeEndDailyHeartSync result:^(void){ +/// NSLog(@"全天心率同步已结束"); +/// }]; +/// - Parameters: +/// - type: 操作类型 +/// - block: 回调 +-(void)twsHealthOpActionWithType:(JLTwsHealthOpType)type result:(JLTwsHealthResultBlock __nullable)block; + +/// 查询实时步数 +/// 轮询策略 +/// - Parameter time: 轮询间隔 单位 s +/// 一般固件要求时间为 5min 内轮询一次 +/// 例子:[manager loopQueryRealStep:4 * 60]; +-(void)loopQueryRealStep:(NSTimeInterval)time; + +/// 取消轮询 +/// 例子:[manager cancelLoopQueryRealStep]; +-(void)cancelLoopQueryRealStep; + +/// 查询实时步数 +/// 例子:[manager queryRealStep]; +-(void)queryRealStep; + + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLTwsSupportFuncs.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLTwsSupportFuncs.h new file mode 100644 index 000000000..49cb420bb --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLTwsSupportFuncs.h @@ -0,0 +1,51 @@ +// +// JLTwsSupportFuncs.h +// JL_BLEKit +// +// Created by EzioChan on 2024/12/31. +// Copyright © 2024 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface JLTwsSupportFuncs : NSObject + +/// 是否支持ANC功能 +@property(nonatomic,assign)BOOL isSupportAnc; + +/// 是否支持游戏模式 +@property(nonatomic,assign)BOOL isSupportGameMode; + +/// 是否支持自适应ANC +@property(nonatomic,assign)BOOL isSupportAutoAnc; + +/// 是否支持智能免摘 +@property(nonatomic,assign)BOOL isSupportSmartPickFree; + +/// 是否支持场景降噪 +/// scene noise reduction +@property(nonatomic,assign)BOOL isSupportSceneNoiseReduction; + +/// 是否支持风噪检测 +/// Noise detection +@property(nonatomic,assign)BOOL isSupportNoiseDetection; + +/// 是否支持人声增强模式 +/// Vocal Boost Mode +@property(nonatomic,assign)BOOL isSupportVocalBoostMode; + +/// 固件是否支持“一拖二”开 关功能 +/// Does the firmware support the "one drag two" switch function +@property(nonatomic,assign)BOOL isSupportDragWithMore; + + + +-(void)configWithTargetFeature:(NSData *)data; + + + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLWatchEnum.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLWatchEnum.h new file mode 100644 index 000000000..b939ec1eb --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLWatchEnum.h @@ -0,0 +1,228 @@ +// +// JLWatchEnum.h +// JL_BLEKit +// +// Created by EzioChan on 2021/8/2. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import + +extern NSString *_Nonnull const JL_Watch_HeartRate; +extern NSString *_Nonnull const JL_Watch_AirPressure; +extern NSString *_Nonnull const JL_Watch_Altitude; +extern NSString *_Nonnull const JL_Watch_MoveSteps; +extern NSString *_Nonnull const JL_Watch_Stress; +extern NSString *_Nonnull const JL_Watch_Oxsaturation; +extern NSString *_Nonnull const JL_Watch_MaxOxg; +extern NSString *_Nonnull const JL_Watch_RecTime; +extern NSString *_Nonnull const JL_Watch_SportMsg; +extern NSString *_Nonnull const JL_Watch_WatchLog; + +NS_ASSUME_NONNULL_BEGIN + +typedef NS_ENUM(UInt8, JL_WATCH_LOG_MASK) { + /// 加速度 + JL_WATCH_LOG_MASK_Acceleration = 0x80000000 >> 31, + /// 心率和血氧 + JL_WATCH_LOG_MASK_HeartRate_BloodOxy = 0x80000000 >> 30, +}; + +typedef NS_ENUM(UInt8, JL_WATCH_LOG_TYPE) { + ///设备回的加速度 + JL_WATCH_LOG_TYPE_Res_Acceleration = 0x00, + /// 设备回的心率血氧 + JL_WATCH_LOG_TYPE_Res_HeartRate_BloodOxy = 0x01, +}; + +/// 运动记录标记包类型 +typedef NS_ENUM(UInt8, JL_SRMDataType) { + ///开始包 + JL_SRM_Start = 0x00, + ///基础包 + JL_SRM_Basic = 0x01, + ///暂停包 + JL_SRM_Pause = 0x02, + ///每公里配速包 + JL_SRM_Pace = 0x03, + ///结束包 + JL_SRM_End = 0xff, +}; + +// 实时健康数据类型 +typedef NS_ENUM(UInt8, JL_SportDataType) { + ///心率 + JL_SportDataTypeHeartRate = 0, + ///空气压强 + JL_SportDataTypeAirPressure = 1, + ///海拔高度 + JL_SportDataTypeAltitude = 2, + ///运动步数 + JL_SportDataTypeMovementSteps = 3, + ///压力 + JL_SportDataTypeStress = 4, + ///血氧饱和度 + JL_SportDataTypeOxygenSaturation = 5, + ///训练负荷 + JL_SportDataTypeTrainingLoad = 6, + ///最大摄氧量 + JL_SportDataTypeMaxOxygenUptake = 7, + ///运动恢复时间 + JL_SportDataTypeRecoveryTime = 8, + ///运动信息 + JL_SportDataTypeSportMessage = 9, +}; + +// 运动模式 +typedef NS_ENUM(UInt8, JL_SportPattern) { + JL_SportPatternRun = 0, ///跑步 + JL_SportPatternClimb = 1, ///爬山 + JL_SportPatternSwim = 2, ///游泳 +}; + +// 运动数据格式 +typedef NS_ENUM(UInt8, JL_SportDataFormat) { + JL_SportDataFormatBeUint8 = 1, + JL_SportDataFormatBeBigendUint16 = 2, + JL_SportDataFormatBeBigendUint32 = 4, +}; + +typedef NS_ENUM(UInt8, JL_WATCH_SETTING_MASK) { + JL_WATCH_SETTING_MASK_READ_INFO = 0x00,///App读取设备信息 + JL_WATCH_SETTING_MASK_SET_INFO = 0x01,///向设备写入设置信 息 + JL_WATCH_SETTING_MASK_RECIVE_INFO = 0x02,///收到设备推送设置信息 +}; + +/// 查询读取设备信息 +///使用示例: +/// 如查询:传感器、连续测量心率、跌到监察 +/// 则对应的uint32_t 为:0x0000008A +/// 即对应的Bit位指示为:0000 0000 0000 0000 0000 0000 1000 1010 +/// Bit0:保留(考虑是否用于做功能支持位)------ 0 +/// Bit1:传感器功能 +/// Bit2:久坐提醒 +/// Bit3:连续测量心率 +/// Bit4:运动心率提醒 +/// Bit5:压力自动检测 +/// Bit6:睡眠检测 +/// Bit7:跌到监察 +/// Bit8:抬腕监察 +/// Bit9:个人信息 +/// Bit10:蓝牙断开提醒 +/// Bit11:血氧测量提醒 +/// Bit12:紧急联系人 +typedef NS_ENUM(uint32_t, JL_WATCH_SETTING) { + JL_WATCH_SETTING_SENSOR_FUNC = 0x0002, // Bit1:传感器功能 + JL_WATCH_SETTING_SEDENTARY_REMIND = 0x0004, // Bit2:久坐提醒 + JL_WATCH_SETTING_CONTINUOUS_HEARTRATE_MEASUREMENT = 0x0008, // Bit3:连续测量心率 + JL_WATCH_SETTING_EXERCISE_HEARTRATE_REMINDER = 0x0010, // Bit4:运动心率提醒 + JL_WATCH_SETTING_AUTOMATIC_PRESSURE_DETECTION = 0x0020, // Bit5:压力自动检测 + JL_WATCH_SETTING_SLEEP_DETECTION = 0x0040, // Bit6:睡眠检测 + JL_WATCH_SETTING_FALL_DETECTION = 0x0080, // Bit7:跌到监察 + JL_WATCH_SETTING_LIFTWRIST_DETECTION = 0x0100, // Bit8:抬腕监察 + JL_WATCH_SETTING_PERSONAL_INFO = 0x0200, // Bit9:个人信息 + JL_WATCH_SETTING_BLUETOOTH_DISCONECTED_REMINDER = 0x0400, // Bit10:蓝牙断开提醒 + JL_WATCH_SETTING_OXIMETRY = 0x0800, //Bit11:血氧测量提醒 + JL_WATCH_SETTING_EMERGENCY_CONTACT = 0x1000, //Bit12:紧急联系人 +}; + +/// 传感器功能开关 +/// ///使用示例: +/// 如设置打开:计步器、计步器记录、血氧、血氧记录、海拔 +/// 则对应的uint16_t 为:0x73 +/// 即对应的Bit位指示为: 0111 0011 +/// Bit0:计步器开关 +/// Bit1:计步器记录开关 +/// Bit2:心率传感器开关 +/// Bit3:心率传感器记录开关 +/// Bit4:血氧传感器开关 +/// Bit5:血氧传感器记录开关 +/// Bit6:海拔气压传感器开关 +/// Bit7:海拔气压传感器记录开关 +typedef NS_ENUM(uint16_t, JL_SENSOR_FUNC_SWITCH) { + JL_SENSOR_FUNC_SWITCH_PEDOMETER = 0x01, // Bit0:计步器开关 + JL_SENSOR_FUNC_SWITCH_PEDOMETER_RECORD = 0x02, // Bit1:计步器记录开关 + JL_SENSOR_FUNC_SWITCH_HEARTRATE = 0x04, // Bit2:心率传感器开关 + JL_SENSOR_FUNC_SWITCH_HEARTRATE_RECORD = 0x08, // Bit3:心率传感器记录开关 + JL_SENSOR_FUNC_SWITCH_BLOODOXYGEN = 0x10, // Bit4:血氧传感器开关 + JL_SENSOR_FUNC_SWITCH_BLOODOXYGEN_RECORD = 0x20, // Bit5:血氧传感器记录开关 + JL_SENSOR_FUNC_SWITCH_ALTITUDE_AIRPRESSURE = 0x40, // Bit6:海拔气压传感器开关 + JL_SENSOR_FUNC_SWITCH_ALTITUDE_AIRPRESSURE_RECORD = 0x80, // Bit7:海拔气压传感器记录开关 +}; + +///运动状态同步相关命令 +typedef NS_ENUM(UInt8, JL_WearSyncStatus) { + /// 读取运动信息 + JL_WearSyncStatus_ReadInfo = 0x00, + /// 开始运动 + JL_WearSyncStatus_Start = 0x01, + /// APP结束运动 + JL_WearSyncStatus_EndByApp = 0x02, + /// 固件结束运动 + JL_WearSyncStatus_EndByDevice = 0x03, + /// 暂停运动 + JL_WearSyncStatus_Pause = 0x04, + /// 继续运动 + JL_WearSyncStatus_Continue = 0x05, + /// 请求运动实时数据 + JL_WearSyncStatus_RealTimeInfoRequire = 0x06, +}; + + +///运动状态 +typedef NS_ENUM(UInt8, WatchSportStatus) { + /// 暂停 + WatchSportStatus_Pause = 0x00, + /// 运动中 + WatchSportStatus_Motion = 0x01 +}; + +///心率模式 +typedef NS_ENUM(UInt8, WatchHeartRateType) { + ///最大心率模式 + WatchHeartRate_Max = 0x00, + ///存储心率模式 + WatchHeartRate_Save = 0x01 +}; +/// 运动强度类型 +typedef NS_ENUM(UInt8, WatchExerciseIntensityType) { + ///非运动模式 + WatchExercise_Not = 0x00, + ///最大心率模式:热身 储备心率模式:有氧基础 + WatchExercise_Level1 = 0x01, + ///最大心率模式:燃脂 储备心率模式:有氧进阶 + WatchExercise_Level2 = 0x02, + ///最大心率模式:有氧耐力 储备心率模式:乳酸阈值 + WatchExercise_Level3 = 0x03, + ///最大心率模式:无氧耐力 储备心率模式:无氧基础 + WatchExercise_Level4 = 0x04, + ///最大心率模式:极限 储备心率模式:无氧进阶 + WatchExercise_Level5 = 0x05 +}; +///睡眠类型 +typedef NS_ENUM(UInt8, WatchSleepType) { + ///清醒 + WatchSleep_WideAwake = 0xFF, + /// 浅睡 + WatchSleep_Light = 0x01, + /// 深睡 + WatchSleep_Deep = 0x02, + /// 快速眼动 + WatchSleep_RapidEyeMovement = 0x03, + /// 零星小睡 + WatchSleep_SporadicNaps = 0x04 +}; + + +@interface JLWatchEnum : NSObject + +/** + * 运动数据类型转换为运动数据格式 + * @param sportDataType 运动数据类型 + * @return JL_SportDataFormat 运动数据格式 + */ ++ (JL_SportDataFormat)sportDataFormatFromSportDataType:(JL_SportDataType)sportDataType; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLWearSync.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLWearSync.h new file mode 100644 index 000000000..b4cd9509d --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLWearSync.h @@ -0,0 +1,76 @@ +// +// JLWearSync.h +// JL_BLEKit +// +// Created by EzioChan on 2021/10/26. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import +#import "JL_RCSP.h" +#import "JLWatchEnum.h" +#import "JL_EntityM.h" +#import "JL_SDM_Header.h" +#import "JL_WatchSyncProtocol.h" + + +NS_ASSUME_NONNULL_BEGIN + +/// 穿戴设备状态同步指令 +@interface JLWearSync : NSObject + ++(instancetype)share; + +/// 加入协议响应 +/// @param delegate 对象 +-(void)addProtocol:(id)delegate; + +/// 移除协议响应 +/// @param delegate 对象 +-(void)removeProtocol:(id)delegate; + +/// 读取运动信息 +/// @param entity 设备entity +/// @param block JLWearSyncInfoModel 回调 +/// 本条命令的回调通过JLWearSyncProtocol协议 +///-(void)jlWearSyncSportInfo:(JLWearSyncInfoModel *_Nonnull)model; +-(void)w_requireSportInfoWith:(JL_EntityM *)entity Block:(JL_CB_SyncSportInfo _Nullable)block; + +///开始运动命令 +/// @param type 运动类型 +/// 0x00 :非运动模式 +/// 0x01 :室外跑步 +/// 0x02 :室内跑步 +/// @param entity 设备entity +/// @param block 命令成功与否回调 +-(void)w_SportStart:(uint8_t)type With:(JL_EntityM *)entity Block:(JL_CB_Status _Nullable)block; + +/// 结束运动命令 +/// @param entity 设备entity +///本条命令的回调通过JLWearSyncProtocol协议 +///-(void)jlWearSyncStopMotion:(JLWearSyncFinishModel *_Nonnull)model With:(JL_EntityM *_Nonnull)entity; +-(void)w_SportFinishWith:(JL_EntityM*)entity; + +///暂停运动命令 +/// @param entity 设备entity +/// @param block 命令成功与否回调 +-(void)w_SportPauseWith:(JL_EntityM*)entity Block:(JL_CB_Status _Nullable)block; + +///继续运动命令 +/// @param entity 设备entity +/// @param block 命令成功与否回调 +-(void)w_SportContinueWith:(JL_EntityM*)entity Block:(JL_CB_Status _Nullable)block; + +/// 读取运动实时数据 +/// @param entity 设备entity +///本条命令的回调通过JLWearSyncProtocol协议 +-(void)w_requireRealTimeSportInfoWith:(JL_EntityM *)entity; + +/// 实时数据获取时间间隔设置 +/// @param interval 时间间隔,单位:ms +/// @param entity 设备entity +-(void)pr_setTimeInterval:(UInt16)interval With:(JL_EntityM *)entity; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLWearSyncCustom.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLWearSyncCustom.h new file mode 100644 index 000000000..130e23941 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLWearSyncCustom.h @@ -0,0 +1,97 @@ +// +// JLWearSyncCustom.h +// JL_BLEKit +// +// Created by EzioChan on 2022/4/13. +// Copyright © 2022 www.zh-jieli.com. All rights reserved. +// + +#import +#import "JL_RCSP.h" +#import "JL_EntityM.h" +#import "JL_SDM_Header.h" + + + +NS_ASSUME_NONNULL_BEGIN + +@protocol JLWearSyncCustomPtl + +/// 运动信息返回 +/// @param model 运动信息对象 +/// @param entity 设备entity +-(void)jlWearSyncSportInfo:(JLWearSyncDataModel *_Nonnull)model With:(JL_EntityM *_Nonnull)entity; + +/// 结束运动返回内容 +/// @param model 结束时间相隔信息对象 +/// @param entity 设备entity +-(void)jlWearSyncStopMotion:(JLWearSyncFinishDataModel *_Nonnull)model With:(JL_EntityM *_Nonnull)entity; + +/// 开始运动返回消息 +/// @param entity 设备entity +-(void)jlWearSyncStartMotionWith:(JL_EntityM *_Nonnull)entity; + +/// 暂停运动 +/// @param entity 设备entity +-(void)jlWearSyncStatusPauseWith:(JL_EntityM *_Nonnull)entity; + +/// 继续运动 +/// @param entity 设备entity +-(void)jlWearSyncStatusContiuneWith:(JL_EntityM *_Nonnull)entity; + +/// 实时数据回调 +/// @param model 实时数据模型 +/// @param entity 设备entity +-(void)jlWearSyncRealTimeData:(JLWearSyncRealTimeData *_Nonnull)model With:(JL_EntityM *_Nonnull)entity; + +@end + + + +@interface JLWearSyncCustom : NSObject + +@property(nonatomic,weak)id delegate; + +/// 读取运动信息 +/// @param entity 设备entity +/// @param block JLWearSyncInfoModel 回调 +/// 本条命令的回调通过JLWearSyncProtocol协议 +///-(void)jlWearSyncSportInfo:(JLWearSyncInfoModel *_Nonnull)model; +-(void)w_requireSportInfoWith:(JL_EntityM *)entity Block:(JL_CB_SyncSportDataInfo _Nullable)block; + +///开始运动命令 +/// @param type 运动类型 +/// @param entity 设备entity +/// @param block 命令成功与否回调 +-(void)w_SportStart:(UInt8)type With:(JL_EntityM *)entity Block:(JL_CB_Status _Nullable)block; + +/// 结束运动命令 +/// @param entity 设备entity +///本条命令的回调通过JLWearSyncProtocol协议 +///-(void)jlWearSyncStopMotion:(JLWearSyncFinishModel *_Nonnull)model With:(JL_EntityM *_Nonnull)entity; +-(void)w_SportFinishWith:(JL_EntityM*)entity; + +///暂停运动命令 +/// @param entity 设备entity +/// @param block 命令成功与否回调 +-(void)w_SportPauseWith:(JL_EntityM*)entity Block:(JL_CB_Status _Nullable)block; + +///继续运动命令 +/// @param entity 设备entity +/// @param block 命令成功与否回调 +-(void)w_SportContinueWith:(JL_EntityM*)entity Block:(JL_CB_Status _Nullable)block; + +/// 读取运动实时数据 +/// @param entity 设备entity +///本条命令的回调通过JLWearSyncProtocol协议 +-(void)w_requireRealTimeSportInfoWith:(JL_EntityM *)entity; + +/// 实时数据获取时间间隔设置 +/// @param interval 时间间隔,单位:ms +/// @param entity 设备entity +-(void)pr_setTimeInterval:(UInt16)interval With:(JL_EntityM *)entity; + + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLWearSyncFinishModel.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLWearSyncFinishModel.h new file mode 100644 index 000000000..8ef17f472 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLWearSyncFinishModel.h @@ -0,0 +1,54 @@ +// +// JLWearSyncFinishModel.h +// JL_BLEKit +// +// Created by EzioChan on 2021/10/27. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import +#import "JLWatchEnum.h" +NS_ASSUME_NONNULL_BEGIN + + +@interface JLWearSyncFinishDataModel:NSObject + +@property(nonatomic,strong)NSData *basicData; + +@end + + +@interface JLWatchExerciseIntens:NSObject + +/// 运动强度类型 +@property(nonatomic,assign)WatchExerciseIntensityType type; + +/// 持续时间 +@property(nonatomic,assign)UInt32 duration; + +@end + +@interface JLWearSyncFinishModel : JLWearSyncFinishDataModel + +/// 结束时间 +@property(nonatomic,strong)NSDate *endTime; + +/// 运动恢复时间 +/// 格式 :hour : min +@property(nonatomic,strong)NSString *recyleTime; + +/// 运动记录文件ID +@property(nonatomic,assign)UInt16 sportId; + +/// 运动记录文件大小 +@property(nonatomic,assign)UInt16 fileSize; + +/// 运动强度类型数组 +@property(nonatomic,strong)NSArray *durationArray; + + ++(JLWearSyncFinishModel *)initWithData:(NSData*)data; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLWearSyncInfoModel.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLWearSyncInfoModel.h new file mode 100644 index 000000000..9dc5086a3 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLWearSyncInfoModel.h @@ -0,0 +1,51 @@ +// +// JLWearSyncInfoModel.h +// JL_BLEKit +// +// Created by EzioChan on 2021/10/27. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import +#import "JLWatchEnum.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface JLWearSyncDataModel : NSObject + +/// 基础返回对象 +@property(nonatomic,strong)NSData *basicData; + +@end + + +@interface JLWearSyncInfoModel : JLWearSyncDataModel + +///运动模式类型 +/// 0x00 非运动模式 +/// 0x01 户外跑步 +/// 0x02 室内跑步 +@property(nonatomic,assign)uint8_t sportType; + +/// 运动状态 +@property(nonatomic,assign)WatchSportStatus status; + +///运动Id +@property(nonatomic,assign)double sportID; + +///设备是否包含GPS +@property(nonatomic,assign)BOOL hasGPS; + +///心率模式 +@property(nonatomic,assign)WatchHeartRateType heartRateType; + +///建议实时数据读取时间间隔,单位:ms +@property(nonatomic,assign)UInt16 interval; + +/// 利用设备返回的数据初始化一个运动信息对象 +/// @param data 设备返回数据 ++(JLWearSyncInfoModel *)initWithData:(NSData *)data; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLWearSyncRealTimeModel.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLWearSyncRealTimeModel.h new file mode 100644 index 000000000..ed10d1e50 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLWearSyncRealTimeModel.h @@ -0,0 +1,57 @@ +// +// JLWearSyncRealTimeModel.h +// JL_BLEKit +// +// Created by EzioChan on 2021/10/27. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import +#import "JLWatchEnum.h" + +NS_ASSUME_NONNULL_BEGIN + + +@interface JLWearSyncRealTimeData : NSObject + +@property(nonatomic,strong)NSData *basicData; + +@end + +@interface JLWearSyncRealTimeModel : JLWearSyncRealTimeData + +/// 类型 +@property(nonatomic,assign)UInt8 type; + +/// 运动步数 +@property(nonatomic,assign)UInt32 sportStep; + +/// 运动距离,单位:0.01公里 +@property(nonatomic,assign)UInt16 distance; + +/// 运动时长:单位:秒 +@property(nonatomic,assign)UInt32 exerciseTime; + +/// 速度,单位0:0.01公里/小时,(倒数为配速,单位:秒/公里) +@property(nonatomic,assign)UInt16 speed; + +/// 热量,单位:千卡 +@property(nonatomic,assign)UInt16 calories; + +/// 步频,单位:步/分钟 +@property(nonatomic,assign)UInt16 cadence; + +///步幅,单位:厘米 +@property(nonatomic,assign)UInt16 stride; + +///实时运动强度状态 +@property(nonatomic,assign)WatchExerciseIntensityType statusType; + +///运动实时心率 +@property(nonatomic,assign)UInt8 heartRate; + ++(JLWearSyncRealTimeModel *)initWithData:(NSData *)data; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLWearable.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLWearable.h new file mode 100644 index 000000000..6096f3264 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLWearable.h @@ -0,0 +1,137 @@ +// +// JLWearable.h +// Test +// +// Created by EzioChan on 2021/4/6. +// Copyright © 2021 Zhuhai Jieli Technology Co.,Ltd. All rights reserved. +// + +#import +#import "JL_RCSP.h" +#import "JL_EntityM.h" +#import "JL_SDM_Header.h" +#import "JL_WatchProtocol.h" +#import "JLWearSync.h" +#import "JLWearSyncCustom.h" + +NS_ASSUME_NONNULL_BEGIN + +#define JL_RECIVED_DATA @"JL_RECIVED_DATA" + + +/// 穿戴设备基础命令控制 +@interface JLWearable : NSObject + +@property(nonatomic,assign,readonly)uint8_t version; +@property(nonatomic,strong)JL_CB_HeartRate heartRate; +@property(nonatomic,strong)JL_CB_AirPressure airPressure; +@property(nonatomic,strong)JL_CB_Altitude alititude; +@property(nonatomic,strong)JL_CB_MoveSteps moveStep; +@property(nonatomic,strong)JL_CB_Stress stress; +@property(nonatomic,strong)JL_CB_Oxsaturation oxStaturation; +@property(nonatomic,strong)JL_CB_TrainLoad trainLoad; +@property(nonatomic,strong)JL_CB_MaxOxg maxOxg; +@property(nonatomic,strong)JL_CB_RecTime rectime; +@property(nonatomic,strong)JL_CB_SportMsg sportMsg; +@property(nonatomic,strong)JL_CB_WatchLog logMsg; +@property(nonatomic,strong,readonly)JL_EntityM* responseEntity; + ++(instancetype)sharedInstance; + +/// 把对象加入协议 +/// @param delegate 对象 +-(void)w_addDelegate:(id)delegate; + +/// 移除对象的协议 +/// @param delegate 对象 +-(void)w_removeDelegate:(id)delegate; + +/// 移除所有对象的协议 +-(void)w_removeAll; + +/// 请求穿戴设备的数据 +/// 使用例子: +/** + JLWearable *w = [JLWearable sharedInstance]; + NSMutableArray *array = [NSMutableArray new]; + [array addObject:[JL_SDM_HeartRate requireRealTime:YES Resting:YES Max:YES]]; + [array addObject:[JL_SDM_Altitude requireRealTime:YES min:NO Max:NO]]; + [array addObject:[JL_SDM_MoveSteps require]]; + w.heartRate = ^(JL_SDM_HeartRate *heartRate) { + //心率信息 + }; + w.alititude = ^(JL_SDM_Altitude *altitude) { + //海拔信息 + }; + JL_EntityM *entity = [[JL_EntityM alloc] init]; + [w requestSportData:array withEntity:entity]; +*/ +/// @param reqModels 数据模型,可参考JL_SDM_相关的类型请求,这是个父类,这里是通过多态的方式来实现选择性的请求 +/// @param entity 当前设备的entity +/// +-(void)w_requestSportData:(NSMutableArray*)reqModels withEntity:(JL_EntityM *)entity; + +/// 私有测试接口 +/// @param data 数据 +/// @param entity 当前设备entity +/// @param opcode 操作 +-(void)pr_requestSportDataMask:(NSData *)data withEntity:(JL_EntityM *)entity opCode:(uint16_t)opcode; + + +/// 收到数据解析 +/// @param pkg 收到的数据包 +/// @param entity 当前的entity +-(void)w_inputPKG:(JL_PKG*)pkg withEntity:(JL_EntityM *)entity; + +/// 推送天气到手表 +/// @param weather 天气内容 +/// @param entity 服务对象 +/// @param block 推送回调 +-(void)w_syncWeather:(JL_MSG_Weather *)weather withEntity:(JL_EntityM *)entity result:(JL_CB_Status)block; + + +/** + 请求设备传感器的log + 使用示例 + [[JLWearable shareInstance] w_transportLog:Log_Acceleration | Log_HeartRate_BloodOxy withEntity:entity]; + */ +/// 请求设备传感器的log +/// @param model 请求类型(Log_Acceleration | Log_HeartRate_BloodOxy) +/// @param entity 当前的entity +-(void)w_transportLog:(JL_WATCH_LOG_MASK)model withEntity:(JL_EntityM *)entity; + + +//MARK: - 设备设置命令 + +/// 查询读取设备信息 +/// @param target JL_WATCH_SETTING枚举,支持|运算同时设置多个设备类型信息 +/// @param entity 当前的entity +/// /// 本方法的返回结果,需要接收对应的协议:JL_WatchProtocol ,并把遵循协议的对象加入到本单例中 +/// -(void)w_addDelegate:(id)delegate; +-(void)w_InquireDeviceFuncWith:(JL_WATCH_SETTING)target withEntity:(JL_EntityM *)entity; + +/// 向设备写入设置信息 +/// @param models 设置对应的功能模型 +/// @param entity 当前的entity +/// @param block 回复设置的状态 +/// 使用示例: +/// 如设置:传感器、久坐提醒、蓝牙断开提醒 +/// NSMutableArray * models = [NSMutableArray new]; +/// /*计步相关传感器*/ +/// JLSensorFuncModel *model = [[JLSensorFuncModel alloc] initWhthFuncByte:0x0073];//详情设置可参考相关接口 +/// [models addObject:model]; +/// /*久坐设置*/ +/// JLSedentaryRmdModel *model1 = [[JLSedentaryRmdModel alloc] initWithModel:s_Shake Status:true]; +/// [models addObject:model1]; +/// /*蓝牙断开提醒*/ +/// JLDisconnectRemindModel *model2 = [[JLDisconnectRemindModel alloc] initWithModel:s_BrightScreen Status:true]; +/// [models addObject:model2]; +/// [[JLWearable sharedInstance] w_SettingDeviceFuncWith:models withEntity:requestEntity] +/// 本方法的返回结果,需要接收对应的协议:JL_WatchProtocol ,并把遵循协议的对象加入到本单例中 +/// -(void)w_addDelegate:(id)delegate; +-(void)w_SettingDeviceFuncWith:(NSArray *)models withEntity:(JL_EntityM *)entity result:(JL_CB_Status)block; + + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLWristLiftDetectionModel.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLWristLiftDetectionModel.h new file mode 100644 index 000000000..c7a838e27 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLWristLiftDetectionModel.h @@ -0,0 +1,37 @@ +// +// JLWristLiftDetectionModel.h +// JL_BLEKit +// +// Created by EzioChan on 2021/10/12. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import "JLwSettingModel.h" + +NS_ASSUME_NONNULL_BEGIN + +/// 抬腕监测设置 +@interface JLWristLiftDetectionModel : JLwSettingModel +///开关 +@property(nonatomic,assign)WatchSwitchType status; +/// 提醒模式 +@property(nonatomic,assign)WatchRemindType rType; +/// 开始时间 +@property(nonatomic,strong)WatchTimer *start; + +/// 结束时间 +@property(nonatomic,strong)WatchTimer *end; + + +-(instancetype)initWithData:(NSData *)data; + +/// 构建一个抬腕提醒设置对象 +/// @param type 提醒类型 +/// @param status 开关类型 +/// @param begin 开始时间 +/// @param ed 结束时间 +- (instancetype)initWithModel:(WatchRemindType)type Status:(WatchSwitchType )status Begin:(WatchTimer *)begin End:(WatchTimer *)ed; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_AlarmClockManager.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_AlarmClockManager.h new file mode 100644 index 000000000..5b2f837f2 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_AlarmClockManager.h @@ -0,0 +1,116 @@ +// +// JL_AlarmClockManager.h +// JL_BLEKit +// +// Created by EzioChan on 2021/12/16. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import +#import +#import +#import +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +typedef NS_ENUM(UInt8, JL_RtcOperate) { + JL_FlashOperateFlagRead = 0x00, //读取 + JL_FlashOperateFlagWrite = 0x01, //设置 +}; + +typedef void(^JL_RTC_ALARM_BK)(NSArray * __nullable array, uint8_t flag); + +typedef void(^JL_RTC_GET_ALARM_BK)(NSArray * __nullable alarms,NSError * __nullable error); + +#pragma mark ---> 闹钟响与停止 +///闹钟正在响 +extern NSString *kJL_MANAGER_RTC_RINGING; + +///闹钟停止响 +extern NSString *kJL_MANAGER_RTC_RINGSTOP; + +//闹钟铃声试听 +extern NSString *kJL_MANAGER_RTC_AUDITION; + + +/// RTC闹钟管理者 +@interface JL_AlarmClockManager : JL_FunctionBaseManager + +///RTC 版本 +@property (assign,nonatomic) uint8_t rtcVersion; +///是否支持闹铃设置 +@property (assign,nonatomic) JL_RTCAlarmType rtcAlarmType; +///设备当前时间 +@property (strong,nonatomic) JLModel_RTC *rtcModel; +///设备闹钟数组 +@property (strong,nonatomic) NSMutableArray *rtcAlarms; +///默认铃声 +@property (strong,nonatomic) NSMutableArray *rtcDfRings; + + +/// 查询设备闹钟 +/// - Parameter result: 设备回调 +-(void)cmdRtcGetAlarms:(JL_RTC_GET_ALARM_BK)result; + + +/// 设置/增加闹钟 +/// - Parameters: +/// - array: array 闹钟模型数组 +/// - result: 结果回调 +-(void)cmdRtcSetArray:(NSArray*)array Result:(JL_CMD_RESPOND __nullable)result; + + +/// 删除闹钟 +/// - Parameters: +/// - array: 闹钟序号数组 +/// - result: 设备回复 +-(void)cmdRtcDeleteIndexArray:(NSArray*)array Result:(JL_CMD_RESPOND __nullable)result; + + +/// 停止闹钟响声 +/// - Parameter result: 设备回复 +-(void)cmdRtcStopResult:(JL_CMD_RESPOND __nullable)result; + + +/// 闹钟试听响铃 +/// - Parameters: +/// - rtc: 闹钟模型 +/// - option: 启停标记 +/// - result: 设备回复 +-(void)cmdRtcAudition:(JLModel_RTC *)rtc Option:(BOOL)option result:(JL_CMD_RESPOND __nullable)result; + + +/// 闹铃设置 +/// @param operate 0x00:读取 0x01:设置 +/// @param index 掩码 (0x01设置第1个闹钟,0x03设置第一个和第二个闹钟) +/// @param setting 设置选项,读取时无需传入 +/// @param result 设备回复 +-(void)cmdRtcOperate:(JL_RtcOperate)operate + Index:(uint8_t)index + Setting:(JLModel_AlarmSetting* __nullable)setting + Result:(JL_RTC_ALARM_BK __nullable)result; + + +/// 解析闹钟数据内容 +/// @param infoData 数据内容 +/// @param ltvVersion LTV的版本 +-(void)parseData:(NSData *)infoData WithLtyType:(uint8_t)ltvVersion; + +/// 【闹钟信息】解析 +/// - Parameters: +/// - data: 需要解析的数据 +/// - rtcType: RTC类型 ++(NSMutableArray *)makeOutRtc:(NSData*)data RtcType:(uint8_t)rtcType; + + +/// [默认闹钟铃声]解析 +/// - Parameter data: [默认闹钟铃声]数据 ++(NSMutableArray *)makeOutRtcDefaultRing:(NSData *)data; + + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_Assist.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_Assist.h new file mode 100644 index 000000000..15453d0b9 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_Assist.h @@ -0,0 +1,82 @@ +// +// JL_Assist.h +// QCY_Demo +// +// Created by 杰理科技 on 2021/8/12. +// Copyright © 2021 杰理科技. All rights reserved. +// + +#import +#import + + +@protocol JL_AssistDelegate + +-(void)assistDidWriteData:(NSData *_Nonnull)data; + +@end + +NS_ASSUME_NONNULL_BEGIN +typedef void(^JL_Assist_BK)(BOOL isPaired); + +@class JL_ManagerM; + +@interface JL_Assist : NSObject +@property(strong,nonatomic)JL_ManagerM *mCmdManager; //命令中心 +@property(strong,nonatomic)NSString *mService; //服务号 +@property(strong,nonatomic)NSString *mRcsp_W; //特征:RCSP写 +@property(strong,nonatomic)NSString *mRcsp_R; //特征:RCSP读 +///握手(配对)秘钥 +@property(strong,nonatomic)NSData *__nullable mPairKey __attribute__((deprecated("Use mAuthKey instead"))); +@property(assign,nonatomic)BOOL mNeedPaired __attribute__((deprecated("Use mAuthEnable instead"))); //是否需要配对 +/// 设备认证密钥 +@property(strong,nonatomic)NSData *__nullable mAuthKey; +/// 是否需要设备认证 +@property(assign,nonatomic)BOOL mAuthEnable; +@property(assign,nonatomic)BOOL mLogData; //是否打印裸数据 +@property(assign,nonatomic)NSInteger mLimitMtu; //(默认40)在最大的MTU基础上减少数据量 +@property(assign,nonatomic)NSInteger mMaxMtu; //最大MTU(初始化不一定准确,可以再实际使用时再次获取一下)[peripheral maximumWriteValueLengthForType:CBCharacteristicWriteWithoutResponse]; +@property(strong,nonatomic)CBPeripheral *__nullable mRcspPeripheral; +@property(strong,nonatomic)CBCharacteristic *__nullable mRcspWrite; +@property(strong,nonatomic)CBCharacteristic *__nullable mRcspRead; +@property(strong,nonatomic)NSString *mBleName; //设备名字 + +///代理,如果实现了此代理则发出的数据都需要走回调发送,内部不处理 +/// @discussion JL_AssistDelegate +@property(assign,nonatomic)id __nullable mDelegate; + +/// Execute in a method 「- (void)centralManagerDidUpdateState:」 +/// @param state CBManagerState +-(void)assistUpdateState:(CBManagerState)state; + +/// Execute in a method 「- (void)centralManager:didDisconnectPeripheral:error:」 +/// @param peripheral CBPeripheral +-(void)assistDisconnectPeripheral:(CBPeripheral *)peripheral; + + +/// Execute in a method 「- (void)peripheral:didDiscoverServices:」 +/// @param service CBService +/// @param peripheral CBPeripheral +-(void)assistDiscoverCharacteristicsForService:(CBService*)service + Peripheral:(CBPeripheral*)peripheral; + +/// Execute in a method 「- (void)peripheral:didUpdateNotificationStateForCharacteristic:error:」 +/// @param characteristic CBCharacteristic +/// @param peripheral CBPeripheral +/// @param result JL_Assist_BK (YES:配对成功 NO:配对失败) +-(void)assistUpdateCharacteristic:(nonnull CBCharacteristic *)characteristic + Peripheral:(CBPeripheral*)peripheral + Result:(JL_Assist_BK)result; + +/// Execute in a method 「- (void)peripheral:didUpdateValueForCharacteristic:error:」 +/// @param characteristic CBCharacteristic +-(void)assistUpdateValueForCharacteristic:(CBCharacteristic *)characteristic; + + +/// Execute in a method 「- (void)peripheral:didWriteValueForCharacteristic:error:」 +/// Execute in a method 「- (void)peripheral:didIsReadyForWrite:error:」 +-(void)assistDidReady; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_BLEAction.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_BLEAction.h new file mode 100644 index 000000000..7a5a3f66b --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_BLEAction.h @@ -0,0 +1,66 @@ +// +// JL_BLEAction.h +// JL_BLEKit +// +// Created by zhihui liang on 2018/11/10. +// Copyright © 2018 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +/** + * BLE数据通知 + */ +extern NSString *kJL_RCSP_RECEIVE; //Rcsp数据【接收】 +extern NSString *kJL_RCSP_SEND; //Rcsp数据【发送】 + + +typedef void(^ATC_Block)(BOOL ret); +@protocol JL_BLEActionDelegate +@optional +-(void)onPairOutputData:(NSData*)data; + +@end + +@interface JL_BLEAction : NSObject +@property(nonatomic,weak)iddelegate; + ++(id)sharedMe; + +/** + 过滤其余蓝牙设备 + @param key 过滤码 + @param advertData 蓝牙广播字典 + @return NSDictionary 广播包含信息字典 + */ ++(NSDictionary*)bluetoothKey_1:(NSData*)key Filter:(NSDictionary*)advertData; + +/** + 蓝牙设备配对 + @param pKey 配对码 + @param bk 配对回调YES:成功 NO:失败 + */ +-(void)bluetoothPairingKey:(NSData *__nullable)pKey Result:(ATC_Block)bk; +-(void)inputPairData:(NSData*)rData; +-(void)cancelPair; + +#pragma mark - 蓝牙根据广播包回连 + +/** + * 获取广播包kCBAdvDataManufacturerData里面 'JLOTA' 标识的蓝牙地址 + * @param kCBAdvDataManufacturerData 广播包 + */ ++ (NSString * _Nullable)otaBleMacAddressFromCBAdvDataManufacturerData:(NSData *)kCBAdvDataManufacturerData; + +/** + * 判断当前蓝牙地址是否等于广播包kCBAdvDataManufacturerData里面的蓝牙地址 + * @param otaBleMacAddress ota升级中设备的蓝牙地址 + * @param kCBAdvDataManufacturerData 广播包 + */ ++ (Boolean)otaBleMacAddress:(NSString *)otaBleMacAddress isEqualToCBAdvDataManufacturerData:(NSData *)kCBAdvDataManufacturerData; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_BLEKit.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_BLEKit.h new file mode 100644 index 000000000..6cb524ff9 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_BLEKit.h @@ -0,0 +1,138 @@ +// +// JL_BLEKit.h +// JL_BLEKit +// +// Created by zhihui liang on 2018/11/9. +// Copyright © 2018 www.zh-jieli.com. All rights reserved. +// + +#import +#import +//! Project version number for JL_BLEKit. +FOUNDATION_EXPORT double JL_BLEKitVersionNumber; + +//! Project version string for JL_BLEKit. +FOUNDATION_EXPORT const unsigned char JL_BLEKitVersionString[]; + +#import +#import +#import +#import +#import +#import +#import +#import +#import + +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import + +#import +#import +#import +#import + +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import + + +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import + +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import + +#import +#import +#import + +#import +#import +#import +#import +#import +#import +#import + diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_BLEMultiple.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_BLEMultiple.h new file mode 100644 index 000000000..d935e6bfa --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_BLEMultiple.h @@ -0,0 +1,153 @@ +// +// JL_BLEMultiple.h +// JL_BLEKit +// +// Created by 杰理科技 on 2020/9/1. +// Copyright © 2020 www.zh-jieli.com. All rights reserved. +// + +#import +#import +#import +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + +/** + * BLE状态通知 + */ +extern NSString *kJL_BLE_M_FOUND; //发现设备 +extern NSString *kJL_BLE_M_FOUND_SINGLE; //发现单个设备 +extern NSString *kJL_BLE_M_ENTITY_CONNECTED; //连接有更新 +extern NSString *kJL_BLE_M_ENTITY_DISCONNECTED; //断开连接 +extern NSString *kJL_BLE_M_ON; //BLE开启 +extern NSString *kJL_BLE_M_OFF; //BLE关闭 +extern NSString *kJL_BLE_M_EDR_CHANGE; //经典蓝牙输出通道变化 +extern NSString *kJL_BLE_M_SAVE_BLEADDR; //存储EDR地址 +extern NSString *kJL_BLE_M_ANCS_UPDATE; //设备ANCS权限变更 + + +@interface JL_BLEMultiple : NSObject +@property (strong, nonatomic) NSData *__nullable filterKey; //过滤码 +@property (strong, nonatomic) NSData *__nullable pairKey __attribute__((deprecated("use authKey instead"))); //配对码 +@property (copy, nonatomic) NSData *__nullable authKey; //配对码 +@property (assign, nonatomic) BOOL BLE_IS_CONNECTING; //是否有设备正在连接 +@property (assign, nonatomic) BOOL BLE_FILTER_ENABLE; //是否【开启过滤】 +///是否【开启配对】 +@property (assign, nonatomic) BOOL BLE_PAIR_ENABLE __attribute__((deprecated("Use authEnable instead"))); +///是否【开启认证】 +@property (assign, nonatomic) BOOL authEnable; +@property (assign, nonatomic) int BLE_TIMEOUT; //连接超时时间 + +@property (strong, nonatomic) NSMutableArray *blePeripheralArr; //发现的设备 +@property (strong, nonatomic) NSArray *bleAttDevices; //ATT发现的设备 +@property (strong, nonatomic) NSMutableArray *bleConnectedArr; //已连接的设备 +@property (assign, nonatomic) CBManagerState bleManagerState; //蓝牙状态 +@property (strong, nonatomic) NSArray *__nullable bleDeviceTypeArr; //选择的设备类型<@(JL_DeviceType)> +@property (strong, nonatomic) NSArray *__nullable managerClassArr; //实例化的业务逻辑<@(JL_CLASS)> + + +@property (strong, nonatomic) NSString *JL_BLE_SERVICE; //服务号 +@property (strong, nonatomic) NSString *JL_BLE_RCSP_W; //命令【写】通道 +@property (strong, nonatomic) NSString *JL_BLE_RCSP_R; //命令【读】通道 + ++(NSString*)versionOfSDK; + +/** + 开始搜索 + */ +-(void)scanStart; + +/** + 继续搜索 + */ +-(void)scanContinue; + +/** + 停止搜索 + */ +-(void)scanStop; + + +/// 蓝牙中心管理器 +-(CBCentralManager *)getCenterManaer; + +/** + 通过UUID生成Entity。 + */ +-(JL_EntityM *_Nullable)makeEntityWithUUID:(NSString*)uuid; + +/// 通过UUID获得一个已连接过的entity +/// @param uuid uuid +/// @param status 获取后是否继续蓝牙搜索 +/// @param result 结果 +-(void)getEntityWithSearchUUID:(NSString *)uuid SearchStatus:(BOOL)status Result:(void(^)(JL_EntityM *_Nullable entity))result; +/** + 连接设备 + @param entity 蓝牙设备类 + */ +-(void)connectEntity:(JL_EntityM*)entity Result:(JL_EntityM_STATUS_BK)result; + + +/// 根据设备 ADV 广播报中的 Mac 连接设备 +/// ADV 的数据格式必须满足 JL 设备的标准 TWS 系列的数据结构 +/// @param advMac 广播报中的蓝牙地址 +/// 一般是指 EDR 地址,当然开发者也可以跟固件端协商,采取其他的地址,但是要求数据结构不变 +/// @param result 回调 +-(void)connectEntityWithAdvMac:(NSString *)advMac Result:(JL_EntityM_STATUS_BK) result; + +/// 根据设备Mac去回连 +/// @param mac Mac地址 +/// @param result 回调 +-(void)connectEntityForMac:(NSString *)mac Result:(JL_EntityM_STATUS_BK)result; + +/** + 断开连接 + */ +-(void)disconnectEntity:(JL_EntityM*)entity Result:(JL_EntityM_STATUS_BK)result; + +/** + 更新名字信息 +*/ +-(void)updateHistoryRename:(NSString*)name withUuid:(NSString*)uuid; + +/// 清除历史记录 +/// 删除后,可能会导致使用历史纪录回连时,信息为空 +/// 一般是在删除了绑定设备后使用 +-(void)cleanHistoryDeviceCache; + +/// 获取当前正在连接的entity +-(JL_EntityM *__nullable)connectingEntity; + +/** + 返回经典蓝牙信息 + @return @{@"ADDRESS":@"7c9a1da7330e", + @"TYPE" :@"BluetoothA2DPOutput", + @"NAME" :@"earphone"} + */ ++(NSDictionary*)outputEdrInfo; + +/** + 返回经典蓝牙edr列表 + @return 蓝牙edr列表 + */ ++(NSArray*)outputEdrList; + + +#pragma mark - ota升级 +/** + * ota升级功能 + * @param mBleEntityM 当前ota升级的蓝牙设备(JL_EntityM) + * @param otaFilePath ota升级文件路径 + * @param result ota升级过程回调 + */ +- (void)otaFuncWithEntityM:(JL_EntityM *)mBleEntityM + withFilePath:(NSString *)otaFilePath + Result:(JL_OTA_RT __nullable)result; +- (void)setOtaReconnectBleAddr:(NSString* __nullable)addr; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_BatchManger.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_BatchManger.h new file mode 100644 index 000000000..c28d75b66 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_BatchManger.h @@ -0,0 +1,47 @@ +// +// JL_BatchManger.h +// JL_BLEKit +// +// Created by 李放 on 2021/12/21. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +typedef NS_ENUM(UInt8, JL_BatchType) { + ///开始 + BatchType_Begin = 0x00, + ///结束 + BatchType_Finish = 0x80, + ///取消 + BatchType_Cancel = 0x81, +}; + +typedef NS_ENUM(NSUInteger, JL_BatchOptionType) { + /// 格式化操作 + BatchOption_Format = 0x00, + /// 未知操作 + BatchOption_unKnow = 0xFF, +}; + +@interface JL_BatchManger : JL_FunctionBaseManager + +#pragma mark ---> 批操作命令 +typedef void(^JL_BATCH_BK)(uint8_t flag); +/** + @param type 0x00:开始 0x80:结束 0x81:结束 + @param array @[@(JL_BatchOptionType)],0x00代表格式化操作。 + @param result 操作回调 0x00:成功 0x01:失败 + */ +-(void)cmdBatchType:(JL_BatchType)type + Operations:(NSArray*)array + Result:(JL_BATCH_BK __nullable)result; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_BigDataManager.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_BigDataManager.h new file mode 100644 index 000000000..c1b94cffa --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_BigDataManager.h @@ -0,0 +1,57 @@ +// +// JL_BigDataManager.h +// JL_BLEKit +// +// Created by 杰理科技 on 2022/12/7. +// Copyright © 2022 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + + +@class JL_BigData; + +typedef NS_ENUM(UInt8, JL_BigDataStatus) { + JL_BigDataStatusSendSuccess = 0, //成功 + JL_BigDataStatusSendFailCRC = 1, //CRC校验失败 + JL_BigDataStatusSendFailSEQ = 2, //SEQ不对 + JL_BigDataStatusSendFailFormat = 3, //数据类型不支持 + JL_BigDataStatusSendFailWay = 4, //传输方式不支持 + JL_BigDataStatusSendFailOutOfRange = 5, //数据长度超范围 + JL_BigDataStatusSendFailWrite = 6, //写入数据失败 + JL_BigDataStatusSendFailMissingParameter = 7, //缺少配置参数 + JL_BigDataStatusSendFailCmd = 8, //命令错误 + JL_BigDataStatusSendFailTimeout = 9, //超时 + JL_BigDataStatusGet = 10, //收到数据 + JL_BigDataStatusSendFailUnknown = 0xff, //未知错误 +}; +typedef void(^JL_BIGDATA_RT)(JL_BigData *bigData); + +@interface JL_BigDataManager : JL_FunctionBaseManager + +//设立大数据监听(接收阿里数据,必须放在单利类中!!!) +-(void)cmdBigDataMonitor:(JL_BIGDATA_RT)result; + +//发送大数据 +-(void)cmdInputBigData:(JL_BigData*)data; + +@end + +@interface JL_BigData : NSObject +@property(nonatomic,assign)JL_BigDataStatus mResult; +@property(nonatomic,assign)NSInteger mIndex; + +///0:原始数据 +///1:阿里云数据 +///2:RTC数据 +///3: AI云 +///4:TTS语音合成 +///5: 平台接口认证信息 +@property(nonatomic,assign)uint8_t mType; +@property(nonatomic,assign)uint8_t mVersion; +@property(nonatomic,strong)NSData *mData; +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_BinChargeManager.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_BinChargeManager.h new file mode 100644 index 000000000..2077c2e47 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_BinChargeManager.h @@ -0,0 +1,116 @@ +// +// JL_BinCharge.h +// JL_BLEKit +// +// Created by 杰理科技 on 2021/12/16. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +typedef NS_ENUM(UInt8, JL_ScanSetting) { + JL_ScanTimeout = 0x00, //超时结束 + JL_ScanInterrupt = 0x01, //打断结束 + JL_ScanFail = 0x02, //开启扫描失败 + JL_Scaning = 0x03, //正在扫描 +}; + +typedef NS_ENUM(UInt8, JL_ReverberationFunType) { + JL_ReverberationAndDynamicType = 0x00, //支持混响和动态限幅器 + JL_OnlyReverberationType = 0x01, //仅支持混响 + JL_OnlyDynamicLimiterType = 0x02, //仅支持动态限幅器 +}; + +typedef void(^JL_CMD_VALUE_BK)(uint32_t value); +typedef void(^JL_LOW_DELAY_BK)(uint16_t mtu, uint32_t delay); + +@interface JL_BinChargeManager : JL_FunctionBaseManager + +#pragma mark ---> 通知固件App的信息 +// @param flag 未知 +-(void)cmdSetAppInfo:(uint8_t)flag; + +#pragma mark ---> 设置通讯MTU +// @param mtu app请求mtu⼤⼩ +// @param result 实际设置的Mtu⼤⼩ +-(void)cmdSetMTU:(uint16_t)mtu Result:(JL_CMD_VALUE_BK __nullable)result; + +#pragma mark ---> 开启蓝⽛扫描 +// @param timeout 超时时间 +// @param result 0:成功 1:失败 +-(void)cmdBTScanStartTimeout:(uint16_t)timeout Result:(JL_CMD_VALUE_BK __nullable)result; + +#pragma mark ---> 推送蓝⽛扫描结果 +// 返回【蓝⽛数据结构】数组 +// @see JLBTModel +extern NSString *kJL_MANAGER_BT_LIST_RESULT; + +#pragma mark ---> 停⽌蓝⽛扫描(APP-->固件) +// @param reason 0:超时结束 1:打断结束 2:开启扫描失败 3:正在扫描 +// @param result 0:成功 1:失败 +-(void)cmdBTScanStopReason:(JL_ScanSetting)reason Result:(JL_CMD_VALUE_BK __nullable)result; + +#pragma mark ---> 停⽌蓝⽛扫描(固件-->APP) +// 0:超时结束 1:打断结束 2:开启扫描失败 3:正在扫描 +extern NSString *kJL_MANAGER_BT_SCAN_STOP_NOTE; + +#pragma mark ---> 通知固件连接指定的蓝⽛设备 +// @param addr 蓝⽛设备地址【设置0x00 00 00 00 00 00 则是断开外设的连接】 +// @param result 0:成功 1:失败 +-(void)cmdBTConnectAddress:(NSData*)addr Result:(JL_CMD_VALUE_BK __nullable)result; + +extern NSString *kJL_MANAGER_ID3_Title; +extern NSString *kJL_MANAGER_ID3_Artist; +extern NSString *kJL_MANAGER_ID3_Album; +extern NSString *kJL_MANAGER_ID3_Time; +extern NSString *kJL_MANAGER_ID3_Current; +extern NSString *kJL_MANAGER_ID3_PlayPush; + +#pragma mark ---> 主动设置ID3播放状态 +-(void)setID3_Status:(uint8_t)st; + +#pragma mark ---> ID3 播放/暂停 +-(void)cmdID3_PP; + +#pragma mark ---> ID3 上一曲 +-(void)cmdID3_Before; + +#pragma mark ---> ID3 下一曲 +-(void)cmdID3_Next; + +#pragma mark ---> ID3 开启/暂停 音乐信息推送 +-(void)cmdID3_PushEnable:(BOOL)enable; + +#pragma mark ---> 设置高低音 [-12,+12] + +/// 设置高低音 +/// - Parameters: +/// - p_low: 低音 (-12,12) +/// - p_high: 高音 (-12,12) +-(void)cmdSetLowPitch:(int)p_low HighPitch:(int)p_high; + +#pragma mark ---> 设置混响值[深度和强度][0,100]、限幅值[-60,0] +/// 设置混响值 +/// @param depthValue 深度 0-100 +/// @param intensityValue 强度 0-100 +/// @param dynamicLimiterValue 动态限幅值 -60 - 0 +/// @param reverOn 是否开启 +/// @param type 混响类型 +-(void)cmdSetReverberation:(int)depthValue + IntensityValue:(int)intensityValue + DynamicLimiterValue:(int)dynamicLimiterValue + SwtichReverState:(int)reverOn + FunType:(JL_ReverberationFunType)type; + +#pragma mark ---> 获取低延时参数 +-(void)cmdGetLowDelay:(JL_LOW_DELAY_BK __nullable)result; + + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_CallManager.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_CallManager.h new file mode 100644 index 000000000..2b704cdb6 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_CallManager.h @@ -0,0 +1,37 @@ +// +// JL_CallManager.h +// JL_BLEKit +// +// Created by 杰理科技 on 2021/12/16. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import +#import +#import +#import +NS_ASSUME_NONNULL_BEGIN + +@interface JL_CallManager : JL_FunctionBaseManager + +#pragma mark ---> 拨打电话 +/** + @param number 电话号码 + @param result 回复 + */ +-(void)cmdPhoneCall:(NSString*)number Result:(JL_CMD_RESPOND __nullable)result; + +#pragma mark ---> 设备通话状态 +extern NSString *kJL_MANAGER_CALL_STATUS; + +#pragma mark - 案子API +#pragma mark ---> 通知设备播放来电号码的方式 +/** + 通知设备播放来电号码的方式 + @param way 正常模式:0x00 播放文件模式:0x01 + */ +-(void)cmdPhoneNumberOnWay:(uint8_t)way; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_CustomManager.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_CustomManager.h new file mode 100644 index 000000000..f2224efc2 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_CustomManager.h @@ -0,0 +1,73 @@ +// +// JL_CustomManager.h +// JL_BLEKit +// Created by 李放 on 2021/12/21. +// Modify by EzioChan on 2023/03/16. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import +#import "JL_FunctionBaseManager.h" +#import "JL_TypeEnum.h" +#import "JL_Tools.h" + +NS_ASSUME_NONNULL_BEGIN + +///设备返回的自定义数据 +extern NSString *kJL_MANAGER_CUSTOM_DATA; +/// 设备返回的自定义数据(回复包) +extern NSString *kJL_MANAGER_CUSTOM_DATA_RSP; + + +@protocol JLCustomCmdPtl + +/// 设备回复自定义数据内容 +/// - Parameters: +/// - device: 设备句柄 +/// - data: 回复数据内容 +-(void)customCmdResponse:(JL_ManagerM *)manager Status:(uint8_t)status WithData:(NSData *)data; + +/// 设备主动请求 +/// - Parameters: +/// - device: 设备 +/// - data: 请求数据内容 +/// - isNeedResponse: 是否需要回复 +/// - sn: 序号 +-(void)customCmdRequire:(JL_ManagerM *)manager WithData:(NSData *)data isNeedResponse:(BOOL)isNeedResponse SN:(uint8_t)sn; + + +@end + +/// 用户自定义数据 +@interface JL_CustomManager : JL_FunctionBaseManager + +/// 数据回调委托 +@property(nonatomic,weak)id delegate; + +/// timeout max +/// default 3s +@property(nonatomic,assign)NSInteger maxTime; + +#pragma mark ---> 用户自定义数据 + +/// 用户自定义数据 +/// @param data 数据内容 +/// @param result 回复 +-(void)cmdCustomData:(NSData* __nullable)data + Result:(JL_CMD_RESPOND __nullable)result __attribute__((deprecated("use cmdCustomData:isNeedResponse:Result:"))); + +/// 用户自定义数据 +/// @param data 数据内容 +/// @param isNeedResponse 是否需要回复 +/// @param result 回复 +-(void)cmdCustomData:(NSData *)data isNeedResponse:(BOOL)isNeedResponse Result:(JL_CMD_RESPOND __nullable)result; + +/// 用户自定义数据回复 +/// @param sn 序号(设备发过来的序号) +/// @param data 数据 +-(void)cmdCustomResponse:(uint8_t)sn + Data:(NSData* __nullable)data; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_DeviceLogs.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_DeviceLogs.h new file mode 100644 index 000000000..01d1776f9 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_DeviceLogs.h @@ -0,0 +1,32 @@ +// +// JL_DeviceLogs.h +// JL_BLEKit +// +// Created by EzioChan on 2022/5/12. +// Copyright © 2022 www.zh-jieli.com. All rights reserved. +// + +#import "JL_FunctionBaseManager.h" + +NS_ASSUME_NONNULL_BEGIN + +typedef enum : UInt8 { + LogTypeDownloading = 0x00, + LogTypeFailed = 0x01, + LogTypeSucceed = 0x02, + LogTypeNoLog = 0x03 +} DeviceLogType; + +typedef void(^JLDeviceLogBK)(DeviceLogType type,float progress,NSString *_Nullable tempSavePath); + +@interface JL_DeviceLogs : JL_FunctionBaseManager + + +/// 检查获取设备log日志 +/// @param block 回调结果 +-(void)deviceLogDownload:(JLDeviceLogBK)block; + + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_EntityM.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_EntityM.h new file mode 100644 index 000000000..613aa5a73 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_EntityM.h @@ -0,0 +1,222 @@ +// +// JL_EntityM.h +// JL_BLEKit +// +// Created by 杰理科技 on 2020/9/1. +// Copyright © 2020 www.zh-jieli.com. All rights reserved. +// + +#import +#import +#import +#import +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN +//@class JL_EntityM; +typedef NS_ENUM(NSInteger, JL_EntityM_Status) { + JL_EntityM_StatusBleOFF = 0, //BLE蓝牙未开启 + JL_EntityM_StatusConnectFail = 1, //BLE连接失败 + JL_EntityM_StatusConnecting = 2, //BLE正在连接 + JL_EntityM_StatusConnectRepeat = 3, //BLE重复连接 + JL_EntityM_StatusConnectTimeout = 4, //BLE连接超时 + JL_EntityM_StatusConnectRefuse = 5, //BLE被拒绝 + JL_EntityM_StatusPairFail = 6, //配对失败 + JL_EntityM_StatusPairTimeout = 7, //配对超时 + JL_EntityM_StatusPaired = 8, //已配对 + JL_EntityM_StatusMasterChanging = 9, //正在主从切换 + JL_EntityM_StatusDisconnectOk = 10, //已断开成功 + JL_EntityM_StatusNull = 11, //Entity为空 +}; + +/// 连接类型 +typedef NS_ENUM(NSUInteger, JLEntityConnectType) { + JLEntityConnectTypeBLE = 0, + JLEntityConnectTypeSPP = 1, + JLEntityConnectTypeATT = 2, +}; + +typedef void(^JL_EntityM_STATUS_BK)(JL_EntityM_Status status); + +@interface JL_EntityM : NSObject + +///命令中心 +@property(nonatomic,strong) JL_ManagerM *mCmdManager; + +/// BLE外设备 +@property(nonatomic,readonly,copy) CBPeripheral *mPeripheral; +///服务号AE00 +@property(nonatomic,strong) NSString *mSERVICE; +///命令【写】通道AE01 +@property(nonatomic,strong) NSString *mRCSP_W; +///命令【读】通道AE02 +@property(nonatomic,strong) NSString *mRCSP_R; +///过滤码 +@property(nonatomic,strong) NSData *__nullable mFilterKey; +///配对码 +@property(nonatomic,strong) NSData *__nullable mPairKey __attribute__((deprecated("Use mAuthKey instead"))); +/// 设备认证码 +@property(nonatomic,copy) NSData *__nullable mAuthKey; +///广播数据 +@property(strong,nonatomic) NSData *mAdvData; + +///连接超时时间 +@property(nonatomic,assign) int mBLE_TIMEOUT; +///是否【开启过滤】 +@property(nonatomic,assign) BOOL mBLE_FILTER_ENABLE; +///是否【开启配对】 +@property(nonatomic,assign) BOOL mBLE_PAIR_ENABLE __attribute__((deprecated("Use mAuthEnable instead"))); +/// 是否开启设备认证 +@property(nonatomic,assign) BOOL mAuthEnable; +///是否完成配对 +@property(nonatomic,assign) BOOL mBLE_IS_PAIRED __attribute__((deprecated("Use mIsAuth instead"))); +/// 是否已认证 +@property(nonatomic,assign) BOOL mIsAuth; +///是否需要OTA +@property(nonatomic,assign) BOOL mBLE_NEED_OTA; +@property(nonatomic,assign) BOOL isFrom_HISTROY; +@property(nonatomic,assign) BOOL isBLE_CHANGE; +@property(nonatomic,assign) BOOL isCMD_PREPARED; + +@property(strong,nonatomic) NSString *mUUID; +@property(strong,nonatomic) NSNumber *mRSSI; +@property(readonly,copy,nonatomic)NSString *mItem; +/** + * mType值说明: + * -1:传统设备 + * 0:AI音箱 + * 1:TWS + * 2:数码充电仓 + * 3:普通耳机 + * 4:声卡类型 + * 5:手表类型 + */ +@property(assign,nonatomic) JL_DeviceType mType; +@property(assign,nonatomic) BOOL isExclusive; +@property(assign,nonatomic) BOOL isBound; +@property(assign,nonatomic) BOOL isEdrLinked; +@property(assign,nonatomic) BOOL isCharging; +@property(assign,nonatomic) BOOL isCharging_L; +@property(assign,nonatomic) BOOL isCharging_R; +@property(assign,nonatomic) BOOL isCharging_C; +@property(assign,nonatomic) uint8_t mPower; +@property(assign,nonatomic) uint8_t mPower_L; +@property(assign,nonatomic) uint8_t mPower_R; +@property(assign,nonatomic) uint8_t mPower_C; +@property(strong,nonatomic) NSString *mVID __attribute__((deprecated("Deprecated, use mUID instead"))); +@property(strong,nonatomic) NSString *mUID; +@property(strong,nonatomic) NSString *mPID; +@property(strong,nonatomic) NSString *mEdr; +@property(strong,nonatomic) NSString *mBleAddr; //OTA设备需要 +@property(assign,nonatomic) uint8_t mChipType; //0:690x 1:692x 2:693x +@property(assign,nonatomic) uint8_t mProtocolType; //默认0x00 +/** + 0x00 - dismiss 不显示弹窗 + 0x01 - unconnected 经典蓝牙未连接 + iOS : 不显示电量,请手动连接XXX + Android:不显示电量,显示连接按钮 + 0x02 - connected 经典蓝牙已连接 + iOS:判断已连接的经典蓝牙名是否一致,若未连接或蓝牙名不一致, + 显示“设备已被占用”。若一致,显示电量等信息。 + Android:判断已连接的经典蓝牙Mac是否一致,若未连接或蓝牙Mac不一致, + 显示“设备已被占用”。若一致,显示电量等信息。 + 0x03 - connecting 设备正在自动回连 + Android 和 iOS 显示“设备正在自动回连 ” + 0x04 - connectionless 设备不可连接(需要按下配对按键) + Android 和 iOS 显示配对操作方式 + */ +@property(assign,nonatomic) int8_t mScene; + +///Seq 每次开机会加 1,用于app区分是否同一次开机 +@property(assign,nonatomic) uint8_t mSeq; + +///TWS配对标识,0:未配对 1:已配对 +@property(assign,nonatomic) uint8_t mTWS_Paired; + +///0:关盖 1:开盖 +@property(assign,nonatomic) uint8_t mTWS_Cap; + +///0:充电模式 1:发射模式 +@property(assign,nonatomic) uint8_t mTWS_Mode; +///主从标识 (0:从机, 1:主机) +@property(assign,nonatomic) uint8_t mHeadsetMaster; + +///连接标识 (0:可以连接 1:不可连接) +@property(assign,nonatomic) uint8_t mHeadsetLinkEnable; +/** + * mWatchScene值说明: + * 0x00:经典蓝牙未连接 + * 0x01:经典蓝牙已连接 + * 0x02:设备正在回连 + * 0x03:设备不可连接 (需要手动进入配对模式) + */ +///连接标识 (0:可以连接 1:不可连接) +@property(assign,nonatomic) uint8_t mWatchScene; + +///连接方式 +///0:ble +///1:spp +///2:att +@property(assign,nonatomic) JLEntityConnectType mConnectWay; + +/// 是否支持充电仓 +@property(assign,nonatomic) BOOL mIsSupportChargeBin; + +/// 是否支持蓝牙Le Audio音频 +@property(assign,nonatomic) BOOL mIsSupportLeAudio; + +/// Le Audio 的连接状态 +@property(assign,nonatomic) BOOL mLeAudioConnected; + +/// RCSP 是否复用 LEAudio 的地址 +@property(assign,nonatomic) BOOL mLeAudioIsReUseRCSPAddr; + +/// 设备特殊类型 +@property(assign,nonatomic) JLDevSpecialType mSpecialType; + +-(void)setBlePeripheral:(CBPeripheral *)mPeripheral; +-(void)setBleItem:(NSString *)mItem; + +/** + 更新代理 +*/ +-(void)updateDelegate; + +/** + 释放定时器 +*/ +-(void)releaseEntityTimer; + +/** + 发送RCSP数据 + @param data 数据 + @return 是否已发送 + */ +-(BOOL)writeRcspData:(NSData*)data; + +/** +调整发数参数 +@param isGame 是否为游戏模式 +@param mtu 每包发数字节数 +@param delay 延时时间 (毫秒) +*/ +-(void)setGameMode:(BOOL)isGame MTU:(NSUInteger)mtu Delay:(int)delay; + + +-(void)flashFinishedAction; + + +#pragma mark - 连接超时管理 +-(void)startTimeout:(int)code; +-(void)stopTimeout; +-(void)cancelAuthPair; +#pragma mark - EntityM 模型转换 +-(void)updateEntity:(NSDictionary*)dic; ++(JL_EntityM*)changeToEntity:(NSDictionary*)dic; ++(NSArray*)turnToEntityArray:(NSArray*)array; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_FileManager.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_FileManager.h new file mode 100644 index 000000000..582b95659 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_FileManager.h @@ -0,0 +1,249 @@ +// +// JL_FileManager.h +// JL_BLEKit +// +// Created by 凌煊峰 on 2021/12/13. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN +//MARK: - 枚举 +typedef NS_ENUM(UInt8, JL_FileOperationEnvironmentType) { + JL_FileOperationEnvironmentTypeBigFileTransmission = 0x00, //大文件传输 + JL_FileOperationEnvironmentTypeDeleteFile = 0x01, //删除文件 + JL_FileOperationEnvironmentTypeFormatting = 0x02, //格式化 + JL_FileOperationEnvironmentTypeFatfsTransmission = 0x03, //FAT文件传输 +}; +typedef NS_ENUM(UInt8, JL_DeleteFileLastType) { + JL_DeleteFileLastTypeIsNotLast = 0x00, //不是最后一个文件 + JL_DeleteFileLastTypeIsLast = 0x01, //是最后一个文件 +}; +typedef NS_ENUM(UInt8, JL_BrowseReason) { + JL_BrowseReasonCommandEnd = 0, //读取完当前命令请求的文件 + JL_BrowseReasonFolderEnd = 1, //读取完当前目录的文件 + JL_BrowseReasonPlaySuccess = 2, //点播成功 + JL_BrowseReasonBusy = 3, //设备繁忙 + JL_BrowseReasonDataFail = 4, //目录数据发送失败 + JL_BrowseReasonReading = 0x0f, //正在读取中 + JL_BrowseReasonUnknown, //未知原因 +}; +typedef NS_ENUM(UInt8, JL_FileContentResult) { + JL_FileContentResultStart = 0x00, //开始传输 + JL_FileContentResultReading = 0x01, //正在读取 + JL_FileContentResultEnd = 0x02, //读取结束 + JL_FileContentResultCancel = 0x03, //取消读取 + JL_FileContentResultFail = 0x04, //读取失败 + JL_FileContentResultNull = 0x05, //文件不存在 + JL_FileContentResultDataError = 0x06, //数据错误 + JL_FileContentResultCrcFail = 0x07, //crc校验失败 +}; +typedef NS_ENUM(UInt8, JL_FileDataType) { + JL_FileDataTypeDo = 0, //开始传输文件数据 + JL_FileDataTypeDone = 1, //结束传输文件数据 + JL_FileDataTypeDoing = 2, //正在传输文件数据 + JL_FileDataTypeCancel = 3, //取消传输文件数据 + JL_FileDataTypeError = 4, //传输文件数据出错 + JL_FileDataTypeUnknown, +}; +typedef NS_ENUM(UInt8, JL_BigFileTransferCode) { + JL_BigFileTransferCodeSuccess = 0x00, //成功 + JL_BigFileTransferCodeFail = 0x01, //写失败 + JL_BigFileTransferCodeOutOfRange = 0x02, //数据超出范围 + JL_BigFileTransferCodeCrcFail = 0x03, //crc校验失败 + JL_BigFileTransferCodeOutOfMemory = 0x04, //内存不足 +}; +typedef NS_ENUM(UInt8, JL_BigFileResult) { + JL_BigFileTransferStart = 0x00, //开始大文件数据传输 + JL_BigFileTransferDownload = 0x01, //传输大文件有效数据 + JL_BigFileTransferEnd = 0x02, //结束大文件数据传输 + JL_BigFileTransferOutOfRange = 0x03, //大文件传输数据超范围 + JL_BigFileTransferFail = 0x04, //大文件传输失败 + JL_BigFileCrcError = 0x05, //大文件校验失败 + JL_BigFileOutOfMemory = 0x06, //空间不足 + JL_BigFileTransferCancel = 0x07, //取消传输 + JL_BigFileTransferNoResponse = 0xF1, //设备没有响应 +}; + +//MARK: - 回调 + +typedef void(^JL_FILE_BK)(NSArray* __nullable array,JL_BrowseReason reason); +typedef void(^JL_FILE_CONTENT_BK)(JL_FileContentResult result, uint32_t size, NSData* __nullable data, float progress); +typedef void(^JL_FILE_DATA_BK)(NSData* __nullable data, NSString* __nullable path, uint16_t size, JL_FileDataType type); +typedef void(^JL_BIGFILE_BK)(NSArray* __nullable array); +typedef void(^JL_BIGFILE_RT)(JL_BigFileResult result, float progress); + + +/// 文件浏览与下载、上载、删除等相关的操作类 +@interface JL_FileManager : JL_FunctionBaseManager + +/// 超时时间 +@property(nonatomic,assign)NSInteger maxTimeout; + +///大文件名是否使用其他编码 +///Default:false +///短文件名:GBK CFStringConvertEncodingToNSStringEncoding(kCFStringEncodingGB_18030_2000) +///长文件名:Unicode16L (NSUTF16LittleEndianStringEncoding) +///Other: true +///需要设置encodeType属性的值,默认为Unicode16L +@property(nonatomic,assign)BOOL isOtherEncode; + +/// 大文件名使用的编码 +/// default :NSUTF16LittleEndianStringEncoding +@property(nonatomic,assign)NSStringEncoding encodeType; + +/// 停止超时计算 +- (void)closeTimer; + + +//MARK: - 浏览目录 + +/// 发起文件目录浏览 +/// - Parameters: +/// - model: 文件Model +/// - number: 读取的数量 单次请求建议 < 20 条 +/// - result: 回调操作结果 +-(void)cmdBrowseModel:(JLModel_File*)model + Number:(uint8_t)number + Result:(JL_CMD_RESPOND __nullable)result; + +/// 监听目录数据回调 +/// - Parameter result: 回调内容 +-(void)cmdBrowseMonitorResult:(JL_FILE_BK __nullable)result; + + + +//MARK: - 删除文件 + +/// 删除文件(必须异步执行) +/// @param array 文件Model数组 +-(BOOL)cmdDeleteFileModels:(NSArray*)array; + +/// 删除单个JLModel_File文件 +/// @param model 文件对象 JLModel_File +/// @param last 是否最后一个文件 +/// @param result 删除成功回调 +-(void)cmdDeleteFile:(JLModel_File*)model + IsLast:(JL_DeleteFileLastType)last + Result:(JL_CMD_RESPOND __nullable)result; + +/// 通过名字删除文件 +/// 仅部分设备支持(设备要求支持文件系统支持唯一文件名) +/// - Parameters: +/// - name: 文件名 +/// - result: 回调结果 +-(void)cmdFileDeleteWithName:(NSString*)name Result:(JL_CMD_RESPOND __nullable)result; + + + +/// 设备格式化 +/// @param handle 设备句柄 +/// @param result 格式化回调 +-(void)cmdDeviceFormat:(NSString*)handle Result:(JL_CMD_RESPOND __nullable)result; + +/// 清除设备音乐缓存记录 +/// @param type 卡的类型 +-(void)cmdCleanCacheType:(JL_CardType)type; + + +//MARK: - 通讯文件句柄相关 + +/// 设置文件传输句柄 +/// 大文件传输,设置当前传输句柄 +/// - Parameter currentFileHandleType: 传输句柄 +- (void)setCurrentFileHandleType:(JL_FileHandleType)currentFileHandleType; + +/// 获取当前的传输文件句柄 +- (JL_FileHandleType)getCurrentFileHandleType; + +/// 文件传输的句柄数据 +- (NSData *)currentDeviceHandleData; + +/// 设置当前使用的存储设备 +/// @param devHandle 存储设备句柄 +/// 可参考JLModel_Device 中获取到的设备句柄内容 +/// @param result 命令回调结果 +-(void)cmdSetDeviceStorage:(NSData *)devHandle Result:(JL_CMD_RESPOND)result; + + +//MARK: - 文件传输 固件-->APP + +/// 监听文件数据 固件-->APP +/// - Parameter result: 数据内容监听回调 +-(void)cmdFileDataMonitorResult:(JL_FILE_DATA_BK __nullable)result __attribute__((deprecated("This method is deprecated. Use newMethod cmdFileReadContentWithName:(NSString*)name Result:(JL_FILE_CONTENT_BK __nullable)result"))); + +/// app 端回复设备的请求文件传输 固件-->APP +/// 允许传输文件数据 +-(void)cmdAllowFileData __attribute__((deprecated("This method is deprecated. Use newMethod cmdFileReadContentWithName:(NSString*)name Result:(JL_FILE_CONTENT_BK __nullable)result"))); + +/// app 端回复设备的请求文件传输 固件-->APP +/// 拒绝传输文件数据 +-(void)cmdRejectFileData __attribute__((deprecated("This method is deprecated. Use newMethod cmdFileReadContentWithName:(NSString*)name Result:(JL_FILE_CONTENT_BK __nullable)result"))); + +/// 传输文件数据 固件-->APP +/// 停止传输文件数据 +-(void)cmdStopFileData __attribute__((deprecated("This method is deprecated. Use newMethod cmdFileReadContentCancel"))); + +/// 读取外置卡的文件内容 固件-->APP +/// 此方法针对部分设备(要求设备文件系统支持唯一文件名) +/// - Parameters: +/// - name: 文件名 +/// - result: 回调结果 +-(void)cmdFileReadContentWithName:(NSString*)name Result:(JL_FILE_CONTENT_BK __nullable)result; + +/// 簇号方式读取外置卡的文件内容 固件-->APP +/// - Parameters: +/// - fileClus: 文件簇号 +/// - result: 回调 +- (void)cmdFileReadContentWithFileClus:(uint32_t)fileClus Result:(JL_FILE_CONTENT_BK __nullable)result; + +/// 取消读取外置卡的文件内容 +-(void)cmdFileReadContentCancel; + + +//MARK: - 文件传输 APP-->固件 + +/// 请求传输文件给设备 +/// - Parameters: +/// - size: 文件大小 +/// - path: 存放路径 +-(void)cmdFileDataSize:(uint8_t)size + SavePath:(NSString*)path __attribute__((deprecated("This method is deprecated. Use newMethod cmdBigFileData:(NSString *)path WithFileName:(NSString *)fileName Result:(JL_BIGFILE_RT __nullable)result"))); + + +/// 推送文件数据给设备 +/// - Parameter data:文件数据 +-(void)cmdPushFileData:(NSData*)data __attribute__((deprecated("This method is deprecated. Use newMethod cmdBigFileData:(NSString *)path WithFileName:(NSString *)fileName Result:(JL_BIGFILE_RT __nullable)result"))); + + +/// 大文件传输 App-->固件 +/// - Parameters: +/// - path: 本地大文件下载文件路径 +/// - fileName: 目标文件路径 +/// 如想指定文件夹路径,可以使用 Download/abc/def.txt +/// 否则可以直接添加 def.txt 由系统存放到默认的文件夹下 +/// - result: 回调结果 +-(void)cmdBigFileData:(NSString *)path WithFileName:(NSString *)fileName + Result:(JL_BIGFILE_RT __nullable)result; + +/// 取消文件传输 App-->固件 +-(void)cmdStopBigFileData; + +/// 通知固件进行环境准备 +/// - Parameters: +/// - environment: +/// 0:大文件传输 +/// 1:删除文件 +/// 2:格式化 +/// - result: 回调结果 +-(void)cmdPreEnvironment:(JL_FileOperationEnvironmentType)environment Result:(JL_CMD_RESPOND __nullable)result; + + + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_FindDeviceManager.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_FindDeviceManager.h new file mode 100644 index 000000000..f4ce71cb8 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_FindDeviceManager.h @@ -0,0 +1,130 @@ +// +// JL_FindDeviceManager.h +// JL_BLEKit +// +// Created by 杰理科技 on 2021/12/17. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN + + +/// 查找设备参数 +@interface JLFindDeviceOperation : NSObject + +/// 播放方式 way: +/// 0. 全部播放 +/// 1.左侧播放 +/// 2.右侧播放 +/// 3.全部暂停 +@property(nonatomic,assign)uint8_t playWay; + +/// 超时时间 +/// 0 表示不限制时间 +/// 默认时间 60 +@property(nonatomic,assign)uint16_t timeout; + +/// 铃声操作 +/// 0x00: 关闭铃声 +/// 0x01: 播放铃声 +@property(nonatomic,assign)uint8_t sound; + + +@end + + +/// 查找手机参数 +@interface JLFindPhoneModel : NSObject + +/// 铃声操作 +/// 0x00: 关闭铃声 +/// 0x01: 播放铃声 +@property(nonatomic,assign)uint8_t sound; + +/// 超时时间 +/// 0 表示不限制时间 +/// 默认时间 10 +@property(nonatomic,assign)uint16_t timeout; + +@end + + + +@protocol JL_FindDeviceDelegate + + +/// 设备查找手机回调 +/// - Parameter model:JLFindPhoneModel +-(void)findDeviceStartFindMyPhone:(JLFindPhoneModel *)model; + +/// 查询设备当前状态 +/// 当前回调需要先查询设备状态cmdFindDeviceCheckStatus +/// - Parameter model: JLFindDeviceOperation +-(void)findDeviceCheckStatus:(JLFindDeviceOperation *)model; + +@end + +/// 查找设备类 +/// 查找设备/设备查找手机 +@interface JL_FindDeviceManager : JL_FunctionBaseManager + +#pragma mark ---> 查找设备 +// 设备查找手机的通知 +// 携带了响铃时长🔔 +// dict = @{@"op":@(操作类型),@"timeout":@(超时时间)}; +extern NSString *kJL_MANAGER_FIND_PHONE; + +// 手机查找设备 +// 携带是否停止响铃 +// dict = @{@"op":@(操作类型),@"timeout":@(超时时间)}; +extern NSString *kJL_MANAGER_FIND_DEVICE; + +/// 查询固件设备查找状态回调 +/// JLFindDeviceOperation 作为回调对象 +extern NSString *kJL_MANAGER_FIND_DEVICE_STATUS; + + +typedef void(^JL_FIND_DEVICE_CHECK_RESPOND)(JL_CMDStatus status, JLFindDeviceOperation * _Nullable model); + +/// 代理 +@property(nonatomic,weak)id delegate; + +// 查找设备命令 +// @param isVoice 是否发声 +// @param timeout 超时时间 +// @param isIphone 是否设备查找手机(默认是手机找设备) +// @param opDict 这是一个可选项,若tws未连接,则该值无效,默认是全部播放 +// 字典键值对说明: +// 播放方式 way: 0 全部播放 +// 1 左侧播放 +// 2 右侧播放 +// 播放源 player: 0 APP端播放 +// 1 设备端播放 +// etc.全部播放&APP播放音效 +// opDict:{@"way":@"0",@"player":@"0"} +-(void)cmdFindDevice:(BOOL)isVoice + timeOut:(uint16_t)timeout + findIphone:(BOOL)isIphone + Operation:( NSDictionary * _Nullable )opDict __attribute__((deprecated ( "This method will be replaced with subcommands cmdFindDeviceWith and proxy etc."))); + + + +/// 查找设备命令 +/// - Parameter operation: 查找设备对象 +-(void)cmdFindDeviceWith:(JLFindDeviceOperation *)operation; + + + +/// 查询一次固件查找设备的状态 +/// - Parameter result: 状态回调 +-(void)cmdFindDeviceCheckStatus:(JL_FIND_DEVICE_CHECK_RESPOND _Nullable)result; + + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_FlashOperateManager.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_FlashOperateManager.h new file mode 100644 index 000000000..925f528c2 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_FlashOperateManager.h @@ -0,0 +1,189 @@ +// +// JL_FlashOperateManager.h +// JL_BLEKit +// +// Created by 杰理科技 on 2021/12/13. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark - 外挂FLASH操作命令 +typedef NS_ENUM(UInt8, JL_FlashOperationOPType) { + JL_FlashOperationOPTypeWriteData = 0x00, //写数据 + JL_FlashOperationOPTypeReadData = 0x01, //读数据 + JL_FlashOperationOPTypeInsertFile = 0x02, //插入文件 + JL_FlashOperationOPTypeDialOperation = 0x03, //表盘操作 + JL_FlashOperationOPTypeEraseData = 0x04, //擦除数据 + JL_FlashOperationOPTypeDeleteFile = 0x05, //删除文件 + JL_FlashOperationOPTypeWriteFileProtection = 0x06, //写文件保护 + JL_FlashOperationOPTypeUpdateDialResource = 0x07, //更新表盘资源 + JL_FlashOperationOPTypeCheckWriteDataSuccess = 0x08, //查询写数据是否成功 + JL_FlashOperationOPTypeUpdateResourceFlag = 0x09, //升级资源标志操作 + JL_FlashOperationOPTypeRestoreSystem = 0x0A, //还原系统 + JL_FlashOperationOPTypeGetFileInfo = 0x0B, //获取文件信息 + JL_FlashOperationOPTypeGetRemainingSpace = 0x0C, //获取剩余空间 + JL_FlashOperationOpTypeGetSourceStorageInfo = 0x0D, //获取源存储信息 +}; + +typedef NS_ENUM(UInt8, JL_DialSetting) { + JL_DialSettingReadCurrentDial = 0x00, //读取当前表盘 + JL_DialSettingSetDial = 0x01, //设置表盘 + JL_DialSettingVersion = 0x03, //获取表盘额外信息,如版本 + JL_DialSettingActivateCustomDial = 0x04, //激活自定义表盘 + JL_DialSettingGetDialName = 0x05, //获取对应的自定义表盘名字 +}; +typedef NS_ENUM(UInt8, JL_FlashOperateFlag) { + JL_FlashOperateFlagFinish = 0x00, //结束 + JL_FlashOperateFlagStart = 0x01, //开始 +}; + +@interface JL_FlashOperateManager : JL_FunctionBaseManager + +typedef void(^JL_FlashInfo_BK)(JLModel_Flash* __nullable model); +typedef void(^JL_FlashWrite_BK)(uint8_t flag); +typedef void(^JL_FlashWriteStatus_BK)(uint8_t flag,uint16_t leftSize); +typedef void(^JL_FlashWriteSize_BK)(uint8_t flag,uint32_t size); +typedef void(^JL_FlashRead_BK)(uint8_t flag,NSData *__nullable data); +typedef void(^JL_FlashAddOrDel_BK)(uint8_t flag); +typedef void(^JL_FlashWatch_BK)(uint8_t flag, uint32_t size, + NSString *__nullable path, + NSString *__nullable describe); +typedef void(^JL_FlashClean_BK)(uint8_t flag); +typedef void(^JL_FlashProtect_BK)(uint8_t flag); +typedef void(^JL_FlashUpdate_BK)(uint8_t flag); +typedef void(^JL_FlashFileInfo_BK)(uint32_t size,uint16_t crc16); +typedef void(^JL_FlashLeftSize_BK)(uint32_t leftSize); + +/// Flash Info +@property(nonatomic,strong)JLModel_Flash *flashInfo; + +#pragma mark ---> 获取外置Flash信息 +/** + 获取外置Flash信息 + @param result 回复 + */ +-(void)cmdGetFlashInfoResult:(JL_FlashInfo_BK __nullable)result; + +#pragma mark ---> 写数据到Flash +/** + 写数据到Flash + @param data 数据 + @param offset 偏移 + @param mtu 每包大小 + @param result 回复 + */ +-(void)cmdWriteToFlashAllData:(NSData*)data + Offset:(uint32_t)offset + Mtu:(uint16_t)mtu + Result:(JL_FlashWriteSize_BK __nullable)result; + +#pragma mark ---> 读数据从Flash +/** + 读数据从Flash + @param offset 偏移 + @param size 大小 + @param mtu 每包大小 + @param result 回复 + */ +-(void)cmdReadFromFlashAllDataOffset:(uint32_t)offset + Size:(uint16_t)size + Mtu:(uint16_t)mtu + Result:(JL_FlashRead_BK __nullable)result; + +#pragma mark ---> [开始/结束]增加表盘(文件) +/** + 开始/结束 插入文件 + @param path 路径 + @param size 大小 + @param flag 开始:0x01 结束:0x00 + @param result 回复 + */ +-(void)cmdInsertFlashPath:(NSString* __nullable)path + Size:(uint32_t)size + Flag:(JL_FlashOperateFlag)flag + Result:(JL_FlashAddOrDel_BK __nullable)result; + +#pragma mark ---> 设置表盘(文件) + +/** + 表盘操作 + @param path 路径 + @param flag 0x00:读取当前表盘 + 0x01:设置表盘 + 0x03:获取表盘额外信息,如版本 + 0x04:激活自定义表盘 + 0x05:获取对应的自定义表盘名字 + @param result 回复 + */ +-(void)cmdWatchFlashPath:(NSString*__nullable)path + Flag:(JL_DialSetting)flag + Result:(JL_FlashWatch_BK __nullable)result; + +#pragma mark ---> 设备更新表盘(文件) 【kJL_MANAGER_WATCH_FACE】?// 返回 字符串 +extern NSString *kJL_MANAGER_WATCH_FACE; + +#pragma mark ---> [开始/结束]删除表盘(文件) +/** + 开始/结束 删除文件 + @param path 路径 + @param flag 开始:0x01 结束:0x00 + @param result 回复 + */ +-(void)cmdDeleteFlashPath:(NSString* __nullable)path + Flag:(JL_FlashOperateFlag)flag + Result:(JL_FlashAddOrDel_BK __nullable)result; + +#pragma mark ---> 外挂Flash【写保护】操作 +/** + 开始/结束 + @param flag 开始:0x01 结束:0x00 + */ +-(void)cmdWriteProtectFlashFlag:(JL_FlashOperateFlag)flag Result:(JL_FlashProtect_BK __nullable)result; + +#pragma mark ---> 外挂Flash【资源更新】操作 +/** + 开始/结束 更新UI + @param flag 开始:0x01 结束:0x00 + */ +-(void)cmdUpdateResourceFlashFlag:(JL_FlashOperateFlag)flag Result:(JL_FlashUpdate_BK __nullable)result __attribute__((deprecated ( "The current interface is about to be canceled in version 2.0.0, please use cmdUpdateResourceFlashFlagAsync:Result: instead"))); +-(void)cmdUpdateResourceFlashFlag:(JL_FlashOperateFlag)flag; +/// 外挂Flash(资源更新)操作 +/// 异步回调 +/// - Parameters: +/// - flag: flag +/// - result: 操作结果 +-(void)cmdUpdateResourceFlashFlagAsync:(JL_FlashOperateFlag)flag Result:(JL_FlashUpdate_BK __nullable)result; + +#pragma mark ---> 断开连接,对FATFS处理。 +-(void)cmdFlashActionDisconnect; + +#pragma mark ---> 外挂Flash 手表资源更新标志位 +-(void)cmdWatchUpdateResource __attribute__((deprecated ( "The current interface is about to be canceled in version 2.0.0, please use cmdWatchUpdateResourceWith:(JL_CMD_RESPOND __nullable)result instead"))); + +/// 打开设备升级资源标记操作 +/// - Parameter result: 设备回复结果 +/// 当设备回复的cmd代号为非 0 时,属于异常结束,不可继续升级 +-(void)cmdWatchUpdateResourceWith:(JL_CMD_RESPOND __nullable)result; + +#pragma mark ---> 外挂Flash 还原系统 +-(void)cmdFlashRecovery; + +#pragma mark ---> 外挂Flash 获取文件信息 +-(void)cmdFlashInformationOfFile:(NSString*)file Result:(JL_FlashFileInfo_BK)result; + +#pragma mark ---> 外挂Flash 剩余空间 +-(void)cmdFlashLeftSizeResult:(JL_FlashLeftSize_BK)result; + +/// 获取资源存储空间 +/// 例如:res_space= 8192 (Kb), 即realSize = res_space* 1024= 8192 * 1024 = 8Mb +/// - Parameter result: 回复 +-(void)cmdFlashGetSourceStorageInfo:(JL_FlashLeftSize_BK)result; +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_FmManager.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_FmManager.h new file mode 100644 index 000000000..d912b6af7 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_FmManager.h @@ -0,0 +1,70 @@ +// +// JL_FmManager.h +// JL_BLEKit +// +// Created by 李放 on 2021/12/20. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import +#import +#import +#import + + +typedef NS_ENUM(UInt8, JL_FCmdFM) { + JL_FCmdFMPP = 0x01, //FM 暂停/播放 + JL_FCmdFMPonitBefore = 0x02, //上一个频点 + JL_FCmdFMPonitNext = 0x03, //下一个频点 + JL_FCmdFMChannelBefore = 0x04, //上一个频道 + JL_FCmdFMChannelNext = 0x05, //下一个频道 + JL_FCmdFMSearch = 0x06, //扫描 + JL_FCmdFMChannelSelect = 0x07, //选择频道 + JL_FCmdFMChannelDelete = 0x08, //删除频道 + JL_FCmdFMFrequencySelect = 0x09, //选择频点 + JL_FCmdFMFrequencyDelete = 0x0a, //删除频点 +}; + +typedef NS_ENUM(UInt8, JL_FMSearch) { + JL_FMSearchALL = 0x00, //FM 暂停/播放 + JL_FMSearchForward = 0x01, //向前搜索 + JL_FMSearchBackward = 0x02, //向后搜索 + JL_FMSearchStop = 0x03, //停止搜索 +}; + +NS_ASSUME_NONNULL_BEGIN + +@interface JL_FmManager : JL_FunctionBaseManager + +///Fm状态 +@property (assign,nonatomic) JL_FMStatus fmStatus; + +///Fm 频段范围 +///76.5-108.0Mhz +///87.5-108.0Mhz +@property (assign,nonatomic) JL_FMMode fmMode; + +///当前fm +@property (strong,nonatomic) JLModel_FM *currentFm; + +///Fm列表 +@property (strong,nonatomic) NSArray *fmArray; + +#pragma mark ---> FM相关操作 +/** + @param cmd FM功能 + @param search FM搜索 + @param channel FM频道 + @param frequency FM频点 + @param result 返回结果 + */ +-(void)cmdFm:(JL_FCmdFM)cmd + Saerch:(JL_FMSearch)search + Channel:(uint8_t)channel + Frequency:(uint16_t)frequency + Result:(JL_CMD_RESPOND __nullable)result; + +@end + +NS_ASSUME_NONNULL_END + diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_FunctionBaseManager.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_FunctionBaseManager.h new file mode 100644 index 000000000..7a3a0b5f8 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_FunctionBaseManager.h @@ -0,0 +1,28 @@ +// +// JL_FunctionBaseManager.h +// JL_BLEKit +// +// Created by 凌煊峰 on 2021/12/13. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +@class JL_ManagerM; +@interface JL_FunctionBaseManager : NSObject + +@property (assign, nonatomic) uint8_t mCmdSN; +@property (strong, nonatomic) NSString *mBLE_UUID; +@property (strong, nonatomic) NSString *mBLE_NAME; +@property (weak , nonatomic) JLModel_Device *deviceModel; +@property (weak , nonatomic) JL_ManagerM *centerManagerM; + +- (void)inputPKG:(JL_PKG *)pkg; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_Handle.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_Handle.h new file mode 100644 index 000000000..add95b44e --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_Handle.h @@ -0,0 +1,46 @@ +// +// JL_Handle.h +// JL_BLEKit +// +// Created by zhihui liang on 2018/11/10. +// Copyright © 2018 www.zh-jieli.com. All rights reserved. +// + +#import +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +/** + * 收到设备返回的XM_PKG的回调。 + */ +extern NSString *kJL_CMD_RECEIVE; //XM_RCSP【接收】 + +@protocol JL_HandleDelegate +@optional +-(void)onHandleOutputPKG:(JL_PKG*)pkg; +@end + +@interface JL_Handle : NSObject +@property(nonatomic,weak)iddelegate; + +/** +输入BLE数据 +@param data 设备过来的数据 +*/ +-(void)inputHandleData:(NSData*)data; + +/**[实例] +向设备发送JL_PKG数据包。 +@param pkg JL_PKG数据模型 +@param name 设备名字 +*/ +-(NSData*)sendPackage:(JL_PKG*)pkg WithName:(NSString*)name; + ++(void)logPackage:(JL_PKG*)pkg WithName:(NSString *__nullable)name IsSend:(BOOL)isSend; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_LRCManager.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_LRCManager.h new file mode 100644 index 000000000..1a4942643 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_LRCManager.h @@ -0,0 +1,35 @@ +// +// JL_LRCManager.h +// JL_BLEKit +// +// Created by 杰理科技 on 2021/12/17. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +typedef NS_ENUM(UInt8, JL_LRCType) { + JL_LRCTypeDone = 1, //LRC已传输完 + JL_LRCTypeBusy = 2, //设备忙碌 + JL_LRCTypeDoneFail = 0x0e, //传输失败 +}; +typedef void(^JL_LRC_BK)(NSString* __nullable lrc, JL_LRCType type); +typedef void(^JL_LRC_BK_1)(NSData* __nullable lrc, JL_LRCType type); + +@interface JL_LRCManager : JL_FunctionBaseManager + +#pragma mark ---> 获取LRC歌词 +/** + @param result 返回LRC数据 + */ +-(void)cmdLrcMonitorResult:(JL_LRC_BK __nullable)result; +-(void)cmdLrcMonitorResult_1:(JL_LRC_BK_1 __nullable)result; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_LightManager.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_LightManager.h new file mode 100644 index 000000000..22b7c87ae --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_LightManager.h @@ -0,0 +1,99 @@ +// +// JL_LightManager.h +// JL_BLEKit +// +// Created by 李放 on 2021/12/16. +// Modify by EzioChan on 2023/03/16 +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import +#import +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +@class JL_LightManager; + +@protocol JLLightStatusPtl + +-(void)jlLightStatus:(JL_LightManager *)lightManager; + +@end + + +@interface JL_LightManager : JL_FunctionBaseManager + +/// 当前设备是否支持灯光设置 +@property(nonatomic,assign)BOOL isSupportLight; + +/// 0:关闭 1:打开 2:设置模式(彩色/闪烁/情景) +@property (assign,nonatomic) JL_LightState lightState; + +// 0:彩色 1:闪烁 2: 情景 +@property (assign,nonatomic) JL_LightMode lightMode; + +/// 灯光红色 +@property (assign,nonatomic) uint8_t lightRed; + +/// 灯光绿色 +@property (assign,nonatomic) uint8_t lightGreen; + +/// 灯光蓝色 +@property (assign,nonatomic) uint8_t lightBlue; + +/// 闪烁模式Index +@property (assign,nonatomic) JL_LightFlashModeIndex lightFlashIndex; + +/// 闪烁频率Index +@property (assign,nonatomic) JL_LightFlashModeFrequency lightFrequencyIndex; + +/// 情景模式Index +@property (assign,nonatomic) JL_LightSceneMode lightSceneIndex; + +// 色调,范围0-360 +@property (assign,nonatomic) uint16_t lightHue; + +// 饱和度,0-100 +@property (assign,nonatomic) uint8_t lightSat; + +// 亮度,0-100 +@property (assign,nonatomic) uint8_t lightLightness; + +/// 状态更新代理委托 +@property (weak,nonatomic)id delegate; + + +/// 获取灯光设置,通过代理返回 +-(void)cmdGetLightStatus; +/** + * 设置灯光 + * @param lightState 灯光状态 + * @param lightMode 灯光模式 + * @param red 红色色值 + * @param green 绿色色值 + * @param blue 蓝色色值 + * @param flashIndex 闪烁模式index + * @param flashFreqIndex 闪烁频率 + * @param sceneIndex 情景模式 + * @param hue 色调,范围0-360 + * @param saturation 饱和度,0-100 + * @param lightness 亮度,0-100 + */ +-(void)cmdSetState:(JL_LightState)lightState + Mode:(JL_LightMode)lightMode + Red:(uint8_t)red + Green:(uint8_t)green + Blue:(uint8_t)blue + FlashInex:(JL_LightFlashModeIndex)flashIndex + FlashFreq:(JL_LightFlashModeFrequency)flashFreqIndex + SceneIndex:(JL_LightSceneMode)sceneIndex + Hue:(uint16_t)hue + Saturation:(uint8_t)saturation + Lightness:(uint8_t)lightness; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_MSG_Func.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_MSG_Func.h new file mode 100644 index 000000000..91d914f48 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_MSG_Func.h @@ -0,0 +1,22 @@ +// +// JL_MSG_Func.h +// JL_BLEKit +// +// Created by EzioChan on 2021/5/13. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN +typedef enum : uint8_t { + Func_Location, + Func_Weather, + Func_Notify, +} FuncMsgType; + +@interface JL_MSG_Func : NSObject + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_MSG_Weather.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_MSG_Weather.h new file mode 100644 index 000000000..6ff75d805 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_MSG_Weather.h @@ -0,0 +1,143 @@ +// +// JL_MSG_Weather.h +// JL_BLEKit +// +// Created by EzioChan on 2021/5/13. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + + +typedef NS_ENUM(UInt8, JLWeatherType) { + ///晴 + JLWeatherTypeSunny = 0x00, + ///少云 + JLWeatherTypeCloudLess, + ///晴间多云 + JLWeatherTypePartlyCloudy, + ///多云 + JLWeatherTypeCloudiness, + ///阴 + JLWeatherTypeOvercastSky, + ///有风/和风/清风/微风 + JLWeatherTypeBreeze, + ///平静 + JLWeatherTypeCalmWind, + ///大风/强风/劲风/疾风 + JLWeatherTypeHighWind, + ///飓风/狂爆风 + JLWeatherTypeHurricane, + ///热带风暴/风暴 + JLWeatherTypeTropicalStorm, + ///霾/中度霾/重度霾/严重霾 + JLWeatherTypeHaze, + ///阵雨 + JLWeatherTypeShower, + ///雷阵雨 + JLWeatherTypeThunderShower, + ///雷阵雨并伴有冰雹 + JLWeatherTypeHallThunderShower, + ///雨/小雨/毛毛雨/细雨/小雨-中雨 + JLWeatherTypeLightRain, + ///中雨/中雨-大雨 + JLWeatherTypeModerateRain, + ///大雨/大雨-暴雨 + JLWeatherTypeHeavyRain, + ///暴雨/暴雨-大暴雨 + JLWeatherTypeDownpour, + ///大暴雨/大暴雨-特大暴雨 + JLWeatherTypeExtraordinaryRainstorm, + ///特大暴雨 + JLWeatherTypeHeavyDownpour, + ///强阵雨 + JLWeatherTypeStrongRainShower, + ///强雷阵雨 + JLWeatherTypeStrongThunderShower, + ///极端降雨 + JLWeatherTypeExtremeRainfall, + ///雨夹雪/阵雨夹雪/冻雨/雨雪天气 + JLWeatherTypeRainySnowy, + ///雪 + JLWeatherTypeSnowy, + ///阵雪 + JLWeatherTypeSnowShower, + ///小雪/小雪-中雪 + JLWeatherTypeLightSnow, + ///中雪/中雪-大雪 + JLWeatherTypeModerateSnow, + ///大雪/大雪-暴雪 + JLWeatherTypeHeavySnow, + ///暴雪 + JLWeatherTypeSnowstorm, + ///浮尘 + JLWeatherTypeDust, + ///扬沙 + JLWeatherTypeblowingSand, + ///沙尘暴 + JLWeatherTypedustStorm, + ///强沙尘暴 + JLWeatherTypeSevereSandstorm, + ///龙卷风 + JLWeatherTypeTornado, + ///雾/轻雾/浓雾/强浓雾/特强浓雾 + JLWeatherTypeFog, + ///未知 + JLWeatherTypeUnknow, + ///冷 + JLWeatherTypeCold, + ///未知2 + JLWeatherTypeUnknown1, + +}; + +typedef NS_ENUM(UInt8, JLWindDirectionType) { + ///无风向 + JLWindDirectionTypeNone = 0x00, + ///东 + JLWindDirectionTypeEast, + ///南 + JLWindDirectionTypeSouth, + ///西 + JLWindDirectionTypeWest, + ///北 + JLWindDirectionTypeNorth, + ///东南 + JLWindDirectionTypeEastSouth, + ///东北 + JLWindDirectionTypeEastNorth, + ///西北 + JLWindDirectionTypeWestNorth, + ///西南 + JLWindDirectionTypeWestSouth, + ///旋转不定 + JLWindDirectionTypeUnknow +}; + +@interface JL_MSG_Weather : NSObject + +/// 省份 +@property(nonatomic,strong)NSString *province; +///城市 +@property(nonatomic,strong)NSString *city; +///天气编码 +@property(nonatomic,assign)JLWeatherType code; +///温度 +@property(nonatomic,assign)NSInteger temperature; +///湿度 +@property(nonatomic,assign)NSInteger humidity; +///风向编码 +@property(nonatomic,assign)JLWindDirectionType direction; +///风力 +@property(nonatomic,assign)NSInteger wind; +/// 时间 +@property(nonatomic,strong)NSDate *date; + + +-(NSData *)beData; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_ManagerM.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_ManagerM.h new file mode 100644 index 000000000..e95426053 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_ManagerM.h @@ -0,0 +1,232 @@ +// +// JL_ManagerM.h +// JL_BLEKit +// +// Created by 杰理科技 on 2020/9/4. +// Modify By EzioChan on 2023/03/27. +// Copyright © 2020 www.zh-jieli.com. All rights reserved. +// + +#import +#import +#import + +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import + +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +/* + * 从JL_ManagerM发出去的通知都是字典,如下所示: + * + * @{ kJL_MANAGER_KEY_UUID :当前设备的UUID, + * kJL_MANAGER_KEY_OBJECT:外抛的对象 } + */ +extern NSString *kJL_MANAGER_KEY_UUID; //KEY --> UUID +extern NSString *kJL_MANAGER_KEY_OBJECT; //KEY --> 对象 + + +@protocol JL_ManagerMDelegate +@optional +-(void)onManagerSendPackage:(JL_PKG*)pkg; +@end + +@class JL_EntityM; +@interface JL_ManagerM : NSObject +@property(nonatomic,weak)iddelegate; +@property(nonatomic,readonly,copy)NSString *mBLE_UUID; +@property(nonatomic,readonly,copy)NSString *mBLE_NAME; +@property(nonatomic,readonly,assign)uint8_t mCmdSN; +@property(nonatomic,weak)JL_EntityM *mEntity; + +@property(nonatomic,strong)JL_SmallFileManager *mSmallFileManager; +@property(nonatomic,strong)JL_FileManager *mFileManager; +@property(nonatomic,strong)JL_OTAManager *mOTAManager; +@property(nonatomic,strong)JL_FlashOperateManager *mFlashManager; +@property(nonatomic,strong)JL_BinChargeManager *mChargingBinManager; +@property(nonatomic,strong)JL_CallManager *mCallManager; +@property(nonatomic,strong)JL_AlarmClockManager *mAlarmClockManager; +@property(nonatomic,strong)JL_LightManager *mLightManager; +@property(nonatomic,strong)JL_TwsManager *mTwsManager; +@property(nonatomic,strong)JL_SpeexManager *mSpeexManager __attribute__((deprecated("alloc with JL_SpeexManager shareSpeexManager"))); +@property(nonatomic,strong)JL_LRCManager *mLrcManager; +@property(nonatomic,strong)JL_FindDeviceManager *mFindDeviceManager; +@property(nonatomic,strong)JL_MusicControlManager *mMusicControlManager; +@property(nonatomic,strong)JL_FmManager *mFmManager; +@property(nonatomic,strong)JL_SystemEQ *mSystemEQ; +@property(nonatomic,strong)JL_SystemTime *mSystemTime; +@property(nonatomic,strong)JL_SystemVolume *mSystemVolume; +@property(nonatomic,strong)JL_CustomManager *mCustomManager; +@property(nonatomic,strong)JL_BatchManger *mBatchManger; + +@property(nonatomic,strong)JL_SoundCardManager *mSoundCardManager; +@property(nonatomic,strong)JL_DeviceLogs *mDeviceLogs; + +@property(nonatomic,strong)JL_BigDataManager *mBigDataManager; + + +-(void)setPropertyUpdate:(BOOL)isUpdate; +-(void)setBleUuid:(NSString*)uuid; +-(void)setBleName:(NSString*)name; +-(void)inputPKG:(JL_PKG*)pkg; + +-(void)noteEntityConnected; +-(void)noteEntityDisconnected; +-(void)noteEntityBleOff; + +/** + 发送【命令包】 + @param cmdCode 具体要发送的命令 + @param needResponse 是否需要回复 + @param sendData 具体要发送的数据 + @discussion 只有isCommand是YES时needResponse才有意义,即只有命令才需要回复 + */ +-(void)xmCommandCode:(uint8_t)cmdCode + needRep:(BOOL)needResponse + data:(NSData *)sendData; + +/** + 发送【回复包】 + @param code 命令号 + @param sn 序号 + @param st 状态码 + @param data 回复的命令的内容 + */ +-(void)cmdResponseCode:(uint8_t)code + OpSN:(UInt8)sn + Status:(JL_CMDStatus)st + Data:(NSData* __nullable)data; + +/** + 发送【通知命令】 + @param name 通知名字 + @param obj 携带对象 + */ +-(void)managerPost:(NSString*)name Object:(id __nullable)obj; + +/** + 获取当前命令序号 + */ +-(uint8_t)xmCommandSN; + +#pragma mark ---> 取出设备信息 + +/// copy出来的原值 +-(JLModel_Device *)outputDeviceModel; + +/// 取出原本的值 +-(JLModel_Device *)getDeviceModel; + +#pragma mark ---> 获取设备信息 +extern NSString *kJL_MANAGER_TARGET_INFO; +-(void)cmdTargetFeatureResult:(JL_CMD_RESPOND __nullable)result; +-(void)cmdTargetFeature:(uint32_t)feature Result:(JL_CMD_RESPOND __nullable)result; + +#pragma mark ---> 断开经典蓝牙 +-(void)cmdDisconnectEdrResult:(JL_CMD_RESPOND __nullable)result; + +#pragma mark ---> 重置配对流程标志(使适配连接ANCS设备) +-(void)cmdResetPairingResult:(JL_CMD_RESPOND __nullable)result; + +#pragma mark ---> 获取系统信息(全获取) +/** + @param function JL_FunctionCode + @param result 回复 + */ +-(void)cmdGetSystemInfo:(JL_FunctionCode)function + Result:(JL_CMD_RESPOND __nullable)result; +-(void)cmdGetSystemInfoResult; + +#pragma mark ---> 获取系统信息(选择性获取) +/** + @param function JL_FunctionCode + @param result 回复 + */ +-(void)cmdGetSystemInfo:(JL_FunctionCode)function + SelectionBit:(uint32_t)bits + Result:(JL_CMD_RESPOND __nullable)result; +-(void)cmdGetSystemInfoResult_1; + +#pragma mark ---> 设备主动返回的系统信息 +extern NSString *kJL_MANAGER_SYSTEM_INFO; + +#pragma mark ---> 通用、BT、Music、RTC、Aux +/** + @param function 功能类型 + @param cmd 操作命令 + @param ext 扩展数据 + @param result 回复 + */ +-(void)cmdFunction:(JL_FunctionCode)function + Command:(UInt8)cmd + Extend:(UInt8)ext + Result:(JL_CMD_RESPOND __nullable)result; + +typedef void(^JL_IMAGE_RT)(NSMutableDictionary* __nullable dict); +#pragma mark ---> 获取设备的图片 +/** + @param vid 设备vid + @param pid 设备pid + @param result 图片数据 + */ +-(void)cmdRequestDeviceImageVid:(NSString*)vid + Pid:(NSString*)pid + Result:(JL_IMAGE_RT __nullable)result; + +-(void)cmdRequestDeviceImageVid:(NSString*)vid + Pid:(NSString*)pid + ItemArray:(NSArray *__nullable)itemArray + Result:(JL_IMAGE_RT __nullable)result; + +-(NSDictionary*)localDeviceImage:(NSString*)jsonFile; + +#pragma mark ---> 通知固件开始播放TTS内容 + +/// 通知固件SDK播放tts +/// @param status 0:开始播放,1:播放结束 +-(void)cmdStartTTSNote:(uint8_t)status; + + +/// 获取MD5信息 +/// @param result 回调 +-(void)cmdGetMD5_Result:(JL_CMD_RESPOND)result; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_MusicControlManager.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_MusicControlManager.h new file mode 100644 index 000000000..bfa2d952d --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_MusicControlManager.h @@ -0,0 +1,40 @@ +// +// JL_MusicControlManager.h +// JL_BLEKit +// +// Created by 李放 on 2021/12/20. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +__attribute__((deprecated("已废弃,请使用JLDevPlayerCtrl类"))) + +@interface JL_MusicControlManager : JL_FunctionBaseManager + + +#pragma mark ---> 设置播放模式 +/** + @param mode 模式 + 0x01:全部循环; 0x02:设备循环; 0x03:单曲循环; 0x04:随机播放; 0x05:文件夹循环 + */ +-(void)cmdSetSystemPlayMode:(JL_MusicMode)mode __attribute__((deprecated("cmdSetPlayMode:已废弃"))); + +#pragma mark ---> 快进快退 +/** + @param cmd 快进或者快退枚举 + @param sec 时间 + @param result 返回结果 + */ +-(void)cmdFastPlay:(JL_FCmdMusic)cmd + Second:(uint16_t)sec + Result:(JL_CMD_RESPOND __nullable)result __attribute__((deprecated("cmdFastPlay:已废弃,需要使用JLDevPlayerCtrl类里的方法设置"))); + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_NFC.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_NFC.h new file mode 100644 index 000000000..a3be1d723 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_NFC.h @@ -0,0 +1,96 @@ +// +// JL_NFC.h +// JL_BLEKit +// +// Created by EzioChan on 2021/8/2. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import +#import "JL_TypeEnum.h" +#import "JL_ManagerM.h" + +@class JL_RCSP; +@class JL_EntityM; +@class NfcFileModel; +@class NfcModel; +NS_ASSUME_NONNULL_BEGIN + +typedef void(^NfcSyncResult)(UInt8 result,NSArray * _Nullable models); + +typedef void(^NfcIDResult)(UInt16 result); + +typedef void(^NfcDefaultResult)(BOOL result); + +typedef void(^NfcBeginAddResult)(JL_EntityM *entity); + + +@interface JL_NFC : NSObject + +-(instancetype)initWith:(JL_EntityM *)entity FileHandler:(JL_FileHandleType)handler; + + +/// 同步NFC信息开始 +-(void)w_syncNfcStart:(NfcSyncResult)result; + + +/// 修改NFC的信息 +/// @param dict 修改的内容 +/** + dict 的内容 + { + @"timestamp" : NSDate() + @"nickname" : @"我的家" + } + 如果key值找不到对应的value,那就说明该项值不参与被修改 + */ +-(void)w_modifyNfc:(NSDictionary *)dict WithID:(UInt16)nfcID; + + +/// 删除NFC信息 +/// @param model nfc头部model +-(void)w_deleteNfc:(NfcModel *)model; + + +/// 获取当前正在使用着的默认NFC卡ID +/// @param result NFC卡id +-(void)w_getNfcDefaultCard:(NfcIDResult)result; + + +/// 设置默认的NFC信息 +/// @param model NFC头部model +-(void)w_setNfcDefalutCard:(NfcModel *)model result:(NfcDefaultResult)result; + + +/// 通知默认NFC改变 +/// @param model NFC信息头部 +-(void)w_NfcDefaultNotify:(NfcModel *)model; + +/// 添加NFC文件 +/// @param model NFC文件模型 +/// @param result 开始传输操作 +/** examp. + NfcFileModel *fm = [[NfcFileModel alloc] init]; +// fm.idCard = ... +// fm.nfcFileName = ... + JL_NFC *mgr = [[JL_NFC alloc] init]; + [mgr w_NfcAddCard:fm BeginAdd:^(JL_EntityM * _Nonnull entity) { + //大文件传输开始 + [entity.mCmdManager cmdBigFileData:#path WithFileName:#fileName Result:^(JL_BigFileResult result, float progress) { + if (result == JL_BigFileTransferEnd) { + //结束NFC文件添加 + [mgr w_NfcEndAdd:fm]; + } + + }]; + }]; + */ +-(void)w_NfcAddCard:(NfcFileModel *)model BeginAdd:(NfcBeginAddResult)result; + +/// 添加NFC文件结束 +/// @param model NFC文件模型 +-(void)w_NfcEndAdd:(NfcFileModel *)model; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_OpCode.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_OpCode.h new file mode 100644 index 000000000..a7b9e7c86 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_OpCode.h @@ -0,0 +1,97 @@ +// +// JL_OpCode.h +// JL_BLEKit +// +// Created by 杰理科技 on 2022/12/28. +// Copyright © 2022 www.zh-jieli.com. All rights reserved. +// + +#ifndef JL_OpCode_h +#define JL_OpCode_h + +#define kJL_DATA_CMD 0x0001 +#define kJL_GET_TARGET_FEATURE_MAP 0x0002 //保留 +#define kJL_GET_TARGET_FEATURE 0x0003 +#define kJL_VOICE_START 0x0004 +#define kJL_VOICE_STOP 0x0005 +#define kJL_VOICE_DISCONNECT_EDR 0x0006 +#define kJL_SYS_INFO_GET 0x0007 +#define kJL_SYS_INFO_SET 0x0008 +#define kJL_SYS_INFO_AUTO_UPDATE 0x0009 +#define kJL_PHONE_CALL_REQUEST 0x000a +#define kJL_FILE_BROWSE_START 0x000c +#define kJL_FILE_BROWSE_STOP 0x000d +#define kJL_FILE_STRUCT_CHANGE 0x00f2 //通知文件结构变化 +#define kJL_FUNCTION_CMD 0x000e +#define kJL_LRC_GET_START 0x000f +#define kJL_LRC_GET_STOP 0x0010 +#define kJL_A2F_TTS_START 0x0011 +#define kJL_BT_SCAN_START 0x0012 +#define kJL_BT_SCAN_RESULT 0x0013 +#define kJL_BT_SCAN_STOP 0x0014 +//#define kJL_BT_CONNECT 0x0015 +#define kJL_FILE_START 0x0016 +#define kJL_FILE_STOP 0x0017 +#define kJL_FIND_DEVICE 0x0019 +#define kJL_CUSTOMER_USER 0x00ff + +#define kJL_OTA_INFO_OFFSET 0x00e1 +#define kJL_OTA_CAN_UPDATE 0x00e2 +#define kJL_OTA_ENTER_UPDATE 0x00e3 +#define kJL_OTA_EXIT_UPDATE 0x00e4 +#define kJL_OTA_GET_DATA 0x00e5 +#define kJL_OTA_STATUS_UPDATE 0x00e6 +#define kJL_OTA_REBOOT 0x00e7 +#define kJL_OTA_BLE_SPP 0x000b +#define kJL_OTA_LENGTH 0x00e8 + +#define kJL_SET_ADV 0x00C0 +#define kJL_GET_ADV 0x00C1 +#define kJL_ADV_NOTIFY_DEVICE 0x00C2 +#define kJL_ADV_NOTIFY_ENABLE 0x00C3 +#define kJL_ADV_NOTIFY_TIPS 0x00C4 //主要用于ADV设置同步后需要主机操作的行为。 + +#define kJL_SET_APP_INFO 0x00D0 +#define kJL_SET_MTU 0x00D1 +#define kJL_GET_MD5 0x00D4 +#define kJL_GET_LOW_DELAY 0x00D5 +#define kJL_GET_FLASH_INFO 0x00D6 +#define kJL_SET_DEV_STORAGE 0x00D8 //设置当前使用的存储设备 +#define kJL_GET_DEV_CONFIG 0x00D9 //获取设备配置信息 +#define kJL_GET_FLASH_W_R 0x001A + +#define kJL_BIGFILE_START 0x001B +#define kJL_BIGFILE_END 0x001C +#define kJL_BIGFILE_GET_FILE 0x001D +#define kJL_BIGFILE_STOP 0x001E +#define kJL_FILE_DELETE 0x001F +#define kJL_GET_FILENAME 0x0020 +#define kJL_PRE_ENVIRONMENT 0x0021 +#define kJL_FILE_FORMAT 0x0022 +#define kJL_FILE_NAME_DEL 0x0023 +#define kJL_FILE_READ_CONTENT 0x0024 + +#define kJL_RTC_PLUS 0x0025 +#define kJL_BATCH_OPERATE 0x0026 +#define kJL_FILE_GET_CRC 0x0027 +#define kJL_SMALL_FILE 0x0028 + +#define kJL_DEVICE_LOG 0x0029 +#define kJL_BIG_DATA 0x0030 +#define kJL_TWS_NAME_LIST 0x0031 //一拖二/获取设备已连接手机名 +#define kJL_AI_CONTROL 0x0032 //AI控制命令 +#define kJL_PUBLIC_SET 0x0033 //公共设置命令 +#define kJL_TRAMSLATE 0x0034 //翻译命令 +#define kJL_AURACASTE 0x0035 //Auracast命令 + + +#define kJL_WEAR_REQ_OPCODE 0x00A0 //获取运动信息 +#define kJL_WEAR_SET_OPCODE 0x00A1 //设置运动信息 +#define kJL_WEAR_RES_OPCODE 0x00A2 //设备主动推的运动信息 +#define kJL_WEAR_CMD_LOG 0x00A3 //传感器log传输命令 +#define kJL_WEAR_CMD_SETTING 0x00A5 //健康设备设置命令 +#define kJL_WEAR_SYNC_SPORT 0x00A6 //运动模式相关命令(同步数据) + +#define kJL_PHONE_NUMBER_WAY 0x00F1 + +#endif /* JL_OpCode_h */ diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_RCSP.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_RCSP.h new file mode 100644 index 000000000..8816e633d --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_RCSP.h @@ -0,0 +1,73 @@ +// +// JL_RCSP.h +// JL_BLEKit +// +// Created by zhihui liang on 2018/11/9. +// Copyright © 2018 www.zh-jieli.com. All rights reserved. +// + +#import +#import + +NS_ASSUME_NONNULL_BEGIN + + + +@class JL_PKG; +@interface JL_RCSP : NSObject + +/** + 解析JL数据包 + + @param data 把数据转成JL_PKG模型。 + @return JL_PKG数据模型 + */ ++(JL_PKG*)rcspAnalysisData:(NSData*)data; + +/** + 生成XM数据包 + + @param pkg 把JL_PKG模型转成data。 + @return 数据 + */ ++(NSData*)rcspMakePackage:(JL_PKG*)pkg; + +/** + 分析JL_PKG参数 + + @param pkg 把JL_PKG的xmData参数部分解析成一列数组。 + @return 参数数组 + */ ++(NSArray*)rcspAnalysisParams:(JL_PKG*)pkg; + +/** + 分解dJL_PKG信息 + + @param data JL_PKG中的信息数据 + @return 参数c数组 + */ ++(NSArray*)rcspInfoArrFromData:(NSData*)data; + +/// 拆分LTV数据 +/// 当前方法针对的是 L 长度为 2Byte +/// @param data LTV数据 ++(NSArray*)rcspInfoFromData2ByteSize:(NSData*)data; + +/** + 生成JL_PKG参数 + + @param array 把参数数组变成data(注意:数组元素必须是NSData类型)。 + @return 数据 + */ ++(NSData*)rcspMakeParams:(NSArray*)array; +@end + +@interface JL_PKG : NSObject +@property(assign,nonatomic) uint16_t pkgIsCommand; //1Bit +@property(assign,nonatomic) uint16_t pkgNeedResponse; //1Bit +@property(assign,nonatomic) uint16_t pkgUnused; //6Bits +@property(assign,nonatomic) uint16_t pkgOpCode; //8Bits +@property(assign,nonatomic) uint16_t pkgLength; //参数长度(本身不计) +@property(strong,nonatomic) NSData *pkgData; //参数数据 +@end +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_SDM_AirPressure.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_SDM_AirPressure.h new file mode 100644 index 000000000..766e37c23 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_SDM_AirPressure.h @@ -0,0 +1,37 @@ +// +// JL_SDM_AirPressure.h +// Test +// +// Created by EzioChan on 2021/4/6. +// Copyright © 2021 Zhuhai Jieli Technology Co.,Ltd. All rights reserved. +// + +#import "JLSportDataModel.h" + +NS_ASSUME_NONNULL_BEGIN + +/// 压力实时 +@interface JL_SDM_AirPressure : JLSportDataModel +/// 实时 +@property(nonatomic,assign)int realTime; +/// 最高 +@property(nonatomic,assign)int max; +/// 最低 +@property(nonatomic,assign)int min; + +/// 处理回复数据内容 +/// @param value 数据内容 +/// @param submask 功能标记位 ++(JL_SDM_AirPressure*)responseData:(NSData *)value subMask:(NSData *)submask; + +/// 请求内容设置 +/// @param rt 是否需要实时气压 +/// @param min 是否需要最小气压 +/// @param max 是否需要最大气压 ++(JL_SDM_AirPressure*)requireRealTime:(BOOL)rt min:(BOOL)min Max:(BOOL)max; + + + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_SDM_Altitude.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_SDM_Altitude.h new file mode 100644 index 000000000..e4e73c39d --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_SDM_Altitude.h @@ -0,0 +1,38 @@ +// +// JL_SDM_Altitude.h +// Test +// +// Created by EzioChan on 2021/4/6. +// Copyright © 2021 Zhuhai Jieli Technology Co.,Ltd. All rights reserved. +// + +#import "JLSportDataModel.h" + +NS_ASSUME_NONNULL_BEGIN + +///海拔高度相关 +@interface JL_SDM_Altitude : JLSportDataModel + +/// 最大值 +@property(nonatomic,assign)float max; +/// 最小值 +@property(nonatomic,assign)float min; +/// 实时的 +@property(nonatomic,assign)float realTime; + +/// 处理回复数据内容 +/// @param value 数据内容 +/// @param submask 功能标记位 ++(JL_SDM_Altitude*)responseData:(NSData *)value subMask:(NSData *)submask; + +/// 请求海拔内容设置 +/// @param rt 是否需要实时海拔 +/// @param min 是否需要最小海拔 +/// @param max 是否需要最大海拔 ++(JL_SDM_Altitude*)requireRealTime:(BOOL)rt min:(BOOL)min Max:(BOOL)max; + + + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_SDM_Header.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_SDM_Header.h new file mode 100644 index 000000000..d106663d0 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_SDM_Header.h @@ -0,0 +1,153 @@ +// +// JL_SDM_Header.h +// JL_BLEKit +// +// Created by EzioChan on 2021/4/8. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#ifndef JL_SDM_Header_h +#define JL_SDM_Header_h + +#import +#import "JL_SDM_Stress.h" +#import "JL_SDM_Altitude.h" +#import "JL_SDM_MaxOxg.h" +#import "JL_SDM_RecTime.h" +#import "JL_SDM_HeartRate.h" +#import "JL_SDM_MoveSteps.h" +#import "JL_SDM_TrainLoad.h" +#import "JL_SDM_AirPressure.h" +#import "JL_SDM_OxSaturation.h" +#import "JL_SDM_SportMessage.h" +#import "JL_MSG_Weather.h" +#import "JL_MSG_Func.h" +#import "JLWatchEnum.h" +#import "NfcModel.h" +#import "JLwSettingModel.h" +#import "JLSensorFuncModel.h" +#import "JLSedentaryRmdModel.h" +#import "JLConsequentHeartRateModel.h" +#import "JLExerciseHeartRateRemindModel.h" +#import "JLAutoPressureModel.h" +#import "JLSleepMonitorModel.h" +#import "JLFallDetectionModel.h" +#import "JLEmergencyContactModel.h" +#import "JLOxygenSturationRemindModel.h" +#import "JLWristLiftDetectionModel.h" +#import "JLPersonInfoModel.h" +#import "JLDisconnectRemindModel.h" +#import "JLWearSyncInfoModel.h" +#import "JLWearSyncFinishModel.h" +#import "JLWearSyncRealTimeModel.h" +#import "JLeSimManager.h" + + +#include +#ifndef JL_IOS +#define JL_IOS +#endif + +#pragma - Please select your log mode and log level + +// Note: Only debug mode will print log. You could also set mode for log level. +#define kJLDebugMode +// JLLogLevelFatal , JLLogLevelError , JLLogLevelWarn , JLLogLevelInfo , JLLogLevelDebug +#define JLLogLevelError +//Note: print method name +#define kModuleName __func__ + +#pragma ---------------------------------- + +#ifdef kJLDebugMode + +static const int JL_IOS_FLAG_FATAL = 0x10; +static const int JL_IOS_FLAG_ERROR = 0x08; +static const int JL_IOS_FLAG_WARN = 0x04; +static const int JL_IOS_FLAG_INFO = 0x02; +static const int JL_IOS_FLAG_DEBUG = 0x01; + +#ifdef JLLogLevelFatal +static const int JL_IOS_LOG_LEVEL = JL_IOS_FLAG_FATAL; +#elif defined(JLLogLevelError) +static const int JL_IOS_LOG_LEVEL = (JL_IOS_FLAG_FATAL | JL_IOS_FLAG_ERROR); +#elif defined(JLLogLevelWarn) +static const int JL_IOS_LOG_LEVEL = (JL_IOS_FLAG_FATAL | JL_IOS_FLAG_ERROR | JL_IOS_FLAG_WARN); +#elif defined(JLLogLevelInfo) +static const int JL_IOS_LOG_LEVEL = (JL_IOS_FLAG_FATAL | JL_IOS_FLAG_ERROR | JL_IOS_FLAG_WARN | JL_IOS_FLAG_INFO); +#elif defined(JLLogLevelDebug) +static const int JL_IOS_LOG_LEVEL = (JL_IOS_FLAG_FATAL | JL_IOS_FLAG_ERROR | JL_IOS_FLAG_WARN | JL_IOS_FLAG_INFO | JL_IOS_FLAG_DEBUG); +#endif + + + +#define log4cplus_fatal(category, logFmt, ...) \ +if(JL_IOS_LOG_LEVEL & JL_IOS_FLAG_FATAL) \ +syslog(LOG_CRIT, "%s:" logFmt, category,##__VA_ARGS__); \ + +#define log4cplus_error(category, logFmt, ...) \ +if(JL_IOS_LOG_LEVEL & JL_IOS_FLAG_ERROR) \ +syslog(LOG_ERR, "%s:" logFmt, category,##__VA_ARGS__); \ + +#define log4cplus_warn(category, logFmt, ...) \ +if(JL_IOS_LOG_LEVEL & JL_IOS_FLAG_WARN) \ +syslog(LOG_WARNING, "%s:" logFmt, category,##__VA_ARGS__); \ + +#define log4cplus_info(category, logFmt, ...) \ +if(JL_IOS_LOG_LEVEL & JL_IOS_FLAG_INFO) \ +syslog(LOG_WARNING, "%s:" logFmt, category,##__VA_ARGS__); \ + +#define log4cplus_debug(category, logFmt, ...) \ +if(JL_IOS_LOG_LEVEL & JL_IOS_FLAG_DEBUG) \ +syslog(LOG_WARNING, "%s:" logFmt, category,##__VA_ARGS__); \ + + +#else + +#define log4cplus_fatal(category, logFmt, ...); \ + +#define log4cplus_error(category, logFmt, ...); \ + +#define log4cplus_warn(category, logFmt, ...); \ + +#define log4cplus_info(category, logFmt, ...); \ + +#define log4cplus_debug(category, logFmt, ...); \ + +#endif + +///心率 +typedef void(^JL_CB_HeartRate)(JL_SDM_HeartRate *heartRate); +///气压 +typedef void(^JL_CB_AirPressure)(JL_SDM_AirPressure *ap); +///海拔 +typedef void(^JL_CB_Altitude)(JL_SDM_Altitude *altitude); +///运动步数 +typedef void(^JL_CB_MoveSteps)(JL_SDM_MoveSteps *ms); +///压力检测 +typedef void(^JL_CB_Stress)(JL_SDM_Stress *stress); +///血氧饱和度 +typedef void(^JL_CB_Oxsaturation)(JL_SDM_OxSaturation *oxs); +///训练负荷 +typedef void(^JL_CB_TrainLoad)(JL_SDM_TrainLoad *tl); +///最大摄氧量 +typedef void(^JL_CB_MaxOxg)(JL_SDM_MaxOxg *mo); +///运动恢复时间 +typedef void(^JL_CB_RecTime)(JL_SDM_RecTime *rt); +///运动信息 +typedef void(^JL_CB_SportMsg)(JL_SDM_SportMessage *sm); +///传感器log +typedef void(^JL_CB_WatchLog)(JL_WATCH_LOG_TYPE type,NSData *data); + +//MARK:设置相关 +///设置状态回复 +typedef void(^JL_CB_Status)(BOOL succeed); + +//MARK: - 同步相关 +///读取同步运动状态 +typedef void(^JL_CB_SyncSportInfo)(JLWearSyncInfoModel *infoModel); +/// 读取同步状态 +typedef void(^JL_CB_SyncSportDataInfo)(JLWearSyncDataModel *infoModel); + + +#endif /* JL_SDM_Header_h */ diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_SDM_HeartRate.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_SDM_HeartRate.h new file mode 100644 index 000000000..0a9925ded --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_SDM_HeartRate.h @@ -0,0 +1,49 @@ +// +// JL_SDM_HeartBeat.h +// Test +// +// Created by EzioChan on 2021/4/6. +// Copyright © 2021 Zhuhai Jieli Technology Co.,Ltd. All rights reserved. +// +/* + * 这是一个Sport Data Model的对象 + */ +///心率model +#import "JLSportDataModel.h" + +NS_ASSUME_NONNULL_BEGIN + +/// 心率相关内容 +@interface JL_SDM_HeartRate : JLSportDataModel +/// 实时心率 +@property(nonatomic,assign)uint8_t realTime; +/// 静息心率 +@property(nonatomic,assign)uint8_t resting; +/// 最大心率 +@property(nonatomic,assign)uint8_t max; + +/// 单次测量的心率 +@property(nonatomic,assign)uint8_t singleRate; + +/// 是否为单次测量的数据 +@property(nonatomic,assign)BOOL isSingle; + +/// 处理回复数据内容 +/// @param value 数据内容 +/// @param submask 功能标记位 ++(JL_SDM_HeartRate*)responseData:(NSData *)value subMask:(NSData *)submask; + +/// 请求心率内容设置 +/// @param rt 是否需要实时心率 +/// @param rting 是否需要静息心率 +/// @param max 是否需要最大心率 ++(JL_SDM_HeartRate*)requireRealTime:(BOOL)rt Resting:(BOOL)rting Max:(BOOL)max; + +/// 单次测量 ++(JL_SDM_HeartRate*)requireSingle; + + + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_SDM_MaxOxg.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_SDM_MaxOxg.h new file mode 100644 index 000000000..a0bf6d539 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_SDM_MaxOxg.h @@ -0,0 +1,29 @@ +// +// JL_SDM_MaxOxg.h +// Test +// +// Created by EzioChan on 2021/4/7. +// Copyright © 2021 Zhuhai Jieli Technology Co.,Ltd. All rights reserved. +// + +#import "JLSportDataModel.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface JL_SDM_MaxOxg : JLSportDataModel + +@property(nonatomic,assign)int max; + +///最大摄氧量 +/// 处理回复数据内容 +/// @param value 数据内容 +/// @param submask 功能标记位 ++(JL_SDM_MaxOxg*)responseData:(NSData *)value subMask:(NSData *)submask; + +/// 请求内容 ++(JL_SDM_MaxOxg*)require; + + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_SDM_MoveSteps.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_SDM_MoveSteps.h new file mode 100644 index 000000000..46fa1076f --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_SDM_MoveSteps.h @@ -0,0 +1,34 @@ +// +// JL_SDM_MoveSteps.h +// Test +// +// Created by EzioChan on 2021/4/6. +// Copyright © 2021 Zhuhai Jieli Technology Co.,Ltd. All rights reserved. +// + +#import "JLSportDataModel.h" + +NS_ASSUME_NONNULL_BEGIN + +///实时步数 +@interface JL_SDM_MoveSteps : JLSportDataModel +/// 实时步数 +@property(nonatomic,assign)NSInteger rtStep; + +/// 热量,单位:千卡 +@property(nonatomic,assign)NSInteger calories; + +/// 距离,单位:0.01公里 +@property(nonatomic,assign)NSInteger distance; +/// 处理回复数据内容 +/// @param value 数据内容 +/// @param submask 功能标记位 ++(JL_SDM_MoveSteps*)responseData:(NSData *)value subMask:(NSData *)submask; + +/// 选择性请求内容 ++(JL_SDM_MoveSteps*)require:(BOOL)rst distance:(BOOL)dts calories:(BOOL)ca; + + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_SDM_OxSaturation.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_SDM_OxSaturation.h new file mode 100644 index 000000000..f594e25c3 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_SDM_OxSaturation.h @@ -0,0 +1,59 @@ +// +// JL_SDM_OxSaturation.h +// Test +// +// Created by EzioChan on 2021/4/7. +// Copyright © 2021 Zhuhai Jieli Technology Co.,Ltd. All rights reserved. +// + +#import "JLSportDataModel.h" + +NS_ASSUME_NONNULL_BEGIN + +typedef NS_ENUM(UInt8, JLOxSaturationType) { + //当前血氧饱和度 + JLOxSaturation_nowSta = 0x01, + //最大血氧 + JLOxSaturation_max = 0x01 << 1, + //最小血氧 + JLOxSaturation_min = 0x01 << 2, + //单次测量 + JLOxSaturation_single = 0x01 << 3 +}; + +/// 血氧饱和度 +@interface JL_SDM_OxSaturation : JLSportDataModel + +/// 饱和度 +@property(nonatomic,assign)int staturation; +/// 最大饱和度 +@property(nonatomic,assign)uint8_t max; +/// 最小饱和度 +@property(nonatomic,assign)uint8_t min; + +/// 单次测量的饱和度 +@property(nonatomic,assign)uint8_t singleStaturation; + +/// 是否为单次测量的数据 +@property(nonatomic,assign)BOOL isSingle; + + +/// 血氧饱和度 +/// 处理回复数据内容 +/// @param value 数据内容 +/// @param submask 功能标记位 ++(JL_SDM_OxSaturation*)responseData:(NSData *)value subMask:(NSData *)submask; + +/// 请求内容 ++(JL_SDM_OxSaturation*)require; + + +/// 请求血氧浓度 +/// @param type 类型 +/// 该类型可以同时请求多个,诸如:JLOxSaturation_nowSta | JLOxSaturation_max | JLOxSaturation_min ++(JL_SDM_OxSaturation*)requireByBit:(JLOxSaturationType)type; + + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_SDM_RecTime.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_SDM_RecTime.h new file mode 100644 index 000000000..3e0f3c577 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_SDM_RecTime.h @@ -0,0 +1,28 @@ +// +// JL_SDM_RecTime.h +// Test +// +// Created by EzioChan on 2021/4/7. +// Copyright © 2021 Zhuhai Jieli Technology Co.,Ltd. All rights reserved. +// + +#import "JLSportDataModel.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface JL_SDM_RecTime : JLSportDataModel + +@property(nonatomic,assign)int hour; +@property(nonatomic,assign)int min; + +/// 处理回复数据内容 +/// @param value 数据内容 +/// @param submask 功能标记位 ++(JL_SDM_RecTime*)responseData:(NSData *)value subMask:(NSData *)submask; + +/// 请求内容 ++(JL_SDM_RecTime*)require; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_SDM_SportMessage.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_SDM_SportMessage.h new file mode 100644 index 000000000..38e84d940 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_SDM_SportMessage.h @@ -0,0 +1,50 @@ +// +// JL_SDM_SportMessage.h +// JL_BLEKit +// +// Created by EzioChan on 2021/4/8. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import "JLSportDataModel.h" +#import "JLWatchEnum.h" +NS_ASSUME_NONNULL_BEGIN + +@interface JL_SDM_SportMessage : JLSportDataModel + +/// 运动模式 +@property(nonatomic,assign)JL_SportPattern sportPattern; +/// 距离,单位:0.01km +@property(nonatomic,assign)int distance; +/// 开始时间 +@property(nonatomic,strong)NSDate *startTime; +/// 结束时间 +@property(nonatomic,strong)NSDate *endTime; +/// 热量,单位:千卡 Kcal +@property(nonatomic,assign)int xkcal; +/// 速度。单位:0.01 km/h +@property(nonatomic,assign)int speed; + + +/// 分析返回的数据 +/// @param value subData +/// @param submask submask ++(JL_SDM_SportMessage *)responseData:(NSData *)value subMask:(NSData *)submask; + +/// 请求要获取的内容 +/// @param m 是否请求模式 +/// @param d 是否请求距离 +/// @param st 是否请求开始时间 +/// @param et 是否请求结束时间 +/// @param kcal 是否请求卡路里 +/// @param sp 是否请求速度 ++(JL_SDM_SportMessage *)requireModel:(BOOL)m distance:(BOOL)d start:(BOOL)st end:(BOOL)et kcal:(BOOL)kcal speed:(BOOL)sp; + +/// 请求全部数据 ++(JL_SDM_SportMessage *)requireAll; + + + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_SDM_Stress.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_SDM_Stress.h new file mode 100644 index 000000000..75d9260ad --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_SDM_Stress.h @@ -0,0 +1,28 @@ +// +// JL_SDM_Stress.h +// Test +// +// Created by EzioChan on 2021/4/7. +// Copyright © 2021 Zhuhai Jieli Technology Co.,Ltd. All rights reserved. +// + +#import "JLSportDataModel.h" + +NS_ASSUME_NONNULL_BEGIN + +/// 实时压力 +@interface JL_SDM_Stress : JLSportDataModel + +@property(nonatomic,assign)int stress; + +/// 处理回复数据内容 +/// @param value 数据内容 +/// @param submask 功能标记位 ++(JL_SDM_Stress*)responseData:(NSData *)value subMask:(NSData *)submask; + +/// 请求内容 ++(JL_SDM_Stress*)require; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_SDM_TrainLoad.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_SDM_TrainLoad.h new file mode 100644 index 000000000..c93ff24c1 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_SDM_TrainLoad.h @@ -0,0 +1,30 @@ +// +// JL_SDM_TrainLoad.h +// Test +// +// Created by EzioChan on 2021/4/7. +// Copyright © 2021 Zhuhai Jieli Technology Co.,Ltd. All rights reserved. +// + +#import "JLSportDataModel.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface JL_SDM_TrainLoad : JLSportDataModel + +@property(nonatomic,assign)int load; + +///训练负荷 +/// 处理回复数据内容 +/// @param value 数据内容 +/// @param submask 功能标记位 ++(JL_SDM_TrainLoad*)responseData:(NSData *)value subMask:(NSData *)submask; + +/// 请求内容 ++(JL_SDM_TrainLoad*)require; + + + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_SmallFileManager.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_SmallFileManager.h new file mode 100644 index 000000000..fae3600ba --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_SmallFileManager.h @@ -0,0 +1,151 @@ +// +// JL_SmallFileManager.h +// JL_BLEKit +// +// Created by 杰理科技 on 2021/12/13. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import + +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +typedef NS_ENUM(UInt8, JL_SmallFileOperate) { + JL_SmallFileOperateFail = 0x00, //失败 + JL_SmallFileOperateDoing = 0x01, //操作中 + JL_SmallFileOperateSuceess = 0x02, //成功 + JL_SmallFileOperateUnknown = 0x03, //未知 + JL_SmallFileOperateExcess = 0x04, //超量 + JL_SmallFileOperateCrcError = 0x05, //CRC错误 + JL_SmallFileOperateTimeout = 0x06, //超时 +}; +typedef void(^JL_SMALLFILE_DEL)(JL_SmallFileOperate status); +typedef void(^JL_SMALLFILE_READ)(JL_SmallFileOperate status, + float progress, NSData* __nullable data); +typedef void(^JL_SMALLFILE_NEW)(JL_SmallFileOperate status, + float progress, uint16_t fileID); +typedef void(^JL_SMALLFILE_UPDATE)(JL_SmallFileOperate status, + float progress); +typedef void(^JL_SMALLFILE_LIST)(NSArray * __nullable array); +typedef void(^JL_SMALLFILE_RT)(uint8_t flag, uint16_t fileID,NSData* __nullable data); + +@interface JL_SmallFileManager : JL_FunctionBaseManager + +#pragma mark - 查询文件 + +/// 查询文件 +/// @param type 文件类型 +/// 文件类型除了已有的文件外,还可以扩展类型是Uint8的值 +/// @param result 列表回调 +-(void)cmdSmallFileQueryType:(JL_SmallFileType)type + Result:(JL_SMALLFILE_LIST __nullable)result; + +#pragma mark - 删除文件 + +/// 删除文件 +/// @param file 文件模型:JLModel_SmallFile +/// @param result 操作回调结果 +-(void)cmdSmallFileDelete:(JLModel_SmallFile*)file Result:(JL_SMALLFILE_DEL)result; + +#pragma mark - 读取文件 + +/// 读取文件 +/// @param file 文件模型:JLModel_SmallFile +/// @param result 回调文件数据以及进度,通过分包式回调。 +-(void)cmdSmallFileRead:(JLModel_SmallFile*)file + Result:(JL_SMALLFILE_READ)result; + +-(void)cmdSmallFileReadSync:(JLModel_SmallFile*)file + Result:(JL_SMALLFILE_READ)result;//同步 + +#pragma mark - 新增文件 + +/// 新增文件 +/// @param data 文件数据 +/// @param type 文件类型 +/// @param result 回调的结果,包含分包进度 +-(void)cmdSmallFileNew:(NSData*)data + Type:(JL_SmallFileType)type + Result:(JL_SMALLFILE_NEW)result; + +-(void)cmdSmallFileNewSync:(NSData*)data + Type:(JL_SmallFileType)type + Result:(JL_SMALLFILE_NEW)result; + +#pragma mark - 更新文件 + +/// 更新文件 +/// @param file 文件模型:JLModel_SmallFile +/// @param data 文件数据 +/// @param result 回调进度 +-(void)cmdSmallFileUpdate:(JLModel_SmallFile*)file + Data:(NSData*)data + Result:(JL_SMALLFILE_UPDATE)result; + +-(void)cmdSmallFileUpdateSync:(JLModel_SmallFile*)file + Data:(NSData*)data + Result:(JL_SMALLFILE_UPDATE)result; + +#pragma mark - 底层API + +/// 读取文件,更低等级的API +/// @param type 文件类型 +/// @param fileId 文件ID +/// @param offset 偏移值 +/// @param fileSize 数据大小 +/// @param flag 是否为第一包查询 +/// @param result 回调文件结果 +-(void)cmdSmallFileReadType:(uint8_t)type + FileID:(uint16_t)fileId + Offset:(uint16_t)offset + FileSize:(uint16_t)fileSize + Flag:(uint8_t)flag + Result:(JL_SMALLFILE_RT __nullable)result; + + +/// 插入新文件,更低等级的API +/// @param type 文件类型 +/// @param offset 偏移值 +/// @param fileSize 数据量大小 +/// @param crc16 crc校验码 +/// @param data 要插入的数据 +/// @param result 回调结果 +-(void)cmdSmallFileNewType:(uint8_t)type + Offset:(uint16_t)offset + FileSize:(uint16_t)fileSize + Crc16:(uint16_t)crc16 + FileData:(NSData*)data + Result:(JL_SMALLFILE_RT __nullable)result; + +/// 更新文件,更低等级的API +/// @param type 文件类型 +/// @param fileId 文件ID +/// @param offset 偏移值 +/// @param fileSize 数据包的大小 +/// @param crc16 数据包的crc校验 +/// @param data 数据包 +/// @param result 回调结果 +-(void)cmdSmallFileUpdateType:(uint8_t)type + FileID:(uint16_t)fileId + Offset:(uint16_t)offset + FileSize:(uint16_t)fileSize + Crc16:(uint16_t)crc16 + FileData:(NSData*)data + Result:(JL_SMALLFILE_RT __nullable)result; + +/// 小文件删除,更低等级的API +/// @param type 文件类型 +/// @param fileId 文件id +/// @param result 回调结果 +-(void)cmdSmallFileDeleteType:(uint8_t)type + FileID:(uint16_t)fileId + Result:(JL_SMALLFILE_RT __nullable)result; + +-(void)closeTimer; +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_SoundCardManager.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_SoundCardManager.h new file mode 100644 index 000000000..6e23c4ce3 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_SoundCardManager.h @@ -0,0 +1,97 @@ +// +// JL_SoundCardManager.h +// JL_BLEKit +// +// Created by 李放 on 2021/12/20. +// Modify by EzioChan on 2023/09/25. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN + + +typedef NS_ENUM(uint8_t, JL_KalaoIndex) { + ///卡拉OK 混响 + JL_KalaoIndexReverberation = 0, + ///卡拉OK 延时 + JL_KalaoIndexDelayed = 1, + ///卡拉OK 音量 + JL_KalaoIndexVolume = 2, +}; + +@class JL_ManagerM; + +/// 声卡功能 +@interface JLSoundCardIndexValue : NSObject + +@property (assign,nonatomic)uint8_t index; + +@property (assign,nonatomic)uint16_t value; + +@end + +@protocol JLSoundCardMgrDelegate + +/// 声卡控制回调 +/// - Parameters: +/// - mask: 掩码 +/// - items: 掩码对应的值 +-(void)jlsoundCardMask:(uint64_t)mask values:(NSArray *)items; + +/// 声卡控制回调 +/// - Parameter frequencyArray: 频率数组 +-(void)jlsoundCardMicFrequency:(NSArray*)frequencyArray; + +/// 声卡控制回调 +/// - Parameter eqArray: EQ数组 +-(void)jlsoundCardMicEQ:(NSArray*)eqArray; + +@end + + +/// 卡拉OK(声卡控制相关) +@interface JL_SoundCardManager : NSObject + +/// 卡拉OK 组件索引 +@property (assign,nonatomic)long index; + +/// 卡拉OK 组件的值 +@property (assign,nonatomic)long value; + +/// 卡拉OK 固件返回的掩码 +@property (assign,nonatomic)uint64_t mask; + +/// 声卡功能参数列表 +@property (strong,nonatomic)NSArray * iVitems; + +/// 卡拉OK 频率数组 +@property (strong,nonatomic)NSArray *micFrequencyArray; + +/// 卡拉OK EQ数组 +@property (strong,nonatomic)NSArray *micEQArray; + +/// 代理 +@property (weak,nonatomic)id delegate; + +/// 设置卡拉OK【index、value】 +/// - Parameters: +/// - manager: 设备对象 +/// - index: index 参数类型 JL_KalaoIndex 目前支持混响、延时、音量的设置。(具体可以看固件的json文件) +/// - value: 0-100 +/// - result: 设置结果 +-(void)cmdSetKalaok:(JL_ManagerM *)manager Index:(JL_KalaoIndex)index Value:(uint16_t)value result:(JL_CMD_RESPOND)result; + +/// 设置卡拉OK【MIC EQ增益】 +/// - Parameters: +/// - manager: 设备对象 +/// - array: @[@(0),@(0),@(0),@(0),@(0)] 单个取值范围 [-8.0 , +8.0]。 +/// - result: 设置结果 +-(void)cmdSetKaraoke:(JL_ManagerM *)manager micEQ:(NSArray*)array result:(JL_CMD_RESPOND)result; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_SpeechAIttsHandler.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_SpeechAIttsHandler.h new file mode 100644 index 000000000..0ade1d9e8 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_SpeechAIttsHandler.h @@ -0,0 +1,59 @@ +// +// JL_SpeechAIttsHandler.h +// JL_BLEKit +// +// Created by EzioChan on 2023/7/22. +// Copyright © 2023 www.zh-jieli.com. All rights reserved. +// + +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +@class JL_ManagerM; +@protocol JL_SpeechAIttsHandlerDelegate + +/// 设备回调ai云数据 +/// - Parameters: +/// - manager: 设备 +/// - aicloud: AI云数据对象 +-(void)receiveDataFrom:(JL_ManagerM *)manager WithAiCloud:(JLSpeechAiCloud *)aicloud; + +/// 设备返回tts合成数据 +/// - Parameters: +/// - manager: 设备 +/// - tts: tts数据对象 +-(void)receiveDataFrom:(JL_ManagerM *)manager WithTTS:(JLSpeechTTSSynthesis *)tts; + +@end + +/// 语音 AI/tts 传输处理(旧) +DEPRECATED_MSG_ATTRIBUTE("Use JL_SpeechAIttsHandler instead.") +@interface JL_SpeechAIttsHandler : NSObject + +@property(nonatomic,weak)id delegate; + + +/// 初始化一个语音大数据传输实例 +/// - Parameter mgr: JL_ManagerM +- (instancetype)initWithMgr:(JL_ManagerM *)mgr; + +/// 发送tts语音合成信息 +/// - Parameters: +/// - tts: tts语音对象内容 +/// - manager: 设备 +/// - result: 回调结果 +-(void)speechSendTTs:(JLSpeechTTSSynthesis *)tts manager:(JL_ManagerM *)manager result:(JL_BIGDATA_RT)result; + +/// 发送ai云数据到设备 +/// - Parameters: +/// - cloud: ai云数据 +/// - manager: 设备 +/// - result: 回调结果 +-(void)speechSendAiCloud:(JLSpeechAiCloud *)cloud manager:(JL_ManagerM *)manager result:(JL_BIGDATA_RT)result; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_SpeexManager.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_SpeexManager.h new file mode 100644 index 000000000..28c69e572 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_SpeexManager.h @@ -0,0 +1,125 @@ +// +// JL_SpeexManager.h +// JL_BLEKit +// +// Created by 杰理科技 on 2021/12/17. +// Modify By EzioChan on 2023/03/27. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +@class JL_ManagerM; +@class JL_SpeexManager; + +/// 录音状态代理处理 +@protocol JL_SpeexManagerDelegate +/// 录音数据回调 +/// - Parameters: +/// - manager: 操作设备 +/// - data: 数据 +-(void)speexManager:(JL_SpeexManager *)manager Audio:(NSData *)data; + +/// 设备端开始录音 +/// - Parameters: +/// - manager: 操作设备 +/// - param: 录音参数 +-(void)speexManager:(JL_SpeexManager *) manager StartByDeviceWithParam:(JLRecordParams *)param; + +/// 设备端结束录音 +/// - Parameters: +/// - manager: 操作设备 +/// - param: 语音助手配置参数 +-(void)speexManager:(JL_SpeexManager *) manager StopByDeviceWithParam:(JLSpeechRecognition *)param; + +/// 录音状态回调 +/// - Parameters: +/// - manager: 操作设备 +/// - status: 状态 +-(void)speexManager:(JL_SpeexManager *)manager Status:(JL_SpeakType)status; + +@optional +/// 录音状态回调 +/// - Parameters: +/// - manager: 操作设备 +/// - status: 录音状态 +/// - originator: 状态变更发起端 +/// 当发起者是Device时,才会具备params的参数,其中结束录音时,params的属性仅有mVadWay为可使用内容 +/// - params: 录音参数 +-(void)speexManager:(JL_SpeexManager *)manager Status:(JL_SpeakType)status By:(JLCMDOriginator)originator With:(JLRecordParams *_Nullable) params __attribute__((deprecated("Use several other callbacks to implement callback methods"))); +@end + +/// 设备录音管理对象 +DEPRECATED_MSG_ATTRIBUTE("Use JLDevAudioManager instead.") +@interface JL_SpeexManager : NSObject + +//MARK: - Sync Android Interface + +@property(nonatomic,weak)id delegate; + +-(instancetype)init __attribute__((unavailable("Use +shareSpeexManager:WithManager: instead."))); + + +/// 获取单例 +/// - Parameters: +/// - delegate: 代理 +/// - manager: 操作设备 ++(JL_SpeexManager *)shareSpeexManager:(id) delegate WithManager:(JL_ManagerM *)manager; + + +/// 获取录音状态 +-(JL_SpeakType)cmdCheckRecordStatus; + + + +/// 开始录音 +/// - Parameters: +/// - manager: 操作设备 +/// - params: 录音参数 +/// - result: 命令操作结果回调 +-(void)cmdStartRecord:(JL_ManagerM *)manager Params:(JLRecordParams *)params Result:(JL_CMD_RESPOND __nullable)result; + + +/// 停止录音 +/// - Parameters: +/// - manager: 操作设备 +/// - reason: VAD类型 +/// - result: 命令操作结果回调 +-(void)cmdStopRecord:(JL_ManagerM *)manager Reason:(JLSpeakDownReason) reason Result:(JL_CMD_RESPOND __nullable)result; + +/// 停止录音2 +/// - Parameters: +/// - manager: 操作设备 +/// - reason: vad类型 +/// - schr: 语音设置助手 +/// - result: 回调结果 +-(void)cmdStopRecord:(JL_ManagerM *)manager Reason:(JLSpeakDownReason)reason SpeechHelper:(JLSpeechRecognition *)schr Result:(JL_CMD_RESPOND __nullable)result; + + +/// 发送命令给音箱,允许音箱端开始接收语音,音箱收到这个消息后会发一个提示音 +/// 当前命令用于收到设备主动发起的录音时,同意开始录音。 +/// 即在 speexManagerStatus:(JL_SpeakType)status By:(JLCMDOriginator)originator With:(JLRecordParams *_Nullable) params 的代理回调收到之后的回复处理 +-(void)cmdAllowSpeak; + + +/// 拒绝录音 +/// 发送命令给音箱,不允许接收语音 +/// 当前命令用于收到设备主动发起的录音时,拒绝开始录音。 +/// 即在 speexManagerStatus:(JL_SpeakType)status By:(JLCMDOriginator)originator With:(JLRecordParams *_Nullable) params 的代理回调收到之后的回复处理 +-(void)cmdRejectSpeak; + +/** 停止语音 + 发发送命令给音箱,停止接收数据,即检测到断句 + */ +-(void)cmdSpeakingDone __attribute__((deprecated ( "当前命令已失效,请使用cmdStopRecord:(JL_ManagerM *)manager Reason:(JLSpeakDownReason) reason"))); + + + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_SystemEQ.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_SystemEQ.h new file mode 100644 index 000000000..3286776c9 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_SystemEQ.h @@ -0,0 +1,54 @@ +// +// JL_SystemEQ.h +// JL_BLEKit +// +// Created by 李放 on 2021/12/20. +// Modify by EzioChan on 2023/09/22 +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import +#import +#import +#import + + +NS_ASSUME_NONNULL_BEGIN +@class JL_SystemEQ; +typedef void(^JLSystemEQResult)(JL_CMDStatus status,JL_SystemEQ * _Nullable model); + +@interface JL_SystemEQ : JL_FunctionBaseManager + +/// 当前EQ模式 +@property (assign,nonatomic) JL_EQMode eqMode; + +/// EQ段数类型 +@property (assign,nonatomic) JL_EQType eqType; + +/// EQ参数值 +/// (只适用于EQ Mode == CUSTOM情况) +@property (strong, nonatomic) NSArray *eqArray; + +/// 自定义 EQ数组 +@property (strong, nonatomic) NSArray *eqCustomArray; + +/// EQ频率 +@property (strong, nonatomic) NSArray *eqFrequencyArray; + +/// EQ的预设值数组 +@property (strong,nonatomic) NSArray *eqDefaultArray; + + +/// 设置系统EQ +/// - Parameters: +/// - eqMode: EQ模式 +/// - params: EQ参数 +-(void)cmdSetSystemEQ:(JL_EQMode)eqMode Params:(NSArray* __nullable)params; + +/// 查询系统EQ内容 +-(void)cmdGetSystemEQ:(JLSystemEQResult)result; + + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_SystemTime.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_SystemTime.h new file mode 100644 index 000000000..9e862aaeb --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_SystemTime.h @@ -0,0 +1,45 @@ +// +// JL_SystemTime.h +// JL_BLEKit +// +// Created by 李放 on 2021/12/20. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface JL_SystemTime : JL_FunctionBaseManager + + +/// 设备当前时间 +@property(nonatomic,strong)JLModel_RTC *rtc; + +#pragma mark ---> 设置系统时间 +/** + @param date 时间类 + */ +-(void)cmdSetSystemTime:(NSDate*)date __attribute__((deprecated ( "Please use the (cmdSetSystemYear: Month: Day: Hour: Minute: Second) method instead. The current method will be invalid"))); + + +/// 设置系统年月日时分秒 +/// @param year 年 +/// @param month 月 +/// @param day 日 +/// @param hour 时 +/// @param min 分 +/// @param sec 秒 +-(void)cmdSetSystemYear:(uint16_t)year + Month:(uint8_t)month + Day:(uint8_t)day + Hour:(uint8_t)hour + Minute:(uint8_t)min + Second:(uint8_t)sec; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_SystemVolume.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_SystemVolume.h new file mode 100644 index 000000000..490d8ce10 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_SystemVolume.h @@ -0,0 +1,27 @@ +// +// JL_SystemVolume.h +// JL_BLEKit +// +// Created by 李放 on 2021/12/20. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface JL_SystemVolume : JL_FunctionBaseManager + +#pragma mark ---> 设置系统音量 +/** + @param volume 音量值 + */ +-(void)cmdSetSystemVolume:(UInt8)volume; +-(void)cmdSetSystemVolume:(UInt8)volume Result:(JL_CMD_RESPOND __nullable)result; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_Tools.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_Tools.h new file mode 100644 index 000000000..64d4c42c1 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_Tools.h @@ -0,0 +1,412 @@ +// +// JL_Tools.h +// JL_BLEKit +// +// Created by zhihui liang on 2018/11/9. +// Copyright © 2018 www.zh-jieli.com. All rights reserved. +// + +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN +typedef void(^JL_Action)(void); +typedef void(^JL_Timer_BK)(void); + +@class JL_Timer; +@interface JL_Tools : NSObject + + +/** + Data自定义截取。 + + @param data 数据 + @param index 偏移 + @param length 长度 + @return 截取后的数据 + */ ++(NSData*)data:(NSData*)data R:(NSInteger)index L:(NSInteger)length; ++(NSDictionary*)dictionaryData:(NSData*)data R:(NSInteger)index L:(NSInteger)length; + +/** + NSData 转成 10进制 + + @param data 数据类型 + @return NSInteger类型 + */ ++(NSInteger)dataToInt:(NSData*)data; + +/** + NSData 转成 NSString + + @param data 数据 + @return 字符串 + */ ++(NSString*)dataChangeToString:(NSData*)data; + +/** + uint8_t 转成 NSData + + @param value uint8_t类型 + @return NSData + */ ++(NSData*)uInt8_data:(uint8_t)value; + +/** + uint16_t 转成 NSData + + @param value uint16_t类型 + @param endian YES:小端 NO:大端 + @return NSData + */ ++(NSData*)uInt16_data:(uint16_t)value Endian:(BOOL)endian; + +/** + uint32_t 转成 NSData + + @param value uint32_t类型 + @param endian YES:小端 NO:大端 + @return NSData + */ ++(NSData*)uInt32_data:(uint32_t)value Endian:(BOOL)endian; + +/** + uint64_t 转成 NSData + + @param value uint64_t类型 + @param endian YES:小端 NO:大端 + @return NSData + */ ++(NSData*)uInt64_data:(uint64_t)value Endian:(BOOL)endian; + +/** + int64_t 转成 NSData + + @param value int64_t类型 + @param endian YES:小端 NO:大端 + @return NSData + */ ++(NSData*)int64_data:(int64_t)value Endian:(BOOL)endian; + +/** + 大小端转换 + + @param data 数据 + @return 转换后的数据 + */ ++(NSData*)changeBigOrSmall:(NSData*)data; + +/** + @"ffff0000" 转成 ,16进制的字符串变成NSData。 + + @param hex 类似@"ffff0000" + @return NSData类型 => + */ ++(NSMutableData*)HexToData:(NSString*)hex; +/** + * 去除结束符 + */ ++(NSData*)cleanEOF:(NSData*)data; +/** + 求自然数:aByte ==> -2 -1 0 1 2 3... + @param aByte 数据 + @return 自然数 + */ ++(int)getNaturalNumber:(NSData*)aByte; ++(int)getNaturalNumber_u16:(NSData*)u16Bytes; ++(int)getNaturalNumber_u32:(NSData*)u32Bytes; + +/** + 发出通知事件 + + @param name 通知名字 + @param object 传递的对象 + */ ++(void)post:(NSString*)name Object:(id __nullable)object; + +/** + 发出通知事件 + + @param name 通知名字 + @param object 传递的对象 + @param info 传递的信息 + */ ++(void)post:(NSString*)name Object:(id __nullable)object UserInfo:(NSDictionary* __nullable)info; +/** + 监听通知事件 + + @param name 通知名字 + @param action 实现方法 + @param own 监听者 + */ ++(void)add:(NSString*__nullable)name Action:(SEL)action Own:(id)own; + +/** + 取消通知监听 + + @param name 通知名字 + @param own 监听者 + */ ++(void)remove:(NSString*__nullable)name Own:(id)own; + +/** + 往NSUserDefault存入对象(注意:可变类型对象不适用)。 + + @param objc 对象 + @param key 键值 + */ ++(void)setUser:(id)objc forKey:(NSString*)key; + +/** + 从NSUserDefault取出对象(注意:可变类型对象不适用)。 + + @param key 键值 + @return 返回对象 + */ ++(id _Nullable)getUserByKey:(NSString*)key; + +/** + 移除NSUserDefault相对应的对象 + + @param key 键值 + */ ++(void)removeUserByKey:(NSString*)key; + + +/** + 延时执行block。 + + @param sec 延时时间(秒) + @param block 代码块 + */ ++(void)delay:(double)sec Task:(JL_Action)block; + +/** + 异步执行block。 + + @param block 代码块 + */ ++(void)subTask:(JL_Action)block; + +/** + 主线程执行block。 + + @param block 代码块 + */ ++(void)mainTask:(JL_Action)block; + + +/** + 新建定时器 + + @param sel 执行方法 + @param objc 执行对象 + @param sec 间隔时间(秒) + @return NSTimer + */ ++(NSTimer*)timingStart:(SEL)sel target:(id)objc Time:(NSTimeInterval)sec; + + +/** + 暂停定时间器 + + @param timer 定时器指针 + */ ++(void)timingPause:(__weak NSTimer*)timer; + +/** + 继续定时器 + + @param timer 定时器指针 + */ ++(void)timingContinue:(__weak NSTimer*)timer; + + +/** + 摧毁定时器 + + @param timer 定时器指针 + */ ++(void)timingStop:(__weak NSTimer*)timer; + + +/** + 在存在的文件路径上,建立新的文件。 + + @param sPath 沙盒 + @param mPath 中间路径 + @param file 文件名 + @return 完成路径 + */ ++(NSString*)createOn:(NSSearchPathDirectory)sPath + MiddlePath:(NSString*)mPath + File:(NSString*)file; + +/** + 列出文件路径 + + @param sPath 沙盒 + @param mPath 中间路径 + @param file 文件名 + @return 完整路径 + */ ++(NSString*)listPath:(NSSearchPathDirectory)sPath + MiddlePath:(NSString*)mPath + File:(NSString*)file; + +/** + * 用途:【查找】一个文件,在你想要的路径下。 + * @param sPath 系统路径 + * @param mPath 中途路径 -->> @"test1/test2/test3" <<-- + * @param file 文件名 + */ ++(NSString*)findPath:(NSSearchPathDirectory)sPath + MiddlePath:(NSString*)mPath + File:(NSString*)file; + +/** + * 用途:从Project资源里寻找文件。 + * (先把资源文件添加至工程内的Copy Bundle Resources内。) + * @param file 文件名 + * @return 该文件的路径。 + */ ++(NSString*)find:(NSString *)file; + +/** + * 是否存在某个路径。 + * @param path 文件路径 + * @return YES or NO。 + */ ++(BOOL)isExistsPath:(NSString*)path; +/** + 删除文件 + @param path 完整路径 + @return 成功与否 + */ ++(BOOL)removePath:(NSString*)path; + +/** + * 用途:文件夹内文件元素。 + * @param path 文件夹路径 + */ ++(NSArray*)subPaths:(NSString*)path; + +/** + * 用途:解析JSON文件。 + * @param path 文件路径 + */ ++(id)JsonPath:(NSString*)path; + +/** + * NSArray ==> NSString. + */ ++(NSString*)arrayToJson:(NSArray *)array; + +/** + 数据覆盖写进文件 + + @param data 数据 + @param path 文件路径 + @return 成功与否 + */ ++(BOOL)writeData:(NSData*)data fillFile:(NSString*)path; + +/** + 数据写进文件的末端 + + @param data 数据 + @param path 文件路径 + */ ++(void)writeData:(NSData*)data endFile:(NSString*)path; + +/** + 数据写进文件的偏移位置 + + @param data 数据 + @param seek 偏移 + @param path 文件路径 + */ ++(void)writeData:(NSData*)data Seek:(unsigned long long)seek File:(NSString*)path; + +/** + * UNICODE 编码字符串(小端) + */ ++(NSString*)stringUnicode:(NSData*)data; + +/** + * UNICODE 编码字符串(大端) + */ ++(NSString*)stringUnicodeBig:(NSData*)data; + +/** + * ANSI 编码字符串 + */ ++(NSString*)stringANSI:(NSData*)data; + +/** + * GBK 编码字符串 + */ ++(NSString*)stringGBK:(NSData*)data; + +/** + * 大文件传输,长短文件名(移除不必要字符) + */ ++(NSData*)stringBigFileWithNeedRemoveUnnecessaryPunctuationCharactersWithString:(NSString*)name withFileNameIndex:(int)fileNameIndex; + + +/// 大文件传输文件名设置 +/// Unicode编码 +/// - Parameters: +/// - name: 文件名 +/// - fileNameIndex: index +/// - encodeType: 编码格式 ++(NSData *)stringBigFileUnicode:(NSString *)name withFileNameIndex:(int)fileNameIndex WithEncode:(NSStringEncoding) encodeType; +/** + * 移除不必要字符 \ / : " < > . + */ ++(NSString *)removeUnnecessaryPunctuationCharactersWithString:(NSString *)textString; + +/** + * 名字移除目标字符 + * @param pattern 目标需要移除的字符 + * NSString *pattern = @"[/:*?\"<>|]"; + * @param textString 源字符串 + */ ++(NSString *)removeCharacters:(NSString*)pattern WithString:(NSString *)textString; + +/** + * 大文件传输,长短文件名 + */ ++(NSData*)stringBigFile:(NSString*)name withFileNameIndex:(int)fileNameIndex; + +/** + * 去除特殊字符串 + */ ++(NSString*)removeSpecialStrings:(NSString*)name; +/** + * 返回时间戳(单位:秒) + */ ++(long)dateCurrent; + + +/// 把data变成LTV格式 +/// @param type 类型 +/// @param data 数据 ++(NSData *)beLtv:(uint8_t)type Data:(NSData*)data; + + + +@end + +@interface JL_Timer : NSObject +@property(nonatomic,assign)NSInteger subTimeout; //超时时间(默认5s) +@property(nonatomic,assign)NSTimeInterval subScale; //默认1.0s +-(void)waitForTimeoutResult:(JL_Timer_BK)result; +-(void)continueTimeout; +-(void)cancelTimeout; +-(void)threadWait; +-(void)threadContinue; +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_TwsManager.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_TwsManager.h new file mode 100644 index 000000000..d3f8cf977 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_TwsManager.h @@ -0,0 +1,367 @@ +// +// JL_TwsManager.h +// JL_BLEKit +// +// Created by 凌煊峰 on 2021/12/17. +// Modify by EzioChan on 2023/08/18 +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import +#import +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +//MARK: - 耳机电量 +/// 耳机电量 +/// TWS earphones Electricity +@interface TwsElectricity:NSObject +/// 左耳充电中 +@property(nonatomic,assign) BOOL isChargingLeft; + +/// 右耳充电中 +@property(nonatomic,assign) BOOL isChargingRight; + +/// 充电仓正在充电中 +@property(nonatomic,assign) BOOL isChargingCenter; + +/// 左耳电量 +@property(nonatomic,assign) int powerLeft; + +/// 右耳电量 +@property(nonatomic,assign) int powerRight; + +/// 充电舱电量 +@property(nonatomic,assign) int powerCenter; + +@end + + + +//MARK: - TWS 控制类 +/// TWS 管理者 +@interface JL_TwsManager : JL_FunctionBaseManager + +/// 扩展功能支持 +@property(nonatomic,strong,readonly)JLTwsSupportFuncs *supports; + +///耳机电量 +///TWS earphones Electricity +@property (nonatomic,strong)TwsElectricity *electricity; + +/// 设备名称 +@property (nonatomic,strong)NSString *edrName; + +/// 按键功能设置 +@property (nonatomic,strong)NSArray *keySettings; + +/// 灯光场景类型 +@property (nonatomic,assign)int ledScen; + +/// 灯光效果类型 +@property (nonatomic,assign)int ledEffect; + +/// 设备麦克风channel +/// 若为空或者0则视为此功能不支持 +/// 1:自动切换 +/// 2:始终左耳 +/// 3:始终右耳 +@property (nonatomic,assign)int micMode; + +/// 工作模式 +/// 若为空或者0则视为此功能不支持 +/// 1:普通模式 +/// 2:游戏模式 +@property (nonatomic,assign)int workMode; + +/// 供应商ID +@property (nonatomic,assign)uint16_t vid; + +/// 厂商ID +@property (nonatomic,assign)uint16_t uid; + +/// 产品ID +@property (nonatomic,assign)uint16_t pid; + +/// 连接时长 +@property (nonatomic,assign)uint32_t linkTime; + +/// 入耳检测 +/// 0 -- 不支持此功能 +/// 1 -- 关闭 +/// 2 -- 打开 +@property (nonatomic,assign)uint8_t earEntryDection; + +/// 设备语言类型 +/// zh -- 中文 +/// en -- 英文 +@property (nonatomic,strong)NSString *deviceLanguage; + +///ANC的模式数组 +@property (nonatomic,strong)NSArray *ancModels; + +/// HeadSetInfoDict +/// 耳机信息字典 +/// 当app端收到设备返回的信息时会更新此值 +/// 此值变化较大不适合作为唯一判断依据,容易发生部分值获取失败的问题 +@property (nonatomic,strong)NSDictionary *_Nullable headSetInfoDict; + + +/// 一拖二开关状态 +@property(nonatomic,readonly,assign)BOOL dragWithMore; + + + +/// 设置设备名称 +/// - Parameter name: 设置对耳设备的EDR名字 +-(void)cmdHeadsetEdrName:(NSData*)name; + +#pragma mark ---> 按键设置(对耳) +typedef NS_ENUM(UInt8, JL_HeadsetButtonSettingKey) { + JL_HeadsetButtonSettingKeyOnlyLeftEar = 0x01, //左耳 + JL_HeadsetButtonSettingKeyOnlyRightEar = 0x02, //右耳 +}; +typedef NS_ENUM(UInt8, JL_HeadsetButtonSettingAction) { + JL_HeadsetButtonSettingActionClick = 0x01, //单击 + JL_HeadsetButtonSettingActionDoubleClick = 0x02, //双击 +}; +typedef NS_ENUM(UInt8, JL_HeadsetButtonSettingFunction) { + JL_HeadsetButtonSettingFunctionNone = 0x00, //无作用 + JL_HeadsetButtonSettingFunctionBoot = 0x01, //开机 + JL_HeadsetButtonSettingFunctionTurnOff = 0x02, //关机 + JL_HeadsetButtonSettingFunctionPlayPrevious = 0x03, //上一曲 + JL_HeadsetButtonSettingFunctionPlayNext = 0x04, //下一曲 + JL_HeadsetButtonSettingFunctionPlayOrPause = 0x05, //播放/暂停 + JL_HeadsetButtonSettingFunctionAnswerOrHangup = 0x06, //接听/挂断 + JL_HeadsetButtonSettingFunctionReject = 0x07, //拒听 + JL_HeadsetButtonSettingFunctionTakePhoto = 0x08, //拍照 +}; +/** + @param key 左耳0x01 右耳0x02 + @param act 单击0x01 双击0x02 + @param fuc 0x00 无作用 + 0x01 开机 + 0x02 关机 + 0x03 上一曲 + 0x04 下一曲 + 0x05 播放/暂停 + 0x06 接听/挂断 + 0x07 拒听 + 0x08 拍照 + */ +-(void)cmdHeadsetKeySettingKey:(uint8_t)key + Action:(uint8_t)act + Function:(uint8_t)fuc; + +#pragma mark ---> LED设置(对耳) + +typedef NS_ENUM(UInt8, JL_HeadsetScene) { + JL_HeadsetSceneNotPaired = 0x01, //未配对 + JL_HeadsetSceneDisConnected = 0x02, //未连接 + JL_HeadsetSceneConnected = 0x03, //已连接 + JL_HeadsetScenePlayDeviceMusic = 0x04, //播放设备音乐 + JL_HeadsetScenePauseDeviceMusic = 0x05, //暂停设备音乐 + JL_HeadsetScenePlayExternalAudioSource = 0x06, //外部音源播放 + JL_HeadsetScenePauseExternalAudioSource = 0x07, //外部音源暂停 +}; +typedef NS_ENUM(UInt8, JL_HeadsetLedEffect) { + JL_HeadsetLedEffectAllClose = 0x00, //全灭 + JL_HeadsetLedEffectRedLightOn = 0x01, //红灯常亮 + JL_HeadsetLedEffectBlueLightOn = 0x02, //蓝灯常亮 + JL_HeadsetLedEffectRedLightBreathing = 0x03, //红灯呼吸 + JL_HeadsetLedEffectBlueLightBreathing = 0x04, //蓝灯呼吸 + JL_HeadsetLedEffectRedBlueLightQuickFlash = 0x05, //红蓝交替快闪 + JL_HeadsetLedEffectRedBlueLightSlowFlash = 0x06, //红蓝交替慢闪 +}; +/** + @param scene 0x01 未配对 + 0x02 未连接 + 0x03 连接 + 0x04: 播放设备音乐 + 0x05:暂停设备音乐 + 0x06:外部音源播放 + 0x07:外部音源暂停 + @param effect 0x00 全灭 + 0x01 红灯常亮 + 0x02 蓝灯常亮 + 0x03 红灯呼吸 + 0x04 蓝灯呼吸 + 0x05 红蓝交替快闪 + 0x06 红蓝交替慢闪 + */ +-(void)cmdHeadsetLedSettingScene:(uint8_t)scene + Effect:(uint8_t)effect; + +#pragma mark ---> MIC设置(耳机) +typedef NS_ENUM(UInt8, JL_HeadsetMicSettingMode) { + JL_HeadsetMicSettingModeOnlyLeftEar = 0x00, //仅左耳 + JL_HeadsetMicSettingModeOnlyRightEar = 0x01, //仅右耳 + JL_HeadsetMicSettingModeAutomatic = 0x02, //自动选择 +}; +/** + @param mode JL_HeadsetMicSettingMode + */ +-(void)cmdHeadsetMicSettingMode:(JL_HeadsetMicSettingMode)mode + Result:(JL_CMD_RESPOND __nullable)result; + +#pragma mark ---> 工作模式(耳机) +typedef NS_ENUM(UInt8, JL_HeadsetWorkingMode) { + JL_HeadsetWorkingModeNormal = 0x01, //普通模式 + JL_HeadsetWorkingModeGame = 0x02, //游戏模式 +}; +/** + @param mode 1: 普通模式 + 2: 游戏模式 + */ +-(void)cmdHeadsetWorkSettingMode:(uint8_t)mode; + +#pragma mark ---> 同步时间戳(耳机) +/** + @param date 当前系统时间 +*/ +-(void)cmdHeadsetTimeSetting:(NSDate*)date; + +#pragma mark ---> 获取设备信息(耳机) +typedef void(^JL_HEADSET_BK)(NSDictionary* __nullable dict); +typedef NS_ENUM(uint32_t, JL_HeadsetAdviceFlag) { + JL_HeadsetAdviceFlagGetElectricity = 1, //小机电量获取 + JL_HeadsetAdviceFlagEdrName = 1 << 1, //Edr名称 + JL_HeadsetAdviceFlagButtonFunction = 1 << 2, //按键功能 + JL_HeadsetAdviceFlagLedStatus = 1 << 3, //LED显示状态 + JL_HeadsetAdviceFlagMicMode = 1 << 4, //MIC模式 + JL_HeadsetAdviceFlagWorkMode = 1 << 5, //工作模式 + JL_HeadsetAdviceFlagProductInfo = 1 << 6, //产品信息 + JL_HeadsetAdviceFlagConnectingTime = 1 << 7, //连接时间 + JL_HeadsetAdviceFlagEarDetection = 1 << 8, //入耳检测 + JL_HeadsetAdviceFlagLanguage = 1 << 9, //语言类型 + JL_HeadsetAdviceFlagAll = 0xFFFFFFFF //全部 +}; +/** + @param flag BIT0 小机电量获取 格式为3个字节 参考广播包格式 + BIT1 Edr 名称 + BIT2 按键功能 + BIT3 LED 显示状态 + BIT4 MIC 模式 + BIT5 工作模式 + BIT6 产品信息 + BIT7 连接时间 + BIT8 入耳检测 + BIT9 语言类型 + @param result 返回字典: + @"ISCHARGING_L" + @"ISCHARGING_R" + @"ISCHARGING_C" + @"POWER_L" + @"POWER_R" + @"POWER_C" + @"EDR_NAME" + @"KEY_LR" + @"KEY_ACTION" + @"KEY_FUNCTION" + @"LED_SCENE" + @"LED_EFFECT" + @"MIC_MODE" + @"WORK_MODE" + @"UID" + @"UID" + @"PID" + @"LINK_TIME" + @""IN_EAR_TEST" + @"DEVICE_LANGUAGE" + @"KEY_ANC_MODE" ANC的模式数组 + */ +-(void)cmdHeadsetGetAdvFlag:(JL_HeadsetAdviceFlag)flag + Result:(JL_HEADSET_BK __nullable)result; + +#pragma mark ---> 设备广播通知(耳机) +/** + @{@"JLID": 杰理ID, + @"UID": , + @"PID": , + @"EDR": , + @"SCENE": , + @"ISCHARGING_L": , + @"ISCHARGING_R": , + @"ISCHARGING_C": , + @"POWER_L": , + @"POWER_R": , + @"POWER_C": , + @"CHIP_TYPE": , + @"PROTOCOL_TYPE": , + @"SEQ":}; + */ +extern NSString *kJL_MANAGER_HEADSET_ADV; + +#pragma mark ---> 设置命令成功/错误回复(耳机) +/** + 0x00:成功 + 0x01:游戏模式导致设置失效 + 0x02:蓝牙名字长度超出限制 + 0x03:非蓝牙模式设置闪灯失败 + */ +extern NSString *kJL_MANAGER_HEADSET_SET_ERR; + +#pragma mark ---> 关闭或开启设备广播(耳机) +/** + @param enable 使能位 + */ +-(void)cmdHeadsetAdvEnable:(BOOL)enable; + +#pragma mark ---> 用于ADV设置同步后需要主机操作的行为。 +/** + 1:更新配置信息,需要重启生效。 + 2:同步时间戳 + 3:请求手机回连BLE + 4:同步设备信息 + */ +extern NSString *kJL_MANAGER_HEADSET_TIPS; + +#pragma mark ---> 发射频点 +/** +@param fmtx 频点 +*/ +-(void)cmdSetFMTX:(uint16_t)fmtx; + +#pragma mark ---> 设置耳机ANC模式列表 +/** + * 设置耳机ANC模式列表 + * @param array 频点 JL_AncMode的NSNumber对象数组 @[@(JL_AncMode_Normal), @(JL_AncMode_NoiseReduction)] + */ +-(void)cmdHeadsetAncArray:(NSArray*)array; + +#pragma mark ---> 耳机主动降噪ANC设置 +-(void)cmdSetANC:(JLModel_ANC*)model; + + + +//MARK: - 一拖二相关命令 + +typedef void(^JL_MulitLinksInfo_BK)(JL_CMDStatus status,NSArray * __nullable phoneInfos); + +/// 设备上传一拖二设备信息列表 +extern NSString* kJL_MULIT_NAME_LIST; + +/// 获取设备已连接手机名 +/// 通知设备上传一拖二设备信息列表 +/// @param result 设备所连接的手机名字列表 +-(void)cmdGetDeviceInfoListResult:(JL_MulitLinksInfo_BK)result; + +/// 通知设备一连上手机地址和绑定信息 +/// - Parameters: +/// - addr: 手机EDR地址 +/// - name: 手机蓝牙名称 +/// - result: 结果 +-(void)cmdBindDeviceInfo:(NSData *)addr phone:(NSString *)name result:(JL_MulitLinksInfo_BK)result; + +/// 一拖二开关 +/// @param dragWithMore 开关状态 +/// @param addr 手机的经典蓝牙地址(通过cmdGetDeviceInfoList 获取) +/// @param result 结果回调 +-(void)setDragWithMore:(BOOL)dragWithMore phoneBleAddr:(NSData *) addr result:(JL_CMD_RESPOND)result; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_TypeEnum.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_TypeEnum.h new file mode 100644 index 000000000..c231c9177 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_TypeEnum.h @@ -0,0 +1,83 @@ +// +// JL_TypeEnum.h +// JL_BLEKit +// +// Created by DFung on 2018/11/29. +// Copyright © 2018 www.zh-jieli.com. All rights reserved. +// + +#import +#import + +typedef NS_ENUM(NSInteger, JL_BLEStatus) { + JL_BLEStatusFound, //发现设备,对应 kUI_JL_BLE_FOUND + JL_BLEStatusPaired, //已配对, 对应 kUI_JL_BLE_PAIRED + JL_BLEStatusDisconnected, //断开连接,对应 kUI_JL_BLE_DISCONNECTED + JL_BLEStatusOn, //蓝牙开启,对应 kUI_JL_BLE_ON + JL_BLEStatusOff, //蓝牙关闭,对应 kUI_JL_BLE_OFF + JL_BLEStatusUnknown, //状态未知 +}; +typedef NS_ENUM(NSInteger, JL_DeviceBTStatus) { + JL_DeviceBTStatusDisconnected = 0, //设备经典蓝牙已断开 + JL_DeviceBTStatusConnected = 1, //设备经典蓝牙已连接 + JL_DeviceBTStatusUnknown, +}; +typedef NS_ENUM(UInt8, JL_CMDStatus) { + JL_CMDStatusSuccess = 0x00, //成功 + JL_CMDStatusFail = 0x01, //失败 + JL_CMDStatusUnknownCmd = 0x02, //未定义命令 + JL_CMDStatusBusy = 0x03, //忙碌 + JL_CMDStatusNoResponse = 0x04, //没有收到回复 + JL_CMDStatusCrcErr = 0x05, //CRC错误 + JL_CMDStatusDataCrcErr = 0x06, //数据CRC错误 + JL_CMDStatusParamErr = 0x07, //参数错误 + JL_CMDStatusOverLimit = 0x08, //数据溢出 + JL_CMDStatusLrcError = 0x09, //LRC获取出错 + JL_CMDStatusUnknown, +}; +typedef void(^JL_CMD_RESPOND)(JL_CMDStatus status, uint8_t sn, NSData* __nullable data); + +//---------------------------------------------------------// + +typedef NS_ENUM(UInt8,JLDevSpecialType) { + ///普通正常设备 + JLDevSpecialType_Normal = 0x00, + ///回连设备 + JLDevSpecialType_Reconnect = 0x01, +}; + +typedef NS_ENUM(int64_t,JL_CLASS) { + JL_CLASS_SmallFile = 0, + JL_CLASS_File = 1, + JL_CLASS_OTA = 2, + JL_CLASS_Flash = 3, + JL_CLASS_ChargingBin = 4, + JL_CLASS_AlarmClock = 5, + JL_CLASS_Light = 6, + JL_CLASS_Tws = 7, + JL_CLASS_SoundCard = 8, + JL_CLASS_Call = 9, + JL_CLASS_Speex = 10, + JL_CLASS_Lrc = 11, + JL_CLASS_FindDevice = 12, + JL_CLASS_MusicControl = 13, + JL_CLASS_Fm = 14, + JL_CLASS_SystemEQ = 15, + JL_CLASS_SystemTime = 16, + JL_CLASS_SystemVolume = 17, + JL_CLASS_Custom = 18, + JL_CLASS_Batch = 19, + JL_CLASS_DeviceLogs = 20, + JL_CLASS_BigData = 21, +}; + +//---------------------------------------------------------// + + +///命令发起者 +typedef NS_ENUM(UInt8, JLCMDOriginator) { + ///SDK端发起 + JLCMDOriginatorApp = 0x00, + ///设备端发起 + JLCMDOriginatorDevice = 0x01 +}; diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_WatchProtocol.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_WatchProtocol.h new file mode 100644 index 000000000..7dec3d76b --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_WatchProtocol.h @@ -0,0 +1,126 @@ +// +// JL_WatchProtocolDelegate.h +// JL_BLEKit +// +// Created by EzioChan on 2021/8/11. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import +#import "JL_SDM_Header.h" + + +NS_ASSUME_NONNULL_BEGIN + +@protocol JL_WatchProtocol + +@optional +/// 设备回调心率相关内容 +/// @param heartRate 心率对象 +-(void)jlWatchHeartRate:(JL_SDM_HeartRate *)heartRate; + +/// 设备回调大气压强相关内容 +/// @param airPressure 气压对象 +-(void)jlWatchAirPressure:(JL_SDM_AirPressure *)airPressure; + +/// 设备回调海拔高度相关内容 +/// @param alititude 海拔对象 +-(void)jlWatchAltitude:(JL_SDM_Altitude *)alititude; + +/// 设备回调步数相关内容 +/// @param moveStep 步数对象 +-(void)jlWatchMoveSteps:(JL_SDM_MoveSteps *)moveStep; + +/// 设备回调压力相关内容 +/// @param stress 压力对象 +-(void)jlWatchStress:(JL_SDM_Stress *)stress; + +/// 设备回调血氧饱和度相关内容 +/// @param oxStaturation 血氧饱和度对象 +-(void)jlWatchOxsaturation:(JL_SDM_OxSaturation*)oxStaturation; + +/// 设备回调训练负荷相关内容 +/// @param trainLoad 训练负荷对象 +-(void)jlWatchTrainLoad:(JL_SDM_TrainLoad *)trainLoad; + +/// 设备回调最大摄氧量相关内容 +/// @param maxOxg 最大摄氧量对象 +-(void)jlWatchMaxOxg:(JL_SDM_MaxOxg *)maxOxg; + +/// 设备回调运动恢复时间相关内容 +/// @param rectime 运动恢复时间对象 +-(void)jlWatchRecTime:(JL_SDM_RecTime *)rectime; + +/// 设备回调运动数据的相关内容 +/// @param sportMsg 运动数据对象 +-(void)jlWatchSportMessage:(JL_SDM_SportMessage *)sportMsg; + + +/// 设备回调无法区分的数据内容 +/// @param value 数据区域,根据类型解析数据 +/// @param submask 对应查询的参数,描述功能类型,作用域 +/// @param type 数据类型 +-(void)jlWatchUnDefineData:(NSData *)value subMask:(NSData *)submask Type:(UInt8)type; + +/// 设备回调传感器相关数据 +/// @param type 数据类型 +/// @param data 数据内容 +-(void)jlWatchWatchLog:(JL_WATCH_LOG_TYPE) type with:(NSData *)data; + +//MARK: - 健康设置回调 + +/// 接收整个设置返回的数组 +/// @param models JLwSettingModels +-(void)jlWatchSetAllFunc:(NSArray *)models; + +/// 回调传感器相关设置 +/// @param model 传感器功能 +-(void)jlWatchSetSensorFunc:(JLSensorFuncModel *)model; + +/// 久坐提醒 +/// @param model 久坐提醒功能 +-(void)jlWatchSetSedentaryRmd:(JLSedentaryRmdModel *)model; + +/// 心率测量功能 +/// @param model 心率模块 +-(void)jlWatchSetConsequentHeartRate:(JLConsequentHeartRateModel *)model; + +/// 运动心率测试功能 +/// @param model 运动心率 +-(void)jlWatchSetExerciseHeartRateRemind:(JLExerciseHeartRateRemindModel *)model; + +/// 自动压力测试 +/// @param model 压力测试 +-(void)jlWatchSetAutoPressure:(JLAutoPressureModel *)model; + +/// 睡眠监测 +/// @param model 睡眠 +-(void)jlWatchSetSleepMonitor:(JLSleepMonitorModel *)model; + +/// 跌到监测 +/// @param model 跌倒监测 +-(void)jlWatchSetFallDetectionModel:(JLFallDetectionModel *)model; + +/// 抬腕监测 +/// @param model 抬腕监测 +-(void)jlWatchSetWristLiftDetectionModel:(JLWristLiftDetectionModel *)model; + +/// 个人信息 +/// @param model 个人信息 +-(void)jlWatchSetPersonInfoModel:(JLPersonInfoModel *)model; + +/// 蓝牙断开设置 +/// @param model 断开设置 +-(void)jlWatchSetDisconnectRemindModel:(JLDisconnectRemindModel *)model; + +/// 紧急联系人 +/// @param model 紧急联系人设置 +-(void)jlWatchSetEmergencyContactModel:(JLEmergencyContactModel *)model; + +/// 血氧测量 +/// @param model 血氧测量模式 +-(void)jlWatchSetOxygenSturationRemindModel:(JLOxygenSturationRemindModel *)model; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_WatchSyncProtocol.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_WatchSyncProtocol.h new file mode 100644 index 000000000..132a29179 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_WatchSyncProtocol.h @@ -0,0 +1,47 @@ +// +// JL_WatchSyncProtocol.h +// JL_BLEKit +// +// Created by EzioChan on 2021/10/27. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// +#import +#import "JL_SDM_Header.h" +#import "JL_EntityM.h" + +#ifndef JL_WatchSyncProtocol_h +#define JL_WatchSyncProtocol_h + +@protocol JLWearSyncProtocol + +@optional +/// 运动信息返回 +/// @param model 运动信息对象 +/// @param entity 设备entity +-(void)jlWearSyncSportInfo:(JLWearSyncInfoModel *_Nonnull)model With:(JL_EntityM *_Nonnull)entity; + +/// 结束运动返回内容 +/// @param model 结束时间相隔信息对象 +/// @param entity 设备entity +-(void)jlWearSyncStopMotion:(JLWearSyncFinishModel *_Nonnull)model With:(JL_EntityM *_Nonnull)entity; + +/// 开始运动返回消息 +/// @param entity 设备entity +-(void)jlWearSyncStartMotionWith:(JL_EntityM *_Nonnull)entity; + +/// 暂停运动 +/// @param entity 设备entity +-(void)jlWearSyncStatusPauseWith:(JL_EntityM *_Nonnull)entity; + +/// 继续运动 +/// @param entity 设备entity +-(void)jlWearSyncStatusContiuneWith:(JL_EntityM *_Nonnull)entity; + +/// 实时数据回调 +/// @param model 实时数据模型 +/// @param entity 设备entity +-(void)jlWearSyncRealTimeData:(JLWearSyncRealTimeModel *_Nonnull)model With:(JL_EntityM *_Nonnull)entity; + +@end + +#endif /* JL_WatchSyncProtocol_h */ diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_vad.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_vad.h new file mode 100644 index 000000000..9b8719250 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JL_vad.h @@ -0,0 +1,144 @@ +// +// JL_vad.h +// Test +// +// Created by DFung on 2018/2/28. +// Copyright © 2018年 DFung. All rights reserved. +// + +#ifndef JL_vad_h +#define JL_vad_h + + + +#define CONT_AD_ADFRMSIZE 16 +#define DEFAULT_RADIX 12 +#define SMOOTH_WINDOW 4 +#define MIN_FIXLOG -2829416 +#define KWSNUM 1 //¥˝ ∂±¥ ∏ˆ ˝ + + +//typedef long long __int64; +typedef int int32; +typedef short int16; +typedef signed char int8; +typedef unsigned int uint32; +typedef unsigned short uint16; +typedef unsigned char uint8; +typedef long long int64; +typedef int32 fixed32; +typedef float float32; + + + + +struct noise_stats_s { + /* Smoothed power */ + int power[40]; + int max_power[40]; + /* Noise estimate */ + int noise[40]; + int max_noise[40]; + /* Signal floor estimate */ + int floor[40]; + int max_floor[40]; + /* Peak for temporal masking */ + int peak[40]; + int max_peak[40]; + + int signal[40]; + int gain[40]; + char remove_noi; + /* Initialize it next time */ + uint8 undefined; + /* Number of items to process */ + uint32 num_filters; + + /* Sum of slow peaks for VAD */ + int64 slow_peak_sum; + int64 max_slow_peak_sum; + + /* Precomputed constants */ + int lambda_power; + int comp_lambda_power; + int lambda_a; + int comp_lambda_a; + int lambda_b; + int comp_lambda_b; + int lambda_t; + int mu_t; + int max_gain; + int inv_max_gain; + + int smooth_scaling[2 * 4 + 3]; +}; +typedef struct noise_stats_s noise_stats_t; +struct htk_fe_s +{ + unsigned short pow_hist[98]; + noise_stats_t *noise_stats; + + + int fe_prior; + uint32 int_frame; + char int_flag; + + + unsigned char sum_cnt; + + uint8 voice_state; + uint8 in_speech; + int16 pre_speech_frames; + int16 post_speech_frames; + + int16 inout_spch[410]; + int fe_tmp_spch[250]; + int fe_fft_buf[512]; + int fe_mfspec[40]; + int cmn_sum[13]; + int mfcc_fifo[9][13]; + int *cmn_mfcc_fifo[9]; + //int fe_prior; + char speech_fifo[16]; + char init_speech_n; + char vad_cnt; + int buf_cep[21][13]; + int buf_pow[21]; + uint8 speech_indexw; + uint8 speech_indexr; + uint8 speech_cnt; + + + int16 sp_threshold; + int16 nsp_threshold; +}; + +typedef struct htk_fe_s htk_fe_t; +/* + * How to use? See follow... + * + * 1、开启录音前: + * /--- 开启Vad ---/ + * int need_buf_size = vad_get_need_buf_size(); + * vad_hdl = malloc(need_buf_size); + * vad_init(vad_hdl, 10, 51); + * + * 2、结束录音后: + * /--- 关闭Vad ---/ + * free(vad_hdl); + * + * 3、录音数据回调: + * buf:录音数据 ,需要320Bytes! + * ret:0->静音状态 1->正在说话 2->结束说话 + * int ret = vad_main(vad_hdl, (int*)buf); + */ +int vad_get_need_buf_size(void); +int vad_init(void *p, short sp_threshold, short nsp_threshold); +int vad_main(void *p,int *inout_spch); + +fixed32 fe_log_add(fixed32 x, fixed32 y); +fixed32 fe_log_sub(fixed32 x, fixed32 y); +int32 fixlog2(uint32 x); +int fixlog(uint32 x); + +#endif /* JL_vad_h */ diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLeSimManager.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLeSimManager.h new file mode 100644 index 000000000..0d1f4e10d --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLeSimManager.h @@ -0,0 +1,41 @@ +// +// JLeSimManager.h +// JL_BLEKit +// +// Created by EzioChan on 2023/12/4. +// Copyright © 2023 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@class JL_ManagerM; + +@protocol JLEsimFinishDelegate + +/// 设备推送esim 信息内容 +/// - Parameters: +/// - version: 版本 +/// - data: 内容 +-(void)jlEsimDidGetData:(uint8_t)version ESimData:(NSData *)data; + +@end + +typedef void(^JLESimFinishBlock)(NSError * _Nullable err); + +/// esim 信息交互类 +@interface JLeSimManager : NSObject + +@property(nonatomic,assign)id delegate; + +/// 下发 esim 信息到设备 +/// - Parameters: +/// - mgr: 设备 +/// - data: esim 信息 +/// - block: 完成回调 +-(void)sendToDev:(JL_ManagerM *)mgr Data:(NSData *)data Result:(JLESimFinishBlock)block; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLwSettingModel.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLwSettingModel.h new file mode 100644 index 000000000..17be0dc71 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/JLwSettingModel.h @@ -0,0 +1,104 @@ +// +// LtvSettingModel.h +// JL_BLEKit +// +// Created by EzioChan on 2021/10/12. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import + + +typedef NS_ENUM(UInt8, WatchSettingFunc) { + ///传感器功能 + WatchSettingFunc_SensorFunction = 0x01 , + ///久坐提醒 + WatchSettingFunc_SedentaryReminder = 0x02, + ///连续测量心率 + WatchSettingFunc_ContinuousHeartRateMeasurement = 0x03, + ///运动心率提醒 + WatchSettingFunc_ExerciseHeartRateReminder = 0x04, + ///压力自动检测 + WatchSettingFunc_AutomaticPressureDetection = 0x05, + ///睡眠检测 + WatchSettingFunc_SleepMonitoring = 0x06, + ///跌倒检测 + WatchSettingFunc_FallDetection = 0x07, + ///抬腕检测 + WatchSettingFunc_WristLiftDetection = 0x08, + ///个人信息 + WatchSettingFunc_PersonInfo = 0x09, + /// 蓝牙断开提醒 + WatchSettingFunc_DisconnectReminder = 0xA, + /// 血氧测量提醒 + WatchSettingFunc_OxygenSturation = 0x0B, + /// 紧急联系人 + WatchSettingFunc_EmergencyContact = 0x0C +}; + +///提醒模式 +typedef NS_ENUM(UInt8, WatchRemindType) { + /// 亮屏 + WatchRemind_BrightScreen = 0x00, + ///震动 + WatchRemind_Shake = 0x01, + /// 打电话(抬腕不支持该提示) + WatchRemind_Call = 0x02 +}; + +///连续测量心率模式 +typedef NS_ENUM(UInt8, WatchConsequentType) { + //智能 + WatchConsequent_Intelligent = 0x00, + //实时 + WatchConsequent_realTime = 0x01 +}; + +/// 连续血氧测量模式 +typedef NS_ENUM(UInt8,WatchOxygenMsmType){ + //智能 + WatchOxygenMsm_Intelligent = 0x00, + //定时 + WatchOxygenMsm_runTime = 0x01 +}; + +///监察开关类型 +typedef NS_ENUM(UInt8, WatchSwitchType) { + ///关闭 + WatchSwitchType_Close = 0x00, + ///全天开启 + WatchSwitchType_AllDay = 0x01, + ///自定义时间 + WatchSwitchType_Customer = 0x02, +}; + +@interface WatchTimer : NSObject +/// 时 +@property(nonatomic,assign,readonly)UInt8 hour; +/// 分 +@property(nonatomic,assign,readonly)UInt8 min; + +-(instancetype _Nonnull)initWithData:(NSData *_Nonnull)data; + +-(instancetype _Nonnull)initWith:(uint8_t)h Min:(uint8_t)m; + +@end + +NS_ASSUME_NONNULL_BEGIN + +@interface JLwSettingModel : NSObject +@property(nonatomic,assign)uint8_t length; +@property(nonatomic,assign)WatchSettingFunc type; +@property(nonatomic,strong)NSData *value; + +/// 设备UUID +@property(nonatomic,strong)NSString *deviceID; + + +-(NSData *)beData; + + + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/NSData+ToUnit.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/NSData+ToUnit.h new file mode 100644 index 000000000..ec6140e85 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/NSData+ToUnit.h @@ -0,0 +1,64 @@ +// +// NSData+ToUnit.h +// JL_BLEKit +// +// Created by EzioChan on 2021/4/7. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface NSData (ToUnit) + + +-(BOOL)beBool; + +-(uint8_t)beUint8; + +-(UInt16)beLittleUint16; + +-(UInt16)beBigendUint16; + +-(UInt32)beLittleUint32; + +-(UInt32)beBigendUint32; + +-(UInt64)beLittleUint64; + +-(UInt64)beBigendUint64; + +-(NSString *)dataToAltitude; + +-(NSString *)beHexStr; + +-(NSDate *)toDate; + +/// 裁剪Data +/// @param from 开始 +/// @param to 长度 +-(NSData *)subf:(NSInteger)from t:(NSInteger)to; + +-(uint16_t)crc:(uint16_t)baseCrc; + +@end + + +@interface NSMutableData(WithUnit) + +-(void)appendUint8:(uint8_t)k; + +-(void)appendUint16:(uint16_t)k; + +-(void)appendUint32:(uint32_t)k; +@end + + +@interface NSString(WithUnit) + +-(NSString *)formatLog; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/NSObject+JLTools.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/NSObject+JLTools.h new file mode 100644 index 000000000..68deb4ed1 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/NSObject+JLTools.h @@ -0,0 +1,20 @@ +// +// NSObject+JLTools.h +// JL_BLEKit +// +// Created by EzioChan on 2023/8/17. +// Copyright © 2023 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface NSObject (JLTools) + + +- (NSString *) logProperties; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/NfcModel.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/NfcModel.h new file mode 100644 index 000000000..eee6a69fc --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/NfcModel.h @@ -0,0 +1,69 @@ +// +// NfcModel.h +// JL_BLEKit +// +// Created by EzioChan on 2021/8/3. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + + +@interface NfcModel : NSObject + +/// NFC标签 +@property(nonatomic,assign)UInt16 idCard; + +/// 保留位 +@property(nonatomic,strong)NSData *reserver; + +/// 设备索引 +@property(nonatomic,strong)NSData *devHandler; + +/// 更新时间戳,用于排序 +@property(nonatomic,strong)NSDate *updateTime; + +/// nfc数据文件名,格式如下:XX.nfc,XX是0~9 +@property(nonatomic,strong)NSString *nfcFileName; + +/// 别名,最大字符长度为26, 不足部分补‘\0’ 编码格式:UTF-8(以后可以保留位决定) 例如:公司门禁卡,家里门禁等等 +@property(nonatomic,strong)NSString *nickName; + +/// 可变字段长度,包含crc + nfc_id +@property(nonatomic,assign)UInt16 variableLength; + +/// NFC 数据的CRC +@property(nonatomic,strong)NSData *crc; + +/// nfc数据的唯一值 +@property(nonatomic,strong)NSData *nfc_id; + + ++(NfcModel *)initMsgModel:(NSData *)data; + +/// 解析NFC头部数据 +/// @param basicData 裸数据 ++(NSArray *)initMSGModels:(NSData *)basicData; + +@end + +NS_ASSUME_NONNULL_END + + + + + +@interface NfcFileModel : NfcModel + +/// NFC 数据 +@property(nonatomic,strong)NSData * _Nonnull nfcData; +@property(nonatomic,assign,readonly)UInt32 length; ++(NfcFileModel *_Nonnull)initFileModel:(NSData *_Nonnull)data; + +@end + + + + diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/RTC_RingInfo.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/RTC_RingInfo.h new file mode 100644 index 000000000..f995c1a9e --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Headers/RTC_RingInfo.h @@ -0,0 +1,39 @@ +// +// RTC_RingInfo.h +// JL_BLEKit +// +// Created by 杰理科技 on 2021/10/15. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +/// 闹铃信息 +@interface RTC_RingInfo : NSObject + +/// 铃声类型 +/// 0x00 设备默认 +/// 0x01 多媒体选取 +@property (assign,nonatomic) uint8_t type; + +/// 设备索引 +/// 当type = 0时,dev保留 +/// 当type = 1时,dev为选取的设备 +@property (assign,nonatomic) uint8_t dev; + +/// 闹铃文件簇号 +/// 当type = 0时,clust 为对应 JLModel_Ring 的 index +/// 当type = 1时,clust为选取的闹铃文件簇号 +@property (assign,nonatomic) uint32_t clust; + +/// 铃声名称长度 +@property (assign,nonatomic) uint8_t len; + +/// 铃声名称 +@property (strong,nonatomic) NSData *data; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Info.plist b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Info.plist new file mode 100644 index 000000000..5d4c381d3 Binary files /dev/null and b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Info.plist differ diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/JL_BLEKit b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/JL_BLEKit new file mode 100755 index 000000000..02cceaeb5 Binary files /dev/null and b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/JL_BLEKit differ diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Modules/module.modulemap b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Modules/module.modulemap new file mode 100644 index 000000000..ee22d27e6 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/Modules/module.modulemap @@ -0,0 +1,6 @@ +framework module JL_BLEKit { + umbrella header "JL_BLEKit.h" + export * + + module * { export * } +} diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/_CodeSignature/CodeResources b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/_CodeSignature/CodeResources new file mode 100644 index 000000000..63971ab00 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_BLEKit.xcframework/ios-arm64_x86_64-simulator/JL_BLEKit.framework/_CodeSignature/CodeResources @@ -0,0 +1,2202 @@ + + + + + files + + Headers/ECBDTManager.h + + /K1fGzPuVURBNDEkYVRubgV3IOE= + + Headers/ECBDTObjc.h + + PLzO7DWyRyICPwEHPNf+MJ7XHBI= + + Headers/ECOneToMorePtl.h + + jdYvasKZkc3HBxsZKt3Gh336J8I= + + Headers/ECThreadHelper.h + + kS2jpYaJSrE4PLOItONs24hnhaI= + + Headers/JL4GUpgradeManager.h + + 8nEg6KuaGKY/nU5LG5st3WNp7wo= + + Headers/JLAIDialManager.h + + doT0jl94QXsR5Oj3+3xuYBj7XAY= + + Headers/JLAiManager.h + + 7i5AqDNBgxp21oOJg6dP0Oa5rzo= + + Headers/JLAuracastDevStateModel.h + + SLMa70GzYRgN/9cov657yI4i50M= + + Headers/JLAuracastLancerManager.h + + hU0z7Jgz01nroGmTfj+iEWg113s= + + Headers/JLAuracastLancerSettingMode.h + + Oq/Gnx/o9pbWIjwwUzS1jEPaeLs= + + Headers/JLAuracastManager.h + + 8e6dZRcWFZ15Ig94A7WkDKnY6QE= + + Headers/JLAutoConfigAnc.h + + bzNmru2o+dvhnNRh/6iSWk2RzoU= + + Headers/JLAutoPressureModel.h + + Zi7C6uYi1W4SzDCcXLaf36whP3M= + + Headers/JLBroadcastDataModel.h + + HG1TAdf4gsYhNlmcQKNpKVyO308= + + Headers/JLCmdBasic.h + + u/3MF/n2x3jZOLeb6LfQTODUMuk= + + Headers/JLConsequentHeartRateModel.h + + zDNyJtT4IsaaIDEFLgrZuarEA50= + + Headers/JLDevAudioAIttsHandler.h + + G7pQ5MrpdKqnSMU6sIV5+Up5Uhg= + + Headers/JLDevAudioManager.h + + 57TE8bTSFYj5BViYfFOHinpgtus= + + Headers/JLDevPlayerCtrl.h + + Y0lxOpFVxI9K8HSgcB4qgG7wo+A= + + Headers/JLDeviceConfig.h + + 72l+C9Lov4yVCO1YeFoBsJtkH1Y= + + Headers/JLDeviceConfigDongle.h + + MdkPOH8uBFR627IOyWz08hQ5dRw= + + Headers/JLDeviceConfigFuncModel.h + + 0zauZVFjfVWbvYuiEY3rPznmg0Y= + + Headers/JLDeviceConfigSoundBox.h + + dIcm86szFWtHdxDqhZWZQAGXdvg= + + Headers/JLDeviceConfigTws.h + + ypa+GNoYcjD3xYh/A/vsL8vEoVc= + + Headers/JLDhaFitting.h + + N0LW3A6XoLmONIFcEk/M0kIEL70= + + Headers/JLDialInfoExtentManager.h + + 8BOSFHw+AW/j2DuhwXyVKUBL54s= + + Headers/JLDialInfoExtentedModel.h + + u05R1xDr/Goqgu1SLpflf0Okryc= + + Headers/JLDisconnectRemindModel.h + + gJdYeRaPB5xgbo5qZimkvHDRJgo= + + Headers/JLEcTimerHelper.h + + TcLs2ys3PCLPeAxfmbrwGOq/fd4= + + Headers/JLEmergencyContactModel.h + + Cqu3yqWTTtcfPop5l4AQQY7fSmk= + + Headers/JLExerciseHeartRateRemindModel.h + + 69qKI39OqTHCkwDNFZUyBv507qk= + + Headers/JLFallDetectionModel.h + + AhNiPEWSjbmL4UzfcEPRJsLHIlA= + + Headers/JLFlashOpMgr.h + + dgXE3RsDYY5sH8ixKLn9y2dZ/jI= + + Headers/JLHttpHelper.h + + jjC8gsI1TXut5f4lkIPDqw3qzJw= + + Headers/JLModelCardInfo.h + + 6+vDn6HM1UUNx1OsvLE9cFXdf7I= + + Headers/JLModelDevFunc.h + + Nc0COyjuycHz2mMpWD0+oERainE= + + Headers/JLModelNoiseDetection.h + + YYHB0VoKToHS2kHiUSpOgxNWuQk= + + Headers/JLModelPCServer.h + + Fax9Paiky8kcVRqnh6t2HBB+wP8= + + Headers/JLModelSceneNoiseReduction.h + + pAPi7IqB+jDZAuTE54KlAoOZzIM= + + Headers/JLModelSmartPickFree.h + + 8oBHUqGTP/WAdtsuTFPdd9yykmo= + + Headers/JLModelSpdif.h + + O4GVFCaiEyYlUYIeI1XtgzCsz+U= + + Headers/JLModelVocalBoost.h + + It2EYFwMdW7dOvbFAjjAw48QoNY= + + Headers/JLModel_ANC.h + + LLdGRTZFENdwbONYs9fUb0IrvbU= + + Headers/JLModel_AlarmSetting.h + + vBLw0ClfK26fIou6fgMhjf+03f4= + + Headers/JLModel_BT.h + + tyLNvtZ+s98h37qGTk3YE5yHy0c= + + Headers/JLModel_Device.h + + fVXu6DR6WX1j56LdPYGPLCFDdKo= + + Headers/JLModel_EQ.h + + YNrVDiv5jIKKI69MFapRNX0J+vs= + + Headers/JLModel_FM.h + + zvphPHSPoyAvW1P28pN6+fhte+0= + + Headers/JLModel_File.h + + 5m4sJ45ySIdu0iCNNIyoas8FIes= + + Headers/JLModel_Flash.h + + hs4fTAyq4VrP5E75/Eu5V6emlGE= + + Headers/JLModel_Headset.h + + V+FSzltianAC6K4Pr04KhCZzq48= + + Headers/JLModel_RTC.h + + VBz/S6zkxJsnHc1Y6FY5Z4N4HyY= + + Headers/JLModel_Ring.h + + WtmNtcTFe5OWPNwoHPF0MoeXeHk= + + Headers/JLModel_SPEEX.h + + WRsFCCEdcNz0dy7S1QWxnzuGFR8= + + Headers/JLModel_SmallFile.h + + RBJXmE82+tfllfTlLykjkDYIUzA= + + Headers/JLOxygenSturationRemindModel.h + + G0eBxtfxmd5doXMJEZkCooDUeSs= + + Headers/JLPersonInfoModel.h + + 5rS7/fBZGnArkVzBAb3cBfeg6yc= + + Headers/JLPublicSetting.h + + JmQFw0ilSmX82iGoVqghdmnWy5Q= + + Headers/JLPublicSettingBlocks.h + + 78FyGkoIoVyZ5ai+huILmhf5Qmk= + + Headers/JLSedentaryRmdModel.h + + XphnJB0ZRj8VL0WGok/R+C/OPNM= + + Headers/JLSensorFuncModel.h + + IWZVZ8dVK3Jvjc0WSUOIDhmwp/w= + + Headers/JLSleepMonitorModel.h + + yQ0S85l0i7Lj95Au1I0U7WRH7DQ= + + Headers/JLSpdifPCManager.h + + TQb1kSpR7862x6ClRVqAAB4yOMc= + + Headers/JLSportDataModel.h + + cGAuYe44LwYH2ZMBDPIdeoDJXEA= + + Headers/JLTaskChain.h + + zh9qvivU3urYqC6MEpSsNNgHTr4= + + Headers/JLTipsSoundReplaceMgr.h + + zcaXeAHg8YTihN4YTIHfClVSTLM= + + Headers/JLTranslateAudio.h + + I7vFedEHCdNQtZdLts7Dycpnl0c= + + Headers/JLTranslateSet.h + + kB3osNXpyR8T2l7W1NnW2bMiPTo= + + Headers/JLTranslateSetMode.h + + dhgkOfIUzBcL0zNT3ELUTjMqteg= + + Headers/JLTranslationManager.h + + i0LBB10pWl25ON2sZ+pgD8N6hPM= + + Headers/JLTwsHealthConfig.h + + GwMoM7TIZI/s4T3IYbnL1tmkDo4= + + Headers/JLTwsHealthHeartRateModel.h + + x0k0ll58aEAvpai26maj3eMFAH8= + + Headers/JLTwsHealthManager.h + + Gz0UnupkyDR+14HD/oMXTa6G/x0= + + Headers/JLTwsSupportFuncs.h + + 1z25Nh/MBQgMUPf1j90gu/CjdvU= + + Headers/JLWatchEnum.h + + eMr2/gkNQ3EdPrG0RobV+bUH/OU= + + Headers/JLWearSync.h + + 5BoNwEEMETcnNHVOzxUzMCsnpQs= + + Headers/JLWearSyncCustom.h + + sNSqTlnwmDx3DHZqyxL270VIDDA= + + Headers/JLWearSyncFinishModel.h + + cX2hlPp35ukFz5qReBHysUeiraQ= + + Headers/JLWearSyncInfoModel.h + + Y1p8HqaxiUMEqzbWEg2GlIfwgaM= + + Headers/JLWearSyncRealTimeModel.h + + pzoiNMZQdrax/iqHYU4Fo7Pb4w4= + + Headers/JLWearable.h + + Fslgb9Y4Nu8rS4/L9fSrLn2jCbw= + + Headers/JLWristLiftDetectionModel.h + + VzlO6M8h6tGhz5WXRo7s2l3zzDw= + + Headers/JL_AlarmClockManager.h + + NGxszc5x6jmeEiUxtrDg3+HwI6Y= + + Headers/JL_Assist.h + + JmeqEfLSOWlrtfMvA3oj2ZB4vlA= + + Headers/JL_BLEAction.h + + +hqZikenxU0BtDRjRRYsPuPL4uA= + + Headers/JL_BLEKit.h + + 9fqfj5BrRc+lW5T5pvtbhjPbv50= + + Headers/JL_BLEMultiple.h + + SECbwMRJWb0nnvQ+sLNT6+7dUzo= + + Headers/JL_BatchManger.h + + g/UfKLnDn85sdUiUlpp3FRKcVLU= + + Headers/JL_BigDataManager.h + + 0H4OxUB9s3829r2dyeTaPS1pl/Q= + + Headers/JL_BinChargeManager.h + + FkL15pXgiE/VE6XplZ3gup+MXFE= + + Headers/JL_CallManager.h + + Y9krvMGNbcMiULhJ8lLYcvpD3qM= + + Headers/JL_CustomManager.h + + haCZrZKtA7aTCgAb0qmMqhvyyxo= + + Headers/JL_DeviceLogs.h + + 5wEQXWXiCGR5FukwKM/KeGEXlJY= + + Headers/JL_EntityM.h + + UoaqQQBLfrwfy6hfZL0ef1dbmnQ= + + Headers/JL_FileManager.h + + 8PrvExpwQePfiXzGjePc5IqUPSs= + + Headers/JL_FindDeviceManager.h + + qxOjwYhKuuEnfm322oe7plaJ4l4= + + Headers/JL_FlashOperateManager.h + + x3BIj8qkUf8JwXtoepylG+EPKzk= + + Headers/JL_FmManager.h + + W0p7UquCvJQIinZWE5n4PvHRKhc= + + Headers/JL_FunctionBaseManager.h + + baIeH2YfB7IK19nSMwpQSKZcFio= + + Headers/JL_Handle.h + + zFSVTkZ+4yr5z63H67+UNTqvwMo= + + Headers/JL_LRCManager.h + + RsTyjW9+uOT+OM15OqSvqVtIz1o= + + Headers/JL_LightManager.h + + nLhad5wf0X5KhF8jwJGmk67xJz8= + + Headers/JL_MSG_Func.h + + ZDanAXjZnIVx9bl4t/ybkPUtUuE= + + Headers/JL_MSG_Weather.h + + U/13swPtdTgYt8x/VmKsWFEPdiE= + + Headers/JL_ManagerM.h + + CCCYqknn4+UMFuzdCljyqq8ZDoI= + + Headers/JL_MusicControlManager.h + + iSATrK5dSthYmsJg5J2nlY8slKE= + + Headers/JL_NFC.h + + JS5Uh61khe7PRMUYUhOBXtHYzbM= + + Headers/JL_OpCode.h + + 0FgqORHvycdKp93cl4la0voPY50= + + Headers/JL_RCSP.h + + YjyjnC3n9s3uFsep6u9MxZlmnic= + + Headers/JL_SDM_AirPressure.h + + AwfP1CuXtweh7EQz0HlW/lz2oZ4= + + Headers/JL_SDM_Altitude.h + + Owc+Nl/fitRERR7nJE6uc5qd+hs= + + Headers/JL_SDM_Header.h + + U/0eLMt22CEwFBszCFcEUzTp8DQ= + + Headers/JL_SDM_HeartRate.h + + H/bqbk02QFbcIpKW5PYWhuMgvss= + + Headers/JL_SDM_MaxOxg.h + + TIglezXCUNzKVtOpKEBXIvMRQvU= + + Headers/JL_SDM_MoveSteps.h + + mLWe93aq9tmomm3iK5Zm9VD3P8E= + + Headers/JL_SDM_OxSaturation.h + + 7cYKmgvn1Ui3R9NtaVPHb8bkQaw= + + Headers/JL_SDM_RecTime.h + + kuwtX2H7QkbDx6DydCjAlwh931A= + + Headers/JL_SDM_SportMessage.h + + IoxfEgehBG3USIIphI4Yx0N09MM= + + Headers/JL_SDM_Stress.h + + 67OcCO4EzxFuCqhI0zO8tTGpjRA= + + Headers/JL_SDM_TrainLoad.h + + bNW/qyqHaI6UR/IUZ5HwlVcYMqk= + + Headers/JL_SmallFileManager.h + + KPAzLX4K/vzroFuHVFvf2BJs6Fg= + + Headers/JL_SoundCardManager.h + + lcD5hFPFvd7rx6OJYlG7c8vmG6o= + + Headers/JL_SpeechAIttsHandler.h + + /1JVZ7+TKa3eaVQ8Atn8AtNO63M= + + Headers/JL_SpeexManager.h + + y4YdUUnbeQpH4u+Woye3yaYsQNM= + + Headers/JL_SystemEQ.h + + /7uh88rbOld2qDwKfN1fsCMmc+g= + + Headers/JL_SystemTime.h + + psSlGdWLxpRL9VRcyTVKJDjW+ek= + + Headers/JL_SystemVolume.h + + 3QMUuvqZ1TPUMHZr26rqQVdf4hI= + + Headers/JL_Tools.h + + VKwguP48VGX961vA/uqC26vyuGE= + + Headers/JL_TwsManager.h + + oj2UkJe8eSmFh+W8mERD9j5mXP0= + + Headers/JL_TypeEnum.h + + 7KiFpJt/7mcYoGjpK3+1sjQAor4= + + Headers/JL_WatchProtocol.h + + +ZxUVZD+pxrman+io+WwJiI7geE= + + Headers/JL_WatchSyncProtocol.h + + hSHKnLfFbr79HRSw02o2hrnE87s= + + Headers/JL_vad.h + + bmh/o2T+sVZ/M8mqSYZeAPL4hpc= + + Headers/JLeSimManager.h + + oZyAgO8UIoqjm+2kAvrzAzFzS3U= + + Headers/JLwSettingModel.h + + x8fkySafqtBLHOqtwZvMFENfZ58= + + Headers/NSData+ToUnit.h + + McQUGE4naXVF5ql2tooqiTd+7Yc= + + Headers/NSObject+JLTools.h + + t/QDlFLrTuBrGlDlBh0bE3R0JmE= + + Headers/NfcModel.h + + WXYs4dshALOjJ1F1tCDKotxcs/M= + + Headers/RTC_RingInfo.h + + xZOJbHsy3RLLeM5Jh6waRMrAo44= + + Info.plist + + yC2tvxHK9zeu0iv6XzfwGbzHI0w= + + Modules/module.modulemap + + ksULlN/jw1ds9CMKoL2JmSfl9y8= + + + files2 + + Headers/ECBDTManager.h + + hash + + /K1fGzPuVURBNDEkYVRubgV3IOE= + + hash2 + + zdaQc1xYqiI4q3HQxp0bcNTqn9Tq5kvZz3FmGLLlTx4= + + + Headers/ECBDTObjc.h + + hash + + PLzO7DWyRyICPwEHPNf+MJ7XHBI= + + hash2 + + Bx3fWo4d+4BW2pc1vJunwBXoLb2Q3LqBGELl1/5PXYc= + + + Headers/ECOneToMorePtl.h + + hash + + jdYvasKZkc3HBxsZKt3Gh336J8I= + + hash2 + + q8ZRn4PfOrljpKJuB1NCWics1ZDVJ1TCBY7PhtqpArk= + + + Headers/ECThreadHelper.h + + hash + + kS2jpYaJSrE4PLOItONs24hnhaI= + + hash2 + + r19TdGRAkYYGAd5TFriGhq2Ma7cZmTwm1GhHZox2uYM= + + + Headers/JL4GUpgradeManager.h + + hash + + 8nEg6KuaGKY/nU5LG5st3WNp7wo= + + hash2 + + My0oawaBmVWjcY9u22W/xUIA2IIfP8R6P2o7IJVUGQ8= + + + Headers/JLAIDialManager.h + + hash + + doT0jl94QXsR5Oj3+3xuYBj7XAY= + + hash2 + + mzb3df/lj/3DU7okas1K2gkRHbxTW8py8M9USF0SElQ= + + + Headers/JLAiManager.h + + hash + + 7i5AqDNBgxp21oOJg6dP0Oa5rzo= + + hash2 + + +K7/U5toSGsb+zmmjpk8Fh7aQx9DLG8Hlcb1ssUPH14= + + + Headers/JLAuracastDevStateModel.h + + hash + + SLMa70GzYRgN/9cov657yI4i50M= + + hash2 + + k/NZaCoP2QCf1lbhtvUJGGE1n+zqY+f9rrNyHDCJxRs= + + + Headers/JLAuracastLancerManager.h + + hash + + hU0z7Jgz01nroGmTfj+iEWg113s= + + hash2 + + 9AM0DrEVWK2jd2DI19TCwP5o/4xS4HuNsexniRjEH1g= + + + Headers/JLAuracastLancerSettingMode.h + + hash + + Oq/Gnx/o9pbWIjwwUzS1jEPaeLs= + + hash2 + + N/BiCgAgcNfV3M1yhP2/Xw+axe34Vj/86xkKnxvGQwo= + + + Headers/JLAuracastManager.h + + hash + + 8e6dZRcWFZ15Ig94A7WkDKnY6QE= + + hash2 + + UC+RmGt4voFKkiPuayREp97HPt99UVDGrve/SYraQHA= + + + Headers/JLAutoConfigAnc.h + + hash + + bzNmru2o+dvhnNRh/6iSWk2RzoU= + + hash2 + + cWp5JbwhvpAZXUZGpXyPbms2R1ln13j0yjtr+RCgl4c= + + + Headers/JLAutoPressureModel.h + + hash + + Zi7C6uYi1W4SzDCcXLaf36whP3M= + + hash2 + + 8J9ntv9stBSLpb0ueNhHFCDJwi0f0TayXYkUlY0nJws= + + + Headers/JLBroadcastDataModel.h + + hash + + HG1TAdf4gsYhNlmcQKNpKVyO308= + + hash2 + + ZTLXnj1UzFsvOjMcj9T/X38XpQyrqnuHgQCJPWYGQW0= + + + Headers/JLCmdBasic.h + + hash + + u/3MF/n2x3jZOLeb6LfQTODUMuk= + + hash2 + + oLlBIDN+kWVBbQ6uE/jKFO9gbOJeGUHNfO4kYJUXoHg= + + + Headers/JLConsequentHeartRateModel.h + + hash + + zDNyJtT4IsaaIDEFLgrZuarEA50= + + hash2 + + /PmGLXWJoB7JLEBuCZVfy30xLNtuEbnFWZKNyEWdVWg= + + + Headers/JLDevAudioAIttsHandler.h + + hash + + G7pQ5MrpdKqnSMU6sIV5+Up5Uhg= + + hash2 + + Fh3Mr3abKiPNFd0QPs0PaQg+L9abllhAU88vjF7vhyc= + + + Headers/JLDevAudioManager.h + + hash + + 57TE8bTSFYj5BViYfFOHinpgtus= + + hash2 + + VXFqCzgGjpqVp240BnoXFkoJO2Sk95TXMs7iiDcOJMs= + + + Headers/JLDevPlayerCtrl.h + + hash + + Y0lxOpFVxI9K8HSgcB4qgG7wo+A= + + hash2 + + eip5+4CuPSMykjFguWYrvNVmnVhgPKAP+MqZ+JJjsUU= + + + Headers/JLDeviceConfig.h + + hash + + 72l+C9Lov4yVCO1YeFoBsJtkH1Y= + + hash2 + + xKUGR0TxWQhSAUqFw06Blb/p8XrFa+5Bg4lW5G/+MBs= + + + Headers/JLDeviceConfigDongle.h + + hash + + MdkPOH8uBFR627IOyWz08hQ5dRw= + + hash2 + + IdIAQgL4/PtfGzkLeHYcT8+7ymC5/7/2YFT76tj46j4= + + + Headers/JLDeviceConfigFuncModel.h + + hash + + 0zauZVFjfVWbvYuiEY3rPznmg0Y= + + hash2 + + mokBD6jy3SsolrLOvcR/oqGmG4fXd7UdeznWyk7/LzE= + + + Headers/JLDeviceConfigSoundBox.h + + hash + + dIcm86szFWtHdxDqhZWZQAGXdvg= + + hash2 + + MZspm4TK+abVKInKpcfBkIB/jZ3dbT33TVzsL0YGsMk= + + + Headers/JLDeviceConfigTws.h + + hash + + ypa+GNoYcjD3xYh/A/vsL8vEoVc= + + hash2 + + 1NDH+W7o21M7cjWMbIC6zkqbjBjuJZB44qzigNi4sRM= + + + Headers/JLDhaFitting.h + + hash + + N0LW3A6XoLmONIFcEk/M0kIEL70= + + hash2 + + +zXJpgAs/CuzaUv99XfUaYDW/9gLJ5Jm2izQTB8g1o4= + + + Headers/JLDialInfoExtentManager.h + + hash + + 8BOSFHw+AW/j2DuhwXyVKUBL54s= + + hash2 + + G2yDd7rL6Agb9jLcyuHNunPhRj8GTAe+w7e0DjLK6Xs= + + + Headers/JLDialInfoExtentedModel.h + + hash + + u05R1xDr/Goqgu1SLpflf0Okryc= + + hash2 + + dLH0g5OaY6mg+cEo6jDF9a/xSBcoI/Tt+Ukmbk+2cJE= + + + Headers/JLDisconnectRemindModel.h + + hash + + gJdYeRaPB5xgbo5qZimkvHDRJgo= + + hash2 + + BpNeELwL2CtrSKxPVudUMmpAYkA4+NDBPWESibNow8I= + + + Headers/JLEcTimerHelper.h + + hash + + TcLs2ys3PCLPeAxfmbrwGOq/fd4= + + hash2 + + SBE6DjOp9tBHnBahHv4ko1rKOvqSORWc4Toxz/qKSLg= + + + Headers/JLEmergencyContactModel.h + + hash + + Cqu3yqWTTtcfPop5l4AQQY7fSmk= + + hash2 + + KTp5zEBqgzlwd07404okKcNbkzO2Tm9W0PiAkcdS3XA= + + + Headers/JLExerciseHeartRateRemindModel.h + + hash + + 69qKI39OqTHCkwDNFZUyBv507qk= + + hash2 + + /bR5JpJl/aH6hBOyuyVokTKaec7T7UoGhWMnhF5NbUA= + + + Headers/JLFallDetectionModel.h + + hash + + AhNiPEWSjbmL4UzfcEPRJsLHIlA= + + hash2 + + BEEYzZkHfUlHFL1wzfMXY+LczYIZGpOAYI+EwiAyQUY= + + + Headers/JLFlashOpMgr.h + + hash + + dgXE3RsDYY5sH8ixKLn9y2dZ/jI= + + hash2 + + fA4VnP05t4oiVSfpfvcXw7O3MDsQgmIpG9xD4zYNq2k= + + + Headers/JLHttpHelper.h + + hash + + jjC8gsI1TXut5f4lkIPDqw3qzJw= + + hash2 + + Mbwmwm2HRJRvk5vPsVpDEdQGvCzUtEhCfUW2Hg6VM0w= + + + Headers/JLModelCardInfo.h + + hash + + 6+vDn6HM1UUNx1OsvLE9cFXdf7I= + + hash2 + + FXdMPPKpwcn+pPUAvARZU99GP5OhPWTy+3giSSc0xT0= + + + Headers/JLModelDevFunc.h + + hash + + Nc0COyjuycHz2mMpWD0+oERainE= + + hash2 + + 62dR1nCKnNRFhHjX3oPmp90wGc9g+axCypXWYrpCOGE= + + + Headers/JLModelNoiseDetection.h + + hash + + YYHB0VoKToHS2kHiUSpOgxNWuQk= + + hash2 + + u0pLOy+T/9zv2G7JCnraLRbgyKbvvmvFJyHJJPbiSV8= + + + Headers/JLModelPCServer.h + + hash + + Fax9Paiky8kcVRqnh6t2HBB+wP8= + + hash2 + + +EZ6c45o6P6vR0+XT5yCWPiwRzXJm5we7HpK9DlGUU8= + + + Headers/JLModelSceneNoiseReduction.h + + hash + + pAPi7IqB+jDZAuTE54KlAoOZzIM= + + hash2 + + gl0NnEqcauxpIifHskgb1+vjqt4lN67RVuPy5JiuDtU= + + + Headers/JLModelSmartPickFree.h + + hash + + 8oBHUqGTP/WAdtsuTFPdd9yykmo= + + hash2 + + H0yXYY+wO6VmQaEuuwKuTPsjYkBaDuHAH1JLNWrndQU= + + + Headers/JLModelSpdif.h + + hash + + O4GVFCaiEyYlUYIeI1XtgzCsz+U= + + hash2 + + tRydigdTJRPM0TcFHGICii7Xsvdvy4fWhDmRIkR//TY= + + + Headers/JLModelVocalBoost.h + + hash + + It2EYFwMdW7dOvbFAjjAw48QoNY= + + hash2 + + f1oWY6EuwCOGlEvMBz5VgMnFH0B6Cgq4hzTyu1PB9Mo= + + + Headers/JLModel_ANC.h + + hash + + LLdGRTZFENdwbONYs9fUb0IrvbU= + + hash2 + + WZshfGQjICk3I4rS2eIZmP+fvFEZZuTtycJTIaABj5o= + + + Headers/JLModel_AlarmSetting.h + + hash + + vBLw0ClfK26fIou6fgMhjf+03f4= + + hash2 + + koAxWEK72VXOGj8DmCdsYCSdwC4sp/pTaBPmhsDGaIc= + + + Headers/JLModel_BT.h + + hash + + tyLNvtZ+s98h37qGTk3YE5yHy0c= + + hash2 + + h+nhPvDwlqLbWfaOuoNgsFy4fMWq359qA4O0ut6mAfo= + + + Headers/JLModel_Device.h + + hash + + fVXu6DR6WX1j56LdPYGPLCFDdKo= + + hash2 + + /B5ryI5onPpveJ062SVVWcUAeD3uEy2tKg3Jlq5EciA= + + + Headers/JLModel_EQ.h + + hash + + YNrVDiv5jIKKI69MFapRNX0J+vs= + + hash2 + + Mh8r8kI5ctPyvPXX3QKT7ppcZjnUEgO0SXs7NNCJaLw= + + + Headers/JLModel_FM.h + + hash + + zvphPHSPoyAvW1P28pN6+fhte+0= + + hash2 + + h47HCrZbxMK2Xut1WcAXZmGfUavSLZoWoCwuVmLSlE8= + + + Headers/JLModel_File.h + + hash + + 5m4sJ45ySIdu0iCNNIyoas8FIes= + + hash2 + + synLaplr03oHVcDvP1yG+ZOxhGf+/5qpDhjotwg2cuk= + + + Headers/JLModel_Flash.h + + hash + + hs4fTAyq4VrP5E75/Eu5V6emlGE= + + hash2 + + Y9Mz84tuYov1JaAbL/HB6k4QEF8N55hbbevEFTnXSjc= + + + Headers/JLModel_Headset.h + + hash + + V+FSzltianAC6K4Pr04KhCZzq48= + + hash2 + + kg8UDREkW9Bfu0TcEQ7qNxGPM/HYXDV7EGQzI5hs39o= + + + Headers/JLModel_RTC.h + + hash + + VBz/S6zkxJsnHc1Y6FY5Z4N4HyY= + + hash2 + + g5FpiHv2JMW25sUIl+Lu9FHp4TALKMeEAmF0kuSwRmY= + + + Headers/JLModel_Ring.h + + hash + + WtmNtcTFe5OWPNwoHPF0MoeXeHk= + + hash2 + + 2q7empYDFyUs4uKonc84cN9h/Z+Y6aBYstv5qZURoD0= + + + Headers/JLModel_SPEEX.h + + hash + + WRsFCCEdcNz0dy7S1QWxnzuGFR8= + + hash2 + + VFvVDHv6nblf5KfD8mlr6PnRk6i4xCo8E/qiZlMJj+4= + + + Headers/JLModel_SmallFile.h + + hash + + RBJXmE82+tfllfTlLykjkDYIUzA= + + hash2 + + xT/Zjm1Hg79bvQaNAeub3PXfkvfOLnWdE7oUD6H9Law= + + + Headers/JLOxygenSturationRemindModel.h + + hash + + G0eBxtfxmd5doXMJEZkCooDUeSs= + + hash2 + + e8R4Fy+iEQhSjRA9kvg8u+QFIG8JYlKSVAn2AX4VPZY= + + + Headers/JLPersonInfoModel.h + + hash + + 5rS7/fBZGnArkVzBAb3cBfeg6yc= + + hash2 + + PE78aK6zry0CtG7vmYKOu8Knf6SG/mihGP4pp+HtA0Y= + + + Headers/JLPublicSetting.h + + hash + + JmQFw0ilSmX82iGoVqghdmnWy5Q= + + hash2 + + dQVvMWT4lxEQXr8nNE650kfOTUel+hAzi878Ei6vFaE= + + + Headers/JLPublicSettingBlocks.h + + hash + + 78FyGkoIoVyZ5ai+huILmhf5Qmk= + + hash2 + + 3F2CNf6Yz9J7HpBtvzkjLwi4p8PlLZKpmE8cciY8ySs= + + + Headers/JLSedentaryRmdModel.h + + hash + + XphnJB0ZRj8VL0WGok/R+C/OPNM= + + hash2 + + Rf3fCAxgf2gsYIpmzK+Rv/0J85cAKYx4ya5DXD6zAfg= + + + Headers/JLSensorFuncModel.h + + hash + + IWZVZ8dVK3Jvjc0WSUOIDhmwp/w= + + hash2 + + NJ+59JOH/aSK4nrhMOrKErN9guE+27R2Sv2Aa2mEU8g= + + + Headers/JLSleepMonitorModel.h + + hash + + yQ0S85l0i7Lj95Au1I0U7WRH7DQ= + + hash2 + + 2j7aUsdFo1IwQJbqUtPKMDOICbx286nOPY0h1ZPgq4Q= + + + Headers/JLSpdifPCManager.h + + hash + + TQb1kSpR7862x6ClRVqAAB4yOMc= + + hash2 + + Z7FP44msb4f/JsYrEI8vASB5R4dyKF4DCViDvTmgoM4= + + + Headers/JLSportDataModel.h + + hash + + cGAuYe44LwYH2ZMBDPIdeoDJXEA= + + hash2 + + 7ElCH9JqVqLmjB+GMFKYWMa9S3EHnysmartqaXDNtwg= + + + Headers/JLTaskChain.h + + hash + + zh9qvivU3urYqC6MEpSsNNgHTr4= + + hash2 + + sEj5DitzfGIwrDEVI54r0U5wyxZz2zKIhBafqYRxOc4= + + + Headers/JLTipsSoundReplaceMgr.h + + hash + + zcaXeAHg8YTihN4YTIHfClVSTLM= + + hash2 + + 0I+uSD5jcj6mKTD083bDq7ymGhjlNsENpGHwnpSv0ag= + + + Headers/JLTranslateAudio.h + + hash + + I7vFedEHCdNQtZdLts7Dycpnl0c= + + hash2 + + cnNbIlKeyRU4q00Du9fug1FcqSx78VnZETyERCJdkr0= + + + Headers/JLTranslateSet.h + + hash + + kB3osNXpyR8T2l7W1NnW2bMiPTo= + + hash2 + + ftnluh9XjNGfVZN066J7BmocXUlbhofIct6pCDUUl2U= + + + Headers/JLTranslateSetMode.h + + hash + + dhgkOfIUzBcL0zNT3ELUTjMqteg= + + hash2 + + PxWaOt3VO+zofrCgKKp/x4Fqh2drlUPu03g+bU9/pbI= + + + Headers/JLTranslationManager.h + + hash + + i0LBB10pWl25ON2sZ+pgD8N6hPM= + + hash2 + + sOidTEwfzg7Xm/2Z8QLu5O+Q4ISCEAX/dxb1DCVFcIU= + + + Headers/JLTwsHealthConfig.h + + hash + + GwMoM7TIZI/s4T3IYbnL1tmkDo4= + + hash2 + + lbVytLXQqiBVLjACgcNU1xbS1++P6YpXGtsEBMd/c4s= + + + Headers/JLTwsHealthHeartRateModel.h + + hash + + x0k0ll58aEAvpai26maj3eMFAH8= + + hash2 + + 8kprknEZ32W0EW6hWl9eulSy9CVtbFKR+JLyQD6pJgM= + + + Headers/JLTwsHealthManager.h + + hash + + Gz0UnupkyDR+14HD/oMXTa6G/x0= + + hash2 + + XmGLWo+IZkMHn8d48MkEWvQi5ZSDFPB7TUmpXjAyjkw= + + + Headers/JLTwsSupportFuncs.h + + hash + + 1z25Nh/MBQgMUPf1j90gu/CjdvU= + + hash2 + + rWGlCf/HqU8Rc5aafN7WyfIZeBTATX8heBL1jo91rh4= + + + Headers/JLWatchEnum.h + + hash + + eMr2/gkNQ3EdPrG0RobV+bUH/OU= + + hash2 + + xV6gKnB4zCamhqm1ZhJtsnj2jKnMaCNexubMKBRyF9w= + + + Headers/JLWearSync.h + + hash + + 5BoNwEEMETcnNHVOzxUzMCsnpQs= + + hash2 + + G8vTp/Svxk8Y/AW8ZWulCdAYv0bj6dSBFH4GV1l3LxY= + + + Headers/JLWearSyncCustom.h + + hash + + sNSqTlnwmDx3DHZqyxL270VIDDA= + + hash2 + + lSUejhDBA3qusUb4BxYjdpKi2QOCHqwaldHQDz7GZK0= + + + Headers/JLWearSyncFinishModel.h + + hash + + cX2hlPp35ukFz5qReBHysUeiraQ= + + hash2 + + tnWteLJPLEJ7I47VYxO0VHpcC3Rmsw/Bxgci1rEhjhI= + + + Headers/JLWearSyncInfoModel.h + + hash + + Y1p8HqaxiUMEqzbWEg2GlIfwgaM= + + hash2 + + S8zpGUS4YbZtDNNdqTICCaZDznXLFdXcZ+ZKTxdT83U= + + + Headers/JLWearSyncRealTimeModel.h + + hash + + pzoiNMZQdrax/iqHYU4Fo7Pb4w4= + + hash2 + + /I1fuKTigGRqzisx7coUJuyFKog3fb5qM5bYEPBAhso= + + + Headers/JLWearable.h + + hash + + Fslgb9Y4Nu8rS4/L9fSrLn2jCbw= + + hash2 + + 2JVGgqHtDFyRy/9Qte2mcBMOv0v8sNualMa1dPqnev8= + + + Headers/JLWristLiftDetectionModel.h + + hash + + VzlO6M8h6tGhz5WXRo7s2l3zzDw= + + hash2 + + WQpz55dOkBBHo+yynSIXqeJhxlHzzHY3QmIPGMl6XNY= + + + Headers/JL_AlarmClockManager.h + + hash + + NGxszc5x6jmeEiUxtrDg3+HwI6Y= + + hash2 + + XCidfSb9CWuRKiYhFxDwjKJciKdDh9nwNjNdIMYRZDo= + + + Headers/JL_Assist.h + + hash + + JmeqEfLSOWlrtfMvA3oj2ZB4vlA= + + hash2 + + 6QbcztusftVvRuOkEEH+xwPBC+QfHfVjy2JNe4WUOIM= + + + Headers/JL_BLEAction.h + + hash + + +hqZikenxU0BtDRjRRYsPuPL4uA= + + hash2 + + Z1rprcGXgLahKuETba/XmrNEgz53KSDkgD4YbsGWUB4= + + + Headers/JL_BLEKit.h + + hash + + 9fqfj5BrRc+lW5T5pvtbhjPbv50= + + hash2 + + 5HCKo2q25H3OX0yRgNctaX2Q3ZPKaAoh1p7c0P2/z64= + + + Headers/JL_BLEMultiple.h + + hash + + SECbwMRJWb0nnvQ+sLNT6+7dUzo= + + hash2 + + qw1uN1+/BG5iuUalCb88gHxkeZBwhx0hw/0KvQAV8mM= + + + Headers/JL_BatchManger.h + + hash + + g/UfKLnDn85sdUiUlpp3FRKcVLU= + + hash2 + + BVy4mKrQHFQ+TImiQ/kMUWj1SoYRcIj0RwF2y6x+hR4= + + + Headers/JL_BigDataManager.h + + hash + + 0H4OxUB9s3829r2dyeTaPS1pl/Q= + + hash2 + + C06V9e5hCPXcd+vF7CHrsc2DlqRtWw/EQMmxAPmN6bA= + + + Headers/JL_BinChargeManager.h + + hash + + FkL15pXgiE/VE6XplZ3gup+MXFE= + + hash2 + + BwlLjYpRS/dafZ0tLDxSdDYM+koBQpcKOIQiTQWUqh8= + + + Headers/JL_CallManager.h + + hash + + Y9krvMGNbcMiULhJ8lLYcvpD3qM= + + hash2 + + Bp965bHAhKvTnyPFJRLZgW8mDTqMEVImfk6q0diH8xw= + + + Headers/JL_CustomManager.h + + hash + + haCZrZKtA7aTCgAb0qmMqhvyyxo= + + hash2 + + xJcZSXpyYnkMampSGcY5pp156xQXor7R+56KY0A7RwY= + + + Headers/JL_DeviceLogs.h + + hash + + 5wEQXWXiCGR5FukwKM/KeGEXlJY= + + hash2 + + a8kUhVH/CsuDtjO3GAH84Ruz5BY8Ixy9b4z2Ja7pqHg= + + + Headers/JL_EntityM.h + + hash + + UoaqQQBLfrwfy6hfZL0ef1dbmnQ= + + hash2 + + h+7alQwFzH8HZPXhABlmdwdqivrfxGMh8dl4PdmuCzw= + + + Headers/JL_FileManager.h + + hash + + 8PrvExpwQePfiXzGjePc5IqUPSs= + + hash2 + + GB6qIBce0gRLJ4POtesYM17BpwuvAkqzgdq0QbmjziE= + + + Headers/JL_FindDeviceManager.h + + hash + + qxOjwYhKuuEnfm322oe7plaJ4l4= + + hash2 + + Z4JSpje9l7PvQAI1I58oGF5sV8n0+2lRdQdcnpW84uY= + + + Headers/JL_FlashOperateManager.h + + hash + + x3BIj8qkUf8JwXtoepylG+EPKzk= + + hash2 + + 3xJk6FxTxrOSWdFQjua0R08Ff8cyuKq83EsxLFtB0OY= + + + Headers/JL_FmManager.h + + hash + + W0p7UquCvJQIinZWE5n4PvHRKhc= + + hash2 + + aurIzqq8ihpL5GeTeIISMv7Amo5aVlPLLjbOUT4Em6o= + + + Headers/JL_FunctionBaseManager.h + + hash + + baIeH2YfB7IK19nSMwpQSKZcFio= + + hash2 + + whq1ckDVm5YaHpfkje+hX/CP1Ncv34yUU3q2zbhujE4= + + + Headers/JL_Handle.h + + hash + + zFSVTkZ+4yr5z63H67+UNTqvwMo= + + hash2 + + 5UMvxnQBFNKmKoK1BhObPSUE8WZLL0mQ4A5M82+vIOE= + + + Headers/JL_LRCManager.h + + hash + + RsTyjW9+uOT+OM15OqSvqVtIz1o= + + hash2 + + b5eJch2086yG6gT39FHQdRkKb9yCCfYfqBmtk+SwRXs= + + + Headers/JL_LightManager.h + + hash + + nLhad5wf0X5KhF8jwJGmk67xJz8= + + hash2 + + LSbD5SkwqrTGQph50O/yVsBYbsY33ugjzMupU1cbR/o= + + + Headers/JL_MSG_Func.h + + hash + + ZDanAXjZnIVx9bl4t/ybkPUtUuE= + + hash2 + + EGaCo3aE+ni4oIzWSa3Y4dgv8BqQR1i/DdTN4Laeivk= + + + Headers/JL_MSG_Weather.h + + hash + + U/13swPtdTgYt8x/VmKsWFEPdiE= + + hash2 + + nusUgc6cQjsAciBaQQW0bOy+bOLEY24LpTuNVTUNGUo= + + + Headers/JL_ManagerM.h + + hash + + CCCYqknn4+UMFuzdCljyqq8ZDoI= + + hash2 + + ShggDNasxnLJdt0lVaj5weA1svKQ93rzuenaxliDqng= + + + Headers/JL_MusicControlManager.h + + hash + + iSATrK5dSthYmsJg5J2nlY8slKE= + + hash2 + + C6xtl2G9hat06vRy9a7rpz3j8K7uyVrKHuCiT7Zm2yw= + + + Headers/JL_NFC.h + + hash + + JS5Uh61khe7PRMUYUhOBXtHYzbM= + + hash2 + + sIxEX/BPxGs/1/zE8VgiF+Nf+SZ03bGtUkah3ldiquY= + + + Headers/JL_OpCode.h + + hash + + 0FgqORHvycdKp93cl4la0voPY50= + + hash2 + + KzYv4a2p4NC6diPGqSlpynrFWlTaBOR77dvMwl+zKL8= + + + Headers/JL_RCSP.h + + hash + + YjyjnC3n9s3uFsep6u9MxZlmnic= + + hash2 + + ubjhq5pzBlDEgjstlfwuGoSYV/dl3abKWv4eS9ju4y4= + + + Headers/JL_SDM_AirPressure.h + + hash + + AwfP1CuXtweh7EQz0HlW/lz2oZ4= + + hash2 + + SDfosgZLq5d7xxiCW0Z5BTyP7U3CZHDAObWMK/KeIR0= + + + Headers/JL_SDM_Altitude.h + + hash + + Owc+Nl/fitRERR7nJE6uc5qd+hs= + + hash2 + + WXlSTtTMC2/yrelPfE167zyNVAkyn8m/Gebp9jLTle0= + + + Headers/JL_SDM_Header.h + + hash + + U/0eLMt22CEwFBszCFcEUzTp8DQ= + + hash2 + + 3KFFyn+1NSWMgd5OoNuOMent310WaIJU4IDNm42k1Jc= + + + Headers/JL_SDM_HeartRate.h + + hash + + H/bqbk02QFbcIpKW5PYWhuMgvss= + + hash2 + + N7sakJKvt/AY7O/fpoh58csmYbyraQgiziCCHkvJYIU= + + + Headers/JL_SDM_MaxOxg.h + + hash + + TIglezXCUNzKVtOpKEBXIvMRQvU= + + hash2 + + dgZR14/o0DprbG/f9yqk/uNTUfEKpaLA877KeBC5tyc= + + + Headers/JL_SDM_MoveSteps.h + + hash + + mLWe93aq9tmomm3iK5Zm9VD3P8E= + + hash2 + + aAPrX4LY5jEbifgHGzZ7WjAivHajz69lNMtluexLhDA= + + + Headers/JL_SDM_OxSaturation.h + + hash + + 7cYKmgvn1Ui3R9NtaVPHb8bkQaw= + + hash2 + + OjTMxAr4jaFNjO13425u4poQd1fYe8Tg0TKNzwZK0Vc= + + + Headers/JL_SDM_RecTime.h + + hash + + kuwtX2H7QkbDx6DydCjAlwh931A= + + hash2 + + cLWfo8URGQerXIk/O/oK1CYfBdqyHQJnJ2KsqIS1NGg= + + + Headers/JL_SDM_SportMessage.h + + hash + + IoxfEgehBG3USIIphI4Yx0N09MM= + + hash2 + + KzvGsrc3IuBU3Q8VNyFeI7ohjtU/EXTRMootvcghYbI= + + + Headers/JL_SDM_Stress.h + + hash + + 67OcCO4EzxFuCqhI0zO8tTGpjRA= + + hash2 + + vWfOWfJEiVOyqhajvaTujRnH+XnLzwks6mh3ZjT9iXw= + + + Headers/JL_SDM_TrainLoad.h + + hash + + bNW/qyqHaI6UR/IUZ5HwlVcYMqk= + + hash2 + + nnPGLOqtWDz/DPLn7dVN79tDYFm7f52qcJe1MeDotMQ= + + + Headers/JL_SmallFileManager.h + + hash + + KPAzLX4K/vzroFuHVFvf2BJs6Fg= + + hash2 + + T7dgNGdyRj9bWAoSCGg5YewZb8CVCBmuSDc6wNgKXqs= + + + Headers/JL_SoundCardManager.h + + hash + + lcD5hFPFvd7rx6OJYlG7c8vmG6o= + + hash2 + + YAinCHWDhOcb/jGOUcUHjOaALdssIF99F8A3nYskfkw= + + + Headers/JL_SpeechAIttsHandler.h + + hash + + /1JVZ7+TKa3eaVQ8Atn8AtNO63M= + + hash2 + + mjceOlt/1EYraAzrzpg1skVBl6OYYxtJ2qQkwPTXIJI= + + + Headers/JL_SpeexManager.h + + hash + + y4YdUUnbeQpH4u+Woye3yaYsQNM= + + hash2 + + Xex7n9mos+U/wl5rnzyRCqo/gVn5Wal3mdeMhaTKZZE= + + + Headers/JL_SystemEQ.h + + hash + + /7uh88rbOld2qDwKfN1fsCMmc+g= + + hash2 + + 9sJya7O8ws4pP92e3ubrWmauOOv6S+JmF7o3oILphww= + + + Headers/JL_SystemTime.h + + hash + + psSlGdWLxpRL9VRcyTVKJDjW+ek= + + hash2 + + nlvlTX46ik7b2VBv23tMNGccW97ruFU9r8zjNzybIvk= + + + Headers/JL_SystemVolume.h + + hash + + 3QMUuvqZ1TPUMHZr26rqQVdf4hI= + + hash2 + + gy3XB9wLcbETplW+9ACExzwC4eeyQEb/oFNufvLPh5c= + + + Headers/JL_Tools.h + + hash + + VKwguP48VGX961vA/uqC26vyuGE= + + hash2 + + k7jwF0tZ2Vcfpa/zAer+scYCExtW77dEcnONdd/Qfqs= + + + Headers/JL_TwsManager.h + + hash + + oj2UkJe8eSmFh+W8mERD9j5mXP0= + + hash2 + + 3r8kAsxCHWyYNdzZW0dpKcrkI0g5/hPRPNXtCMsi2bc= + + + Headers/JL_TypeEnum.h + + hash + + 7KiFpJt/7mcYoGjpK3+1sjQAor4= + + hash2 + + np8Pwl2PZc+tdT9ugnlcslxgw9ngo1nXxw/9riKc9qQ= + + + Headers/JL_WatchProtocol.h + + hash + + +ZxUVZD+pxrman+io+WwJiI7geE= + + hash2 + + wKe/lEVXOomoDa1pffBgfc59MtAK37WzeSAAz9WTqck= + + + Headers/JL_WatchSyncProtocol.h + + hash + + hSHKnLfFbr79HRSw02o2hrnE87s= + + hash2 + + ckNSF3KndBZKOKZu4kljJZVh9RwjcEbz+cSwvTVg4Eg= + + + Headers/JL_vad.h + + hash + + bmh/o2T+sVZ/M8mqSYZeAPL4hpc= + + hash2 + + SSpFdCJvsyWAEsGxM0x66CmvgbESwyZZI6u9cResuYE= + + + Headers/JLeSimManager.h + + hash + + oZyAgO8UIoqjm+2kAvrzAzFzS3U= + + hash2 + + qG5SBG40Tf5Ii9lQxvzqtnybMcO/gYsKsTqIMy4XepE= + + + Headers/JLwSettingModel.h + + hash + + x8fkySafqtBLHOqtwZvMFENfZ58= + + hash2 + + SUukDWhP8r4k/4qV+jXJVl4WBDHoa3Sa9duZGMY/lGQ= + + + Headers/NSData+ToUnit.h + + hash + + McQUGE4naXVF5ql2tooqiTd+7Yc= + + hash2 + + tKg0idkIajB88qeOPShazqcNg3XOn0MbLX/1GC6JgrU= + + + Headers/NSObject+JLTools.h + + hash + + t/QDlFLrTuBrGlDlBh0bE3R0JmE= + + hash2 + + IpAVxi9qJ1Q3rxveSGr5hf73WZl+f6a7HFFqAqea+LU= + + + Headers/NfcModel.h + + hash + + WXYs4dshALOjJ1F1tCDKotxcs/M= + + hash2 + + tAMSsAd1QRvK8JLtR684Ug4AvjF/gJa2dhIZharHO1o= + + + Headers/RTC_RingInfo.h + + hash + + xZOJbHsy3RLLeM5Jh6waRMrAo44= + + hash2 + + 9rkHMvU6TK25JBAVknO2OPGrLrHCTAFXlNC5QRKSjNo= + + + Modules/module.modulemap + + hash + + ksULlN/jw1ds9CMKoL2JmSfl9y8= + + hash2 + + GmqS29lJ4xfkc+4xaB0gHt7wDmcUyPJ9ANAIq1ETqTw= + + + + rules + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^version.plist$ + + + rules2 + + .*\.dSYM($|/) + + weight + 11 + + ^(.*/)?\.DS_Store$ + + omit + + weight + 2000 + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^Info\.plist$ + + omit + + weight + 20 + + ^PkgInfo$ + + omit + + weight + 20 + + ^embedded\.provisionprofile$ + + weight + 20 + + ^version\.plist$ + + weight + 20 + + + + diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_HashPair.xcframework/Info.plist b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_HashPair.xcframework/Info.plist new file mode 100644 index 000000000..dd9c214de --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_HashPair.xcframework/Info.plist @@ -0,0 +1,44 @@ + + + + + AvailableLibraries + + + BinaryPath + JL_HashPair.framework/JL_HashPair + LibraryIdentifier + ios-arm64 + LibraryPath + JL_HashPair.framework + SupportedArchitectures + + arm64 + + SupportedPlatform + ios + + + BinaryPath + JL_HashPair.framework/JL_HashPair + LibraryIdentifier + ios-arm64_x86_64-simulator + LibraryPath + JL_HashPair.framework + SupportedArchitectures + + arm64 + x86_64 + + SupportedPlatform + ios + SupportedPlatformVariant + simulator + + + CFBundlePackageType + XFWK + XCFrameworkFormatVersion + 1.0 + + diff --git a/local_plugins/ota/ios/Frameworks/JL_HashPair.framework/Headers/BtHash.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_HashPair.xcframework/ios-arm64/JL_HashPair.framework/Headers/BtHash.h similarity index 88% rename from local_plugins/ota/ios/Frameworks/JL_HashPair.framework/Headers/BtHash.h rename to local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_HashPair.xcframework/ios-arm64/JL_HashPair.framework/Headers/BtHash.h index 7e896ab55..af9b09ea9 100644 --- a/local_plugins/ota/ios/Frameworks/JL_HashPair.framework/Headers/BtHash.h +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_HashPair.xcframework/ios-arm64/JL_HashPair.framework/Headers/BtHash.h @@ -2,8 +2,7 @@ // BtHash.h // BtHash // -// Created by huanghaibo on 2019/7/28. -// Copyright © 2019 jieli. All rights reserved. +// Created by EzioChan on 2022/6/29. // #import @@ -22,4 +21,5 @@ andKey: (unsigned char *)key andKeyLen: (int)keylen andMac:(unsigned char *)mac; + @end diff --git a/local_plugins/ota/ios/Frameworks/JL_HashPair.framework/Headers/JLHashHandler.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_HashPair.xcframework/ios-arm64/JL_HashPair.framework/Headers/JLHashHandler.h similarity index 92% rename from local_plugins/ota/ios/Frameworks/JL_HashPair.framework/Headers/JLHashHandler.h rename to local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_HashPair.xcframework/ios-arm64/JL_HashPair.framework/Headers/JLHashHandler.h index 9ef4e0407..c42b34a55 100644 --- a/local_plugins/ota/ios/Frameworks/JL_HashPair.framework/Headers/JLHashHandler.h +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_HashPair.xcframework/ios-arm64/JL_HashPair.framework/Headers/JLHashHandler.h @@ -44,6 +44,11 @@ typedef void(^JLHashBlock)(BOOL ret); -(void)inputPairData:(NSData*)rData; +/// 停止设备认证过程 +/// stop device pairing +-(void)stopAuthPair; + + /// 打印当前SDK的版本 +(void)sdkVersion; diff --git a/local_plugins/ota/ios/Frameworks/JL_HashPair.framework/Headers/JL_HashPair.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_HashPair.xcframework/ios-arm64/JL_HashPair.framework/Headers/JL_HashPair.h similarity index 100% rename from local_plugins/ota/ios/Frameworks/JL_HashPair.framework/Headers/JL_HashPair.h rename to local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_HashPair.xcframework/ios-arm64/JL_HashPair.framework/Headers/JL_HashPair.h diff --git a/local_plugins/ota/ios/Frameworks/JL_HashPair.framework/Headers/JL_ble_pair.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_HashPair.xcframework/ios-arm64/JL_HashPair.framework/Headers/JL_ble_pair.h similarity index 100% rename from local_plugins/ota/ios/Frameworks/JL_HashPair.framework/Headers/JL_ble_pair.h rename to local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_HashPair.xcframework/ios-arm64/JL_HashPair.framework/Headers/JL_ble_pair.h diff --git a/local_plugins/ota/ios/Frameworks/JL_AdvParse.framework/Frameworks/JLLogHelper.framework/Info.plist b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_HashPair.xcframework/ios-arm64/JL_HashPair.framework/Info.plist similarity index 51% rename from local_plugins/ota/ios/Frameworks/JL_AdvParse.framework/Frameworks/JLLogHelper.framework/Info.plist rename to local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_HashPair.xcframework/ios-arm64/JL_HashPair.framework/Info.plist index 22f0b62eb..232ca4a24 100644 Binary files a/local_plugins/ota/ios/Frameworks/JL_AdvParse.framework/Frameworks/JLLogHelper.framework/Info.plist and b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_HashPair.xcframework/ios-arm64/JL_HashPair.framework/Info.plist differ diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_HashPair.xcframework/ios-arm64/JL_HashPair.framework/JL_HashPair b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_HashPair.xcframework/ios-arm64/JL_HashPair.framework/JL_HashPair new file mode 100755 index 000000000..bb02d2d6f Binary files /dev/null and b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_HashPair.xcframework/ios-arm64/JL_HashPair.framework/JL_HashPair differ diff --git a/local_plugins/ota/ios/Frameworks/JL_HashPair.framework/Modules/module.modulemap b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_HashPair.xcframework/ios-arm64/JL_HashPair.framework/Modules/module.modulemap similarity index 100% rename from local_plugins/ota/ios/Frameworks/JL_HashPair.framework/Modules/module.modulemap rename to local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_HashPair.xcframework/ios-arm64/JL_HashPair.framework/Modules/module.modulemap diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_HashPair.xcframework/ios-arm64_x86_64-simulator/JL_HashPair.framework/Headers/BtHash.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_HashPair.xcframework/ios-arm64_x86_64-simulator/JL_HashPair.framework/Headers/BtHash.h new file mode 100644 index 000000000..af9b09ea9 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_HashPair.xcframework/ios-arm64_x86_64-simulator/JL_HashPair.framework/Headers/BtHash.h @@ -0,0 +1,25 @@ +// +// BtHash.h +// BtHash +// +// Created by EzioChan on 2022/6/29. +// + +#import + +@interface BtHash : NSObject +/* + @param [in] pt[*1] The plaintext + @param ptlen The length of the plaintext(octets) range: 1~32 + @param [in] key[*1] The key for encrypt + @param keylen[*1] The length of the key(octets) range: 1~32 + @param [out] mac[*1] output : The Message Authentication Code 16 bytes. + @return error if < 0, 0 is normal. + */ ++(int)decryptWithPlaintext:(unsigned char *)pt + andPlaintextLen:(int)ptlen + andKey: (unsigned char *)key + andKeyLen: (int)keylen + andMac:(unsigned char *)mac; + +@end diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_HashPair.xcframework/ios-arm64_x86_64-simulator/JL_HashPair.framework/Headers/JLHashHandler.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_HashPair.xcframework/ios-arm64_x86_64-simulator/JL_HashPair.framework/Headers/JLHashHandler.h new file mode 100644 index 000000000..c42b34a55 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_HashPair.xcframework/ios-arm64_x86_64-simulator/JL_HashPair.framework/Headers/JLHashHandler.h @@ -0,0 +1,59 @@ +// +// JLHashHandler.h +// JL_BLEKit +// +// Created by EzioChan on 2023/1/30. +// Copyright © 2023 www.zh-jieli.com. All rights reserved. +// + +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +typedef void(^JLHashBlock)(BOOL ret); + +@protocol JLHashHandlerDelegate + +/// 需要发送到设备校验认证的数据 +/// - Parameter data: 数据 +-(void)hashOnPairOutputData:(NSData*)data; + +@end + + +/// 设备认证 +@interface JLHashHandler : NSObject + +@property(nonatomic,weak)id delegate; + + +/// APP端发起设备认证 +/// - Parameters: +/// - pKey: 加密Key(默认为空) +/// - bk: 配对认证回调结果 +-(void)bluetoothPairingKey:(NSData *__nullable)pKey Result:(JLHashBlock)bk; + + +/// 重置设备认证过程 +-(void)hashResetPair; + + +/// 填入设备回复数据 +/// - Parameter rData: 数据 +-(void)inputPairData:(NSData*)rData; + + +/// 停止设备认证过程 +/// stop device pairing +-(void)stopAuthPair; + + +/// 打印当前SDK的版本 ++(void)sdkVersion; + + + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_HashPair.xcframework/ios-arm64_x86_64-simulator/JL_HashPair.framework/Headers/JL_HashPair.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_HashPair.xcframework/ios-arm64_x86_64-simulator/JL_HashPair.framework/Headers/JL_HashPair.h new file mode 100644 index 000000000..95d62c48d --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_HashPair.xcframework/ios-arm64_x86_64-simulator/JL_HashPair.framework/Headers/JL_HashPair.h @@ -0,0 +1,21 @@ +// +// JL_HashPair.h +// JL_HashPair +// +// Created by EzioChan on 2023/1/30. +// Copyright © 2023 www.zh-jieli.com. All rights reserved. +// + +#import + +//! Project version number for JL_HashPair. +FOUNDATION_EXPORT double JL_HashPairVersionNumber; + +//! Project version string for JL_HashPair. +FOUNDATION_EXPORT const unsigned char JL_HashPairVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + +#import +#import +#import diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_HashPair.xcframework/ios-arm64_x86_64-simulator/JL_HashPair.framework/Headers/JL_ble_pair.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_HashPair.xcframework/ios-arm64_x86_64-simulator/JL_HashPair.framework/Headers/JL_ble_pair.h new file mode 100644 index 000000000..bce37ee6c --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_HashPair.xcframework/ios-arm64_x86_64-simulator/JL_HashPair.framework/Headers/JL_ble_pair.h @@ -0,0 +1,20 @@ +// +// JL_ble_pair.h +// JL_BLEKit +// +// Created by zhihui liang on 2018/11/10. +// Copyright © 2018 www.zh-jieli.com. All rights reserved. +// + +#ifndef JL_ble_pair_h +#define JL_ble_pair_h + +#include +#include + +void function_jieli(uint8_t *address,uint8_t *RAND,uint8_t *K,uint8_t *result); + +#pragma mark CRC校验 +unsigned short JL_CRC16(unsigned char *ptr, int len, uint16_t lastCrc); + +#endif /* JL_ble_pair_h */ diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_HashPair.xcframework/ios-arm64_x86_64-simulator/JL_HashPair.framework/Info.plist b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_HashPair.xcframework/ios-arm64_x86_64-simulator/JL_HashPair.framework/Info.plist new file mode 100644 index 000000000..1bc046944 Binary files /dev/null and b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_HashPair.xcframework/ios-arm64_x86_64-simulator/JL_HashPair.framework/Info.plist differ diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_HashPair.xcframework/ios-arm64_x86_64-simulator/JL_HashPair.framework/JL_HashPair b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_HashPair.xcframework/ios-arm64_x86_64-simulator/JL_HashPair.framework/JL_HashPair new file mode 100755 index 000000000..f2c842955 Binary files /dev/null and b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_HashPair.xcframework/ios-arm64_x86_64-simulator/JL_HashPair.framework/JL_HashPair differ diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_HashPair.xcframework/ios-arm64_x86_64-simulator/JL_HashPair.framework/Modules/module.modulemap b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_HashPair.xcframework/ios-arm64_x86_64-simulator/JL_HashPair.framework/Modules/module.modulemap new file mode 100644 index 000000000..4e820d974 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_HashPair.xcframework/ios-arm64_x86_64-simulator/JL_HashPair.framework/Modules/module.modulemap @@ -0,0 +1,6 @@ +framework module JL_HashPair { + umbrella header "JL_HashPair.h" + export * + + module * { export * } +} diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_HashPair.xcframework/ios-arm64_x86_64-simulator/JL_HashPair.framework/_CodeSignature/CodeResources b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_HashPair.xcframework/ios-arm64_x86_64-simulator/JL_HashPair.framework/_CodeSignature/CodeResources new file mode 100644 index 000000000..ae6ca022a --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_HashPair.xcframework/ios-arm64_x86_64-simulator/JL_HashPair.framework/_CodeSignature/CodeResources @@ -0,0 +1,177 @@ + + + + + files + + Headers/BtHash.h + + EdZDmmVVm0KY3D72UHE3hQF42e4= + + Headers/JLHashHandler.h + + ArAEdyp9k5H5o4gFjW9zdx+0ISY= + + Headers/JL_HashPair.h + + Y9dInJ7eyVXJ8WOASyZGNDDIj9s= + + Headers/JL_ble_pair.h + + YP6GQrFs1nWR8BkMoj1fQdKHKKM= + + Info.plist + + vaP94eof9P4dJHy/VxAhSfezsXw= + + Modules/module.modulemap + + 6wQFoRjNQqLop5Z3m/K5slHiG2k= + + + files2 + + Headers/BtHash.h + + hash + + EdZDmmVVm0KY3D72UHE3hQF42e4= + + hash2 + + EfOAmi/ycUONPu8OgPUuPkc9caXqUhvVXE27JNmmnPk= + + + Headers/JLHashHandler.h + + hash + + ArAEdyp9k5H5o4gFjW9zdx+0ISY= + + hash2 + + 7iuW7k7IBL4tf/bE1O3SudVyeFxG8YHoo7DqZGFdSBI= + + + Headers/JL_HashPair.h + + hash + + Y9dInJ7eyVXJ8WOASyZGNDDIj9s= + + hash2 + + 5Ow8T39Md9cD7Jb7iMaoihnIJhv8GHHIjGAsgZG//Og= + + + Headers/JL_ble_pair.h + + hash + + YP6GQrFs1nWR8BkMoj1fQdKHKKM= + + hash2 + + ggTJvYOE/W4Tmghs665eiywakMiTsvgl7PeEayUkKqQ= + + + Modules/module.modulemap + + hash + + 6wQFoRjNQqLop5Z3m/K5slHiG2k= + + hash2 + + N+WiNcfG40LwaFvJZeLG5iNA48ZbrW0Oph/B9U+7i9U= + + + + rules + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^version.plist$ + + + rules2 + + .*\.dSYM($|/) + + weight + 11 + + ^(.*/)?\.DS_Store$ + + omit + + weight + 2000 + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^Info\.plist$ + + omit + + weight + 20 + + ^PkgInfo$ + + omit + + weight + 20 + + ^embedded\.provisionprofile$ + + weight + 20 + + ^version\.plist$ + + weight + 20 + + + + diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_OTALib.xcframework/Info.plist b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_OTALib.xcframework/Info.plist new file mode 100644 index 000000000..567764096 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_OTALib.xcframework/Info.plist @@ -0,0 +1,44 @@ + + + + + AvailableLibraries + + + BinaryPath + JL_OTALib.framework/JL_OTALib + LibraryIdentifier + ios-arm64 + LibraryPath + JL_OTALib.framework + SupportedArchitectures + + arm64 + + SupportedPlatform + ios + + + BinaryPath + JL_OTALib.framework/JL_OTALib + LibraryIdentifier + ios-arm64_x86_64-simulator + LibraryPath + JL_OTALib.framework + SupportedArchitectures + + arm64 + x86_64 + + SupportedPlatform + ios + SupportedPlatformVariant + simulator + + + CFBundlePackageType + XFWK + XCFrameworkFormatVersion + 1.0 + + diff --git a/local_plugins/ota/ios/Frameworks/JL_OTALib.framework/Headers/JLOTAFile.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_OTALib.xcframework/ios-arm64/JL_OTALib.framework/Headers/JLOTAFile.h similarity index 100% rename from local_plugins/ota/ios/Frameworks/JL_OTALib.framework/Headers/JLOTAFile.h rename to local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_OTALib.xcframework/ios-arm64/JL_OTALib.framework/Headers/JLOTAFile.h diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_OTALib.xcframework/ios-arm64/JL_OTALib.framework/Headers/JLOtaCustom.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_OTALib.xcframework/ios-arm64/JL_OTALib.framework/Headers/JLOtaCustom.h new file mode 100644 index 000000000..4740d6872 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_OTALib.xcframework/ios-arm64/JL_OTALib.framework/Headers/JLOtaCustom.h @@ -0,0 +1,62 @@ +// +// JLOtaCustom.h +// JL_OTALib +// +// Created by EzioChan on 2025/4/17. +// Copyright © 2025 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN +@class JL_OTAManager; + +/// 自定义命令对象 +@interface JLOtaCustomData : NSObject + +/// 是否需要回复 +@property (nonatomic, assign) BOOL needResponse; + +/// 数据 +@property (nonatomic, strong) NSData *data; + +/// 回复数据 SN +@property (nonatomic, assign) uint8_t sn; + +@end + + +/// 自定义命令回调 +@protocol JLOtaCustomDelegate + +/// 自定义命令回调 +/// - Parameter data: 自定义命令对象 +-(void)otaCustomReceiveData:(JLOtaCustomData *)data; + +@end + +/// 自定义命令 +@interface JLOtaCustom : NSObject + +/// 自定义命令 +/// - Parameters: +/// - delegate: 代理回调 +/// - manager: 升级对象 +-(instancetype)initWithDelegate:(id)delegate OtaManager:(JL_OTAManager *)manager; + +/// 发送自定义命令 +/// - Parameters: +/// - data: 下发的数据 +/// - need: 是否需要回复内容 +/// - result: 命令回复结果 +- (void)cmdSendCommandData:(NSData *)data needResponse:(BOOL)need Result:(void(^)(NSData * __nullable response, NSError * __nullable error)) result; + +/// 回复自定义命令 +/// - Parameters: +/// - data: 回复的数据 +/// - sn: 回复的SN +- (void)cmdResponseData:(NSData *)data sn:(uint8_t)sn; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_OTALib.xcframework/ios-arm64/JL_OTALib.framework/Headers/JLOtaReConnectOption.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_OTALib.xcframework/ios-arm64/JL_OTALib.framework/Headers/JLOtaReConnectOption.h new file mode 100644 index 000000000..9b0ecc2c6 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_OTALib.xcframework/ios-arm64/JL_OTALib.framework/Headers/JLOtaReConnectOption.h @@ -0,0 +1,43 @@ +// +// JLOtaReConnectOption.h +// JL_OTALib +// +// Created by EzioChan on 2025/3/27. +// Copyright © 2025 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface JLOtaReConnectOption : NSObject + +/// 是否需要使用设备认证 +@property (assign, nonatomic) BOOL deviceAuthorize; + +/// 握手(配对)秘钥 +@property(strong,nonatomic)NSData *__nullable authKey; + +/// 设备服务UUID +/// 默认是 AE00 +@property (strong, nonatomic) NSString *serviceUUID; + +///写特征 UUID +/// 默认是 AE01 +@property (strong, nonatomic) NSString *writeUUID; + +/// 读特征 UUID +/// 默认是 AE02 +@property (strong, nonatomic) NSString *readUUID; + +/// 是否需要响应的回应方式 +/// 默认是NO +@property (assign, nonatomic) BOOL isWriteWithResponse; + + + ++ (JLOtaReConnectOption *)defaultOption; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/ota/ios/Frameworks/JL_OTALib.framework/Headers/JL_OTALib.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_OTALib.xcframework/ios-arm64/JL_OTALib.framework/Headers/JL_OTALib.h similarity index 88% rename from local_plugins/ota/ios/Frameworks/JL_OTALib.framework/Headers/JL_OTALib.h rename to local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_OTALib.xcframework/ios-arm64/JL_OTALib.framework/Headers/JL_OTALib.h index d09eb65df..83d1764c2 100644 --- a/local_plugins/ota/ios/Frameworks/JL_OTALib.framework/Headers/JL_OTALib.h +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_OTALib.xcframework/ios-arm64/JL_OTALib.framework/Headers/JL_OTALib.h @@ -18,3 +18,5 @@ FOUNDATION_EXPORT const unsigned char JL_OTALibVersionString[]; #import #import #import +#import +#import diff --git a/local_plugins/ota/ios/Frameworks/JL_OTALib.framework/Headers/JL_OTAManager.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_OTALib.xcframework/ios-arm64/JL_OTALib.framework/Headers/JL_OTAManager.h similarity index 56% rename from local_plugins/ota/ios/Frameworks/JL_OTALib.framework/Headers/JL_OTAManager.h rename to local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_OTALib.xcframework/ios-arm64/JL_OTALib.framework/Headers/JL_OTAManager.h index 93f576883..02d53c94f 100644 --- a/local_plugins/ota/ios/Frameworks/JL_OTALib.framework/Headers/JL_OTAManager.h +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_OTALib.xcframework/ios-arm64/JL_OTALib.framework/Headers/JL_OTAManager.h @@ -10,39 +10,73 @@ #import NS_ASSUME_NONNULL_BEGIN - -typedef NS_ENUM(UInt8, JL_OTAResult) { - JL_OTAResultSuccess = 0x00, // OTA升级成功 - JL_OTAResultFail = 0x01, // OTA升级失败 - JL_OTAResultDataIsNull = 0x02, // OTA升级数据为空 - JL_OTAResultCommandFail = 0x03, // OTA指令失败 - JL_OTAResultSeekFail = 0x04, // OTA标示偏移查找失败 - JL_OTAResultInfoFail = 0x05, // OTA升级固件信息错误 - JL_OTAResultLowPower = 0x06, // OTA升级设备电压低 - JL_OTAResultEnterFail = 0x07, // 未能进入OTA升级模式 - JL_OTAResultUpgrading = 0x08, // OTA升级中 - JL_OTAResultReconnect = 0x09, // OTA需重连设备(uuid方式) - JL_OTAResultReboot = 0x0a, // OTA需设备重启 - JL_OTAResultPreparing = 0x0b, // OTA准备中 - JL_OTAResultPrepared = 0x0f, // OTA准备完成 - JL_OTAResultStatusIsUpdating = 0x10, // 设备已在升级中 - JL_OTAResultFailedConnectMore = 0x11, // 当前固件多台设备连接,请手动断开另 一个设备连接 - JL_OTAResultFailSameSN = 0xe0, // 升级数据校验失败,SN 多次重复 - JL_OTAResultCancel = 0xe1, // 升级取消 - JL_OTAResultFailVerification = 0xf1, // 升级数据校验失败 - JL_OTAResultFailCompletely = 0xf2, // 升级失败 - JL_OTAResultFailKey = 0xf3, // 升级数据校验失败,加密Key不对 - JL_OTAResultFailErrorFile = 0xf4, // 升级文件出错 - JL_OTAResultFailUboot = 0xf5, // uboot不匹配 - JL_OTAResultFailLenght = 0xf6, // 升级过程长度出错 - JL_OTAResultFailFlash = 0xf7, // 升级过程flash读写失败 - JL_OTAResultFailCmdTimeout = 0xf8, // 升级过程指令超时 - JL_OTAResultFailSameVersion = 0xf9, // 相同版本 - JL_OTAResultFailTWSDisconnect = 0xfa, // TWS耳机未连接 - JL_OTAResultFailNotInBin = 0xfb, // 耳机未在充电仓 - JL_OTAResultReconnectWithMacAddr = 0xfc, // OTA需重连设备(mac方式) - JL_OTAResultDisconnect = 0xfd, // OTA设备断开 - JL_OTAResultUnknown, // OTA未知错误 +@class JLOtaReConnectOption; + +typedef NS_ENUM(UInt16, JL_OTAResult) { + /// OTA升级成功 + JL_OTAResultSuccess = 0x00, + /// OTA升级失败 + JL_OTAResultFail = 0x01, + /// OTA升级数据为空 + JL_OTAResultDataIsNull = 0x02, + /// OTA指令失败 + JL_OTAResultCommandFail = 0x03, + /// OTA标示偏移查找失败 + JL_OTAResultSeekFail = 0x04, + /// OTA升级固件信息错误 + JL_OTAResultInfoFail = 0x05, + /// OTA升级设备电压低 + JL_OTAResultLowPower = 0x06, + /// 未能进入OTA升级模式 + JL_OTAResultEnterFail = 0x07, + /// OTA升级中 + JL_OTAResultUpgrading = 0x08, + /// OTA需重连设备(uuid方式) + JL_OTAResultReconnect = 0x09, + /// OTA需设备重启 + JL_OTAResultReboot = 0x0a, + /// OTA准备中 + JL_OTAResultPreparing = 0x0b, + /// OTA准备完成 + JL_OTAResultPrepared = 0x0f, + /// 设备已在升级中 + JL_OTAResultStatusIsUpdating = 0x10, + /// 当前固件多台设备连接,请手动断开另一个设备连接 + JL_OTAResultFailedConnectMore = 0x11, + /// 升级数据校验失败,SN 多次重复 + JL_OTAResultFailSameSN = 0xe0, + /// 升级取消 + JL_OTAResultCancel = 0xe1, + /// 升级数据校验失败 + JL_OTAResultFailVerification = 0xf1, + /// 升级失败 + JL_OTAResultFailCompletely = 0xf2, + /// 升级数据校验失败,加密Key不对 + JL_OTAResultFailKey = 0xf3, + /// 升级文件出错 + JL_OTAResultFailErrorFile = 0xf4, + /// uboot不匹配 + JL_OTAResultFailUboot = 0xf5, + /// 升级过程长度出错 + JL_OTAResultFailLenght = 0xf6, + /// 升级过程flash读写失败 + JL_OTAResultFailFlash = 0xf7, + /// 升级过程指令超时 + JL_OTAResultFailCmdTimeout = 0xf8, + /// 相同版本 + JL_OTAResultFailSameVersion = 0xf9, + /// TWS耳机未连接 + JL_OTAResultFailTWSDisconnect = 0xfa, + /// 耳机未在充电仓 + JL_OTAResultFailNotInBin = 0xfb, + /// OTA需重连设备(mac方式) + JL_OTAResultReconnectWithMacAddr = 0xfc, + /// OTA设备断开 + JL_OTAResultDisconnect = 0xfd, + /// OTA需重连设备(更新资源) + JL_OTAResultReconnectUpdateSource = 0xfe, + /// OTA未知错误 + JL_OTAResultUnknown }; typedef NS_ENUM(UInt8, JL_OTAReconnectType) { @@ -58,10 +92,24 @@ typedef NS_ENUM(UInt8, JL_OtaHeadset) { JL_OtaHeadsetNO = 0, // 耳机单备份 正常升级 JL_OtaHeadsetYES = 1, // 耳机单备份 强制升级 }; + typedef NS_ENUM(UInt8, JL_OtaWatch) { JL_OtaWatchNO = 0, // 手表资源 正常升级 JL_OtaWatchYES = 1, // 手表资源 强制升级 +}__attribute__((deprecated("This enum is deprecated. Use JLOtaSourcesExtendMode instead."))); + +/// OTA资源升级模式 +typedef NS_ENUM(UInt8, JLOtaSourcesExtendMode) { + /// 不启用 + JLSourcesExtendModeDisable = 0, + /// 启用普通资源升级模式 + JLSourcesExtendModeNormal = 1, + /// 启用只升级资源的模式 + JLSourcesExtendModeSourceOnly = 2, + /// 启用只升级固件程序的模式 + JLSourcesExtendModeFirmwareOnly = 3, }; + typedef NS_ENUM(UInt8, JL_BootLoader) { JL_BootLoaderNO = 0, // 不需要下载Bootloader JL_BootLoaderYES = 1, // 需要下载BootLoader @@ -130,7 +178,16 @@ typedef void (^JL_OTA_RESULT)(uint8_t status, uint8_t sn, NSData *__nullable dat @property(assign, nonatomic) JL_OtaHeadset otaHeadset; /// 手表资源 是否需要强制升级 -@property(assign, nonatomic) JL_OtaWatch otaWatch; +@property(assign, nonatomic) JL_OtaWatch otaWatch __attribute__((deprecated("This property is deprecated. Use otaSourceMode instead."))); + +/// 是否支持复用空间进行 OTA +@property(assign, nonatomic) BOOL isSupportReuseSpaceOTA; + +/// 是否支持 OTA 拓展功能 +@property (assign, nonatomic) BOOL isSupportExpand; + +/// 资源升级模式类型 +@property(assign, nonatomic) JLOtaSourcesExtendMode otaSourceMode; /// 设备OTA时支持单/双备份 @property(assign, nonatomic) JL_Partition otaPartition; @@ -156,7 +213,6 @@ typedef void (^JL_OTA_RESULT)(uint8_t status, uint8_t sn, NSData *__nullable dat /// 不建议使用自行初始化 /// 推荐获取 getOTAManager - (instancetype)init __attribute__((deprecated("Please use getOTAManager instead."))); -; /// 打印OTA发送的数据内容 /// - Parameter status: 开关 @@ -170,9 +226,19 @@ typedef void (^JL_OTA_RESULT)(uint8_t status, uint8_t sn, NSData *__nullable dat /// 设置最大丢包次数 /// - Parameter count: 次数 -/// default: 2 +/// default: 10 - (void)maxLostCount:(int)count; +/// 设置超时时间 +/// - Parameter timeOut: 时间 +/// default: 5 +- (void)cmdTimeOut:(int)timeOut; + +/// 设置是否需要回连 +/// 一般不允许外部干扰状态机,外部不适用此方法 +/// - Parameter isReLink: 回连 +- (void)setOTARelink:(BOOL)isReLink __attribute__((deprecated("Can't be used externally."))); + /// Receive data from rcsp /// 设备端过来的数据 /// - Parameter data: data @@ -204,6 +270,15 @@ typedef void (^JL_OTA_RESULT)(uint8_t status, uint8_t sn, NSData *__nullable dat /// @param result 升级结果回调 - (void)cmdOtaDataIIResult:(JL_OTA_RT __nullable)result; +/// OTA升级III +/// 单备份升级特有!!! +/// 此接口免去了公版 OTA 的外边回连策略,内部实现回连 +/// ⚠️使用此方法时不可使用 delegate 的回调信息,要使用 Result 的回调信息 +/// @param data OTA数据 +/// @param option 回连选项 +/// @param result 回复 +-(void)cmdUpgrade:(NSData *)data Option:(JLOtaReConnectOption *_Nullable)option Result:(JL_OTA_RT _Nonnull)result; + /** OTA升级取消 @param result 回复 diff --git a/local_plugins/ota/ios/Frameworks/JL_OTALib.framework/Headers/jl_ufw.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_OTALib.xcframework/ios-arm64/JL_OTALib.framework/Headers/jl_ufw.h similarity index 100% rename from local_plugins/ota/ios/Frameworks/JL_OTALib.framework/Headers/jl_ufw.h rename to local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_OTALib.xcframework/ios-arm64/JL_OTALib.framework/Headers/jl_ufw.h diff --git a/local_plugins/ota/ios/Frameworks/JL_OTALib.framework/Info.plist b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_OTALib.xcframework/ios-arm64/JL_OTALib.framework/Info.plist similarity index 52% rename from local_plugins/ota/ios/Frameworks/JL_OTALib.framework/Info.plist rename to local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_OTALib.xcframework/ios-arm64/JL_OTALib.framework/Info.plist index 608fa1e0d..c26c4dc80 100644 Binary files a/local_plugins/ota/ios/Frameworks/JL_OTALib.framework/Info.plist and b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_OTALib.xcframework/ios-arm64/JL_OTALib.framework/Info.plist differ diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_OTALib.xcframework/ios-arm64/JL_OTALib.framework/JL_OTALib b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_OTALib.xcframework/ios-arm64/JL_OTALib.framework/JL_OTALib new file mode 100755 index 000000000..65d4ac78a Binary files /dev/null and b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_OTALib.xcframework/ios-arm64/JL_OTALib.framework/JL_OTALib differ diff --git a/local_plugins/ota/ios/Frameworks/JL_OTALib.framework/Modules/module.modulemap b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_OTALib.xcframework/ios-arm64/JL_OTALib.framework/Modules/module.modulemap similarity index 100% rename from local_plugins/ota/ios/Frameworks/JL_OTALib.framework/Modules/module.modulemap rename to local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_OTALib.xcframework/ios-arm64/JL_OTALib.framework/Modules/module.modulemap diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_OTALib.xcframework/ios-arm64_x86_64-simulator/JL_OTALib.framework/Headers/JLOTAFile.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_OTALib.xcframework/ios-arm64_x86_64-simulator/JL_OTALib.framework/Headers/JLOTAFile.h new file mode 100644 index 000000000..2ab4541b0 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_OTALib.xcframework/ios-arm64_x86_64-simulator/JL_OTALib.framework/Headers/JLOTAFile.h @@ -0,0 +1,52 @@ +// +// JLOTAFile.h +// JL_OTALib +// +// Created by EzioChan on 2024/7/26. +// Copyright © 2024 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +typedef NS_ENUM(UInt8, JL_OTAUrlResult) { + JL_OTAUrlResultSuccess = 0x00, //OTA文件获取成功 + JL_OTAUrlResultFail = 0x01, //OTA文件获取失败 + JL_OTAUrlResultDownloadFail = 0x02, //OTA文件下载失败 +}; + +typedef void(^JL_OTA_URL)(JL_OTAUrlResult result, + NSString* __nullable version, + NSString* __nullable url, + NSString* __nullable explain); + +@interface JLOTAFile : NSObject + + +#pragma mark -文件下载 +/** + 文件下载 + @param key 授权key + @param code 授权code + @param result 回复 + */ +-(void)cmdGetOtaFileKey:(NSString*)key + Code:(NSString*)code + Result:(JL_OTA_URL __nullable)result; + +/** + OTA升级文件下载【MD5】 +@param key 授权key +@param code 授权code +@param hash MD5值 +@param result 回复 +*/ +-(void)cmdGetOtaFileKey:(NSString*)key + Code:(NSString*)code + hash:(NSString*)hash + Result:(JL_OTA_URL __nullable)result; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_OTALib.xcframework/ios-arm64_x86_64-simulator/JL_OTALib.framework/Headers/JLOtaCustom.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_OTALib.xcframework/ios-arm64_x86_64-simulator/JL_OTALib.framework/Headers/JLOtaCustom.h new file mode 100644 index 000000000..4740d6872 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_OTALib.xcframework/ios-arm64_x86_64-simulator/JL_OTALib.framework/Headers/JLOtaCustom.h @@ -0,0 +1,62 @@ +// +// JLOtaCustom.h +// JL_OTALib +// +// Created by EzioChan on 2025/4/17. +// Copyright © 2025 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN +@class JL_OTAManager; + +/// 自定义命令对象 +@interface JLOtaCustomData : NSObject + +/// 是否需要回复 +@property (nonatomic, assign) BOOL needResponse; + +/// 数据 +@property (nonatomic, strong) NSData *data; + +/// 回复数据 SN +@property (nonatomic, assign) uint8_t sn; + +@end + + +/// 自定义命令回调 +@protocol JLOtaCustomDelegate + +/// 自定义命令回调 +/// - Parameter data: 自定义命令对象 +-(void)otaCustomReceiveData:(JLOtaCustomData *)data; + +@end + +/// 自定义命令 +@interface JLOtaCustom : NSObject + +/// 自定义命令 +/// - Parameters: +/// - delegate: 代理回调 +/// - manager: 升级对象 +-(instancetype)initWithDelegate:(id)delegate OtaManager:(JL_OTAManager *)manager; + +/// 发送自定义命令 +/// - Parameters: +/// - data: 下发的数据 +/// - need: 是否需要回复内容 +/// - result: 命令回复结果 +- (void)cmdSendCommandData:(NSData *)data needResponse:(BOOL)need Result:(void(^)(NSData * __nullable response, NSError * __nullable error)) result; + +/// 回复自定义命令 +/// - Parameters: +/// - data: 回复的数据 +/// - sn: 回复的SN +- (void)cmdResponseData:(NSData *)data sn:(uint8_t)sn; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_OTALib.xcframework/ios-arm64_x86_64-simulator/JL_OTALib.framework/Headers/JLOtaReConnectOption.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_OTALib.xcframework/ios-arm64_x86_64-simulator/JL_OTALib.framework/Headers/JLOtaReConnectOption.h new file mode 100644 index 000000000..9b0ecc2c6 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_OTALib.xcframework/ios-arm64_x86_64-simulator/JL_OTALib.framework/Headers/JLOtaReConnectOption.h @@ -0,0 +1,43 @@ +// +// JLOtaReConnectOption.h +// JL_OTALib +// +// Created by EzioChan on 2025/3/27. +// Copyright © 2025 www.zh-jieli.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface JLOtaReConnectOption : NSObject + +/// 是否需要使用设备认证 +@property (assign, nonatomic) BOOL deviceAuthorize; + +/// 握手(配对)秘钥 +@property(strong,nonatomic)NSData *__nullable authKey; + +/// 设备服务UUID +/// 默认是 AE00 +@property (strong, nonatomic) NSString *serviceUUID; + +///写特征 UUID +/// 默认是 AE01 +@property (strong, nonatomic) NSString *writeUUID; + +/// 读特征 UUID +/// 默认是 AE02 +@property (strong, nonatomic) NSString *readUUID; + +/// 是否需要响应的回应方式 +/// 默认是NO +@property (assign, nonatomic) BOOL isWriteWithResponse; + + + ++ (JLOtaReConnectOption *)defaultOption; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_OTALib.xcframework/ios-arm64_x86_64-simulator/JL_OTALib.framework/Headers/JL_OTALib.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_OTALib.xcframework/ios-arm64_x86_64-simulator/JL_OTALib.framework/Headers/JL_OTALib.h new file mode 100644 index 000000000..83d1764c2 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_OTALib.xcframework/ios-arm64_x86_64-simulator/JL_OTALib.framework/Headers/JL_OTALib.h @@ -0,0 +1,22 @@ +// +// JL_OTALib.h +// JL_OTALib +// +// Created by EzioChan on 2023/1/29. +// Copyright © 2023 www.zh-jieli.com. All rights reserved. +// + +#import + +//! Project version number for JL_OTALib. +FOUNDATION_EXPORT double JL_OTALibVersionNumber; + +//! Project version string for JL_OTALib. +FOUNDATION_EXPORT const unsigned char JL_OTALibVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import +#import +#import +#import +#import +#import diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_OTALib.xcframework/ios-arm64_x86_64-simulator/JL_OTALib.framework/Headers/JL_OTAManager.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_OTALib.xcframework/ios-arm64_x86_64-simulator/JL_OTALib.framework/Headers/JL_OTAManager.h new file mode 100644 index 000000000..02d53c94f --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_OTALib.xcframework/ios-arm64_x86_64-simulator/JL_OTALib.framework/Headers/JL_OTAManager.h @@ -0,0 +1,302 @@ +// +// JL_OTAManager.h +// JL_BLEKit +// +// Created by 杰理科技 on 2021/11/16. +// Copyright © 2021 www.zh-jieli.com. All rights reserved. +// + +#import +#import + +NS_ASSUME_NONNULL_BEGIN +@class JLOtaReConnectOption; + +typedef NS_ENUM(UInt16, JL_OTAResult) { + /// OTA升级成功 + JL_OTAResultSuccess = 0x00, + /// OTA升级失败 + JL_OTAResultFail = 0x01, + /// OTA升级数据为空 + JL_OTAResultDataIsNull = 0x02, + /// OTA指令失败 + JL_OTAResultCommandFail = 0x03, + /// OTA标示偏移查找失败 + JL_OTAResultSeekFail = 0x04, + /// OTA升级固件信息错误 + JL_OTAResultInfoFail = 0x05, + /// OTA升级设备电压低 + JL_OTAResultLowPower = 0x06, + /// 未能进入OTA升级模式 + JL_OTAResultEnterFail = 0x07, + /// OTA升级中 + JL_OTAResultUpgrading = 0x08, + /// OTA需重连设备(uuid方式) + JL_OTAResultReconnect = 0x09, + /// OTA需设备重启 + JL_OTAResultReboot = 0x0a, + /// OTA准备中 + JL_OTAResultPreparing = 0x0b, + /// OTA准备完成 + JL_OTAResultPrepared = 0x0f, + /// 设备已在升级中 + JL_OTAResultStatusIsUpdating = 0x10, + /// 当前固件多台设备连接,请手动断开另一个设备连接 + JL_OTAResultFailedConnectMore = 0x11, + /// 升级数据校验失败,SN 多次重复 + JL_OTAResultFailSameSN = 0xe0, + /// 升级取消 + JL_OTAResultCancel = 0xe1, + /// 升级数据校验失败 + JL_OTAResultFailVerification = 0xf1, + /// 升级失败 + JL_OTAResultFailCompletely = 0xf2, + /// 升级数据校验失败,加密Key不对 + JL_OTAResultFailKey = 0xf3, + /// 升级文件出错 + JL_OTAResultFailErrorFile = 0xf4, + /// uboot不匹配 + JL_OTAResultFailUboot = 0xf5, + /// 升级过程长度出错 + JL_OTAResultFailLenght = 0xf6, + /// 升级过程flash读写失败 + JL_OTAResultFailFlash = 0xf7, + /// 升级过程指令超时 + JL_OTAResultFailCmdTimeout = 0xf8, + /// 相同版本 + JL_OTAResultFailSameVersion = 0xf9, + /// TWS耳机未连接 + JL_OTAResultFailTWSDisconnect = 0xfa, + /// 耳机未在充电仓 + JL_OTAResultFailNotInBin = 0xfb, + /// OTA需重连设备(mac方式) + JL_OTAResultReconnectWithMacAddr = 0xfc, + /// OTA设备断开 + JL_OTAResultDisconnect = 0xfd, + /// OTA需重连设备(更新资源) + JL_OTAResultReconnectUpdateSource = 0xfe, + /// OTA未知错误 + JL_OTAResultUnknown +}; + +typedef NS_ENUM(UInt8, JL_OTAReconnectType) { + JL_OTAReconnectTypeUUID = 0x00, // OTA升级回连使用uuid + JL_OTAReconnectTypeMACAddr = 0x01, // OTA升级回连使用mac地址 +}; + +typedef NS_ENUM(UInt8, JL_OtaStatus) { + JL_OtaStatusNormal = 0, // 正常升级 + JL_OtaStatusForce = 1, // 强制升级 +}; +typedef NS_ENUM(UInt8, JL_OtaHeadset) { + JL_OtaHeadsetNO = 0, // 耳机单备份 正常升级 + JL_OtaHeadsetYES = 1, // 耳机单备份 强制升级 +}; + +typedef NS_ENUM(UInt8, JL_OtaWatch) { + JL_OtaWatchNO = 0, // 手表资源 正常升级 + JL_OtaWatchYES = 1, // 手表资源 强制升级 +}__attribute__((deprecated("This enum is deprecated. Use JLOtaSourcesExtendMode instead."))); + +/// OTA资源升级模式 +typedef NS_ENUM(UInt8, JLOtaSourcesExtendMode) { + /// 不启用 + JLSourcesExtendModeDisable = 0, + /// 启用普通资源升级模式 + JLSourcesExtendModeNormal = 1, + /// 启用只升级资源的模式 + JLSourcesExtendModeSourceOnly = 2, + /// 启用只升级固件程序的模式 + JLSourcesExtendModeFirmwareOnly = 3, +}; + +typedef NS_ENUM(UInt8, JL_BootLoader) { + JL_BootLoaderNO = 0, // 不需要下载Bootloader + JL_BootLoaderYES = 1, // 需要下载BootLoader +}; +typedef NS_ENUM(UInt8, JL_Partition) { + JL_PartitionSingle = 0, // 固件单备份 + JL_PartitionDouble = 1, // 固件双备份 +}; + +typedef void (^JL_OTA_RT)(JL_OTAResult result, float progress); + +typedef void (^JL_OTA_RESULT)(uint8_t status, uint8_t sn, NSData *__nullable data); + +@class JL_OTAManager; + +/// OTA 升级管理对象回调 +@protocol JL_OTAManagerDelegate + +/// 即将被发送的数据 +/// @param data 数据内容 +- (void)otaDataSend:(NSData *_Nonnull)data; + +@optional +/// 回调设备状态信息 +/// @param manager 对象状态 +- (void)otaFeatureResult:(JL_OTAManager *_Nonnull)manager; + +/// 回调升级状态以及进度等 +/// @param result 状态以及进度信息 +/// @param progress 进度信息 +- (void)otaUpgradeResult:(JL_OTAResult)result Progress:(float)progress; + +/// 取消OTA升级 +- (void)otaCancel; + +@end + +/// OTA升级管理对象 +@interface JL_OTAManager : NSObject + +/// 设备UUID(需要开发者填入) +@property(strong, nonatomic) NSString *mBLE_UUID; + +/// 设备名称(需要开发者填入) +@property(strong, nonatomic) NSString *mBLE_NAME; + +/// 是否仅仅支持BLE +@property(assign, nonatomic) BOOL bleOnly; + +/// ble蓝牙地址 +@property(strong, nonatomic) NSString *bleAddr; + +/// SN值 +@property(assign, nonatomic) uint8_t mCmdSN; + +/// 设备版本号 +@property(assign, nonatomic) uint16_t version; + +/// 设备版本信息 +@property(strong, nonatomic) NSString *versionFirmware; + +/// 设备OTA状态 +@property(assign, nonatomic) JL_OtaStatus otaStatus; + +/// 耳机单备份 是否需要强制升级 +@property(assign, nonatomic) JL_OtaHeadset otaHeadset; + +/// 手表资源 是否需要强制升级 +@property(assign, nonatomic) JL_OtaWatch otaWatch __attribute__((deprecated("This property is deprecated. Use otaSourceMode instead."))); + +/// 是否支持复用空间进行 OTA +@property(assign, nonatomic) BOOL isSupportReuseSpaceOTA; + +/// 是否支持 OTA 拓展功能 +@property (assign, nonatomic) BOOL isSupportExpand; + +/// 资源升级模式类型 +@property(assign, nonatomic) JLOtaSourcesExtendMode otaSourceMode; + +/// 设备OTA时支持单/双备份 +@property(assign, nonatomic) JL_Partition otaPartition; + +/// 设备是否需要下载Loader +@property(assign, nonatomic) JL_BootLoader bootloaderType; + +/// OTA升级回连方式 +@property(assign, nonatomic) JL_OTAReconnectType otaReconnectType; + +/// OTA升级内容大小(设备通知的) +@property(assign, nonatomic, readonly) int64_t otaLength; + +/// 已传输的数据大小 +@property(assign, nonatomic, readonly) uint32_t otaSent; + +/// 设备交互回调代理 +@property(weak, nonatomic) id delegate; + +/// 获取 OTA 升级对象 ++ (JL_OTAManager *)getOTAManager; + +/// 不建议使用自行初始化 +/// 推荐获取 getOTAManager +- (instancetype)init __attribute__((deprecated("Please use getOTAManager instead."))); + +/// 打印OTA发送的数据内容 +/// - Parameter status: 开关 +- (void)logSendData:(BOOL)status; + +/// 当BLE连接上时告知SDK +- (void)noteEntityConnected; + +/// 当BLE断开时告知SDK +- (void)noteEntityDisconnected; + +/// 设置最大丢包次数 +/// - Parameter count: 次数 +/// default: 10 +- (void)maxLostCount:(int)count; + +/// 设置超时时间 +/// - Parameter timeOut: 时间 +/// default: 5 +- (void)cmdTimeOut:(int)timeOut; + +/// 设置是否需要回连 +/// 一般不允许外部干扰状态机,外部不适用此方法 +/// - Parameter isReLink: 回连 +- (void)setOTARelink:(BOOL)isReLink __attribute__((deprecated("Can't be used externally."))); + +/// Receive data from rcsp +/// 设备端过来的数据 +/// - Parameter data: data +- (void)cmdOtaDataReceive:(NSData *)data; + +/// 查询设备OTA信息 +/// 所有情况下都需要执行,而且是在连上后(认证完成)第一步执行 +- (void)cmdTargetFeature; + +/// 查询设备系统状态 +/// 当设备需要挂载外置flash才能正常升级时需要执行,其他情况则无需执行 +- (void)cmdSystemFunction; + +/// OTA单备份,是否正在回连 +- (BOOL)cmdOtaIsRelinking; + +#pragma mark---> OTA升级 +/** + 开始OTA升级 + @param data 升级数据 + @param result 升级结果 + */ +- (void)cmdOTAData:(NSData *)data + Result:(JL_OTA_RT __nullable)result; + +/// OTA升级II +/// 单备份升级特有!!!! +/// 此接口可用于 OTA 回连成功后,再次发起升级使用 +/// @param result 升级结果回调 +- (void)cmdOtaDataIIResult:(JL_OTA_RT __nullable)result; + +/// OTA升级III +/// 单备份升级特有!!! +/// 此接口免去了公版 OTA 的外边回连策略,内部实现回连 +/// ⚠️使用此方法时不可使用 delegate 的回调信息,要使用 Result 的回调信息 +/// @param data OTA数据 +/// @param option 回连选项 +/// @param result 回复 +-(void)cmdUpgrade:(NSData *)data Option:(JLOtaReConnectOption *_Nullable)option Result:(JL_OTA_RT _Nonnull)result; + +/** + OTA升级取消 + @param result 回复 + */ +- (void)cmdOTACancelResult:(JL_OTA_RESULT __nullable)result; + +/// 重启设备 +- (void)cmdRebootDevice; + +/// 强制重启设备 +- (void)cmdRebootForceDevice; + +/// 重置OTA manager +- (void)resetOTAManager; + +/// 打印OTA SDK版本 ++ (NSString *)logSDKVersion; + +@end + +NS_ASSUME_NONNULL_END diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_OTALib.xcframework/ios-arm64_x86_64-simulator/JL_OTALib.framework/Headers/jl_ufw.h b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_OTALib.xcframework/ios-arm64_x86_64-simulator/JL_OTALib.framework/Headers/jl_ufw.h new file mode 100644 index 000000000..313c99ff0 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_OTALib.xcframework/ios-arm64_x86_64-simulator/JL_OTALib.framework/Headers/jl_ufw.h @@ -0,0 +1,207 @@ +/** + * Des: + * author: Bob + * date: 2022/11/29 + * Copyright: Jieli Technology + */ + +#ifndef NATIVEAPPLICATION_JL_UFW_H +#define NATIVEAPPLICATION_JL_UFW_H + + +#include +#include +#include +//#include +//#include +// +//#define tag "myJNI" +//#define logi(TAG, ...) ((void)__android_log_print(ANDROID_LOG_INFO, TAG, __VA_ARGS__)) +//#define logw(TAG, ...) ((void)__android_log_print(ANDROID_LOG_WARN, TAG, __VA_ARGS__)) +//#define loge(TAG, ...) ((void)__android_log_print(ANDROID_LOG_ERROR, TAG, __VA_ARGS__)) + +int parse_fw_info(const char *data, int size, uint8_t *resultBuff, uint32_t buffSize); +#define BIT(n) (1 << n) + +// for FW file +enum eFW_FILE_TYPE { + + FILE_TYPE_FW_FLASH_BIN = 0, // FLASH文件,第一块FLASH数据 + FILE_TYPE_FW_OTP_BIN = 1, // OTP文件 + FILE_TYPE_FW_INFO_LOG = 2, // FW文件中保存的描述信息 + FILE_TYPE_FW_BURN_CFG = 3, // 烧写器配置文件 + FILE_TYPE_FW_SCRIPT_DATA = 4, // 烧写器打包烧写器下载文件时,需要执行的脚本数据 + FILE_TYPE_FW_SRC = 5, // 需要保存在FW文件中的代码文件, FW文件查看/编辑器都不能显示这些数据 + FILE_TYPE_FW_NAME_BIN = 6, // 升级名字用的FW文件,已经废除 + FILE_TYPE_FW_OTP_VER_BIN = 7, // OTP maskrom版本 + FILE_TYPE_FW_OTPCFG_BIN = 8, // OTP配置信息 + FILE_TYPE_FW_OTP_CHIP_CONTROL_BIN = 9, // OTP芯片控制信息 + + FILE_TYPE_FW_OTP_MINI_UBOOT = 0xA, // 烧写到OTP的MINI UBOOT文件 + FILE_TYPE_FW_OTP_FIX_UBOOT = 0xB, // 烧写到OTP的FIX UBOOT文件 + FILE_TYPE_FW_FLASH_2_BIN = 0xC, // 第二块FLASH数据 + FILE_TYPE_FW_BR18_EFUSE_CONFIG_BIN = 0xD, // BR18 24BIT EFUSE配置数据 + FILE_TYPE_FW_RESOURCE_FILE = 0xE, // 资源文件 + FILE_TYPE_FW_2018KEY_INFO = 0xF, // 2018年的新KEY信息 + + FILE_TYPE_FW_BURNER_CUSTOMER_DATA = 0x10, // 一拖八烧写器用户信息 + FILE_TYPE_FW_BURNER_DV15_FLASH_BIN = 0x11, // 一拖八烧写器第一块FLASH数据 + FILE_TYPE_FW_BURNER_APP_FLASH_BIN = 0x12, // 一拖八烧写器第二块FLASH数据 + FILE_TYPE_FW_BURNER_DATA_FLASH_BIN = 0x13, // 一拖八烧写器第三块FLASH数据 + FILE_TYPE_FW_BURNER_BR21_FLASH_BIN = 0x14, // 一拖八烧写器第四块FLASH数据 + + FILE_TYPE_FW_FLASH_BIN_2 = 0x20, // 下载到第一块FLASH的文件,下载工具根据条件要么下载FILE_TYPE_FW_FLASH_BIN,要么下载FILE_TYPE_FW_FLASH_BIN_2 + FILE_TYPE_FW_FLASH_BIN_3, + FILE_TYPE_FW_FLASH_BIN_4, + + FILE_TYPE_FW_LOADER_BIN = 0x31, // 打包的LOADER程序代码 + + FILE_TYPE_FW_TEST_BOX_OTA_BIN = 0x64, // 测试盒使用的ota.bin + + FILE_TYPE_FW_3RD_DATA_FILE = 0x71, // 第三方烧写数据 + + FILE_TYPE_FW_OTA_TARGET_DEVICE_INFO = 0xA0, + FILE_TYPE_FW_BURN_COUNT_LIMIT = 0xA1, // 烧写授权信息 + + FILE_TYPE_FW_ADDITIONAL_FILE = 0xEE, // 附加文件,由烧写器根据名字决定用途 + FILE_TYPE_FW_PASSTHROUGH_DATA = 0xEF, // AC691X BTIF数据 + // 仅存在于FW文件中的数据 + FILE_TYPE_FW_HIDDEN_CFG_BIN = 0xFA, + FILE_TYPE_FW_INVISIBLE_DATA = 0xFB, // 保存在FW文件中的隐藏数据,FW文件查看/编辑器都不能显示这些数据 + FILE_TYPE_FW_VISIBLE_DATA = 0xFE, // 仅保存在FW文件中的HEX数据 + + FILE_TYPE_FW_TAIL = 0xFF, // FW文件尾部标识 +}; + +typedef struct U16BIT +{ + unsigned char b0 : 1; + unsigned char b1 : 1; + unsigned char b2 : 1; + unsigned char b3 : 1; + unsigned char b4 : 1; + unsigned char b5 : 1; + unsigned char b6 : 1; + unsigned char b7 : 1; + unsigned char b8 : 1; + unsigned char b9 : 1; + unsigned char b10 : 1; + unsigned char b11 : 1; + unsigned char b12 : 1; + unsigned char b13 : 1; + unsigned char b14 : 1; + unsigned char b15 : 1; + +} U16BIT; +typedef union UBIT16 +{ + U16BIT bits; + uint16_t val; +} UBIT16; + +typedef struct stRES_FILE_HEAD { + uint32_t u32Tag; + uint16_t u16Crc; + uint16_t u16CrcOfItems; + uint32_t u32Len; + uint16_t u16Count; + uint16_t u16Res; + uint8_t u8Res16[16]; +}RES_FILE_HEAD; + +typedef struct stRES_CONFIG_ITEM { + uint16_t u16Index; + uint16_t u16Type; + uint32_t u32Addr; + uint32_t u32Len; + uint16_t u16CrcOfData; + uint16_t u16Res; + char szName[16]; +}RES_CONFIG_ITEM; +static uint16_t m_u16ChipKey = 0xFFFF; +static uint16_t m_u16DefaultKey = 0xFFFF; + + +#pragma pack(1) +#define JL_FILE_ITEM_NAME_MAX_LEN 16 +#define JL_CHIP_KEY_ENC_LENGTH 32 + +typedef struct stUFW_SYD_HEAD_V1 { + uint16_t u16Crc; // crc16 for this struct + uint16_t u16CrcOfSydFileHead; + uint32_t u32FileLength; // file length + uint16_t u16FileCount; // 此FW文件中包含的子文件个数 + uint16_t u16Version; + uint32_t u32Res; + char szChipName[16]; // 此FW文件对应的芯片类型,如AC690X,AC691X + uint32_t u32Res2[4]; + uint32_t u32Res3[4]; +}UFW_SYD_HEAD_V1; + +typedef struct stUFW_FILE_HEAD_V1 { + uint8_t u8FileType; // 文件类型 + uint8_t u8Res; // 保留 + uint16_t u16Index; // 文件索引号 + uint16_t u16Crc; // 明文数据的校验码 + uint16_t u16Version; // 本结构体版本 + uint32_t u32Addr; // 地址 + uint32_t u32Length; // 数据长度 + uint32_t u32AllLength; // 数据长度+尾部对齐的数据长度 + uint32_t u32EncryptedAddr; // 加密数据的地址偏移(相对u32Addr的地址) + uint32_t u32EncryptedLength; // 加密的数据长度 + uint32_t u32Res; // 保留 + uint32_t u64Res1[4]; // 保留 + uint32_t u64Res2[4]; // 保留 + char name[JL_FILE_ITEM_NAME_MAX_LEN]; + +}UFW_FILE_HEAD_V1; + +typedef struct stJL_FILE_TAIL { + char szChipKey[JL_CHIP_KEY_ENC_LENGTH]; // 32 // 固定位置 + uint16_t u16ChipKeyCRC16; // 34 // 固定位置 + uint8_t u8Magic[6]; // 40 // 固定位置 + uint8_t u8Res8[8]; // 48 + char szTailChipName[6]; // 54 // 固定位置 + uint8_t u8Reserv10[10]; // 64 +}JL_FILE_TAIL; + +typedef struct { + char szName[3]; + char szVersion[3]; + uint8_t u8Flag; + uint8_t u8Res; + uint32_t u32Crc; + uint16_t u16Crc; + uint16_t u16Res; +}JL_FLASH_BIN_TAIL; + +typedef UFW_SYD_HEAD_V1 jl_ufw_syd_head; +typedef UFW_FILE_HEAD_V1 jl_ufw_file_head; +typedef JL_FILE_TAIL jl_ufw_tail; + +typedef struct stJL_BR22_FLASH_HEAD { + uint16_t u16Crc; // 结构体自身校验码 + uint8_t u8SizeForBurner; // 为烧写器保留的空间大小 + uint8_t u8Version; // FLASH FS版本号 + char vid[4]; // 4byte的vid + uint32_t u32FlashSize; // FLASH大小,由isd_download计算得出 + uint8_t u8FsVersion; // 类型:br18/br22 + uint8_t u8BlockAlingnModulus; // 对齐系数 + uint8_t u8Res; // 保留,以后有可能会用于存放顶层目录的偏移和文件目录内偏移信息 + uint8_t u8SpecialOptFlag; // 用于标记是否需要生成2种flash格式的标记位,目前只用1位,以后如果需要特殊操作需要标记,再用其他位 + char pid[16]; // 16byte的pid +}JL_BR22_FLASH_HEAD; + + + + + + + + + + +#pragma pack() + + +#endif //NATIVEAPPLICATION_JL_UFW_H diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_OTALib.xcframework/ios-arm64_x86_64-simulator/JL_OTALib.framework/Info.plist b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_OTALib.xcframework/ios-arm64_x86_64-simulator/JL_OTALib.framework/Info.plist new file mode 100644 index 000000000..6618e678c Binary files /dev/null and b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_OTALib.xcframework/ios-arm64_x86_64-simulator/JL_OTALib.framework/Info.plist differ diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_OTALib.xcframework/ios-arm64_x86_64-simulator/JL_OTALib.framework/JL_OTALib b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_OTALib.xcframework/ios-arm64_x86_64-simulator/JL_OTALib.framework/JL_OTALib new file mode 100755 index 000000000..5c9ec35d6 Binary files /dev/null and b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_OTALib.xcframework/ios-arm64_x86_64-simulator/JL_OTALib.framework/JL_OTALib differ diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_OTALib.xcframework/ios-arm64_x86_64-simulator/JL_OTALib.framework/Modules/module.modulemap b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_OTALib.xcframework/ios-arm64_x86_64-simulator/JL_OTALib.framework/Modules/module.modulemap new file mode 100644 index 000000000..fbeacb707 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_OTALib.xcframework/ios-arm64_x86_64-simulator/JL_OTALib.framework/Modules/module.modulemap @@ -0,0 +1,6 @@ +framework module JL_OTALib { + umbrella header "JL_OTALib.h" + export * + + module * { export * } +} diff --git a/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_OTALib.xcframework/ios-arm64_x86_64-simulator/JL_OTALib.framework/_CodeSignature/CodeResources b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_OTALib.xcframework/ios-arm64_x86_64-simulator/JL_OTALib.framework/_CodeSignature/CodeResources new file mode 100644 index 000000000..c5d8627c8 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Frameworks/JL_OTALib.xcframework/ios-arm64_x86_64-simulator/JL_OTALib.framework/_CodeSignature/CodeResources @@ -0,0 +1,207 @@ + + + + + files + + Headers/JLOTAFile.h + + OCi8PoI3GQr4HUxHQQytlXYCxe8= + + Headers/JLOtaCustom.h + + ohGYE+IOCliAaeZaO5VdRBwHvWo= + + Headers/JLOtaReConnectOption.h + + xqKc873u51zqagJXS172BK6h9Tg= + + Headers/JL_OTALib.h + + tH9kHWi/DKzq8j2NoSg0wXoBAro= + + Headers/JL_OTAManager.h + + PMESdvB6Bcu7gn1YJqH1tOi0eEw= + + Headers/jl_ufw.h + + KBTDPNzyz3mtGLkvJLZ7GIRKNeM= + + Info.plist + + L1sSyhac1P15lar1/muRvYYRCUI= + + Modules/module.modulemap + + Djaqrf2BV/5uLRNN6e4M1DPfyG4= + + + files2 + + Headers/JLOTAFile.h + + hash + + OCi8PoI3GQr4HUxHQQytlXYCxe8= + + hash2 + + lz4Ha2Z62XzIHqsHW1574zMjx1W+IhrqaCJK8HGIs/o= + + + Headers/JLOtaCustom.h + + hash + + ohGYE+IOCliAaeZaO5VdRBwHvWo= + + hash2 + + KntKbJMahP2WujBsJDiGFbjDQvJdw3yo3CqTohYnPcE= + + + Headers/JLOtaReConnectOption.h + + hash + + xqKc873u51zqagJXS172BK6h9Tg= + + hash2 + + obE+hckXBKKcYUtitl4rad/7W1Bi5ciNOH3ZPml7hY4= + + + Headers/JL_OTALib.h + + hash + + tH9kHWi/DKzq8j2NoSg0wXoBAro= + + hash2 + + /E9fkD4b67lRdPY5BqxqffRv3H48y1qpNWHYw+a65Cg= + + + Headers/JL_OTAManager.h + + hash + + PMESdvB6Bcu7gn1YJqH1tOi0eEw= + + hash2 + + uHRHY8s9UMaaynCPFZOCTid9vmTW5l5PVNI5pAyQK/I= + + + Headers/jl_ufw.h + + hash + + KBTDPNzyz3mtGLkvJLZ7GIRKNeM= + + hash2 + + l3c9CmVcHyBHIxKSG6GlCBpaZjnp6+fd4iKu2jGMyuE= + + + Modules/module.modulemap + + hash + + Djaqrf2BV/5uLRNN6e4M1DPfyG4= + + hash2 + + CQv4Q+xyzKhKSJpAY8gU98Qv9Wv1W16ILQ5MGAKukrA= + + + + rules + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^version.plist$ + + + rules2 + + .*\.dSYM($|/) + + weight + 11 + + ^(.*/)?\.DS_Store$ + + omit + + weight + 2000 + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^Info\.plist$ + + omit + + weight + 20 + + ^PkgInfo$ + + omit + + weight + 20 + + ^embedded\.provisionprofile$ + + weight + 20 + + ^version\.plist$ + + weight + 20 + + + + diff --git a/local_plugins/device_jieli/ios/device_jieli/Package.swift b/local_plugins/device_jieli/ios/device_jieli/Package.swift new file mode 100644 index 000000000..638a3b420 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Package.swift @@ -0,0 +1,53 @@ +// swift-tools-version: 5.9 +// +// 杰理 RCSP SDK Flutter plugin —— iOS 走 Swift Package Manager。 +// +// 所有杰理官方 xcframework(含 OPUS 编解码用的 JLAudioUnitKit)都作为 +// 本 plugin 的私有 binaryTarget,放在 `Frameworks/` 下。Package 不依赖 +// 任何其他本地 plugin —— 自包含。 + +import PackageDescription + +let package = Package( + name: "device_jieli", + platforms: [ + .iOS("12.0"), + ], + products: [ + // Flutter 约定:library 产品名用 dash,target 名用 underscore + .library(name: "device-jieli", targets: ["device_jieli"]), + ], + dependencies: [], + targets: [ + .target( + name: "device_jieli", + dependencies: [ + "JL_BLEKit", + "JL_OTALib", + "JL_AdvParse", + "JL_HashPair", + "JLLogHelper", + "JLAudioUnitKit", + "JLBmpConvertKit", + "JLDialUnit", + "JLPackageResKit", + ], + path: "Sources/device_jieli", + linkerSettings: [ + .linkedFramework("CoreBluetooth"), + .linkedFramework("AVFoundation"), + .linkedFramework("UIKit"), + .linkedFramework("Foundation"), + ] + ), + .binaryTarget(name: "JL_BLEKit", path: "Frameworks/JL_BLEKit.xcframework"), + .binaryTarget(name: "JL_OTALib", path: "Frameworks/JL_OTALib.xcframework"), + .binaryTarget(name: "JL_AdvParse", path: "Frameworks/JL_AdvParse.xcframework"), + .binaryTarget(name: "JL_HashPair", path: "Frameworks/JL_HashPair.xcframework"), + .binaryTarget(name: "JLLogHelper", path: "Frameworks/JLLogHelper.xcframework"), + .binaryTarget(name: "JLAudioUnitKit", path: "Frameworks/JLAudioUnitKit.xcframework"), + .binaryTarget(name: "JLBmpConvertKit", path: "Frameworks/JLBmpConvertKit.xcframework"), + .binaryTarget(name: "JLDialUnit", path: "Frameworks/JLDialUnit.xcframework"), + .binaryTarget(name: "JLPackageResKit", path: "Frameworks/JLPackageResKit.xcframework"), + ] +) diff --git a/local_plugins/device_jieli/ios/device_jieli/Sources/device_jieli/EventDispatcher.swift b/local_plugins/device_jieli/ios/device_jieli/Sources/device_jieli/EventDispatcher.swift new file mode 100644 index 000000000..402c3f049 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Sources/device_jieli/EventDispatcher.swift @@ -0,0 +1,74 @@ +import Flutter +import Foundation + +/// 与 Android 端 `EventDispatcher` 同语义: +/// - 内部维护一个 `FlutterEventSink` 与一组 native 监听器 +/// - `send(_:)` 一次同时分发给两边 +/// - Flutter 端事件强制在 main thread 投递 +public final class EventDispatcher: NSObject, FlutterStreamHandler { + + public typealias NativeListener = (_ payload: [String: Any?]) -> Void + + private let lock = NSLock() + private var sink: FlutterEventSink? + private var nativeListeners: [(UUID, NativeListener)] = [] + + public override init() { super.init() } + + // MARK: - FlutterStreamHandler + + public func onListen(withArguments arguments: Any?, eventSink events: @escaping FlutterEventSink) -> FlutterError? { + lock.lock(); defer { lock.unlock() } + sink = events + return nil + } + + public func onCancel(withArguments arguments: Any?) -> FlutterError? { + lock.lock(); defer { lock.unlock() } + sink = nil + return nil + } + + // MARK: - Native subscription + + @discardableResult + public func addNativeListener(_ listener: @escaping NativeListener) -> UUID { + let id = UUID() + lock.lock() + nativeListeners.append((id, listener)) + lock.unlock() + return id + } + + public func removeNativeListener(_ id: UUID) { + lock.lock() + nativeListeners.removeAll { $0.0 == id } + lock.unlock() + } + + // MARK: - Send + + /// 直接外抛事件。同时通知 native 监听器和 Flutter sink。 + /// payload 必须是 plugin-channel 可序列化的形态(基本类型 / Map / List / FlutterStandardTypedData)。 + public func send(_ payload: [String: Any?]) { + // native 监听同步派发(在调用方线程,避免高频音频帧切换 thread 的额外开销) + let listeners: [NativeListener] + let sinkCopy: FlutterEventSink? + lock.lock() + listeners = nativeListeners.map { $0.1 } + sinkCopy = sink + lock.unlock() + + for l in listeners { l(payload) } + + guard let s = sinkCopy else { return } + let cleaned = payload.reduce(into: [String: Any]()) { acc, kv in + if let v = kv.value { acc[kv.key] = v } + } + if Thread.isMainThread { + s(cleaned) + } else { + DispatchQueue.main.async { s(cleaned) } + } + } +} diff --git a/local_plugins/device_jieli/ios/device_jieli/Sources/device_jieli/JieliHomeServer.swift b/local_plugins/device_jieli/ios/device_jieli/Sources/device_jieli/JieliHomeServer.swift new file mode 100644 index 000000000..0e84e8822 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Sources/device_jieli/JieliHomeServer.swift @@ -0,0 +1,119 @@ +import CoreBluetooth +import Foundation +import JL_BLEKit +import JL_OTALib +import JLLogHelper + +/// 全局单例。与 Android `JieliHomeServer` 对应: +/// - 持有 `JL_BLEMultiple`(搜索 + 连接 + 已连 entity 列表) +/// - 持有 `JL_OTAManager` 引用(OTA 由 SDK 暴露的单例) +/// - 持有 per-device [TranslationSession],**全平台单一翻译入口** +/// - 各 feature 模块通过 [translationSession(for:)] 拿当前会话, +/// 与 Android 通过 `JL_BluetoothManager.connectedDevice + TranslationImpl` 等价。 +public final class JieliHomeServer: NSObject { + + public static let shared = JieliHomeServer() + + public let dispatcher = EventDispatcher() + + public private(set) var initialized: Bool = false + + public let bleMultiple: JL_BLEMultiple = JL_BLEMultiple() + public var otaManager: JL_OTAManager { JL_OTAManager.getOTAManager() } + + // MARK: - Per-device translation sessions + + private var sessions: [String: TranslationSession] = [:] + private let sessionsLock = NSLock() + + /// 取或新建给定设备的翻译会话。会话生命周期与连接绑定(断开时 [removeTranslationSession])。 + public func translationSession(for uuid: String) -> TranslationSession? { + guard let entity = connectedEntity(forUuid: uuid) else { return nil } + let mgr = entity.mCmdManager + sessionsLock.lock(); defer { sessionsLock.unlock() } + if let exist = sessions[uuid] { return exist } + let s = TranslationSession(uuid: uuid, manager: mgr) + sessions[uuid] = s + return s + } + + public func currentTranslationSession() -> TranslationSession? { + guard let entity = currentConnectedEntity() else { return nil } + return translationSession(for: entity.mUUID ?? "") + } + + public func removeTranslationSession(uuid: String) { + sessionsLock.lock(); defer { sessionsLock.unlock() } + sessions.removeValue(forKey: uuid) + } + + // MARK: - Feature modules + + public private(set) lazy var scanFeature: ScanFeature = ScanFeature(server: self) + public private(set) lazy var connectFeature: ConnectFeature = ConnectFeature(server: self) + public private(set) lazy var deviceInfoFeature: DeviceInfoFeature = DeviceInfoFeature(server: self) + public private(set) lazy var customCmdFeature: CustomCmdFeature = CustomCmdFeature(server: self) + public private(set) lazy var translationFeature: TranslationFeature = TranslationFeature(server: self) + public private(set) lazy var speechFeature: SpeechFeature = SpeechFeature(server: self) + public private(set) lazy var assistantBridge: AssistantBridge = AssistantBridge(server: self) + public private(set) lazy var deviceRecordFeature: DeviceRecordFeature = DeviceRecordFeature(server: self) + public private(set) lazy var otaFeature: OtaFeature = OtaFeature(server: self) + + // MARK: - Event forwarder + + private var bluetoothForwarder: BluetoothEventForwarder? + private var customForwarder: CustomEventForwarder? + private var deviceInfoForwarder: DeviceInfoEventForwarder? + + private override init() { super.init() } + + public func initialize(multiDevice: Bool, skipNoNameDev: Bool, enableLog: Bool) { + if initialized { return } + + JLLogManager.clearLog() + JLLogManager.setLog(enableLog, isMore: false, level: .DEBUG) + JLLogManager.log(withTimestamp: true) + JLLogManager.saveLog(asFile: enableLog) + + bleMultiple.ble_FILTER_ENABLE = false + bleMultiple.ble_TIMEOUT = 10 + bleMultiple.authEnable = true + + let btFwd = BluetoothEventForwarder(server: self) + btFwd.attach() + bluetoothForwarder = btFwd + + let customFwd = CustomEventForwarder(server: self) + customFwd.attach() + customForwarder = customFwd + + let infoFwd = DeviceInfoEventForwarder(server: self) + infoFwd.attach() + deviceInfoForwarder = infoFwd + + // 提前实例化 ScanFeature,让它的 CBCentralManager 趁早创建, + // 等用户第一次 startScan 时 state 已经 poweredOn。 + _ = scanFeature + + initialized = true + } + + // MARK: - Helpers + + /// 通过 BLE UUID 找到已搜索 / 已连接到的 entity + public func entity(forUuid uuid: String) -> JL_EntityM? { + let pool: [JL_EntityM] = (bleMultiple.bleConnectedArr as? [JL_EntityM] ?? []) + + (bleMultiple.blePeripheralArr as? [JL_EntityM] ?? []) + return pool.first { $0.mUUID == uuid } + } + + public func connectedEntity(forUuid uuid: String) -> JL_EntityM? { + let pool = bleMultiple.bleConnectedArr as? [JL_EntityM] ?? [] + return pool.first { $0.mUUID == uuid } + } + + public func currentConnectedEntity() -> JL_EntityM? { + let pool = bleMultiple.bleConnectedArr as? [JL_EntityM] ?? [] + return pool.first + } +} diff --git a/local_plugins/device_jieli/ios/device_jieli/Sources/device_jieli/JielihomePlugin.swift b/local_plugins/device_jieli/ios/device_jieli/Sources/device_jieli/JielihomePlugin.swift new file mode 100644 index 000000000..101aadb72 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Sources/device_jieli/JielihomePlugin.swift @@ -0,0 +1,36 @@ +import Flutter +import UIKit + +@objc public class JielihomePlugin: NSObject, FlutterPlugin { + + private var router: MethodRouter? + + @objc public static func register(with registrar: FlutterPluginRegistrar) { + let methodChannel = FlutterMethodChannel( + name: "device_jieli/method", + binaryMessenger: registrar.messenger() + ) + let eventChannel = FlutterEventChannel( + name: "device_jieli/event", + binaryMessenger: registrar.messenger() + ) + + let server = JieliHomeServer.shared + let plugin = JielihomePlugin() + let router = MethodRouter(server: server) + plugin.router = router + + methodChannel.setMethodCallHandler { [weak router] call, result in + router?.handle(call: call, result: result) + } + eventChannel.setStreamHandler(server.dispatcher) + + registrar.addMethodCallDelegate(plugin, channel: methodChannel) + } + + public func handle(_ call: FlutterMethodCall, result: @escaping FlutterResult) { + // 真正的 method 分派在 setMethodCallHandler 闭包里直接走 router; + // 这里仅是 FlutterPlugin 协议要求。 + router?.handle(call: call, result: result) + } +} diff --git a/local_plugins/device_jieli/ios/device_jieli/Sources/device_jieli/MethodRouter.swift b/local_plugins/device_jieli/ios/device_jieli/Sources/device_jieli/MethodRouter.swift new file mode 100644 index 000000000..ed3b85aa1 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Sources/device_jieli/MethodRouter.swift @@ -0,0 +1,302 @@ +import Flutter +import Foundation + +/// 与 Android 端 `MethodRouter` 同语义:把 Dart MethodChannel 调用映射到 server 内的各 feature 模块。 +/// 任何 throws/exception 统一兜底 `PLUGIN_ERR`,避免 Dart 端拿到悬空 Future。 +public final class MethodRouter { + + private let server: JieliHomeServer + public init(server: JieliHomeServer) { self.server = server } + + public func handle(call: FlutterMethodCall, result: @escaping FlutterResult) { + let args = (call.arguments as? [String: Any]) ?? [:] + do { + try route(method: call.method, args: args, result: result) + } catch { + result(FlutterError(code: "PLUGIN_ERR", message: error.localizedDescription, details: nil)) + } + } + + private func route(method: String, args: [String: Any], result: @escaping FlutterResult) throws { + switch method { + case "getPlatformVersion": + result("iOS \(UIDevice.current.systemVersion)") + + case "initialize": + server.initialize( + multiDevice: args["multiDevice"] as? Bool ?? true, + skipNoNameDev: args["skipNoNameDev"] as? Bool ?? false, + enableLog: args["enableLog"] as? Bool ?? false + ) + result(true) + + // ───── Scan ───── + case "startScan": + let timeoutMs = (args["timeoutMs"] as? NSNumber)?.intValue ?? 30_000 + let nameList = args["nameList"] as? [String] ?? [] + let uuidList = args["uuidList"] as? [String] ?? [] + let skipUnnamed = args["skipUnnamed"] as? Bool ?? true + do { + try server.scanFeature.startScan( + timeoutMs: timeoutMs, + nameList: nameList, + uuidList: uuidList, + skipUnnamed: skipUnnamed + ) + result(true) + } catch { + result(FlutterError(code: "SCAN_FAILED", message: error.localizedDescription, details: nil)) + } + + case "stopScan": + server.scanFeature.stopScan() + result(true) + + case "isScanning": + result(server.scanFeature.isScanning) + + // ───── Connect ───── + case "connect": + guard let address = args["address"] as? String, !address.isEmpty else { + result(FlutterError(code: "BAD_ARG", message: "address required", details: nil)); return + } + server.connectFeature.connect( + bleAddress: address, + edrAddress: args["edrAddr"] as? String, + deviceType: (args["deviceType"] as? NSNumber)?.intValue ?? -1, + connectWay: (args["connectWay"] as? NSNumber)?.intValue ?? 0, + // Dart 侧明确传 dualConnect=true 才做 BR/EDR 桥接升级,默认纯 BLE。 + dualConnect: (args["dualConnect"] as? Bool) ?? false + ) { ok, errMsg in + if ok { result(true) } + else { result(FlutterError(code: "CONNECT_FAILED", message: errMsg ?? "connect failed", details: nil)) } + } + + case "disconnect": + guard let address = args["address"] as? String, !address.isEmpty else { + result(FlutterError(code: "BAD_ARG", message: "address required", details: nil)); return + } + server.connectFeature.disconnect(address: address) { ok, errMsg in + if ok { result(true) } + else { result(FlutterError(code: "DISCONNECT_FAILED", message: errMsg ?? "disconnect failed", details: nil)) } + } + + case "isConnected": + guard let address = args["address"] as? String, !address.isEmpty else { + result(FlutterError(code: "BAD_ARG", message: "address required", details: nil)); return + } + result(server.connectFeature.isConnected(address: address)) + + case "connectedDevice": + if let info = server.connectFeature.connectedDeviceInfo() { + result(info) + } else { + result(nil) + } + + // ───── Device info ───── + case "deviceSnapshot": + guard let address = args["address"] as? String, !address.isEmpty else { + result(FlutterError(code: "BAD_ARG", message: "address required", details: nil)); return + } + result(server.deviceInfoFeature.snapshot(address: address)) + + case "queryTargetInfo": + guard let address = args["address"] as? String, !address.isEmpty else { + result(FlutterError(code: "BAD_ARG", message: "address required", details: nil)); return + } + let mask = (args["mask"] as? NSNumber)?.intValue ?? 0x0F + server.deviceInfoFeature.queryTargetInfo(address: address, mask: mask) { info, errCode, errMsg in + if let info = info { result(info) } + else { result(FlutterError(code: "TARGET_INFO_ERR", message: errMsg ?? "query failed", details: errCode)) } + } + + // ───── Custom cmd ───── + case "sendCustomCmd": + guard let address = args["address"] as? String, !address.isEmpty else { + result(FlutterError(code: "BAD_ARG", message: "address required", details: nil)); return + } + guard let opCode = (args["opCode"] as? NSNumber)?.intValue else { + result(FlutterError(code: "BAD_ARG", message: "opCode required", details: nil)); return + } + let payloadBytes: [UInt8] = { + if let arr = args["payload"] as? [Int] { return arr.map { UInt8(truncatingIfNeeded: $0) } } + if let arr = args["payload"] as? [NSNumber] { return arr.map { UInt8(truncatingIfNeeded: $0.intValue) } } + if let typed = args["payload"] as? FlutterStandardTypedData { + return [UInt8](typed.data) + } + return [] + }() + server.customCmdFeature.send(address: address, opCode: opCode, payload: Data(payloadBytes)) { ok, data, errCode, errMsg in + if ok { + result(data.map { [UInt8]($0) } ?? []) + } else { + result(FlutterError(code: "CUSTOM_CMD_ERR", message: errMsg ?? "custom cmd failed", details: errCode)) + } + } + + // ───── Translation ───── + case "startTranslation": + guard let modeId = (args["modeId"] as? NSNumber)?.intValue else { + result(FlutterError(code: "BAD_ARG", message: "modeId required", details: nil)); return + } + let innerArgs = args["args"] as? [String: Any] ?? [:] + print("[JieliRouter] startTranslation modeId=\(modeId) args=\(innerArgs) " + + "assistantRunning=\(server.assistantBridge.isRunning) " + + "deviceRecording=\(server.deviceRecordFeature.isRecording) " + + "translationWorking=\(server.translationFeature.isWorking)") + // 设备录音 / AI 助理 与翻译互斥(同一 JLTranslationManager session) + if server.assistantBridge.isRunning { + print("[JieliRouter] startTranslation: stopping AssistantBridge first") + server.assistantBridge.stop() + } + if server.deviceRecordFeature.isRecording { + print("[JieliRouter] startTranslation: stopping DeviceRecord first") + server.deviceRecordFeature.stop() + } + server.translationFeature.start(modeId: modeId, args: innerArgs) { ok, errMsg in + print("[JieliRouter] startTranslation result modeId=\(modeId) ok=\(ok) err=\(errMsg ?? "nil")") + if ok { result(true) } + else { result(FlutterError(code: "TRANSLATION_ERR", message: errMsg ?? "start failed", details: nil)) } + } + + case "stopTranslation": + server.translationFeature.stop() + result(true) + + case "translationStatus": + result([ + "working": server.translationFeature.isWorking, + "modeId": server.translationFeature.currentModeId as Any, + "inputStreams": server.translationFeature.currentInputStreams, + "outputStreams": server.translationFeature.currentOutputStreams, + ] as [String: Any?]) + + case "feedTranslatedAudio": + guard let streamId = args["streamId"] as? String else { + result(FlutterError(code: "BAD_ARG", message: "streamId required", details: nil)); return + } + guard let pcm = (args["pcm"] as? FlutterStandardTypedData)?.data else { + result(FlutterError(code: "BAD_ARG", message: "pcm required", details: nil)); return + } + let sr = (args["sampleRate"] as? NSNumber)?.intValue ?? 16000 + let ch = (args["channels"] as? NSNumber)?.intValue ?? 1 + let bits = (args["bitsPerSample"] as? NSNumber)?.intValue ?? 16 + let isFinal = args["final"] as? Bool ?? false + // 诊断:只在段尾或路由失败时打。 + let ok = server.translationFeature.feedTranslatedAudio( + streamId: streamId, + pcm: pcm, + sampleRate: sr, channels: ch, bitsPerSample: bits, + isFinal: isFinal + ) + if isFinal || !ok { + NSLog("[MethodRouter] feedTranslatedAudio streamId=%@ pcm=%dB isFinal=%@ routed=%@", + streamId, pcm.count, isFinal ? "true" : "false", ok ? "true" : "false") + } + result(ok) + + case "feedTranslationResult": + server.translationFeature.feedTranslationResult( + srcLang: args["srcLang"] as? String, + srcText: args["srcText"] as? String, + destLang: args["destLang"] as? String, + destText: args["destText"] as? String, + requestId: args["requestId"] as? String + ) + result(true) + + case "isSupportCallTranslationWithStereo": + result(server.translationFeature.isSupportCallTranslationWithStereo(address: args["address"] as? String)) + + case "feedAudioFilePcm": + guard let pcm = (args["pcm"] as? FlutterStandardTypedData)?.data else { + result(FlutterError(code: "BAD_ARG", message: "pcm required", details: nil)); return + } + let sr = (args["sampleRate"] as? NSNumber)?.intValue ?? 16000 + result(server.translationFeature.feedAudioFilePcm(pcm: pcm, sampleRate: sr)) + + // ───── Speech assistant (cmd=4/5/210 路径) ───── + case "speechIsRecording": + result(server.speechFeature.isRecording(address: args["address"] as? String)) + + case "speechStart": + server.speechFeature.start( + address: args["address"] as? String, + voiceType: (args["voiceType"] as? NSNumber)?.intValue ?? 2, + sampleRate: (args["sampleRate"] as? NSNumber)?.intValue ?? 16, + vadWay: (args["vadWay"] as? NSNumber)?.intValue ?? 0 + ) { ok, msg in + if ok { result(true) } + else { result(FlutterError(code: "SPEECH_START_ERR", message: msg ?? "speech start failed", details: nil)) } + } + + case "speechStop": + server.speechFeature.stop( + address: args["address"] as? String, + reason: (args["reason"] as? NSNumber)?.intValue ?? 0 + ) { ok, msg in + if ok { result(true) } + else { result(FlutterError(code: "SPEECH_STOP_ERR", message: msg ?? "speech stop failed", details: nil)) } + } + + // ───── AI 助理通路 ───── + case "assistantStart": + if server.translationFeature.isWorking { server.translationFeature.stop() } + if server.deviceRecordFeature.isRecording { server.deviceRecordFeature.stop() } + let ok = server.assistantBridge.start( + address: args["address"] as? String, + sampleRate: (args["sampleRate"] as? NSNumber)?.intValue ?? 16000 + ) + if ok { result(true) } + else { result(FlutterError(code: "ASSISTANT_START_ERR", message: "assistant bridge start failed", details: nil)) } + + case "assistantStop": + server.assistantBridge.stop() + result(true) + + case "assistantIsRunning": + result(server.assistantBridge.isRunning) + + // ───── 设备录音 ───── + case "deviceRecordStart": + let innerArgs = args["args"] as? [String: Any] ?? [:] + if server.translationFeature.isWorking { server.translationFeature.stop() } + if server.assistantBridge.isRunning { server.assistantBridge.stop() } + server.deviceRecordFeature.start(args: innerArgs) { ok, errMsg in + if ok { result(true) } + else { result(FlutterError(code: "DEVICE_RECORD_ERR", message: errMsg ?? "device record start failed", details: nil)) } + } + + case "deviceRecordStop": + server.deviceRecordFeature.stop() + result(true) + + case "deviceRecordStatus": + result(["recording": server.deviceRecordFeature.isRecording]) + + // ───── OTA ───── + case "otaStart": + guard let path = args["firmwareFilePath"] as? String, !path.isEmpty else { + result(FlutterError(code: "BAD_ARG", message: "firmwareFilePath required", details: nil)); return + } + server.otaFeature.start( + address: args["address"] as? String, + firmwareFilePath: path, + blockSize: (args["blockSize"] as? NSNumber)?.intValue ?? 512, + fileFlagBytes: (args["fileFlag"] as? FlutterStandardTypedData)?.data ?? Data() + ) + result(true) + + case "otaCancel": + server.otaFeature.cancel() + result(true) + + case "otaIsRunning": + result(server.otaFeature.isRunning) + + default: + result(FlutterMethodNotImplemented) + } + } +} diff --git a/local_plugins/device_jieli/ios/device_jieli/Sources/device_jieli/audio/OpusStreamCodec.swift b/local_plugins/device_jieli/ios/device_jieli/Sources/device_jieli/audio/OpusStreamCodec.swift new file mode 100644 index 000000000..e64f4846d --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Sources/device_jieli/audio/OpusStreamCodec.swift @@ -0,0 +1,200 @@ +import Foundation +import JLAudioUnitKit + +/// OPUS 流式解码器 —— 与 Android `OpusStreamDecoder` 同语义。 +/// +/// 输入:从耳机收到的 OPUS 编码帧(一次一帧,最大 ~80B) +/// 输出:16kHz / 给定声道 PCM 流(16-bit signed little-endian, interleaved) +/// +/// **dataSize 是单个 OPUS 帧的实际字节大小**: +/// - 16k / 16bit / mono / 20ms ≈ 40 B +/// - 16k / 16bit / stereo / 20ms ≈ 80 B +/// +/// 这与 Android `OpusStreamDecoder.packetSize` 对齐:传错值会导致 OpusManager 把多帧拼成 +/// 一帧解,丢 80% 数据。 +public final class OpusStreamDecoder { + + private let proxy: OpusDecoderProxy + private let decoder: JLOpusDecoder + + public init( + channels: Int = 1, + dataSize: Int = 40, + sampleRate: Int = 16000, + hasDataHeader: Bool = false, + onPcm: @escaping (Data) -> Void, + onError: @escaping (Int, String?) -> Void = { _, _ in } + ) { + let fmt = JLOpusFormat.defaultFormats() + fmt.sampleRate = Int32(sampleRate) + fmt.channels = Int32(channels) + fmt.frameDuration = 20 + fmt.dataSize = Int32(dataSize) + fmt.hasDataHeader = hasDataHeader + + let proxy = OpusDecoderProxy(onPcm: onPcm, onError: onError) + self.proxy = proxy + self.decoder = JLOpusDecoder(decoder: fmt, delegate: proxy) + } + + public func feed(_ opus: Data) { + decoder.opusDecoderInputData(opus) + } + + public func release() { + decoder.opusOnRelease() + } +} + +/// JLOpusDecoder 的 delegate 是 `weak`,Swift class 直接做 delegate 会被立刻 dealloc。 +/// 我们让 OpusStreamDecoder 强引用这个 proxy(通过 stored property)来保活。 +private final class OpusDecoderProxy: NSObject, JLOpusDecoderDelegate { + private let onPcm: (Data) -> Void + private let onError: (Int, String?) -> Void + + init(onPcm: @escaping (Data) -> Void, onError: @escaping (Int, String?) -> Void) { + self.onPcm = onPcm + self.onError = onError + } + + func opusDecoder(_ decoder: JLOpusDecoder, data: Data?, error: Error?) { + if let err = error as NSError? { + onError(err.code, err.localizedDescription); return + } + if let data = data, !data.isEmpty { onPcm(data) } + } +} + +/// OPUS 流式编码器 —— 与 Android `OpusStreamEncoder` 同语义。 +/// +/// 输入:16k/16bit/mono PCM 帧(20ms 步长 = 640 B) +/// 输出:OPUS 编码帧(默认无头,~40 B) +public final class OpusStreamEncoder { + + private let proxy: OpusEncoderProxy + private let encoder: JLOpusEncoder + + public init( + channels: Int = 1, + sampleRate: Int = 16000, + hasDataHeader: Bool = false, + onOpus: @escaping (Data) -> Void, + onError: @escaping (Int, String?) -> Void = { _, _ in } + ) { + let cfg = JLOpusEncodeConfig.defaultJL() + cfg.sampleRate = Int32(sampleRate) + cfg.channels = Int32(channels) + cfg.frameDuration = 20 + cfg.hasDataHeader = hasDataHeader + + let proxy = OpusEncoderProxy(onOpus: onOpus, onError: onError) + self.proxy = proxy + self.encoder = JLOpusEncoder(format: cfg, delegate: proxy) + } + + public func feed(_ pcm: Data) { + encoder.opusEncode(pcm) + } + + public func release() { + encoder.opusOnRelease() + } +} + +private final class OpusEncoderProxy: NSObject, JLOpusEncoderDelegate { + private let onOpus: (Data) -> Void + private let onError: (Int, String?) -> Void + + init(onOpus: @escaping (Data) -> Void, onError: @escaping (Int, String?) -> Void) { + self.onOpus = onOpus + self.onError = onError + } + + func opusEncoder(_ encoder: JLOpusEncoder, data: Data?, error: Error?) { + if let err = error as NSError? { + onError(err.code, err.localizedDescription); return + } + if let data = data, !data.isEmpty { onOpus(data) } + } +} + +/// 文件级整段 OPUS 编码 —— 与 Android `JieliAITranslationBridge.encodeAndDeliverAsync` 对齐。 +/// +/// 调用 `JLOpusEncoder.opusEncodeFile:output:result:` 把一整段 PCM 转成一整段带完整 head 的 OPUS 流。 +/// 完全不走 delegate 回调(`opusEncoder:Data:error:`),仅仅从输出文件读出成果。 +/// +/// 为什么不用 `opusEncodeData:` 流式接口: +/// - 流式接口 per-frame 给不同的 partial OPUS,每次不一定带 head,拼出来的东西 SDK +/// 切包销资性无法按 “一整段 utterance” 方式写回耳机。 +/// - 文件接口内部完整初始化 OggOpus(hasDataHeader=true)+ 批量写入,与 demo `MachineTranslation.tryToTTS` +/// 给 SDK 的格式一致。 +public enum OpusSegmentEncoder { + /// 对 `pcm` 整段文件级编码,结果在主线程以外的 SDK 内部线程回调。 + /// completion 传回`(opusData, error)`:两者至少一个非 nil;成功时 opusData 非空。 + public static func encode( + pcm: Data, + sampleRate: Int = 16000, + channels: Int = 1, + hasDataHeader: Bool = true, + completion: @escaping (Data?, Error?) -> Void + ) { + guard !pcm.isEmpty else { + completion(nil, NSError(domain: "OpusSegmentEncoder", code: -1, + userInfo: [NSLocalizedDescriptionKey: "empty pcm input"])) + return + } + + let tmpDir = NSTemporaryDirectory() as NSString + let seq = UUID().uuidString + let pcmPath = tmpDir.appendingPathComponent("tts_\(seq).pcm") + let opusPath = tmpDir.appendingPathComponent("tts_\(seq).opus") + + do { + try pcm.write(to: URL(fileURLWithPath: pcmPath)) + } catch { + completion(nil, error) + return + } + + // 对齐 Android:Android 侧 `OpusManager().encodeFile(...)` 不显式设置任何 + // 字段,直接使用 `OpusOption` 的默认配置(带 head)。 + // iOS 这边对应的是 `defaultConfig`(完整默认,带 head),而不是 + // `defaultJL`(注释说明是「杰理的无头配置」,字段默认值和带头模式 + // 不同,在其上手动叠 hasDataHeader=YES + bitRate=16000 + bandwidth=WIDEBAND + // 干预的字段越多、与 Android 缺省行为的偏移就越大,导致耳机 + // 解码后声音扰曲错乱。直接用 defaultConfig 不动任何字段是最安全的对齐方式。 + let cfg = JLOpusEncodeConfig.defaultJL() + cfg.sampleRate = Int32(sampleRate) + cfg.channels = Int32(channels) + + // delegate 必须非 nil(且 weak,需要 stored 保活)。文件接口不会触发 data 回调, + // 只是为满足初始化签名。 + let dummy = _SilentOpusEncoderDelegate() + let encoder = JLOpusEncoder(format: cfg, delegate: dummy) + + encoder.opusEncodeFile(pcmPath, output: opusPath) { outPath, err in + // 保活 dummy,避免被 ARC 提前释放导致 SDK 的 weak delegate 空指。 + _ = dummy + defer { + encoder.opusOnRelease() + try? FileManager.default.removeItem(atPath: pcmPath) + try? FileManager.default.removeItem(atPath: opusPath) + } + if let err = err { + completion(nil, err); return + } + guard let data = try? Data(contentsOf: URL(fileURLWithPath: opusPath)), !data.isEmpty else { + completion(nil, NSError(domain: "OpusSegmentEncoder", code: -2, + userInfo: [NSLocalizedDescriptionKey: "empty opus output"])) + return + } + completion(data, nil) + } + } +} + +private final class _SilentOpusEncoderDelegate: NSObject, JLOpusEncoderDelegate { + func opusEncoder(_ encoder: JLOpusEncoder, data: Data?, error: Error?) { + // 文件级接口不走此回调,留空。 + } +} diff --git a/local_plugins/device_jieli/ios/device_jieli/Sources/device_jieli/audio/PcmKit.swift b/local_plugins/device_jieli/ios/device_jieli/Sources/device_jieli/audio/PcmKit.swift new file mode 100644 index 000000000..fb87c0a6c --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Sources/device_jieli/audio/PcmKit.swift @@ -0,0 +1,57 @@ +import Foundation + +/// 16-bit signed PCM 工具集 —— 与 Android `audio/PcmKit.kt` 对齐。 +public enum PcmKit { + + /// 把 16-bit signed stereo interleaved PCM (L/R/L/R…) 拆成左右两路 mono。 + /// 输入字节数必须为 4 的整数倍。 + public static func splitStereo16(_ interleaved: Data) -> (left: Data, right: Data) { + let n = interleaved.count + guard n >= 4 else { return (Data(), Data()) } + let frameCount = n / 4 + var left = Data(count: frameCount * 2) + var right = Data(count: frameCount * 2) + interleaved.withUnsafeBytes { (raw: UnsafeRawBufferPointer) in + let p = raw.bindMemory(to: UInt8.self).baseAddress! + left.withUnsafeMutableBytes { (lRaw: UnsafeMutableRawBufferPointer) in + right.withUnsafeMutableBytes { (rRaw: UnsafeMutableRawBufferPointer) in + let lp = lRaw.bindMemory(to: UInt8.self).baseAddress! + let rp = rRaw.bindMemory(to: UInt8.self).baseAddress! + for i in 0.. Data { + let frameCount = min(left.count, right.count) / 2 + var out = Data(count: frameCount * 4) + left.withUnsafeBytes { (lRaw: UnsafeRawBufferPointer) in + right.withUnsafeBytes { (rRaw: UnsafeRawBufferPointer) in + out.withUnsafeMutableBytes { (oRaw: UnsafeMutableRawBufferPointer) in + let lp = lRaw.bindMemory(to: UInt8.self).baseAddress! + let rp = rRaw.bindMemory(to: UInt8.self).baseAddress! + let op = oRaw.bindMemory(to: UInt8.self).baseAddress! + for i in 0..`(翻译流) +/// - `AssistantBridge`(AI 助理:MODE_RECORD + 设备录音) +/// - `DeviceRecordFeature`(设备录音:MODE=7 + stereo + 设备录音) +/// +/// 业务方 enter 时把自己注册为 `currentOwner`,所有 SDK 回调(onReceiveAudioData / +/// onModeChange / onError / onSendAudioQueueOver / isOnCalling)都会路由到它;exit 时 +/// 主动让出所有权。中途被其他业务抢占时,先抢占方需要先调 [TranslationSession.release]。 +public protocol TranslationSessionOwner: AnyObject { + /// 与 Android `BaseTranslationModeHandler.modeId` 等价;用于日志和事件 payload + var sessionModeId: Int { get } + + func onReceiveAudio(_ audio: JLTranslateAudio) + func onModeChange(_ mode: JLTranslateSetMode) + func onError(_ error: NSError) + func onSendAudioQueueOver() + func onCallingChange(_ isCalling: Bool) +} + +public extension TranslationSessionOwner { + func onSendAudioQueueOver() {} + func onCallingChange(_ isCalling: Bool) {} +} + +/// 单台已连接设备的翻译会话。 +/// +/// - 内部独占持有 [JLTranslationManager],对外通过 [acquire] / [release] 协调使用方。 +/// - 自身作为 `JLTranslationManagerDelegate`,把回调原样转发给 `currentOwner`。 +/// 若当前没有 owner,回调被静默丢弃(避免 SDK 在 exitMode 后还推一两帧把状态搅乱)。 +public final class TranslationSession: NSObject, JLTranslationManagerDelegate { + + public let uuid: String + private(set) public weak var manager: JL_ManagerM? + + private var tm: JLTranslationManager? + private weak var currentOwner: TranslationSessionOwner? + private let lock = NSRecursiveLock() + private var rxAudioFrameCount: Int64 = 0 + + init(uuid: String, manager: JL_ManagerM) { + self.uuid = uuid + self.manager = manager + super.init() + } + + public func acquire( + owner: TranslationSessionOwner, + completion: @escaping (_ tm: JLTranslationManager?, _ err: String?) -> Void + ) { + lock.lock() + defer { lock.unlock() } + + print("[JieliSession] acquire uuid=\(uuid) requesterModeId=\(owner.sessionModeId) " + + "currentOwnerModeId=\(currentOwner?.sessionModeId.description ?? "nil") tmExists=\(tm != nil)") + + // 已有 owner:先让它退出(让位)。同一 owner 重复 acquire 直接复用。 + if let existing = currentOwner, existing !== owner { + print("[JieliSession] acquire BUSY existingModeId=\(existing.sessionModeId) requesterModeId=\(owner.sessionModeId)") + completion(nil, "translation session busy (sessionModeId=\(existing.sessionModeId))") + return + } + currentOwner = owner + + if let tm = tm { + print("[JieliSession] acquire OK (reused tm) ownerModeId=\(owner.sessionModeId)") + completion(tm, nil); return + } + guard let manager = manager else { + print("[JieliSession] acquire FAIL manager released") + completion(nil, "manager released") + return + } + print("[JieliSession] creating new JLTranslationManager ...") + let inst = JLTranslationManager(delegate: self, manager: manager) { [weak self] success, err in + guard let self = self else { return } + self.lock.lock(); defer { self.lock.unlock() } + print("[JieliSession] JLTranslationManager init result success=\(success) err=\(err?.localizedDescription ?? "nil")") + if success { + completion(self.tm, nil) + } else { + self.currentOwner = nil + self.tm = nil + completion(nil, err?.localizedDescription ?? "JLTranslationManager init failed") + } + } + self.tm = inst + inst.delegate = self + } + + /// 让出所有权。会调 `trExitMode`,调用方应在 stop 路径里调它。 + public func release(owner: TranslationSessionOwner, completion: ((Bool) -> Void)? = nil) { + lock.lock() + if currentOwner === owner { + currentOwner = nil + } + let tm = self.tm + lock.unlock() + guard let tm = tm else { completion?(true); return } + tm.trExitMode { _, _ in completion?(true) } + } + + /// 当前是否有 owner 在使用 + public var isBusy: Bool { + lock.lock(); defer { lock.unlock() } + return currentOwner != nil + } + + /// 给只想"探测能力"的调用方用:不需要拿所有权 + public func currentManager() -> JLTranslationManager? { + lock.lock(); defer { lock.unlock() } + return tm + } + + // MARK: - JLTranslationManagerDelegate + + public func onInitSuccess(_ uuid: String) { + print("[JieliSession/SDK] onInitSuccess uuid=\(uuid)") + } + + public func onModeChange(_ uuid: String, mode: JLTranslateSetMode) { + print("[JieliSession/SDK] onModeChange uuid=\(uuid) modeType=\(mode.modeType.rawValue) " + + "dataType=\(mode.dataType.rawValue) ch=\(mode.channel) sr=\(mode.sampleRate) " + + "ownerModeId=\(currentOwnerSnapshot()?.sessionModeId.description ?? "nil")") + currentOwnerSnapshot()?.onModeChange(mode) + } + + public func onReceiveAudioData(_ uuid: String, audioData data: JLTranslateAudio) { + rxAudioFrameCount &+= 1 + if rxAudioFrameCount <= 5 || rxAudioFrameCount % 100 == 1 { + print("[JieliSession/SDK] onReceiveAudioData #\(rxAudioFrameCount) uuid=\(uuid) " + + "source=\(data.sourceType.rawValue) audioType=\(data.audioType.rawValue) " + + "len=\(data.data.count) count=\(data.count) " + + "ownerModeId=\(currentOwnerSnapshot()?.sessionModeId.description ?? "nil")") + } + currentOwnerSnapshot()?.onReceiveAudio(data) + } + + public func onError(_ uuid: String, error: Error) { + print("[JieliSession/SDK] onError uuid=\(uuid) err=\(error.localizedDescription)") + currentOwnerSnapshot()?.onError(error as NSError) + } + + public func onSendAudioQueueOver(_ uuid: String) { + print("[JieliSession/SDK] onSendAudioQueueOver uuid=\(uuid)") + currentOwnerSnapshot()?.onSendAudioQueueOver() + } + + public func isOnCalling(_ isCalling: Bool, uuid: String) { + print("[JieliSession/SDK] isOnCalling=\(isCalling) uuid=\(uuid) " + + "ownerModeId=\(currentOwnerSnapshot()?.sessionModeId.description ?? "nil")") + currentOwnerSnapshot()?.onCallingChange(isCalling) + } + + private func currentOwnerSnapshot() -> TranslationSessionOwner? { + lock.lock(); defer { lock.unlock() } + return currentOwner + } +} diff --git a/local_plugins/device_jieli/ios/device_jieli/Sources/device_jieli/event/BluetoothEventForwarder.swift b/local_plugins/device_jieli/ios/device_jieli/Sources/device_jieli/event/BluetoothEventForwarder.swift new file mode 100644 index 000000000..dc34114c4 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Sources/device_jieli/event/BluetoothEventForwarder.swift @@ -0,0 +1,99 @@ +import CoreBluetooth +import Foundation +import JL_BLEKit + +/// 监听 iOS SDK 的 BLE 状态 / 连接通知,转成 Android 端同形态的事件 payload: +/// - adapterStatus : { enabled, hasBle } ← 由 ScanFeature 内的 CBCentralManager 兜底派发; +/// 这里也监听 SDK 的 kJL_BLE_M_ON / OFF 作为补充 +/// - scanStatus : { ble:true, started } ← ScanFeature 直接派发,这里不参与 +/// - deviceFound : { ...JieliDevice 字段 } ← ScanFeature 直接派发,这里不参与 +/// - connectionState: { address, state } +/// - rcspInit : { address, code } ← iOS SDK 不区分;我们把"connected 后 cmdTargetFeature"成功视为 init OK +/// +/// iOS SDK 通知名常量定义在 `JL_BLEMultiple.h`: +/// - kJL_BLE_M_ON / kJL_BLE_M_OFF +/// - kJL_BLE_M_ENTITY_CONNECTED / kJL_BLE_M_ENTITY_DISCONNECTED +public final class BluetoothEventForwarder: NSObject { + + private weak var server: JieliHomeServer? + + public init(server: JieliHomeServer) { + self.server = server + } + + public func attach() { + let nc = NotificationCenter.default + nc.addObserver(self, selector: #selector(onBleOn(_:)), name: NSNotification.Name(kJL_BLE_M_ON), object: nil) + nc.addObserver(self, selector: #selector(onBleOff(_:)), name: NSNotification.Name(kJL_BLE_M_OFF), object: nil) + nc.addObserver(self, selector: #selector(onConnected(_:)), name: NSNotification.Name(kJL_BLE_M_ENTITY_CONNECTED), object: nil) + nc.addObserver(self, selector: #selector(onDisconnected(_:)), name: NSNotification.Name(kJL_BLE_M_ENTITY_DISCONNECTED), object: nil) + // 注:扫描发现走 ScanFeature 内部的 CBCentralManager,SDK 的 kJL_BLE_M_FOUND + // 通知(只对 Jieli 协议匹配的广播抛)这里不再监听,避免重复 / 路径冲突。 + } + + public func detach() { + NotificationCenter.default.removeObserver(self) + } + + deinit { detach() } + + // MARK: - Notification handlers + + @objc private func onBleOn(_ note: Notification) { + server?.dispatcher.send([ + "type": "adapterStatus", + "enabled": true, + "hasBle": true, + ]) + } + + @objc private func onBleOff(_ note: Notification) { + server?.dispatcher.send([ + "type": "adapterStatus", + "enabled": false, + "hasBle": true, + ]) + } + + @objc private func onConnected(_ note: Notification) { + guard let entity = extractEntity(note) else { return } + let address = entity.mUUID ?? "" + server?.dispatcher.send([ + "type": "connectionState", + "address": address, + "state": 1, // CONNECTION_OK + ]) + // 与 Android RcspInitEvent 等价:iOS SDK 在 connected 时已可发命令, + // 这里直接把 init code=0 发出去,方便 Dart 侧的状态机走通 + server?.dispatcher.send([ + "type": "rcspInit", + "address": address, + "code": 0, + ]) + } + + @objc private func onDisconnected(_ note: Notification) { + // 通知 object 可能是 CBPeripheral 或 JL_EntityM + let address: String = { + if let entity = note.object as? JL_EntityM { return entity.mUUID ?? "" } + if let peripheral = note.object as? CBPeripheral { return peripheral.identifier.uuidString } + return "" + }() + server?.dispatcher.send([ + "type": "connectionState", + "address": address, + "state": 0, // CONNECTION_DISCONNECT + ]) + } + + // MARK: - helpers + + private func extractEntity(_ note: Notification) -> JL_EntityM? { + if let entity = note.object as? JL_EntityM { return entity } + if let cbp = note.object as? CBPeripheral, + let server = server { + return server.entity(forUuid: cbp.identifier.uuidString) + } + return nil + } +} diff --git a/local_plugins/device_jieli/ios/device_jieli/Sources/device_jieli/event/CustomEventForwarder.swift b/local_plugins/device_jieli/ios/device_jieli/Sources/device_jieli/event/CustomEventForwarder.swift new file mode 100644 index 000000000..c33429e84 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Sources/device_jieli/event/CustomEventForwarder.swift @@ -0,0 +1,55 @@ +import Foundation +import JL_BLEKit + +/// 监听设备主动推送的 Custom Cmd / Custom Response。 +/// +/// 设备 → APP 自定义命令在 iOS SDK 里通过 NSNotification 形式抛出(key +/// `kJL_MANAGER_CUSTOM_DATA` / `kJL_MANAGER_CUSTOM_DATA_RSP`),具体 payload +/// 走 `JL_CustomManager` 的 delegate;这里仅把"设备主动请求"广播事件转发到 Dart 端, +/// payload 用 base64 encode 兼容 Android 端 `ExpandFunctionEvent` 形态。 +public final class CustomEventForwarder: NSObject { + + private weak var server: JieliHomeServer? + + public init(server: JieliHomeServer) { + self.server = server + } + + public func attach() { + NotificationCenter.default.addObserver( + self, + selector: #selector(onCustomData(_:)), + name: NSNotification.Name(kJL_MANAGER_CUSTOM_DATA), + object: nil + ) + } + + public func detach() { + NotificationCenter.default.removeObserver(self) + } + + deinit { detach() } + + @objc private func onCustomData(_ note: Notification) { + guard let info = note.userInfo as? [String: Any] else { return } + let uuid = info[kJL_MANAGER_KEY_UUID] as? String + var opCode: Int = 0 + var base64: String? = nil + + // iOS SDK 把 payload 放在 kJL_MANAGER_KEY_OBJECT 里——历史上有时是 NSData, + // 有时是字典含 opCode + data;两边都兜底处理。 + if let dict = info[kJL_MANAGER_KEY_OBJECT] as? [String: Any] { + if let code = (dict["opCode"] as? NSNumber)?.intValue { opCode = code } + if let data = dict["data"] as? Data { base64 = data.base64EncodedString() } + } else if let data = info[kJL_MANAGER_KEY_OBJECT] as? Data { + base64 = data.base64EncodedString() + } + + server?.dispatcher.send([ + "type": "expandFunction", + "address": uuid as Any, + "opCode": opCode, + "payloadBase64": base64 as Any, + ]) + } +} diff --git a/local_plugins/device_jieli/ios/device_jieli/Sources/device_jieli/event/DeviceInfoEventForwarder.swift b/local_plugins/device_jieli/ios/device_jieli/Sources/device_jieli/event/DeviceInfoEventForwarder.swift new file mode 100644 index 000000000..7607722bf --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Sources/device_jieli/event/DeviceInfoEventForwarder.swift @@ -0,0 +1,110 @@ +import Foundation +import JL_BLEKit + +/// 设备主动推送的状态事件(电量 / 通话状态 / 系统信息 / 耳机广播)。 +/// +/// 与 Android `DeviceInfoEventForwarder` 对齐,覆盖: +/// - `battery` — 电量变化(来源:`kJL_MANAGER_HEADSET_ADV` 通知里的 POWER_C/L/R, +/// 以及 `kJL_MANAGER_SYSTEM_INFO` 通知里 JLModel_Device.battery 字段) +/// - `phoneCallStatus` — 通话状态(来源:`kJL_MANAGER_CALL_STATUS`) +/// +/// iOS SDK 没有像 Android `OnRcspEventListener.onBatteryChange` 那种细粒度推送,电量更新 +/// 都是间接通过广播 / 系统信息走的。我们订阅两条通知,把每次推上来的最新值统一外抛 `battery`。 +public final class DeviceInfoEventForwarder: NSObject { + + private weak var server: JieliHomeServer? + private var lastBatteryByDevice: [String: Int] = [:] + + public init(server: JieliHomeServer) { + self.server = server + } + + public func attach() { + let nc = NotificationCenter.default + nc.addObserver(self, selector: #selector(onCallStatus(_:)), + name: NSNotification.Name(kJL_MANAGER_CALL_STATUS), object: nil) + nc.addObserver(self, selector: #selector(onHeadsetAdv(_:)), + name: NSNotification.Name(kJL_MANAGER_HEADSET_ADV), object: nil) + nc.addObserver(self, selector: #selector(onSystemInfo(_:)), + name: NSNotification.Name(kJL_MANAGER_SYSTEM_INFO), object: nil) + nc.addObserver(self, selector: #selector(onTargetInfo(_:)), + name: NSNotification.Name(kJL_MANAGER_TARGET_INFO), object: nil) + } + + public func detach() { + NotificationCenter.default.removeObserver(self) + } + + deinit { detach() } + + // MARK: - Notifications → events + + @objc private func onCallStatus(_ note: Notification) { + guard let info = note.userInfo as? [String: Any] else { return } + let uuid = info[kJL_MANAGER_KEY_UUID] as? String + // payload 一般是 status (NSNumber) 或对象,按 SDK 习惯取 intValue + var status: Int = 0 + if let n = info[kJL_MANAGER_KEY_OBJECT] as? NSNumber { + status = n.intValue + } else if let n = info[kJL_MANAGER_KEY_OBJECT] as? Int { + status = n + } else if let dict = info[kJL_MANAGER_KEY_OBJECT] as? [String: Any] { + status = (dict["status"] as? NSNumber)?.intValue ?? 0 + } + server?.dispatcher.send([ + "type": "phoneCallStatus", + "address": uuid as Any, + "status": status, + ]) + } + + @objc private func onHeadsetAdv(_ note: Notification) { + guard let info = note.userInfo as? [String: Any] else { return } + let uuid = info[kJL_MANAGER_KEY_UUID] as? String + guard let raw = info[kJL_MANAGER_KEY_OBJECT] as? [String: Any] else { return } + // 广播里 POWER_C 是充电仓电量,POWER_L/R 是左右耳;Android 端 `battery` 取的是 + // 综合电量。这里优先取仓位(最常用于显示),再回退左/右耳的最小值。 + let pc = (raw["POWER_C"] as? NSNumber)?.intValue + let pl = (raw["POWER_L"] as? NSNumber)?.intValue + let pr = (raw["POWER_R"] as? NSNumber)?.intValue + let level: Int? = pc ?? [pl, pr].compactMap { $0 }.min() + guard let lv = level else { return } + if let id = uuid, lastBatteryByDevice[id] == lv { return } + if let id = uuid { lastBatteryByDevice[id] = lv } + server?.dispatcher.send([ + "type": "battery", + "address": uuid as Any, + "level": lv, + "left": pl as Any, + "right": pr as Any, + "case": pc as Any, + ]) + } + + @objc private func onSystemInfo(_ note: Notification) { + guard let info = note.userInfo as? [String: Any] else { return } + let uuid = info[kJL_MANAGER_KEY_UUID] as? String + // 系统信息推送时拉一次最新 model + guard let id = uuid, let entity = server?.connectedEntity(forUuid: id) else { return } + let model = entity.mCmdManager.getDeviceModel() + let lv = Int(model.battery) + if lastBatteryByDevice[id] == lv { return } + lastBatteryByDevice[id] = lv + server?.dispatcher.send([ + "type": "battery", + "address": id, + "level": lv, + ]) + } + + @objc private func onTargetInfo(_ note: Notification) { + // 设备配对成功后 SDK 会自动拉一次 TargetInfo;与 Android RcspInit 完成时机对齐。 + guard let info = note.userInfo as? [String: Any] else { return } + let uuid = (info[kJL_MANAGER_KEY_UUID] as? String) ?? "" + server?.dispatcher.send([ + "type": "rcspInit", + "address": uuid, + "code": 0, + ]) + } +} diff --git a/local_plugins/device_jieli/ios/device_jieli/Sources/device_jieli/feature/AssistantBridge.swift b/local_plugins/device_jieli/ios/device_jieli/Sources/device_jieli/feature/AssistantBridge.swift new file mode 100644 index 000000000..289265dce --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Sources/device_jieli/feature/AssistantBridge.swift @@ -0,0 +1,142 @@ +import Flutter +import Foundation +import JL_BLEKit + +/// AI 助理通路(iOS)—— 与 Android `AssistantBridge + JieliAssistantPort` 对齐。 +/// +/// # 通路细节(与 Android 一致) +/// - 进入 `MODE_RECORD(1)` + `recordtype = .byDevice`(等价 STRATEGY_DEVICE_ALWAYS_RECORDING) +/// - 耳机持续推 OPUS 单声道帧;本类解码成 16k/16bit/mono PCM +/// - 上行帧通过 `assistantAudio` EventChannel 推给 Dart +/// - TTS 下行**不走** RCSP(iOS 同样让宿主走 AVAudioEngine + 系统蓝牙路由播放) +/// +/// # 与 [TranslationFeature] 的关系 +/// 两者都走同一个 [TranslationSession],是设备级互斥的。`MethodRouter` 在调 `assistantStart` +/// 前会先 stop 翻译 / 设备录音。 +public final class AssistantBridge: NSObject, TranslationSessionOwner { + + private weak var server: JieliHomeServer? + private var session: TranslationSession? + private var decoder: OpusStreamDecoder? + private(set) public var isRunning: Bool = false + private var sequence: Int64 = 0 + + public var sessionModeId: Int { TranslationModeIds.MODE_RECORD } + + init(server: JieliHomeServer) { + self.server = server + super.init() + } + + @discardableResult + public func start(address: String? = nil, sampleRate: Int = 16000) -> Bool { + guard let server = server, !isRunning else { return false } + + let session = address.flatMap { server.translationSession(for: $0) } + ?? server.currentTranslationSession() + guard let s = session else { + emitError("device.assistant.no_device", "no connected device") + return false + } + self.session = s + + // OPUS 解码器:单帧 40 B / 16k / mono,与 Android JieliAssistantPort packetSize=40 对齐 + decoder = OpusStreamDecoder(channels: 1, dataSize: 40, sampleRate: sampleRate) { [weak self] pcm in + self?.emitAudioFrame(pcm: pcm, sampleRate: sampleRate) + } onError: { [weak self] code, msg in + self?.emitError("device.decoder_failed", "opus: code=\(code) msg=\(msg ?? "")") + } + + s.acquire(owner: self) { [weak self] tm, errMsg in + guard let self = self else { return } + guard let tm = tm else { + self.cleanup() + self.emitError("device.assistant.session_busy", errMsg) + return + } + tm.recordtype = .byDevice + let mode = BaseTranslationModeHandler.buildMode( + modeType: .onlyRecord, audioType: .OPUS, channel: 1, sampleRate: sampleRate + ) + tm.trStartTranslate(mode) { [weak self] status, err in + guard let self = self else { return } + if status == .success || status == .sameMode { + self.isRunning = true + self.server?.dispatcher.send([ + "type": "assistantStart", + "sampleRate": sampleRate, + "tsMs": NSNumber(value: Int64(Date().timeIntervalSince1970 * 1000)), + ]) + } else { + self.cleanup() + self.emitError("device.assistant.enter_failed", err?.localizedDescription ?? "trStartTranslateMode status=\(status.rawValue)") + } + } + } + return true + } + + public func stop() { + guard isRunning else { cleanup(); return } + isRunning = false + let session = self.session + session?.release(owner: self) + cleanup() + server?.dispatcher.send([ + "type": "assistantEnd", + "tsMs": NSNumber(value: Int64(Date().timeIntervalSince1970 * 1000)), + ]) + } + + // MARK: - TranslationSessionOwner + + public func onReceiveAudio(_ audio: JLTranslateAudio) { + guard isRunning else { return } + switch audio.audioType { + case .OPUS: decoder?.feed(audio.data) + case .PCM: emitAudioFrame(pcm: audio.data, sampleRate: 16000) + default: break + } + } + + public func onModeChange(_ mode: JLTranslateSetMode) { + if mode.modeType == .idle && isRunning { + emitError("device.mode_exited", "headset exited MODE_RECORD → MODE_IDLE") + stop() + } + } + + public func onError(_ error: NSError) { + emitError("device.translation_error", "code=\(error.code) msg=\(error.localizedDescription)") + } + + // MARK: - Helpers + + private func emitAudioFrame(pcm: Data, sampleRate: Int) { + sequence &+= 1 + server?.dispatcher.send([ + "type": "assistantAudio", + "encoding": "pcm16", + "sampleRate": sampleRate, + "channels": 1, + "bitsPerSample": 16, + "sequence": NSNumber(value: sequence), + "tsMs": NSNumber(value: Int64(Date().timeIntervalSince1970 * 1000)), + "pcm": FlutterStandardTypedData(bytes: pcm), + ]) + } + + private func emitError(_ code: String, _ message: String?) { + server?.dispatcher.send([ + "type": "assistantError", + "code": code, + "message": message as Any, + ]) + } + + private func cleanup() { + decoder?.release() + decoder = nil + session = nil + } +} diff --git a/local_plugins/device_jieli/ios/device_jieli/Sources/device_jieli/feature/ConnectFeature.swift b/local_plugins/device_jieli/ios/device_jieli/Sources/device_jieli/feature/ConnectFeature.swift new file mode 100644 index 000000000..f9e6f79fd --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Sources/device_jieli/feature/ConnectFeature.swift @@ -0,0 +1,182 @@ +import CoreBluetooth +import Foundation +import JL_BLEKit + +/// 连接 / 断开 / 状态查询 —— 与 Android `ConnectFeature` 对齐。 +/// +/// # 注意 +/// - iOS 上 `address` 是 BLE 设备的 CoreBluetooth identifier (UUID 字符串), +/// 不是 BLE MAC(iOS 系统对 BLE MAC 全程匿名)。Android 端 `address` 是 MAC。 +/// - 配对成功后**主动调一次 `cmdTargetFeatureResult`**,以拿到电量 / 版本 / vid-pid 等 +/// 基础信息——这一步与 Android `RCSPController.init` 后由 SDK 自动拉取的行为对齐。 +/// 完成后向 Dart 推 `rcspInit`,让上层确定 RCSP 已 ready。 +/// +/// # 一键双连(LE + BR/EDR 桥接) +/// Android 端默认走 SPP(经典蓝牙)拉音频通道;iOS 只能以 BLE 方式建连,但可以借助 +/// `CBConnectPeripheralOptionEnableTransportBridgingKey`(WWDC19 引入,iOS 13+) +/// 提示系统"LE proximity 触发 BR/EDR connection"——要求设备支持 CTKD。 +/// +/// ## 实测坑(2026-05 验证) +/// **不要**在 `bleMultiple.connectEntity` 之前抢跑 `connect(options: bridging)`—— +/// iOS 对同一 peripheral 的 connect 请求以**第一次的 options 为准** dedupe,后续 SDK +/// 的无 options connect 会被忽略;如果设备不支持 CTKD 或未配对,我们这条带 bridging +/// 的请求会卡死在等 CTKD,表现为 `peripheralState=0 → connectionState=2` 之后再也不 +/// 前进,BLE 通路本身直接挂掉。 +/// +/// 正确做法:让 SDK 先正常把 BLE 建立好(`.paired/.connectRepeat`),**之后**再发 +/// bridging hint——此时 iOS 会尝试做 CTKD → BR/EDR 升级但不影响已建立的 BLE 通路, +/// 设备不支持 CTKD 也只是升级失败,BLE 可用。并给一个 `dualConnect` 开关,默认关, +/// 由 Dart 侧在设备明确支持 CTKD 时打开。 +public final class ConnectFeature { + + private weak var server: JieliHomeServer? + + init(server: JieliHomeServer) { self.server = server } + + public func connect( + bleAddress: String, + edrAddress: String?, + deviceType: Int, + connectWay: Int, + dualConnect: Bool = false, + completion: @escaping (_ ok: Bool, _ errMsg: String?) -> Void + ) { + guard let server = server else { completion(false, "server uninitialized"); return } + let bleMultiple = server.bleMultiple + + let entity: JL_EntityM? = server.entity(forUuid: bleAddress) + ?? bleMultiple.makeEntity(withUUID: bleAddress) + guard let target = entity else { + completion(false, "entity not found for uuid=\(bleAddress)") + return + } + + server.dispatcher.send([ + "type": "connectionState", + "address": bleAddress, + "state": 2, // CONNECTION_CONNECTING + ]) + + // ⚠️ 不在这里发 bridging hint——实测会把 BLE connect 卡死(见类注释)。 + // 只让 SDK 跑纯 BLE 正常流程,bridging 在 .paired 之后再补。 + NSLog("[JieliConnect] connect uuid=%@ edr=%@ deviceType=%ld connectWay=%ld dualConnect=%@", + bleAddress, edrAddress ?? "nil", deviceType, connectWay, + dualConnect ? "YES" : "NO") + + bleMultiple.connectEntity(target) { [weak self] status in + guard let self = self else { return } + switch status { + case .paired, .connectRepeat: + // BLE 已建立。dualConnect=true 时尝试一次 BR/EDR 桥接升级—— + // 对不支持 CTKD 的设备不会影响已建立的 BLE 通路。 + if dualConnect { + ConnectFeature.requestTransportBridging( + centralManager: bleMultiple.getCenterManaer(), + peripheral: target.mPeripheral, + uuid: bleAddress + ) + } + // 1) 触发一次 RCSP TargetFeature 拉取,等价于 Android 端 SDK 内部 + // 在 RCSPController.init 成功后自动做的事。 + target.mCmdManager.cmdTargetFeatureResult { [weak self] state, _, _ in + guard let self = self else { return } + let ok = state == .success + // 2) 拉取 COMMON 字段(电量 / 版本号等)填充 model 缓存, + // 供 deviceSnapshot() 读取。 + if ok { + target.mCmdManager.cmdGetSystemInfo(.COMMON) { _, _, _ in } + } + self.server?.dispatcher.send([ + "type": "rcspInit", + "address": target.mUUID ?? bleAddress, + "code": ok ? 0 : 1, + ]) + completion(ok, ok ? nil : "rcsp init failed") + } + case .connecting: + break + case .bleOFF: + completion(false, "ble off") + case .connectFail: + completion(false, "connect fail") + case .connectTimeout: + completion(false, "connect timeout") + case .connectRefuse: + completion(false, "connect refuse") + case .pairFail: + completion(false, "pair fail") + case .pairTimeout: + completion(false, "pair timeout") + case .masterChanging: + break + case .disconnectOk: + completion(false, "disconnected") + case .null: + completion(false, "entity null") + @unknown default: + completion(false, "unknown status \(status.rawValue)") + } + } + } + + public func disconnect(address: String, completion: @escaping (_ ok: Bool, _ errMsg: String?) -> Void) { + guard let server = server else { completion(false, "server uninitialized"); return } + guard let entity = server.connectedEntity(forUuid: address) else { + completion(false, "not connected: \(address)") + return + } + // 断开前先收尾翻译 / 助理 / 设备录音,避免脏状态 + server.translationFeature.stop() + server.assistantBridge.stop() + server.deviceRecordFeature.stop() + + server.bleMultiple.disconnectEntity(entity) { _ in + // 让翻译会话也一起释放 + server.removeTranslationSession(uuid: address) + completion(true, nil) + } + } + + public func isConnected(address: String) -> Bool { + guard let server = server else { return false } + return server.connectedEntity(forUuid: address) != nil + } + + public func connectedDeviceInfo() -> [String: Any?]? { + guard let entity = server?.currentConnectedEntity() else { return nil } + return [ + "address": entity.mUUID ?? "", + "name": entity.mPeripheral.name ?? "", + ] + } + + // MARK: - Transport Bridging (LE → BR/EDR, WWDC19) + + /// 向系统申请把 LE 连接桥接到 BR/EDR,实现"一键双连"—— + /// 设备支持 CTKD 时,iOS 会在 BLE 建连同时自动拉起经典蓝牙, + /// HFP / A2DP 等 Classic profile 会自动可用。 + /// + /// 失败不抛错、不阻塞:设备不支持 CTKD 时,系统会忽略这个 option, + /// 后续 SDK 的 `connectEntity` 照常走纯 LE 路径。 + private static func requestTransportBridging( + centralManager: CBCentralManager?, + peripheral: CBPeripheral?, + uuid: String + ) { + guard let cm = centralManager, let p = peripheral else { + NSLog("[JieliConnect] bridging skipped: centralManager/peripheral nil uuid=%@", uuid) + return + } + // iOS 13+ 才有 CBConnectPeripheralOptionEnableTransportBridgingKey。 + if #available(iOS 13.0, *) { + let options: [String: Any] = [ + CBConnectPeripheralOptionEnableTransportBridgingKey: true, + ] + NSLog("[JieliConnect] request BR/EDR bridging uuid=%@ peripheralState=%ld", + uuid, p.state.rawValue) + cm.connect(p, options: options) + } else { + NSLog("[JieliConnect] bridging unavailable on iOS <13 uuid=%@", uuid) + } + } +} diff --git a/local_plugins/device_jieli/ios/device_jieli/Sources/device_jieli/feature/CustomCmdFeature.swift b/local_plugins/device_jieli/ios/device_jieli/Sources/device_jieli/feature/CustomCmdFeature.swift new file mode 100644 index 000000000..dddac8dd1 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Sources/device_jieli/feature/CustomCmdFeature.swift @@ -0,0 +1,39 @@ +import Foundation +import JL_BLEKit + +/// 厂商扩展指令通道(与 Android `CustomCmdFeature` 对齐)。 +/// +/// iOS SDK 通过每个设备 `JL_ManagerM` 上的 `mCustomManager` 暴露 `cmdCustomData:`。 +/// 设备主动推的数据由 [CustomEventForwarder] 监听通知转发。 +public final class CustomCmdFeature { + + private weak var server: JieliHomeServer? + init(server: JieliHomeServer) { self.server = server } + + public func send( + address: String, + opCode: Int, + payload: Data, + completion: @escaping (_ ok: Bool, _ response: Data?, _ errCode: Int?, _ errMsg: String?) -> Void + ) { + guard let entity = server?.connectedEntity(forUuid: address) else { + completion(false, nil, -1, "remote device not found"); return + } + let custom = entity.mCmdManager.mCustomManager + + // iOS SDK 没有原生 opCode 字段——厂商扩展指令 0xF0 的 sub-op 习惯放在 payload 第一字节, + // 这里把 Dart 端传入的 opCode 拼到 payload 头部,保持与 Android 端 SDK 的等价语义。 + var bytes = [UInt8]() + bytes.append(UInt8(truncatingIfNeeded: opCode)) + bytes.append(contentsOf: [UInt8](payload)) + let outData = Data(bytes) + + custom.cmdCustomData(outData, isNeedResponse: true) { status, _, replyData in + if status == .success { + completion(true, replyData, nil, nil) + } else { + completion(false, nil, Int(status.rawValue), "cmd status=\(status.rawValue)") + } + } + } +} diff --git a/local_plugins/device_jieli/ios/device_jieli/Sources/device_jieli/feature/DeviceInfoFeature.swift b/local_plugins/device_jieli/ios/device_jieli/Sources/device_jieli/feature/DeviceInfoFeature.swift new file mode 100644 index 000000000..020d46bb4 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Sources/device_jieli/feature/DeviceInfoFeature.swift @@ -0,0 +1,54 @@ +import Foundation +import JL_BLEKit + +/// 查询设备静态信息(电量 / 版本 / VID-PID 等)。 +/// +/// - `snapshot(address:)` 直接读 iOS SDK 缓存(连接成功后 BleManager 已经 +/// 触发过 `cmdTargetFeatureResult`)。 +/// - `queryTargetInfo(address:mask:)` 主动再向设备拉一次最新值。 +public final class DeviceInfoFeature { + + private weak var server: JieliHomeServer? + init(server: JieliHomeServer) { self.server = server } + + public func snapshot(address: String) -> [String: Any?]? { + guard let entity = server?.connectedEntity(forUuid: address) else { return nil } + let m = entity.mCmdManager.getDeviceModel() + let pidvidParts = (m.pidvid ?? "").split(separator: "-") + let vid: String? = pidvidParts.count >= 1 ? String(pidvidParts[0]) : nil + let pid: String? = pidvidParts.count >= 2 ? String(pidvidParts[1]) : nil + return [ + "address": entity.mUUID ?? address, + "battery": Int(m.battery), + "volume": Int(m.currentVol), + "maxVolume": Int(m.maxVol), + "versionCode": nil, // iOS SDK 只暴露 versionFirmware(字符串),与 Android versionCode 含义不同 + "versionName": m.versionFirmware ?? "", + "name": entity.mPeripheral.name ?? "", + "vid": vid, + "pid": pid, + "uid": m.license ?? "", + "edrAddr": entity.mEdr ?? m.btAddr ?? "", + ] + } + + public func queryTargetInfo( + address: String, + mask: Int, + completion: @escaping (_ info: [String: Any?]?, _ errCode: Int?, _ errMsg: String?) -> Void + ) { + guard let entity = server?.connectedEntity(forUuid: address) else { + completion(nil, -1, "remote device not found"); return + } + let cmd = entity.mCmdManager + // iOS SDK 的 mask 走"选择性获取"接口 + cmd.cmdGetSystemInfo(.COMMON, selectionBit: UInt32(mask)) { [weak self] status, _, _ in + guard let self = self else { return } + if status == .success { + completion(self.snapshot(address: address), nil, nil) + } else { + completion(nil, Int(status.rawValue), "cmd status=\(status.rawValue)") + } + } + } +} diff --git a/local_plugins/device_jieli/ios/device_jieli/Sources/device_jieli/feature/DeviceRecordFeature.swift b/local_plugins/device_jieli/ios/device_jieli/Sources/device_jieli/feature/DeviceRecordFeature.swift new file mode 100644 index 000000000..1b4455f26 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Sources/device_jieli/feature/DeviceRecordFeature.swift @@ -0,0 +1,168 @@ +import Flutter +import Foundation +import JL_BLEKit + +/// 设备录音通路(iOS)—— 与 Android `DeviceRecordFeature + JieliDeviceRecordPort` 对齐。 +/// +/// # 通路细节(与 Android 一致) +/// - 进入 `MODE_CALL_RECORD(7)` + `recordtype = .byDevice` + `channel = 2` +/// - 耳机一路推 SOURCE_E_SCO_MIX 立体声 OPUS(L=本端 / R=对端) +/// - 内部用 `OpusStreamDecoder(channels=2, dataSize=80)` 解码成 16k/16bit/stereo 交织 PCM +/// - 通过 `deviceRecordAudio` EventChannel 外抛(streamId = "in.stereo") +/// +/// # 真机注意 +/// mode=7 是专门的通话录音通路(与 mode=6 通话翻译互斥),耳机固件持续上推 SCO_MIX +/// 双声道交织 OPUS,不再像 mode=6 那样需要真实 SCO 通话才上行。 +/// +/// # 与 mode=6 的历史 +/// 早先此通路下发的是 `MODE_CALL_TRANSLATION_WITH_STEREO(6)`,与 Android 对齐后 +/// 固件侧切换到专用的 `MODE_CALL_RECORD(7)`;`JLTranslateSetModeType` Obj-C 枚举 +/// 只显式到 0x06,所以这里用 KVC 写 `modeType = 7` 下发给设备。 +public final class DeviceRecordFeature: NSObject, TranslationSessionOwner { + + private weak var server: JieliHomeServer? + private var session: TranslationSession? + private var decoder: OpusStreamDecoder? + private(set) public var isRecording: Bool = false + private var deviceAddress: String? + private var sampleRate = 16000 + + public var sessionModeId: Int { TranslationModeIds.MODE_CALL_RECORD } + + init(server: JieliHomeServer) { + self.server = server + super.init() + } + + public func start(args: [String: Any], completion: @escaping (Bool, String?) -> Void) { + guard let server = server, !isRecording else { + completion(false, "already recording"); return + } + let addressArg = args["address"] as? String + let sr = (args["sampleRate"] as? NSNumber)?.intValue ?? 16000 + + let session = addressArg.flatMap { server.translationSession(for: $0) } + ?? server.currentTranslationSession() + guard let s = session else { + emitError("device.record.no_device", code: -1, message: "no connected device") + completion(false, "no connected device"); return + } + self.session = s + self.sampleRate = sr + self.deviceAddress = addressArg ?? server.currentConnectedEntity()?.mUUID + + // 立体声 OPUS 解码:单帧 80 B / 16k / stereo + decoder = OpusStreamDecoder(channels: 2, dataSize: 80, sampleRate: sr) { [weak self] stereoPcm in + self?.emitStereoFrame(stereoPcm) + } onError: { [weak self] code, msg in + self?.emitError("device.record.decode_failed", code: code, message: "opus stereo: \(msg ?? "")") + } + + s.acquire(owner: self) { [weak self] tm, errMsg in + guard let self = self else { return } + guard let tm = tm else { + self.cleanup() + self.emitError("device.record.session_busy", code: -2, message: errMsg) + completion(false, errMsg) + return + } + tm.recordtype = .byDevice + // `JLTranslateSetModeType` 枚举只到 0x06,MODE_CALL_RECORD(7) 不是合法 enum case。 + // 通过 KVC 写 modeType,绕开 Swift 枚举校验,底层 Obj-C 仅存 NSUInteger, + // 会原值透传给固件(与 CallRecordModeHandler 完全一致)。 + let mode = JLTranslateSetMode() + mode.dataType = .OPUS + mode.channel = 2 + mode.sampleRate = sr + mode.setValue(NSNumber(value: 7), forKey: "modeType") + NSLog("[DeviceRecord] trStartTranslate mode=MODE_CALL_RECORD(0x07) dataType=OPUS ch=2 sr=\(sr) recordType=byDevice") + tm.trStartTranslate(mode) { [weak self] status, err in + guard let self = self else { return } + if status == .success || status == .sameMode { + self.isRecording = true + self.server?.dispatcher.send([ + "type": "deviceRecordStart", + "address": self.deviceAddress as Any, + "sampleRate": sr, + "tsMs": NSNumber(value: Int64(Date().timeIntervalSince1970 * 1000)), + ]) + completion(true, nil) + } else { + self.cleanup() + self.emitError("device.record.enter_failed", code: Int(status.rawValue), + message: err?.localizedDescription ?? "trStartTranslateMode status=\(status.rawValue)") + completion(false, "tm status=\(status.rawValue)") + } + } + } + } + + public func stop() { + guard isRecording else { cleanup(); return } + isRecording = false + session?.release(owner: self) + let addr = deviceAddress + cleanup() + server?.dispatcher.send([ + "type": "deviceRecordStop", + "address": addr as Any, + "tsMs": NSNumber(value: Int64(Date().timeIntervalSince1970 * 1000)), + ]) + } + + // MARK: - TranslationSessionOwner + + public func onReceiveAudio(_ audio: JLTranslateAudio) { + guard isRecording else { return } + // mode=7 与 mode=6 一致:SDK 把上行帧 source 标成 .typeESCOMax (SOURCE_E_SCO_MIX);其他 source 忽略 + guard audio.sourceType == .typeESCOMax else { return } + switch audio.audioType { + case .OPUS: decoder?.feed(audio.data) + case .PCM: emitStereoFrame(audio.data) + default: break + } + } + + public func onModeChange(_ mode: JLTranslateSetMode) { + if mode.modeType == .idle && isRecording { + emitError("device.record.mode_exited", code: -1, + message: "headset exited MODE=7 → MODE_IDLE") + stop() + } + } + + public func onError(_ error: NSError) { + emitError("device.record.translation_error", code: error.code, message: error.localizedDescription) + } + + // MARK: - Helpers + + private func emitStereoFrame(_ pcm: Data) { + server?.dispatcher.send([ + "type": "deviceRecordAudio", + "address": deviceAddress as Any, + "streamId": "in.stereo", + "sampleRate": sampleRate, + "channels": 2, + "bitsPerSample": 16, + "tsMs": NSNumber(value: Int64(Date().timeIntervalSince1970 * 1000)), + "pcm": FlutterStandardTypedData(bytes: pcm), + ]) + } + + private func emitError(_ code: String, code intCode: Int, message: String?) { + server?.dispatcher.send([ + "type": "deviceRecordError", + "address": deviceAddress as Any, + "code": intCode, + "message": message as Any, + "errorCode": code, + ]) + } + + private func cleanup() { + decoder?.release() + decoder = nil + session = nil + } +} diff --git a/local_plugins/device_jieli/ios/device_jieli/Sources/device_jieli/feature/OtaFeature.swift b/local_plugins/device_jieli/ios/device_jieli/Sources/device_jieli/feature/OtaFeature.swift new file mode 100644 index 000000000..da7a2f353 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Sources/device_jieli/feature/OtaFeature.swift @@ -0,0 +1,127 @@ +import Foundation +import JL_BLEKit +import JL_OTALib + +/// OTA 升级(iOS)—— 与 iOS demo `OTAViewController` 对齐。 +/// +/// 走 per-device 的 `JL_OTAManager.cmdUpgrade(_:option:result:)`: +/// - `mOTAManager` 挂在 `JL_ManagerM` 上,由 SDK 在连接成功后自动初始化 +/// - 我们直接读取固件文件字节,调 `cmdUpgrade(data, option: nil, result: ...)` +/// - 取消用 `cmdOTACancelResult()`(无参,demo 形态) +public final class OtaFeature { + + private weak var server: JieliHomeServer? + public private(set) var isRunning: Bool = false + + private var currentFileSize: Int64 = 0 + private var currentAddress: String? + private weak var currentOtaManager: JL_OTAManager? + + init(server: JieliHomeServer) { self.server = server } + + public func start( + address: String?, + firmwareFilePath: String, + blockSize: Int, + fileFlagBytes: Data + ) { + guard let server = server else { + emitError(-1, "server uninitialized"); return + } + guard !isRunning else { emitError(-2, "ota already running"); return } + + let entity: JL_EntityM? = { + if let addr = address { return server.connectedEntity(forUuid: addr) } + return server.currentConnectedEntity() + }() + guard let target = entity else { + emitError(-3, "no connected device"); return + } + let otaManager = target.mCmdManager.mOTAManager + guard let firmwareData = try? Data(contentsOf: URL(fileURLWithPath: firmwareFilePath)) else { + emitError(-4, "firmware file invalid: \(firmwareFilePath)"); return + } + if firmwareData.isEmpty { emitError(-5, "firmware file is empty"); return } + currentFileSize = Int64(firmwareData.count) + + currentAddress = target.mUUID + currentOtaManager = otaManager + isRunning = true + emitState("INQUIRING", sent: 0, total: currentFileSize) + + otaManager.cmdUpgrade(firmwareData, option: nil) { [weak self] result, progress in + self?.dispatchOtaCallback(result: result, progress: progress) + } + } + + public func cancel() { + guard isRunning else { return } + // demo 形态:无参取消 + currentOtaManager?.cmdOTACancelResult() + isRunning = false + emitState("CANCELLED", sent: -1, total: currentFileSize) + } + + // MARK: - SDK callback dispatch + + private func dispatchOtaCallback(result: JL_OTAResult, progress: Float) { + let total = currentFileSize + let sent = Int64((Float(total) * max(0, min(1.0, progress))).rounded()) + + switch result { + case .success: + isRunning = false + emitState("DONE", sent: total, total: total) + case .fail, .commandFail, .seekFail, .infoFail, .lowPower, .enterFail, + .failVerification, .failCompletely, .failKey, .failErrorFile, .failUboot, + .failLenght, .failFlash, .failCmdTimeout, .failSameVersion, + .failTWSDisconnect, .failNotInBin, .disconnect, .failSameSN, .unknown: + isRunning = false + emitError(Int(result.rawValue), "ota failed result=\(result.rawValue)") + emitState("FAILED", sent: -1, total: total) + case .upgrading, .preparing, .prepared: + emitState("TRANSFERRING", sent: sent, total: total) + case .reconnect, .reconnectWithMacAddr, .reconnectUpdateSource: + emitState("ENTERING", sent: sent, total: total) + case .reboot: + emitState("REBOOTING", sent: total, total: total) + case .cancel: + isRunning = false + emitState("CANCELLED", sent: -1, total: total) + case .statusIsUpdating, .failedConnectMore, .dataIsNull: + isRunning = false + emitError(Int(result.rawValue), "ota cannot start: \(result.rawValue)") + emitState("FAILED", sent: -1, total: total) + @unknown default: + // 默认作进度 + emitState("TRANSFERRING", sent: sent, total: total) + } + } + + // MARK: - Event emission + + private func emitState(_ state: String, sent: Int64, total: Int64) { + let percent: Int = { + if total > 0 && sent >= 0 && sent <= total { + return Int((Double(sent) * 100.0 / Double(total)).rounded()) + } + return -1 + }() + server?.dispatcher.send([ + "type": "otaState", + "state": state, + "sent": NSNumber(value: sent), + "total": NSNumber(value: total), + "percent": percent, + "tsMs": NSNumber(value: Int64(Date().timeIntervalSince1970 * 1000)), + ]) + } + + private func emitError(_ code: Int, _ msg: String?) { + server?.dispatcher.send([ + "type": "otaError", + "code": code, + "message": msg as Any, + ]) + } +} diff --git a/local_plugins/device_jieli/ios/device_jieli/Sources/device_jieli/feature/ScanFeature.swift b/local_plugins/device_jieli/ios/device_jieli/Sources/device_jieli/feature/ScanFeature.swift new file mode 100644 index 000000000..0ee4fc299 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Sources/device_jieli/feature/ScanFeature.swift @@ -0,0 +1,240 @@ +import CoreBluetooth +import Foundation +import JL_BLEKit + +/// BLE 扫描入口(iOS)—— 与 Android `feature/ScanFeature.kt` 对齐: +/// +/// 1. **不**走 Jieli SDK 的 `JL_BLEMultiple.scanStart()`(其内部只对 Jieli 协议 +/// 匹配的广播抛 `kJL_BLE_M_FOUND`,且不支持按 16-bit UUID 过滤)。改用 +/// `CBCentralManager` 原生扫描。 +/// 2. UUID 白名单走 **OS 级过滤**:把 `CBUUID` 列表传给 +/// `scanForPeripherals(withServices:)`,对应 Android 端 +/// `ScanFilter.Builder().setServiceUuid(...)`。空列表 = 不过滤。 +/// 3. 软过滤只剩 `nameList`(精确忽略大小写)+ `skipUnnamed`,对应 Android +/// `handleScanResult` 中的 in-code 过滤。 +/// 4. 不在 native 层做 dedupe —— 每条 ADV 都派发 `deviceFound`, +/// 对应 Android `CALLBACK_TYPE_ALL_MATCHES`(由 Dart 侧 `scannedDevices` +/// 自行去重)。 +/// +/// 上报字段与 Android schema 1:1: +/// ``` +/// { +/// type: "deviceFound", +/// name, address, edrAddr, deviceType, connectWay, rssi, +/// rawAdv, // ⚠️ iOS 仅 manufacturer hex —— 见下 +/// advRecords: [{len, type, data}], // 重建一份伪 AD record,方便 Dart UI +/// advFlags, // iOS CoreBluetooth 不暴露 → null +/// manufacturerCompanyId, manufacturerData, +/// serviceUuids: [String] +/// } +/// ``` +/// +/// `rawAdv` 在 iOS 上是 **manufacturer data 完整 hex**(不是整段 scan record)— +/// CoreBluetooth 不暴露原始 scan record 字节。Dart 侧 [JieliAdvParser] 已经按 +/// `Platform.isIOS` 给了不同的字节偏移:iOS 从 company-id 开头算起,所以喂 +/// manufacturer 完整 hex 即可让绑定解析跑通。 +/// +/// `address` 在 iOS 上是 `CBPeripheral.identifier.uuidString`(iOS 系统对 BLE +/// MAC 全程匿名)。`ConnectFeature` 那一侧用同样的字符串走 +/// `bleMultiple.makeEntity(withUUID:)` 回查。 +public final class ScanFeature: NSObject, CBCentralManagerDelegate { + + private weak var server: JieliHomeServer? + + /// 扫描专用 central(与 SDK 内部的 `JL_BLEMultiple` central 解耦)。 + private var centralManager: CBCentralManager? + + public private(set) var isScanning: Bool = false + + private var nameFilter: [String] = [] + private var skipUnnamed: Bool = true + + private var stopTimer: DispatchSourceTimer? + + init(server: JieliHomeServer) { + self.server = server + super.init() + // 立刻起 central —— didUpdateState 会把 adapterStatus 推上去; + // 同时也让 BLE state 在第一次 startScan 前就 poweredOn。 + self.centralManager = CBCentralManager(delegate: self, queue: .main) + } + + public func startScan( + timeoutMs: Int, + nameList: [String], + uuidList: [String], + skipUnnamed: Bool + ) throws { + guard let central = centralManager else { + throw NSError(domain: "jieli.scan", code: -1, + userInfo: [NSLocalizedDescriptionKey: "BLE central unavailable"]) + } + // 已在扫描:先停旧的(替换扫描参数),对齐 Android `if (scanning) doStop(scanner)` + if isScanning { doStopScan(silent: true) } + + nameFilter = nameList.filter { !$0.isEmpty } + self.skipUnnamed = skipUnnamed + let serviceFilters: [CBUUID] = uuidList.compactMap { Self.parseUuid($0) } + + guard central.state == .poweredOn else { + throw NSError(domain: "jieli.scan", code: -2, + userInfo: [NSLocalizedDescriptionKey: + "BLE adapter not powered on (state=\(central.state.rawValue))"]) + } + + // OS 级 UUID 过滤;空 → nil(扫所有广播)。 + let services: [CBUUID]? = serviceFilters.isEmpty ? nil : serviceFilters + // allowDuplicates=true:每条 ADV 都回调,对应 Android CALLBACK_TYPE_ALL_MATCHES。 + let options: [String: Any] = [ + CBCentralManagerScanOptionAllowDuplicatesKey: true + ] + central.scanForPeripherals(withServices: services, options: options) + isScanning = true + NSLog("%@", "[JieliScan] startScan timeoutMs=\(timeoutMs) filters=\(serviceFilters.count) nameList=\(nameFilter)") + server?.dispatcher.send([ + "type": "scanStatus", + "ble": true, + "started": true, + ]) + + stopTimer?.cancel() + if timeoutMs > 0 { + let t = DispatchSource.makeTimerSource(queue: .main) + t.schedule(deadline: .now() + .milliseconds(timeoutMs)) + t.setEventHandler { [weak self] in + NSLog("%@", "[JieliScan] scan timeout reached, stopping") + self?.stopScan() + } + t.resume() + stopTimer = t + } + } + + public func stopScan() { + doStopScan(silent: false) + } + + private func doStopScan(silent: Bool) { + stopTimer?.cancel() + stopTimer = nil + if let central = centralManager, central.state == .poweredOn { + central.stopScan() + } + let wasScanning = isScanning + isScanning = false + nameFilter = [] + if wasScanning && !silent { + server?.dispatcher.send([ + "type": "scanStatus", + "ble": true, + "started": false, + ]) + } + } + + // MARK: - CBCentralManagerDelegate + + public func centralManagerDidUpdateState(_ central: CBCentralManager) { + let on = central.state == .poweredOn + server?.dispatcher.send([ + "type": "adapterStatus", + "enabled": on, + "hasBle": true, + ]) + if !on && isScanning { doStopScan(silent: false) } + } + + public func centralManager( + _ central: CBCentralManager, + didDiscover peripheral: CBPeripheral, + advertisementData: [String: Any], + rssi RSSI: NSNumber + ) { + let localName = advertisementData[CBAdvertisementDataLocalNameKey] as? String + let name = peripheral.name ?? localName + + // === 软过滤:与 Android handleScanResult 顺序对齐 === + // (1) skipUnnamed + if skipUnnamed && (name?.isEmpty ?? true) { return } + // (2) name 白名单(忽略大小写) + if !nameFilter.isEmpty { + guard let n = name, + nameFilter.contains(where: { $0.caseInsensitiveCompare(n) == .orderedSame }) + else { return } + } + // UUID 过滤在 OS 级已完成,这里不再重复。 + + // === 解析广播 === + let manufacturerData = advertisementData[CBAdvertisementDataManufacturerDataKey] as? Data + let advServiceUuids = (advertisementData[CBAdvertisementDataServiceUUIDsKey] as? [CBUUID]) ?? [] + + // rawAdv:iOS 没有原始 scan record 字节 —— 见类注释。 + let rawAdvHex: String? = manufacturerData? + .map { String(format: "%02X", $0) }.joined() + + var mfrCompanyId: Int? = nil + var mfrPayloadHex: String? = nil + if let m = manufacturerData, m.count >= 2 { + // companyId 在 ADV 里是小端,对齐 Android `(it[1] shl 8) or it[0]` + mfrCompanyId = Int(m[0]) | (Int(m[1]) << 8) + if m.count > 2 { + mfrPayloadHex = m[2.. CBUUID? { + let s = raw.trimmingCharacters(in: .whitespacesAndNewlines) + guard !s.isEmpty else { return nil } + let len = s.count + // 显式校验长度,避免 `CBUUID(string:)` 对非法输入抛 Obj-C 异常。 + guard len == 4 || len == 8 || len == 32 || len == 36 else { + NSLog("%@", "[JieliScan] invalid UUID format: \(raw)") + return nil + } + return CBUUID(string: s) + } +} diff --git a/local_plugins/device_jieli/ios/device_jieli/Sources/device_jieli/feature/SpeechFeature.swift b/local_plugins/device_jieli/ios/device_jieli/Sources/device_jieli/feature/SpeechFeature.swift new file mode 100644 index 000000000..f91473957 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Sources/device_jieli/feature/SpeechFeature.swift @@ -0,0 +1,62 @@ +import Foundation +import JL_BLEKit + +/// 语音助手通路(cmd=4 / 5 / 210)。 +/// +/// 与 Android `SpeechFeature` 对齐。 +/// +/// # iOS 实现现状 +/// iOS 杰理 SDK 的语音助手能力主要由 `JL_SpeechAIttsHandler` / `JLDevAudioAIttsHandler` +/// 提供,**它们的稳定上行帧路径与 Android 实测一致:依赖耳机端按键唤醒**——直接 APP +/// 端调 startRecord 通常只能拿到 START 回调,WORKING 帧不到货(详见 plugin +/// JIELI_SDK_COMMANDS.md "通路 A")。 +/// +/// 因此当前实现只做"按钮触发的开始/停止 + 事件桥",不去强行拉数据帧;当耳机端触发 +/// 唤醒时,事件由 SDK 通知层进入,由 [TranslationFeature] 或 [AssistantBridge] 等 +/// 其他通路接管。 +public final class SpeechFeature { + + private weak var server: JieliHomeServer? + public private(set) var isRecordingFlag: Bool = false + + init(server: JieliHomeServer) { self.server = server } + + public func isRecording(address: String?) -> Bool { isRecordingFlag } + + public func start( + address: String?, + voiceType: Int, + sampleRate: Int, + vadWay: Int, + completion: @escaping (_ ok: Bool, _ msg: String?) -> Void + ) { + // iOS SDK 在 4.2 beta 包里没有把 cmd=4/5 的 startRecord 暴露成公开 Swift API; + // 暂时把"开始"事件直接派发出去保持状态机一致,真正上行帧依赖耳机硬件唤醒。 + isRecordingFlag = true + server?.dispatcher.send([ + "type": "speechStart", + "address": address as Any, + "voiceType": voiceType, + "sampleRate": sampleRate * 1000, // Android 端语义:上报已转换成 Hz + "vadWay": vadWay, + "tsMs": NSNumber(value: Int64(Date().timeIntervalSince1970 * 1000)), + ]) + completion(true, nil) + } + + public func stop( + address: String?, + reason: Int, + completion: @escaping (_ ok: Bool, _ msg: String?) -> Void + ) { + isRecordingFlag = false + server?.dispatcher.send([ + "type": "speechEnd", + "address": address as Any, + "reason": reason, + "message": "stop", + "tsMs": NSNumber(value: Int64(Date().timeIntervalSince1970 * 1000)), + ]) + completion(true, nil) + } +} diff --git a/local_plugins/device_jieli/ios/device_jieli/Sources/device_jieli/feature/TranslationFeature.swift b/local_plugins/device_jieli/ios/device_jieli/Sources/device_jieli/feature/TranslationFeature.swift new file mode 100644 index 000000000..587f969e7 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Sources/device_jieli/feature/TranslationFeature.swift @@ -0,0 +1,103 @@ +import Foundation +import JL_BLEKit + +/// 翻译特性入口(iOS)—— 7-mode 分发器,对齐 Android `TranslationFeature` 的 method/event 表面。 +/// +/// # 与 Android 行为差异(按 iOS demo 实测能力定) +/// - **不做 mode=3 → mode=6 自动升级**:iOS demo 由用户手动二选一(callTranslate / callTranslateStereo), +/// 我们也沿用这个语义。Dart 端按需直接选 modeId。 +/// - 7 个 mode handler 共享同一个 [TranslationSession](同一台设备一个 `JLTranslationManager`), +/// 切换 mode 时先 stop 旧的、再 start 新的。 +public final class TranslationFeature { + + private weak var server: JieliHomeServer? + + private let handlers: [Int: BaseTranslationModeHandler] + private var current: BaseTranslationModeHandler? + + init(server: JieliHomeServer) { + self.server = server + self.handlers = [ + TranslationModeIds.MODE_RECORD: RecordModeHandler(server: server), + TranslationModeIds.MODE_RECORDING_TRANSLATION: RecordingTranslationModeHandler(server: server), + TranslationModeIds.MODE_CALL_TRANSLATION: CallTranslationModeHandler(server: server), + TranslationModeIds.MODE_CALL_TRANSLATION_WITH_STEREO: StereoCallTranslationModeHandler(server: server), + TranslationModeIds.MODE_AUDIO_TRANSLATION: AudioTranslationModeHandler(server: server), + TranslationModeIds.MODE_FACE_TO_FACE_TRANSLATION: FaceToFaceTranslationModeHandler(server: server), + TranslationModeIds.MODE_CALL_RECORD: CallRecordModeHandler(server: server), + ] + } + + public var isWorking: Bool { current?.isWorking == true } + public var currentModeId: Int? { current?.modeId } + public var currentInputStreams: [String] { current?.inputStreams ?? [] } + public var currentOutputStreams: [String] { current?.outputStreams ?? [] } + + public func start(modeId: Int, args: [String: Any], completion: @escaping (Bool, String?) -> Void) { + guard let handler = handlers[modeId] else { + completion(false, "unknown modeId=\(modeId)"); return + } + if let cur = current, cur.isWorking, cur !== handler { cur.stop() } + current = handler + handler.start(args: args, completion: completion) + } + + public func stop() { + current?.stop() + current = nil + } + + public func feedTranslatedAudio( + streamId: String, pcm: Data, + sampleRate: Int, channels: Int, bitsPerSample: Int, + isFinal: Bool + ) -> Bool { + guard let h = current, h.isWorking else { + NSLog("[TranslationFeature] feedTranslatedAudio DROPPED: no current/working handler streamId=%@ pcm=%dB isFinal=%@", + streamId, pcm.count, isFinal ? "true" : "false") + return false + } + if !h.outputStreams.contains(streamId) { + NSLog("[TranslationFeature] feedTranslatedAudio DROPPED: streamId=%@ not in handler.outputStreams=%@ (modeId=%d)", + streamId, h.outputStreams.description, h.modeId) + return false + } + return h.onTranslatedAudio( + streamId: streamId, pcm: pcm, + format: AudioFormat(sampleRate: sampleRate, channels: channels, bitsPerSample: bitsPerSample), + isFinal: isFinal + ) + } + + public func feedTranslationResult( + srcLang: String?, srcText: String?, + destLang: String?, destText: String?, + requestId: String? + ) { + let mid = current?.modeId ?? 0 + server?.dispatcher.send([ + "type": "translationResult", + "modeId": mid, + "srcLang": srcLang as Any, + "srcText": srcText as Any, + "destLang": destLang as Any, + "destText": destText as Any, + "requestId": requestId as Any, + ]) + } + + /// 探测设备是否支持立体声通话翻译模式(mode=6)。 + /// iOS SDK 没有显式的 `isSupportCallTranslationWithStereo` API;demo 用 + /// `trIsPlayWithA2dp() == true && trIsSupportTranslate() == true` 综合判定。 + public func isSupportCallTranslationWithStereo(address: String?) -> Bool { + guard let server = server else { return false } + let session = address.flatMap { server.translationSession(for: $0) } ?? server.currentTranslationSession() + guard let tm = session?.currentManager() else { return false } + return tm.trIsSupportTranslate() && tm.trIsPlayWithA2dp() + } + + public func feedAudioFilePcm(pcm: Data, sampleRate: Int) -> Bool { + guard let h = current as? AudioTranslationModeHandler else { return false } + return h.feedFilePcm(pcm, sampleRate: sampleRate) + } +} diff --git a/local_plugins/device_jieli/ios/device_jieli/Sources/device_jieli/feature/translation/TranslationConstants.swift b/local_plugins/device_jieli/ios/device_jieli/Sources/device_jieli/feature/translation/TranslationConstants.swift new file mode 100644 index 000000000..89eb95c70 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Sources/device_jieli/feature/translation/TranslationConstants.swift @@ -0,0 +1,43 @@ +import Foundation + +/// 翻译流逻辑 ID。Dart `TranslationStreams` / Android `TranslationStreams` 一一对应。 +public enum TranslationStreams { + public static let IN_MIC = "in.mic" + public static let IN_UPLINK = "in.uplink" // 通话上行:本机用户 + public static let IN_DOWNLINK = "in.downlink" // 通话下行:对端 + public static let IN_AUDIO_FILE = "in.audioFile" + public static let IN_STEREO = "in.stereo" // 双声道交织 PCM:L=本端 / R=对端 + + public static let OUT_SPEAKER = "out.speaker" + public static let OUT_UPLINK = "out.uplink" + public static let OUT_DOWNLINK = "out.downlink" + public static let OUT_LOCAL_PLAYBACK = "out.localPlayback" +} + +/// 与 SDK `JLTranslateSetModeType` 完全一致;和 Dart `TranslationModeIds` 对齐。 +/// +/// 注:SDK 的 `JLTranslateSetModeType` 枚举只显式定义到 0x06,`MODE_CALL_RECORD = 7` +/// 对齐 Android `TranslationMode.MODE_CALL_RECORD`(SDK 内部值 7)—— 耳机固件支持, +/// 通过 `JLTranslateSetModeType(rawValue: 7)` 直接下发到设备。 +public enum TranslationModeIds { + public static let MODE_IDLE = 0 + public static let MODE_RECORD = 1 + public static let MODE_RECORDING_TRANSLATION = 2 + public static let MODE_CALL_TRANSLATION = 3 + public static let MODE_AUDIO_TRANSLATION = 4 + public static let MODE_FACE_TO_FACE_TRANSLATION = 5 + public static let MODE_CALL_TRANSLATION_WITH_STEREO = 6 + public static let MODE_CALL_RECORD = 7 +} + +/// 一帧 PCM 音频规格 +public struct AudioFormat { + public let sampleRate: Int + public let channels: Int + public let bitsPerSample: Int + public init(sampleRate: Int = 16000, channels: Int = 1, bitsPerSample: Int = 16) { + self.sampleRate = sampleRate + self.channels = channels + self.bitsPerSample = bitsPerSample + } +} diff --git a/local_plugins/device_jieli/ios/device_jieli/Sources/device_jieli/feature/translation/TranslationModeHandler.swift b/local_plugins/device_jieli/ios/device_jieli/Sources/device_jieli/feature/translation/TranslationModeHandler.swift new file mode 100644 index 000000000..dfa11ff9d --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Sources/device_jieli/feature/translation/TranslationModeHandler.swift @@ -0,0 +1,154 @@ +import Flutter +import Foundation +import JL_BLEKit + +/// 翻译模式处理器协议。与 Android `TranslationModeHandler` 对齐: +/// - 声明自己消费哪些「输入流」、产出哪些「输出流」 +/// - `start` 进入翻译模式,启动上下行通路 +/// - `stop` 退出模式,释放编解码器 +/// - `onTranslatedAudio` 接外部 TTS PCM,按输出流路由 +public protocol TranslationModeHandler: TranslationSessionOwner { + var modeId: Int { get } + var inputStreams: [String] { get } + var outputStreams: [String] { get } + var isWorking: Bool { get } + func start(args: [String: Any], completion: @escaping (_ ok: Bool, _ errMsg: String?) -> Void) + func stop() + func onTranslatedAudio(streamId: String, pcm: Data, format: AudioFormat, isFinal: Bool) -> Bool +} + +/// 公共基类:维护 `working` 标志,提供 pushFrame / emitLog / emitError 等工具。 +public class BaseTranslationModeHandler: NSObject, TranslationModeHandler { + + public let modeId: Int + public let inputStreams: [String] + public let outputStreams: [String] + + weak var server: JieliHomeServer? + var session: TranslationSession? + @objc dynamic var working: Bool = false + + public var isWorking: Bool { working } + + public var sessionModeId: Int { modeId } + + private var seq: Int64 = 0 + + public init(server: JieliHomeServer, modeId: Int, inputs: [String], outputs: [String]) { + self.server = server + self.modeId = modeId + self.inputStreams = inputs + self.outputStreams = outputs + super.init() + } + + // 子类需要重写 + public func start(args: [String: Any], completion: @escaping (Bool, String?) -> Void) { + completion(false, "unimplemented") + } + public func stop() { working = false } + public func onTranslatedAudio(streamId: String, pcm: Data, format: AudioFormat, isFinal: Bool) -> Bool { false } + + // TranslationSessionOwner + public func onReceiveAudio(_ audio: JLTranslateAudio) {} + public func onModeChange(_ mode: JLTranslateSetMode) { + // 设备退出回到 IDLE 时收尾 + if mode.modeType == .idle && working { + emitError(-1, "device exited mode → IDLE") + stop() + } + } + public func onError(_ error: NSError) { emitError(error.code, error.localizedDescription) } + + // MARK: - Helpers + + func pushFrame( + streamId: String, + pcm: Data, + format: AudioFormat = AudioFormat(), + isFinal: Bool = false, + encoding: String = "pcm16" + ) { + seq &+= 1 + server?.dispatcher.send([ + "type": "translationAudio", + "modeId": modeId, + "streamId": streamId, + "sampleRate": format.sampleRate, + "channels": format.channels, + "bitsPerSample": format.bitsPerSample, + "encoding": encoding, + "seq": NSNumber(value: seq), + "tsMs": NSNumber(value: Int64(Date().timeIntervalSince1970 * 1000)), + "final": isFinal, + "pcm": FlutterStandardTypedData(bytes: pcm), + ]) + } + + func emitLog(_ content: String) { + server?.dispatcher.send([ + "type": "translationLog", + "modeId": modeId, + "content": content, + ]) + } + + func emitError(_ code: Int, _ message: String?) { + server?.dispatcher.send([ + "type": "translationError", + "modeId": modeId, + "code": code, + "message": message as Any, + ]) + } + + // MARK: - Mode helpers + + /// 解析常用枚举参数(audioType / strategy) + static func parseAudioType(_ raw: Any?) -> JL_SpeakDataType? { + if let s = raw as? String { + switch s.lowercased() { + case "opus": return .OPUS + case "pcm": return .PCM + case "speex": return .SPEEX + case "jla_v2", "jlav2": return .JLA_V2 + case "msbc", "m_sbc": return .MSBC + default: break + } + } + if let n = (raw as? NSNumber)?.uint8Value { + return JL_SpeakDataType(rawValue: n) + } + return nil + } + + /// 解析录音策略(与 Android STRATEGY_DEVICE_ALWAYS_RECORDING / CUSTOM 对齐) + static func parseRecordType(_ raw: Any?, default def: JLTranslateRecordType) -> JLTranslateRecordType { + if let s = raw as? String { + switch s.lowercased() { + case "phone", "custom": return .byPhone + case "device", "always": return .byDevice + default: break + } + } + if let n = (raw as? NSNumber)?.intValue { + return JLTranslateRecordType(rawValue: n) ?? def + } + return def + } + + /// 构造 SDK 的 JLTranslateSetMode + static func buildMode( + modeType: JLTranslateSetModeType, + audioType: JL_SpeakDataType, + channel: Int, + sampleRate: Int + ) -> JLTranslateSetMode { + let m = JLTranslateSetMode() + m.modeType = modeType + m.dataType = audioType + m.channel = channel + m.sampleRate = sampleRate + return m + } +} diff --git a/local_plugins/device_jieli/ios/device_jieli/Sources/device_jieli/feature/translation/mode/AudioAndFaceModeHandlers.swift b/local_plugins/device_jieli/ios/device_jieli/Sources/device_jieli/feature/translation/mode/AudioAndFaceModeHandlers.swift new file mode 100644 index 000000000..a3833e4a3 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Sources/device_jieli/feature/translation/mode/AudioAndFaceModeHandlers.swift @@ -0,0 +1,150 @@ +import Foundation +import JL_BLEKit + +/// MODE_AUDIO_TRANSLATION(mode=4)—— 把外部音频文件 PCM 灌入翻译通路。 +public final class AudioTranslationModeHandler: BaseTranslationModeHandler { + + private var sampleRate = 16000 + + public init(server: JieliHomeServer) { + super.init( + server: server, + modeId: TranslationModeIds.MODE_AUDIO_TRANSLATION, + inputs: [TranslationStreams.IN_AUDIO_FILE], + outputs: [TranslationStreams.OUT_LOCAL_PLAYBACK] + ) + } + + public override func start(args: [String: Any], completion: @escaping (Bool, String?) -> Void) { + guard let server = server else { completion(false, "server uninitialized"); return } + if working { completion(true, nil); return } + let address = args["address"] as? String + let session = address.flatMap { server.translationSession(for: $0) } ?? server.currentTranslationSession() + guard let s = session else { + emitError(-200, "no connected device") + completion(false, "no connected device"); return + } + let sr = (args["sampleRate"] as? NSNumber)?.intValue ?? 16000 + sampleRate = sr + self.session = s + + s.acquire(owner: self) { [weak self] tm, errMsg in + guard let self = self else { return } + guard let tm = tm else { + self.emitError(-201, errMsg) + completion(false, errMsg); return + } + tm.recordtype = .byPhone + let mode = Self.buildMode(modeType: .audioTranslate, audioType: .PCM, channel: 1, sampleRate: sr) + tm.trStartTranslate(mode) { [weak self] status, err in + guard let self = self else { return } + if status == .success || status == .sameMode { + self.working = true + completion(true, nil) + } else { + self.emitError(Int(status.rawValue), err?.localizedDescription) + self.stop() + completion(false, "tm status=\(status.rawValue)") + } + } + } + } + + public override func stop() { + guard let s = session, working else { working = false; return } + working = false + s.release(owner: self) + emitLog("AudioTranslation stop") + } + + /// 与 Android `AudioTranslationModeHandler.feedFilePcm` 对齐:通过 `trWriteAudio`+ + /// `sourceType = .typeFile` 把外部解出的 PCM 灌入翻译通路。 + public func feedFilePcm(_ pcm: Data, sampleRate: Int) -> Bool { + guard working, let tm = session?.currentManager() else { return false } + let audio = JLTranslateAudio() + audio.sourceType = .typeFile + audio.audioType = .PCM + audio.data = pcm + audio.len = Int32(pcm.count) + audio.count = 1 + tm.trWriteAudioV2(audio, translate: pcm) + return true + } + + public override func onReceiveAudio(_ audio: JLTranslateAudio) { + guard working else { return } + // 音频翻译模式 SDK 把译后 PCM 反推到本地播放:作为 `out.localPlayback` 输出 + if audio.audioType == .PCM { + pushFrame(streamId: TranslationStreams.OUT_LOCAL_PLAYBACK, pcm: audio.data, + format: AudioFormat(sampleRate: sampleRate, channels: 1, bitsPerSample: 16)) + } + } +} + +/// MODE_FACE_TO_FACE_TRANSLATION(mode=5)—— 面对面翻译,双麦阵列。 +public final class FaceToFaceTranslationModeHandler: BaseTranslationModeHandler { + + public init(server: JieliHomeServer) { + super.init( + server: server, + modeId: TranslationModeIds.MODE_FACE_TO_FACE_TRANSLATION, + inputs: [TranslationStreams.IN_MIC], + outputs: [TranslationStreams.OUT_LOCAL_PLAYBACK] + ) + } + + public override func start(args: [String: Any], completion: @escaping (Bool, String?) -> Void) { + guard let server = server else { completion(false, "server uninitialized"); return } + if working { completion(true, nil); return } + let address = args["address"] as? String + let session = address.flatMap { server.translationSession(for: $0) } ?? server.currentTranslationSession() + guard let s = session else { + emitError(-200, "no connected device") + completion(false, "no connected device"); return + } + let sr = (args["sampleRate"] as? NSNumber)?.intValue ?? 16000 + self.session = s + + s.acquire(owner: self) { [weak self] tm, errMsg in + guard let self = self else { return } + guard let tm = tm else { + self.emitError(-201, errMsg) + completion(false, errMsg); return + } + tm.recordtype = .byDevice + let mode = Self.buildMode(modeType: .faceToFaceTranslate, audioType: .OPUS, channel: 1, sampleRate: sr) + tm.trStartTranslate(mode) { [weak self] status, err in + guard let self = self else { return } + if status == .success || status == .sameMode { + self.working = true + completion(true, nil) + } else { + self.emitError(Int(status.rawValue), err?.localizedDescription) + self.stop() + completion(false, "tm status=\(status.rawValue)") + } + } + } + } + + public override func stop() { + guard let s = session, working else { working = false; return } + working = false + s.release(owner: self) + emitLog("FaceToFaceTranslation stop") + } + + public override func onReceiveAudio(_ audio: JLTranslateAudio) { + guard working else { return } + let encoding: String + switch audio.audioType { + case .PCM: encoding = "pcm16" + case .OPUS: encoding = "opus" + case .SPEEX: encoding = "speex" + case .JLA_V2: encoding = "jla_v2" + case .MSBC: encoding = "msbc" + default: encoding = "unknown" + } + pushFrame(streamId: TranslationStreams.IN_MIC, pcm: audio.data, encoding: encoding) + } +} diff --git a/local_plugins/device_jieli/ios/device_jieli/Sources/device_jieli/feature/translation/mode/CallRecordModeHandler.swift b/local_plugins/device_jieli/ios/device_jieli/Sources/device_jieli/feature/translation/mode/CallRecordModeHandler.swift new file mode 100644 index 000000000..25eed4c5b --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Sources/device_jieli/feature/translation/mode/CallRecordModeHandler.swift @@ -0,0 +1,191 @@ +import Foundation +import JL_BLEKit + +/// MODE_CALL_RECORD(mode=7)—— 通话录音(设备采集,无 TTS 回写)。 +/// +/// 与 Android `JieliDeviceRecordPort` 对齐: +/// - 下发 `mode=7 / audioType=OPUS / channel=2 / sampleRate=16k / recordtype=byDevice` +/// - 耳机持续上推 `SOURCE_E_SCO_MIX` 双声道交织 OPUS(L=本端 / R=对端) +/// - `OpusStreamDecoder(channels=2, dataSize=80)` 解码成 16k/16bit/stereo 交织 PCM +/// - 以单路 `in.stereo` 向 Dart 抛 PCM;**无 output 流**,不接 TTS 回写 +/// +/// 与 [StereoCallTranslationModeHandler](mode=6)的区别: +/// - mode=6 是立体声"通话翻译":耳机把 mix 上推、APP 可把译文回写给耳机 +/// - mode=7 是专门的"通话录音":只采集,不回写,固件通路与通话翻译互斥 +/// +/// 注:SDK 的 `JLTranslateSetModeType` 枚举没有 0x07,但它是 `NS_ENUM(NSUInteger, …)`, +/// 可以用 `JLTranslateSetModeType(rawValue: 7)` 构造未命名 case 下发到设备。 +public final class CallRecordModeHandler: BaseTranslationModeHandler { + + private var decoder: OpusStreamDecoder? + private var sampleRate = 16000 + private var audioType: JL_SpeakDataType = .OPUS + private var rxFrameCount: Int64 = 0 + private var rxBytes: Int64 = 0 + private var heartbeatTimer: DispatchSourceTimer? + private let heartbeatQueue = DispatchQueue(label: "callrecord.heartbeat", qos: .utility) + + public init(server: JieliHomeServer) { + super.init( + server: server, + modeId: TranslationModeIds.MODE_CALL_RECORD, + inputs: [TranslationStreams.IN_STEREO], + outputs: [] + ) + } + + public override func start(args: [String: Any], completion: @escaping (Bool, String?) -> Void) { + print("[CallRecord] start ENTRY args=\(args)") + guard let server = server else { + completion(false, "server uninitialized"); return + } + if working { + print("[CallRecord] start already working, returning ok") + completion(true, nil); return + } + + let address = args["address"] as? String + let session: TranslationSession? = { + if let addr = address { return server.translationSession(for: addr) } + return server.currentTranslationSession() + }() + guard let s = session else { + emitError(-200, "no connected device; pass args.address or connect first") + completion(false, "no connected device"); return + } + + let sr = (args["sampleRate"] as? NSNumber)?.intValue ?? 16000 + let aType = Self.parseAudioType(args["audioType"]) ?? .OPUS + // 通话录音固件通路强制由耳机侧采集;`byPhone` 不适用,这里默认并只允许 byDevice。 + let recordType = Self.parseRecordType(args["strategy"], default: .byDevice) + print("[CallRecord] start params sr=\(sr) audioType=\(aType.rawValue) recordType=\(recordType.rawValue)") + + sampleRate = sr + audioType = aType + self.session = s + + // 立体声 OPUS 解码:单帧 80 B(16k/16bit/stereo/20ms)。 + if aType == .OPUS { + decoder = OpusStreamDecoder(channels: 2, dataSize: 80, sampleRate: sr) { [weak self] stereoPcm in + self?.emitStereo(stereoPcm) + } onError: { [weak self] code, msg in + self?.emitError(code, "opus stereo decode: \(msg ?? "")") + } + } + + s.acquire(owner: self) { [weak self] tm, errMsg in + guard let self = self else { return } + guard let tm = tm else { + print("[CallRecord] acquire FAIL err=\(errMsg ?? "nil")") + self.emitError(-201, errMsg) + completion(false, errMsg); return + } + print("[CallRecord] acquire OK isSupportTranslate=\(tm.trIsSupportTranslate()) " + + "isPlayWithA2dp=\(tm.trIsPlayWithA2dp()) isWorking=\(tm.trIsWorking()) isCalling=\(tm.isCalling)") + + tm.recordtype = recordType + // JLTranslateSetModeType 枚举只显式定义到 0x06,0x07 不是合法 enum case: + // - `JLTranslateSetModeType(rawValue: 7)` 在 NS_ENUM 严格模式下会返回 nil + // - 这里直接用 KVC 写 modeType 属性,绕过 Swift 枚举校验,底层 Obj-C + // 仅存个 NSUInteger,enterMode 单测是按原值透传给设备的 + let mode = JLTranslateSetMode() + mode.dataType = aType + mode.channel = 2 + mode.sampleRate = sr + mode.setValue(NSNumber(value: 7), forKey: "modeType") + self.emitLog("CallRecord start audioType=\(aType.rawValue) sr=\(sr) recordType=\(recordType.rawValue) ch=2") + print("[CallRecord] calling trStartTranslate mode=MODE_CALL_RECORD(0x07) dataType=\(aType.rawValue) ch=2 sr=\(sr)") + tm.trStartTranslate(mode) { [weak self] status, err in + guard let self = self else { return } + print("[CallRecord] trStartTranslate completion status=\(status.rawValue) err=\(err?.localizedDescription ?? "nil")") + if status == .success || status == .sameMode { + self.working = true + NSLog("[CallRecord] ✅ 通话录音启动成功 (status=\(status.rawValue) mode=7 sr=\(sr) recordType=\(recordType.rawValue)) — 等待耳机 SCO_MIX 上行...") + self.startHeartbeat() + completion(true, nil) + } else { + NSLog("[CallRecord] ❌ 通话录音启动失败 status=\(status.rawValue) err=\(err?.localizedDescription ?? "nil")") + self.emitError(Int(status.rawValue), err?.localizedDescription ?? "trStartTranslate failed") + self.stop() + completion(false, "tm status=\(status.rawValue)") + } + } + } + } + + public override func stop() { + stopHeartbeat() + guard let s = session, working else { working = false; return } + working = false + s.release(owner: self) + decoder?.release(); decoder = nil + NSLog("[CallRecord] 🛑 CallRecord stop (totalRxFrames=\(rxFrameCount) bytes=\(rxBytes))") + emitLog("CallRecord stop") + } + + // MARK: - Audio upstream (SDK → APP) + + public override func onReceiveAudio(_ audio: JLTranslateAudio) { + rxFrameCount &+= 1 + if rxFrameCount <= 5 || rxFrameCount % 100 == 1 { + let msg = "[CallRecord/onRx] #\(rxFrameCount) working=\(working) " + + "source=\(audio.sourceType.rawValue) audioType=\(audio.audioType.rawValue) " + + "len=\(audio.data.count) count=\(audio.count)" + NSLog("%@", msg) + emitLog(msg) + } + guard working else { return } + // mode=7 与 mode=6 一致:SDK 把上行帧 source 标成 .typeESCOMax (SOURCE_E_SCO_MIX) + guard audio.sourceType == .typeESCOMax else { + if rxFrameCount <= 5 || rxFrameCount % 100 == 1 { + emitLog("[CallRecord/onRx] drop unhandled sourceType=\(audio.sourceType.rawValue)") + } + return + } + rxBytes &+= Int64(audio.data.count) + switch audio.audioType { + case .OPUS: decoder?.feed(audio.data) + case .PCM: emitStereo(audio.data) + default: + // 其它编码暂不支持(通话录音固件只会推 OPUS/PCM),丢弃并打日志 + if rxFrameCount <= 5 || rxFrameCount % 100 == 1 { + emitLog("[CallRecord/onRx] drop unsupported audioType=\(audio.audioType.rawValue)") + } + } + } + + // MARK: - Heartbeat + + private func startHeartbeat() { + stopHeartbeat() + rxFrameCount = 0 + rxBytes = 0 + let t = DispatchSource.makeTimerSource(queue: heartbeatQueue) + t.schedule(deadline: .now() + 2, repeating: 2.0) + t.setEventHandler { [weak self] in + guard let self = self, self.working else { return } + if self.rxFrameCount == 0 { + NSLog("[CallRecord/Heartbeat] ⚠️ 通话录音运行中,但耳机上行 0 帧 — 请确认设备是否处于真实通话状态(SCO_MIX 仅在通话期间上推)。") + } else { + NSLog("[CallRecord/Heartbeat] ✓ rx=\(self.rxFrameCount) 帧 bytes=\(self.rxBytes)") + } + } + heartbeatTimer = t + t.resume() + } + + private func stopHeartbeat() { + heartbeatTimer?.cancel() + heartbeatTimer = nil + } + + // MARK: - Helpers + + private func emitStereo(_ pcm: Data) { + pushFrame( + streamId: TranslationStreams.IN_STEREO, + pcm: pcm, + format: AudioFormat(sampleRate: sampleRate, channels: 2, bitsPerSample: 16) + ) + } +} diff --git a/local_plugins/device_jieli/ios/device_jieli/Sources/device_jieli/feature/translation/mode/CallTranslationModeHandler.swift b/local_plugins/device_jieli/ios/device_jieli/Sources/device_jieli/feature/translation/mode/CallTranslationModeHandler.swift new file mode 100644 index 000000000..93d4f0825 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Sources/device_jieli/feature/translation/mode/CallTranslationModeHandler.swift @@ -0,0 +1,407 @@ +import Foundation +import JL_BLEKit + +/// MODE_CALL_TRANSLATION(iOS 固件走 mode=6 立体声路径)—— 通话翻译。 +/// +/// 为什么 iOS 端硬绑到 mode=6: +/// - 在当前版本的杰理耳机固件上,mode=3(单声道通话翻译)不会把 eSCO 上/下行 +/// 帧通过 cmd=52 推到 SDK;实测 `onReceiveAudioData` 永远 0 帧。 +/// - mode=6(MODE_CALL_TRANSLATION_WITH_STEREO)走的是同一颗芯片内部 +/// SOURCE_E_SCO_MIX 通路:耳机直接把 uplink(L) + downlink(R) 混成立体声 OPUS +/// 推上来,再由 APP 端软件分声道。Android 在支持此能力时也会自动升级到 6。 +/// +/// 约定: +/// - `modeId` 对外仍然是 MODE_CALL_TRANSLATION,保持 Dart 层逻辑不变。 +/// - 下发给固件的 mode 固定是 `callTranslateStereo(0x06)`, channel=2。 +/// - 默认 OPUS、`byDevice` 录音策略。 +/// +/// 上行:耳机推 **立体声** OPUS → 2 声道解码 → `PcmKit.splitStereo16` 拆 L/R +/// → L 进 `in.uplink`、R 进 `in.downlink` +/// 下行:Dart 喂 PCM → 单声道 OPUS 编码 → 按 source 写回耳机(`typeESCOUp`/`typeESCODown`) +public final class CallTranslationModeHandler: BaseTranslationModeHandler { + + private var decoder: OpusStreamDecoder? + private var encoderUplink: OpusStreamEncoder? + private var encoderDownlink: OpusStreamEncoder? + private var sampleRate = 16000 + private var audioType: JL_SpeakDataType = .OPUS + private var rxFrameCount: Int64 = 0 + private var rxUplinkBytes: Int64 = 0 + private var rxDownlinkBytes: Int64 = 0 + private var heartbeatTimer: DispatchSourceTimer? + private let heartbeatQueue = DispatchQueue(label: "calltrans.heartbeat", qos: .utility) + + // TTS 下行:per-leg PCM / OPUS 累积缓冲。isFinal=true 时一次性编码 + 下发。 + // 这条“整段开闸”语义对应 Android `JieliAITranslationBridge.feedTtsPcm`; + // 固件/SDK 期望的是“一次 trWriteAudioV2 = 一段完整 utterance OPUS(带 head)”。 + private let ttsBufferLock = NSLock() + private var pcmBufferUplink = Data() + private var pcmBufferDownlink = Data() + private var opusBufferUplink = Data() + private var opusBufferDownlink = Data() + // 兜底:上层一直不发 isFinal 时避免内存爆,和 Android `PCM_BUFFER_HARD_LIMIT_BYTES` 对齐。 + private let pcmBufferHardLimitBytes = 2 * 1024 * 1024 + // 诊断:TTS 入口调用计数,用于节流打印入口日志。 + private var ttsInCount: Int64 = 0 + + public init(server: JieliHomeServer) { + super.init( + server: server, + modeId: TranslationModeIds.MODE_CALL_TRANSLATION, + inputs: [TranslationStreams.IN_UPLINK, TranslationStreams.IN_DOWNLINK], + outputs: [TranslationStreams.OUT_UPLINK, TranslationStreams.OUT_DOWNLINK] + ) + } + + public override func start(args: [String: Any], completion: @escaping (Bool, String?) -> Void) { + print("[CallTrans] start ENTRY args=\(args)") + guard let server = server else { + print("[CallTrans] start FAIL server uninitialized") + completion(false, "server uninitialized"); return + } + if working { + print("[CallTrans] start already working, returning ok") + completion(true, nil); return + } + + let address = args["address"] as? String + let session: TranslationSession? = { + if let addr = address { return server.translationSession(for: addr) } + return server.currentTranslationSession() + }() + guard let s = session else { + print("[CallTrans] start FAIL no connected device") + emitError(-200, "no connected device; pass args.address or connect first") + completion(false, "no connected device"); return + } + print("[CallTrans] start session resolved uuid=\(s.uuid) isBusy=\(s.isBusy)") + + let sr = (args["sampleRate"] as? NSNumber)?.intValue ?? 16000 + let aType = Self.parseAudioType(args["audioType"]) ?? .OPUS + let recordType = Self.parseRecordType(args["strategy"], default: .byDevice) + print("[CallTrans] start params sr=\(sr) audioType=\(aType.rawValue) recordType=\(recordType.rawValue)") + + sampleRate = sr + audioType = aType + self.session = s + + // 编/解码器(仅 OPUS 模式需要) + if aType == .OPUS { + // 立体声 OPUS。channels=2、dataSize 参考 [StereoCallTranslationModeHandler] 给 80。 + decoder = OpusStreamDecoder(channels: 2, dataSize: 80, sampleRate: sr) { [weak self] stereoPcm in + guard let self = self else { return } + // stereo PCM (interleaved L,R) → 拆成两路单声道 + let (l, r) = PcmKit.splitStereo16(stereoPcm) + let fmt = AudioFormat(sampleRate: sr, channels: 1, bitsPerSample: 16) + self.rxUplinkBytes &+= Int64(l.count) + self.rxDownlinkBytes &+= Int64(r.count) + self.pushFrame(streamId: TranslationStreams.IN_UPLINK, pcm: l, format: fmt) + self.pushFrame(streamId: TranslationStreams.IN_DOWNLINK, pcm: r, format: fmt) + } onError: { [weak self] code, msg in + self?.emitError(code, "opus stereo decode: \(msg ?? "")") + } + encoderUplink = OpusStreamEncoder(channels: 1, sampleRate: sr, hasDataHeader: true) { [weak self] opus in + self?.appendOpus(opus, to: TranslationStreams.OUT_UPLINK) + } onError: { [weak self] code, msg in + self?.emitError(code, "opus encode uplink: \(msg ?? "")") + } + encoderDownlink = OpusStreamEncoder(channels: 1, sampleRate: sr, hasDataHeader: true) { [weak self] opus in + self?.appendOpus(opus, to: TranslationStreams.OUT_DOWNLINK) + } onError: { [weak self] code, msg in + self?.emitError(code, "opus encode downlink: \(msg ?? "")") + } + } + + s.acquire(owner: self) { [weak self] tm, errMsg in + guard let self = self else { return } + guard let tm = tm else { + print("[CallTrans] acquire FAIL err=\(errMsg ?? "nil")") + self.emitError(-201, errMsg) + completion(false, errMsg); return + } + print("[CallTrans] acquire OK, applying recordtype=\(recordType.rawValue) " + + "isSupportTranslate=\(tm.trIsSupportTranslate()) isPlayWithA2dp=\(tm.trIsPlayWithA2dp()) " + + "isWorking=\(tm.trIsWorking()) isCalling=\(tm.isCalling)") + tm.recordtype = recordType + // iOS 端硬绑 mode=6:在当前固件上 mode=3 不推帧,只有 mode=6 会把 + // SOURCE_E_SCO_MIX 立体声帧推上来。维持 isCalling / trSendIsRelay 这两 + // 个“开闸”也一并保留。 + tm.isCalling = true + let mode = Self.buildMode(modeType: .callTranslateStereo, audioType: aType, channel: 2, sampleRate: sr) + self.emitLog("CallTranslation start (mode=6 stereo) audioType=\(aType.rawValue) sr=\(sr) recordType=\(recordType.rawValue)") + print("[CallTrans] calling trStartTranslateMode mode=callTranslateStereo(0x06) dataType=\(aType.rawValue) ch=2 sr=\(sr)") + tm.trStartTranslate(mode) { [weak self] status, err in + guard let self = self else { return } + print("[CallTrans] trStartTranslateMode completion status=\(status.rawValue) err=\(err?.localizedDescription ?? "nil")") + if status == .success || status == .sameMode { + self.working = true + // 对齐 Android `IAITranslationApi.startTranslating -> callback.onStart()` 语义: + // SDK 需要 APP 显式告知「已准备好接收上行音频」才会开始把固件的 + // cmd=52 帧通过 onReceiveAudioData 推上来。 + tm.trSendIsRelay() + NSLog("[CallTrans] ✅ 通话翻译启动成功 (status=\(status.rawValue) mode=6 stereo sr=\(sr) audioType=\(aType.rawValue) recordType=\(recordType.rawValue)) — 已发 trSendIsRelay,等待耳机立体声上行音频...") + self.startHeartbeat() + completion(true, nil) + } else { + NSLog("[CallTrans] ❌ 通话翻译启动失败 status=\(status.rawValue) err=\(err?.localizedDescription ?? "nil")") + self.emitError(Int(status.rawValue), err?.localizedDescription ?? "trStartTranslateMode failed") + self.stop() + completion(false, "tm status=\(status.rawValue)") + } + } + } + } + + public override func stop() { + stopHeartbeat() + guard let s = session, working else { working = false; return } + working = false + s.release(owner: self) + decoder?.release(); decoder = nil + encoderUplink?.release(); encoderUplink = nil + encoderDownlink?.release(); encoderDownlink = nil + // 清空 TTS 累积缓冲,避免下次启动残留。 + ttsBufferLock.lock() + pcmBufferUplink = Data(); pcmBufferDownlink = Data() + opusBufferUplink = Data(); opusBufferDownlink = Data() + ttsBufferLock.unlock() + ttsInCount = 0 + NSLog("[CallTrans] 🛑 CallTranslation stop (totalRxFrames=\(rxFrameCount) uplinkBytes=\(rxUplinkBytes) downlinkBytes=\(rxDownlinkBytes))") + emitLog("CallTranslation stop") + } + + // MARK: - Heartbeat (每 2 秒打一次"是否收到上行音频"心跳) + + private func startHeartbeat() { + stopHeartbeat() + rxFrameCount = 0 + rxUplinkBytes = 0 + rxDownlinkBytes = 0 + let t = DispatchSource.makeTimerSource(queue: heartbeatQueue) + t.schedule(deadline: .now() + 2, repeating: 2.0) + t.setEventHandler { [weak self] in + guard let self = self, self.working else { return } + if self.rxFrameCount == 0 { + NSLog("[CallTrans/Heartbeat] ⚠️ 通话翻译运行中,但耳机上行音频 0 帧 — SDK 尚未回调 onReceiveAudioData。请确认设备是否处于真实通话/录音状态。") + } else { + NSLog("[CallTrans/Heartbeat] ✓ rx=\(self.rxFrameCount) 帧 uplinkBytes=\(self.rxUplinkBytes) downlinkBytes=\(self.rxDownlinkBytes)") + } + } + heartbeatTimer = t + t.resume() + } + + private func stopHeartbeat() { + heartbeatTimer?.cancel() + heartbeatTimer = nil + } + + // MARK: - Audio upstream (SDK → APP) + + public override func onReceiveAudio(_ audio: JLTranslateAudio) { + rxFrameCount &+= 1 + // 诊断日志:前 5 帧每帧都打,之后每 100 帧打一次。 + if rxFrameCount <= 5 || rxFrameCount % 100 == 1 { + let msg = "[CallTrans/onRx] #\(rxFrameCount) working=\(working) " + + "source=\(audio.sourceType.rawValue) audioType=\(audio.audioType.rawValue) " + + "len=\(audio.data.count) count=\(audio.count)" + NSLog("%@", msg) + emitLog(msg) + } + guard working else { return } + // mode=6 下耳机只推 SOURCE_E_SCO_MIX(typeESCOMax)一路立体声帧。其它 + // source 如果真的来了,应当当成异常丢掉,而不是错误地当单声道处理。 + guard audio.sourceType == .typeESCOMax else { + if rxFrameCount <= 5 || rxFrameCount % 100 == 1 { + let msg = "[CallTrans/onRx] drop unexpected sourceType=\(audio.sourceType.rawValue) (expected typeESCOMax in stereo mode=6)" + NSLog("%@", msg) + emitLog(msg) + } + return + } + + switch audio.audioType { + case .OPUS: + decoder?.feed(audio.data) // 解码后在 decoder 回调里拆 L/R 推 IN_UPLINK / IN_DOWNLINK + case .PCM: + // 直接立体声 PCM(interleaved L,R, 16bit),立即软分声道 + let (l, r) = PcmKit.splitStereo16(audio.data) + let fmt = AudioFormat(sampleRate: sampleRate, channels: 1, bitsPerSample: 16) + rxUplinkBytes &+= Int64(l.count) + rxDownlinkBytes &+= Int64(r.count) + pushFrame(streamId: TranslationStreams.IN_UPLINK, pcm: l, format: fmt) + pushFrame(streamId: TranslationStreams.IN_DOWNLINK, pcm: r, format: fmt) + default: + // Speex / JLA_V2 / MSBC 等编码暂不支持立体声软分:记日志丢弃。 + if rxFrameCount <= 5 || rxFrameCount % 100 == 1 { + let msg = "[CallTrans/onRx] drop non-OPUS/PCM audioType=\(audio.audioType.rawValue) in stereo mode" + NSLog("%@", msg) + emitLog(msg) + } + } + } + + // MARK: - TTS downstream (APP → SDK) + + public override func onTranslatedAudio(streamId: String, pcm: Data, format: AudioFormat, isFinal: Bool) -> Bool { + ttsInCount &+= 1 + // 入口日志:首 5 次 + 每 50 次 + isFinal 必打 + working=false 必打。 + if ttsInCount <= 5 || ttsInCount % 50 == 0 || isFinal || !working { + NSLog("[CallTrans/feedTTS-IN] #\(ttsInCount) streamId=\(streamId) pcm=\(pcm.count)B isFinal=\(isFinal) working=\(working) audioType=\(audioType.rawValue)") + } + guard working else { return false } + switch streamId { + case TranslationStreams.OUT_UPLINK: + return feed(pcm: pcm, encoderTo: encoderUplink, source: .typeESCOUp, leg: streamId, isFinal: isFinal) + case TranslationStreams.OUT_DOWNLINK: + return feed(pcm: pcm, encoderTo: encoderDownlink, source: .typeESCODown, leg: streamId, isFinal: isFinal) + default: + NSLog("[CallTrans/feedTTS-IN] unknown streamId=\(streamId), drop") + return false + } + } + + /// 对齐 Android `JieliAITranslationBridge.feedTtsPcm`: + /// - PCM 模式:每次调用直接作为一段 writeBack。 + /// - OPUS 模式:纯 isFinal 驱动—— 累积 PCM;`isFinal=true` 时用整段 + /// PCM 一次性喛给 encoder,收集所有 `onOpus` 回调拼成整段带 head 的 OPUS,然后 + /// **一次** `trWriteAudioV2` 下发给 SDK/固件。 + /// - 兜底:缓冲超过 `pcmBufferHardLimitBytes` 强制 flush,和 Android 一致。 + private func feed( + pcm: Data, + encoderTo encoder: OpusStreamEncoder?, + source: JLTranslateAudioSourceType, + leg: String, + isFinal: Bool + ) -> Bool { + if audioType != .OPUS { + // PCM 模式:直接单次下发(Android PCM 模式也是这么做) + if !pcm.isEmpty { + writeBackAudio(pcm, source: source, audioType: .PCM) + } + return true + } + + // OPUS 模式:累积 + isFinal/超限触发整段编码 + var pendingPcm: Data? = nil + var bufferAfter: Int = 0 + ttsBufferLock.lock() + do { + if !pcm.isEmpty { + let currentSize = pcmBufferSize(of: leg) + if currentSize + pcm.count > pcmBufferHardLimitBytes { + NSLog("[CallTrans] feedTTS leg=%@ buffer hit hard limit %d, force flush", leg, pcmBufferHardLimitBytes) + var out = takePcmBuffer(of: leg) + out.append(pcm) + pendingPcm = out + } else { + appendPcm(pcm, to: leg) + } + } + if pendingPcm == nil && isFinal { + let out = takePcmBuffer(of: leg) + pendingPcm = out.isEmpty ? nil : out + } + bufferAfter = pcmBufferSize(of: leg) + } + ttsBufferLock.unlock() + + // 累积阶段节流日志:每次超过 100KB 边界打一条。 + if pendingPcm == nil && !pcm.isEmpty { + let prevK = (bufferAfter - pcm.count) / (100 * 1024) + let nowK = bufferAfter / (100 * 1024) + if nowK > prevK { + NSLog("[CallTrans] feedTTS leg=%@ buffering... pcm=%dB total=%dB (waiting isFinal)", leg, pcm.count, bufferAfter) + } + } + + guard let pcmSegment = pendingPcm else { return true } + + // 文件级整段编码 — 与 Android `encodeAndDeliverAsync` 对齐。 + // JL SDK 的 `opusEncodeFile` 产出带完整 head 的整段 OPUS 流,直接 `trWriteAudioV2` 下发。 + // (流式的 `opusEncodeData:` 实测在当前场景下回调不触发,opus 输出=0) + let sr = self.sampleRate + OpusSegmentEncoder.encode( + pcm: pcmSegment, + sampleRate: sr, + channels: 1, + hasDataHeader: true + ) { [weak self] opus, err in + guard let self = self else { return } + if let err = err { + NSLog("[CallTrans] feedTTS leg=%@ final=%@ pcm=%dB opus=0B encode error: %@", + leg, isFinal ? "true" : "false", pcmSegment.count, err.localizedDescription) + return + } + guard let opusSegment = opus, !opusSegment.isEmpty else { + NSLog("[CallTrans] feedTTS leg=%@ final=%@ pcm=%dB opus=0B (empty after file encode, skip)", + leg, isFinal ? "true" : "false", pcmSegment.count) + return + } + NSLog("[CallTrans] feedTTS leg=%@ final=%@ pcm=%dB opus=%dB \u{2192} trWriteAudio", + leg, isFinal ? "true" : "false", pcmSegment.count, opusSegment.count) + self.writeBackAudio(opusSegment, source: source, audioType: .OPUS) + } + return true + } + + // MARK: - per-leg buffer helpers (调用方需持有 ttsBufferLock) + + private func pcmBufferSize(of leg: String) -> Int { + return leg == TranslationStreams.OUT_UPLINK ? pcmBufferUplink.count : pcmBufferDownlink.count + } + + private func appendPcm(_ data: Data, to leg: String) { + if leg == TranslationStreams.OUT_UPLINK { pcmBufferUplink.append(data) } + else { pcmBufferDownlink.append(data) } + } + + private func takePcmBuffer(of leg: String) -> Data { + if leg == TranslationStreams.OUT_UPLINK { + let out = pcmBufferUplink; pcmBufferUplink = Data(); return out + } else { + let out = pcmBufferDownlink; pcmBufferDownlink = Data(); return out + } + } + + private func resetOpusBuffer(of leg: String) { + if leg == TranslationStreams.OUT_UPLINK { opusBufferUplink = Data() } + else { opusBufferDownlink = Data() } + } + + private func takeOpusBuffer(of leg: String) -> Data { + if leg == TranslationStreams.OUT_UPLINK { + let out = opusBufferUplink; opusBufferUplink = Data(); return out + } else { + let out = opusBufferDownlink; opusBufferDownlink = Data(); return out + } + } + + /// encoder onOpus 回调 → 写入 leg 的 opusBuffer。 + fileprivate func appendOpus(_ opus: Data, to leg: String) { + ttsBufferLock.lock() + defer { ttsBufferLock.unlock() } + if leg == TranslationStreams.OUT_UPLINK { opusBufferUplink.append(opus) } + else { opusBufferDownlink.append(opus) } + } + + private func writeBackAudio(_ data: Data, source: JLTranslateAudioSourceType, audioType: JL_SpeakDataType? = nil) { + guard let tm = session?.currentManager() else { + NSLog("[CallTrans] writeBackAudio DROPPED: no current manager (source=%d, len=%d)", source.rawValue, data.count) + return + } + let aType = audioType ?? self.audioType + let audio = JLTranslateAudio() + audio.sourceType = source + audio.audioType = aType + audio.data = data + audio.len = Int32(data.count) + audio.count = 1 + // 关键:OPUS 整段(带 head)必须走 `trWriteAudio`(交互式,SDK 按内部队列按帧节奏推 cmd=52)。 + // `trWriteAudioV2` 头注释明确说明:“无交互式下发,当前默认 20ms/42B jlv2 压缩数据,不支持修改”, + // 整段 OPUS 会被它按 42B 硬切,耳机端解不出来(日志写回成功但无声即此)。 + NSLog("[CallTrans] writeBackAudio \u{2192} trWriteAudio source=%d audioType=%d len=%d", + source.rawValue, aType.rawValue, data.count) + tm.trWrite(audio, translate: data) + } +} diff --git a/local_plugins/device_jieli/ios/device_jieli/Sources/device_jieli/feature/translation/mode/RecordModeHandler.swift b/local_plugins/device_jieli/ios/device_jieli/Sources/device_jieli/feature/translation/mode/RecordModeHandler.swift new file mode 100644 index 000000000..5e6670c7a --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Sources/device_jieli/feature/translation/mode/RecordModeHandler.swift @@ -0,0 +1,158 @@ +import Foundation +import JL_BLEKit + +/// MODE_RECORD(mode=1)—— 单向录音翻译。 +/// 与 Android `RecordModeHandler` 对齐: +/// - 通过 SDK 进入 RECORD 状态机;耳机 LED / 提示音随之切换 +/// - 走 `recordtype=.byPhone` 语义(STRATEGY_CUSTOM_RECORDING):APP 端自己采手机麦 +/// - iOS 端 APP 录音用 AVAudioEngine 由宿主自定(Dart 侧已经在管音频采集);本 handler 只做 +/// 翻译模式的状态机切换 + 接耳机上推帧(如果固件配成 byDevice 也支持) +public final class RecordModeHandler: BaseTranslationModeHandler { + + public init(server: JieliHomeServer) { + super.init( + server: server, + modeId: TranslationModeIds.MODE_RECORD, + inputs: [TranslationStreams.IN_MIC], + outputs: [TranslationStreams.OUT_SPEAKER] + ) + } + + public override func start(args: [String: Any], completion: @escaping (Bool, String?) -> Void) { + guard let server = server else { completion(false, "server uninitialized"); return } + if working { completion(true, nil); return } + let address = args["address"] as? String + let session = address.flatMap { server.translationSession(for: $0) } ?? server.currentTranslationSession() + guard let s = session else { + emitError(-200, "no connected device") + completion(false, "no connected device"); return + } + let sr = (args["sampleRate"] as? NSNumber)?.intValue ?? 16000 + let aType = Self.parseAudioType(args["audioType"]) ?? .OPUS + let recordType = Self.parseRecordType(args["strategy"], default: .byPhone) + self.session = s + + s.acquire(owner: self) { [weak self] tm, errMsg in + guard let self = self else { return } + guard let tm = tm else { + self.emitError(-201, errMsg) + completion(false, errMsg); return + } + tm.recordtype = recordType + let mode = Self.buildMode(modeType: .onlyRecord, audioType: aType, channel: 1, sampleRate: sr) + self.emitLog("Record start audioType=\(aType.rawValue) sr=\(sr) recordType=\(recordType.rawValue)") + tm.trStartTranslate(mode) { [weak self] status, err in + guard let self = self else { return } + if status == .success || status == .sameMode { + self.working = true + completion(true, nil) + } else { + self.emitError(Int(status.rawValue), err?.localizedDescription ?? "trStartTranslateMode failed") + self.stop() + completion(false, "tm status=\(status.rawValue)") + } + } + } + } + + public override func stop() { + guard let s = session, working else { working = false; return } + working = false + s.release(owner: self) + emitLog("Record stop") + } + + public override func onReceiveAudio(_ audio: JLTranslateAudio) { + // STRATEGY_CUSTOM_RECORDING 语义下耳机不上推;如果固件配成 byDevice 也直接外抛上行帧 + guard working else { return } + switch audio.audioType { + case .PCM: + pushFrame(streamId: TranslationStreams.IN_MIC, pcm: audio.data) + default: + // 其他编码(OPUS 等)原样透传 + encoding 标注,避免内嵌解码器误用 + let encoding: String = { + switch audio.audioType { + case .OPUS: return "opus" + case .SPEEX: return "speex" + case .JLA_V2: return "jla_v2" + case .MSBC: return "msbc" + default: return "unknown" + } + }() + pushFrame(streamId: TranslationStreams.IN_MIC, pcm: audio.data, encoding: encoding) + } + } + + public override func onTranslatedAudio(streamId: String, pcm: Data, format: AudioFormat, isFinal: Bool) -> Bool { + // 与 Android 一致:RECORD 模式下耳机不参与回送 TTS;宿主自己用音频播放器播 + if streamId == TranslationStreams.OUT_SPEAKER { + emitLog("recv tts pcm=\(pcm.count)B final=\(isFinal) (host-side playback)") + return true + } + return false + } +} + +/// MODE_RECORDING_TRANSLATION(mode=2)—— 流式录音翻译。与 RecordModeHandler 仅 modeType 不同。 +public final class RecordingTranslationModeHandler: BaseTranslationModeHandler { + + public init(server: JieliHomeServer) { + super.init( + server: server, + modeId: TranslationModeIds.MODE_RECORDING_TRANSLATION, + inputs: [TranslationStreams.IN_MIC], + outputs: [TranslationStreams.OUT_SPEAKER] + ) + } + + public override func start(args: [String: Any], completion: @escaping (Bool, String?) -> Void) { + guard let server = server else { completion(false, "server uninitialized"); return } + if working { completion(true, nil); return } + let address = args["address"] as? String + let session = address.flatMap { server.translationSession(for: $0) } ?? server.currentTranslationSession() + guard let s = session else { + emitError(-200, "no connected device") + completion(false, "no connected device"); return + } + let sr = (args["sampleRate"] as? NSNumber)?.intValue ?? 16000 + let aType = Self.parseAudioType(args["audioType"]) ?? .OPUS + let recordType = Self.parseRecordType(args["strategy"], default: .byPhone) + self.session = s + + s.acquire(owner: self) { [weak self] tm, errMsg in + guard let self = self else { return } + guard let tm = tm else { + self.emitError(-201, errMsg) + completion(false, errMsg); return + } + tm.recordtype = recordType + let mode = Self.buildMode(modeType: .recordTranslate, audioType: aType, channel: 1, sampleRate: sr) + self.emitLog("RecordingTranslation start audioType=\(aType.rawValue) sr=\(sr) recordType=\(recordType.rawValue)") + tm.trStartTranslate(mode) { [weak self] status, err in + guard let self = self else { return } + if status == .success || status == .sameMode { + self.working = true + completion(true, nil) + } else { + self.emitError(Int(status.rawValue), err?.localizedDescription ?? "trStartTranslateMode failed") + self.stop() + completion(false, "tm status=\(status.rawValue)") + } + } + } + } + + public override func stop() { + guard let s = session, working else { working = false; return } + working = false + s.release(owner: self) + emitLog("RecordingTranslation stop") + } + + public override func onReceiveAudio(_ audio: JLTranslateAudio) { + guard working else { return } + if audio.audioType == .PCM { + pushFrame(streamId: TranslationStreams.IN_MIC, pcm: audio.data) + } + } +} diff --git a/local_plugins/device_jieli/ios/device_jieli/Sources/device_jieli/feature/translation/mode/StereoCallTranslationModeHandler.swift b/local_plugins/device_jieli/ios/device_jieli/Sources/device_jieli/feature/translation/mode/StereoCallTranslationModeHandler.swift new file mode 100644 index 000000000..d2712eff2 --- /dev/null +++ b/local_plugins/device_jieli/ios/device_jieli/Sources/device_jieli/feature/translation/mode/StereoCallTranslationModeHandler.swift @@ -0,0 +1,140 @@ +import Foundation +import JL_BLEKit + +/// MODE_CALL_TRANSLATION_WITH_STEREO(mode=6)—— 立体声通话翻译。 +/// +/// 与 Android `StereoCallTranslationModeHandler` 对齐: +/// - 耳机一路推 SOURCE_E_SCO_MIX 立体声 OPUS:L=本端 uplink, R=对端 downlink +/// - 软件分声道后等价于 [CallTranslationModeHandler] +public final class StereoCallTranslationModeHandler: BaseTranslationModeHandler { + + private var decoder: OpusStreamDecoder? + private var encoderUplink: OpusStreamEncoder? + private var encoderDownlink: OpusStreamEncoder? + private var sampleRate = 16000 + private var audioType: JL_SpeakDataType = .OPUS + + public init(server: JieliHomeServer) { + super.init( + server: server, + modeId: TranslationModeIds.MODE_CALL_TRANSLATION_WITH_STEREO, + inputs: [TranslationStreams.IN_UPLINK, TranslationStreams.IN_DOWNLINK], + outputs: [TranslationStreams.OUT_UPLINK, TranslationStreams.OUT_DOWNLINK] + ) + } + + public override func start(args: [String: Any], completion: @escaping (Bool, String?) -> Void) { + guard let server = server else { completion(false, "server uninitialized"); return } + if working { completion(true, nil); return } + let address = args["address"] as? String + let session: TranslationSession? = address.flatMap { server.translationSession(for: $0) } ?? server.currentTranslationSession() + guard let s = session else { + emitError(-200, "no connected device") + completion(false, "no connected device"); return + } + let sr = (args["sampleRate"] as? NSNumber)?.intValue ?? 16000 + let aType = Self.parseAudioType(args["audioType"]) ?? .OPUS + let recordType = Self.parseRecordType(args["strategy"], default: .byDevice) + sampleRate = sr + audioType = aType + self.session = s + + if aType == .OPUS { + decoder = OpusStreamDecoder(channels: 2, dataSize: 80, sampleRate: sr) { [weak self] stereoPcm in + guard let self = self else { return } + let (l, r) = PcmKit.splitStereo16(stereoPcm) + let fmt = AudioFormat(sampleRate: sr, channels: 1, bitsPerSample: 16) + self.pushFrame(streamId: TranslationStreams.IN_UPLINK, pcm: l, format: fmt) + self.pushFrame(streamId: TranslationStreams.IN_DOWNLINK, pcm: r, format: fmt) + } onError: { [weak self] code, msg in + self?.emitError(code, "opus stereo decode: \(msg ?? "")") + } + encoderUplink = OpusStreamEncoder(channels: 1, sampleRate: sr) { [weak self] opus in + self?.writeBack(opus, source: .typeESCOUp) + } + encoderDownlink = OpusStreamEncoder(channels: 1, sampleRate: sr) { [weak self] opus in + self?.writeBack(opus, source: .typeESCODown) + } + } + + s.acquire(owner: self) { [weak self] tm, errMsg in + guard let self = self else { return } + guard let tm = tm else { + self.emitError(-201, errMsg) + completion(false, errMsg); return + } + tm.recordtype = recordType + let mode = Self.buildMode(modeType: .callTranslateStereo, audioType: aType, channel: 2, sampleRate: sr) + self.emitLog("StereoCallTranslation start audioType=\(aType.rawValue) sr=\(sr) recordType=\(recordType.rawValue)") + tm.trStartTranslate(mode) { [weak self] status, err in + guard let self = self else { return } + if status == .success || status == .sameMode { + self.working = true + completion(true, nil) + } else { + self.emitError(Int(status.rawValue), err?.localizedDescription ?? "trStartTranslateMode failed") + self.stop() + completion(false, "tm status=\(status.rawValue)") + } + } + } + } + + public override func stop() { + guard let s = session, working else { working = false; return } + working = false + s.release(owner: self) + decoder?.release(); decoder = nil + encoderUplink?.release(); encoderUplink = nil + encoderDownlink?.release(); encoderDownlink = nil + emitLog("StereoCallTranslation stop") + } + + public override func onReceiveAudio(_ audio: JLTranslateAudio) { + guard working else { return } + guard audio.sourceType == .typeESCOMax else { return } // SOURCE_E_SCO_MIX + switch audio.audioType { + case .OPUS: decoder?.feed(audio.data) + case .PCM: + let (l, r) = PcmKit.splitStereo16(audio.data) + let fmt = AudioFormat(sampleRate: sampleRate, channels: 1, bitsPerSample: 16) + pushFrame(streamId: TranslationStreams.IN_UPLINK, pcm: l, format: fmt) + pushFrame(streamId: TranslationStreams.IN_DOWNLINK, pcm: r, format: fmt) + default: break + } + } + + public override func onTranslatedAudio(streamId: String, pcm: Data, format: AudioFormat, isFinal: Bool) -> Bool { + guard working else { return false } + let encoder: OpusStreamEncoder? + let source: JLTranslateAudioSourceType + switch streamId { + case TranslationStreams.OUT_UPLINK: encoder = encoderUplink; source = .typeESCOUp + case TranslationStreams.OUT_DOWNLINK: encoder = encoderDownlink; source = .typeESCODown + default: return false + } + if audioType == .OPUS { + let frameBytes = 640 + var ofs = 0 + while ofs < pcm.count { + let len = min(frameBytes, pcm.count - ofs) + encoder?.feed(pcm.subdata(in: ofs..<(ofs + len))) + ofs += len + } + } else { + writeBack(pcm, source: source, audioType: .PCM) + } + return true + } + + private func writeBack(_ data: Data, source: JLTranslateAudioSourceType, audioType: JL_SpeakDataType? = nil) { + guard let tm = session?.currentManager() else { return } + let audio = JLTranslateAudio() + audio.sourceType = source + audio.audioType = audioType ?? self.audioType + audio.data = data + audio.len = Int32(data.count) + audio.count = 1 + tm.trWriteAudioV2(audio, translate: data) + } +} diff --git a/local_plugins/device_jieli/lib/device_jieli.dart b/local_plugins/device_jieli/lib/device_jieli.dart index 4f60b7d76..f35fc54b9 100644 --- a/local_plugins/device_jieli/lib/device_jieli.dart +++ b/local_plugins/device_jieli/lib/device_jieli.dart @@ -156,6 +156,10 @@ class TranslationModeIds { static const int audioTranslation = 4; static const int faceToFaceTranslation = 5; static const int callTranslationWithStereo = 6; + /// MODE_CALL_RECORD:通话录音专用 mode(与 Android `TranslationMode.MODE_CALL_RECORD`=7 对齐)。 + /// - 耳机一路推双声道交织 OPUS,解码后以 `TranslationStreams.inStereo` 单路抛出 + /// - 没有 output 流,不接 TTS 回写 + static const int callRecord = 7; } class TranslationStreams { @@ -163,6 +167,8 @@ class TranslationStreams { static const String inUplink = 'in.uplink'; static const String inDownlink = 'in.downlink'; static const String inAudioFile = 'in.audioFile'; + /// 双声道交织 PCM:L=本端 / R=对端(用于 MODE_CALL_RECORD / 设备录音通路)。 + static const String inStereo = 'in.stereo'; static const String outSpeaker = 'out.speaker'; static const String outUplink = 'out.uplink'; static const String outDownlink = 'out.downlink'; diff --git a/local_plugins/device_jieli/pubspec.yaml b/local_plugins/device_jieli/pubspec.yaml index 2b92c6a1c..b82ad95f5 100644 --- a/local_plugins/device_jieli/pubspec.yaml +++ b/local_plugins/device_jieli/pubspec.yaml @@ -40,6 +40,9 @@ flutter: android: package: com.jielihome.jielihome pluginClass: JielihomePlugin + ios: + pluginClass: JielihomePlugin + sharedDarwinSource: false # To add assets to your plugin package, add an assets section, like this: # assets: diff --git a/local_plugins/device_plugin_interface/ios/Classes/DevicePluginInterfacePlugin.swift b/local_plugins/device_plugin_interface/ios/Classes/DevicePluginInterfacePlugin.swift new file mode 100644 index 000000000..485c56d4d --- /dev/null +++ b/local_plugins/device_plugin_interface/ios/Classes/DevicePluginInterfacePlugin.swift @@ -0,0 +1,14 @@ +import Flutter +import UIKit + +/// No-op plugin class — `device_plugin_interface` only provides Dart-side contracts +/// and shared data classes. Vendor plugins (`device_jieli`, ...) implement them +/// in their own native code and depend on this package solely at the Flutter level. +/// +/// Mirrors the Android stub at +/// `android/src/main/kotlin/com/aiagent/device_plugin_interface/DevicePluginInterfacePlugin.kt`. +public class DevicePluginInterfacePlugin: NSObject, FlutterPlugin { + public static func register(with registrar: FlutterPluginRegistrar) { + // Intentionally empty: no MethodChannel / EventChannel surface. + } +} diff --git a/local_plugins/device_plugin_interface/ios/device_plugin_interface.podspec b/local_plugins/device_plugin_interface/ios/device_plugin_interface.podspec new file mode 100644 index 000000000..562b742c7 --- /dev/null +++ b/local_plugins/device_plugin_interface/ios/device_plugin_interface.podspec @@ -0,0 +1,19 @@ +Pod::Spec.new do |s| + s.name = 'device_plugin_interface' + s.version = '0.1.0' + s.summary = 'Abstract contracts for hardware device plugins (BLE / RCSP / vendor SDK).' + s.description = <<-DESC +This pod is a no-op companion for the device_plugin_interface Flutter plugin. +The Dart layer holds the actual abstract contracts; vendor plugins (e.g. device_jieli) +implement them in their own native code and depend on this package only at the Flutter level. + DESC + s.homepage = 'https://example.com' + s.license = { :type => 'MIT' } + s.author = { 'AI Agent' => 'liwei1dao@gmail.com' } + s.source = { :path => '.' } + s.source_files = 'Classes/**/*.{h,m,swift}' + s.dependency 'Flutter' + s.platform = :ios, '12.0' + s.swift_version = '5.0' + s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' } +end diff --git a/local_plugins/device_plugin_interface/pubspec.yaml b/local_plugins/device_plugin_interface/pubspec.yaml index 03a4b62bb..7712630e2 100644 --- a/local_plugins/device_plugin_interface/pubspec.yaml +++ b/local_plugins/device_plugin_interface/pubspec.yaml @@ -21,3 +21,5 @@ flutter: android: package: com.aiagent.device_plugin_interface pluginClass: DevicePluginInterfacePlugin + ios: + pluginClass: DevicePluginInterfacePlugin diff --git a/local_plugins/ota/.gitignore b/local_plugins/ota/.gitignore deleted file mode 100644 index e7d347d9d..000000000 --- a/local_plugins/ota/.gitignore +++ /dev/null @@ -1,33 +0,0 @@ -# Miscellaneous -*.class -*.log -*.pyc -*.swp -.DS_Store -.atom/ -.build/ -.buildlog/ -.history -.svn/ -.swiftpm/ -migrate_working_dir/ - -# IntelliJ related -*.iml -*.ipr -*.iws -.idea/ - -# The .vscode folder contains launch configuration and tasks you configure in -# VS Code which you may wish to be included in version control, so this line -# is commented out by default. -#.vscode/ - -# Flutter/Dart/Pub related -# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. -/pubspec.lock -**/doc/api/ -.dart_tool/ -.flutter-plugins -.flutter-plugins-dependencies -build/ diff --git a/local_plugins/ota/.metadata b/local_plugins/ota/.metadata deleted file mode 100644 index 6015b831a..000000000 --- a/local_plugins/ota/.metadata +++ /dev/null @@ -1,33 +0,0 @@ -# This file tracks properties of this Flutter project. -# Used by Flutter tool to assess capabilities and perform upgrades etc. -# -# This file should be version controlled and should not be manually edited. - -version: - revision: "ea121f8859e4b13e47a8f845e4586164519588bc" - channel: "stable" - -project_type: plugin - -# Tracks metadata for the flutter migrate command -migration: - platforms: - - platform: root - create_revision: ea121f8859e4b13e47a8f845e4586164519588bc - base_revision: ea121f8859e4b13e47a8f845e4586164519588bc - - platform: android - create_revision: ea121f8859e4b13e47a8f845e4586164519588bc - base_revision: ea121f8859e4b13e47a8f845e4586164519588bc - - platform: ios - create_revision: ea121f8859e4b13e47a8f845e4586164519588bc - base_revision: ea121f8859e4b13e47a8f845e4586164519588bc - - # User provided section - - # List of Local paths (relative to this file) that should be - # ignored by the migrate tool. - # - # Files that are not part of the templates will be ignored by default. - unmanaged_files: - - 'lib/main.dart' - - 'ios/Runner.xcodeproj/project.pbxproj' diff --git a/local_plugins/ota/CHANGELOG.md b/local_plugins/ota/CHANGELOG.md deleted file mode 100644 index 41cc7d819..000000000 --- a/local_plugins/ota/CHANGELOG.md +++ /dev/null @@ -1,3 +0,0 @@ -## 0.0.1 - -* TODO: Describe initial release. diff --git a/local_plugins/ota/LICENSE b/local_plugins/ota/LICENSE deleted file mode 100644 index ba75c69f7..000000000 --- a/local_plugins/ota/LICENSE +++ /dev/null @@ -1 +0,0 @@ -TODO: Add your license here. diff --git a/local_plugins/ota/README.md b/local_plugins/ota/README.md deleted file mode 100644 index 26563dd24..000000000 --- a/local_plugins/ota/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# ota - -A new Flutter project. - -## Getting Started - -This project is a starting point for a Flutter -[plug-in package](https://flutter.dev/to/develop-plugins), -a specialized package that includes platform-specific implementation code for -Android and/or iOS. - -For help getting started with Flutter development, view the -[online documentation](https://docs.flutter.dev), which offers tutorials, -samples, guidance on mobile development, and a full API reference. - diff --git a/local_plugins/ota/analysis_options.yaml b/local_plugins/ota/analysis_options.yaml deleted file mode 100644 index a5744c1cf..000000000 --- a/local_plugins/ota/analysis_options.yaml +++ /dev/null @@ -1,4 +0,0 @@ -include: package:flutter_lints/flutter.yaml - -# Additional information about this file can be found at -# https://dart.dev/guides/language/analysis-options diff --git a/local_plugins/ota/android/.gitignore b/local_plugins/ota/android/.gitignore deleted file mode 100644 index 161bdcdaf..000000000 --- a/local_plugins/ota/android/.gitignore +++ /dev/null @@ -1,9 +0,0 @@ -*.iml -.gradle -/local.properties -/.idea/workspace.xml -/.idea/libraries -.DS_Store -/build -/captures -.cxx diff --git a/local_plugins/ota/android/build.gradle b/local_plugins/ota/android/build.gradle deleted file mode 100644 index 4e0f45a3e..000000000 --- a/local_plugins/ota/android/build.gradle +++ /dev/null @@ -1,68 +0,0 @@ -group = "com.example.ota" -version = "1.0-SNAPSHOT" - -buildscript { - ext.kotlin_version = "1.8.22" - repositories { - google() - mavenCentral() - } - - dependencies { - classpath("com.android.tools.build:gradle:8.7.0") - classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version") - } -} - -allprojects { - repositories { - google() - mavenCentral() - } -} - -apply plugin: "com.android.library" -apply plugin: "kotlin-android" - -android { - namespace = "com.example.ota" - - compileSdk = 35 - - compileOptions { - sourceCompatibility = JavaVersion.VERSION_11 - targetCompatibility = JavaVersion.VERSION_11 - } - - kotlinOptions { - jvmTarget = JavaVersion.VERSION_11 - } - - sourceSets { - main.java.srcDirs += "src/main/kotlin" - test.java.srcDirs += "src/test/kotlin" - } - - defaultConfig { - minSdk = 21 - } - - dependencies { - implementation("com.jieli.jl_bt_ota:jl_bt_ota:1.11.0") - testImplementation("org.jetbrains.kotlin:kotlin-test") - testImplementation("org.mockito:mockito-core:5.0.0") - add("compileOnly", project(":ble_service")) - } - - testOptions { - unitTests.all { - useJUnitPlatform() - - testLogging { - events "passed", "skipped", "failed", "standardOut", "standardError" - outputs.upToDateWhen {false} - showStandardStreams = true - } - } - } -} diff --git a/local_plugins/ota/android/libs/jl_bt_ota_V1.11.0_11015-release.aar b/local_plugins/ota/android/libs/jl_bt_ota_V1.11.0_11015-release.aar deleted file mode 100644 index c143f0ace..000000000 Binary files a/local_plugins/ota/android/libs/jl_bt_ota_V1.11.0_11015-release.aar and /dev/null differ diff --git a/local_plugins/ota/android/settings.gradle b/local_plugins/ota/android/settings.gradle deleted file mode 100644 index 3deb53a8d..000000000 --- a/local_plugins/ota/android/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -rootProject.name = 'ota' diff --git a/local_plugins/ota/android/src/main/AndroidManifest.xml b/local_plugins/ota/android/src/main/AndroidManifest.xml deleted file mode 100644 index c940a84da..000000000 --- a/local_plugins/ota/android/src/main/AndroidManifest.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - diff --git a/local_plugins/ota/android/src/main/kotlin/com/example/ota/OtaPlugin.kt b/local_plugins/ota/android/src/main/kotlin/com/example/ota/OtaPlugin.kt deleted file mode 100644 index d188fe30c..000000000 --- a/local_plugins/ota/android/src/main/kotlin/com/example/ota/OtaPlugin.kt +++ /dev/null @@ -1,415 +0,0 @@ -package com.example.ota - -import io.flutter.embedding.engine.plugins.FlutterPlugin -import io.flutter.plugin.common.MethodCall -import io.flutter.plugin.common.MethodChannel -import io.flutter.plugin.common.MethodChannel.MethodCallHandler -import io.flutter.plugin.common.MethodChannel.Result - -import android.bluetooth.BluetoothDevice -import android.content.Context -import com.jieli.otasdk.tool.ota.OTAManager -import com.jieli.jl_bt_ota.constant.StateCode -import com.jieli.jl_bt_ota.interfaces.BtEventCallback -import com.jieli.jl_bt_ota.interfaces.IUpgradeCallback -import com.jieli.jl_bt_ota.model.base.BaseError -import com.jieli.otasdk.tool.bluetooth.BluetoothHelper -import android.util.Log -import com.jieli.otasdk.tool.config.ConfigHelper -import com.yunqiinnovation.ble_service.BleService -import com.yunqiinnovation.ble_service.BleConst -import android.os.Handler -import android.os.Looper - -import io.flutter.plugin.common.EventChannel - -class CustomUpdateCallback( - - val device: BluetoothDevice?, - private val streamSink: EventChannel.EventSink? -) : IUpgradeCallback { - companion object { - private const val TAG = "JlOtaPlugin" - private const val CHANNEL_NAME = "com.example.ota" - private const val EVENT_CHANNEL_NAME = "com.example.ota/events" - - } - - override fun onStartOTA() { - Log.d(TAG, "onStartOTA开始升级") - if (streamSink != null) { - if (Looper.myLooper() == Looper.getMainLooper()) { - streamSink.success( - mapOf( - "event" to "onStartOTA" - ) - ) - } - } - } - - override fun onNeedReconnect(addr: String?, isNewReconnectWay: Boolean) { - Log.d(TAG, "onNeedReconnect需要重新链接") - if (streamSink != null) { - if (Looper.myLooper() == Looper.getMainLooper()) { - streamSink.success( - mapOf( - "event" to "onNeedReconnect", - "addr" to addr, - "isNewReconnectWay" to isNewReconnectWay - ) - ) - } - } - } - - override fun onProgress(type: Int, progress: Float) { - Log.d(TAG, "onProgress正在进展") - if (streamSink != null) { - if (Looper.myLooper() == Looper.getMainLooper()) { - streamSink.success( - mapOf( - "event" to "onProgress", - "type" to type, - "progress" to progress - ) - ) - } else { - // Handler(Looper.getMainLooper()).post { - // streamSink.success( - // mapOf( - // "event" to "onDecodeStream" - // //"data" to data - // ) - // ) - // } - } - } - } - - override fun onStopOTA() { - Log.d(TAG, "onStartOTA停止升级") - if (streamSink != null) { - if (Looper.myLooper() == Looper.getMainLooper()) { - streamSink.success( - mapOf( - "event" to "onStopOTA", - ) - ) - } - } - BleService.isEnterOta = false - } - - override fun onCancelOTA() { - Log.d(TAG, "onCancelOTA取消升级") - if (streamSink != null) { - if (Looper.myLooper() == Looper.getMainLooper()) { - streamSink.success( - mapOf( - "event" to "onCancelOTA", - ) - ) - } - } - } - - override fun onError(error: BaseError?) { - val errorMessage = error?.message ?: "Unknown error" - Log.d(TAG, "升级失败: ${error?.message ?: "未知错误"}") - if (streamSink != null) { - if (Looper.myLooper() == Looper.getMainLooper()) { - Log.d( - TAG, - "升级失败:error?.message ${error?.message}未知错误 error?.code${error?.code}" - ) - streamSink.success( - mapOf( - "event" to "onError", - "code" to (error?.code ?: 255), // 确保值是正确的类型 - "message" to (error?.message ?: "Unknown error") // 确保值是正确的类型 - ) - ) - } - } - // 如果需要打印完整错误对象信息(假设BaseError有重写toString()) - Log.d(TAG, "完整错误对象: ${error ?: "null"}") - } -} - -/** OtaPlugin */ -class OtaPlugin : BleService.Callback, FlutterPlugin, MethodCallHandler { - /// The MethodChannel that will the communication between Flutter and native Android - /// - /// This local reference serves to register the plugin with the Flutter Engine and unregister it - /// when the Flutter Engine is detached from the Activity - private lateinit var channel: MethodChannel - private lateinit var context: Context - private lateinit var otaDevice: BluetoothDevice - private var bluetoothHelper: BluetoothHelper? = null - - private var otaManager: OTAManager? = null - - private lateinit var filePath: String//升级文件路径 - private var isDisconnect = false//是否主动断开 - private var streamSink: EventChannel.EventSink? = null - private lateinit var eventChannel: EventChannel - - // 是否已注册BLE回调 - private var isRegisteredToBle = false - - // 添加主线程Handler用于确保在主线程回调 - private val mainHandler = Handler(Looper.getMainLooper()) - - companion object { - private const val TAG = "OtaPlugin" - private const val CHANNEL_NAME = "com.example.ota" - private const val EVENT_CHANNEL_NAME = "com.example.ota/events" - - } - - // 在主线程上安全发送事件 - private fun sendEventOnMainThread(event: Map) { - if (streamSink == null) return - - if (Looper.myLooper() == Looper.getMainLooper()) { - // 如果已经在主线程,直接发送 - streamSink?.success(event) - } else { - // 否则切换到主线程 - mainHandler.post { - streamSink?.success(event) - } - } - } - - // 在主线程上安全返回结果 - private fun sendResultOnMainThread(result: Result, value: Any?) { - if (Looper.myLooper() == Looper.getMainLooper()) { - // 如果已经在主线程,直接返回 - result.success(value) - } else { - // 否则切换到主线程 - mainHandler.post { - result.success(value) - } - } - } - - // 在主线程上安全返回错误 - private fun sendErrorOnMainThread( - result: Result, - errorCode: String, - errorMessage: String, - errorDetails: Any? - ) { - if (Looper.myLooper() == Looper.getMainLooper()) { - // 如果已经在主线程,直接返回 - result.error(errorCode, errorMessage, errorDetails) - } else { - // 否则切换到主线程 - mainHandler.post { - result.error(errorCode, errorMessage, errorDetails) - } - } - } - - private val bluetoothCallback = object : BtEventCallback() { - - override fun onConnection(device: BluetoothDevice?, status: Int) { - if ((status == StateCode.CONNECTION_FAILED || status == StateCode.CONNECTION_DISCONNECT) && bluetoothHelper?.getConnectedDevice() != null) { - bluetoothHelper?.disconnectDevice(bluetoothHelper?.getConnectedDevice()) - - } - otaDevice = device!! - // sendEventOnMainThread( - // mapOf( - // "event" to "NOCONNECTION" - // ) - // ) - // 更新连接状态的 LiveData,用于通知 UI 或其他逻辑 - // otaConnectionMLD.value = DeviceConnection(device, status) - Log.d("bluetoothCallback", "onConnection,status${status}") - if (status == StateCode.CONNECTION_OK) { - Log.d("TAG", "startUpgrade") - - sendEventOnMainThread( - mapOf( - "event" to "CONNECTION_SUCCESS" - ) - ) - Log.d("TAG", "startUpgrade,filePath=${filePath}") - otaManager?.bluetoothOption?.firmwareFilePath = filePath - otaManager?.startOTA( - CustomUpdateCallback( - otaManager?.bluetoothHelper?.getConnectedDevice(), streamSink - ) - ) - } - } - - override fun onMandatoryUpgrade(device: BluetoothDevice?) { - // mandatoryUpgradeMLD.postValue(device!!) - Log.d("bluetoothCallback", "onMandatoryUpgrade") - } - } - - override fun onAttachedToEngine(flutterPluginBinding: FlutterPlugin.FlutterPluginBinding) { - context = flutterPluginBinding.applicationContext - channel = MethodChannel(flutterPluginBinding.binaryMessenger, "ota") - channel.setMethodCallHandler(this) - eventChannel = EventChannel(flutterPluginBinding.binaryMessenger, EVENT_CHANNEL_NAME) - - eventChannel.setStreamHandler(object : EventChannel.StreamHandler { - override fun onListen(arguments: Any?, events: EventChannel.EventSink?) { - streamSink = events - } - - override fun onCancel(arguments: Any?) { - streamSink = null - } - }) - - - } - - override fun onMethodCall(call: MethodCall, result: Result) { - if (call.method == "init") { - - // 初始化 otaManager 和 bluetoothHelper - ConfigHelper.initialize(context) - otaManager = OTAManager(context) - bluetoothHelper = BluetoothHelper(context) - // 如果需要额外的初始化逻辑,请在这里添加 - otaManager!!.registerBluetoothCallback(bluetoothCallback) - // 初始化BleService - // 2. 初始化BleService并注册回调 - if (BleService.initialize(context)) { - if (BleService.addCallback(this)) { - isRegisteredToBle = true - Log.d(TAG, "已注册BLE回调") - } else { - Log.w(TAG, "BLE回调注册失败") - } - } else { - Log.e(TAG, "BLE服务初始化失败") - - } - - Log.i("TAG", "onAttachedToEngine") - result.success("") - } else if (call.method == "startUpgrading") { - Log.d("TAG", "startUpgrading") - // 接收传入的参数 - val arguments = call.arguments as? Map - filePath = (arguments?.get("filePath") as? String).toString() - - if (filePath != null) { - Log.d("TAG", "Received filePath: $filePath") - // 在这里使用 filePath 参数,例如传递给其他方法或类 - } else { - Log.d("TAG", "filePath 参数为空") - } - BleService.isEnterOta = true - - val bluetoothGatt = BleService.bluetoothGatt - if (bluetoothGatt?.device != null) { - isDisconnect = true - otaDevice = bluetoothGatt.device - BleService.disconnect() - - } else if (otaDevice != null) { - isDisconnect = true - BleService.disconnect() - } else { - Log.e("TAG", "BluetoothGatt 或 device 为 null,无法执行操作") - sendEventOnMainThread( - mapOf( - "event" to "NOCONNECTION" - ) - ) - BleService.isEnterOta = false - - } - result.success("") - - } else if (call.method == "onOtaClose") { - BleService.isEnterOta = false - isDisconnect = false - if(otaManager!= null) { - BleService.removeCallback(this) - otaManager?.release() - otaManager= null - bluetoothHelper=null - } - result.success("") - } else { - result.notImplemented() - } - } - - override fun onDetachedFromEngine(binding: FlutterPlugin.FlutterPluginBinding) { - channel.setMethodCallHandler(null) - eventChannel.setStreamHandler(null) - // 取消BLE回调注册 - if (isRegisteredToBle) { - BleService.removeCallback(this) - isRegisteredToBle = false - } - isDisconnect = false - // 释放其他资源 - streamSink = null - BleService.isEnterOta = false - Log.d(TAG, "OtaPlugin 已释放资源") - } - - - // BleService.Callback 接口实现 - override fun onScanResult(devices: List>) { - // 不处理扫描结果 - } - - override fun onConnectionStateChanged(state: Int) { - if (state == BleConst.STATE_DISCONNECTED && isDisconnect) { - Log.d("TAG", "Ble设备已断开,onConnectionStateChanged") - Handler(Looper.getMainLooper()).postDelayed({ - otaManager?.bluetoothHelper?.startScan(otaDevice) - }, 2000) // 2000 毫秒 = 2 秒 - } - } - - override fun onAudioDataReceived(data: ByteArray,channel:Int) { - - // 可选:处理音频数据 - } - - /** - * 处理唤醒信号 - * 在收到唤醒信号时启动语音识别 - */ - override fun onWakeupSignalReceived() { - - } - // 处理开始 AI 单次对话 - override fun onStartSingleDialogReceived() { - // 不处理开始对话 - } - // 处理结束 AI 单次对话 - override fun onEndSingleDialogReceived() { - // 不处理结束对话 - } - override fun onDeviceInfoReceived(infoType: Int, infoData: Map) { - // 不处理设备信息 - } - - override fun onWakeupVoiceUpgradeProgressReceived(progress: Int) { - // 不处理升级进度 - } - - override fun onWakeupVoiceUpgradeSuccess() { - } - - override fun onWakeupVoiceUpgradeFailed() { - } - -} diff --git a/local_plugins/ota/android/src/main/kotlin/com/example/ota/tool/bluetooth/BTEventCbHelper.kt b/local_plugins/ota/android/src/main/kotlin/com/example/ota/tool/bluetooth/BTEventCbHelper.kt deleted file mode 100644 index 5661e20a4..000000000 --- a/local_plugins/ota/android/src/main/kotlin/com/example/ota/tool/bluetooth/BTEventCbHelper.kt +++ /dev/null @@ -1,91 +0,0 @@ -package com.jieli.otasdk.tool.bluetooth - -import android.bluetooth.BluetoothDevice -import android.os.Handler -import android.os.Looper -import com.jieli.otasdk.tool.ota.ble.model.BleScanInfo -import java.util.* - -/** - * @author zqjasonZhong - * @since 2022/9/14 - * @email zhongzhuocheng@zh-jieli.com - * @desc 蓝牙事件回调辅助类 - */ -class BTEventCbHelper : OnBTEventCallback() { - private val callbacks = mutableListOf() - private val uiHandler = Handler(Looper.getMainLooper()) - - fun registerCallback(callback: OnBTEventCallback) { - if (callbacks.contains(callback)) return - callbacks.add(callback) - } - - fun unregisterCallback(callback: OnBTEventCallback) { - if (callbacks.isEmpty()) return - callbacks.remove(callback) - } - - fun release() { - callbacks.clear() - uiHandler.removeCallbacksAndMessages(null) - } - - override fun onAdapterChange(bEnabled: Boolean) { - callbackEvent(object : CallbackImpl { - override fun onCallback(callback: OnBTEventCallback) { - callback.onAdapterChange(bEnabled) - } - }) - } - - override fun onDiscoveryChange(bStart: Boolean, scanType: Int) { - callbackEvent(object : CallbackImpl { - override fun onCallback(callback: OnBTEventCallback) { - callback.onDiscoveryChange(bStart, scanType) - } - }) - } - - override fun onDiscovery(device: BluetoothDevice?, bleScanMessage: BleScanInfo?) { - callbackEvent(object : CallbackImpl { - override fun onCallback(callback: OnBTEventCallback) { - callback.onDiscovery(device, bleScanMessage) - } - }) - } - - override fun onDeviceConnection(device: BluetoothDevice?, way: Int, status: Int) { - callbackEvent(object : CallbackImpl { - override fun onCallback(callback: OnBTEventCallback) { - callback.onDeviceConnection(device, way, status) - } - }) - } - - override fun onReceiveData(device: BluetoothDevice?, way: Int, uuid: UUID?, data: ByteArray?) { - callbackEvent(object : CallbackImpl { - override fun onCallback(callback: OnBTEventCallback) { - callback.onReceiveData(device, way, uuid, data) - } - }) - } - - override fun onBleMtuChange(device: BluetoothDevice?, mtu: Int, status: Int) { - callbackEvent(object : CallbackImpl { - override fun onCallback(callback: OnBTEventCallback) { - callback.onBleMtuChange(device, mtu, status) - } - }) - } - - private fun callbackEvent(impl: CallbackImpl?) { - if (null == impl) return - val runnable = CallbackRunnable(callbacks, impl) - if (Thread.currentThread().id == Looper.getMainLooper().thread.id) { - runnable.run() - } else { - uiHandler.post(runnable) - } - } -} \ No newline at end of file diff --git a/local_plugins/ota/android/src/main/kotlin/com/example/ota/tool/bluetooth/BluetoothHelper.kt b/local_plugins/ota/android/src/main/kotlin/com/example/ota/tool/bluetooth/BluetoothHelper.kt deleted file mode 100644 index 85ec1eb32..000000000 --- a/local_plugins/ota/android/src/main/kotlin/com/example/ota/tool/bluetooth/BluetoothHelper.kt +++ /dev/null @@ -1,204 +0,0 @@ -package com.jieli.otasdk.tool.bluetooth - -import android.bluetooth.BluetoothDevice -import android.bluetooth.BluetoothGatt -import android.bluetooth.BluetoothProfile -import android.content.Context -import com.jieli.jl_bt_ota.util.BluetoothUtil -import com.jieli.jl_bt_ota.util.CHexConver -import com.jieli.otasdk.tool.config.ConfigHelper -import com.jieli.otasdk.tool.ota.ble.BleManager -import com.jieli.otasdk.tool.ota.ble.interfaces.BleEventCallback -import com.jieli.otasdk.tool.ota.ble.model.BleScanInfo -import com.jieli.otasdk.tool.bluetooth.OtaConstant -import java.util.* -import android.util.Log -/** - * @author zqjasonZhong - * @since 2022/9/14 - * @email zhongzhuocheng@zh-jieli.com - * @desc 蓝牙操作辅助类 - */ -class BluetoothHelper(private val context: Context) { - - private val configHelper = ConfigHelper.getInstance() - private val bleManager = BleManager.getInstance(context)!! - private val btEventCbHelper = BTEventCbHelper() - - companion object { - - const val TAG: String = "BluetoothHelper" - - @Volatile - private var instance: BluetoothHelper? = null - - fun getInstance(context: Context): BluetoothHelper = instance ?: synchronized(this) { - instance ?: BluetoothHelper(context).also { instance = it } - } - } - - private val bleEventCallback = object : BleEventCallback() { - - override fun onAdapterChange(bEnabled: Boolean) { - btEventCbHelper.onAdapterChange(bEnabled) - } - - override fun onDiscoveryBleChange(bStart: Boolean) { - btEventCbHelper.onDiscoveryChange(bStart, OtaConstant.PROTOCOL_BLE) - } - - override fun onDiscoveryBle(device: BluetoothDevice?, bleScanMessage: BleScanInfo?) { - btEventCbHelper.onDiscovery(device, bleScanMessage) - } - - override fun onBleConnection(device: BluetoothDevice?, status: Int) { - btEventCbHelper.onDeviceConnection(device, OtaConstant.PROTOCOL_BLE, status) - } - - override fun onBleDataNotification( - device: BluetoothDevice?, - serviceUuid: UUID?, - characteristicsUuid: UUID?, - data: ByteArray? - ) { - btEventCbHelper.onReceiveData( - device, - OtaConstant.PROTOCOL_BLE, - characteristicsUuid, - data - ) - } - - override fun onBleDataBlockChanged(device: BluetoothDevice?, block: Int, status: Int) { - btEventCbHelper.onBleMtuChange(device, block, status) - } - } - - - - init { -// if (configHelper.isBleWay()) { - bleManager.registerBleEventCallback(bleEventCallback) -// } else { - -// } - } - - fun destroy() { - bleManager.unregisterBleEventCallback(bleEventCallback) - bleManager.destroy() - - btEventCbHelper.release() - instance = null - } - - fun registerCallback(callback: OnBTEventCallback) { - btEventCbHelper.registerCallback(callback) - } - - fun unregisterCallback(callback: OnBTEventCallback) { - btEventCbHelper.unregisterCallback(callback) - } - - fun isConnected(): Boolean { - return getConnectedDevice() != null - } - - fun isDeviceConnected(device: BluetoothDevice?): Boolean { - return BluetoothUtil.deviceEquals(getConnectedDevice(), device) - } - - fun isScanning(): Boolean = - bleManager.isBleScanning - - - fun isConnecting(): Boolean = - bleManager.isBleScanning - - - fun getConnectedDevice(): BluetoothDevice? { - - return bleManager.connectedBtDevice - - } - - fun getConnectedGatt(): BluetoothGatt? { - return if (configHelper.isBleWay()) { - bleManager.getConnectedBtGatt(getConnectedDevice()) - } else { - null - } - } - - fun getBleMtu(): Int { - return if (configHelper.isBleWay()) { - return bleManager.getBleMtu(getConnectedDevice()) - } else { - 20 - } - } - - fun startScan(device: BluetoothDevice?) { - Log.i(TAG, ", startScan" + device); - - bleManager.startLeScan(device) - - } - - fun stopScan() { - - bleManager.stopLeScan() - - } - - fun connectDevice(device: BluetoothDevice?): Boolean = - - bleManager.connectBleDevice(device) - - - fun disconnectDevice(device: BluetoothDevice?) { - - bleManager.disconnectBleDevice(device) - - } - - fun connectBleDevice(device: BluetoothDevice?): Boolean = - bleManager.connectBleDevice(device) - - fun reconnectDevice(address: String?, isUseNewAdv: Boolean) { - if (configHelper.isBleWay()) { - bleManager.reconnectDevice(address, isUseNewAdv) - } else { - //TODO:需要增加SPP自定义回连方式 - } - } - - fun writeDataToDevice(bluetoothDevice: BluetoothDevice?, byteArray: ByteArray?): Boolean { - if (null == bluetoothDevice || null == byteArray || byteArray.isEmpty()) return false - if (bleManager.connectedBtDevice != null) {//目前连接的设备是ble - bleManager.writeDataByBleAsync( - bluetoothDevice, - BleManager.BLE_UUID_SERVICE, - BleManager.BLE_UUID_WRITE, - byteArray - ) { device, serviceUUID, characteristicUUID, result, data -> - Log.i( - TAG, - "-writeDataByBleAsync- device:${ - printDeviceInfo(device) - }, result = $result,\ndata:[${ - CHexConver.byte2HexStr(data) - }]" - ) - } - } - return true - } - - private fun printDeviceInfo(device: BluetoothDevice?): String? { - //return AppUtil.printBtDeviceInfo(device) - //注释掉 - return "返回设备信息" - } - -} \ No newline at end of file diff --git a/local_plugins/ota/android/src/main/kotlin/com/example/ota/tool/bluetooth/CallbackImpl.kt b/local_plugins/ota/android/src/main/kotlin/com/example/ota/tool/bluetooth/CallbackImpl.kt deleted file mode 100644 index 52709b99c..000000000 --- a/local_plugins/ota/android/src/main/kotlin/com/example/ota/tool/bluetooth/CallbackImpl.kt +++ /dev/null @@ -1,12 +0,0 @@ -package com.jieli.otasdk.tool.bluetooth - -/** - * @author zqjasonZhong - * @since 2022/9/14 - * @email zhongzhuocheng@zh-jieli.com - * @desc 回调实现类 - */ -interface CallbackImpl { - - fun onCallback(callback: T) -} \ No newline at end of file diff --git a/local_plugins/ota/android/src/main/kotlin/com/example/ota/tool/bluetooth/CallbackRunnable.kt b/local_plugins/ota/android/src/main/kotlin/com/example/ota/tool/bluetooth/CallbackRunnable.kt deleted file mode 100644 index 62bea6970..000000000 --- a/local_plugins/ota/android/src/main/kotlin/com/example/ota/tool/bluetooth/CallbackRunnable.kt +++ /dev/null @@ -1,23 +0,0 @@ -package com.jieli.otasdk.tool.bluetooth - -/** - * @author zqjasonZhong - * @since 2022/9/14 - * @email zhongzhuocheng@zh-jieli.com - * @desc 回调处理类 - */ -class CallbackRunnable constructor( - private val callbacks: MutableList, - private val impl: CallbackImpl? -) : - Runnable { - - override fun run() { - if (callbacks.isEmpty() || impl == null) return - val temp = mutableListOf() - temp.addAll(callbacks) - temp.forEach { - impl.onCallback(it) - } - } -} \ No newline at end of file diff --git a/local_plugins/ota/android/src/main/kotlin/com/example/ota/tool/bluetooth/OnBTEventCallback.kt b/local_plugins/ota/android/src/main/kotlin/com/example/ota/tool/bluetooth/OnBTEventCallback.kt deleted file mode 100644 index 41a93eeb4..000000000 --- a/local_plugins/ota/android/src/main/kotlin/com/example/ota/tool/bluetooth/OnBTEventCallback.kt +++ /dev/null @@ -1,38 +0,0 @@ -package com.jieli.otasdk.tool.bluetooth - -import android.bluetooth.BluetoothDevice -import com.jieli.otasdk.tool.ota.ble.model.BleScanInfo -import java.util.* - -/** - * @author zqjasonZhong - * @since 2022/9/14 - * @email zhongzhuocheng@zh-jieli.com - * @desc 蓝牙事件回调 - */ -open class OnBTEventCallback { - - open fun onAdapterChange(bEnabled: Boolean) { - - } - - open fun onDiscoveryChange(bStart: Boolean, scanType: Int) { - - } - - open fun onDiscovery(device: BluetoothDevice?, bleScanMessage: BleScanInfo?) { - - } - - open fun onDeviceConnection(device: BluetoothDevice?, way: Int, status: Int) { - - } - - open fun onReceiveData(device: BluetoothDevice?, way: Int, uuid: UUID?, data: ByteArray?) { - - } - - open fun onBleMtuChange(device: BluetoothDevice?, mtu: Int, status: Int) { - - } -} \ No newline at end of file diff --git a/local_plugins/ota/android/src/main/kotlin/com/example/ota/tool/bluetooth/OtaConstant.kt b/local_plugins/ota/android/src/main/kotlin/com/example/ota/tool/bluetooth/OtaConstant.kt deleted file mode 100644 index c7cfb37cb..000000000 --- a/local_plugins/ota/android/src/main/kotlin/com/example/ota/tool/bluetooth/OtaConstant.kt +++ /dev/null @@ -1,54 +0,0 @@ -package com.jieli.otasdk.tool.bluetooth - -import java.util.* - -/** - * 常量声明 - * - * @author zqjasonZhong - * @date 2019/12/30 - */ -class OtaConstant { - - companion object { - - val UUID_A2DP: UUID = UUID.fromString("0000110b-0000-1000-8000-00805f9b34fb") - val UUID_SPP: UUID = UUID.fromString("00001101-0000-1000-8000-00805f9b34fb") - - //Ble协议 - const val PROTOCOL_BLE = 0 - //Spp协议 - const val PROTOCOL_SPP = 1 - - const val CURRENT_PROTOCOL = PROTOCOL_BLE - - //是否使用设备认证 - const val IS_NEED_DEVICE_AUTH = true - - //是否HID设备连接 - const val HID_DEVICE_WAY = false - - //是否需要自定义连接方式 - const val NEED_CUSTOM_RECONNECT_WAY = false - - //是否使用SPP多通道连接 - const val USE_SPP_MULTIPLE_CHANNEL = false - - //是否使用自动化测试 - const val AUTO_TEST_OTA = false - //自动化测试次数 - const val AUTO_TEST_COUNT = 30 - - //是否自动化测试时允许容错 - const val AUTO_FAULT_TOLERANT = false - //容错次数 - const val AUTO_FAULT_TOLERANT_COUNT = 1 - - //dir - const val DIR_ROOT = "JieLiOTA" - const val DIR_UPGRADE = "upgrade" - const val DIR_LOGCAT = "logcat" - - const val SCAN_TIMEOUT = 16 * 1000L - } -} \ No newline at end of file diff --git a/local_plugins/ota/android/src/main/kotlin/com/example/ota/tool/config/ConfigHelper.kt b/local_plugins/ota/android/src/main/kotlin/com/example/ota/tool/config/ConfigHelper.kt deleted file mode 100644 index 2e75a9a0a..000000000 --- a/local_plugins/ota/android/src/main/kotlin/com/example/ota/tool/config/ConfigHelper.kt +++ /dev/null @@ -1,187 +0,0 @@ -package com.jieli.otasdk.tool.config - -import android.annotation.SuppressLint -import android.content.Context -import androidx.annotation.IntRange -import com.jieli.jl_bt_ota.constant.BluetoothConstant -import com.jieli.otasdk.tool.bluetooth.OtaConstant - -/** - * @author zqjasonZhong - * @since 2022/9/8 - * @email zhongzhuocheng@zh-jieli.com - * @desc 配置辅助类 - */ -open class ConfigHelper private constructor(context: Context) { - - companion object { - //download文件夹 - private const val KEY_DOWNLOAD_URI = "download_uri" - - //通讯方式 - private const val KEY_COMMUNICATION_WAY = "communication_way" - - //是否使用设备认证 - private const val KEY_IS_USE_DEVICE_AUTH = "is_use_device_auth" - - //是否HID设备 - private const val KEY_IS_HID_DEVICE = "is_hid_device" - - //是否使用自定义回连方式 - private const val KEY_USE_CUSTOM_RECONNECT_WAY = "use_custom_reconnect_way" - - //BLE的MTU请求值 - private const val KEY_BLE_MTU_VALUE = "ble_mtu_value" - - //是否启用SPP多通道 - private const val KEY_SPP_MULTIPLE_CHANNEL = "spp_multiple_channel" - - //自定义SPP通道 - private const val KEY_SPP_CUSTOM_UUID = "spp_custom_uuid" - - //是否自动测试OTA - private const val KEY_AUTO_TEST_OTA = "auto_test_ota" - - //自动化测试次数 - private const val KEY_AUTO_TEST_COUNT = "auto_test_count" - - //是否自动测试OTA时,允许容错 - private const val KEY_FAULT_TOLERANT = "fault_tolerant" - - //容错次数 - private const val KEY_FAULT_TOLERANT_COUNT = "fault_tolerant_count" - //扫描过滤参数 - private const val KEY_SCAN_FILTER_STRING = "scan_filter_string" - - //开发者模式 - private const val KEY_DEVELOP_MODE = "develop_mode" - - // 广播音箱模式 - private const val KEY_BROADCAST_BOX = "broadcast_box_switch" - @Volatile - private var instance: ConfigHelper? = null - - // 双重校验锁初始化 - fun initialize(context: Context) = instance ?: synchronized(this) { - instance ?: ConfigHelper(context.applicationContext).also { - instance = it - } - } - - // 安全获取实例方法 - fun getInstance(): ConfigHelper = instance ?: throw IllegalStateException( - "Call ConfigHelper.initialize() first" - ) - } - - private val preferences = context.getSharedPreferences("ota_config_data", Context.MODE_PRIVATE) - - fun isBleWay(): Boolean = preferences.getInt( - KEY_COMMUNICATION_WAY, - OtaConstant.CURRENT_PROTOCOL - ) == OtaConstant.PROTOCOL_BLE - - fun setBleWay(isBle: Boolean) { - val way = if (isBle) OtaConstant.PROTOCOL_BLE else OtaConstant.PROTOCOL_SPP - preferences.edit().putInt(KEY_COMMUNICATION_WAY, way).apply() - } - - fun isUseDeviceAuth(): Boolean = - preferences.getBoolean(KEY_IS_USE_DEVICE_AUTH, OtaConstant.IS_NEED_DEVICE_AUTH) - - fun setUseDeviceAuth(isAuth: Boolean) { - preferences.edit().putBoolean(KEY_IS_USE_DEVICE_AUTH, isAuth).apply() - } - - fun isHidDevice(): Boolean = - preferences.getBoolean(KEY_IS_HID_DEVICE, OtaConstant.HID_DEVICE_WAY) - - fun setHidDevice(isHid: Boolean) { - preferences.edit().putBoolean(KEY_IS_HID_DEVICE, isHid).apply() - } - - fun isUseCustomReConnectWay(): Boolean = preferences.getBoolean( - KEY_USE_CUSTOM_RECONNECT_WAY, - OtaConstant.NEED_CUSTOM_RECONNECT_WAY - ) - - fun setUseCustomReConnectWay(isCustom: Boolean) { - preferences.edit().putBoolean(KEY_USE_CUSTOM_RECONNECT_WAY, isCustom).apply() - } - - fun getBleRequestMtu(): Int = - preferences.getInt(KEY_BLE_MTU_VALUE, 509) - - fun setBleRequestMtu(@IntRange(from = 20, to = 509) mtu: Int) { - preferences.edit().putInt(KEY_BLE_MTU_VALUE, mtu).apply() - } - - fun isUseMultiSppChannel(): Boolean = preferences.getBoolean( - KEY_SPP_MULTIPLE_CHANNEL, - OtaConstant.USE_SPP_MULTIPLE_CHANNEL - ) - - fun setUseMultiSppChannel(isUseMulti: Boolean) { - preferences.edit().putBoolean(KEY_SPP_MULTIPLE_CHANNEL, isUseMulti).apply() - } - - fun getCustomSppChannel(): String? = - preferences.getString(KEY_SPP_CUSTOM_UUID, OtaConstant.UUID_SPP.toString()) - - fun setCustomSppChannel(uuid: String?) { - preferences.edit().putString(KEY_SPP_CUSTOM_UUID, uuid).apply() - } - - fun isAutoTest(): Boolean = preferences.getBoolean(KEY_AUTO_TEST_OTA, OtaConstant.AUTO_TEST_OTA) - - fun setAutoTest(isAutoTest: Boolean) { - preferences.edit().putBoolean(KEY_AUTO_TEST_OTA, isAutoTest).apply() - } - - fun getAutoTestCount(): Int = preferences.getInt( - KEY_AUTO_TEST_COUNT, - OtaConstant.AUTO_TEST_COUNT - ) - - fun setAutoTestCount(count: Int) { - if (!isAutoTest()) return - preferences.edit().putInt(KEY_AUTO_TEST_COUNT, count).apply() - } - - fun isFaultTolerant(): Boolean = preferences.getBoolean(KEY_FAULT_TOLERANT, OtaConstant.AUTO_FAULT_TOLERANT) - - fun setFaultTolerant(isFaultTolerant: Boolean) { - preferences.edit().putBoolean(KEY_FAULT_TOLERANT, isFaultTolerant).apply() - } - - fun getFaultTolerantCount(): Int = preferences.getInt( - KEY_FAULT_TOLERANT_COUNT, - OtaConstant.AUTO_FAULT_TOLERANT_COUNT - ) - - fun setFaultTolerantCount(count: Int) { - if (!isFaultTolerant()) return - preferences.edit().putInt(KEY_FAULT_TOLERANT_COUNT, count).apply() - } - - fun getScanFilter(): String? = - preferences.getString(KEY_SCAN_FILTER_STRING, "") - - fun setScanFilter(scanFilter: String?) { - preferences.edit().putString(KEY_SCAN_FILTER_STRING, scanFilter).apply() - } - - fun isDevelopMode(): Boolean = - preferences.getBoolean(KEY_DEVELOP_MODE, false) - - fun setDevelopMode(developMode: Boolean) { - preferences.edit().putBoolean(KEY_DEVELOP_MODE, developMode).apply() - } - - fun isEnableBroadcastBox(): Boolean = - preferences.getBoolean(KEY_BROADCAST_BOX, false) - - fun enableBroadcastBox(enable: Boolean) { - preferences.edit().putBoolean(KEY_BROADCAST_BOX, enable).apply() - } -} \ No newline at end of file diff --git a/local_plugins/ota/android/src/main/kotlin/com/example/ota/tool/ota/OTAManager.kt b/local_plugins/ota/android/src/main/kotlin/com/example/ota/tool/ota/OTAManager.kt deleted file mode 100644 index 733551f6c..000000000 --- a/local_plugins/ota/android/src/main/kotlin/com/example/ota/tool/ota/OTAManager.kt +++ /dev/null @@ -1,172 +0,0 @@ -package com.jieli.otasdk.tool.ota - -import android.bluetooth.BluetoothDevice -import android.bluetooth.BluetoothGatt -import android.content.Context -import com.jieli.jl_bt_ota.constant.BluetoothConstant -import com.jieli.jl_bt_ota.constant.StateCode -import com.jieli.jl_bt_ota.impl.BluetoothOTAManager -import com.jieli.jl_bt_ota.impl.RcspAuth -import com.jieli.jl_bt_ota.model.BluetoothOTAConfigure -import com.jieli.jl_bt_ota.util.BluetoothUtil -import com.jieli.jl_bt_ota.util.CHexConver -import com.jieli.otasdk.tool.bluetooth.BluetoothHelper -import com.jieli.otasdk.tool.bluetooth.OnBTEventCallback -import com.jieli.otasdk.tool.config.ConfigHelper -import com.jieli.otasdk.tool.bluetooth.OtaConstant -import java.util.* -import android.util.Log - -/** - * 用于RCSP的第三方SDK接入OTA流程 - */ -class OTAManager(context: Context) : BluetoothOTAManager(context) { - - val configHelper = ConfigHelper.getInstance() - val bluetoothHelper = BluetoothHelper.getInstance(context) - - /** - * 转换成OTA库的连接状态 - * - * @param status 连接状态 - * @return 库的连接状态 - */ - - fun changeConnectStatus(status: Int): Int { - var changeStatus = StateCode.CONNECTION_DISCONNECT - when (status) { - 2 -> { - changeStatus = StateCode.CONNECTION_OK - } - - 1 -> { - changeStatus = StateCode.CONNECTION_CONNECTING - } - } - return changeStatus - } - - val btEventCallback = object : OnBTEventCallback() { - - override fun onDeviceConnection(device: BluetoothDevice?, way: Int, status: Int) { - super.onDeviceConnection(device, way, status) - val connectionState = changeConnectStatus(status) - // Log.i( - // TAG, "onConnection >>> device : ${printDeviceInfo(device)}, way = $way" + - // " status :$status, change status : $connectionState" - // ) - // onBtDeviceConnection(device, connectionState) - //注释掉 - Log.i( - TAG, "onConnection >>> device : ${device}, way = $way" + - " status :$status, change status : $connectionState" - ) - onBtDeviceConnection(device, connectionState) - } - - override fun onReceiveData( - device: BluetoothDevice?, - way: Int, - uuid: UUID?, - data: ByteArray? - ) { - super.onReceiveData(device, way, uuid, data) - Log.d( - TAG, "onReceiveData >>> ${printDeviceInfo(device)}, way = $way,\n" + - "uuid = $uuid, data :${CHexConver.byte2HexStr(data)} " - ) - // if (way == OtaConstant.PROTOCOL_SPP && SppManager.UUID_SPP != uuid) { - // Log.d( - // TAG, "onReceiveData >>> skip spec" - // ) - // return - // } - onReceiveDeviceData(device, data) - } - - override fun onBleMtuChange(device: BluetoothDevice?, mtu: Int, status: Int) { - super.onBleMtuChange(device, mtu, status) - onMtuChanged(bluetoothHelper.getConnectedGatt(), mtu, status) - } - - } - - init { - // ConfigHelper.initialize(context) - val bluetoothOption = BluetoothOTAConfigure() - //选择通讯方式 - bluetoothOption.priority = - BluetoothOTAConfigure.PREFER_BLE - - //是否需要自定义回连方式(默认不需要,如需要自定义回连方式,需要客户自行实现) - bluetoothOption.isUseReconnect = - (configHelper.isUseCustomReConnectWay() && configHelper.isHidDevice()) - Log.d( - TAG, - "是否启用设备认证流程(与固件工程师确认) >>> ${configHelper.isUseDeviceAuth()} >>> ${bluetoothOption.isUseReconnect} " - ) - //是否启用设备认证流程(与固件工程师确认) - bluetoothOption.isUseAuthDevice = false - //设置BLE的MTU - bluetoothOption.mtu = BluetoothConstant.BLE_MTU_MIN - //是否需要改变BLE的MTU - bluetoothOption.isNeedChangeMtu = false - //是否启用杰理服务器(暂时不支持) - bluetoothOption.isUseJLServer = false - - //配置OTA参数 - configure(bluetoothOption) - RcspAuth.setAuthTimeout(5000) - bluetoothHelper.registerCallback(btEventCallback) - if (bluetoothHelper.isConnected()) { - onBtDeviceConnection(bluetoothHelper.getConnectedDevice(), StateCode.CONNECTION_OK) - if (configHelper.isBleWay()) { - onMtuChanged( - bluetoothHelper.getConnectedGatt(), - bluetoothHelper.getBleMtu() + 3, - BluetoothGatt.GATT_SUCCESS - ) - } - } - } - - - override fun getConnectedDevice(): BluetoothDevice? = bluetoothHelper.getConnectedDevice() - - override fun getConnectedBluetoothGatt(): BluetoothGatt? = bluetoothHelper.getConnectedGatt() - - override fun connectBluetoothDevice(bluetoothDevice: BluetoothDevice?) { - //仅仅作为回连设备,回连设备现在仅支持BLE - val result: Boolean = bluetoothHelper.connectBleDevice(bluetoothDevice) - if (!result) { - onBtDeviceConnection(bluetoothDevice, StateCode.CONNECTION_FAILED) - } - } - - override fun disconnectBluetoothDevice(bluetoothDevice: BluetoothDevice?) { - bluetoothHelper.disconnectDevice(bluetoothDevice) - } - - override fun sendDataToDevice(bluetoothDevice: BluetoothDevice?, bytes: ByteArray?): Boolean { - Log.d( - TAG, - "sendDataToDevice : device = ${printDeviceInfo(bluetoothDevice)}\n" + - "data = [${CHexConver.byte2HexStr(bytes)}]" - ) - return bluetoothHelper.writeDataToDevice(bluetoothDevice, bytes) - } - - override fun release() { - super.release() - bluetoothHelper.unregisterCallback(btEventCallback) - } - - fun setReconnectAddr(addr: String?) { -// setReconnectAddress(addr) - } - - private fun printDeviceInfo(device: BluetoothDevice?): String? { - return BluetoothUtil.printBtDeviceInfo(context, device) - } - -} diff --git a/local_plugins/ota/android/src/main/kotlin/com/example/ota/tool/ota/ble/BleEventCallbackManager.java b/local_plugins/ota/android/src/main/kotlin/com/example/ota/tool/ota/ble/BleEventCallbackManager.java deleted file mode 100644 index 60cd91506..000000000 --- a/local_plugins/ota/android/src/main/kotlin/com/example/ota/tool/ota/ble/BleEventCallbackManager.java +++ /dev/null @@ -1,175 +0,0 @@ -package com.jieli.otasdk.tool.ota.ble; - -import android.bluetooth.BluetoothDevice; -import android.bluetooth.BluetoothGattService; -import android.os.Handler; -import android.os.Looper; - -import com.jieli.otasdk.tool.ota.ble.interfaces.BleEventCallback; -import com.jieli.otasdk.tool.ota.ble.model.BleScanInfo; - -import java.util.ArrayList; -import java.util.List; -import java.util.UUID; - -/** - * Ble事件回调管理器 - * - * @author zqjasonZhong - * @since 2020/12/24 - */ -class BleEventCallbackManager extends BleEventCallback { - private final ArrayList mCallbacks = new ArrayList<>(); - private final Handler mHandler = new Handler(Looper.getMainLooper()); - - public void registerBleEventCallback(BleEventCallback callback) { - if (callback != null && !mCallbacks.contains(callback)) { - mCallbacks.add(callback); - } - } - - public void unregisterBleEventCallback(BleEventCallback callback) { - if (callback != null && !mCallbacks.isEmpty()) { - mCallbacks.remove(callback); - } - } - - public void release() { - mCallbacks.clear(); - mHandler.removeCallbacksAndMessages(null); - } - - @Override - public void onAdapterChange(final boolean bEnabled) { - callbackBleEvent(new BleEventCallbackImpl() { - @Override - public void onCallback(BleEventCallback callback) { - callback.onAdapterChange(bEnabled); - } - }); - } - - @Override - public void onDiscoveryBleChange(final boolean bStart) { - callbackBleEvent(new BleEventCallbackImpl() { - @Override - public void onCallback(BleEventCallback callback) { - callback.onDiscoveryBleChange(bStart); - } - }); - } - - @Override - public void onDiscoveryBle(final BluetoothDevice device, final BleScanInfo bleScanMessage) { - callbackBleEvent(new BleEventCallbackImpl() { - @Override - public void onCallback(BleEventCallback callback) { - callback.onDiscoveryBle(device, bleScanMessage); - } - }); - } - - @Override - public void onBleConnection(final BluetoothDevice device, final int status) { - callbackBleEvent(new BleEventCallbackImpl() { - @Override - public void onCallback(BleEventCallback callback) { - callback.onBleConnection(device, status); - } - }); - } - - @Override - public void onBleServiceDiscovery(final BluetoothDevice device, final int status, final List services) { - callbackBleEvent(new BleEventCallbackImpl() { - @Override - public void onCallback(BleEventCallback callback) { - callback.onBleServiceDiscovery(device, status, services); - } - }); - } - - @Override - public void onBleNotificationStatus(final BluetoothDevice device, final UUID serviceUuid, final UUID characteristicUuid, final int status) { - callbackBleEvent(new BleEventCallbackImpl() { - @Override - public void onCallback(BleEventCallback callback) { - callback.onBleNotificationStatus(device, serviceUuid, characteristicUuid, status); - } - }); - } - - @Override - public void onBleDataBlockChanged(final BluetoothDevice device, final int block, final int status) { - callbackBleEvent(new BleEventCallbackImpl() { - @Override - public void onCallback(BleEventCallback callback) { - callback.onBleDataBlockChanged(device, block, status); - } - }); - } - - @Override - public void onBleDataNotification(final BluetoothDevice device, final UUID serviceUuid, final UUID characteristicsUuid, final byte[] data) { - callbackBleEvent(new BleEventCallbackImpl() { - @Override - public void onCallback(BleEventCallback callback) { - callback.onBleDataNotification(device, serviceUuid, characteristicsUuid, data); - } - }); - } - - @Override - public void onBleWriteStatus(final BluetoothDevice device, final UUID serviceUuid, final UUID characteristicsUuid, final byte[] data, final int status) { - callbackBleEvent(new BleEventCallbackImpl() { - @Override - public void onCallback(BleEventCallback callback) { - callback.onBleWriteStatus(device, serviceUuid, characteristicsUuid, data, status); - } - }); - } - - @Override - public void onConnectionUpdated(final BluetoothDevice device, final int interval, final int latency, final int timeout, final int status) { - callbackBleEvent(new BleEventCallbackImpl() { - @Override - public void onCallback(BleEventCallback callback) { - callback.onConnectionUpdated(device, interval, latency, timeout, status); - } - }); - } - - private void callbackBleEvent(BleEventCallbackImpl impl) { - if (null == impl) return; - OnBleEventRunnable runnable = new OnBleEventRunnable(impl); - if (Thread.currentThread().getId() == Looper.getMainLooper().getThread().getId()) { - runnable.run(); - } else { - mHandler.post(runnable); - } - } - - private static abstract class BleEventCallbackImpl { - - public abstract void onCallback(BleEventCallback callback); - } - - private class OnBleEventRunnable implements Runnable { - private final BleEventCallbackImpl mImpl; - - public OnBleEventRunnable(BleEventCallbackImpl impl) { - mImpl = impl; - } - - @Override - public void run() { - if (!mCallbacks.isEmpty() && mImpl != null) { - for (BleEventCallback callback : new ArrayList<>(mCallbacks)) { - if (callback != null) { - mImpl.onCallback(callback); - } - } - } - } - } -} diff --git a/local_plugins/ota/android/src/main/kotlin/com/example/ota/tool/ota/ble/BleManager.java b/local_plugins/ota/android/src/main/kotlin/com/example/ota/tool/ota/ble/BleManager.java deleted file mode 100644 index 737701d73..000000000 --- a/local_plugins/ota/android/src/main/kotlin/com/example/ota/tool/ota/ble/BleManager.java +++ /dev/null @@ -1,1197 +0,0 @@ -package com.jieli.otasdk.tool.ota.ble; - -import static android.bluetooth.BluetoothProfile.STATE_CONNECTED; -import static android.os.Build.VERSION_CODES.LOLLIPOP; - -import android.annotation.SuppressLint; -import android.bluetooth.BluetoothAdapter; -import android.bluetooth.BluetoothDevice; -import android.bluetooth.BluetoothGatt; -import android.bluetooth.BluetoothGattCallback; -import android.bluetooth.BluetoothGattCharacteristic; -import android.bluetooth.BluetoothGattDescriptor; -import android.bluetooth.BluetoothGattService; -import android.bluetooth.BluetoothManager; -import android.bluetooth.BluetoothProfile; -import android.bluetooth.le.BluetoothLeScanner; -import android.bluetooth.le.ScanCallback; -import android.bluetooth.le.ScanResult; -import android.bluetooth.le.ScanSettings; -import android.content.BroadcastReceiver; -import android.content.Context; -import android.content.Intent; -import android.content.IntentFilter; -import android.os.Build; -import android.os.Handler; -import android.os.Looper; -import android.os.Message; -import android.os.SystemClock; -import android.text.TextUtils; - -import androidx.annotation.NonNull; - -//import com.jieli.broadcastbox.multidevice.ReConnectHelper; -import com.jieli.jl_bt_ota.constant.BluetoothConstant; -import com.jieli.jl_bt_ota.util.BluetoothUtil; -import com.jieli.jl_bt_ota.util.CHexConver; -import com.jieli.jl_bt_ota.util.CommonUtil; -//import com.jieli.jl_bt_ota.util.Log; -//import com.jieli.otasdk.MainApplication; -import com.jieli.otasdk.tool.config.ConfigHelper; -import com.jieli.otasdk.tool.ota.ble.interfaces.BleEventCallback; -import com.jieli.otasdk.tool.ota.ble.interfaces.OnWriteDataCallback; -import com.jieli.otasdk.tool.ota.ble.model.BleDevice; -import com.jieli.otasdk.tool.ota.ble.model.BleScanInfo; -//import com.jieli.otasdk.util.AppUtil; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Locale; -import java.util.Map; -import java.util.UUID; -import android.util.Log; - - -import android.app.AlertDialog; -import android.content.DialogInterface; -import android.Manifest; -import android.content.pm.PackageManager; -import android.net.Uri; -import android.provider.Settings; -/** - * Ble连接管理类 - * - * @author zqjasonZhong - * @since 2020/7/16 - */ -public class BleManager { - private final static String TAG = BleManager.class.getSimpleName(); - private final Context mContext; - @SuppressLint("StaticFieldLeak") - private volatile static BleManager instance; - private final ConfigHelper configHelper = ConfigHelper.Companion.getInstance(); - - private BaseBtAdapterReceiver mAdapterReceiver; - private final BluetoothAdapter mBluetoothAdapter; - private BluetoothLeScanner mBluetoothLeScanner; - // private final ReConnectHelper mReConnectHelper; - - private volatile BluetoothDevice mConnectingBtDevice; //连接中的设备 - private volatile BluetoothDevice mUsingDevice; //正在通讯的设备 - - private final Map mConnectedGattMap = new HashMap<>(); - private final List mDiscoveredBleDevices = new ArrayList<>(); - private final BleEventCallbackManager mCallbackManager = new BleEventCallbackManager(); - - private volatile boolean isBleScanning; - private NotifyCharacteristicRunnable mNotifyCharacteristicRunnable; - - private BluetoothDevice deviced1;//需要连接手机设备信息 - private long timeout = 15000;//扫描设备时间 - private int mRetryConnectCount = 0;//连接失败后尝试连接次数 - private long startConnectTime = 0; //开始连接时间戳 - private final static int MAX_RETRY_CONNECT_COUNT = 1;//最大尝试连接次数 - private final static int MIN_CONNECT_TIME = 5 * 1000; //连接最小时间超时 - //BLE服务UUID - public final static UUID BLE_UUID_SERVICE = BluetoothConstant.UUID_SERVICE; - //BLE的写特征UUID - public final static UUID BLE_UUID_WRITE = BluetoothConstant.UUID_WRITE; - //BLE的通知特征UUID - public final static UUID BLE_UUID_NOTIFICATION = BluetoothConstant.UUID_NOTIFICATION; - //BLE的通知特征的描述符UUID - public final static UUID BLE_UUID_NOTIFICATION_DESCRIPTOR = UUID.fromString("00002902-0000-1000-8000-00805F9B34FB"); - - /** - * 发送数据最大超时 - 8 秒 - */ - public final static int SEND_DATA_MAX_TIMEOUT = 8000; //8 s - private final static int SCAN_BLE_TIMEOUT = 12 * 1000; //建议搜索BLE最小时间 - private final static int CONNECT_BLE_TIMEOUT = 40 * 1000; - - private final static int CALLBACK_TIMEOUT = 6000; - private final static int RECONNECT_BLE_DELAY = 2000; - - private final static int MSG_SCAN_BLE_TIMEOUT = 0x1010; - private final static int MSG_CONNECT_BLE_TIMEOUT = 0x1011; - private final static int MSG_SCAN_HID_DEVICE = 0X1012; - private final static int MSG_NOTIFY_BLE_TIMEOUT = 0x1013; - private final static int MSG_CHANGE_BLE_MTU_TIMEOUT = 0x1014; - private final static int MSG_BLE_DISCOVER_SERVICES_CALLBACK_TIMEOUT = 0x1015; - private final Handler mHandler = new Handler(Looper.getMainLooper(), new Handler.Callback() { - @Override - public boolean handleMessage(@NonNull Message msg) { - switch (msg.what) { - case MSG_SCAN_BLE_TIMEOUT: - if (isBleScanning) { - stopLeScan(); - } - break; - case MSG_CONNECT_BLE_TIMEOUT: { - if (msg.obj instanceof BluetoothDevice) { - BluetoothDevice device = (BluetoothDevice) msg.obj; - BleDevice bleDevice = getConnectedBle(device); - if (null == bleDevice) { - handleBleConnection(device, BluetoothProfile.STATE_DISCONNECTED); - } - setConnectingBtDevice(null); - } - break; - } - case MSG_SCAN_HID_DEVICE: { - List lists = BluetoothUtil.getSystemConnectedBtDeviceList(mContext); - if (null != lists ) { - //&& AppUtil.checkHasConnectPermission(mContext) - for (BluetoothDevice device : lists) { - if (device.getType() != BluetoothDevice.DEVICE_TYPE_CLASSIC && - device.getBondState() == BluetoothDevice.BOND_BONDED) { - handleDiscoveryBle(device, null); - } - } - } - mHandler.sendEmptyMessageDelayed(MSG_SCAN_HID_DEVICE, 1000); - break; - } - case MSG_NOTIFY_BLE_TIMEOUT: { - if (msg.obj instanceof BluetoothDevice) { - BluetoothDevice device = (BluetoothDevice) msg.obj; - disconnectBleDevice(device); - } - break; - } - case MSG_CHANGE_BLE_MTU_TIMEOUT: { - BluetoothDevice device = (BluetoothDevice) msg.obj; - BleDevice bleDevice = getConnectedBle(device); - Log.i(TAG, "-MSG_CHANGE_BLE_MTU_TIMEOUT- request mtu timeout, device : " + printDeviceInfo(device) + ", " + bleDevice); - if (bleDevice != null) { - handleBleConnectedEvent(device); - } else { - handleBleConnection(device, BluetoothProfile.STATE_DISCONNECTED); - } - break; - } - case MSG_BLE_DISCOVER_SERVICES_CALLBACK_TIMEOUT: - if (msg.obj instanceof BluetoothDevice) { - BluetoothDevice connectedBleDev = (BluetoothDevice) msg.obj; - if (BluetoothUtil.deviceEquals(connectedBleDev, mUsingDevice)) { - boolean isNeedDisconnect = true; - BleDevice bleDevice = getConnectedBle(connectedBleDev); - if (bleDevice != null) { - List services = bleDevice.getGatt().getServices(); - if (services != null && services.size() > 0) { - mBluetoothGattCallback.onServicesDiscovered(bleDevice.getGatt(), BluetoothGatt.GATT_SUCCESS); - isNeedDisconnect = false; - } - } - if (isNeedDisconnect) { - Log.d(TAG, "discover services timeout."); - disconnectBleDevice(connectedBleDev); - reconnectDevice(connectedBleDev.getAddress(), false); - } - } - } - break; - } - return false; - } - }); - - - private BleManager(Context context) { - mContext = CommonUtil.checkNotNull(context); - if (CommonUtil.getMainContext() == null) { - CommonUtil.setMainContext(context); - } - mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); - if (Build.VERSION.SDK_INT >= LOLLIPOP && mBluetoothAdapter != null) { - mBluetoothLeScanner = mBluetoothAdapter.getBluetoothLeScanner(); - } - //mReConnectHelper = new ReConnectHelper(context, this); - registerReceiver(); - } - - public static BleManager getInstance(Context context) { - if (instance == null) { - synchronized (BleManager.class) { - if (instance == null) { - instance = new BleManager(context.getApplicationContext()); - Log.w(TAG, "init BleManager.. " + instance); - } - } - } - return instance; - } - /** - * 获取已连接的BLE设备列表 - * - * @param context 上下文 - * @return 已连接的BLE设备列表 - */ - @SuppressLint("MissingPermission") - public static List getConnectedBleDeviceList(Context context) { - if (context == null ) return null; - //|| !AppUtil.checkHasConnectPermission(context) - BluetoothManager mBluetoothManager = (BluetoothManager) context.getSystemService(Context.BLUETOOTH_SERVICE); - if (mBluetoothManager != null) { - return mBluetoothManager.getConnectedDevices(BluetoothProfile.GATT); - } - return null; - } - - public void destroy() { - Log.w(TAG, ">>>>>>>>>>>>>>destroy >>>>>>>>>>>>>>> "); - unregisterReceiver(); - stopConnectTimeout(); - clearConnectedBleDevices(); - - if (isBleScanning()) stopLeScan(); - isBleScanning(false); - mDiscoveredBleDevices.clear(); - //mReConnectHelper.release(); - - mCallbackManager.release(); - mHandler.removeCallbacksAndMessages(null); - instance = null; - } - - public void registerBleEventCallback(BleEventCallback callback) { - mCallbackManager.registerBleEventCallback(callback); - } - - public void unregisterBleEventCallback(BleEventCallback callback) { - mCallbackManager.unregisterBleEventCallback(callback); - } - - public boolean isBluetoothEnable() { - return mBluetoothAdapter != null && mBluetoothAdapter.isEnabled(); - } - - public boolean isBleScanning() { - return isBleScanning; - } - public void checkPermissionsAndRequest(Context context) { - if (mBluetoothAdapter == null || !mBluetoothAdapter.isEnabled()) { - // 蓝牙未开启,弹窗提示用户开启蓝牙 - new AlertDialog.Builder(context) - .setTitle("蓝牙未开启") - .setMessage("请开启蓝牙以继续使用此功能。") - .setPositiveButton("开启蓝牙", new DialogInterface.OnClickListener() { - @Override - public void onClick(DialogInterface dialog, int which) { - Intent intent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE); - context.startActivity(intent); - } - }) - .setNegativeButton("取消", null) - .show(); - } else if (!isLocationPermissionGranted(context)) { - // 定位权限未授权,弹窗提示用户授权定位权限 - new AlertDialog.Builder(context) - .setTitle("定位权限未授权") - .setMessage("请授权定位权限以继续使用此功能。") - .setPositiveButton("授权定位权限", new DialogInterface.OnClickListener() { - @Override - public void onClick(DialogInterface dialog, int which) { - Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS); - intent.setData(Uri.parse("package:" + context.getPackageName())); - context.startActivity(intent); - } - }) - .setNegativeButton("取消", null) - .show(); - } - } - - /** - * 检查定位权限是否已授权 - */ - private boolean isLocationPermissionGranted(Context context) { - return context.checkSelfPermission(Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED; - } - @SuppressLint("MissingPermission") - public boolean startLeScan(BluetoothDevice deviced) { - deviced1=deviced; - Log.i(TAG, ", deviced = " + deviced); - if (!isBluetoothEnable() || !isLocationPermissionGranted(mContext)) { - checkPermissionsAndRequest(mContext); - return false; - } - if (null == mBluetoothAdapter - // || !AppUtil.checkHasScanPermission(mContext) - ) return false; - Log.i(TAG, ", timeout1 = " + timeout); - if (!isBluetoothEnable() - // || !AppUtil.isHasLocationPermission(mContext) - ) return false; - Log.i(TAG, ", timeout2 = " + timeout); - if (timeout <= 0) timeout = SCAN_BLE_TIMEOUT; - if (isBleScanning) { - Log.i(TAG, "scanning ble ....."); - if (mBluetoothLeScanner != null) { - mBluetoothLeScanner.flushPendingScanResults(mScanCallback); - } - mDiscoveredBleDevices.clear(); - mHandler.removeMessages(MSG_SCAN_BLE_TIMEOUT); - mHandler.sendEmptyMessageDelayed(MSG_SCAN_BLE_TIMEOUT, timeout); - syncSystemBleDevice(); - return true; - } - boolean ret; - if (Build.VERSION.SDK_INT >= LOLLIPOP && mBluetoothLeScanner != null) { - ScanSettings scanSettings; - int scanMode = ScanSettings.SCAN_MODE_BALANCED; //修改搜索BLE模式 -- 均衡模式 - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { - scanSettings = new ScanSettings.Builder() - .setScanMode(scanMode) - .setMatchMode(ScanSettings.MATCH_MODE_AGGRESSIVE) - .build(); - } else { - scanSettings = new ScanSettings.Builder() - .setScanMode(scanMode) - .build(); - } - mBluetoothLeScanner.startScan(null, scanSettings, mScanCallback); - ret = true; - } else { - ret = mBluetoothAdapter.startLeScan(mLeScanCallback); - } - Log.i(TAG, "startLeScan : " + ret + ", timeout = " + timeout); - isBleScanning(ret); - if (ret) { - mDiscoveredBleDevices.clear(); - mHandler.removeMessages(MSG_SCAN_BLE_TIMEOUT); - mHandler.sendEmptyMessageDelayed(MSG_SCAN_BLE_TIMEOUT, timeout); - syncSystemBleDevice(); - } - return ret; - } - - @SuppressLint("MissingPermission") - public void stopLeScan() { - if (null == mBluetoothAdapter || !isBluetoothEnable() - // || !AppUtil.checkHasScanPermission(mContext) - ) - return; - if (!isBleScanning()) return; - try { - if (Build.VERSION.SDK_INT >= LOLLIPOP && mBluetoothLeScanner != null) { - mBluetoothLeScanner.stopScan(mScanCallback); - } else { - mBluetoothAdapter.stopLeScan(mLeScanCallback); - } - } catch (Exception e) { - e.printStackTrace(); - } - mHandler.removeMessages(MSG_SCAN_BLE_TIMEOUT); - mHandler.removeMessages(MSG_SCAN_HID_DEVICE); - isBleScanning(false); - } - - public BluetoothDevice getConnectedBtDevice() { - return mUsingDevice; - } - - public BluetoothGatt getConnectedBtGatt(BluetoothDevice device) { - BleDevice bleDevice = getConnectedBle(device); - if (null == bleDevice) return null; - return bleDevice.getGatt(); - } - - public BluetoothDevice getConnectedBLEDevice(String address) { - if (!BluetoothAdapter.checkBluetoothAddress(address)) return null; - List devices = getConnectedDeviceList(); - if (devices.isEmpty()) return null; - for (BluetoothDevice device : devices) { - if (device.getAddress().equals(address)) { - return device; - } - } - return null; - } - - /** - * 获取已连接设备列表 - *

- * 按照连接时间倒序 - *

- * - * @return 设备列表 - */ - public List getConnectedDeviceList() { - if (mConnectedGattMap.isEmpty()) return new ArrayList<>(); - List bleDevices = getSortList(); - List devices = new ArrayList<>(); - for (BleDevice bleDevice : bleDevices) { - if (null == bleDevice || null == bleDevice.getGatt().getDevice()) continue; - devices.add(bleDevice.getGatt().getDevice()); - } - return devices; - } - - public void reconnectDevice(String address, boolean isUseAdv) { - Log.d(TAG, "reconnectDevice : address = " + address + ", isUseAdv = " + isUseAdv); - //boolean ret = mReConnectHelper.putParam(new ReConnectHelper.ReconnectParam(address, isUseAdv)); - //注释掉的 - // Log.d(TAG, "reconnectDevice : ret = " + ret); - } - - // public boolean isMatchReConnectDevice(String address, String matchAddress) { - // return mReConnectHelper.isMatchAddress(address, matchAddress); - // } - - public int getBleMtu(BluetoothDevice device) { - BleDevice bleDevice = getConnectedBle(device); - if (null == bleDevice) return 0; - return bleDevice.getMtu(); - } - - public boolean isConnecting() { - return mConnectingBtDevice != null; - } - - public boolean isConnectingDevice(BluetoothDevice device) { - return BluetoothUtil.deviceEquals(mConnectingBtDevice, device); - } - - public boolean isConnectedDevice(BluetoothDevice device) { - if (null == device) return false; - return isConnectedDevice(device.getAddress()); - } - - public boolean isConnectedDevice(String address) { - if (!BluetoothAdapter.checkBluetoothAddress(address)) return false; - List devices = getConnectedDeviceList(); - if (devices.isEmpty()) return false; - for (BluetoothDevice device : devices) { - if (device.getAddress().equals(address)) { - return true; - } - } - return false; - } - - @SuppressLint("MissingPermission") - public boolean connectBleDevice(BluetoothDevice device) { - if (null == device - // || !AppUtil.checkHasConnectPermission(mContext) - ) return false; - /* if (mUsingDevice != null) { - Log.e(TAG, "BleDevice is connected, please call disconnectBleDevice method at first."); - setReconnectDevAddr(null); - return false; - }*/ - if (mConnectingBtDevice != null) { - Log.e(TAG, "BleDevice is connecting, please wait."); - return isConnectingDevice(device); - } - if (isBleScanning()) { - stopLeScan(); - } - BluetoothGatt gatt = null; - try { - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { - gatt = device.connectGatt( - mContext, - false, - mBluetoothGattCallback, - BluetoothDevice.TRANSPORT_LE - ); - } else { - gatt = device.connectGatt( - mContext, - false, - mBluetoothGattCallback - ); - } - } catch (Exception e) { - e.printStackTrace(); - } - boolean ret = gatt != null; - if (ret) { -// putConnectedGattInMap(device.getAddress(), gatt); - setConnectingBtDevice(device); - handleBleConnection(device, BluetoothProfile.STATE_CONNECTING); - startConnectTimeout(device); - Log.d(TAG, "connect start...." + printDeviceInfo(device)); - } - return ret; - } - - @SuppressLint("MissingPermission") - public void disconnectBleDevice(BluetoothDevice device) { - if (null == device - // || !AppUtil.checkHasConnectPermission(mContext) - ) return; - BleDevice bleDevice = removeConnectedBle(device); - Log.i(TAG, "disconnectBleDevice : " + printDeviceInfo(device) + ", " + bleDevice); - if (bleDevice != null) { - if (BluetoothUtil.isBluetoothEnable()) { - bleDevice.getGatt().disconnect(); -// bleDevice.getGatt().close(); - } - } else { - Log.i(TAG, "disconnectBleDevice : It is not a connected device."); - } - } - - public void writeDataByBleAsync(BluetoothDevice device, UUID serviceUUID, UUID characteristicUUID, byte[] data, OnWriteDataCallback callback) { - addSendTask(device, serviceUUID, characteristicUUID, data, callback); - } - - private void isBleScanning(boolean isScanning) { - isBleScanning = isScanning; - mCallbackManager.onDiscoveryBleChange(isScanning); - if (isBleScanning && configHelper.isHidDevice()) { - mHandler.sendEmptyMessage(MSG_SCAN_HID_DEVICE); - } - } - - private BleDevice getConnectedBle(BluetoothDevice device) { - if (null == device) return null; - return mConnectedGattMap.get(device.getAddress()); - } - - private void putConnectedGattInMap(String address, BluetoothGatt gatt) { - if (!BluetoothAdapter.checkBluetoothAddress(address) || null == gatt) return; - BleDevice bleDevice = new BleDevice(mContext, gatt); - bleDevice.setConnectedTime(System.currentTimeMillis()); - mConnectedGattMap.put(address, bleDevice); - if (mUsingDevice == null) { - mUsingDevice = gatt.getDevice(); - } - - Log.i(TAG, "putConnectedGattInMap >>>>>>>>>>>>> start"); - for (String addr : mConnectedGattMap.keySet()) { - Log.d(TAG, "putConnectedGattInMap >>>>>>>>>>>>> " + addr); - } - Log.i(TAG, "putConnectedGattInMap >>>>>>>>>>>>> end"); - } - - private BleDevice removeConnectedBle(BluetoothDevice device) { - if (null == device) return null; - return removeConnectedBle(device.getAddress()); - } - - private BleDevice removeConnectedBle(String address) { - if (!BluetoothAdapter.checkBluetoothAddress(address)) return null; - BleDevice bleDevice = mConnectedGattMap.remove(address); - if (null != bleDevice) { - bleDevice.stopSendDataThread(); - if (mConnectedGattMap.isEmpty()) { - setConnectedBtDevice(null); - } else if (bleDevice.getGatt().getDevice() != null && BluetoothUtil.deviceEquals(bleDevice.getGatt().getDevice(), - getConnectedBtDevice())) { - List values = getSortList(); - setConnectedBtDevice(values.get(0).getGatt().getDevice()); - } - } - return bleDevice; - } - - @NonNull - private List getSortList() { - if (mConnectedGattMap.isEmpty()) return new ArrayList<>(); - List bleDevices = new ArrayList<>(mConnectedGattMap.values()); - Collections.sort(bleDevices, (o1, o2) -> { - if (null == o1 && null == o2) return 0; - if (null == o1) return 1; - if (null == o2) return -1; - return Long.compare(o2.getConnectedTime(), o1.getConnectedTime()); - }); - return bleDevices; - } - - private void clearConnectedBleDevices() { - // if (!AppUtil.checkHasConnectPermission(mContext)) return; - if (!mConnectedGattMap.isEmpty()) { - Map clone = new HashMap<>(mConnectedGattMap); - for (String key : clone.keySet()) { - BleDevice bleDevice = clone.get(key); - if (null == bleDevice) continue; - bleDevice.getGatt().disconnect(); - bleDevice.getGatt().close(); - } - mConnectedGattMap.clear(); - } - } - - private void setConnectingBtDevice(BluetoothDevice mConnectingBtDevice) { - this.mConnectingBtDevice = mConnectingBtDevice; - } - - private void setConnectedBtDevice(BluetoothDevice mConnectedBtDevice) { - this.mUsingDevice = mConnectedBtDevice; - } - - @SuppressLint("MissingPermission") - private void filterDevice(BluetoothDevice device, int rssi, byte[] scanRecord, - boolean isBleEnableConnect) { - if ( - // AppUtil.checkHasConnectPermission(mContext) && - isBluetoothEnable() && !TextUtils.isEmpty(device.getName()) - && !mDiscoveredBleDevices.contains(device)) { - Log.d(TAG, "notify device : " + printDeviceInfo(device)); - Log.d(TAG, "device.getAddress : " + device.getAddress()); - Log.d(TAG, "deviced1.getAddress() : " + deviced1.getAddress()); - if (deviced1 != null && deviced1.getAddress().equals(device.getAddress())) { - // 匹配成功 - - Log.i(TAG, "filterDevice找到了Voitrans设备"); - - // 直接连接设备 - boolean connected = connectBleDevice(device); - if (connected) { - Log.i(TAG, "成功开始连接设备: ${device.name} (${device.address})"); - } else { - Log.e(TAG, "连接设备失败: ${device.name} (${device.address})"); - } - - mDiscoveredBleDevices.add(device); - handleDiscoveryBle(device, new BleScanInfo().setRawData(scanRecord).setRssi(rssi).setEnableConnect(isBleEnableConnect)); - } - } - } - - private void startConnectTimeout(BluetoothDevice device) { - if (!mHandler.hasMessages(MSG_CONNECT_BLE_TIMEOUT)) { - mHandler.sendMessageDelayed(mHandler.obtainMessage(MSG_CONNECT_BLE_TIMEOUT, device), CONNECT_BLE_TIMEOUT); - } - } - - private void stopConnectTimeout() { - if (mHandler.hasMessages(MSG_CONNECT_BLE_TIMEOUT)) { - mHandler.removeMessages(MSG_CONNECT_BLE_TIMEOUT); - } - } - - private void syncSystemBleDevice() { - List mSysConnectedBleList = getConnectedBleDeviceList(mContext); - if (mSysConnectedBleList != null && !mSysConnectedBleList.isEmpty()) { - for (BluetoothDevice bleDev : mSysConnectedBleList) { - if (!BluetoothUtil.deviceEquals(bleDev, mUsingDevice)) { - if (!mDiscoveredBleDevices.contains(bleDev)) { - mDiscoveredBleDevices.add(bleDev); - handleDiscoveryBle(bleDev, new BleScanInfo().setEnableConnect(true)); - } - } - } - } - } - - private void addSendTask(BluetoothDevice device, UUID serviceUUID, UUID characteristicUUID, - byte[] data, OnWriteDataCallback callback) { - boolean ret = false; - BleDevice bleDevice = getConnectedBle(device); - if (bleDevice != null) { - ret = bleDevice.addSendTask(serviceUUID, characteristicUUID, data, callback); - } - if (!ret && callback != null) { - callback.onBleResult(device, serviceUUID, characteristicUUID, false, data); - } - } - - private void wakeupSendThread(BluetoothGatt gatt, UUID serviceUUID, UUID characteristicUUID, - int status, byte[] data) { - final BleDevice bleDevice = getConnectedBle(gatt.getDevice()); - if (bleDevice != null) { - SendBleDataThread.BleSendTask task = new SendBleDataThread.BleSendTask(gatt, serviceUUID, characteristicUUID, data, null); - task.setStatus(status); - bleDevice.wakeupSendThread(task); - } - } - - private void handleDiscoveryBle(BluetoothDevice device, BleScanInfo bleScanInfo) { - mCallbackManager.onDiscoveryBle(device, bleScanInfo); - } - - private void handleBleConnection(final BluetoothDevice device, final int status) { - if (status == BluetoothProfile.STATE_DISCONNECTED || status == STATE_CONNECTED) { - mHandler.removeMessages(MSG_NOTIFY_BLE_TIMEOUT); - startConnectTime = 0; - } else if (status == BluetoothProfile.STATE_CONNECTING) { - startConnectTime = System.currentTimeMillis(); - } - Log.i(TAG, "handleBleConnection >> device : " + printDeviceInfo(device) + ", status : " + status); - mCallbackManager.onBleConnection(device, status); - } - - /* ---- BroadcastReceiver Handler ---- */ - private void registerReceiver() { - if (mAdapterReceiver == null) { - mAdapterReceiver = new BaseBtAdapterReceiver(); - IntentFilter intentFilter = new IntentFilter(BluetoothAdapter.ACTION_STATE_CHANGED); - intentFilter.addAction(BluetoothDevice.ACTION_ACL_CONNECTED); - intentFilter.addAction(BluetoothDevice.ACTION_ACL_DISCONNECTED); - mContext.registerReceiver(mAdapterReceiver, intentFilter); - } - } - - private void unregisterReceiver() { - if (mAdapterReceiver != null) { - mContext.unregisterReceiver(mAdapterReceiver); - mAdapterReceiver = null; - } - } - - /** - * 用于开启蓝牙BLE设备Notification服务 - * - * @param gatt 被连接的ble Gatt服务对象 - * @param serviceUUID 服务UUID - * @param characteristicUUID characteristic UUID - * @return 结果 true 则等待系统回调BLE服务 - */ - @SuppressLint("MissingPermission") - private boolean enableBLEDeviceNotification(BluetoothGatt gatt, UUID serviceUUID, UUID - characteristicUUID) { - if (null == gatt - // || !AppUtil.checkHasConnectPermission(mContext) - ) { - Log.w(TAG, "Bluetooth gatt is null."); - return false; - } - BluetoothGattService gattService = gatt.getService(serviceUUID); - if (null == gattService) { - Log.w(TAG, "BluetoothGattService is null. uuid = " + serviceUUID); - return false; - } - BluetoothGattCharacteristic characteristic = gattService.getCharacteristic(characteristicUUID); - if (null == characteristic) { - Log.w(TAG, "BluetoothGattCharacteristic is null. uuid = " + characteristicUUID); - return false; - } - boolean bRet = gatt.setCharacteristicNotification(characteristic, true); - if (bRet) { - bRet = false; //重置标识 - List descriptors = characteristic.getDescriptors(); - for (BluetoothGattDescriptor descriptor : descriptors) { - if (!BLE_UUID_NOTIFICATION_DESCRIPTOR.equals(descriptor.getUuid())) - continue; //跳过不相关描述符 - bRet = tryToWriteDescriptor(gatt, descriptor, 0, false); - if (!bRet) { - Log.w(TAG, "tryToWriteDescriptor failed...."); - } else { //正常只有一个描述符,使能即可 - break; - } - } - } else { - Log.w(TAG, "setCharacteristicNotification is failed...."); - } - Log.w(TAG, "enableBLEDeviceNotification ret : " + bRet + ", serviceUUID : " + serviceUUID + ", characteristicUUID : " + characteristicUUID); - return bRet; - } - - @SuppressLint("MissingPermission") - private boolean tryToWriteDescriptor(BluetoothGatt bluetoothGatt, BluetoothGattDescriptor - descriptor, int retryCount, boolean isSkipSetValue) { - // if (!AppUtil.checkHasConnectPermission(mContext)) return false; - boolean ret = isSkipSetValue; - if (!ret) { - ret = descriptor.setValue(BluetoothGattDescriptor.ENABLE_NOTIFICATION_VALUE); - Log.i(TAG, "..descriptor : .setValue ret : " + ret); - if (!ret) { - retryCount++; - if (retryCount >= 3) { - return false; - } else { - Log.i(TAG, "-tryToWriteDescriptor- : retryCount : " + retryCount + ", isSkipSetValue : false"); - SystemClock.sleep(50); - tryToWriteDescriptor(bluetoothGatt, descriptor, retryCount, false); - } - } else { - retryCount = 0; - } - } - if (ret) { - ret = bluetoothGatt.writeDescriptor(descriptor); - Log.i(TAG, "..bluetoothGatt : .writeDescriptor ret : " + ret); - if (!ret) { - retryCount++; - if (retryCount >= 3) { - return false; - } else { - Log.i(TAG, "-tryToWriteDescriptor- 2222 : retryCount : " + retryCount + ", isSkipSetValue : true"); - SystemClock.sleep(50); - tryToWriteDescriptor(bluetoothGatt, descriptor, retryCount, true); - } - } - } - return ret; - } - - - //开始调整BLE协议MTU - @SuppressLint("MissingPermission") - private void startChangeMtu(BluetoothGatt gatt, int mtu) { - if (gatt == null - // || !AppUtil.checkHasConnectPermission(mContext) - ) { - Log.w(TAG, "-startChangeMtu- param is error."); - return; - } - BluetoothDevice device = gatt.getDevice(); - if (device == null) { - Log.w(TAG, "-startChangeMtu- device is null."); - return; - } - if (mHandler.hasMessages(MSG_CHANGE_BLE_MTU_TIMEOUT)) { - Log.w(TAG, "-startChangeMtu- Adjusting the MTU for BLE"); - return; - } - boolean ret = false; - if (mtu > BluetoothConstant.BLE_MTU_MIN) { - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { - ret = gatt.requestMtu(mtu + 3); - } else { - ret = true; - } - } - Log.d(TAG, "-startChangeMtu- ret = " + ret); - if (ret) { //调整成功,开始超时任务 - mHandler.sendMessageDelayed(mHandler.obtainMessage(MSG_CHANGE_BLE_MTU_TIMEOUT, device), CALLBACK_TIMEOUT); - } else { - handleBleConnectedEvent(device); - } - } - - //回收调整MTU的超时任务 - private void stopChangeMtu() { - mHandler.removeMessages(MSG_CHANGE_BLE_MTU_TIMEOUT); - } - - private void handleBleConnectedEvent(final BluetoothDevice device) { - if (device == null) { - Log.e(TAG, "-handleBleConnectedEvent- device is null."); - return; - } - stopChangeMtu(); - BleDevice bleDevice = getConnectedBle(device); - bleDevice.startSendDataThread(); - handleBleConnection(device, STATE_CONNECTED); - } - - private String printDeviceInfo(BluetoothDevice device) { - return BluetoothUtil.printBtDeviceInfo(mContext, device); - } - - private final BluetoothAdapter.LeScanCallback mLeScanCallback = (device, rssi, scanRecord) -> filterDevice(device, rssi, scanRecord, true); - - private final ScanCallback mScanCallback = new ScanCallback() { - @Override - public void onScanResult(int callbackType, ScanResult result) { - if (result != null && result.getScanRecord() != null) { - BluetoothDevice device = result.getDevice(); - boolean isBleEnableConnect = true; - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { - isBleEnableConnect = result.isConnectable(); - } -// Log.i("onScanResult", printDeviceInfo(device)); - filterDevice(device, result.getRssi(), result.getScanRecord().getBytes(), isBleEnableConnect); - } - } - - @Override - public void onBatchScanResults(List results) { - - } - - @Override - public void onScanFailed(int errorCode) { - Log.d(TAG, "onScanFailed : " + errorCode); - stopLeScan(); - } - }; - - private final BluetoothGattCallback mBluetoothGattCallback = new BluetoothGattCallback() { - - public void onConnectionUpdated(BluetoothGatt gatt, int interval, int latency, int timeout, int status) { - if (null == gatt - // || !AppUtil.checkHasConnectPermission(mContext) - ) return; - BluetoothDevice device = gatt.getDevice(); - if (null == device) return; - Log.e(TAG, "onConnectionUpdated >> device : " + printDeviceInfo(device) + ", interval : " - + interval + ", latency : " + latency + ", timeout : " + timeout + ", status : " + status); - mCallbackManager.onConnectionUpdated(device, interval, latency, timeout, status); - } - - @SuppressLint("MissingPermission") - @Override - public void onConnectionStateChange(BluetoothGatt gatt, int status, int newState) { - if (null == gatt - // || !AppUtil.checkHasConnectPermission(mContext) - ) return; - final BluetoothDevice device = gatt.getDevice(); - if (null == device) return; - Log.i(TAG, String.format(Locale.getDefault(), "onConnectionStateChange : device : %s, status = %d, newState = %d.", - printDeviceInfo(device), status, newState)); - if (newState == BluetoothProfile.STATE_DISCONNECTED || newState == BluetoothProfile.STATE_DISCONNECTING - || newState == STATE_CONNECTED) { - stopConnectTimeout(); - setConnectingBtDevice(null); - if (newState == STATE_CONNECTED) { //BLE连接成功 - mRetryConnectCount = 0; - boolean ret = gatt.discoverServices(); - Log.d(TAG, "onConnectionStateChange >> discoverServices : " + ret); - putConnectedGattInMap(device.getAddress(), gatt); -// setConnectedBtDevice(device); - if (ret) { - mHandler.removeMessages(MSG_BLE_DISCOVER_SERVICES_CALLBACK_TIMEOUT); - mHandler.sendMessageDelayed(mHandler.obtainMessage(MSG_BLE_DISCOVER_SERVICES_CALLBACK_TIMEOUT, device), CALLBACK_TIMEOUT); - } else { - disconnectBleDevice(device); - } - return; - } else { - removeConnectedBle(device); - // AppUtil.refreshBleDeviceCache(mContext, gatt); //强制更新缓存 - gatt.close(); - - long usedConnectTime = System.currentTimeMillis() - startConnectTime; //连接已耗费时间 - Log.d(TAG, "onConnectionStateChange >> usedConnectTime = " + usedConnectTime + ", limit time = " + MIN_CONNECT_TIME); - if (status == 133 && usedConnectTime < MIN_CONNECT_TIME) { //Todo: 遇到了异常断开情况, 尝试重连设备 - if (mRetryConnectCount < MAX_RETRY_CONNECT_COUNT) { - mRetryConnectCount++; - connectBleDevice(device); - return; - } else { - mRetryConnectCount = 0; - } - } - } - } - handleBleConnection(device, newState); - } - - @SuppressLint("MissingPermission") - @Override - public void onServicesDiscovered(BluetoothGatt gatt, int status) { - if (null == gatt - // || !AppUtil.checkHasConnectPermission(mContext) - ) return; - BluetoothDevice device = gatt.getDevice(); - if (null == device) return; - mHandler.removeMessages(MSG_BLE_DISCOVER_SERVICES_CALLBACK_TIMEOUT); - mCallbackManager.onBleServiceDiscovery(device, status, gatt.getServices()); - boolean ret = false; - if (status == BluetoothGatt.GATT_SUCCESS) { - // AppUtil.printBleGattServices(mContext, device, gatt, status); - for (BluetoothGattService service : gatt.getServices()) { - if (BLE_UUID_SERVICE.equals(service.getUuid()) && null != service.getCharacteristic(BLE_UUID_WRITE) - && null != service.getCharacteristic(BLE_UUID_NOTIFICATION)) { - Log.i(TAG, "start NotifyCharacteristicRunnable..."); - mNotifyCharacteristicRunnable = new NotifyCharacteristicRunnable(gatt, BLE_UUID_SERVICE, BLE_UUID_NOTIFICATION); - mHandler.post(mNotifyCharacteristicRunnable); - ret = true; - break; - } - } - } - Log.i(TAG, "onServicesDiscovered : " + ret); - if (!ret) { - disconnectBleDevice(device); - } - } - - @SuppressLint("MissingPermission") - @Override - public void onCharacteristicChanged(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic) { - if (null == gatt - // || !AppUtil.checkHasConnectPermission(mContext) - ) return; - BluetoothDevice device = gatt.getDevice(); - if (null == device || null == characteristic) return; - UUID serviceUUID = null; - UUID characteristicUUID = characteristic.getUuid(); - byte[] data = characteristic.getValue(); - BluetoothGattService gattService = characteristic.getService(); - if (gattService != null) { - serviceUUID = gattService.getUuid(); - } - Log.d(TAG, String.format(Locale.getDefault(), "onCharacteristicChanged : deice : %s, serviceUuid = %s, characteristicUuid = %s, \ndata : [%s]", - printDeviceInfo(device), serviceUUID, characteristicUUID, CHexConver.byte2HexStr(data))); - mCallbackManager.onBleDataNotification(device, serviceUUID, characteristicUUID, data); - } - - @SuppressLint("MissingPermission") - @Override - public void onCharacteristicWrite(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic, int status) { - if (null == gatt || null == gatt.getDevice() || null == characteristic - // || !AppUtil.checkHasConnectPermission(mContext) - ) return; - BluetoothDevice device = gatt.getDevice(); - UUID serviceUUID = null; - UUID characteristicUUID = characteristic.getUuid(); - BluetoothGattService gattService = characteristic.getService(); - if (gattService != null) serviceUUID = gattService.getUuid(); - byte[] data = characteristic.getValue(); - Log.d(TAG, String.format(Locale.getDefault(), "onCharacteristicWrite : device : %s, serviceUuid = %s, characteristicUuid = %s, status = %d, \ndata : [%s]", - printDeviceInfo(device), serviceUUID, characteristicUUID, status, CHexConver.byte2HexStr(data))); - wakeupSendThread(gatt, serviceUUID, characteristicUUID, status, data); - mCallbackManager.onBleWriteStatus(device, serviceUUID, characteristicUUID, data, status); - } - - @SuppressLint("MissingPermission") - @Override - public void onDescriptorWrite(BluetoothGatt gatt, BluetoothGattDescriptor descriptor, int status) { - if (null == gatt - // || !AppUtil.checkHasConnectPermission(mContext) - ) return; - BluetoothDevice device = gatt.getDevice(); - if (null == device || null == descriptor) return; - UUID serviceUuid = null; - UUID characteristicUuid = null; - BluetoothGattCharacteristic characteristic = descriptor.getCharacteristic(); - if (null != characteristic) { - characteristicUuid = characteristic.getUuid(); - BluetoothGattService bluetoothGattService = characteristic.getService(); - if (null != bluetoothGattService) { - serviceUuid = bluetoothGattService.getUuid(); - } - } - Log.i(TAG, String.format(Locale.getDefault(), "onDescriptorWrite : device : %s, serviceUuid = %s, characteristicUuid = %s, descriptor = %s, status = %d", - printDeviceInfo(device), serviceUuid, characteristicUuid, descriptor.getUuid(), status)); - mCallbackManager.onBleNotificationStatus(device, serviceUuid, characteristicUuid, status); - if (mNotifyCharacteristicRunnable != null && BluetoothUtil.deviceEquals(device, mNotifyCharacteristicRunnable.getBleDevice()) - && serviceUuid != null && serviceUuid.equals(mNotifyCharacteristicRunnable.getServiceUUID()) - && characteristicUuid != null && characteristicUuid.equals(mNotifyCharacteristicRunnable.getCharacteristicUUID()) - && descriptor.getUuid() != null && descriptor.getUuid().equals(mNotifyCharacteristicRunnable.mDescriptorUUID)) { - if (status == BluetoothGatt.GATT_SUCCESS) { - mNotifyCharacteristicRunnable = null; - // TODO: 2022/6/28 由于部分手机(小米11 Lite)的兼容性问题,MTU不能调整到最大,建议适当减小MTU -// startChangeMtu(gatt, 128); //调整MTU最大为128 - int requestMTU = configHelper.getBleRequestMtu(); - if (requestMTU > 509) { - requestMTU = 509; - } - startChangeMtu(gatt, requestMTU); -// handleBleConnectedEvent(device); - } else { - int num = mNotifyCharacteristicRunnable.getRetryNum(); - if (num < 3) { - mNotifyCharacteristicRunnable.setRetryNum(++num); - mHandler.postDelayed(mNotifyCharacteristicRunnable, 100); - } else { - disconnectBleDevice(device); - } - } - } - } - - @SuppressLint("MissingPermission") - @Override - public void onMtuChanged(BluetoothGatt gatt, int mtu, int status) { - if (null == gatt - // || !AppUtil.checkHasConnectPermission(mContext) - ) return; - BluetoothDevice device = gatt.getDevice(); - if (null == device) return; - Log.d(TAG, String.format(Locale.getDefault(), "onMtuChanged : device : %s, mtu = %d, status = %d", printDeviceInfo(device), mtu, status)); - mCallbackManager.onBleDataBlockChanged(device, mtu, status); - BleDevice bleDevice = getConnectedBle(device); - if (BluetoothGatt.GATT_SUCCESS == status) { - // 需要减去3个字节的数据包头部信息 - int bleMtu = mtu - 3; - if (bleDevice != null && mHandler.hasMessages(MSG_CHANGE_BLE_MTU_TIMEOUT)) { //调整MTU的回调 - stopChangeMtu(); - bleDevice.setMtu(bleMtu); - Log.i(TAG, "-onMtuChanged- handleBleConnectedEvent"); - handleBleConnectedEvent(device); - } - } - } - }; - - private class BaseBtAdapterReceiver extends BroadcastReceiver { - - @Override - public void onReceive(Context context, Intent intent) { - if (intent != null) { - String action = intent.getAction(); - if (action == null) return; - switch (action) { - case BluetoothAdapter.ACTION_STATE_CHANGED: { - int state = intent.getIntExtra(BluetoothAdapter.EXTRA_CONNECTION_STATE, -1); - if (mBluetoothAdapter != null && state == -1) { - state = mBluetoothAdapter.getState(); - } - if (state == BluetoothAdapter.STATE_OFF) { - isBleScanning(false); - mDiscoveredBleDevices.clear(); - mCallbackManager.onDiscoveryBleChange(false); - disconnectBleDevice(getConnectedBtDevice()); - mCallbackManager.onAdapterChange(false); - } else if (state == BluetoothAdapter.STATE_ON) { - mCallbackManager.onAdapterChange(true); - } - break; - } - case BluetoothDevice.ACTION_ACL_CONNECTED: { - BluetoothDevice device = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE); - Log.i(TAG, "BaseBtAdapterReceiver: ACTION_ACL_CONNECTED, device : " - + printDeviceInfo(device)); - break; - } - case BluetoothDevice.ACTION_ACL_DISCONNECTED: { - BluetoothDevice device = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE); - Log.i(TAG, "BaseBtAdapterReceiver: ACTION_ACL_DISCONNECTED, device : " - + printDeviceInfo(device)); - break; - } - - } - } - } - } - - private class NotifyCharacteristicRunnable implements Runnable { - private final BluetoothGatt mGatt; - private final UUID mServiceUUID; - private final UUID mCharacteristicUUID; - public final UUID mDescriptorUUID = BLE_UUID_NOTIFICATION_DESCRIPTOR; - private int retryNum = 0; - - private NotifyCharacteristicRunnable(BluetoothGatt gatt, UUID serviceUUID, UUID characteristicUUID) { - this.mGatt = gatt; - this.mServiceUUID = serviceUUID; - this.mCharacteristicUUID = characteristicUUID; - } - - private void setRetryNum(int retryNum) { - this.retryNum = retryNum; - } - - private int getRetryNum() { - return retryNum; - } - - private BluetoothDevice getBleDevice() { - if (mGatt == null) return null; - return mGatt.getDevice(); - } - - private UUID getServiceUUID() { - return mServiceUUID; - } - - private UUID getCharacteristicUUID() { - return mCharacteristicUUID; - } - - @Override - public void run() { - boolean ret = enableBLEDeviceNotification(mGatt, mServiceUUID, mCharacteristicUUID); - Log.w(TAG, String.format(Locale.getDefault(), "enableBLEDeviceNotification ===> %s, service uuid = %s, characteristic uuid = %s", - ret, mServiceUUID, mCharacteristicUUID)); - if (!ret) { - if (mGatt != null) { - disconnectBleDevice(mGatt.getDevice()); - } - } else { - mHandler.removeMessages(MSG_NOTIFY_BLE_TIMEOUT); - mHandler.sendMessageDelayed(mHandler.obtainMessage(MSG_NOTIFY_BLE_TIMEOUT, mGatt.getDevice()), CALLBACK_TIMEOUT); - } - } - } -} diff --git a/local_plugins/ota/android/src/main/kotlin/com/example/ota/tool/ota/ble/SendBleDataThread.java b/local_plugins/ota/android/src/main/kotlin/com/example/ota/tool/ota/ble/SendBleDataThread.java deleted file mode 100644 index c095bdddd..000000000 --- a/local_plugins/ota/android/src/main/kotlin/com/example/ota/tool/ota/ble/SendBleDataThread.java +++ /dev/null @@ -1,295 +0,0 @@ -package com.jieli.otasdk.tool.ota.ble; - -import android.bluetooth.BluetoothGatt; - -import com.jieli.jl_bt_ota.util.JL_Log; -import com.jieli.otasdk.tool.ota.ble.interfaces.IBleOp; -import com.jieli.otasdk.tool.ota.ble.interfaces.OnThreadStateListener; -import com.jieli.otasdk.tool.ota.ble.interfaces.OnWriteDataCallback; - -import java.util.Arrays; -import java.util.UUID; -import java.util.concurrent.LinkedBlockingQueue; - -/** - * 发送BLE数据线程 - * - * @author zqjasonZhong - * @date 2019/10/8 - */ -public class SendBleDataThread extends Thread { - private final static String TAG = "SendBleDataThread"; - private final LinkedBlockingQueue mQueue = new LinkedBlockingQueue<>(); - private volatile boolean isDataSend = false; - private volatile boolean isThreadWaiting = false; - private volatile boolean isWaitingForCallback = false; - private volatile int retryNum = 0; - private final IBleOp mBleManager; - private final OnThreadStateListener mListener; - - private BleSendTask mCurrentTask; - - public SendBleDataThread(IBleOp manager, OnThreadStateListener listener) { - super(TAG); - mBleManager = manager; - mListener = listener; - } - - public boolean isRunning() { - return isDataSend; - } - - public boolean addSendTask(BluetoothGatt gatt, UUID serviceUUID, UUID characteristicUUID, byte[] data, OnWriteDataCallback callback) { - if (null == mBleManager || null == gatt || null == serviceUUID || null == characteristicUUID || null == data || data.length == 0) { - return false; - } - int mtu = mBleManager.getBleMtu(); - JL_Log.d(TAG, "addSendTask : " + mtu); - int dataLen = data.length; - int blockCount = dataLen / mtu; - boolean ret = false; - for (int i = 0; i < blockCount; i++) { - byte[] mBlockData = new byte[mtu]; - System.arraycopy(data, i * mtu, mBlockData, 0, mBlockData.length); - ret = addSendData(gatt, serviceUUID, characteristicUUID, mBlockData, callback); - } - - if (0 != dataLen % mtu) { - JL_Log.d(TAG, "addSendTask : " + mtu); - byte[] noBlockData = new byte[dataLen % mtu]; - System.arraycopy(data, dataLen - dataLen % mtu, noBlockData, 0, noBlockData.length); - ret = addSendData(gatt, serviceUUID, characteristicUUID, noBlockData, callback); - } - return ret; - } - - public void wakeupSendThread(BleSendTask sendTask) { - if (null == sendTask || mCurrentTask != null && mCurrentTask.equals(sendTask)) { - if (sendTask != null) { - sendTask.setCallback(mCurrentTask.getCallback()); - mCurrentTask = sendTask; - } - synchronized (mQueue) { - if (isThreadWaiting) { - if (isWaitingForCallback) { - mQueue.notifyAll(); - } else { - mQueue.notify(); - } - } else if (isWaitingForCallback) { - mQueue.notify(); - } - } - } - } - - private boolean addSendData(BluetoothGatt gatt, UUID serviceUUID, UUID characteristicUUID, byte[] data, OnWriteDataCallback callback) { - boolean ret = false; - if (isDataSend) { - BleSendTask sendTask = new BleSendTask(gatt, serviceUUID, characteristicUUID, data, callback); - try { - mQueue.put(sendTask); - ret = true; - } catch (InterruptedException e) { - e.printStackTrace(); - } - if (ret && isThreadWaiting && !isWaitingForCallback) { - isThreadWaiting = false; - synchronized (mQueue) { - mQueue.notify(); - } - } - } - return ret; - } - - @Override - public synchronized void start() { - isDataSend = true; - super.start(); - } - - public synchronized void stopThread() { - isDataSend = false; - wakeupSendThread(null); - } - - private void callbackResult(BleSendTask task, boolean result) { - if (task != null && task.getCallback() != null) { - if (task.getBleGatt() == null) return; - task.getCallback().onBleResult(task.getBleGatt().getDevice(), task.getServiceUUID(), - task.getCharacteristicUUID(), result, task.getData()); - } else { - JL_Log.i(TAG, "getCallback is null."); - } - } - - @Override - public void run() { - JL_Log.d(TAG, "send ble data thread is started."); - if (mListener != null) { - mListener.onStart(getId(), getName()); - } - if (mBleManager != null) { - synchronized (mQueue) { - while (isDataSend) { - mCurrentTask = null; - isThreadWaiting = false; - isWaitingForCallback = false; - if (mQueue.isEmpty()) { - isThreadWaiting = true; - JL_Log.d(TAG, "queue is empty, so waiting for data"); - try { - mQueue.wait(); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } else { - mCurrentTask = mQueue.peek(); - if (mCurrentTask != null) { - isWaitingForCallback = mBleManager.writeDataByBle(mCurrentTask.mGatt, mCurrentTask.getServiceUUID(), - mCurrentTask.getCharacteristicUUID(), mCurrentTask.getData()); - if (isWaitingForCallback) { - try { - mQueue.wait(BleManager.SEND_DATA_MAX_TIMEOUT); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } else { - mCurrentTask.setStatus(-1); - } - JL_Log.d(TAG, "data send ret :" + mCurrentTask.getStatus()); - if (mCurrentTask.getStatus() != BluetoothGatt.GATT_SUCCESS) { //发送失败 - retryNum++; - if (retryNum >= 3) { //重发次数超过限制 - callbackResult(mCurrentTask, false); - mQueue.clear(); - } else { - if (mCurrentTask.getStatus() != -1) { - mCurrentTask.setStatus(-1); - try { - sleep(10); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - continue; - } - } else { //发送成功 - callbackResult(mCurrentTask, true); - } - } - retryNum = 0; - if (!mQueue.isEmpty()) mQueue.poll(); - } - } - } - - isWaitingForCallback = false; - isThreadWaiting = false; - mQueue.clear(); - if (mListener != null) { - mListener.onEnd(getId(), getName()); - } - JL_Log.d(TAG, "send ble data thread exit."); - } - } - - - public static class BleSendTask { - private BluetoothGatt mGatt; - private UUID serviceUUID; - private UUID characteristicUUID; - private byte[] data; - private int status = -1; - private OnWriteDataCallback mCallback; - - public BleSendTask(BluetoothGatt gatt, UUID serviceUUID, UUID characteristicUUID, byte[] data, OnWriteDataCallback callback) { - this.mGatt = gatt; - this.serviceUUID = serviceUUID; - this.characteristicUUID = characteristicUUID; - this.data = data; - this.mCallback = callback; - } - - public BluetoothGatt getBleGatt() { - return mGatt; - } - - public void setDevice(BluetoothGatt gatt) { - mGatt = gatt; - } - - public UUID getServiceUUID() { - return serviceUUID; - } - - public void setServiceUUID(UUID serviceUUID) { - this.serviceUUID = serviceUUID; - } - - public UUID getCharacteristicUUID() { - return characteristicUUID; - } - - public void setCharacteristicUUID(UUID characteristicUUID) { - this.characteristicUUID = characteristicUUID; - } - - public byte[] getData() { - return data; - } - - public void setData(byte[] data) { - this.data = data; - } - - public OnWriteDataCallback getCallback() { - return mCallback; - } - - public void setCallback(OnWriteDataCallback callback) { - mCallback = callback; - } - - public int getStatus() { - return status; - } - - public void setStatus(int status) { - this.status = status; - } - - @Override - public String toString() { - return "BleSendTask{" + - "mGatt=" + mGatt + - ", serviceUUID=" + serviceUUID + - ", characteristicUUID=" + characteristicUUID + - ", data=" + Arrays.toString(data) + - ", status=" + status + - ", mCallback=" + mCallback + - '}'; - } - - @Override - public int hashCode() { - if (mGatt != null && serviceUUID != null && characteristicUUID != null) { - return mGatt.hashCode() + serviceUUID.hashCode() + characteristicUUID.hashCode(); - } - return super.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (obj instanceof BleSendTask) { - BleSendTask other = (BleSendTask) obj; - if (mGatt != null && serviceUUID != null && characteristicUUID != null) { - return mGatt.equals(other.getBleGatt()) && serviceUUID.equals(other.getServiceUUID()) - && characteristicUUID.equals(other.getCharacteristicUUID()); - } - } - return false; - } - } -} diff --git a/local_plugins/ota/android/src/main/kotlin/com/example/ota/tool/ota/ble/interfaces/BleEventCallback.java b/local_plugins/ota/android/src/main/kotlin/com/example/ota/tool/ota/ble/interfaces/BleEventCallback.java deleted file mode 100644 index 99569b3b7..000000000 --- a/local_plugins/ota/android/src/main/kotlin/com/example/ota/tool/ota/ble/interfaces/BleEventCallback.java +++ /dev/null @@ -1,68 +0,0 @@ -package com.jieli.otasdk.tool.ota.ble.interfaces; - -import android.bluetooth.BluetoothDevice; -import android.bluetooth.BluetoothGattService; - -import com.jieli.otasdk.tool.ota.ble.model.BleScanInfo; - -import java.util.List; -import java.util.UUID; - -/** - * Ble事件回调抽象类 - * - * @author zqjasonZhong - * @since 2020/7/16 - */ -public abstract class BleEventCallback implements IBleEventCallback { - - @Override - public void onAdapterChange(boolean bEnabled) { - - } - - @Override - public void onDiscoveryBleChange(boolean bStart) { - - } - - @Override - public void onDiscoveryBle(BluetoothDevice device, BleScanInfo bleScanMessage) { - - } - - @Override - public void onBleConnection(BluetoothDevice device, int status) { - - } - - @Override - public void onBleServiceDiscovery(BluetoothDevice device, int status, List services) { - - } - - @Override - public void onBleNotificationStatus(BluetoothDevice device, UUID serviceUuid, UUID characteristicUuid, int status) { - - } - - @Override - public void onBleDataBlockChanged(BluetoothDevice device, int block, int status) { - - } - - @Override - public void onBleDataNotification(BluetoothDevice device, UUID serviceUuid, UUID characteristicsUuid, byte[] data) { - - } - - @Override - public void onBleWriteStatus(BluetoothDevice device, UUID serviceUuid, UUID characteristicsUuid, byte[] data, int status) { - - } - - @Override - public void onConnectionUpdated(BluetoothDevice device, int interval, int latency, int timeout, int status) { - - } -} diff --git a/local_plugins/ota/android/src/main/kotlin/com/example/ota/tool/ota/ble/interfaces/IBleEventCallback.java b/local_plugins/ota/android/src/main/kotlin/com/example/ota/tool/ota/ble/interfaces/IBleEventCallback.java deleted file mode 100644 index b001e61f3..000000000 --- a/local_plugins/ota/android/src/main/kotlin/com/example/ota/tool/ota/ble/interfaces/IBleEventCallback.java +++ /dev/null @@ -1,108 +0,0 @@ -package com.jieli.otasdk.tool.ota.ble.interfaces; - -import android.bluetooth.BluetoothDevice; -import android.bluetooth.BluetoothGattService; - -import com.jieli.otasdk.tool.ota.ble.model.BleScanInfo; - -import java.util.List; -import java.util.UUID; - -/** - * Ble事件回调 - * - * @author zqjasonZhong - * @since 2020/7/16 - */ -public interface IBleEventCallback { - - /** - * 蓝牙适配器开关回调 - * - * @param bEnabled 开关 - */ - void onAdapterChange(boolean bEnabled); - - /** - * 搜索蓝牙设备的状态回调 - * - * @param bStart 搜索状态 - */ - void onDiscoveryBleChange(boolean bStart); - - /** - * 发现蓝牙设备的回调 - * - * @param device 蓝牙设备对象 - * @param bleScanInfo BLE扫描数据 - */ - void onDiscoveryBle(BluetoothDevice device, BleScanInfo bleScanInfo); - - /** - * BLE连接状态回调 - * - * @param device 蓝牙设备对象 - * @param status 连接状态 - */ - void onBleConnection(BluetoothDevice device, int status); - - /** - * BLE服务发现回调 - * - * @param device 蓝牙设备对象 - * @param status 状态 - * @param services 服务列表 - */ - void onBleServiceDiscovery(BluetoothDevice device, int status, List services); - - /** - * BLE特征状态回调 - * - * @param device 蓝牙设备对象 - * @param serviceUuid 服务UUID - * @param characteristicUuid 特征值UUID - * @param status 状态 - */ - void onBleNotificationStatus(BluetoothDevice device, UUID serviceUuid, UUID characteristicUuid, int status); - - /** - * BLE MTU改变回调 - * - * @param device 蓝牙设备对象 - * @param block 协商后的MTU - * @param status 状态 - */ - void onBleDataBlockChanged(BluetoothDevice device, int block, int status); - - /** - * BLE数据回调 - * - * @param device 蓝牙设备对象 - * @param serviceUuid 服务UUID - * @param characteristicsUuid 特征值UUID - * @param data 数据 - */ - void onBleDataNotification(BluetoothDevice device, UUID serviceUuid, UUID characteristicsUuid, byte[] data); - - /** - * BLE 写数据回调 - * - * @param device 蓝牙设备对象 - * @param serviceUuid 服务UUID - * @param characteristicsUuid 特征值UUID - * @param data 数据 - * @param status 状态 - */ - void onBleWriteStatus(BluetoothDevice device, UUID serviceUuid, UUID characteristicsUuid, byte[] data, int status); - - /** - * BLE 连接参数回调 - * - * @param device 蓝牙设备对象 - * @param interval 发数间隔 - * @param latency 延时参数 - * @param timeout 超时时间 - * @param status 状态 - */ - void onConnectionUpdated(BluetoothDevice device, int interval, int latency, int timeout, int status); -} diff --git a/local_plugins/ota/android/src/main/kotlin/com/example/ota/tool/ota/ble/interfaces/IBleOp.java b/local_plugins/ota/android/src/main/kotlin/com/example/ota/tool/ota/ble/interfaces/IBleOp.java deleted file mode 100644 index 212910aba..000000000 --- a/local_plugins/ota/android/src/main/kotlin/com/example/ota/tool/ota/ble/interfaces/IBleOp.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.jieli.otasdk.tool.ota.ble.interfaces; - -import android.bluetooth.BluetoothGatt; - -import java.util.UUID; - -/** - * @author zqjasonZhong - * @since 2020/12/24 - */ -public interface IBleOp { - - int getBleMtu(); - - boolean writeDataByBle(BluetoothGatt gatt, UUID serviceUUID, UUID characteristicUUID, byte[] data); -} diff --git a/local_plugins/ota/android/src/main/kotlin/com/example/ota/tool/ota/ble/interfaces/OnThreadStateListener.java b/local_plugins/ota/android/src/main/kotlin/com/example/ota/tool/ota/ble/interfaces/OnThreadStateListener.java deleted file mode 100644 index 87ba5326a..000000000 --- a/local_plugins/ota/android/src/main/kotlin/com/example/ota/tool/ota/ble/interfaces/OnThreadStateListener.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.jieli.otasdk.tool.ota.ble.interfaces; - -/** - * 线程生命周期监听器 - * - * @author zqjasonZhong - * @date 2019/9/20 - */ -public interface OnThreadStateListener { - - void onStart(long id, String name); - - void onEnd(long id, String name); -} diff --git a/local_plugins/ota/android/src/main/kotlin/com/example/ota/tool/ota/ble/interfaces/OnWriteDataCallback.java b/local_plugins/ota/android/src/main/kotlin/com/example/ota/tool/ota/ble/interfaces/OnWriteDataCallback.java deleted file mode 100644 index 2d0f716b0..000000000 --- a/local_plugins/ota/android/src/main/kotlin/com/example/ota/tool/ota/ble/interfaces/OnWriteDataCallback.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.jieli.otasdk.tool.ota.ble.interfaces; - -import android.bluetooth.BluetoothDevice; - -import java.util.UUID; - -/** - * 写数据的结果回调 - * - * @author zqjasonZhong - * @date 2019/9/25 - */ -public interface OnWriteDataCallback { - - /** - * 回调BLE发送结果 - * - * @param device 蓝牙设备 - * @param serviceUUID 服务UUID - * @param characteristicUUID 特征值UUID - * @param result 发送结果 - * @param data 发送数据 - */ - void onBleResult(BluetoothDevice device, UUID serviceUUID, UUID characteristicUUID, boolean result, byte[] data); -} diff --git a/local_plugins/ota/android/src/main/kotlin/com/example/ota/tool/ota/ble/model/BleDevice.java b/local_plugins/ota/android/src/main/kotlin/com/example/ota/tool/ota/ble/model/BleDevice.java deleted file mode 100644 index 894cb07da..000000000 --- a/local_plugins/ota/android/src/main/kotlin/com/example/ota/tool/ota/ble/model/BleDevice.java +++ /dev/null @@ -1,155 +0,0 @@ -package com.jieli.otasdk.tool.ota.ble.model; - -import android.annotation.SuppressLint; -import android.bluetooth.BluetoothGatt; -import android.bluetooth.BluetoothGattCharacteristic; -import android.bluetooth.BluetoothGattService; -import android.content.Context; - -import androidx.annotation.NonNull; - -import com.jieli.jl_bt_ota.constant.BluetoothConstant; -import com.jieli.jl_bt_ota.util.CHexConver; - -import com.jieli.otasdk.tool.ota.ble.SendBleDataThread; -import com.jieli.otasdk.tool.ota.ble.interfaces.IBleOp; -import com.jieli.otasdk.tool.ota.ble.interfaces.OnThreadStateListener; -import com.jieli.otasdk.tool.ota.ble.interfaces.OnWriteDataCallback; -//import com.jieli.otasdk.util.AppUtil; - -import java.util.UUID; -import android.util.Log; -/** - * @author zqjasonZhong - * @email zhongzhuocheng@zh-jieli.com - * @desc BLE设备 - * @since 2022/12/5 - */ -public class BleDevice { - private final String tag = "BleManager"; - private final Context context; //上下文 - private final BluetoothGatt gatt; //BleGatt控制对象 - private int mtu = BluetoothConstant.BLE_MTU_MIN; //MTU - private long connectedTime; //连接的时间戳 - - private SendBleDataThread sendDataThread; //发送数据线程 - - public BleDevice(@NonNull Context context, @NonNull BluetoothGatt gatt) { - this.context = context; - this.gatt = gatt; - } - - @NonNull - public BluetoothGatt getGatt() { - return gatt; - } - - public int getMtu() { - if (mtu > 128) { - mtu -= 6; - } - return mtu; - } - - public void setMtu(int mtu) { - this.mtu = mtu; - } - - public long getConnectedTime() { - return connectedTime; - } - - public void setConnectedTime(long connectedTime) { - this.connectedTime = connectedTime; - } - - public void startSendDataThread() { - if (sendDataThread == null || !sendDataThread.isRunning()) { - sendDataThread = new SendBleDataThread(new IBleOp() { - @Override - public int getBleMtu() { - return getMtu(); - } - - @Override - public boolean writeDataByBle(BluetoothGatt gatt, UUID serviceUUID, UUID characteristicUUID, byte[] data) { - Log.d(tag, "writeDataByBle " + gatt +"serviceUUID "+ serviceUUID + "characteristicUUID "+ characteristicUUID + data ); - return writeDataToDeviceByBle(gatt, serviceUUID, characteristicUUID, data); - } - }, new OnThreadStateListener() { - @Override - public void onStart(long id, String name) { - - } - - @Override - public void onEnd(long id, String name) { - if (sendDataThread != null && sendDataThread.getId() == id) { - sendDataThread = null; - } - } - }); - sendDataThread.start(); - } - } - - public void stopSendDataThread() { - if (sendDataThread != null) { - sendDataThread.stopThread(); - } - } - - public void wakeupSendThread(SendBleDataThread.BleSendTask task) { - if (sendDataThread != null && task != null && gatt.equals(task.getBleGatt())) { - sendDataThread.wakeupSendThread(task); - } - } - - public boolean addSendTask(UUID serviceUUID, UUID characteristicUUID, byte[] data, OnWriteDataCallback callback) { - boolean ret = false; - if (sendDataThread != null && sendDataThread.isRunning()) { - ret = sendDataThread.addSendTask(gatt, serviceUUID, characteristicUUID, data, callback); - } - return ret; - } - - @SuppressLint("MissingPermission") - private boolean writeDataToDeviceByBle(BluetoothGatt gatt, UUID serviceUUID, UUID characteristicUUID, byte[] data) { - if (gatt == null || null == serviceUUID || null == characteristicUUID || null == data || data.length == 0 - // || !AppUtil.checkHasConnectPermission(this.context) - ) { - Log.d(tag, "writeDataByBle : param is invalid."); - return false; - } - BluetoothGattService gattService = gatt.getService(serviceUUID); - if (null == gattService) { - Log.d(tag, "writeDataByBle : service is null."); - return false; - } - BluetoothGattCharacteristic gattCharacteristic = gattService.getCharacteristic(characteristicUUID); - if (null == gattCharacteristic) { - Log.d(tag, "writeDataByBle : characteristic is null"); - return false; - } - boolean ret = false; - try { - gattCharacteristic.setValue(data); - ret = gatt.writeCharacteristic(gattCharacteristic); - } catch (Exception e) { - e.printStackTrace(); - } - Log.d(tag, "writeDataByBle : send ret : " + ret + ", data = " + CHexConver.byte2HexStr(data)); - return ret; - } - - @Override - public String toString() { - return "BleDevice{" + - "context=" + context + - ", gatt=" + gatt + - ", mtu=" + mtu + - ", connectedTime=" + connectedTime + - ", sendDataThread=" + sendDataThread + - '}'; - } -} diff --git a/local_plugins/ota/android/src/main/kotlin/com/example/ota/tool/ota/ble/model/BleScanInfo.java b/local_plugins/ota/android/src/main/kotlin/com/example/ota/tool/ota/ble/model/BleScanInfo.java deleted file mode 100644 index 863e28594..000000000 --- a/local_plugins/ota/android/src/main/kotlin/com/example/ota/tool/ota/ble/model/BleScanInfo.java +++ /dev/null @@ -1,99 +0,0 @@ -package com.jieli.otasdk.tool.ota.ble.model; - - -import android.os.Parcel; -import android.os.Parcelable; - -import com.jieli.jl_bt_ota.util.CHexConver; - -/** - * BLE 设备扫描信息 - *

- * Created by zqjasonzhong on 2018/10/17. - */ - -public class BleScanInfo implements Parcelable { - /** - * 原始数据 - */ - private byte[] rawData; - /** - * 信号强度 - */ - private int rssi; - /** - * 是否允许连接 - *

说明: 默认允许连接,特殊情况不允许

- */ - private boolean isEnableConnect = true; - - public BleScanInfo() { - - } - - protected BleScanInfo(Parcel in) { - rawData = in.createByteArray(); - rssi = in.readInt(); - isEnableConnect = in.readByte() != 0; - } - - public static final Creator CREATOR = new Creator() { - @Override - public BleScanInfo createFromParcel(Parcel in) { - return new BleScanInfo(in); - } - - @Override - public BleScanInfo[] newArray(int size) { - return new BleScanInfo[size]; - } - }; - - public byte[] getRawData() { - return rawData; - } - - public BleScanInfo setRawData(byte[] rawData) { - this.rawData = rawData; - return this; - } - - public int getRssi() { - return rssi; - } - - public BleScanInfo setRssi(int rssi) { - this.rssi = rssi; - return this; - } - - public boolean isEnableConnect() { - return isEnableConnect; - } - - public BleScanInfo setEnableConnect(boolean enableConnect) { - isEnableConnect = enableConnect; - return this; - } - - @Override - public int describeContents() { - return 0; - } - - @Override - public void writeToParcel(Parcel dest, int flags) { - dest.writeByteArray(rawData); - dest.writeInt(rssi); - dest.writeByte((byte) (isEnableConnect ? 1 : 0)); - } - - @Override - public String toString() { - return "BleScanMessage{" + - "rawData=" + CHexConver.byte2HexStr(rawData) + - ", rssi=" + rssi + - ", isEnableConnect=" + isEnableConnect + - '}'; - } -} diff --git a/local_plugins/ota/ios/.gitignore b/local_plugins/ota/ios/.gitignore deleted file mode 100644 index 034771fc9..000000000 --- a/local_plugins/ota/ios/.gitignore +++ /dev/null @@ -1,38 +0,0 @@ -.idea/ -.vagrant/ -.sconsign.dblite -.svn/ - -.DS_Store -*.swp -profile - -DerivedData/ -build/ -GeneratedPluginRegistrant.h -GeneratedPluginRegistrant.m - -.generated/ - -*.pbxuser -*.mode1v3 -*.mode2v3 -*.perspectivev3 - -!default.pbxuser -!default.mode1v3 -!default.mode2v3 -!default.perspectivev3 - -xcuserdata - -*.moved-aside - -*.pyc -*sync/ -Icon? -.tags* - -/Flutter/Generated.xcconfig -/Flutter/ephemeral/ -/Flutter/flutter_export_environment.sh diff --git a/local_plugins/ota/ios/Assets/.gitkeep b/local_plugins/ota/ios/Assets/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/local_plugins/ota/ios/Classes/BleManager/HandleBroadcastPtl.m b/local_plugins/ota/ios/Classes/BleManager/HandleBroadcastPtl.m deleted file mode 100644 index cc24682d9..000000000 --- a/local_plugins/ota/ios/Classes/BleManager/HandleBroadcastPtl.m +++ /dev/null @@ -1,53 +0,0 @@ -// -// HandleBroadcastPtl.m -// JL_OTA -// -// Created by EzioChan on 2023/1/30. -// Copyright © 2023 Zhuhia Jieli Technology. All rights reserved. -// - -#import "HandleBroadcastPtl.h" - -@interface HandleBroadcastPtl() - -@end - -@implementation HandleBroadcastPtl - -- (instancetype)init -{ - self = [super init]; - if (self) { - _delegates = [NSHashTable hashTableWithOptions:NSPointerFunctionsWeakMemory]; - } - return self; -} - --(NSLock *)delegateLock{ - if (_delegateLock == nil) { - _delegateLock = [NSLock new]; - } - return _delegateLock; -} - --(void)addDelegate:(id)delegate{ - [self.delegateLock lock]; - if (![self.delegates containsObject:delegate]) { - [self.delegates addObject:delegate]; - } - [self.delegateLock unlock]; -} --(void)removeDelegate:(id)delegate{ - [self.delegateLock lock]; - if ([self.delegates containsObject:delegate]) { - [self.delegates removeObject:delegate]; - } - [self.delegateLock unlock]; -} --(void)removeAll{ - [self.delegateLock lock]; - [self.delegates removeAllObjects]; - [self.delegateLock unlock]; -} - -@end diff --git a/local_plugins/ota/ios/Classes/BleManager/JLBleEntity.h b/local_plugins/ota/ios/Classes/BleManager/JLBleEntity.h deleted file mode 100644 index fb237b356..000000000 --- a/local_plugins/ota/ios/Classes/BleManager/JLBleEntity.h +++ /dev/null @@ -1,27 +0,0 @@ -// -// JLBleEntity.h -// JL_OTA -// -// Created by 凌煊峰 on 2021/10/11. -// - -#import -#import - - -NS_ASSUME_NONNULL_BEGIN - -@interface JLBleEntity : NSObject //蓝牙设备模型 - -@property (strong, nonatomic) NSNumber *mRSSI; -@property (strong, nonatomic) CBPeripheral *mPeripheral; -@property (strong, nonatomic) NSString *mName; -@property (strong, nonatomic) NSString *bleMacAddress; -@property (strong, nonatomic) NSString *edrMacAddress; -@property (assign, nonatomic) uint8_t mType; -@property (assign, nonatomic) uint16_t pid; -@property (assign, nonatomic) uint16_t uid; - -@end - -NS_ASSUME_NONNULL_END diff --git a/local_plugins/ota/ios/Classes/BleManager/JLBleEntity.m b/local_plugins/ota/ios/Classes/BleManager/JLBleEntity.m deleted file mode 100644 index 1aaf5a959..000000000 --- a/local_plugins/ota/ios/Classes/BleManager/JLBleEntity.m +++ /dev/null @@ -1,25 +0,0 @@ -// -// JLBleEntity.m -// JL_OTA -// -// Created by 凌煊峰 on 2021/10/11. -// - -#import "JLBleEntity.h" - -@implementation JLBleEntity - -- (nonnull id)copyWithZone:(nullable NSZone *)zone { - JLBleEntity *entity = [[self class] allocWithZone:zone]; - entity.mRSSI = self.mRSSI; - entity.mPeripheral = self.mPeripheral; - entity.mName = self.mName; - entity.bleMacAddress = self.bleMacAddress; - entity.edrMacAddress = self.edrMacAddress; - entity.pid = self.pid; - entity.uid = self.uid; - entity.mType = self.mType; - return entity; -} - -@end diff --git a/local_plugins/ota/ios/Classes/BleManager/JLBleManager.h b/local_plugins/ota/ios/Classes/BleManager/JLBleManager.h deleted file mode 100644 index 381be12ca..000000000 --- a/local_plugins/ota/ios/Classes/BleManager/JLBleManager.h +++ /dev/null @@ -1,122 +0,0 @@ -// -// JLBleManager.h -// JL_OTA -// -// Created by 凌煊峰 on 2021/10/11. -// - -#import -#import -#import -#import -#import "JLBleEntity.h" -#import "HandleBroadcastPtl.h" - -#import -#import -#import -#import - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark - BLE状态通知 -extern NSString *kFLT_BLE_FOUND; //发现设备 -extern NSString *kFLT_BLE_PAIRED; //已配对 -extern NSString *kFLT_BLE_CONNECTED; //已连接 -extern NSString *kFLT_BLE_DISCONNECTED; //断开连接 - - - -@protocol JLBleManagerOtaDelegate - -@required -/** - * ota升级过程状态回调 - */ -- (void)otaProgressWithOtaResult:(JL_OTAResult)result withProgress:(float)progress; - -@end - - -@interface JLBleManager : HandleBroadcastPtl - -@property (assign, nonatomic) CBManagerState mBleManagerState; -@property (strong, nonatomic) CBPeripheral *__nullable mBlePeripheral; - -/// 连接蓝牙是否需要认证配对 -@property (assign, nonatomic) BOOL isPaired; - -/// 配对秘钥(默认为空) -@property (assign, nonatomic) NSData *pairKey; - -/// 连接设备的MTU(单次最大发送数据) -@property (assign, nonatomic) NSInteger bleMtu; - -/// 上一次连接的蓝牙UUID -@property (strong, nonatomic) NSString *lastUUID; - -/// 上一次连接的蓝牙地址 -@property (strong, nonatomic) NSString *__nullable lastBleMacAddress; - -@property (strong, nonatomic) JL_OTAManager *otaManager; - -@property (assign,nonatomic)BOOL isConnected; - -@property (strong, nonatomic) JLBleEntity *__nullable currentEntity; - -@property (nonatomic, copy, nullable) FlutterEventSink flutterEventSink; - -/** - 开始搜索 - */ --(void)startScanBLE:(NSString * _Nullable)address filePath:(NSString * _Nullable)filePath; - -/** - 停止搜索 - */ --(void)stopScanBLE; - -/** - 连接设备 - @param peripheral 蓝牙设备类 - */ --(void)connectBLE:(CBPeripheral*)peripheral; - -/** - 断开连接 - */ --(void)disconnectBLE; - -/** - 使用UUID,重连设备。 -*/ --(void)connectPeripheralWithUUID:(NSString *)uuid; - - -/// HID设备重连 -/// - Parameter uuid: 设备 identifyString --(void)findHid:(NSString *)uuid; - -#pragma mark - 杰理蓝牙库OTA流程相关业务 - -typedef void(^GET_DEVICE_CALLBACK)(BOOL needForcedUpgrade); - -typedef void(^CANCEL_CALLBACK)(uint8_t status); - -/** - * 获取已连接的蓝牙设备信息 - */ -- (void)getDeviceInfo:(GET_DEVICE_CALLBACK _Nonnull)callback; - -/** - * OTA升级 - */ -- (void)otaFuncWithFilePath:(NSString *)otaFilePath; - -- (void)otaFuncCancel:(CANCEL_CALLBACK _Nonnull)result; - -- (void)releaseAllResources; - -@end - -NS_ASSUME_NONNULL_END diff --git a/local_plugins/ota/ios/Classes/BleManager/JLBleManager.m b/local_plugins/ota/ios/Classes/BleManager/JLBleManager.m deleted file mode 100644 index 08cd5b8c5..000000000 --- a/local_plugins/ota/ios/Classes/BleManager/JLBleManager.m +++ /dev/null @@ -1,601 +0,0 @@ -// -// JLBleManager.m -// JL_OTA -// -// Created by 凌煊峰 on 2021/10/11. -// - -#import "JLBleManager.h" - -#define SENDBYSINGLE 0 //1:通过信号检测发送 0:通过直接塞数据发送 - -NSString *kFLT_BLE_FOUND = @"FLT_BLE_FOUND"; //发现设备 -NSString *kFLT_BLE_PAIRED = @"FLT_BLE_PAIRED"; //BLE已配对 -NSString *kFLT_BLE_CONNECTED = @"FLT_BLE_CONNECTED"; //BLE已连接 -NSString *kFLT_BLE_DISCONNECTED = @"FLT_BLE_DISCONNECTED"; //BLE断开连接 - -NSString *FLT_BLE_SERVICE = @"AE00"; //服务号 -NSString *FLT_BLE_RCSP_W = @"AE01"; //命令“写”通道 -NSString *FLT_BLE_RCSP_R = @"AE02"; //命令“读”通道 - - - -@interface JLBleManager() - -@property (strong, nonatomic) CBCentralManager *bleManager; -@property (strong, nonatomic) JLHashHandler *pairHash; -@property (assign, nonatomic) BOOL pairStatus; - -@property (strong, nonatomic) NSMutableArray *blePeripheralArr; -@property (strong, nonatomic) CBPeripheral *bleCurrentPeripheral; -@property (strong, nonatomic) CBService * mService; -@property (strong, nonatomic) CBCharacteristic *mRcspWrite; -@property (strong, nonatomic) CBCharacteristic *mRcspRead; - -@property (strong, nonatomic) NSString *selectedOtaFilePath; -@property (strong, nonatomic) NSString *connectByUUID; - -@property (strong, nonatomic) GET_DEVICE_CALLBACK getCallback; - -@property (strong, nonatomic) NSString *lastAddress; -@property (strong, nonatomic) NSString *lastFilePath; - - -@end - -@implementation JLBleManager - -- (instancetype)init { - self = [super init]; - if (self) { - _isPaired = NO; - _pairStatus = NO; - - _bleManager = [[CBCentralManager alloc] initWithDelegate:self queue:nil]; - - /*--- JLSDK ADD ---*/ - _otaManager = [JL_OTAManager getOTAManager]; - [JL_OTAManager logSDKVersion]; - [JLHashHandler sdkVersion]; - [_otaManager logSendData:false]; - - _otaManager.delegate = self; - - self.pairHash = [[JLHashHandler alloc] init]; - self.pairHash.delegate = self; - - _connectByUUID = nil; - } - return self; -} - -- (void)setIsPaired:(BOOL)isPaired { - _isPaired = isPaired; -} - - -#pragma mark - 扫描设备相关 - -#pragma mark 开始扫描 -- (void)startScanBLE:(NSString * _Nullable)address filePath:(NSString * _Nullable)filePath { - kJLLog(JLLOG_DEBUG, @"BLE ---> startScanBLE."); - self.lastAddress = address; - self.lastFilePath = filePath; - _blePeripheralArr = [NSMutableArray new]; - if (_bleManager) { - if (_bleManager.state == CBManagerStatePoweredOn) { - [_bleManager scanForPeripheralsWithServices:nil options:nil]; - } else { - __weak typeof(self) weakSelf = self; - dispatch_after(0.5, dispatch_get_main_queue(), ^{ - if (weakSelf.bleManager.state == CBManagerStatePoweredOn) { - [weakSelf.bleManager scanForPeripheralsWithServices:nil options:nil]; - } - }); - } - } -} - -#pragma mark 停止扫描 -- (void)stopScanBLE { - if (_bleManager) [_bleManager stopScan]; -} - - - -#pragma mark - 蓝牙设备连接相关 - -#pragma mark 断开当前蓝牙设备连接 -- (void)disconnectBLE { - if (_bleCurrentPeripheral) { - kJLLog(JLLOG_DEBUG, @"BLE --->To disconnectBLE."); - [_bleManager cancelPeripheralConnection:_bleCurrentPeripheral]; - self.isConnected = false; - self.currentEntity = nil; - } -} - -#pragma mark 连接蓝牙设备 - -- (void)connectBLE:(CBPeripheral*)peripheral { - if(_bleCurrentPeripheral){ - [_bleManager cancelPeripheralConnection:_bleCurrentPeripheral]; - } - _bleCurrentPeripheral = peripheral; - [_bleCurrentPeripheral setDelegate:self]; - [_bleManager connectPeripheral:_bleCurrentPeripheral options:@{CBConnectPeripheralOptionNotifyOnDisconnectionKey:@(YES)}]; - [_bleManager stopScan]; - - kJLLog(JLLOG_DEBUG, @"BLE Connecting... Name ---> %@", peripheral.name); -} - -- (void)connectPeripheralWithUUID:(NSString*)uuid { - _connectByUUID = uuid; - [self startScanBLE:self.lastAddress filePath:self.lastFilePath]; -} - --(void)findHid:(NSString *)uuid{ - NSUUID *uuidNs = [[NSUUID alloc] initWithUUIDString:uuid]; - NSArray *array = [self.bleManager retrievePeripheralsWithIdentifiers:@[uuidNs]]; - - for (CBPeripheral *cbp in array) { - if([cbp.identifier.UUIDString isEqualToString:uuid]){ - kJLLog(JLLOG_DEBUG, @"reconnect:%@",cbp); - [self connectBLE:cbp]; - break; - } - } - -} - --(void)connectAction{ - - if(self.connectByUUID == nil) return; - - NSArray *uuidArr = @[[[NSUUID alloc] initWithUUIDString:self.connectByUUID]]; - NSArray *phArr = [_bleManager retrievePeripheralsWithIdentifiers:uuidArr];//serviceUUID就是你首次连接配对的蓝牙 - - if (phArr.count == 0) { - return; - } - - CBPeripheral* peripheral = phArr[0]; - - if (phArr.firstObject && [phArr.firstObject state] != CBPeripheralStateConnected && [phArr.firstObject state] != CBPeripheralStateConnecting) { - - NSString *ble_name = peripheral.name; - NSString *ble_uuid = peripheral.identifier.UUIDString; - kJLLog(JLLOG_DEBUG, @"FLT Connecting(Last)... Name ---> %@ UUID:%@",ble_name,ble_uuid); - - _bleCurrentPeripheral = peripheral; - [_bleCurrentPeripheral setDelegate:self]; - - [_bleManager connectPeripheral:_bleCurrentPeripheral options:@{CBConnectPeripheralOptionNotifyOnDisconnectionKey:@(YES)}]; - _connectByUUID = nil; - } -} - -#pragma mark - CBCentralManagerDelegate - -#pragma mark 蓝牙初始化 Callback -- (void)centralManagerDidUpdateState:(CBCentralManager *)central { - - _mBleManagerState = central.state; - - if (_mBleManagerState != CBManagerStatePoweredOn) { - self.mBlePeripheral = nil; - self.blePeripheralArr = [NSMutableArray array]; - } -} - -#pragma mark 发现设备 -- (void)centralManager:(CBCentralManager *)central didDiscoverPeripheral:(CBPeripheral *)peripheral - advertisementData:(NSDictionary *)advertisementData RSSI:(NSNumber *)RSSI { - - NSString *ble_name = advertisementData[@"kCBAdvDataLocalName"]; - NSData *ble_AD = advertisementData[@"kCBAdvDataManufacturerData"]; - if (ble_name.length == 0) return; - - kJLLog(JLLOG_DEBUG, @"发现 ----> NAME:%@ RSSI:%@ AD:%@", ble_name,RSSI,ble_AD); - - if (ble_AD.length >= 29) { - const uint8_t *bytes = ble_AD.bytes; - NSMutableString *macStr = [NSMutableString string]; - for (int i = 7; i <= 12; i++) { - uint8_t macByte = bytes[i] ^ 0x5A; - [macStr appendFormat:@"%02X", macByte]; - if (i < 12) [macStr appendString:@":"]; - } - [self addPeripheral:peripheral Info:macStr]; - } - - [[NSNotificationCenter defaultCenter] postNotificationName:kFLT_BLE_FOUND object:_blePeripheralArr userInfo:nil]; - - // ota升级过程,回连使用 - if ([JLAdvParse otaBleMacAddress:self.lastBleMacAddress isEqualToCBAdvDataManufacturerData:ble_AD]) { - [self connectBLE:peripheral]; - } -} - -- (void)addPeripheral:(CBPeripheral*)peripheral Info:(NSString*)macStr { - kJLLog(JLLOG_DEBUG, @"BLE addPeripheral ---> Device %@", peripheral.name); - if (self.lastAddress && [macStr isEqualToString:self.lastAddress]) { - [self stopScanBLE]; - [self connectBLE:peripheral]; - } -} - -#pragma mark 设备连接回调 -- (void)centralManager:(CBCentralManager *)central didConnectPeripheral:(CBPeripheral *)peripheral { - kJLLog(JLLOG_DEBUG, @"BLE Connected ---> Device %@", peripheral.name); - for (JLBleEntity *entity in self.blePeripheralArr) { - if([entity.mPeripheral.identifier.UUIDString isEqualToString:peripheral.identifier.UUIDString]){ - self.currentEntity = entity; - break; - } - } - self.isConnected = YES; - - _otaManager.mBLE_NAME = peripheral.name; - _otaManager.mBLE_UUID = peripheral.identifier.UUIDString; - - [DFNotice post:kFLT_BLE_CONNECTED Object:peripheral]; - // 连接成功后,查找服务 - [peripheral discoverServices:nil]; -} - -- (void)centralManager:(CBCentralManager *)central didFailToConnectPeripheral:(CBPeripheral *)peripheral error:(nullable NSError *)error { - kJLLog(JLLOG_DEBUG, @"Err:BLE Connect FAIL ---> Device:%@ Error:%@",peripheral.name,[error description]); -} - -#pragma mark 设备断开连接 -- (void)centralManager:(CBCentralManager *)central didDisconnectPeripheral:(CBPeripheral *)peripheral error:(nullable NSError *)error { - kJLLog(JLLOG_DEBUG, @"BLE Disconnect ---> Device %@ error:%d", peripheral.name, (int)error.code); - - [_otaManager noteEntityDisconnected]; - self.isConnected = NO; - self.pairStatus = NO; - /*--- UI刷新,设备断开 ---*/ - [[NSNotificationCenter defaultCenter] postNotificationName:kFLT_BLE_DISCONNECTED object:peripheral]; -} - -#pragma mark - CBPeripheralDelegate - -#pragma mark 设备服务回调 -- (void)peripheral:(CBPeripheral *)peripheral didDiscoverServices:(nullable NSError *)error { - if (error) { kJLLog(JLLOG_DEBUG, @"Err: Discovered services fail."); return; } - _mBlePeripheral = peripheral; - for (CBService *service in peripheral.services) { - //如果我们知道要查询的特性的CBUUID,可以在参数一中传入CBUUID数组。 - //if ([service.UUID.UUIDString isEqual:FLT_BLE_SERVICE]) { - kJLLog(JLLOG_DEBUG, @"BLE Service ---> %@", service.UUID.UUIDString); - [peripheral discoverCharacteristics:nil forService:service]; - //break; - //} - } -} - -#pragma mark 设备特征回调 -- (void)peripheral:(CBPeripheral *)peripheral didDiscoverCharacteristicsForService:(CBService *)service error:(nullable NSError *)error { - if (error) { kJLLog(JLLOG_DEBUG, @"Err: Discovered Characteristics fail."); return; } - - if ([service.UUID.UUIDString isEqual:FLT_BLE_SERVICE]) { - - for (CBCharacteristic *character in service.characteristics) { - /*--- RCSP ---*/ - if ([character.UUID.UUIDString isEqual:FLT_BLE_RCSP_W]) { - kJLLog(JLLOG_DEBUG, @"BLE Get Rcsp(Write) Channel ---> %@",character.UUID.UUIDString); - self.mRcspWrite = character; - } - - if ([character.UUID.UUIDString isEqual:FLT_BLE_RCSP_R]) { - kJLLog(JLLOG_DEBUG, @"BLE Get Rcsp(Read) Channel ---> %@",character.UUID.UUIDString); - self.mRcspRead = character; - [peripheral setNotifyValue:YES forCharacteristic:character]; - - if(self.mRcspRead.properties == CBCharacteristicPropertyRead){ - [peripheral readValueForCharacteristic:character]; - kJLLog(JLLOG_DEBUG, @"BLE Rcsp(Read) Read Value For Characteristic."); - } - } - } - } -} - -#pragma mark 更新通知特征的状态 -- (void)peripheral:(CBPeripheral *)peripheral didUpdateNotificationStateForCharacteristic:(nonnull CBCharacteristic *)characteristic error:(nullable NSError *)error { - - if (error) { kJLLog(JLLOG_DEBUG, @"Err: Update NotificationState For Characteristic fail."); return; } - - if ([characteristic.service.UUID.UUIDString isEqual:FLT_BLE_SERVICE] && - [characteristic.UUID.UUIDString isEqual:FLT_BLE_RCSP_R] && - characteristic.isNotifying == YES) - { - - __weak typeof(self) weakSelf = self; - self.bleMtu = [peripheral maximumWriteValueLengthForType:CBCharacteristicWriteWithoutResponse]; - kJLLog(JLLOG_DEBUG, @"BLE ---> MTU:%lu",(unsigned long)self.bleMtu); - if (self.isPaired == YES) { - [_pairHash hashResetPair]; - dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ - //设备认证 - [self->_pairHash bluetoothPairingKey:self.pairKey Result:^(BOOL ret) { - if(ret){ - weakSelf.lastUUID = peripheral.identifier.UUIDString; - weakSelf.lastBleMacAddress = nil; - [self postBlePairedNotificationWithPeripheral:peripheral]; - [weakSelf.otaManager noteEntityConnected]; - weakSelf.pairStatus = YES; - }else{ - kJLLog(JLLOG_DEBUG, @"JL_Assist Err: bluetooth pairing fail."); - [weakSelf.bleManager cancelPeripheralConnection:peripheral]; - } - }]; - }); - }else{ - self.lastUUID = peripheral.identifier.UUIDString; - self.lastBleMacAddress = nil; - [self postBlePairedNotificationWithPeripheral:peripheral]; - [self.otaManager noteEntityConnected]; - } - } - self.isConnected = YES; -} - -- (void)postBlePairedNotificationWithPeripheral:(CBPeripheral *)peripheral { - [[NSNotificationCenter defaultCenter] postNotificationName:kFLT_BLE_PAIRED object:peripheral]; - dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ - [self getDeviceInfo:^(BOOL needForcedUpgrade) { - kJLLog(JLLOG_DEBUG, @"getDeviceInfo:%d",__LINE__); - if (needForcedUpgrade) { - kJLLog(JLLOG_DEBUG, @"设备需要强制升级,请到升级界面选择ota升级文件进行升级!"); - } - [self otaFuncWithFilePath:self.lastFilePath]; - }]; - }); -} - -#pragma mark 设备返回的数据 GET -- (void)peripheral:(CBPeripheral *)peripheral didUpdateValueForCharacteristic:(CBCharacteristic *)characteristic error:(NSError *)error { - if (error) { kJLLog(JLLOG_DEBUG, @"Err: receive data fail."); return; } - - if(_isPaired == YES && _pairStatus == NO){ - //收到设备的认证交互数据 - [_pairHash inputPairData:characteristic.value]; - }else{ - //收到的设备数据,正常通讯数据 - [_otaManager cmdOtaDataReceive:characteristic.value]; - } - -} - -- (void)peripheralIsReadyToSendWriteWithoutResponse:(CBPeripheral *)peripheral{ - -} - - -#pragma mark - 杰理蓝牙库OTA流程相关业务 - -/** - * 获取已连接的蓝牙设备信息,这里如果上次设备升级没有成功,会要求执行otaFuncWithFilePath:强制升级 - */ -- (void)getDeviceInfo:(GET_DEVICE_CALLBACK _Nonnull)callback { - /*--- 获取设备信息 ---*/ - _getCallback = callback; - [_otaManager cmdTargetFeature]; -} - -/** - * ota升级 - * @param otaFilePath ota升级文件路径 - */ -- (void)otaFuncWithFilePath:(NSString *)otaFilePath { - kJLLog(JLLOG_DEBUG, @"current otaFilePath ---> %@", otaFilePath); - if (self.flutterEventSink) { - self.flutterEventSink(@{ - @"event": @"onStartOTA", - @"type": @0, - @"progress": @0.0, - @"code": @8, - @"message": @"开始升级" - }); - } - self.selectedOtaFilePath = otaFilePath; - NSData *otaData = [[NSData alloc] initWithContentsOfFile:otaFilePath]; - - [_otaManager cmdOTAData:otaData Result:^(JL_OTAResult result, float progress) { - for (id objc in self.delegates) { - if([objc respondsToSelector:@selector(otaProgressWithOtaResult:withProgress:)]){ - [objc otaProgressWithOtaResult:result withProgress:progress]; - } - } - - }]; -} - -- (void)otaFuncCancel:(CANCEL_CALLBACK _Nonnull)result{ - - [_otaManager cmdOTACancelResult:^(uint8_t status, uint8_t sn, NSData * _Nullable data) { - result(status); - }]; -} - - - -//MARK: - ota manager delegate callback --(void)otaCancel{ - //TODO: 取消OTA升级回调 -} --(void)otaUpgradeResult:(JL_OTAResult)result Progress:(float)progress{ - //TODO: 设备升级过程回调,包括进度状态 - kJLLog(JLLOG_DEBUG, @"otaUpgradeResult ---> %u", result); - if (result == JL_OTAResultPreparing) { - if (self.flutterEventSink) { - self.flutterEventSink(@{ - @"event": @"onProgress", - @"type": @0, - @"progress": @(progress * 100), - @"code": @(result), - @"message": @"开始升级" - }); - } - } else if (result == JL_OTAResultUpgrading) { - if (self.flutterEventSink) { - self.flutterEventSink(@{ - @"event": @"onProgress", - @"type": @1, - @"progress": @(progress * 100), - @"code": @(result), - @"message": @"开始升级" - }); - } - } else if (result == JL_OTAResultPrepared) { - - } else if (result == JL_OTAResultReconnect) { - - } else if (result == JL_OTAResultReconnectWithMacAddr) { - - } else if (result == JL_OTAResultSuccess) { - if (self.flutterEventSink) { - self.flutterEventSink(@{ - @"event": @"onStopOTA", - @"type": @0, - @"progress": @0.0, - @"code": @(result), - @"message": @"升级成功" - }); - } - } else if (result == JL_OTAResultReboot) { - - } else if (result == JL_OTAResultDisconnect) { - - } else { - if (self.flutterEventSink) { - self.flutterEventSink(@{ - @"event": @"onError", - @"type": @0, - @"progress": @0.0, - @"code": @(result), - @"message": @"升级失败" - }); - } - } -} - --(void)otaDataSend:(NSData *)data{ - [self writeDataByCbp:data]; -} - --(void)otaFeatureResult:(JL_OTAManager *)manager{ - - kJLLog(JLLOG_DEBUG, @"getDeviceInfo:%d",__LINE__); - if (manager.otaStatus == JL_OtaStatusForce) { - kJLLog(JLLOG_DEBUG, @"---> 进入强制升级."); - if (self.selectedOtaFilePath) { - [self otaFuncWithFilePath:self.selectedOtaFilePath]; - } else { - _getCallback(true); - } - return; - } else { - if (manager.otaHeadset == JL_OtaHeadsetYES) { - kJLLog(JLLOG_DEBUG, @"---> 进入强制升级: OTA另一只耳机."); - if (self.selectedOtaFilePath) { - [self otaFuncWithFilePath:self.selectedOtaFilePath]; - } else { - _getCallback(true); - } - return; - } - } - kJLLog(JLLOG_DEBUG, @"---> 设备正常使用..."); - dispatch_async(dispatch_get_main_queue(), ^{ - /*--- 获取公共信息 ---*/ - [self->_otaManager cmdSystemFunction]; - self->_getCallback(false); - }); - -} - -//MARK: - Hash pair delegate callback - --(void)hashOnPairOutputData:(NSData *)data{ - [self writeDataByCbp:data]; -} - - -//MARK: - data send manager - -/// 需要分包发送 -/// - Parameter data: 数据 --(void)writeDataByCbp:(NSData *)data{ - // kJLLog(JLLOG_DEBUG, @"%s:data:%@",__func__,data); - if (_mBlePeripheral && self.mRcspWrite) { - if (data.length > 0 ) { - NSInteger len = data.length; - while (len>0) { - if (len <= _bleMtu) { - NSData *mtuData = [data subdataWithRange:NSMakeRange(0, data.length)]; - [self selectSendAction:mtuData]; - len -= data.length; - }else{ - NSData *mtuData = [data subdataWithRange:NSMakeRange(0, _bleMtu)]; - [self selectSendAction:mtuData]; - len -= _bleMtu; - data = [data subdataWithRange:NSMakeRange(_bleMtu, len)]; - } - } - } - }else{ - //需要先赋值写特征的内容 - kJLLog(JLLOG_DEBUG, @"need to init"); - } -} - --(void)selectSendAction:(NSData *)data{ - [_mBlePeripheral writeValue:data - forCharacteristic:self.mRcspWrite - type:CBCharacteristicWriteWithoutResponse]; -} - - -//MARK: - 通过信号阀发送 -- (void)singleDidSendData:(NSData *)data{ - [_mBlePeripheral writeValue:data - forCharacteristic:self.mRcspWrite - type:CBCharacteristicWriteWithoutResponse]; -} - -- (void)releaseAllResources { - // 停止扫描 - [self stopScanBLE]; - // 断开蓝牙连接 - [self disconnectBLE]; - // 释放 delegate - self.bleManager.delegate = nil; - self.pairHash.delegate = nil; - self.otaManager.delegate = nil; - // 清空 eventSink - self.flutterEventSink = nil; - // 清空回调 - self.getCallback = nil; - // 清空当前设备和属性 - self.bleCurrentPeripheral = nil; - self.mService = nil; - self.mRcspWrite = nil; - self.mRcspRead = nil; - self.currentEntity = nil; - self.blePeripheralArr = nil; - self.selectedOtaFilePath = nil; - self.connectByUUID = nil; - self.lastAddress = nil; - self.lastFilePath = nil; -} - - -@end - - - - - diff --git a/local_plugins/ota/ios/Classes/OtaPlugin.swift b/local_plugins/ota/ios/Classes/OtaPlugin.swift deleted file mode 100644 index d9b9f31fd..000000000 --- a/local_plugins/ota/ios/Classes/OtaPlugin.swift +++ /dev/null @@ -1,60 +0,0 @@ -import Flutter - -public class OtaPlugin: NSObject, FlutterPlugin, FlutterStreamHandler { - var userManager: JLBleManager? - var eventSink: FlutterEventSink? - - public static func register(with registrar: FlutterPluginRegistrar) { - let channel = FlutterMethodChannel(name: "ota", binaryMessenger: registrar.messenger()) - let eventChannel = FlutterEventChannel(name: "com.example.ota/events", binaryMessenger: registrar.messenger()) - let instance = OtaPlugin() - registrar.addMethodCallDelegate(instance, channel: channel) - eventChannel.setStreamHandler(instance) - } - - public func handle(_ call: FlutterMethodCall, result: @escaping FlutterResult) { - let arguments = call.arguments as? [String: Any] - - switch call.method { - case "init": - userManager = JLBleManager.init() - result("") - case "startUpgrading": - let address = arguments?["address"] as? String - let filePath = arguments?["filePath"] as? String - startUpgrading(address: address, filePath: filePath) - result("") - case "onOtaClose": - onOtaClose() - result("") - default: - result(FlutterMethodNotImplemented) - } - } - - public func onListen(withArguments arguments: Any?, eventSink events: @escaping FlutterEventSink) -> FlutterError? { - eventSink = events - return nil - } - - public func onCancel(withArguments arguments: Any?) -> FlutterError? { - eventSink = nil - userManager?.flutterEventSink = nil - return nil - } - - private func startUpgrading(address: String?, filePath: String?) { - if userManager?.mBleManagerState == CBManagerState.poweredOn { - userManager?.flutterEventSink = eventSink - userManager?.startScanBLE(address, filePath: filePath) - DispatchQueue.main.asyncAfter(deadline: .now() + 10.0) { - self.userManager?.stopScanBLE() - } - } - } - - private func onOtaClose() { - userManager?.releaseAllResources() - userManager = nil - } -} diff --git a/local_plugins/ota/ios/Frameworks/DFUnits.framework/DFUnits b/local_plugins/ota/ios/Frameworks/DFUnits.framework/DFUnits deleted file mode 100644 index 3d5728688..000000000 Binary files a/local_plugins/ota/ios/Frameworks/DFUnits.framework/DFUnits and /dev/null differ diff --git a/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/AESx.h b/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/AESx.h deleted file mode 100644 index cf4ea85e0..000000000 --- a/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/AESx.h +++ /dev/null @@ -1,28 +0,0 @@ -// -// AES_DF.h -// WifiAudio -// -// Created by zhjl on 15-5-29. -// Copyright (c) 2015年 ZH-jl. All rights reserved. -// - -#import - -@interface AESx : NSObject - -+(id)shared; - --(unsigned int)Dcs_EnCodeSrc:(char *)src - Des:(char *)des - Lenghts:(unsigned int)lengths - Key:(char *)key; - --(void)Dcs_DeCodeSrc:(char *)src - Des:(char *)des - Lengths:(unsigned int)lengths - Key:(char *)key; - --(unsigned int)ns_crc32Buffer:(const unsigned char *)buffer - Lenght:(unsigned int)len; - -@end diff --git a/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/DFAction.h b/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/DFAction.h deleted file mode 100644 index 65896656c..000000000 --- a/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/DFAction.h +++ /dev/null @@ -1,82 +0,0 @@ -// -// DFAction.h -// DFUnits -// -// Created by DFung on 16/1/25. -// Copyright © 2016年 DFung. All rights reserved. -// - -#import - - - -typedef void(^Action)(void); - -@interface DFAction : NSObject - -/** - * @how:Execution block on Asynchronous thread. - */ -+(void)subTask:(Action)block; - -/** - * @how:Execution block on Synchronization thread. - */ -+(void)mainTask:(Action)block; - -/** - * @how:Execution some blocks asynchronousily and make a summary. - * @tasks block Array - * @block final block - */ -+(void)subTasks:(NSArray*)tasks Final:(Action)block; - -/** - * @how:Execution block after a few seconds. - * @param sec Delay time - * @param block Code block - */ -+(void)delay:(double)sec Task:(Action)block; - -/** - * @how:Execution block only once. - * @param block Code block - */ -+(void)taskOnce:(Action)block; - -/** - * @how:Execution block N times. - * @param block Code block - * @param times N - */ -+(void)task:(Action)block Times:(int)times; - -/** - * 设置执行代码的最小时间间隔gap。 - * 返回 YES:大于gap,建议继续执行。 - * 返回 NO: 小于gap,建议代码return。 - */ -+(BOOL)setMinExecutionGap:(NSTimeInterval)gap; - -/** - * @how:定时处理. - * @return NSTimer - */ -+(NSTimer*)timingStart:(SEL)sel target:(id)objc Time:(NSTimeInterval)sec; - -/** - * @how:暂停定时处理. - * @return NSTimer - */ -+(void)timingPause:(__weak NSTimer*)timer; -/** - * @how:继续定时处理. - * @return NSTimer - */ -+(void)timingContinue:(__weak NSTimer*)timer; -/** - * @how:摧毁定时处理功能. - */ -+(void)timingStop:(__weak NSTimer*)timer; - -@end diff --git a/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/DFAudio.h b/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/DFAudio.h deleted file mode 100644 index 30715d52d..000000000 --- a/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/DFAudio.h +++ /dev/null @@ -1,173 +0,0 @@ -// -// DFAudio.h -// DFUnits -// -// Created by DFung on 16/1/22. -// Copyright © 2016年 DFung. All rights reserved. -// - - -/** - * 科普: 数据量(字节/秒)= (采样频率(Hz) * 采样位数(bit) * 声道数) / 8 - */ - -#import -#import -#import -#import - -#include -#include - -/** - * 【DFAudio】状态回调 - */ -#define kDFAudio_ST @"NOTE_DFAUDIO_ST" - -/** - * 【DFAudio】播放进度(时间) - */ -#define kDFAudio_PG @"NOTE_DFAUDIO_PG" - -/** - * 【DFAudio】录音数据 - */ -#define kDFAudio_REC @"NOTE_DFAUDIO_REC" - -typedef enum : NSUInteger { - DFAudio_ST_STOP, //停止状态 - DFAudio_ST_PLAYING, //播放状态 - DFAudio_ST_PENDING, //等待状态 - DFAudio_ST_RECORDING, //录音状态 -} DFAudio_ST; - -struct DF_Data -{ - int size; - unsigned char *data; -}; - -@class DFAudioFormat; -@interface DFAudio : NSObject - -#pragma mark 播放 -/** - * 用途:初始化【Player】 - * @param size 缓存大小 - * @param format (默认 采样率=8000,采样位数=16,声道数=1) - */ --(void)setPlayerBufferSize:(int32_t)size - Format:(DFAudioFormat*)format; -/** - * 用途:输入音频数据。 - * @param data 音频数据 - */ --(void)didPlayerInputBuffer:(NSData*)data; - -/** - PCM缓存可用空间。 - - @return 大小 - */ --(uint32_t)didRingUsable; - -/** - * 用途:运行【Player】 - */ --(void)didPlayerStart; - -/** - * 用途:停止【Player】 - */ --(void)didPlayerStop; - -/** - * 用途:关闭并释放【Player】 - */ --(void)didPlayerRelease; - - -#pragma mark 录音 -/** - * 用途:初始化【Recorder】 - * @param format (默认 采样率=8000,采样位数=16,声道数=1) - * @tips 用【kDFAudio_REC】通知回调录音数据。 - */ --(void)setRecorderFormat:(DFAudioFormat*)format; - -/** - * 用途:运行【Recorder】 - */ --(void)didRecorderStart; - -/** - * 用途:停止【Recorder】 - */ --(void)didRecorderStop; - -/** - * 用途:完成【Recorder】 - */ --(void)didRecorderFinished; - -/** - * 用途:关闭并释放【Recorder】 - */ --(void)didRecorderRelease; - - - -#pragma mark PCM <-> WAV 互转 -/** - * 用途:wav转换成pcm - */ -+(NSString*)wavToPcm:(NSString*)wavPath; - -/** - * 用途:pcm转换成Wav - */ -+(NSString*)pcmToWav:(NSString*)pcmPath Format:(DFAudioFormat*)format; - -#pragma mark 设置PCM参数 -+(void)setPcmFormat:(DFAudioFormat *)format; - -#pragma mark 检测PCM数据 音量分贝 -+(double)checkPcmDB:(NSData*)pcmData; - - -#pragma mark super vad -/** - * return - * --> 0 : vad prepare. - * --> 1 : vad start. - * --> 2 : vad end. - */ -+(int)vadPcm:(NSData*)pcm MinDB:(float)db; - -#pragma mark super vad + path -/** - * return - * --> 0 : vad prepare. - * --> 1 : vad start. - * --> 2 : vad end. (此时path为断句路径) - */ -+(int)vadPcm:(NSData*)pcm MinDB:(float)db Path:(NSString*)path; - -/** - * clean vad cache - */ -+(void)vadClean; - -@end - - -@interface DFAudioFormat : NSObject -@property(nonatomic,assign)Float64 mSampleRate; -@property(nonatomic,assign)UInt32 mBitsPerChannel; -@property(nonatomic,assign)UInt32 mChannelsPerFrame; -@property(nonatomic,assign)AudioFormatID mFormatID; - -@end - - - diff --git a/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/DFCircleTextView.h b/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/DFCircleTextView.h deleted file mode 100644 index 630bfab4b..000000000 --- a/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/DFCircleTextView.h +++ /dev/null @@ -1,123 +0,0 @@ -// -// DFCircleTextView.h -// -// Created by DFung on 2017/6/15. -// Copyright © 2017年 DFung All rights reserved. -// - -#import - -typedef enum { - DFCircleTextAlignOutside, - DFCircleTextAlignCenter, - DFCircleTextAlignInside -} DFCircleTextAlignment; - -@interface DFCircleTextView : UIView - - -/** - * Set the text to display in the DFCircleTextView - */ -@property (strong, nonatomic) NSString *text; - -/** - * Set the Text Attributes for the text. - * Refer to the Text Attributes documentation for more info. - */ -@property (strong, nonatomic) NSDictionary *textAttributes; - -/** - * Align the text left, right or center reletive to the baseAngle. - */ -@property (nonatomic) NSTextAlignment textAlignment; - -/** - * Align the text inside, outside or centered on the circle. - */ -@property (nonatomic) DFCircleTextAlignment circleTextAlignment; - -/** - * Set the radius of the circle. - * When no radius is set, the maximum radius is calculated and used. - */ -@property (nonatomic) float radius; - -/** - * Set the base angle. See textAlignment property for more information. - */ -@property (nonatomic) float baseAngle; - -/** - * Adjust the spacing of the characters. - * 1 = default spacing, 0.5 = half spacing, 2 = double spacing, etc ... - */ -@property (nonatomic) float characterSpacing; - - -/** - * Disable the kerning cache. - */ -@property (nonatomic) BOOL disableKerningCache; - -/** - * Clear the kerning cache. - * Note that this is automaticlly done when the app gives a memory warning. - */ -- (void)clearKerningCache; - -/** - * Convenience function for quickly changing the textColor - * without the need of creating an NSDictionary *textAttributes - */ -- (void) setColor:(UIColor *)color; - -/** - * text display from right side. - */ --(void)showFromRight; - -/** - * text display from left side. - */ --(void)showFromLeft; - -/** - * text display from outside. - */ --(void)showFromOutside; - -/** - * text display from inside. - */ --(void)showFromInside; - -/** - * text display from bothside. - */ --(void)showFromBothSide; - -/** - * text display from center. - */ --(void)showFromCenter; - -/** - * text will rotate. - */ --(void)showRotateWise:(BOOL)wise; - - - - - - - - - - - - - - -@end diff --git a/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/DFContacts.h b/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/DFContacts.h deleted file mode 100644 index 923be3884..000000000 --- a/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/DFContacts.h +++ /dev/null @@ -1,39 +0,0 @@ -// -// DFContacts.h -// DFUnits -// -// Created by DFung on 2018/4/19. -// Copyright © 2018年 DFung. All rights reserved. -// - -#import -//#define JL_CONTACTS_ENABLE - -#ifdef JL_CONTACTS_ENABLE -#import - -@interface DFContacts : NSObject -/** - * keys: @[CNContactPhoneNumbersKey, 手机号 - * CNContactFamilyNameKey, 姓氏 - * CNContactGivenNameKey 名字 - * ...,nil ]; @see 内有详情。 - * 选择需要的信息。 - * - * contacts:返回NSArray。 - * flag:0=成功,-1=用户拒绝,-2=需在设置界面开启通讯录,-3=参数有误; - */ -+(void)scanContactsWithKeys:(NSArray*)keys - Result:(void(^)(NSArray*contacts, - int flag))result; - -/** - * 简单解析 contacts - * {@"FamilyName":@"...", - * @"GivenName":@"...", - * @"Phones":@[@"iphone":@"110",@"home":@"456",...]} - */ -+(NSDictionary*)openContact:(CNContact*)contact; - -@end -#endif diff --git a/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/DFCrc16.h b/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/DFCrc16.h deleted file mode 100644 index 8f5b28185..000000000 --- a/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/DFCrc16.h +++ /dev/null @@ -1,33 +0,0 @@ -// -// DFCrc16.h -// DFUnits -// -// Created by DFung on 2017/3/6. -// Copyright © 2017年 DFung. All rights reserved. -// - -#import -#include -#include <_types.h> -#include -#include -#include - -@interface DFCrc16 : NSObject -/** - * 单独Crc16值. - */ -+(uint16_t)didCrc16:(uint8_t*)pt - Length:(uint16_t)len; -/** - * 累加Crc16值. - */ -+(uint16_t)didCrc16All:(uint8_t*)pt - Length:(uint16_t)len - CrcValue:(uint16_t)value; -/** - * 清除Crc值. - */ -+(void)didResetCrc; - -@end diff --git a/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/DFFadeLabel.h b/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/DFFadeLabel.h deleted file mode 100644 index 692599332..000000000 --- a/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/DFFadeLabel.h +++ /dev/null @@ -1,32 +0,0 @@ -// -// DFFadeLabel.h -// DFUnits -// -// Created by DFung on 2017/6/15. -// Copyright © 2017年 DFung. All rights reserved. -// - -#import - -/** - DFFadeLabel is a UIView subclass adds a UILabel effect when the text of a label instance outgrows the available width. Instances of `DFLabel` can be configured - for label fading or unFading toward Right、Left、Up、Down. - */ - -typedef enum : NSUInteger { - DFFadeLabel_TYPE_LEFT, - DFFadeLabel_TYPE_RIGHT, - DFFadeLabel_TYPE_UP, - DFFadeLabel_TYPE_DOWN, - DFFadeLabel_TYPE_CENTER, - DFFadeLabel_TYPE_BOTHSIDE -} DFFadeLabel_TYPE; - -@interface DFFadeLabel : UIView - -@property(nonatomic,strong)UILabel*label; -@property(nonatomic,strong)NSString *text; - --(void)showFromDirection:(DFFadeLabel_TYPE)type; - -@end diff --git a/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/DFFile.h b/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/DFFile.h deleted file mode 100644 index 5379ebe83..000000000 --- a/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/DFFile.h +++ /dev/null @@ -1,125 +0,0 @@ -// -// DFFile.h -// DVRunning -// -// Created by Mac on 15/11/13. -// Copyright (c) 2015年 DevinVon. All rights reserved. -// - -#import - -@interface DFFile : NSObject -/** - * 用途:在存在的路径上,创建一个文件。 - * @param path 你喜欢的路径 - */ -+(BOOL)createPath:(NSString*)path; - -/** - * 用途:【创建】一个文件,在你想要的路径下。 - * @param sPath 系统路径 - * @param mPath 中途路径 -->> @"test1/test2/test3" <<-- - * @param file 文件名 - */ -+(NSString*)createOn:(NSSearchPathDirectory)sPath - MiddlePath:(NSString*)mPath - File:(NSString*)file; -/** - * 用途:生成一个文件路径字符串。 - * @param sPath 系统路径 - * @param mPath 中途路径 -->> @"test1/test2/test3" <<-- - * @param file 文件名 - */ -+(NSString*)listPath:(NSSearchPathDirectory)sPath - MiddlePath:(NSString*)mPath - File:(NSString*)file; -/** - * 用途:【查找】一个文件,在你想要的路径下。 - * @param sPath 系统路径 - * @param mPath 中途路径 -->> @"test1/test2/test3" <<-- - * @param file 文件名 - */ -+(NSString*)findPath:(NSSearchPathDirectory)sPath - MiddlePath:(NSString*)mPath - File:(NSString*)file; -/** - * 用途:Byte单位转换成KB,MB,GB - * @param byte 多少bytes? - */ -+(NSString*)fileByte:(long long)byte; - -/** - * 用途:重命名。 - * @param oldName 旧的文件(路径) -->> @"test1/test2/test3" <<-- - * @param NewName 新的文件(路径) -->> @"test1/test2/test3" <<-- - */ -+(BOOL)renameOldName:(NSString*)oldName - NewName:(NSString*)newName; -/** - * 用途:删除文件。 - * @param path 文件路径 - */ -+(BOOL)removePath:(NSString*)path; - -/** - * 用途:把数据写进文件(覆盖)。 - * @param data 数据字节 - * @param path 文件路径 - */ -+(BOOL)writeData:(NSData*)data fillFile:(NSString*)path; - -/** - * 用途:把数据写进文件(文件末尾)。 - * @param data 数据字节 - * @param path 文件路径 - */ -+(void)writeData:(NSData*)data endFile:(NSString*)path; - -/** - * 用途:从bundle里寻找文件。 - * @param bundle @"*.bundle" - * @param file 文件名 - */ -+(NSString*)find:(NSString*)bundle File:(NSString*)file; - -/** - * 用途:从Project资源里寻找文件。 - * (先把资源文件添加至工程内的Copy Bundle Resources内。) - * @param file 文件名 - * @return 该文件的路径。 - */ -+(NSString*)find:(NSString *)file; - -/** - * 用途:解析JSON文件。 - * @param path 文件路径 - */ -+(id)JsonPath:(NSString*)path; - -/** - * 用途:解析JSON数据。 - * @param data jsonData - */ -+(id)JsonData:(NSData*)data; - -/** - * 用途:读取文件字符串。 - * @param path 文件路径 - */ -+(NSString*)stringPath:(NSString*)path; - -/** - * 用途:文件夹内文件元素。 - * @param path 文件夹路径 - */ -+(NSArray*)subPaths:(NSString*)path; - -/** - * 用途:文件大小。 - * @param path 文件夹路径 - * @return 该文件的大小。 - */ -+(long long)sizeOfFile:(NSString*)path; - - -@end diff --git a/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/DFGzip.h b/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/DFGzip.h deleted file mode 100644 index 28f94a98e..000000000 --- a/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/DFGzip.h +++ /dev/null @@ -1,25 +0,0 @@ -// -// DFGzip.h -// DFUnits -// -// Created by DFung on 2016/12/13. -// Copyright © 2016年 DFung. All rights reserved. -// - -#import - -@interface DFGzip : NSObject - - -/** - * Gzip 解压(Need Include => libz.1.2.8.tbd) - */ -+(NSData *)uncompressZippedData:(NSData *)compressedData; - -/** - * Gzip 压缩(Need Include => libz.1.2.8.tbd) - */ -+(NSData *)gzipData:(NSData *)pUncompressedData; - - -@end diff --git a/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/DFHmacMD5.h b/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/DFHmacMD5.h deleted file mode 100644 index 567f9df81..000000000 --- a/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/DFHmacMD5.h +++ /dev/null @@ -1,24 +0,0 @@ -// -// DFHmacMD5.h -// DFUnits -// -// Created by DFung on 2016/12/13. -// Copyright © 2016年 DFung. All rights reserved. -// - -#import - -@interface DFHmacMD5 : NSObject - -/* - * MD5加密32位 - */ -+ (NSString *)HmacMD5String:(NSString *)string; - -/* - * HmacMD5加密 - */ -+ (NSString *)HmacMD5String:(NSString *)string - Key:(NSString *)keyStr; - -@end diff --git a/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/DFHttp.h b/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/DFHttp.h deleted file mode 100644 index 4005bd534..000000000 --- a/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/DFHttp.h +++ /dev/null @@ -1,70 +0,0 @@ -// -// DFHttp.h -// DFUnits -// -// Created by DFung on 16/1/22. -// Copyright © 2016年 DFung. All rights reserved. -// - -#import - - -@class DFHttp; - -@protocol DFHttpDelegate -@optional - --(void)http:(DFHttp*)http didFail:(NSError*)error; --(void)http:(DFHttp*)http didSuccess:(NSString*)path; --(void)http:(DFHttp*)http progress:(float)rate; - -@end - - -@interface DFHttp : NSObject -@property(assign,nonatomic)int tag; -@property(assign,nonatomic)id delegate; - - -/* - * Set info[@"URL"]; - * info[@"PATH"]; - */ --(void)down:(NSDictionary*)info; - --(void)cancelTask; -/* - Returns a new string made from the receiver by replacing - all characters not in the allowedCharacters set with percent - encoded characters. UTF-8 encoding is used to determine the - correct percent encoded characters. Entire URL strings cannot - be percent-encoded. This method is intended to percent-encode - an URL component or subcomponent string, NOT the entire URL - string. Any characters in allowedCharacters outside of the - 7-bit ASCII range are ignored. - */ -+(NSString*)encodeURL:(NSString*)url; - -/* - Returns a new string made from the receiver by replacing - all percent encoded sequences with the matching UTF-8 characters. - */ -+(NSString*)decodeURL:(NSString*)url; - -/** - * 异步请求(GET) - */ -+(void)getWithUrl:(NSString*)url - Result:(void(^)(id ret, NSURLResponse *rps))block; - -/** - * 异步请求(POST) - */ -+(void)postWithUrl:(NSString*)url - Body:(NSString*)body - Result:(void(^)(id ret, NSURLResponse *rps))block; - - - - -@end diff --git a/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/DFHttp1.h b/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/DFHttp1.h deleted file mode 100644 index 647b076a5..000000000 --- a/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/DFHttp1.h +++ /dev/null @@ -1,29 +0,0 @@ -// -// DFHttp1.h -// DFUnits -// -// Created by 杰理科技 on 2021/4/1. -// Copyright © 2021 DFung. All rights reserved. -// - -#import - -NS_ASSUME_NONNULL_BEGIN - -typedef NS_ENUM(UInt8, DF_HTTP1_Result) { - DF_HTTP1_ResultFail = 0x00, //下载失败 - DF_HTTP1_ResultSuccess = 0x01, //下载成功 - DF_HTTP1_ResultStart = 0x02, //开始下载 - DF_HTTP1_ResultDownload = 0x03, //正在下载 - DF_HTTP1_ResultCancel = 0x04, //正在取消 - -}; - -typedef void(^DF_HTTP1_BK)(float progress,NSData *__nullable data, DF_HTTP1_Result result); - -@interface DFHttp1 : NSObject --(void)httpDownload:(NSString*)url Result:(DF_HTTP1_BK __nullable)result; --(void)httpCancelTask; -@end - -NS_ASSUME_NONNULL_END diff --git a/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/DFImage.h b/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/DFImage.h deleted file mode 100644 index d38f1b229..000000000 --- a/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/DFImage.h +++ /dev/null @@ -1,57 +0,0 @@ -// -// DFImage.h -// DFUnits -// -// Created by DFung on 16/1/22. -// Copyright © 2016年 DFung. All rights reserved. -// - -#import -#import - -@interface DFImage : NSObject - - - -/** - * 用途:压缩图片。 - * @param srcImage 待压缩的图片 - * @param scale 压缩比 - */ -+(NSData*)compressImage:(UIImage *)srcImage Scale:(double)scale; - - -/** - * 用途:从Project资源里寻找图片文件。 - * @param image 图片名 -->> @"test@2x.png" <<-- - */ -+(UIImage*)loadImage:(NSString*)image; - - -/** - * @use 图片模糊处理 - * @param image 图片数据 - * @param blur 模糊值,取值[0,1] - * @return 模糊后的图片 - */ -+(UIImage*)blurImage:(UIImage*)image Blur:(CGFloat)blur; - -/** - * @use 图片模糊处理 - * @param image 图片数据 - * @param blur 模糊值,取值[0,1] - * @param color 背景色调 - * @return 模糊后的图片 - */ -+(UIImage*)blurImage:(UIImage*)image Blur:(CGFloat)blur TintColor:(UIColor*)color; - -/** - * @use 屏幕截图 - * @param size 大小 - * @param view 截取视图 - * @return 截取后的图片 - */ -+(UIImage*)screenshotSize:(CGSize)size OnView:(UIView*)view; - - -@end diff --git a/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/DFLabel.h b/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/DFLabel.h deleted file mode 100644 index 3879beddc..000000000 --- a/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/DFLabel.h +++ /dev/null @@ -1,534 +0,0 @@ -// -// DFLabel.h -// DFUnits -// -// Created by DFung on 2017/3/15. -// Copyright © 2017年 DFung. All rights reserved. -// - -#import -#import - -/** An enum that defines the types of `DFLabel` scrolling */ -typedef NS_ENUM(NSUInteger, DFLabelType) { - /** Scrolls left first, then back right to the original position. */ - DFLeftRight = 0, - /** Scrolls right first, then back left to the original position. */ - DFRightLeft = 1, - /** Continuously scrolls left (with a pause at the original position if animationDelay is set). See the `trailingBuffer` property to define a spacing between the repeating strings.*/ - DFContinuous = 2, - /** Continuously scrolls right (with a pause at the original position if animationDelay is set). See the `trailingBuffer` property to define a spacing between the repeating strings.*/ - DFContinuousReverse = 3 -}; - - -#ifndef IBInspectable -#define IBInspectable -#endif - -/** - DFLabel is a UILabel subclass adds a scrolling DFLabel effect when the text of a label instance outgrows the available width. Instances of `DFLabel` can be configured - for label scrolling direction/looping, speed/rate, and other options. - */ - -IB_DESIGNABLE -@interface DFLabel : UILabel - -//////////////////////////////////////////////////////////////////////////////// -/// @name Creating DFLabels -//////////////////////////////////////////////////////////////////////////////// - -/** Returns a newly initialized `DFLabel` instance. - - The default scroll duration of 7.0 seconds and fade length of 0.0 are used. - - @param frame A rectangle specifying the initial location and size of the view in its superview's coordinates. Text (for the given font, font size, etc.) that does not fit in this frame will automatically scroll. - @return An initialized `DFLabel` object or nil if the object couldn't be created. - */ - -- (instancetype)initWithFrame:(CGRect)frame; - - -/** Returns a newly initialized `DFLabel` instance with the specified scroll rate and edge transparency fade length. - - You must specify a non-zero rate, and you cannot thereafter modify the rate. - - @param frame A rectangle specifying the initial location and size of the view in its superview's coordinates. Text (for the given font, font size, etc.) that does not fit in this frame will automatically scroll. - @param pixelsPerSec A rate of scroll for the label scroll animation. Must be non-zero. Note that this will be the maximum rate for ease-type animation. - @param fadeLength A length of transparency fade at the left and right edges of the `DFLabel` instance's frame. - @see fadeLength - @return An initialized `DFLabel` object or nil if the object couldn't be created. - */ - -- (instancetype)initWithFrame:(CGRect)frame rate:(CGFloat)pixelsPerSec andFadeLength:(CGFloat)fadeLength; - - -/** Returns a newly initialized `DFLabel` instance with the specified scroll duration and edge transparency fade length. - - You must specify a non-zero duration, and you cannot thereafter modify the duration. - - @param frame A rectangle specifying the initial location and size of the view in its superview's coordinates. Text (for the given font, font size, etc.) that does not fit in this frame will automatically scroll. - @param scrollDuration A scroll duration the label scroll animation. Must be non-zero. This will be the duration that the animation takes for one-half of the scroll cycle in the case of left-right and right-left DFLabel types, and for one loop of a continuous DFLabel type. - @param fadeLength A length of transparency fade at the left and right edges of the `DFLabel` instance's frame. - @see fadeLength - @return An initialized `DFLabel` object or nil if the object couldn't be created. - */ - -- (instancetype)initWithFrame:(CGRect)frame duration:(NSTimeInterval)scrollDuration andFadeLength:(CGFloat)fadeLength; - - -/** Resizes the view to the minimum size necessary to fully enclose the current text (i.e. without scrolling), up to the maximum size specified. - - The current origin of the frame is retained. - - @param maxSize The maximum size up to which the view should be resized. Passing `CGSizeZero` will result in no maximum size limit. - @param adjustHeight A boolean that can be used to indicate if the view's height should also be adjusted. Note that this has no impact on scrolling. - */ -- (void)minimizeLabelFrameWithMaximumSize:(CGSize)maxSize adjustHeight:(BOOL)adjustHeight; - - -//////////////////////////////////////////////////////////////////////////////// -/// @name Configuration Options -//////////////////////////////////////////////////////////////////////////////// - -/** Specifies the animation curve used in the scrolling motion of the labels. - - Allowable options: - - - `UIViewAnimationOptionCurveEaseInOut` - - `UIViewAnimationOptionCurveEaseIn` - - `UIViewAnimationOptionCurveEaseOut` - - `UIViewAnimationOptionCurveLinear` - - Defaults to `UIViewAnimationOptionCurveEaseInOut`. - */ - -@property (nonatomic, assign) UIViewAnimationOptions animationCurve; - - -/** A boolean property that sets whether the `DFLabel` should behave like a normal UILabel. - - When set to `YES` the `DFLabel` will behave like a normal UILabel, and will not begin scrolling when the text is - larger than the specified frame. The change takes effect immediately, removing any in-flight animation as well as any - current edge fade. Note that the `DFLabel` will respect the current values of the `lineBreakMode` and `textAlignment` - properties while labelized. - - To simply prevent automatic scrolling, use the `holdScrolling` property. - - Defaults to `NO`. - - @see holdScrolling - @see lineBreakMode - @warning The label will not automatically scroll when this property is set to `YES`. - @warning The UILabel default setting for the `lineBreakMode` property is `NSLineBreakByTruncatingTail`, which truncates - the text adds an ellipsis glyph (...). Set the `lineBreakMode` property to `NSLineBreakByClipping` in order to avoid the - ellipsis, especially if using an edge transparency fade. - */ - -@property (nonatomic, assign) IBInspectable BOOL labelize; - - -/** A boolean property that sets whether the `DFLabel` should hold (prevent) label scrolling. - - When set to `YES`, the `DFLabel` will not automatically scroll even its text is larger than the specified frame, - although the specified edge fades will remain. - - To set the `DFLabel` to act like a normal UILabel, use the `labelize` property. - - Defaults to `NO`. - - @see labelize - @warning The label will not automatically scroll when this property is set to `YES`. - */ - -@property (nonatomic, assign) IBInspectable BOOL holdScrolling; - - -/** A boolean property that sets whether the `DFLabel` should only begin a scroll when tapped. - - If this property is set to `YES`, the `DFLabel` will begin a scroll animation cycle only when tapped. The label will - not automatically being a scroll. This setting overrides the setting of the `holdScrolling` property. - - Defaults to `NO` . - - @warning The label will not automatically scroll when this property is set to `YES`. - @see holdScrolling - */ - -@property (nonatomic, assign) IBInspectable BOOL tapToScroll; - - -/** Defines the direction and method in which the `DFLabel` instance scrolls. - - `DFLabel` supports four types of scrolling: `DFLeftRight`, `DFRightLeft`, `DFContinuous`, and `DFContinuousReverse`. - - Given the nature of how text direction works, the options for the `DFLabelType` property require specific text alignments - and will set the textAlignment property accordingly. - - - `DFLeftRight` type is ONLY compatible with a label text alignment of `NSTextAlignmentLeft`. - - `DFRightLeft` type is ONLY compatible with a label text alignment of `NSTextAlignmentRight`. - - `DFContinuous` does not require a text alignment (it is effectively centered). - - `DFContinuousReverse` does not require a text alignment (it is effectively centered). - - Defaults to `DFLeftRight`. - - @see DFLabelType - @see textAlignment - */ - -#if TARGET_INTERFACE_BUILDER -@property (nonatomic, assign) IBInspectable NSInteger labelType; -#else -@property (nonatomic, assign) DFLabelType labelType; -#endif - -/** Defines the duration of the scrolling animation. - - This property sets the amount of time it will take for the scrolling animation to complete a - scrolling cycle. Note that for `DFLeftRight` and `DFRightLeft`, a cycle consists of the animation away, - a pause (if a delay is specified), and the animation back to the original position. - - Setting this property will automatically override any value previously set to the `rate` property, and the `rate` - property will be set to `0.0`. - - @see rate - */ - -@property (nonatomic, assign) IBInspectable CGFloat scrollDuration; - - -/** Defines the rate at which the label will scroll, in pixels per second. - - Setting this property will automatically override any value previousy set to the `scrollDuration` property, and the - `scrollDuration` property will be set to `0.0`. Note that this is the rate at which the label would scroll if it - moved at a constant speed - with other animation curves the rate will be slightly different. - - @see scrollDuration - */ - -@property (nonatomic, assign) IBInspectable CGFloat rate; - - -/** A buffer (offset) between the leading edge of the label text and the label frame. - - This property adds additional space between the leading edge of the label text and the label frame. The - leading edge is the edge of the label text facing the direction of scroll (i.e. the edge that animates - offscreen first during scrolling). - - Defaults to `0`. - - @note The value set to this property affects label positioning at all times (including when `labelize` is set to `YES`), - including when the text string length is short enough that the label does not need to scroll. - - @note For `DFContinuous`-type labels, the smallest value of `leadingBuffer`, 'trailingBuffer`, and `fadeLength` - is used as spacing between the two label instances. Zero is an allowable value for all three properties. - - @see trailingBuffer - @since Available in 2.1.0 and later. - */ - -@property (nonatomic, assign) IBInspectable CGFloat leadingBuffer; - - -/** A buffer (offset) between the trailing edge of the label text and the label frame. - - This property adds additional space (buffer) between the trailing edge of the label text and the label frame. The - trailing edge is the edge of the label text facing away from the direction of scroll (i.e. the edge that animates - offscreen last during scrolling). - - Defaults to `0`. - - @note For `DFContinuous`-type labels, the smallest value of `leadingBuffer`, 'trailingBuffer`, and `fadeLength` - is used as spacing between the two label instances. Zero is an allowable value for all three properties. - - @note The value set to this property has no effect when the `labelize` property is set to `YES`. - - @see leadingBuffer - @since Available in 2.1.0 and later. - */ - -@property (nonatomic, assign) IBInspectable CGFloat trailingBuffer; - - -/** - @deprecated Use `trailingBuffer` instead. Values set to this property are simply forwarded to `trailingBuffer`. - */ - -@property (nonatomic, assign) CGFloat continuousDFLabelExtraBuffer DEPRECATED_ATTRIBUTE; - - -/** The length of transparency fade at the left and right edges of the `DFLabel` instance's frame. - - This propery sets the size (in points) of the view edge transparency fades on the left and right edges of a `DFLabel`. The - transparency fades from an alpha of 1.0 (fully visible) to 0.0 (fully transparent) over this distance. Values set to this property - will be sanitized to prevent a fade length greater than 1/2 of the frame width. - - Defaults to `0`. - */ - -@property (nonatomic, assign) IBInspectable CGFloat fadeLength; - - -/** The length of delay in seconds that the label pauses at the completion of a scroll. */ - -@property (nonatomic, assign) IBInspectable CGFloat animationDelay; - - -/** The read-only duration of the scroll animation (not including delay). - - The value of this property is calculated when using the `scrollRate` property to set label animation speed. The value of this property - is equal to the value of `scrollDuration` property when using the `scrollDuration` property to set label animation speed. - - @see scrollDuration - @see scrollRate - */ - -@property (nonatomic, readonly) NSTimeInterval animationDuration; - - - -//////////////////////////////////////////////////////////////////////////////// -/// @name Animation control -//////////////////////////////////////////////////////////////////////////////// - -/** Immediately resets the label to the home position, cancelling any in-flight scroll animation, and restarts the scroll animation if the appropriate conditions are met. - - @see resetLabel - @see triggerScrollStart - */ - -- (void)restartLabel; - - -/** Immediately resets the label to the home position, cancelling any in-flight scroll animation. - - The text is immediately returned to the home position. Scrolling will not resume automatically after a call to this method. - To re-initiate scrolling use a call to `restartLabel` or `triggerScrollStart`, or make a change to a UILabel property such as text, bounds/frame, - font, font size, etc. - - @see restartLabel - @see triggerScrollStart - @since Available in 2.4.0 and later. - */ - -- (void)shutdownLabel; - - -/** Resets the label text, recalculating the scroll animation. - - The text is immediately returned to the home position, and the scroll animation positions are cleared. Scrolling will not resume automatically after - a call to this method. To re-initiate scrolling, use either a call to `restartLabel` or make a change to a UILabel property such as text, bounds/frame, - font, font size, etc. - - @see restartLabel - */ - -- (void)resetLabel; - - -/** Pauses the text scrolling animation, at any point during an in-progress animation. - - @note This method has no effect if a scroll animation is NOT already in progress. To prevent automatic scrolling on a newly-initialized label prior to its presentation onscreen, see the `holdScrolling` property. - - @see holdScrolling - @see unpauseLabel - */ - -- (void)pauseLabel; - - -/** Un-pauses a previously paused text scrolling animation. This method has no effect if the label was not previously paused using `pauseLabel`. - - @see pauseLabel - */ - -- (void)unpauseLabel; - - -/** Overrides any non-size condition which is preventing the receiver from automatically scrolling, and begins a scroll animation. - - Currently the only non-size conditions which can prevent a label from scrolling are the `tapToScroll` and `holdScrolling` properties. This - method will not force a label with a string that fits inside the label bounds (i.e. that would not automatically scroll) to begin a scroll - animation. - - Upon the completion of the first forced scroll animation, the receiver will not automatically continue to scroll unless the conditions - preventing scrolling have been removed. - - @note This method has no effect if called during an already in-flight scroll animation. - - @see restartLabel - @since Available in 2.2.0 and later. - */ - -- (void)triggerScrollStart; - - - -//////////////////////////////////////////////////////////////////////////////// -/// @name Animation Status -//////////////////////////////////////////////////////////////////////////////// - -/** Called when the label animation is about to begin. - - The default implementation of this method does nothing. Subclasses may override this method in order to perform any custom actions just as - the label animation begins. This is only called in the event that the conditions for scrolling to begin are met. - - @since Available in 1.5.0 and later. - */ - -- (void)labelWillBeginScroll; - - -/** Called when the label animation has finished, and the label is at the home position. - - The default implementation of this method does nothing. Subclasses may override this method in order to perform any custom actions jas as - the label animation completes, and before the next animation would begin (assuming the scroll conditions are met). - - @param finished A Boolean that indicates whether or not the scroll animation actually finished before the completion handler was called. - @since Available in 1.5.0 and later. - - @warning This method will be called, and the `finished` parameter will be `NO`, when any property changes are made that would cause the label - scrolling to be automatically reset. This includes changes to label text and font/font size changes. - */ - -- (void)labelReturnedToHome:(BOOL)finished; - - -/** A boolean property that indicates if the label's scroll animation has been paused. - - @see pauseLabel - @see unpauseLabel - */ - -@property (nonatomic, assign, readonly) BOOL isPaused; - - -/** A boolean property that indicates if the label is currently away from the home location. - - The "home" location is the traditional location of `UILabel` text. This property essentially reflects if a scroll animation is underway. - */ - -@property (nonatomic, assign, readonly) BOOL awayFromHome; - - - -//////////////////////////////////////////////////////////////////////////////// -/// @name Bulk-manipulation Methods -//////////////////////////////////////////////////////////////////////////////// - -/** Convenience method to restart all `DFLabel` instances that have the specified view controller in their next responder chain. - - This method sends a `NSNotification` to all `DFLabel` instances with the specified view controller in their next responder chain. - The scrolling animation of these instances will be automatically restarted. This is equivalent to calling `restartLabel` on all affected - instances. - - There is currently no functional difference between this method and `controllerViewDidAppear:` or `controllerViewWillAppear:`. The methods may - be used interchangeably. - - @warning View controllers that appear with animation (such as from underneath a modal-style controller) can cause some `DFLabel` text - position "jumping" when this method is used in `viewDidAppear` if scroll animations are already underway. Use this method inside `viewWillAppear:` - instead to avoid this problem. - - @warning This method may not function properly if passed the parent view controller when using view controller containment. - - @param controller The view controller that has appeared. - @see restartLabel - @see controllerViewDidAppear: - @see controllerViewWillAppear: - @since Available in 1.3.1 and later. - */ - -+ (void)restartLabelsOfController:(UIViewController *)controller; - - -/** Convenience method to restart all `DFLabel` instances that have the specified view controller in their next responder chain. - - Alternative to `restartLabelsOfController:`. This method is retained for backwards compatibility and future enhancements. - - @param controller The view controller that has appeared. - @see restartLabel - @see controllerViewWillAppear: - @since Available in 1.2.7 and later. - */ - -+ (void)controllerViewDidAppear:(UIViewController *)controller; - - -/** Convenience method to restart all `DFLabel` instances that have the specified view controller in their next responder chain. - - Alternative to `restartLabelsOfController:`. This method is retained for backwards compatibility and future enhancements. - - @param controller The view controller that has appeared. - @see restartLabel - @see controllerViewDidAppear: - @since Available in 1.2.8 and later. - */ - -+ (void)controllerViewWillAppear:(UIViewController *)controller; - - -/** - @deprecated Use `controllerViewDidAppear:` instead. - */ - -+ (void)controllerViewAppearing:(UIViewController *)controller DEPRECATED_ATTRIBUTE; - - -/** Labelizes all `DFLabel` instances that have the specified view controller in their next responder chain. - - This method sends an `NSNotification` to all `DFLabel` instances with the specified view controller in their next - responder chain. The `labelize` property of these `DFLabel` instances will be set to `YES`. - - @param controller The view controller for which all `DFLabel` instances should be labelized. - @see labelize - */ - -+ (void)controllerLabelsShouldLabelize:(UIViewController *)controller; - - -/** De-Labelizes all `DFLabel` instances that have the specified view controller in their next responder chain. - - This method sends an `NSNotification` to all `DFLabel` instances with the specified view controller in their next - responder chain. The `labelize` property of these `DFLabel` instances will be set to `NO` . - - @param controller The view controller for which all `DFLabel` instances should be de-labelized. - @see labelize - */ - -+ (void)controllerLabelsShouldAnimate:(UIViewController *)controller; - - -@end - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/DFNetPlayer.h b/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/DFNetPlayer.h deleted file mode 100644 index a078313fd..000000000 --- a/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/DFNetPlayer.h +++ /dev/null @@ -1,51 +0,0 @@ -// -// DFNetPlayer.h -// Test -// -// Created by DFung on 2018/2/2. -// Copyright © 2018年 DFung. All rights reserved. -// - -#import -#import -#import - - -typedef enum : NSUInteger { - DFNetPlayer_STATUS_PENDING, - DFNetPlayer_STATUS_PLAY, - DFNetPlayer_STATUS_PAUSE, - DFNetPlayer_STATUS_STOP, -} DFNetPlayer_STATUS; - - -@class DFNetPlayer; -@protocol DFNetPlayerDelegate --(void)onDFNetPlayer:(DFNetPlayer*)player ChangeStatus:(DFNetPlayer_STATUS)status; --(void)onDFNetPlayer:(DFNetPlayer*)player CachedProgress:(float)progress; --(void)onDFNetPlayer:(DFNetPlayer*)player Speed:(float)speed TimeGap:(NSTimeInterval)timeGap; --(void)onDFNetPlayer:(DFNetPlayer*)player PlayTime:(float)time; --(void)onDFNetPlayer:(DFNetPlayer*)player PlayFinished:(float)ret; - -@end - - -@interface DFNetPlayer : NSObject -@property (assign,nonatomic)id delegate; -@property (strong,nonatomic)AVPlayer *mPlayer; -@property (strong,nonatomic)AVPlayerItem *mSongItem; -@property (assign,nonatomic)DFNetPlayer_STATUS status; -@property (assign,nonatomic)float time_cached; -@property (assign,nonatomic)float time_total; -@property (assign,nonatomic)float time_play; - --(void)setVolume:(float)volume; --(float)getVolume; - --(void)didPlayUrl:(NSString*)url; --(void)didContinue; --(void)didPause; --(void)didStop; --(void)clearObservers; - -@end diff --git a/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/DFNotice.h b/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/DFNotice.h deleted file mode 100644 index 38508602c..000000000 --- a/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/DFNotice.h +++ /dev/null @@ -1,56 +0,0 @@ -// -// DFNotice.h -// IPCamera -// -// Created by DFung on 16/5/27. -// Copyright © 2016年 DFung. All rights reserved. -// - -#import -#import -#import - - - -@interface DFNotice : NSObject - -/** - * 发送通知 - * - * @param name :通知名字 - * @param object:传递的对象 - */ -+(void)post:(NSString*)name Object:(id)object; - -/** - * 监听通知 - * - * @param name :通知名字 - * @param action:实现方法 - * @param own :监听者 - */ -+(void)add:(NSString*)name Action:(SEL)action Own:(id)own; - -/** - * 监听取消 - * - * @param name:通知名字 - * @param own :监听者 - */ -+(void)remove:(NSString*)name Own:(id)own; - -/** (iOS 10.0 以上有效。) - * 定时通知 - * - * @param date:yyyyMMddHHmmss - * @param repeat:0 -->不重复 - */ -+(void)pushLocalNoticeDate:(NSString*)date - ID:(NSString*)noteId - Txt_0:(NSString*)txt_0 - Txt_1:(NSString*)txt_1 - Txt_2:(NSString*)txt_2 - Badge:(NSNumber*)badge - Repeat:(BOOL)repeat; - -@end diff --git a/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/DFPing.h b/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/DFPing.h deleted file mode 100644 index b52dcb36c..000000000 --- a/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/DFPing.h +++ /dev/null @@ -1,312 +0,0 @@ -// -// DFPing.h -// MusicTest -// -// Created by DFung on 2018/3/30. -// Copyright © 2018年 DFung. All rights reserved. -// - -#import - -#include -#include -#include -#include - -#pragma once -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#define kNET_TIME_GAP 100 -#define kDFPING_TIMEOUT @"DFPING_TIMEOUT" - -struct net_ping_addr_t{ - const char *name; - const char *host; - const int port; -}; -typedef struct net_ping_addr_t n_ping_addr_t; -/** - * return 1:OK 0:Not good - */ -int do_net_ping(void); -int do_net_ping_1(n_ping_addr_t *paddrs); - - - -NS_ASSUME_NONNULL_BEGIN - -@protocol DFPingDelegate; - -/*! Controls the IP address version used by DFPing instances. - */ - -typedef NS_ENUM(NSInteger, DFPingAddressStyle) { - DFPingAddressStyleAny, ///< Use the first IPv4 or IPv6 address found; the default. - DFPingAddressStyleICMPv4, ///< Use the first IPv4 address found. - DFPingAddressStyleICMPv6 ///< Use the first IPv6 address found. -}; - -/*! An object wrapper around the low-level BSD Sockets ping function. - * \details To use the class create an instance, set the delegate and call `-start` - * to start the instance on the current run loop. If things go well you'll soon get the - * `-DFPing:didStartWithAddress:` delegate callback. From there you can can call - * `-sendPingWithData:` to send a ping and you'll receive the - * `-DFPing:didReceivePingResponsePacket:sequenceNumber:` and - * `-DFPing:didReceiveUnexpectedPacket:` delegate callbacks as ICMP packets arrive. - * - * The class can be used from any thread but the use of any single instance must be - * confined to a specific thread and that thread must run its run loop. - */ -@interface DFPing : NSObject -- (instancetype)init NS_UNAVAILABLE; - -/*! Initialise the object to ping the specified host. - * \param hostName The DNS name of the host to ping; an IPv4 or IPv6 address in string form will - * work here. - * \returns The initialised object. - */ - -- (instancetype)initWithHostName:(NSString *)hostName NS_DESIGNATED_INITIALIZER; - -/*! A copy of the value passed to `-initWithHostName:`. - */ - -@property (nonatomic, copy, readonly) NSString * hostName; - -/*! The delegate for this object. - * \details Delegate callbacks are schedule in the default run loop mode of the run loop of the - * thread that calls `-start`. - */ - -@property (nonatomic, weak, readwrite, nullable) id delegate; - -/*! Controls the IP address version used by the object. - * \details You should set this value before starting the object. - */ - -@property (nonatomic, assign, readwrite) DFPingAddressStyle addressStyle; - -/*! The address being pinged. - * \details The contents of the NSData is a (struct sockaddr) of some form. The - * value is nil while the object is stopped and remains nil on start until - * `-DFPing:didStartWithAddress:` is called. - */ - -@property (nonatomic, copy, readonly, nullable) NSData * hostAddress; - -/*! The address family for `hostAddress`, or `AF_UNSPEC` if that's nil. - */ - -@property (nonatomic, assign, readonly) sa_family_t hostAddressFamily; - -/*! The identifier used by pings by this object. - * \details When you create an instance of this object it generates a random identifier - * that it uses to identify its own pings. - */ - -@property (nonatomic, assign, readonly) uint16_t identifier; - -/*! The next sequence number to be used by this object. - * \details This value starts at zero and increments each time you send a ping (safely - * wrapping back to zero if necessary). The sequence number is included in the ping, - * allowing you to match up requests and responses, and thus calculate ping times and - * so on. - */ - -@property (nonatomic, assign, readonly) uint16_t nextSequenceNumber; - -/*! Starts the object. - * \details You should set up the delegate and any ping parameters before calling this. - * - * If things go well you'll soon get the `-DFPing:didStartWithAddress:` delegate - * callback, at which point you can start sending pings (via `-sendPingWithData:`) and - * will start receiving ICMP packets (either ping responses, via the - * `-DFPing:didReceivePingResponsePacket:sequenceNumber:` delegate callback, or - * unsolicited ICMP packets, via the `-DFPing:didReceiveUnexpectedPacket:` delegate - * callback). - * - * If the object fails to start, typically because `hostName` doesn't resolve, you'll get - * the `-DFPing:didFailWithError:` delegate callback. - * - * It is not correct to start an already started object. - */ - -- (void)start; - -/*! Sends a ping packet containing the specified data. - * \details Sends an actual ping. - * - * The object must be started when you call this method and, on starting the object, you must - * wait for the `-DFPing:didStartWithAddress:` delegate callback before calling it. - * \param data Some data to include in the ping packet, after the ICMP header, or nil if you - * want the packet to include a standard 56 byte payload (resulting in a standard 64 byte - * ping). - */ - -- (void)sendPingWithData:(nullable NSData *)data; - -/*! Stops the object. - * \details You should call this when you're done pinging. - * - * It's safe to call this on an object that's stopped. - */ - -- (void)stop; - -@end - -/*! A delegate protocol for the DFPing class. - */ - -@protocol DFPingDelegate - -@optional - -/*! A DFPing delegate callback, called once the object has started up. - * \details This is called shortly after you start the object to tell you that the - * object has successfully started. On receiving this callback, you can call - * `-sendPingWithData:` to send pings. - * - * If the object didn't start, `-DFPing:didFailWithError:` is called instead. - * \param pinger The object issuing the callback. - * \param address The address that's being pinged; at the time this delegate callback - * is made, this will have the same value as the `hostAddress` property. - */ - -- (void)DFPing:(DFPing *)pinger didStartWithAddress:(NSData *)address; - -/*! A DFPing delegate callback, called if the object fails to start up. - * \details This is called shortly after you start the object to tell you that the - * object has failed to start. The most likely cause of failure is a problem - * resolving `hostName`. - * - * By the time this callback is called, the object has stopped (that is, you don't - * need to call `-stop` yourself). - * \param pinger The object issuing the callback. - * \param error Describes the failure. - */ - -- (void)DFPing:(DFPing *)pinger didFailWithError:(NSError *)error; - -/*! A DFPing delegate callback, called when the object has successfully sent a ping packet. - * \details Each call to `-sendPingWithData:` will result in either a - * `-DFPing:didSendPacket:sequenceNumber:` delegate callback or a - * `-DFPing:didFailToSendPacket:sequenceNumber:error:` delegate callback (unless you - * stop the object before you get the callback). These callbacks are currently delivered - * synchronously from within `-sendPingWithData:`, but this synchronous behaviour is not - * considered API. - * \param pinger The object issuing the callback. - * \param packet The packet that was sent; this includes the ICMP header (`ICMPHeader`) and the - * data you passed to `-sendPingWithData:` but does not include any IP-level headers. - * \param sequenceNumber The ICMP sequence number of that packet. - */ - -- (void)DFPing:(DFPing *)pinger didSendPacket:(NSData *)packet sequenceNumber:(uint16_t)sequenceNumber; - -/*! A DFPing delegate callback, called when the object fails to send a ping packet. - * \details Each call to `-sendPingWithData:` will result in either a - * `-DFPing:didSendPacket:sequenceNumber:` delegate callback or a - * `-DFPing:didFailToSendPacket:sequenceNumber:error:` delegate callback (unless you - * stop the object before you get the callback). These callbacks are currently delivered - * synchronously from within `-sendPingWithData:`, but this synchronous behaviour is not - * considered API. - * \param pinger The object issuing the callback. - * \param packet The packet that was not sent; see `-DFPing:didSendPacket:sequenceNumber:` - * for details. - * \param sequenceNumber The ICMP sequence number of that packet. - * \param error Describes the failure. - */ - -- (void)DFPing:(DFPing *)pinger didFailToSendPacket:(NSData *)packet sequenceNumber:(uint16_t)sequenceNumber error:(NSError *)error; - -/*! A DFPing delegate callback, called when the object receives a ping response. - * \details If the object receives an ping response that matches a ping request that it - * sent, it informs the delegate via this callback. Matching is primarily done based on - * the ICMP identifier, although other criteria are used as well. - * \param pinger The object issuing the callback. - * \param packet The packet received; this includes the ICMP header (`ICMPHeader`) and any data that - * follows that in the ICMP message but does not include any IP-level headers. - * \param sequenceNumber The ICMP sequence number of that packet. - */ - -- (void)DFPing:(DFPing *)pinger didReceivePingResponsePacket:(NSData *)packet sequenceNumber:(uint16_t)sequenceNumber; - -/*! A DFPing delegate callback, called when the object receives an unmatched ICMP message. - * \details If the object receives an ICMP message that does not match a ping request that it - * sent, it informs the delegate via this callback. The nature of ICMP handling in a - * BSD kernel makes this a common event because, when an ICMP message arrives, it is - * delivered to all ICMP sockets. - * - * IMPORTANT: This callback is especially common when using IPv6 because IPv6 uses ICMP - * for important network management functions. For example, IPv6 routers periodically - * send out Router Advertisement (RA) packets via Neighbor Discovery Protocol (NDP), which - * is implemented on top of ICMP. - * - * For more on matching, see the discussion associated with - * `-DFPing:didReceivePingResponsePacket:sequenceNumber:`. - * \param pinger The object issuing the callback. - * \param packet The packet received; this includes the ICMP header (`ICMPHeader`) and any data that - * follows that in the ICMP message but does not include any IP-level headers. - */ - -- (void)DFPing:(DFPing *)pinger didReceiveUnexpectedPacket:(NSData *)packet; -@end - -#pragma mark * ICMP On-The-Wire Format - -/*! Describes the on-the-wire header format for an ICMP ping. - * \details This defines the header structure of ping packets on the wire. Both IPv4 and - * IPv6 use the same basic structure. - * - * This is declared in the header because clients of DFPing might want to use - * it parse received ping packets. - */ - -struct DF_ICMPHeader { - uint8_t type; - uint8_t code; - uint16_t checksum; - uint16_t identifier; - uint16_t sequenceNumber; -}; -typedef struct DF_ICMPHeader DF_ICMPHeader; - -__Check_Compile_Time(sizeof(DF_ICMPHeader) == 8); -__Check_Compile_Time(offsetof(DF_ICMPHeader, type) == 0); -__Check_Compile_Time(offsetof(DF_ICMPHeader, code) == 1); -__Check_Compile_Time(offsetof(DF_ICMPHeader, checksum) == 2); -__Check_Compile_Time(offsetof(DF_ICMPHeader, identifier) == 4); -__Check_Compile_Time(offsetof(DF_ICMPHeader, sequenceNumber) == 6); - -enum { - DF_ICMPv4TypeEchoRequest = 8, ///< The ICMP `type` for a ping request; in this case `code` is always 0. - DF_ICMPv4TypeEchoReply = 0 ///< The ICMP `type` for a ping response; in this case `code` is always 0. -}; - -enum { - DF_ICMPv6TypeEchoRequest = 128, ///< The ICMP `type` for a ping request; in this case `code` is always 0. - DF_ICMPv6TypeEchoReply = 129 ///< The ICMP `type` for a ping response; in this case `code` is always 0. -}; - -NS_ASSUME_NONNULL_END - -typedef void(^DFPING_RET)(int ret); -@interface DFSimplePing : NSObject - -+(id _Nullable )sharedMe; --(void)pingNetWork:(DFPING_RET _Nullable )result; - -@end - - - diff --git a/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/DFRing.h b/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/DFRing.h deleted file mode 100644 index df1697a81..000000000 --- a/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/DFRing.h +++ /dev/null @@ -1,52 +0,0 @@ -// -// DFRing.h -// libDVRunning -// -// Created by DFung on 2017/7/13. -// Copyright © 2017年 DFung. All rights reserved. -// - -#import - -@interface DFRing : NSObject -@property(assign,nonatomic)int32_t len_total; - - -/** - * 用途:【Ring Buffer】剩余容量 - * @return uint32_t 容量大小 - */ --(uint32_t)ringUsable; - -/** - * 用途:创建【Ring Buffer】 - * @param size 循环buffer的大小 - * @return BOOL 创建是否成功 - */ --(BOOL)ringMakeSize:(int32_t)size; - -/** - * 用途:存入数据。 - * @param buf 数据地址 - * @param size 数据大小 - */ --(uint32_t)ringPut:(void*)buf Size:(uint32_t)size; - -/** - * 用途:获取数据。 - * @param buf 数据地址 - * @param size 数据大小 - */ --(uint32_t)ringGet:(void*)buf Size:(uint32_t)size; - -/** - * 用途:擦除【Ring Buffer】的数据。 - */ --(void)ringClean; - -/** - * 用途:完全释放【Ring Buffer】 - */ --(void)ringRelease; - -@end diff --git a/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/DFSort.h b/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/DFSort.h deleted file mode 100644 index 5ed1994e5..000000000 --- a/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/DFSort.h +++ /dev/null @@ -1,32 +0,0 @@ -// -// DFSort.h -// DFUnits -// -// Created by DFung on 16/1/29. -// Copyright © 2016年 DFung. All rights reserved. -// - - -#import -#include - - - - - -@interface DFSort : NSObject - -void DescendingSort(int* arr,int left, int right); -void AscendingSort(int* arr,int left, int right); - - -/** - * 打乱数组顺序。 - * @param array - */ -+(NSArray*)arrayRandom:(NSArray*)array; - - -@end - - diff --git a/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/DFTime.h b/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/DFTime.h deleted file mode 100644 index 517df77b7..000000000 --- a/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/DFTime.h +++ /dev/null @@ -1,115 +0,0 @@ -// -// DFTime.h -// -// -// Created by Mac on 15/12/10. -// -// - -#import - -@interface DFTime : NSObject -/** - 返回时间戳(单位:秒) -*/ -+(long)dateCurrent; - -/** - * 获取iPhone时间(数组形式)。 - * @return @"2016" @"2" @"18" @"11" @"26" @"00" - */ -+(NSArray*)dateMembers; - -/** - * 获取iPhone时间(字符串形式)。 - * @return @"20160218112600" - */ -+ (NSString*)dateString; - -/** - * 编辑日期时间 - */ -+(NSDate*)makeDateYear:(int)y - Month:(int)mo - Day:(int)d - Hour:(int)h - Min:(int)m - Sec:(int)s; - -/** - * 将字符串日期分解时间成员,@"20160218112600" => @"2016" @"2" @"18" @"11" @"26" @"00" - * @param time @"20160218112600" - * @return @"2016" @"2" @"18" @"11" @"26" @"00" - */ -+ (NSArray*)divideDateMembers:(NSString*)time; - -/** - * 时间值加“秒”值。 - * @param sec 秒数 - * @param date @"20160218112600" - */ -+ (NSString*)addSec:(NSTimeInterval)sec OnDate:(NSString *)date; - -/** - * 求两个时间点差值。(timeA-timeB) - * @param timeA @"20160218112601" - * @param timeB @"20160218112600" - */ -+(NSTimeInterval)differenceOfDateA:(NSString*)timeA AndDateB:(NSString*)timeB; - -/** - * 求两个时间点差值。(dateA-dateB) - * @param dateA - * @param dateB - */ -+(NSTimeInterval)gapOfDateA:(NSDate*)dateA DateB:(NSDate*)dateB; - - -/** - * 当前【天】 - */ -+ (NSInteger)day:(NSDate *)date; - -/** - * 当前【月】 - */ -+ (NSInteger)month:(NSDate *)date; - -/** - * 当前【年】 - */ -+ (NSInteger)year:(NSDate *)date; - -/** - * 当前【星期】 - */ -+ (NSInteger)weekday:(NSDate *)date; - -/** - * 这周是这个月的第几周? - */ -+ (NSInteger)firstWeekdayInThisMonth:(NSDate *)date; - -/** - * 获取当前月天数 - */ -+ (NSInteger)totaldaysInMonth:(NSDate *)date; - -/** - * 上/下m个月后的时间。 - */ -+ (NSDate *)changeMonth:(int)m onDate:(NSDate *)date; - -/** - * 上/下d个天后的时间。 - */ -+ (NSDate *)changeDay:(int)d onDate:(NSDate *)date; - -/** - * 秒数换算 - * 输入 :60秒 (uint32_t) - * 返回 :00:01:00 (NSString*) - */ -+(NSString*)stringFromSec:(uint32_t)sec; - -@end diff --git a/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/DFTips.h b/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/DFTips.h deleted file mode 100644 index 19ec36b1a..000000000 --- a/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/DFTips.h +++ /dev/null @@ -1,496 +0,0 @@ -// -// DFTips.h -// JMAirKissDemo -// -// Created by DFung on 2016/12/9. -// Copyright © 2016年 com.DFung. All rights reserved. -// - -#import -#import -#import - -@protocol DFTipsDelegate; - - -typedef NS_ENUM(NSInteger, DFTipsMode) { - /** Progress is shown using an UIActivityIndicatorView. This is the default. */ - DFTipsModeIndeterminate, - /** Progress is shown using a round, pie-chart like, progress view. */ - DFTipsModeDeterminate, - /** Progress is shown using a horizontal progress bar */ - DFTipsModeDeterminateHorizontalBar, - /** Progress is shown using a ring-shaped progress view. */ - DFTipsModeAnnularDeterminate, - /** Shows a custom view */ - DFTipsModeCustomView, - /** Shows only labels */ - DFTipsModeText -}; - -typedef NS_ENUM(NSInteger, DFTipsAnimation) { - /** Opacity animation */ - DFTipsAnimationFade, - /** Opacity + scale animation */ - DFTipsAnimationZoom, - DFTipsAnimationZoomOut = DFTipsAnimationZoom, - DFTipsAnimationZoomIn -}; - - -#ifndef DF_MB_INSTANCETYPE -#if __has_feature(objc_instancetype) -#define DF_MB_INSTANCETYPE instancetype -#else -#define DF_MB_INSTANCETYPE id -#endif -#endif - -#ifndef DF_MB_STRONG -#if __has_feature(objc_arc) -#define DF_MB_STRONG strong -#else -#define DF_MB_STRONG retain -#endif -#endif - -#ifndef DF_MB_WEAK -#if __has_feature(objc_arc_weak) -#define DF_MB_WEAK weak -#elif __has_feature(objc_arc) -#define DF_MB_WEAK unsafe_unretained -#else -#define DF_MB_WEAK assign -#endif -#endif - -#if NS_BLOCKS_AVAILABLE -typedef void (^DFTipsCompletionBlock)(); -#endif - - -/** - * Displays a simple HUD window containing a progress indicator and two optional labels for short messages. - * - * This is a simple drop-in class for displaying a progress HUD view similar to Apple's private UIProgressHUD class. - * The DFTips window spans over the entire space given to it by the initWithFrame constructor and catches all - * user input on this region, thereby preventing the user operations on components below the view. The HUD itself is - * drawn centered as a rounded semi-transparent view which resizes depending on the user specified content. - * - * This view supports four modes of operation: - * - DFTipsModeIndeterminate - shows a UIActivityIndicatorView - * - DFTipsModeDeterminate - shows a custom round progress indicator - * - DFTipsModeAnnularDeterminate - shows a custom annular progress indicator - * - DFTipsModeCustomView - shows an arbitrary, user specified view (@see customView) - * - * All three modes can have optional labels assigned: - * - If the labelText property is set and non-empty then a label containing the provided content is placed below the - * indicator view. - * - If also the detailsLabelText property is set then another label is placed below the first label. - */ -@interface DFTips : UIView - -/** - * Creates a new HUD, adds it to provided view and shows it. The counterpart to this method is hideHUDForView:animated:. - * - * @param view The view that the HUD will be added to - * @param animated If set to YES the HUD will appear using the current animationType. If set to NO the HUD will not use - * animations while appearing. - * @return A reference to the created HUD. - * - * @see hideHUDForView:animated: - * @see animationType - */ -+ (DF_MB_INSTANCETYPE)showHUDAddedTo:(UIView *)view animated:(BOOL)animated; - -/** - * Finds the top-most HUD subview and hides it. The counterpart to this method is showHUDAddedTo:animated:. - * - * @param view The view that is going to be searched for a HUD subview. - * @param animated If set to YES the HUD will disappear using the current animationType. If set to NO the HUD will not use - * animations while disappearing. - * @return YES if a HUD was found and removed, NO otherwise. - * - * @see showHUDAddedTo:animated: - * @see animationType - */ -+ (BOOL)hideHUDForView:(UIView *)view animated:(BOOL)animated; - -/** - * Finds all the HUD subviews and hides them. - * - * @param view The view that is going to be searched for HUD subviews. - * @param animated If set to YES the HUDs will disappear using the current animationType. If set to NO the HUDs will not use - * animations while disappearing. - * @return the number of HUDs found and removed. - * - * @see hideHUDForView:animated: - * @see animationType - */ -+ (NSUInteger)hideAllHUDsForView:(UIView *)view animated:(BOOL)animated; - -/** - * Finds the top-most HUD subview and returns it. - * - * @param view The view that is going to be searched. - * @return A reference to the last HUD subview discovered. - */ -+ (DF_MB_INSTANCETYPE)HUDForView:(UIView *)view; - -/** - * Finds all HUD subviews and returns them. - * - * @param view The view that is going to be searched. - * @return All found HUD views (array of DFTips objects). - */ -+ (NSArray *)allHUDsForView:(UIView *)view; - -/** - * A convenience constructor that initializes the HUD with the window's bounds. Calls the designated constructor with - * window.bounds as the parameter. - * - * @param window The window instance that will provide the bounds for the HUD. Should be the same instance as - * the HUD's superview (i.e., the window that the HUD will be added to). - */ -- (id)initWithWindow:(UIWindow *)window; - -/** - * A convenience constructor that initializes the HUD with the view's bounds. Calls the designated constructor with - * view.bounds as the parameter - * - * @param view The view instance that will provide the bounds for the HUD. Should be the same instance as - * the HUD's superview (i.e., the view that the HUD will be added to). - */ -- (id)initWithView:(UIView *)view; - -/** - * Display the HUD. You need to make sure that the main thread completes its run loop soon after this method call so - * the user interface can be updated. Call this method when your task is already set-up to be executed in a new thread - * (e.g., when using something like NSOperation or calling an asynchronous call like NSURLRequest). - * - * @param animated If set to YES the HUD will appear using the current animationType. If set to NO the HUD will not use - * animations while appearing. - * - * @see animationType - */ -- (void)show:(BOOL)animated; - -/** - * Hide the HUD. This still calls the hudWasHidden: delegate. This is the counterpart of the show: method. Use it to - * hide the HUD when your task completes. - * - * @param animated If set to YES the HUD will disappear using the current animationType. If set to NO the HUD will not use - * animations while disappearing. - * - * @see animationType - */ -- (void)hide:(BOOL)animated; - -/** - * Hide the HUD after a delay. This still calls the hudWasHidden: delegate. This is the counterpart of the show: method. Use it to - * hide the HUD when your task completes. - * - * @param animated If set to YES the HUD will disappear using the current animationType. If set to NO the HUD will not use - * animations while disappearing. - * @param delay Delay in seconds until the HUD is hidden. - * - * @see animationType - */ -- (void)hide:(BOOL)animated afterDelay:(NSTimeInterval)delay; - -/** - * Shows the HUD while a background task is executing in a new thread, then hides the HUD. - * - * This method also takes care of autorelease pools so your method does not have to be concerned with setting up a - * pool. - * - * @param method The method to be executed while the HUD is shown. This method will be executed in a new thread. - * @param target The object that the target method belongs to. - * @param object An optional object to be passed to the method. - * @param animated If set to YES the HUD will (dis)appear using the current animationType. If set to NO the HUD will not use - * animations while (dis)appearing. - */ -- (void)showWhileExecuting:(SEL)method onTarget:(id)target withObject:(id)object animated:(BOOL)animated; - -#if NS_BLOCKS_AVAILABLE - -/** - * Shows the HUD while a block is executing on a background queue, then hides the HUD. - * - * @see showAnimated:whileExecutingBlock:onQueue:completionBlock: - */ -- (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block; - -/** - * Shows the HUD while a block is executing on a background queue, then hides the HUD. - * - * @see showAnimated:whileExecutingBlock:onQueue:completionBlock: - */ -- (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block completionBlock:(DFTipsCompletionBlock)completion; - -/** - * Shows the HUD while a block is executing on the specified dispatch queue, then hides the HUD. - * - * @see showAnimated:whileExecutingBlock:onQueue:completionBlock: - */ -- (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block onQueue:(dispatch_queue_t)queue; - -/** - * Shows the HUD while a block is executing on the specified dispatch queue, executes completion block on the main queue, and then hides the HUD. - * - * @param animated If set to YES the HUD will (dis)appear using the current animationType. If set to NO the HUD will - * not use animations while (dis)appearing. - * @param block The block to be executed while the HUD is shown. - * @param queue The dispatch queue on which the block should be executed. - * @param completion The block to be executed on completion. - * - * @see completionBlock - */ -- (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block onQueue:(dispatch_queue_t)queue - completionBlock:(DFTipsCompletionBlock)completion; - -/** - * A block that gets called after the HUD was completely hidden. - */ -@property (copy) DFTipsCompletionBlock completionBlock; - -#endif - -/** - * DFTips operation mode. The default is DFTipsModeIndeterminate. - * - * @see DFTipsMode - */ -@property (assign) DFTipsMode mode; - -/** - * The animation type that should be used when the HUD is shown and hidden. - * - * @see DFTipsAnimation - */ -@property (assign) DFTipsAnimation animationType; - -/** - * The UIView (e.g., a UIImageView) to be shown when the HUD is in DFTipsModeCustomView. - * For best results use a 37 by 37 pixel view (so the bounds match the built in indicator bounds). - */ -@property (DF_MB_STRONG) UIView *customView; - -/** - * The HUD delegate object. - * - * @see DFTipsDelegate - */ -@property (DF_MB_WEAK) id delegate; - -/** - * An optional short message to be displayed below the activity indicator. The HUD is automatically resized to fit - * the entire text. If the text is too long it will get clipped by displaying "..." at the end. If left unchanged or - * set to @"", then no message is displayed. - */ -@property (copy) NSString *labelText; - -/** - * An optional details message displayed below the labelText message. This message is displayed only if the labelText - * property is also set and is different from an empty string (@""). The details text can span multiple lines. - */ -@property (copy) NSString *detailsLabelText; - -/** - * The opacity of the HUD window. Defaults to 0.8 (80% opacity). - */ -@property (assign) float opacity; - -/** - * The color of the HUD window. Defaults to black. If this property is set, color is set using - * this UIColor and the opacity property is not used. using retain because performing copy on - * UIColor base colors (like [UIColor greenColor]) cause problems with the copyZone. - */ -@property (DF_MB_STRONG) UIColor *color; - -/** - * The x-axis offset of the HUD relative to the centre of the superview. - */ -@property (assign) float xOffset; - -/** - * The y-axis offset of the HUD relative to the centre of the superview. - */ -@property (assign) float yOffset; - -/** - * The amount of space between the HUD edge and the HUD elements (labels, indicators or custom views). - * Defaults to 20.0 - */ -@property (assign) float margin; - -/** - * The corner radius for the HUD - * Defaults to 10.0 - */ -@property (assign) float cornerRadius; - -/** - * Cover the HUD background view with a radial gradient. - */ -@property (assign) BOOL dimBackground; - -/* - * Grace period is the time (in seconds) that the invoked method may be run without - * showing the HUD. If the task finishes before the grace time runs out, the HUD will - * not be shown at all. - * This may be used to prevent HUD display for very short tasks. - * Defaults to 0 (no grace time). - * Grace time functionality is only supported when the task status is known! - * @see taskInProgress - */ -@property (assign) float graceTime; - -/** - * The minimum time (in seconds) that the HUD is shown. - * This avoids the problem of the HUD being shown and than instantly hidden. - * Defaults to 0 (no minimum show time). - */ -@property (assign) float minShowTime; - -/** - * Indicates that the executed operation is in progress. Needed for correct graceTime operation. - * If you don't set a graceTime (different than 0.0) this does nothing. - * This property is automatically set when using showWhileExecuting:onTarget:withObject:animated:. - * When threading is done outside of the HUD (i.e., when the show: and hide: methods are used directly), - * you need to set this property when your task starts and completes in order to have normal graceTime - * functionality. - */ -@property (assign) BOOL taskInProgress; - -/** - * Removes the HUD from its parent view when hidden. - * Defaults to NO. - */ -@property (assign) BOOL removeFromSuperViewOnHide; - -/** - * Font to be used for the main label. Set this property if the default is not adequate. - */ -@property (DF_MB_STRONG) UIFont* labelFont; - -/** - * Color to be used for the main label. Set this property if the default is not adequate. - */ -@property (DF_MB_STRONG) UIColor* labelColor; - -/** - * Font to be used for the details label. Set this property if the default is not adequate. - */ -@property (DF_MB_STRONG) UIFont* detailsLabelFont; - -/** - * Color to be used for the details label. Set this property if the default is not adequate. - */ -@property (DF_MB_STRONG) UIColor* detailsLabelColor; - -/** - * The color of the activity indicator. Defaults to [UIColor whiteColor] - * Does nothing on pre iOS 5. - */ -@property (DF_MB_STRONG) UIColor *activityIndicatorColor; - -/** - * The progress of the progress indicator, from 0.0 to 1.0. Defaults to 0.0. - */ -@property (assign) float progress; - -/** - * The minimum size of the HUD bezel. Defaults to CGSizeZero (no minimum size). - */ -@property (assign) CGSize minSize; - - -/** - * The actual size of the HUD bezel. - * You can use this to limit touch handling on the bezel aria only. - * @see https://github.com/jdg/DFTips/pull/200 - */ -@property (atomic, assign, readonly) CGSize size; - - -/** - * Force the HUD dimensions to be equal if possible. - */ -@property (assign, getter = isSquare) BOOL square; - -@end - - -@protocol DFTipsDelegate - -@optional - -/** - * Called after the HUD was fully hidden from the screen. - */ -- (void)hudWasHidden:(DFTips *)hud; - -@end - - -/** - * A progress view for showing definite progress by filling up a circle (pie chart). - */ -@interface DF_MBRoundProgressView : UIView - -/** - * Progress (0.0 to 1.0) - */ -@property (nonatomic, assign) float progress; - -/** - * Indicator progress color. - * Defaults to white [UIColor whiteColor] - */ -@property (nonatomic, DF_MB_STRONG) UIColor *progressTintColor; - -/** - * Indicator background (non-progress) color. - * Defaults to translucent white (alpha 0.1) - */ -@property (nonatomic, DF_MB_STRONG) UIColor *backgroundTintColor; - -/* - * Display mode - NO = round or YES = annular. Defaults to round. - */ -@property (nonatomic, assign, getter = isAnnular) BOOL annular; - -@end - - -/** - * A flat bar progress view. - */ -@interface DF_MBBarProgressView : UIView - -/** - * Progress (0.0 to 1.0) - */ -@property (nonatomic, assign) float progress; - -/** - * Bar border line color. - * Defaults to white [UIColor whiteColor]. - */ -@property (nonatomic, DF_MB_STRONG) UIColor *lineColor; - -/** - * Bar background color. - * Defaults to clear [UIColor clearColor]; - */ -@property (nonatomic, DF_MB_STRONG) UIColor *progressRemainingColor; - -/** - * Bar progress color. - * Defaults to white [UIColor whiteColor]. - */ -@property (nonatomic, DF_MB_STRONG) UIColor *progressColor; - -@end - diff --git a/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/DFTools.h b/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/DFTools.h deleted file mode 100644 index 7ee8c3f84..000000000 --- a/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/DFTools.h +++ /dev/null @@ -1,161 +0,0 @@ -// -// DFTools.h -// DFUnits -// -// Created by DFung on 16/1/22. -// Copyright © 2016年 DFung. All rights reserved. -// - -#import - - -@interface DFTools : NSObject - -/** - * NSString to NSMutableData - * - * @"ffff0000" => - * - * @param str:NSString - * @return NSMutableData - */ -+(NSMutableData*)HexToData:(NSString*)hex; - -/** - * NSData to NSString - * - * => @"ffff0000" - * - * @param data:NSData - * @return NSString - */ -+(NSString*)dataToHex:(NSData*)data; - -/** - * Alignment data in length you like. - * 将data按照指定的长度补齐 - */ -+(NSData*)alignment:(NSData*)data length:(NSInteger)len; - -/** - * NSData ==> NSDictory. - * 将 Json 字节码转换成 NSDictory。 - */ -+(id)jsonWithData:(NSData*)data; - -/** - * NSDictory ==> NSString. - */ -+(NSString*)dictionaryToJson:(NSDictionary *)dic; - -/** - * NSDictory ==> NSData. - */ -+(NSData*)makeDataByDictionary:(NSDictionary *)dic; - -/** - * NSData ==> NSDictory. - */ -+(NSDictionary*)makeDictionaryByData:(NSData *)data; - -/** - * NSArray ==> NSString. - */ -+(NSString*)arrayToJson:(NSArray *)array; - -/** - * 将 uint32_t 的4个字节转换成 NSData。 - */ -+(NSData*)uInt32_data:(uint32_t)value; - -/** - * 将 uint32_t 的4个字节转换成 NSData。 - * @param endian:是否改变大小端 - */ -+(NSData*)uInt32_data:(uint32_t)value Endian:(BOOL)endian; - -/** - * 将 uint16_t 的2个字节转换成 NSData。 - */ -+(NSData*)uInt16_data:(uint16_t)value; - -/** - * 将 uint16_t 的2个字节转换成 NSData。 - * @param endian:是否改变大小端 - */ -+(NSData*)uInt16_data:(uint16_t)value Endian:(BOOL)endian; - -+(NSData*)uInt8_data:(uint8_t)value; - -/** - * Change Big Or Small Endian(改变NSData的大小端。) - * <000f> => <0f00> - * - * @param data:NSData - * @return NSData - */ -+(NSData*)changeBigOrSmall:(NSData*)data; - -/** - * NSData to 10进制 - * - * <000f> => 16 - * - * @param data:NSData - * @return NSInteger - */ -+(NSInteger)dataToInt:(NSData*)data; - -/** - * 求自然数:aByte ==> -1 0 1 2 3... - */ -+(int)getNaturalNumber:(NSData*)aByte; - -/** - * 简写: [data subdataWithRange:NSMakeRange(index, length)]; - */ -+(NSData*)data:(NSData*)data R:(NSInteger)index L:(NSInteger)length; - -/** - * 简写: [[NSString alloc] initWithData:data encoding:encoding]; - */ -+(NSString*)string:(NSData*)data Encode:(NSStringEncoding)encoding; - -/** - * 简写: [NSString stringWithFormat:(NSString *)format, ...]; - */ -+(NSString*)string:(NSArray*)array; - - -/** - * UNICODE 编码字符串 - */ -+(NSString*)stringUnicode:(NSData*)data; - -/** - * ANSI 编码字符串 - */ -+(NSString*)stringANSI:(NSData*)data; - -/** - * GBK 编码字符串 - */ -+(NSString*)stringGBK:(NSData*)data; - -/** - * 存入 NSUserDefaults - */ -+(void)setUser:(id)objc forKey:(NSString*)key; - -/** - * 取出 NSUserDefaults - */ -+(id)getUserByKey:(NSString*)key; - -/** - * 移除 NSUserDefaults - */ -+(void)removeUserByKey:(NSString*)key; - - -@end diff --git a/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/DFUIAnimation.h b/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/DFUIAnimation.h deleted file mode 100644 index 08d22d623..000000000 --- a/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/DFUIAnimation.h +++ /dev/null @@ -1,21 +0,0 @@ -// -// DFUIAnimation.h -// DFUIBox -// -// Created by DFung on 16/5/18. -// Copyright © 2016年 DFung. All rights reserved. -// - -#import - - -typedef enum : NSUInteger { - DFUIAnimation_TYPE_SPRING, -} DFUIAnimation_TYPE; - -@interface DFUIAnimation : NSObject - -+ (void)showView:(UIView*)view Type:(DFUIAnimation_TYPE)type Completed:(void(^)(BOOL finished))block; -+ (void)hideView:(UIView*)view Type:(DFUIAnimation_TYPE)type Completed:(void(^)(BOOL finished))block; - -@end diff --git a/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/DFUIPullView.h b/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/DFUIPullView.h deleted file mode 100644 index 020162eb6..000000000 --- a/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/DFUIPullView.h +++ /dev/null @@ -1,46 +0,0 @@ -// -// DFUIPullView.h -// RetainTest -// -// Created by DFung on 2016/12/7. -// Copyright © 2016年 DFung. All rights reserved. -// - -#import - - -#define kPULLVIEW_IMAGE_SIZE 40.0 -#define kPULLVIEW_TIME 1.5 - -typedef enum : NSUInteger { - PullView_TYPE_TABLEVIEW, - PullView_TYPE_COLLECTIONVIEW -} PullView_TYPE; - - - - -@protocol DFUIPullViewDelegate -@optional - --(void)onDFUIPullViewIsLoading; --(void)onDFUIPullViewLoadFinished; - -@end - - - -@interface DFUIPullView : UIView - -@property(nonatomic,weak) iddelegate; -@property(nonatomic,strong) NSString *subText; -@property(nonatomic,weak) UIScrollView *outScrollView; -@property(nonatomic,weak) id outView; - -- (instancetype)initWithScrollView:(UIScrollView*)scrollView - Type:(PullView_TYPE)type - OnView:(id)view; - -- (void)setSubImage:(UIImage*)sImage; - -@end diff --git a/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/DFUITools.h b/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/DFUITools.h deleted file mode 100644 index 13cc29f32..000000000 --- a/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/DFUITools.h +++ /dev/null @@ -1,215 +0,0 @@ -// -// DFUITools.h -// DFUnits -// -// Created by DFung on 2016/12/9. -// Copyright © 2016年 DFung. All rights reserved. -// - -#import -#import - -typedef void (^TipsCompletion) (void); - - -@class DFTips; -@interface DFUITools : NSObject - -#define kDF_SCR_W_0 (int)[DFUITools screen_W] -#define kDF_SCR_H_0 (int)[DFUITools screen_H] - -#define kDF_SCR_W_1 (int)[DFUITools screen_1_W] -#define kDF_SCR_H_1 (int)[DFUITools screen_1_H] -#define kDF_RGBA(r,g,b,a) [UIColor colorWithRed:((r)/255.0) green:((g)/255.0) blue:((b)/255.0) alpha:(a)] - -#pragma mark 屏幕尺寸 -/** - * 设备屏幕的【宽】 - */ -+(CGFloat)screen_W; - -/** - * 设备屏幕的【长】 - */ -+(CGFloat)screen_H; - -/** - * 设备竖屏的【宽】 - */ -+(float)screen_1_W; - -/** - * 设备竖屏的【长】 - */ -+(float)screen_1_H; - -/** - * iPhone竖屏的【宽】 - */ -+(float)screen_2_W; - -/** - * iPhone竖屏的【长】 - */ -+(float)screen_2_H; - -/** - * 获取手机版本 - */ -+(float)getVersion; - -/** - * 获取当前设备UUID - */ -+(NSString*)getUUID; - -/** - * 获取当前UIWindow - */ -+(UIWindow*)getWindow; - -/** - * 多语言化:当前系统语言 - */ -+(NSString*)systemLanguage; - -/** - * 多语言化:选择 - */ -+(void)languageSet:(NSString*)lan; - -/** - * 多语言化:翻译 - */ -+(NSString*)languageText:(NSString*)key Table:(NSString*)table; - -/** - * 设置UIButton的图片 - */ -+(void)setButton:(UIButton*)btn Image:(NSString*)image; -+(void)setButton:(UIButton*)btn Image_1:(UIImage*)image; - -/** - * 设置UIButton的文字 - */ -+(void)setButton:(UIButton*)btn Text:(NSString*)text; - -/** - * 设置UIButton的字体颜色 - */ -+(void)setButton:(UIButton*)btn Color:(UIColor*)color; - -/** - * 获取【定宽Label】的【高】。 - */ -+ (CGFloat)labelHeightByWidth:(CGFloat)width Text:(NSString *)text Font:(UIFont *)font; - -/** - * 获取【定宽Label】的【宽】。 - */ -+ (CGFloat)labelWidthByWidth:(CGFloat)width Text:(NSString *)text Font:(UIFont *)font; - -/** - * 加载Nib文件的UI。 - */ -+(id)loadNib:(NSString*)name; - - -/** - * 增加触摸事件。 - */ -+(UITapGestureRecognizer*)addSingleTaps:(int)taps - View:(UIView*)view - Target:(id)target - Action:(SEL)action; - - -/** - * 弄个UIColor,【RGB值】和【透明度Alpha】 - */ -+(UIColor*)colorR:(float)r G:(float)g B:(float)b AP:(float)ap; - - - - -#pragma mark >>> DFTips___APIs___ -+ (DFTips *)showHUDWithLabel:(NSString *)labelText - onView:(UIView *)view; - -+ (DFTips *)showHUDWithLabel_1:(NSString *)labelText - onView:(UIView *)view; - -+ (DFTips *)showHUDWithDetailLabel:(NSString *)detailLabelText - onView:(UIView *)view; - -+ (DFTips *)showHUDOnWindowWithLabel:(NSString *)labelText; - -+ (DFTips *)showHUDWithLabel:(NSString *)labelText - onView:(UIView *)view - color:(UIColor *)color; - -+ (DFTips *)showHUDWithLabel:(NSString *)labelText - onView:(UIView *)view - color:(UIColor *)color - labelTextColor:(UIColor *)textColor - activityIndicatorColor:(UIColor *)actIndicatorColor; - -+ (DFTips *)showHUDWithLabel:(NSString *)labelText - onView:(UIView *)view - alpha:(float)alpha - color:(UIColor *)color - labelTextColor:(UIColor *)textColor - activityIndicatorColor:(UIColor *)actIndicatorColor; - -+ (DFTips *)showHUDOnWindowWithLabel:(NSString *)labelText - color:(UIColor *)color; - -+ (DFTips *)showTransparentHUDWithLabel:(NSString *)labelText - onView:(UIView *)view; - -+ (DFTips *)showTransparentHUDOnWindowWithLabel:(NSString *)labelText - labelTextColor:(UIColor *)textColor; - -+ (DFTips *)showTransparentHUDOnWindowWithLabel:(NSString *)labelText; - -+ (DFTips *)changeLabelText:(NSString *)labelText; - -+ (DFTips *)changeDetailLabelText:(NSString *)labelText; - -+ (void)removeHUD; - -+ (void)removeHUDWithDelay:(float)time; - -+ (void)removeHUDWithDelay:(float)time - completion:(TipsCompletion)completion; - -+ (void)showText:(NSString *)text - onView:(UIView *)view - delay:(float)time; - -+ (void)showText:(NSString *)text - onView:(UIView *)view - delay:(float)time - completion:(TipsCompletion)completion; - -+ (void)showText_1:(NSString *)text - onView:(UIView *)view - delay:(float)time; - -+ (void)showDetailText:(NSString *)text - onView:(UIView *)view - delay:(float)time; - -+ (void)showDetailText:(NSString *)text - onView:(UIView *)view - delay:(float)time - completion:(TipsCompletion)completion; - -+(void)showClearLayer; -+(void)showClearLayerDelay:(NSTimeInterval)time; - -+(void)openWaittting:(NSString*)text delay:(NSTimeInterval)time; -+(void)closeWaitting:(NSTimeInterval)time; - - -@end diff --git a/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/DFUnits.h b/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/DFUnits.h deleted file mode 100644 index be0a9b606..000000000 --- a/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/DFUnits.h +++ /dev/null @@ -1,51 +0,0 @@ -// -// DFUnits.h -// DFUnits -// -// Created by EzioChan on 2022/6/29. -// - -#import - -//! Project version number for DFUnits. -FOUNDATION_EXPORT double DFUnitsVersionNumber; - -//! Project version string for DFUnits. -FOUNDATION_EXPORT const unsigned char DFUnitsVersionString[]; - -// In this header, you should import all the public headers of your framework using statements like #import - -//Using statements like #import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import - -#import -#import -#import -#import -#import -#import -#import - -#define DFLog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__); diff --git a/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/DFVideo.h b/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/DFVideo.h deleted file mode 100644 index e1285a56a..000000000 --- a/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/DFVideo.h +++ /dev/null @@ -1,38 +0,0 @@ -// -// DFVideo.h -// DFUnits -// -// Created by DFung on 16/1/22. -// Copyright © 2016年 DFung. All rights reserved. -// - -#import - -@interface DFVideo : NSObject - -/** - * 用途:获得AVI视频的PreViewImage。 - * @param path 文件路径 - * @return @{@"IMG" : 图片Data, - * @"SIZE": 宽高, - * @"TIME": 时长} - */ -+(NSDictionary*)previewAVI:(NSString*)path; - -/** - * 用途:获得AVI视频的PreViewImage。 - * @param data 文件数据 - * @return @{@"IMG" : 图片Data, - * @"SIZE": 宽高, - * @"TIME": 时长} - */ -+(NSDictionary *)previewData:(NSData*)data; - -/** - * 用途:秒数换算成时间字符串。 - * @param total 秒数(60s ==> 00:01:00) - * @return @"00:01:00" - */ -+(NSString *)timeTyping:(long)total; - -@end diff --git a/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/OPenALM.h b/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/OPenALM.h deleted file mode 100644 index 19dfd3b58..000000000 --- a/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/OPenALM.h +++ /dev/null @@ -1,59 +0,0 @@ -// -// OPenALM.h -// OpenALForPCM -// -// Created by 陈冠杰 on 16/2/15. -// Copyright © 2016年 zh-JieLi. All rights reserved. -// - -#import -#import -#import -#import -#import - -#include "queue.h" - - -struct AL_Data{ - int size; - unsigned char *data; -}; - - - -/** - * 【OPenALM】播放停止 - */ -#define kOPenALM_STOP @"OPenALM_STOP" - - - -@interface OPenALM : NSObject -{ - ALCcontext *mContext; - ALCdevice *mDevicde; - ALuint outSourceId; - ALuint buff; -} - -@property(nonatomic)ALCcontext *mContext; -@property(nonatomic)ALCdevice *mDevice; - -/** - * Need Import - * - */ --(void)inputAudioBuffer:(struct AL_Data*)pkg; - --(BOOL)updataQueueBuffer; - --(void)playSound; - --(void)stopSound; - --(void)cleanUpOpenAL; - --(void)cleanMe; - -@end diff --git a/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/TPCircularBuffer.h b/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/TPCircularBuffer.h deleted file mode 100644 index b19bc6ad3..000000000 --- a/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/TPCircularBuffer.h +++ /dev/null @@ -1,224 +0,0 @@ -// -// TPCircularBuffer.h -// Circular/Ring buffer implementation -// -// https://github.com/michaeltyson/TPCircularBuffer -// -// Created by Michael Tyson on 10/12/2011. -// -// -// This implementation makes use of a virtual memory mapping technique that inserts a virtual copy -// of the buffer memory directly after the buffer's end, negating the need for any buffer wrap-around -// logic. Clients can simply use the returned memory address as if it were contiguous space. -// -// The implementation is thread-safe in the case of a single producer and single consumer. -// -// Virtual memory technique originally proposed by Philip Howard (http://vrb.slashusr.org/), and -// adapted to Darwin by Kurt Revis (http://www.snoize.com, -// http://www.snoize.com/Code/PlayBufferedSoundFile.tar.gz) -// -// -// Copyright (C) 2012-2013 A Tasty Pixel -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// -// 3. This notice may not be removed or altered from any source distribution. -// - -#ifndef TPCircularBuffer_h -#define TPCircularBuffer_h - -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct { - void *buffer; - int32_t length; - int32_t tail; - int32_t head; - volatile int32_t fillCount; - bool atomic; -} TPCircularBuffer; - -/*! - * Initialise buffer - * - * Note that the length is advisory only: Because of the way the - * memory mirroring technique works, the true buffer length will - * be multiples of the device page size (e.g. 4096 bytes) - * - * @param buffer Circular buffer - * @param length Length of buffer - */ -#define TPCircularBufferInit(buffer, length) \ - _TPCircularBufferInit(buffer, length, sizeof(*buffer)) -bool _TPCircularBufferInit(TPCircularBuffer *buffer, int32_t length, size_t structSize); - -/*! - * Cleanup buffer - * - * Releases buffer resources. - */ -void TPCircularBufferCleanup(TPCircularBuffer *buffer); - -/*! - * Clear buffer - * - * Resets buffer to original, empty state. - * - * This is safe for use by consumer while producer is accessing - * buffer. - */ -void TPCircularBufferClear(TPCircularBuffer *buffer); - -/*! - * Set the atomicity - * - * If you set the atomiticy to false using this method, the buffer will - * not use atomic operations. This can be used to give the compiler a little - * more optimisation opportunities when the buffer is only used on one thread. - * - * Important note: Only set this to false if you know what you're doing! - * - * The default value is true (the buffer will use atomic operations) - * - * @param buffer Circular buffer - * @param atomic Whether the buffer is atomic (default true) - */ -void TPCircularBufferSetAtomic(TPCircularBuffer *buffer, bool atomic); - -// Reading (consuming) - -/*! - * Access end of buffer - * - * This gives you a pointer to the end of the buffer, ready - * for reading, and the number of available bytes to read. - * - * @param buffer Circular buffer - * @param availableBytes On output, the number of bytes ready for reading - * @return Pointer to the first bytes ready for reading, or NULL if buffer is empty - */ -static __inline__ __attribute__((always_inline)) void* TPCircularBufferTail(TPCircularBuffer *buffer, int32_t* availableBytes) { - *availableBytes = buffer->fillCount; - if ( *availableBytes == 0 ) return NULL; - return (void*)((char*)buffer->buffer + buffer->tail); -} - -/*! - * Consume bytes in buffer - * - * This frees up the just-read bytes, ready for writing again. - * - * @param buffer Circular buffer - * @param amount Number of bytes to consume - */ -static __inline__ __attribute__((always_inline)) void TPCircularBufferConsume(TPCircularBuffer *buffer, int32_t amount) { - buffer->tail = (buffer->tail + amount) % buffer->length; - if ( buffer->atomic ) { - OSAtomicAdd32Barrier(-amount, &buffer->fillCount); - } else { - buffer->fillCount -= amount; - } - assert(buffer->fillCount >= 0); -} - -/*! - * Access front of buffer - * - * This gives you a pointer to the front of the buffer, ready - * for writing, and the number of available bytes to write. - * - * @param buffer Circular buffer - * @param availableBytes On output, the number of bytes ready for writing - * @return Pointer to the first bytes ready for writing, or NULL if buffer is full - */ -static __inline__ __attribute__((always_inline)) void* TPCircularBufferHead(TPCircularBuffer *buffer, int32_t* availableBytes) { - *availableBytes = (buffer->length - buffer->fillCount); - if ( *availableBytes == 0 ) return NULL; - return (void*)((char*)buffer->buffer + buffer->head); -} - -// Writing (producing) - -/*! - * Produce bytes in buffer - * - * This marks the given section of the buffer ready for reading. - * - * @param buffer Circular buffer - * @param amount Number of bytes to produce - */ -static __inline__ __attribute__((always_inline)) void TPCircularBufferProduce(TPCircularBuffer *buffer, int32_t amount) { - buffer->head = (buffer->head + amount) % buffer->length; - if ( buffer->atomic ) { - OSAtomicAdd32Barrier(amount, &buffer->fillCount); - } else { - buffer->fillCount += amount; - } - assert(buffer->fillCount <= buffer->length); -} - -/*! - * Helper routine to copy bytes to buffer - * - * This copies the given bytes to the buffer, and marks them ready for reading. - * - * @param buffer Circular buffer - * @param src Source buffer - * @param len Number of bytes in source buffer - * @return true if bytes copied, false if there was insufficient space - */ -static __inline__ __attribute__((always_inline)) bool TPCircularBufferProduceBytes(TPCircularBuffer *buffer, const void* src, int32_t len) { - int32_t space; - void *ptr = TPCircularBufferHead(buffer, &space); - if ( space < len ) return false; - memcpy(ptr, src, len); - TPCircularBufferProduce(buffer, len); - return true; -} - -/*! - * Deprecated method - */ -static __inline__ __attribute__((always_inline)) __deprecated_msg("use TPCircularBufferSetAtomic(false) and TPCircularBufferConsume instead") -void TPCircularBufferConsumeNoBarrier(TPCircularBuffer *buffer, int32_t amount) { - buffer->tail = (buffer->tail + amount) % buffer->length; - buffer->fillCount -= amount; - assert(buffer->fillCount >= 0); -} - -/*! - * Deprecated method - */ -static __inline__ __attribute__((always_inline)) __deprecated_msg("use TPCircularBufferSetAtomic(false) and TPCircularBufferProduce instead") -void TPCircularBufferProduceNoBarrier(TPCircularBuffer *buffer, int32_t amount) { - buffer->head = (buffer->head + amount) % buffer->length; - buffer->fillCount += amount; - assert(buffer->fillCount <= buffer->length); -} - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/queue.h b/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/queue.h deleted file mode 100644 index 6ba793613..000000000 --- a/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/queue.h +++ /dev/null @@ -1,317 +0,0 @@ -#ifndef __QUEUE_H__ -#define __QUEUE_H__ - -// -// Created by DFung on 16/1/25. -// Copyright © 2016年 DFung. All rights reserved. -// - -/** - * Sample Used - * - * 1.Create Queue: - * - * queue_t *qt_video = queue_create_limited(100); - * - * 2.Put Data: - * - * Type_Data * p_data = (Type_Data *)p; - * int ret = queue_put(qt_video, p_data); - * if(ret != Q_OK){ - * free(p_data); - * } - * - * 3.Get Data: - * - * Type_Data * get_frm_pkg = NULL; - * queue_get(qt_video, (void**)&get_frm_pkg); - * - * 4.Number of Data: - * - * int cache_counts = queue_elements(qt_video); - * - * 5.Destroy Queue: - * - * if (qt_video != NULL) { - * queue_destroy_complete(qt_video, queue_clean_video); - * qt_video = NULL; - * } - * static void queue_clean_video(void* tmp){ - * Type_Data * qt_tmp = (Type_Data *)tmp; - * if (qt_tmp != NULL) { - * free(qt_tmp); - * } - * } - **/ - - -#include -#include -#include /* (u)intX_t */ -#ifndef _WIN32 -#include /* usleep */ -#else -#include /* Sleep */ -#endif -#include /* EBUSY */ - -#include /* pthread_mutex_t, pthread_cond_t */ - -#ifdef _WIN32 -#define sleepmilli(x) Sleep(x) -#else -#define sleepmilli(x) usleep(x * 1000) -#endif - -/** - * type which is used for counting the number of elements. - * needed for limited queues - */ -#ifndef UINTX_MAX - typedef uint16_t uintX_t; - #define UINTX_MAX UINT16_MAX -#endif - -/** - * simple macros to reduce necessary casting to void * - * or function pointers - */ -#define DEFINE_Q_DESTROY(fname, type) int8_t fname(queue_t *q, void (*ff)(type *)) { return queue_destroy_complete(q, (void (*)(void *))ff); } -#define DEFINE_Q_FLUSH(fname, type) int8_t fname(queue_t *q, void (*ff)(type *)) { return queue_flush_complete(q, (void (*)(void *))ff); } -#define DEFINE_Q_GET(fname, type) int8_t fname(queue_t *q, type **e) { return queue_get(q, (void **)e); } -#define DEFINE_Q_GET_WAIT(fname, type) int8_t fname(queue_t *q, type **e) { return queue_get_wait(q, (void **)e); } -#define DEFINE_Q_PUT(fname, type) int8_t fname(queue_t *q, type *e) { return queue_put(q, (void *)e); } -#define DEFINE_Q_PUT_WAIT(fname, type) int8_t fname(queue_t *q, type *e) { return queue_put_wait(q, (void *)e); } -#define DEFINE_Q_FLUSH_PUT(fname, type) int8_t fname(queue_t *q, void (*ff)(type *), type *e) { return queue_flush_complete_put(q, (void (*)(void *))ff, (void *)e); } - -/** - * returned error codes, everything except Q_OK should be < 0 - */ -typedef enum queue_erros_e { - Q_OK = 0, - Q_ERR_INVALID = -1, - Q_ERR_LOCK = -2, - Q_ERR_MEM = -3, - Q_ERR_NONEWDATA = -4, - Q_ERR_INVALID_ELEMENT = -5, - Q_ERR_INVALID_CB = -6, - Q_ERR_NUM_ELEMENTS = -7 -} queue_errors_t; - -typedef struct queue_element_s { - void *data; - struct queue_element_s *next; -} queue_element_t; - -typedef struct queue_s { - queue_element_t *first_el, *last_el; - // (max.) number of elements - uintX_t num_els; - uintX_t max_els; - // no new data allowed - uint8_t new_data; - // sorted queue - int8_t sort; - int8_t asc_order; - int (*cmp_el)(void *, void *); - // multithreaded - pthread_mutex_t *mutex; - pthread_cond_t *cond_get; - pthread_cond_t *cond_put; -} queue_t; - -/** - * initializes and allocates a queue with unlimited elements - * - * returns NULL on error, or a pointer to the queue - */ -queue_t *queue_create(void); - -/** - * initializes and allocates a queue - * - * max_elements - maximum number of elements which are allowed in the queue, == 0 for "unlimited" - * - * returns NULL on error, or a pointer to the queue - */ -queue_t *queue_create_limited(uintX_t max_elements); - -/** - * just like queue_create() - * additionally you can specify a comparator function so that your elements are ordered in the queue - * elements will only be ordered if you create the queue with this method - * the compare function should return 0 if both elements are the same, < 0 if the first is smaller - * and > 0 if the second is smaller - * - * asc - sort in ascending order if not 0 - * cmp - comparator function, NULL will create an error - * - * returns NULL on error, or a pointer to the queue - */ -queue_t *queue_create_sorted(int8_t asc, int (*cmp)(void *, void *)); - -/** - * see queue_create_limited() and queue_create_sorted() - */ -queue_t *queue_create_limited_sorted(uintX_t max_elements, int8_t asc, int (*cmp)(void *, void *)); - -/** - * releases the memory internally allocated and destroys the queue - * you have to release the memory the elements in the queue use - * - * q - the queue to be destroyed - */ -int8_t queue_destroy(queue_t *q); - -/** - * in addition to queue_destroy(), this function will also free the memory of your elements - * - * q - the queue to be destroyed - * ff - the free function to be used for the elements (free() if NULL) - */ -int8_t queue_destroy_complete(queue_t *q, void (*ff)(void *)); - -/** - * deletes all the elements from the queue, but does not release their memory - * - * q - the queue - */ -int8_t queue_flush(queue_t *q); - -/** - * just like queue_flush, but releases the memory of the elements - * - * q - the queue - * ff - the free function to be used for the elements (free() if NULL) - */ -int8_t queue_flush_complete(queue_t *q, void (*ff)(void *)); - - -/** - * just like queue_flush, followed by an queue_put atomically - * - * q - the queue - * ff - the free function to be used for the elements (free() if NULL) - * e - the element - */ -int8_t queue_flush_put(queue_t *q, void (*ff)(void *), void *e); - -/** - * just like queue_flush_complete, followed by an queue_put atomically - * - * q - the queue - * ff - the free function to be used for the elements (free() if NULL) - * e - the element - */ -int8_t queue_flush_complete_put(queue_t *q, void (*ff)(void *), void *e); - -/** - * returns the number of elements in the queue - * - * q - the queue - * - * returns number of elements or UINTX_MAX if an error occured - */ -uintX_t queue_elements(queue_t *q); - -/** - * returns wether the queue is empty - * returns empty if there was an error - * - * q - the queue - * - * returns zero if queue is NOT empty, < 0 => error - */ -int8_t queue_empty(queue_t *q); - - -/** - * put a new element at the end of the queue - * will produce an error if you called queue_no_new_data() - * - * q - the queue - * e - the element - * - * returns 0 if everything worked, > 0 if max_elements is reached, < 0 if error occured - */ -int8_t queue_put(queue_t *q, void *e); - -/** - * the same as queue_put(), but will wait if max_elements is reached, - * until queue_set_new_data(, 0) is called or elements are removed - * - * q - the queue - * e - the element - * - * returns 0 if everything worked, < 0 if error occured - */ -int8_t queue_put_wait(queue_t *q, void *e); - -/** - * preview the first element of the queue(预览一个元素,但没有抽取。) - * - * q - the queue - * e - pointer which will be set to the element - * - * returns 0 if everything worked, > 0 if no elements in queue, < 0 if error occured - */ -int8_t queue_get_pre(queue_t *q, void **e); - -/** - * get the first element of the queue - * - * q - the queue - * e - pointer which will be set to the element - * - * returns 0 if everything worked, > 0 if no elements in queue, < 0 if error occured - */ -int8_t queue_get(queue_t *q, void **e); - -/** - * the same as queue_get(), but will wait if no elements are in the queue, - * until queue_set_new_data(, 0) is called or new elements are added - * - * q - the queue - * e - pointer which will be set to the element - * - * returns 0 if everything worked, < 0 if error occured - */ -int8_t queue_get_wait(queue_t *q, void **e); - -/** - * gets the first element for which the given compare function returns 0 (equal) - * does NOT wait if no elements in the queue - * the compare function should return 0 if both elements are the same, < 0 if the first is smaller - * and > 0 if the second is smaller - * - * q - the queue - * e - pointer which will be set to the element - * cmp - comparator function, NULL will create an error - * cmpel - element with which should be compared - * - * returns 0 if everything worked, < 0 => error, Q_ERR_NUM_ELEMENTS(<0) if no element fulfills the requirement - */ -int8_t queue_get_filtered(queue_t *q, void **e, int (*cmp)(void *, void *), void *cmpel); - -/** - * sets wether the queue will accept new data - * defaults to 1 on creation - * you should use this function when you're done and queue_put_wait() and queue_get_wait() should return - * queue_put()/queue_put_wait() won't have any effect when new data isn't accepted. - * - * q - the queue - * v - 0 new data NOT accepted - */ -int8_t queue_set_new_data(queue_t *q, uint8_t v); - -/** - * returns wether the queue will accept new data - * also returns 0, if there was an error - * - * q - the queue - * - * return 0 if new data is NOT accepted - */ -uint8_t queue_get_new_data(queue_t *q); - -#endif /* __QUEUE_H__ */ diff --git a/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/queue_internal.h b/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/queue_internal.h deleted file mode 100644 index bc09dfcd8..000000000 --- a/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/queue_internal.h +++ /dev/null @@ -1,97 +0,0 @@ -#ifndef __QUEUE_INTERNAL_H__ -#define __QUEUE_INTERNAL_H__ - -/** - * Copyright (C) 2011 by Tobias Thiel - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -#include -#include - -#include - -/** - * ATTENTION: - * these functions are internal and should not be used directly. - * they may _not_ lock properly, expecting the caller to do so - */ - -/** - * locks the queue - * returns 0 on success, else not usable - */ -int8_t queue_lock_internal(queue_t *q); - -/** - * unlocks the queue - * returns 0 on success, else not usable - */ -int8_t queue_unlock_internal(queue_t *q); - -/** - * adds an element to the queue. - * when action is NULL the function returns with an error code. - * queue _has_ to be locked. - * - * q - the queue - * el - the element - * action - specifies what should be executed if max_elements is reached. - * - * returns < 0 => error, 0 okay - */ -int8_t queue_put_internal(queue_t *q, void *el, int (*action)(pthread_cond_t *, pthread_mutex_t *)); - -/** - * gets the first element in the queue. - * when action is NULL the function returns with an error code. - * queue _has_ to be locked. - * - * q - the queue - * e - element pointer - * action - specifies what should be executed if there are no elements in the queue - * cmp - comparator function, NULL will create an error - * cmpel - element with which should be compared - * - * returns < 0 => error, 0 okay - */ -int8_t queue_get_internal(queue_t *q, void **e, int (*action)(pthread_cond_t *, pthread_mutex_t *), int (*cmp)(void *, void *), void *cmpel); - -/** - * destroys a queue. - * queue will be locked. - * - * q - the queue - * fd - should element data be freed? 0 => No, Otherwise => Yes - * ff - function to release the memory, NULL => free() - */ -int8_t queue_destroy_internal(queue_t *q, uint8_t fd, void (*ff)(void *)); - -/** - * flushes a queue. - * deletes all elements in the queue. - * queue _has_ to be locked. - * - * q - the queue - * fd - should element data be freed? 0 => No, Otherwise => Yes - * ff - function to release the memory, NULL => free() - */ -int8_t queue_flush_internal(queue_t *q, uint8_t fd, void (*ff)(void *)); - -#endif /* __QUEUE_INTERNAL_H__ */ diff --git a/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/tcp_client.h b/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/tcp_client.h deleted file mode 100644 index e6b15fa5d..000000000 --- a/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/tcp_client.h +++ /dev/null @@ -1,26 +0,0 @@ -#ifndef __TCP_CLIENT_H__ -#define __TCP_CLIENT_H__ - -#include -#include -#include -#include -#include -#include -#include -#include - - -struct tcp_client{ - int fd; -}; - -int tcp_connect(const char *ip, const int port, struct tcp_client **tc); - -int tcp_read(struct tcp_client *tc, unsigned char *buf, int size); - -int tcp_write(struct tcp_client *tc, unsigned char *buf, int size); - -int tcp_close(struct tcp_client *tc); - -#endif diff --git a/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/tcp_server.h b/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/tcp_server.h deleted file mode 100644 index 4a5357964..000000000 --- a/local_plugins/ota/ios/Frameworks/DFUnits.framework/Headers/tcp_server.h +++ /dev/null @@ -1,29 +0,0 @@ -#ifndef __TCP_SERVER_H__ -#define __TCP_SERVER_H__ - -#include -#include -#include -#include -#include -#include -#include -#include - -struct tcp_server{ - int fd; -}; - -#include "tcp_client.h" - -int tcp_new_server(const int port ,struct tcp_server **ts); - -int tcp_new_client(int fd, struct tcp_client **tc); - -int tcp_listen(struct tcp_server *ts, const int max); - -int tcp_accept(struct tcp_server *ts, struct sockaddr *addr, socklen_t *len); - -int tcp_server_close(struct tcp_server *ts); - -#endif diff --git a/local_plugins/ota/ios/Frameworks/DFUnits.framework/Info.plist b/local_plugins/ota/ios/Frameworks/DFUnits.framework/Info.plist deleted file mode 100644 index cb3633184..000000000 Binary files a/local_plugins/ota/ios/Frameworks/DFUnits.framework/Info.plist and /dev/null differ diff --git a/local_plugins/ota/ios/Frameworks/DFUnits.framework/Modules/module.modulemap b/local_plugins/ota/ios/Frameworks/DFUnits.framework/Modules/module.modulemap deleted file mode 100644 index 50c7609d2..000000000 --- a/local_plugins/ota/ios/Frameworks/DFUnits.framework/Modules/module.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module DFUnits { - umbrella header "DFUnits.h" - - export * - module * { export * } -} diff --git a/local_plugins/ota/ios/Frameworks/JLLogHelper.framework/JLLogHelper b/local_plugins/ota/ios/Frameworks/JLLogHelper.framework/JLLogHelper deleted file mode 100644 index 1f0d9f592..000000000 Binary files a/local_plugins/ota/ios/Frameworks/JLLogHelper.framework/JLLogHelper and /dev/null differ diff --git a/local_plugins/ota/ios/Frameworks/JL_AdvParse.framework/Frameworks/JLLogHelper.framework/JLLogHelper b/local_plugins/ota/ios/Frameworks/JL_AdvParse.framework/Frameworks/JLLogHelper.framework/JLLogHelper deleted file mode 100755 index b51baf2ff..000000000 Binary files a/local_plugins/ota/ios/Frameworks/JL_AdvParse.framework/Frameworks/JLLogHelper.framework/JLLogHelper and /dev/null differ diff --git a/local_plugins/ota/ios/Frameworks/JL_AdvParse.framework/JL_AdvParse b/local_plugins/ota/ios/Frameworks/JL_AdvParse.framework/JL_AdvParse deleted file mode 100644 index a0c8ad396..000000000 Binary files a/local_plugins/ota/ios/Frameworks/JL_AdvParse.framework/JL_AdvParse and /dev/null differ diff --git a/local_plugins/ota/ios/Frameworks/JL_HashPair.framework/Frameworks/JLLogHelper.framework/JLLogHelper b/local_plugins/ota/ios/Frameworks/JL_HashPair.framework/Frameworks/JLLogHelper.framework/JLLogHelper deleted file mode 100755 index 5412bbd92..000000000 Binary files a/local_plugins/ota/ios/Frameworks/JL_HashPair.framework/Frameworks/JLLogHelper.framework/JLLogHelper and /dev/null differ diff --git a/local_plugins/ota/ios/Frameworks/JL_HashPair.framework/JL_HashPair b/local_plugins/ota/ios/Frameworks/JL_HashPair.framework/JL_HashPair deleted file mode 100644 index 1351ebd50..000000000 Binary files a/local_plugins/ota/ios/Frameworks/JL_HashPair.framework/JL_HashPair and /dev/null differ diff --git a/local_plugins/ota/ios/Frameworks/JL_OTALib.framework/Frameworks/JLLogHelper.framework/Info.plist b/local_plugins/ota/ios/Frameworks/JL_OTALib.framework/Frameworks/JLLogHelper.framework/Info.plist deleted file mode 100644 index 22f0b62eb..000000000 Binary files a/local_plugins/ota/ios/Frameworks/JL_OTALib.framework/Frameworks/JLLogHelper.framework/Info.plist and /dev/null differ diff --git a/local_plugins/ota/ios/Frameworks/JL_OTALib.framework/JL_OTALib b/local_plugins/ota/ios/Frameworks/JL_OTALib.framework/JL_OTALib deleted file mode 100644 index 95a277f65..000000000 Binary files a/local_plugins/ota/ios/Frameworks/JL_OTALib.framework/JL_OTALib and /dev/null differ diff --git a/local_plugins/ota/ios/Resources/PrivacyInfo.xcprivacy b/local_plugins/ota/ios/Resources/PrivacyInfo.xcprivacy deleted file mode 100644 index a34b7e2e6..000000000 --- a/local_plugins/ota/ios/Resources/PrivacyInfo.xcprivacy +++ /dev/null @@ -1,14 +0,0 @@ - - - - - NSPrivacyTrackingDomains - - NSPrivacyAccessedAPITypes - - NSPrivacyCollectedDataTypes - - NSPrivacyTracking - - - diff --git a/local_plugins/ota/ios/ota.podspec b/local_plugins/ota/ios/ota.podspec deleted file mode 100644 index b4e84fa29..000000000 --- a/local_plugins/ota/ios/ota.podspec +++ /dev/null @@ -1,36 +0,0 @@ -# -# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html. -# Run `pod lib lint ota.podspec` to validate before publishing. -# -Pod::Spec.new do |s| - s.name = 'ota' - s.version = '0.0.1' - s.summary = 'A new Flutter project.' - s.description = <<-DESC -A new Flutter project. - DESC - s.homepage = 'http://example.com' - s.license = { :file => '../LICENSE' } - s.author = { 'Your Company' => 'email@example.com' } - s.source = { :path => '.' } - s.source_files = 'Classes/**/*' - s.dependency 'Flutter' - s.platform = :ios, '16.0' - s.vendored_frameworks = [ - 'Frameworks/DFUnits.framework', - 'Frameworks/JL_AdvParse.framework', - 'Frameworks/JL_HashPair.framework', - 'Frameworks/JL_OTALib.framework', - 'Frameworks/JLLogHelper.framework' - ] - - # Flutter.framework does not contain a i386 slice. - s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' } - s.swift_version = '5.0' - - # If your plugin requires a privacy manifest, for example if it uses any - # required reason APIs, update the PrivacyInfo.xcprivacy file to describe your - # plugin's privacy impact, and then uncomment this line. For more information, - # see https://developer.apple.com/documentation/bundleresources/privacy_manifest_files - # s.resource_bundles = {'ota_privacy' => ['Resources/PrivacyInfo.xcprivacy']} -end diff --git a/local_plugins/ota/lib/ota.dart b/local_plugins/ota/lib/ota.dart deleted file mode 100644 index 79c2948f9..000000000 --- a/local_plugins/ota/lib/ota.dart +++ /dev/null @@ -1,149 +0,0 @@ -import 'ota_platform_interface.dart'; -import 'dart:async'; -import 'dart:typed_data'; -import 'package:flutter/services.dart'; - -class OtaEvent { - static final int NOT_STARTED = -1; // 未开始 - static final int VALIDATION_FILE = 0; // 验证文件 - static final int ONUPGRADE = 1; // 升级中 - static final int START_UPGRADING = 2; // 开始升级 - static final int UPGRADE_SUCCESS = 3; // 升级成功 - static final int UPGRADE_FAILED = 4; // 升级失败 - static final int CONNECTION_DISCONNECTION = 5; // 连接断开 - static final int CONNECTION_SUCCESS = 6; // 连接成功 - - /// 事件类型 - final String event; - - /// 输出升级状态 - final int? type; - - /// 输出升级进度 - final double? progress; - - /// 错误码 (仅在发生错误时有效) - final int? code; - - /// 错误信息 (仅在发生错误时有效) - final String? message; - - /// 构造函数 - OtaEvent({ - required this.event, - this.type, - this.progress, - this.code, - this.message, - }); - - /// 从Map构造对象 - factory OtaEvent.fromMap(Map map) { - return OtaEvent( - event: map['event'], - type: map['type'], - progress: map['progress'], - code: map['code'], - message: map['message'], - ); - } -} - -class Ota { - // 单例实例 - static final Ota _instance = Ota._internal(); - - // 私有构造函数 - Ota._internal() { - // 初始化时设置事件监听 - // _setupEventListener(); - } - - // 公共访问点 - static Ota get instance => _instance; - - static const EventChannel _eventChannel = EventChannel( - 'com.example.ota/events', - ); - // double progress = 0.0; - // late int type = OtaEvent.NOT_STARTED; - // bool isUpgrade = false; - - /// 事件流 - Stream? _eventStream; - // bool _isEventListenerSet = false; // 防止重复监听 - - /// 获取事件流 - Stream get eventStream { - _eventStream ??= _eventChannel.receiveBroadcastStream().map((event) { - if (event is Map) { - return OtaEvent.fromMap(event); - } - throw PlatformException(code: 'INVALID_EVENT', message: '无效的事件数据'); - }); - return _eventStream!; - } - - /// 释放资源 - void onClose() { - onOtaClose(); - // 停止事件监听 - _eventStream = null; - //_isEventListenerSet = false; - print("Ota 对象资源已释放"); - } - - // /// 内部设置事件监听(只执行一次) - // void _setupEventListener() { - // if (_isEventListenerSet) return; - - // eventStream.listen((event) { - // if (event.event == 'onProgress' && - // event.type != null && - // event.progress != null) { - // print("flutter 收到数据${event.progress}type=${type}"); - // progress = event.progress!; - // type = event.type!; - // } - // if (event.event == 'onStartOTA') { - // type = OtaEvent.START_UPGRADING; - // isUpgrade = true; // 开始升级 - // } - // if (event.event == 'onStopOTA') { - // type = OtaEvent.UPGRADE_SUCCESS; - // isUpgrade = false; - // } - // if (event.event == 'onError' && - // event.code != null && - // event.message != null) { - // print("flutter onError${event.code}type=${event.message}"); - // type = OtaEvent.UPGRADE_FAILED; - // isUpgrade = false; - // } - // if (event.event == 'NOCONNECTION') { - // type = OtaEvent.CONNECTION_DISCONNECTION; - // isUpgrade = false; - // } - // if (event.event == 'CONNECTION_SUCCESS') { - // type = OtaEvent.CONNECTION_SUCCESS; - // } - // }); - - // _isEventListenerSet = true; - // } - - Future init() { - return OtaPlatform.instance.init(); - } - - Future startUpgrading({String? address, String? filePath}) { - return OtaPlatform.instance.startUpgrading( - address: address, - filePath: filePath, - ); - } - - Future onOtaClose() { - return OtaPlatform.instance.onOtaClose(); - } -} diff --git a/local_plugins/ota/lib/ota_method_channel.dart b/local_plugins/ota/lib/ota_method_channel.dart deleted file mode 100644 index 83203825c..000000000 --- a/local_plugins/ota/lib/ota_method_channel.dart +++ /dev/null @@ -1,29 +0,0 @@ -import 'package:flutter/foundation.dart'; -import 'package:flutter/services.dart'; - -import 'ota_platform_interface.dart'; - -/// An implementation of [OtaPlatform] that uses method channels. -class MethodChannelOta extends OtaPlatform { - /// The method channel used to interact with the native platform. - @visibleForTesting - final methodChannel = const MethodChannel('ota'); - - @override - Future init() async { - await methodChannel.invokeMethod('init'); - } - - @override - Future startUpgrading({String? address, String? filePath}) async { - await methodChannel.invokeMethod('startUpgrading', { - 'address': address, - 'filePath': filePath, - }); - } - - @override - Future onOtaClose() async { - await methodChannel.invokeMethod('onOtaClose'); - } -} diff --git a/local_plugins/ota/lib/ota_platform_interface.dart b/local_plugins/ota/lib/ota_platform_interface.dart deleted file mode 100644 index a1a271b13..000000000 --- a/local_plugins/ota/lib/ota_platform_interface.dart +++ /dev/null @@ -1,37 +0,0 @@ -import 'package:plugin_platform_interface/plugin_platform_interface.dart'; - -import 'ota_method_channel.dart'; - -abstract class OtaPlatform extends PlatformInterface { - /// Constructs a OtaPlatform. - OtaPlatform() : super(token: _token); - - static final Object _token = Object(); - - static OtaPlatform _instance = MethodChannelOta(); - - /// The default instance of [OtaPlatform] to use. - /// - /// Defaults to [MethodChannelOta]. - static OtaPlatform get instance => _instance; - - /// Platform-specific implementations should set this with their own - /// platform-specific class that extends [OtaPlatform] when - /// they register themselves. - static set instance(OtaPlatform instance) { - PlatformInterface.verifyToken(instance, _token); - _instance = instance; - } - - Future init() { - throw UnimplementedError('init() has not been implemented.'); - } - - Future startUpgrading({String? address, String? filePath}) { - throw UnimplementedError('startUpgrading() has not been implemented.'); - } - - Future onOtaClose() { - throw UnimplementedError('onOtaClose() has not been implemented.'); - } -} diff --git a/local_plugins/ota/pubspec.yaml b/local_plugins/ota/pubspec.yaml deleted file mode 100644 index 7db9dc8a6..000000000 --- a/local_plugins/ota/pubspec.yaml +++ /dev/null @@ -1,71 +0,0 @@ -name: ota -description: "A new Flutter project." -version: 0.0.1 -homepage: - -environment: - sdk: ^3.7.2 - flutter: '>=3.3.0' - -dependencies: - flutter: - sdk: flutter - plugin_platform_interface: ^2.0.2 -dev_dependencies: - flutter_test: - sdk: flutter - flutter_lints: ^5.0.0 - -# For information on the generic Dart part of this file, see the -# following page: https://dart.dev/tools/pub/pubspec - -# The following section is specific to Flutter packages. -flutter: - # This section identifies this Flutter project as a plugin project. - # The 'pluginClass' specifies the class (in Java, Kotlin, Swift, Objective-C, etc.) - # which should be registered in the plugin registry. This is required for - # using method channels. - # The Android 'package' specifies package in which the registered class is. - # This is required for using method channels on Android. - # The 'ffiPlugin' specifies that native code should be built and bundled. - # This is required for using `dart:ffi`. - # All these are used by the tooling to maintain consistency when - # adding or updating assets for this project. - plugin: - platforms: - android: - package: com.example.ota - pluginClass: OtaPlugin - ios: - pluginClass: OtaPlugin - - # To add assets to your plugin package, add an assets section, like this: - # assets: - # - images/a_dot_burr.jpeg - # - images/a_dot_ham.jpeg - # - # For details regarding assets in packages, see - # https://flutter.dev/to/asset-from-package - # - # An image asset can refer to one or more resolution-specific "variants", see - # https://flutter.dev/to/resolution-aware-images - - # To add custom fonts to your plugin package, add a fonts section here, - # in this "flutter" section. Each entry in this list should have a - # "family" key with the font family name, and a "fonts" key with a - # list giving the asset and other descriptors for the font. For - # example: - # fonts: - # - family: Schyler - # fonts: - # - asset: fonts/Schyler-Regular.ttf - # - asset: fonts/Schyler-Italic.ttf - # style: italic - # - family: Trajan Pro - # fonts: - # - asset: fonts/TrajanPro.ttf - # - asset: fonts/TrajanPro_Bold.ttf - # weight: 700 - # - # For details regarding fonts in packages, see - # https://flutter.dev/to/font-from-package diff --git a/pubspec.yaml b/pubspec.yaml index e48b79e7e..7b5226d12 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: voitrans description: "Voitrans - AI Voice Assistant." publish_to: "none" -version: 1.0.29+104 +version: 1.0.30+104 environment: sdk: ">=3.3.0 <4.0.0" @@ -97,10 +97,10 @@ dependencies: path: local_plugins/open_ai_service chat_storage: path: local_plugins/chat_storage - spotify_sdk: - path: local_plugins/spotify_sdk - ota: - path: local_plugins/ota + # 暂时关闭 —— spotify_sdk 引入 SpotifyiOS framework,没用上反而拖累 simulator + # 构建(缺 arm64-simulator slice)。需要时取消下面两行注释。 + # spotify_sdk: + # path: local_plugins/spotify_sdk device_jieli: path: local_plugins/device_jieli classic_bluetooth: