~aleteoryx/muditaos

ref: ef63ee267c78136773ed23156ad85a75e650a7b6 muditaos/module-services/service-appmgr/ApplicationManifest.cpp -rw-r--r-- 624 bytes
ef63ee26 — Wojtek Rzepecki [EGD-5304] Add new way of system close 4 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// 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/Actions.hpp"
#include "service-appmgr/ApplicationManifest.hpp"

#include <algorithm>

namespace app::manager
{
    ApplicationManifest::ApplicationManifest(actions::ActionFilter _actions) : actions{std::move(_actions)}
    {}

    auto ApplicationManifest::contains(actions::ActionId action) const noexcept -> bool
    {
        auto it = std::find(actions.begin(), actions.end(), action);
        return it != actions.end();
    }
} // namespace app::manager