~aleteoryx/muditaos

ref: b4568c32eb2a4b37e9dfbbe08c446430eee2145c muditaos/module-services/service-cellular/src/SimContacts.hpp -rw-r--r-- 1.2 KiB
b4568c32 — Kuba Kleczkowski [MOS-977] Added VoLTE support in additional countries 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
// 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 <service-cellular/service-cellular/CellularMessage.hpp>

#include <memory>
#include <vector>

namespace at
{
    class Cmd;
    class BaseChannel;
} // namespace at

namespace sys
{
    class Message;
} // namespace sys

namespace cellular::service
{
    class SimContacts
    {
      public:
        /** Set cmd channel
         * \param channel channel (or nullptr to block communication)
         */
        void setChannel(at::BaseChannel *channel);
        /**
         * Reads all contacts stored on sim card
         * @param destination reference to data destination vector
         * @return boor result true on success, false on fail
         */
        auto getContacts(std::vector<cellular::SimContact> &destination) -> bool;

      private:
        /**
         * Reads number of contacts stored on sim card
         * @param count number of contacts stored on sim card
         * @return boor result true on success, false on fail
         */
        auto getContactCount(int &count) -> bool;
        at::BaseChannel *channel = nullptr;
    };
} // namespace cellular::service