~aleteoryx/muditaos

ref: 6bbef804c0605b90a3aff579376e9ea940733238 muditaos/module-services/service-appmgr/Controller.hpp -rw-r--r-- 1.9 KiB
6bbef804 — Michał Kamoń [EGD-4284] missing include added (#956) 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
// Copyright (c) 2017-2020, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once

#include <memory> // for unique_ptr
#include <string> // for string

#include "ApplicationManager.hpp" // for ApplicationHandle, ApplicationHandle::Name
#include "module-sys/Service/Service.hpp"
#include "SwitchData.hpp"                         // for SwitchData
#include "i18/i18.hpp"                            // for Lang
#include "service-appmgr/messages/APMMessage.hpp" // for APMSwitchPrevApp, Action (ptr only)

namespace sys
{
    class Service;
} // namespace sys

namespace app::manager
{
    class Controller
    {
      public:
        Controller() = delete;

        static auto sendAction(sys::Service *sender, Action &&action) -> bool;
        static auto registerApplication(sys::Service *sender, bool status, bool startBackground) -> bool;
        static auto switchApplication(sys::Service *sender,
                                      const ApplicationHandle::Name &applicationName,
                                      const std::string &windowName,
                                      std::unique_ptr<gui::SwitchData> data = nullptr) -> bool;
        static auto switchBack(sys::Service *sender, std::unique_ptr<APMSwitchPrevApp> msg = nullptr) -> bool;
        static auto closeApplication(sys::Service *sender, const ApplicationHandle::Name &name) -> bool;
        static auto changeLanguage(sys::Service *sender, utils::Lang language) -> bool;
        static auto changePowerSaveMode(sys::Service *sender) -> bool;
        static auto stopApplicationManager(sys::Service *sender) -> bool;
        static auto preventBlockingDevice(sys::Service *sender) -> bool;
        static auto confirmSwitch(sys::Service *sender) -> bool;
        static auto confirmClose(sys::Service *sender) -> bool;
    };
} // namespace app::manager