~aleteoryx/muditaos

ref: 299be4daf6da880f495f4dc363e480d6ff0f0e9b muditaos/module-services/service-appmgr/ApplicationManifest.cpp -rw-r--r-- 568 bytes
299be4da — Piotr Tanski [EGD-4151] Application manager actions introduced. (#905) 5 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Copyright (c) 2017-2020, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include "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