~aleteoryx/muditaos

ref: be66c108884ef3337071c7f66ab2c137df48d00b muditaos/module-services/service-appmgr/data/MmiActionsParams.cpp -rw-r--r-- 1.6 KiB
be66c108 — Tomek Sobkowiak [EGD-5347] Replace filelength with file_size 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
// 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.emplace_back(message);
}

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

auto MMICustomResultParams::getMessageType() const noexcept -> MMIType
{
    return type;
}

void MMICustomResultParams::accept(Visitor &v, std::string &displayMessage)
{
    v.visit(*this, displayMessage);
};

void MMINoneSpecifiedResult::accept(Visitor &v, std::string &displayMessage)
{
    v.visit(*this, displayMessage);
};

auto MMICallForwardingResult::getData() const -> std::tuple<std::string, std::string, std::string, std::string>
{
    return std::make_tuple(voice, fax, sync, async);
}

void MMICallForwardingResult::accept(Visitor &v, std::string &displayMessage)
{
    v.visit(*this, displayMessage);
};

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

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

MMIResultParams::MMIResultParams(MMIResult result, std::shared_ptr<MMICustomResultParams> customResult)
    : result(result), customResult(std::move(customResult))
{}


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

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