~aleteoryx/muditaos

ref: 3b2e1ef67552975c0288fa125a235766c18d8670 muditaos/module-services/service-cellular/call/api/ModemCallApi.hpp -rw-r--r-- 1.4 KiB
3b2e1ef6 — Lukasz Mastalerz [CP-1665] Adding an information about device colour to USB descriptor 3 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
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once

#include "PhoneModes/PhoneMode.hpp"
#include "PhoneModes/Tethering.hpp"

class CellularMux;
class ServiceCellular;

namespace call::api
{
    class Api
    {
      public:
        virtual bool answerIncomingCall()                  = 0;
        virtual bool hangupCall()                          = 0;
        virtual bool rejectCall()                          = 0;
        virtual bool areCallsFromFavouritesEnabled()       = 0;
        virtual sys::phone_modes::PhoneMode getMode()      = 0;
        virtual sys::phone_modes::Tethering getTethering() = 0;
        virtual ~Api()                                     = default;
    };
} // namespace call::api

namespace cellular
{
    class Api : public call::api::Api
    {
      private:
        ServiceCellular *cellular = nullptr;
        CellularMux *cmux         = nullptr;

      public:
        Api() = default;
        Api(ServiceCellular *cellular, CellularMux *);

        bool answerIncomingCall() override;
        bool hangupCall() override;
        bool rejectCall() override;
        bool areCallsFromFavouritesEnabled() override;
        sys::phone_modes::PhoneMode getMode() override;
        sys::phone_modes::Tethering getTethering() override;
    };
} // namespace cellular