static void HandDownloadFileNotify(Request *request);
static void HandDownloadSuccessNotify(Request *request);
static void HandDownloadFailNotify(Request *request);
+static void HandAudioPlaybackEndNotify(Request *request);
// 消息处理程序项数组(每个消息类型对应一个处理函数,函数名以 Handle 开头)
MsgHandlerEntry msgHandlers[] = {
{HANDLE_JUMP_OTA_VIEW, HandleJumpOtaView},
{HAND_DOWNLOAD_FILE_NOTIFY,HandDownloadFileNotify},
{HAND_DOWNLOAD_SUCCESS_NOTIFY,HandDownloadSuccessNotify},
{HAND_DOWNLOAD_FAIL_NOTIFY,HandDownloadFailNotify},
+ {HAND_AUDIO_PLAYBACK_END_NOTIFY,HandAudioPlaybackEndNotify},
};
/* -------------------------------------------------------------------------- */
void ScreenTurnOn(int32_t timeout)
int type = *(int *)request->data;
WEARABLE_LOGE(WEARABLE_LOG_MODULE_UI_SERVICE, "HandDownloadFailNotify type = %d", type);
}
+// 音频播放结束通知
+void HandAudioPlaybackEndNotify(Request *request)
+{
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_UI_SERVICE, "HandAudioPlaybackEndNotify msg_id = %d", request->msgId);
+}
/* -------------------------------------------------------------------------- */
#ifdef __cplusplus
}
push_text_to_ui(data_msg->text_content);
break;
}
+ case WS_CMD_RANDOM_STORY_RESPONSE:
+ {
+ push_text_to_ui(data_msg->text_content);
+ break;
+ }
+ case WS_CMD_AUDIO_PLAYBACK_END:
+ {
+ push_audio_playback_end_notification();
+ break;
+ }
default:
{
printf("[WS] Unknown command=%s\n", cmd_str ? cmd_str : "");