// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved. // For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md #pragma once #include #include #include namespace at { class Cmd; class BaseChannel; } // namespace at namespace at::qcfg::usbnet { enum class Net; } namespace cellular::service { class TetheringHandler { public: /** * Reads current Rndis configuration * @return true if Rndis is enabled, false if Rndis is disabled */ auto isRndisEnabled() -> bool; /** * It's called to configure Rndis mode * @return */ auto configure() -> bool; /** * It's enabling tethering mode. Disables all URC and sets modem on passthrough via USB * @return true on succes, false on fail */ auto enable() -> bool; /** * It's disabling tethering mode. Enables all URC, reads all unreaded messages and disables passtrough via USB * @return */ auto disable() -> bool; /** * User callbacks */ std::function()> onIsRndisEnabled; std::function onEnableRndis; std::function onDisableUrc; std::function onEnableUrc; std::function onReadMessages; std::function onSetPassthrough; }; } // namespace cellular::service