Files
MuditaOS/module-sys/common/include/system/messages/TetheringQuestionRequest.hpp
Marcin Smoczyński 57874cab33 [BH-912] Improve sys module structure
Improve structure of the module sys. Problems within this module
prevents from linking others.

Signed-off-by: Marcin Smoczyński <smoczynski.marcin@gmail.com>
2021-09-24 10:01:19 +02:00

46 lines
1.6 KiB
C++

// 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 <Service/Message.hpp>
#include <apps-common/popups/data/PopupRequestParams.hpp>
#include <service-appmgr/Actions.hpp>
#include <service-appmgr/messages/ActionRequest.hpp>
namespace sys
{
class TetheringQuestionRequest : public sys::DataMessage, public app::manager::actions::ConvertibleToAction
{
public:
TetheringQuestionRequest() : sys::DataMessage(MessageType::MessageTypeUninitialized)
{}
std::unique_ptr<app::manager::ActionRequest> toAction() const override
{
auto params = std::make_unique<gui::PopupRequestParams>(gui::popup::ID::Tethering);
return std::make_unique<app::manager::ActionRequest>(
sender, app::manager::actions::ShowPopup, std::move(params));
}
};
class TetheringQuestionAbort : public sys::DataMessage, public app::manager::actions::ConvertibleToAction
{
public:
TetheringQuestionAbort() : sys::DataMessage(MessageType::MessageTypeUninitialized)
{}
std::unique_ptr<app::manager::ActionRequest> toAction() const override
{
auto params = std::make_unique<gui::PopupRequestParams>(gui::popup::ID::Tethering);
return std::make_unique<app::manager::ActionRequest>(
sender, app::manager::actions::AbortPopup, std::move(params));
}
};
class TetheringEnabledResponse : public sys::ResponseMessage
{};
} // namespace sys