~aleteoryx/muditaos

ref: e3d98f5df50afe16570f9581fbe358a6e5f749e8 muditaos/module-services/service-appmgr/data/MmiActionsParams.cpp -rw-r--r-- 1.0 KiB
e3d98f5d — Kuba [EGD-4856] Add Custom MMI message 5 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// Copyright (c) 2017-2020, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include <service-appmgr/data/MmiActionsParams.hpp>

using namespace app::manager::actions;

void MMICustomResultParams::addMessage(const MMIResultMessage &message)
{
    messages.push_back(message);
}

auto MMICustomResultParams::getMessage() -> std::vector<MMIResultMessage>
{
    return std::move(messages);
}

auto MMICustomResultParams::getType() -> MMIType
{
    return type;
}

MMIParams::MMIParams(std::string mmiData) : mmiData{std::move(mmiData)}
{}

std::string MMIParams::getData() const
{
    return mmiData;
}

MMIResultParams::MMIResultParams(MMIResult result) : result(result)
{}

MMIResultParams::MMIResultParams(std::shared_ptr<IMMICustomResultParams> cResult) : customResult(cResult)
{}

MMIResultParams::MMIResult MMIResultParams::getData() const noexcept
{
    return result;
}

auto MMIResultParams::getCustomMessage() const noexcept -> std::shared_ptr<IMMICustomResultParams>
{
    return customResult;
}