Files
MuditaOS/module-apps/application-music-player/AudioNotificationsHandler.cpp
Alek Rudnik cf019e3d96 [EGD-6776] Music Player All Songs Window
Full MVP design.
Removed redundant Empty Window.
Added play/pause/resume/stop control.
2021-07-30 10:36:30 +02:00

27 lines
816 B
C++

// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#include "AudioNotificationsHandler.hpp"
#include <service-audio/AudioMessage.hpp>
namespace app::music_player
{
AudioNotificationsHandler::AudioNotificationsHandler(
std::shared_ptr<app::music_player::SongsContract::Presenter> presenter)
: presenter(presenter)
{}
sys::MessagePointer AudioNotificationsHandler::handleAudioStopNotification(
const AudioStopNotification *notification)
{
if (notification == nullptr) {
return sys::msgNotHandled();
}
return presenter->handleAudioStopNotifiaction(notification->token) ? sys::msgNotHandled() : sys::msgHandled();
}
} // namespace app::music_player