~aleteoryx/muditaos

ref: 6eeb1d75704ae9b97e002c3d7b058ac532b14128 muditaos/module-apps/application-desktop/data/DesktopData.hpp -rw-r--r-- 1.0 KiB
6eeb1d75 — DariuszSabala [BH-628] Cleaned up module-vfs cmake 4 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
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once

#include "gui/SwitchData.hpp"
#include <service-desktop/DesktopMessages.hpp>
#include <filesystem>
#include <utility>

namespace gui
{

    class UpdateSwitchData : public gui::SwitchData
    {
      public:
        explicit UpdateSwitchData(sdesktop::UpdateOsMessage *messageToCopyFrom) : updateOsMessage(*messageToCopyFrom)
        {}

        [[nodiscard]] const sdesktop::UpdateOsMessage &getUpdateOsMessage() const noexcept
        {
            return updateOsMessage;
        }

      private:
        sdesktop::UpdateOsMessage updateOsMessage;
    };

    class CurrentOsVersion : public gui::SwitchData
    {
        std::string osVersion;

      public:
        [[nodiscard]] std::string getCurrentOsVersion() const
        {
            return osVersion;
        }

        void setData(std::string version)
        {
            osVersion = std::move(version);
        }
    };

} // namespace gui