/* * SPDX-FileCopyrightText: 2026 M5Stack Technology CO LTD * * SPDX-License-Identifier: MIT */ #pragma once #include #include #include #include #include namespace view { /** * @brief * */ class WsCallView : public stackchan::avatar::Decorator { public: std::function onAccept; std::function onDecline; std::function onEnd; std::function onDestory; enum class State { Incoming = 0, Connecting, }; WsCallView(lv_obj_t* parent, std::string caller); private: State _state = State::Incoming; std::unique_ptr _panel_incoming; std::unique_ptr _panel_connecting; void _update() override; void handle_accept(); void handle_decline(); void handle_end(); }; } // namespace view