swift
Loading...
Searching...
No Matches
contextaudioproxy.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) 2013 swift Project Community / Contributors
2// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-swift-pilot-client-1
3
5
6#ifndef SWIFT_CORE_CONTEXT_CONTEXTVOICE_PROXY_H
7#define SWIFT_CORE_CONTEXT_CONTEXTVOICE_PROXY_H
8
9#include <QString>
10
18#include "misc/identifier.h"
20
21// clazy:excludeall=const-signal-or-slot
22
23class QDBusConnection;
24
25namespace swift::misc
26{
28 namespace Audio
29 {
30 class CAudioDeviceInfo;
31 }
32 namespace aviation
33 {
34 class CCallsign;
35 }
36} // namespace swift::misc
37
38namespace swift::core
39{
40 class CCoreFacade;
41 namespace context
42 {
46 {
49 friend class IContextAudio;
50
51 public:
53 ~CContextAudioProxy() override = default;
54
57 static void unitTestRelaySignals();
58
59 public slots:
62
65
68
71
74 const swift::misc::CIdentifier &identifier) override;
75
78 const swift::misc::CIdentifier &identifier) override;
79
81 bool hasRegisteredAudioCallsign(const swift::misc::aviation::CCallsign &callsign) const override;
82
83 private:
85
88 void relaySignals(const QString &serviceName, QDBusConnection &connection);
89
90 protected:
93 : CContextAudioBase(mode, runtime), m_dBusInterface(nullptr)
94 {}
95
97 CContextAudioProxy(const QString &serviceName, QDBusConnection &connection,
99 };
100 } // namespace context
101} // namespace swift::core
102
103#endif // SWIFT_CORE_CONTEXT_CONTEXTVOICE_PROXY_H
ContextMode
How to handle a given context.
The class providing facades (the contexts) for all DBus relevant operations.
Definition corefacade.h:57
CContextAudioBase(CCoreFacadeConfig::ContextMode mode, CCoreFacade *runtime)
Constructor.
void registerDevices(const swift::misc::audio::CAudioDeviceInfoList &devices)
Register a device on a machine (for core/GUI it will return all known devices on all machines).
void unRegisterDevices(const swift::misc::audio::CAudioDeviceInfoList &devices)
Unregister devices.
bool hasRegisteredAudioCallsign(const swift::misc::aviation::CCallsign &callsign) const
Un-register an audio callsign (used with AFV).
CContextAudioProxy(CCoreFacadeConfig::ContextMode mode, CCoreFacade *runtime)
Contructor.
void registerAudioCallsign(const swift::misc::aviation::CCallsign &callsign, const swift::misc::CIdentifier &identifier)
Register an audio callsign (used with AFV).
swift::misc::audio::CAudioDeviceInfoList getRegisteredDevices() const
All registered devices.
void unRegisterAudioCallsign(const swift::misc::aviation::CCallsign &callsign, const swift::misc::CIdentifier &identifier)
Un-register an audio callsign (used with AFV).
void unRegisterDevicesFor(const swift::misc::CIdentifier &identifier)
Remove all devices for identifier (i.e. "a machine").
Used for hand written interface based on virtual methods.
const CIdentifier & identifier() const
Get identifier.
Value object encapsulating information identifying a component of a modular distributed swift process...
Definition identifier.h:29
Value object encapsulating a list of audio devices.
Value object encapsulating information of a callsign.
Definition callsign.h:30
#define SWIFT_CORE_CONTEXTAUDIO_INTERFACENAME
DBus interface for context.
Backend services of the swift project, like dealing with the network or the simulators.
Definition actionbind.cpp:7
Free functions in swift::misc.
Q_CLASSINFO(Name, Value)
Q_OBJECTQ_OBJECT
#define SWIFT_CORE_EXPORT
Export a class or function from the library.