bolar_2 backup
This commit is contained in:
44
main/ports/realtime_protocol.h
Normal file
44
main/ports/realtime_protocol.h
Normal file
@@ -0,0 +1,44 @@
|
||||
#pragma once
|
||||
|
||||
#include "core/playback_types.h"
|
||||
#include "core/runtime_state.h"
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
namespace borla {
|
||||
|
||||
class IRealtimeProtocol {
|
||||
public:
|
||||
virtual ~IRealtimeProtocol() = default;
|
||||
|
||||
virtual void Open() = 0;
|
||||
virtual void Close() = 0;
|
||||
virtual void SendStartListening() = 0;
|
||||
virtual void SendStopListening() = 0;
|
||||
virtual void SendAbortSpeaking(
|
||||
ConversationInterruptSource source) = 0;
|
||||
virtual void SendGoodbye() = 0;
|
||||
virtual void SendAcceptCall() = 0;
|
||||
virtual void SendHangupCall() = 0;
|
||||
virtual void SendButtonClick(uint8_t click_count) = 0;
|
||||
virtual void SendLocalPlaybackState(
|
||||
LocalPrompt prompt,
|
||||
bool started) = 0;
|
||||
virtual bool SendFriendAdd(
|
||||
const char* local_mac,
|
||||
const char* local_name,
|
||||
const char* remote_mac,
|
||||
const char* remote_name) = 0;
|
||||
// Asks the server to speak an upgrade announcement. `optional` marks an
|
||||
// advisory notice the user may decline; otherwise the device is about to
|
||||
// start installing. Returns false when the channel is not open.
|
||||
virtual bool SendOtaNotify(
|
||||
const char* text,
|
||||
bool optional) = 0;
|
||||
// Publishes the remote-configured connection-error prompt. Used when
|
||||
// playback of a server reply dies mid-sentence so the child hears that
|
||||
// something broke instead of silence.
|
||||
virtual void RequestConnectionErrorPrompt() = 0;
|
||||
};
|
||||
|
||||
} // namespace borla
|
||||
Reference in New Issue
Block a user