~aleteoryx/muditaos

ref: 9a17c5fc3c0cc1be99a90f36b24b363f5ac22c1d muditaos/module-services/service-appmgr/ApplicationManifest.cpp -rw-r--r-- 624 bytes
9a17c5fc — Przemyslaw Brudny [EGD-6676] PhoneLock handling with ServiceDesktop 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