~aleteoryx/muditaos

ref: d32ce980d98396dc4652bca96ede347fa6a06f0c muditaos/module-cellular/at/cmd/CPBS.hpp -rw-r--r-- 1.1 KiB
d32ce980 — Tomasz Rybarski [BH-1272] Update Onboarding Finalize Screen 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
46
47
// 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 "Result.hpp"
#include <at/Cmd.hpp>
#include <functional>

namespace at
{
    namespace cpbs
    {
        constexpr auto simStorage  = "\"SM\"";
        constexpr auto tokensCount = 3;

        enum class tokens
        {
            Storage = 0,
            Used    = 1,
            Total   = 2
        };
    } // namespace cpbs
    namespace result
    {
        struct CPBS : public Result
        {
            std::string storage;
            unsigned int used;
            unsigned int total;

            explicit CPBS(const Result &that);
        };
    } // namespace result

    namespace cmd
    {
        class CPBS : public Cmd
        {
          public:
            CPBS() noexcept;
            explicit CPBS(at::cmd::Modifier mod) noexcept;
            [[nodiscard]] auto parseCPBS(const Result &base_result) -> result::CPBS;
            void set(const std::string &storage = cpbs::simStorage);
        };
    } // namespace cmd
} // namespace at