static void HandDownloadFailNotify(Request *request);
static void HandDownloadProgressNotify(Request *request);
static void HandAudioPlaybackEndNotify(Request *request);
+static void HandNpcEmotionChangeNotify(Request *request);
// 消息处理程序项数组(每个消息类型对应一个处理函数,函数名以 Handle 开头)
MsgHandlerEntry msgHandlers[] = {
{HANDLE_JUMP_OTA_VIEW, HandleJumpOtaView},
{HAND_DOWNLOAD_FAIL_NOTIFY,HandDownloadFailNotify},
{HAND_DOWNLOAD_PROGRESS_NOTIFY,HandDownloadProgressNotify},
{HAND_AUDIO_PLAYBACK_END_NOTIFY,HandAudioPlaybackEndNotify},
+ {HAND_NPC_EMOTION_CHANGE_NOTIFY,HandNpcEmotionChangeNotify},
};
/* -------------------------------------------------------------------------- */
void ScreenTurnOn(int32_t timeout)
GraphicService::GetInstance()->PostGraphicEvent(
std::bind(&OHOS::ThunderBirdModel::HandleAudioPlaybackEnd,OHOS::ThunderBirdModel::GetInstance()));
}
+// 通知npc表情变化
+void HandNpcEmotionChangeNotify(Request *request)
+{
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_UI_SERVICE, "HandNpcEmotionChangeNotify msg_id = %d", request->msgId);
+ std::string emotion(static_cast<char*>(request->data), request->len);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_UI_SERVICE, "HandNpcEmotionChangeNotify emotion = %s", emotion.c_str());
+}
/* -------------------------------------------------------------------------- */
#ifdef __cplusplus
}
set_is_ln_get_device_network_success(0);
}
- if (!data_msg || !data_msg->raw_json)
- {
- printf("[WS] invalid data message\n");
- return;
- }
+ // if (!data_msg || !data_msg->raw_json)
+ // {
+ // printf("[WS] invalid data message\n");
+ // return;
+ // }
const char *json_str = data_msg->raw_json;
const char *message_id = data_msg->message_id;
printf("[WS] ScheduleReminder:日程提醒\n");
if (json_str)
{
- do_ln_http_server_send_data(LN_HTTP_SERVICE_CMD_SCHEDULE_REMINDER, NULL, 0);
+ do_ln_http_server_send_data(LN_HTTP_SERVICE_CMD_SCHEDULE_REMINDER, json_str, strlen(json_str));
}
break;
}
{
SendMsgToUIService(HAND_AUDIO_PLAYBACK_END_NOTIFY, 0, NULL, 0);
}
+//通知npc表情变化
+void push_npc_emotion_change_notification(const char *emotion)
+{
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[NPC_EMOTION_CHANGE] emotion=%s", emotion);
+ SendMsgToUIService(HAND_NPC_EMOTION_CHANGE_NOTIFY, 0, (void *)emotion, (int32_t)strlen(emotion));
+}
#ifdef __cplusplus
};
#endif
\ No newline at end of file