4#ifndef QAUDIOSTATEMACHINE_P_H
5#define QAUDIOSTATEMACHINE_P_H
46 if (
auto stateMachine = std::exchange(m_stateMachine,
nullptr))
47 stateMachine->reset(m_state, m_prevState);
54 : m_stateMachine(std::exchange(
other.m_stateMachine,
nullptr)),
55 m_state(
other.m_state),
56 m_prevState(
other.m_prevState)
60 operator bool()
const {
return m_stateMachine !=
nullptr; }
73 : m_stateMachine(stateMachine), m_state(
state), m_prevState(prevState)
80 const RawState m_prevState;
93 bool isActiveOrIdle()
const;
95 bool isDraining()
const;
98 std::pair<bool, bool> getDrainedAndStopped()
const;
106 bool forceUpdateError =
false);
111 return stop(
error,
false,
true);
136 template <
typename StatesChecker,
typename NewState>
137 Notifier changeState(
const StatesChecker &statesChecker,
const NewState &
newState);
139 void reset(RawState
state, RawState prevState);
142 QPointer<QAudioStateChangeNotifier> m_notifier;
DarwinBluetooth::LECBManagerNotifier * notifier
Notifier(Notifier &&other) noexcept
Notifier(const Notifier &)=delete
bool isStateChanged() const
QAudio::State audioState() const
QAudio::State prevAudioState() const
Notifier stopOrUpdateError(QAudio::Error error=QAudio::NoError)
AudioStateMachineUtils::RawState RawState
void newState(QList< State > &states, const char *token, const char *lexem, bool pre)
constexpr bool isDrainingState(RawState state)
constexpr QAudio::State toAudioState(RawState state)
Combined button and popup list for selecting options.
QAudioStateMachine::Notifier Notifier
DBusConnection const char DBusError * error
static void setError(QJsonObject *response, const QString &msg)