~aleteoryx/muditaos

ref: b932e06472ee5d6f28fef424826c54d399f4ce64 muditaos/module-cellular/at/cmd/CPBR.hpp -rw-r--r-- 1.3 KiB
b932e064 — Lefucjusz [BH-1823] Fix relaxation start delay for specific MP3 files 2 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
48
49
50
51
52
53
54
55
56
57
58
59
// 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 cpbr
    {
        constexpr auto tokensCount = 4;
        enum class Tokens
        {
            Index = 0,
            Number,
            Type,
            Name
        };

        enum class ContactType
        {
            Unknown       = 129,
            International = 145,
            National      = 161
        };

        struct Contact
        {
            int index;
            std::string number;
            ContactType type;
            std::string name;
        };
    } // namespace cpbr
    namespace result
    {

        struct CPBR : public Result
        {
            std::vector<cpbr::Contact> contacts;
            explicit CPBR(const Result &that);
        };
    } // namespace result

    namespace cmd
    {
        class CPBR : public Cmd
        {
          public:
            CPBR() noexcept;
            explicit CPBR(at::cmd::Modifier mod) noexcept;
            [[nodiscard]] auto parseCPBR(const Result &base_result) -> result::CPBR;
            void setSimContactsReadRange(int firstIndex, int lastIndex);
        };
    } // namespace cmd
} // namespace at