mirror of
https://github.com/mudita/MuditaOS.git
synced 2026-04-19 06:30:46 -04:00
Added error handling in case the file selected in the vertical list is either corrupted or deleted.
37 lines
873 B
C++
37 lines
873 B
C++
// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
|
|
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
|
|
|
|
#pragma once
|
|
|
|
#include "PopupRequestParams.hpp"
|
|
|
|
namespace gui
|
|
{
|
|
enum class AudioErrorType
|
|
{
|
|
UnsupportedMediaType,
|
|
FilesLimitExceeded,
|
|
FileDeleted,
|
|
Unknown
|
|
};
|
|
|
|
class AudioErrorParams : public PopupRequestParams
|
|
{
|
|
public:
|
|
explicit AudioErrorParams(AudioErrorType errorType)
|
|
: PopupRequestParams{popup::ID::AudioError}, errorType{errorType}
|
|
{}
|
|
|
|
explicit AudioErrorParams(AudioErrorParams *p) : PopupRequestParams{p->getPopupId()}, errorType(p->errorType)
|
|
{}
|
|
|
|
[[nodiscard]] AudioErrorType getErrorType()
|
|
{
|
|
return errorType;
|
|
}
|
|
|
|
private:
|
|
AudioErrorType errorType;
|
|
};
|
|
} // namespace gui
|