~aleteoryx/muditaos

ref: 1f50621c2fdb5da142cbfd388d091200594dedd1 muditaos/module-bluetooth/Bluetooth/AbstractController.hpp -rw-r--r-- 3.1 KiB
1f50621c — Lefucjusz [MOS-184] Fix unit tests not failing on duplicate test case 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
60
61
62
63
64
65
66
67
68
69
70
71
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once

namespace bluetooth::event
{
    struct Base;
    struct StartScan;
    struct StopScan;
    struct GetDevicesAvailable;
    struct VisibilityOn;
    struct VisibilityOff;
    struct Connect;
    struct Disconnect;
    struct PowerOn;
    struct PowerOff;
    struct ShutDown;
    struct Pair;
    struct Unpair;
    struct StartRinging;
    struct StopRinging;
    struct StartRouting;
    struct StartStream;
    struct StopStream;
    struct CallAnswered;
    struct CallTerminated;
    struct CallStarted;
    struct IncomingCallNumber;
    struct SignalStrengthData;
    struct OperatorNameData;
    struct BatteryLevelData;
    struct NetworkStatusData;
} // namespace bluetooth::event

namespace bluetooth
{

    class AbstractController
    {
      public:
        virtual ~AbstractController() noexcept = default;

        virtual void handle(const bluetooth::event::Base &evt)                = 0;
        virtual void handle(const bluetooth::event::StartScan &evt)           = 0;
        virtual void handle(const bluetooth::event::StopScan &evt)            = 0;
        virtual void handle(const bluetooth::event::GetDevicesAvailable &evt) = 0;
        virtual void handle(const bluetooth::event::VisibilityOn &evt)        = 0;
        virtual void handle(const bluetooth::event::VisibilityOff &evt)       = 0;
        virtual void handle(const bluetooth::event::Connect &evt)             = 0;
        virtual void handle(const bluetooth::event::Disconnect &evt)          = 0;
        virtual void handle(const bluetooth::event::PowerOn &evt)             = 0;
        virtual void handle(const bluetooth::event::PowerOff &evt)            = 0;
        virtual void handle(const bluetooth::event::ShutDown &evt)            = 0;
        virtual void handle(const bluetooth::event::Pair &evt)                = 0;
        virtual void handle(const bluetooth::event::Unpair &evt)              = 0;
        virtual void handle(const bluetooth::event::StartRinging &evt)        = 0;
        virtual void handle(const bluetooth::event::StopRinging &evt)         = 0;
        virtual void handle(const bluetooth::event::StartRouting &evt)        = 0;
        virtual void handle(const bluetooth::event::StartStream &evt)         = 0;
        virtual void handle(const bluetooth::event::StopStream &evt)          = 0;
        virtual void handle(const bluetooth::event::CallAnswered &evt)        = 0;
        virtual void handle(const bluetooth::event::CallTerminated &evt)      = 0;
        virtual void handle(const bluetooth::event::CallStarted &evt)         = 0;
        virtual void handle(const bluetooth::event::IncomingCallNumber &evt)  = 0;
        virtual void handle(const bluetooth::event::SignalStrengthData &evt)  = 0;
        virtual void handle(const bluetooth::event::OperatorNameData &evt)    = 0;
        virtual void handle(const bluetooth::event::BatteryLevelData &evt)    = 0;
        virtual void handle(const bluetooth::event::NetworkStatusData &evt)   = 0;
    };
}; // namespace bluetooth