Files
MuditaOS/module-apps/apps-common/popups/data/AudioErrorParams.hpp
Maciej Gibowicz c0e13a8397 [BH-1916] Add Error handling to the vertical list
Added error handling in case the file
selected in the vertical list is either
corrupted or deleted.
2024-04-10 15:33:14 +02:00

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