~aleteoryx/muditaos

muditaos/module-bluetooth/Bluetooth/AbstractController.hpp -rw-r--r-- 3.0 KiB
a405cad6Aleteoryx trim readme 6 days 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
// Copyright (c) 2017-2024, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/blob/master/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 StartStream;
    struct StopStream;
    struct CallAnswered;
    struct CallTerminated;
    struct CallMissed;
    struct OutgoingCallStarted;
    struct IncomingCallStarted;
    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::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::CallMissed &evt)          = 0;
        virtual void handle(const bluetooth::event::OutgoingCallStarted &evt) = 0;
        virtual void handle(const bluetooth::event::IncomingCallStarted &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