Files
bolar_2/main/core/app_event.cc
2026-11-27 16:38:11 +08:00

117 lines
4.2 KiB
C++

#include "core/app_event.h"
namespace borla {
const char* ToString(AppEventType type)
{
switch (type) {
case AppEventType::kBootRequested:
return "boot_requested";
case AppEventType::kNetworkConnected:
return "network_connected";
case AppEventType::kNetworkDisconnected:
return "network_disconnected";
case AppEventType::kRealtimeConnected:
return "realtime_connected";
case AppEventType::kRealtimeDisconnected:
return "realtime_disconnected";
case AppEventType::kRealtimeProtocolError:
return "realtime_protocol_error";
case AppEventType::kButtonClicked:
return "button_clicked";
case AppEventType::kButtonLongPressed:
return "button_long_pressed";
case AppEventType::kAudioVolumeRequested:
return "audio_volume_requested";
case AppEventType::kWakeWordControlRequested:
return "wake_word_control_requested";
case AppEventType::kBargeInControlRequested:
return "barge_in_control_requested";
case AppEventType::kRemoteIdleSleepRequested:
return "remote_idle_sleep_requested";
case AppEventType::kLedAlertRequested:
return "led_alert_requested";
case AppEventType::kWakeWordDetected:
return "wake_word_detected";
case AppEventType::kBargeInCandidate:
return "barge_in_candidate";
case AppEventType::kBargeInRejected:
return "barge_in_rejected";
case AppEventType::kBargeInConfirmed:
return "barge_in_confirmed";
case AppEventType::kConversationStopRequested:
return "conversation_stop_requested";
case AppEventType::kTtsStarted:
return "tts_started";
case AppEventType::kTtsStreamEnded:
return "tts_stream_ended";
case AppEventType::kPlaybackPreempted:
return "playback_preempted";
case AppEventType::kPlaybackDrained:
return "playback_drained";
case AppEventType::kPlaybackFailed:
return "playback_failed";
case AppEventType::kLocalPromptRequested:
return "local_prompt_requested";
case AppEventType::kLocalPromptStarted:
return "local_prompt_started";
case AppEventType::kLocalSequenceRequested:
return "local_sequence_requested";
case AppEventType::kLocalSequenceStarted:
return "local_sequence_started";
case AppEventType::kActivationReplayDue:
return "activation_replay_due";
case AppEventType::kShutdownPromptRequested:
return "shutdown_prompt_requested";
case AppEventType::kUserActivityDetected:
return "user_activity_detected";
case AppEventType::kIdleCheckDue:
return "idle_check_due";
case AppEventType::kIdleResponseExpired:
return "idle_response_expired";
case AppEventType::kIdleGoodbyeDue:
return "idle_goodbye_due";
case AppEventType::kReminderDue:
return "reminder_due";
case AppEventType::kAlarmDue:
return "alarm_due";
case AppEventType::kFirstDayAlarmDue:
return "first_day_alarm_due";
case AppEventType::kAlertFinished:
return "alert_finished";
case AppEventType::kLowBatteryWarning:
return "low_battery_warning";
case AppEventType::kCriticalBattery:
return "critical_battery";
case AppEventType::kOutgoingCall:
return "outgoing_call";
case AppEventType::kIncomingCall:
return "incoming_call";
case AppEventType::kCallConnected:
return "call_connected";
case AppEventType::kCallEnded:
return "call_ended";
case AppEventType::kFriendModeEnded:
return "friend_mode_ended";
case AppEventType::kProvisioningRequested:
return "provisioning_requested";
case AppEventType::kProvisioningWifiSaved:
return "provisioning_wifi_saved";
case AppEventType::kProvisioningCompleted:
return "provisioning_completed";
case AppEventType::kUpgradeRequested:
return "upgrade_requested";
case AppEventType::kUpgradeCompleted:
return "upgrade_completed";
case AppEventType::kUpgradeFailed:
return "upgrade_failed";
case AppEventType::kSoftOffRequested:
return "soft_off_requested";
case AppEventType::kFatalError:
return "fatal_error";
}
return "unknown";
}
} // namespace borla