diff options
author | Zach Hilman <zachhilman@gmail.com> | 2019-03-12 00:36:36 +0100 |
---|---|---|
committer | Zach Hilman <zachhilman@gmail.com> | 2019-04-17 17:35:24 +0200 |
commit | de3cfb1d37462a4843b8cd4e27ac400e1d479748 (patch) | |
tree | e880724ae0657a34c601b83e5323d4ba865a5496 /src/core/hle/service/am/applets/error.h | |
parent | applets: Port current applets to take frontend in constructor (diff) | |
download | yuzu-de3cfb1d37462a4843b8cd4e27ac400e1d479748.tar yuzu-de3cfb1d37462a4843b8cd4e27ac400e1d479748.tar.gz yuzu-de3cfb1d37462a4843b8cd4e27ac400e1d479748.tar.bz2 yuzu-de3cfb1d37462a4843b8cd4e27ac400e1d479748.tar.lz yuzu-de3cfb1d37462a4843b8cd4e27ac400e1d479748.tar.xz yuzu-de3cfb1d37462a4843b8cd4e27ac400e1d479748.tar.zst yuzu-de3cfb1d37462a4843b8cd4e27ac400e1d479748.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/service/am/applets/error.h | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/src/core/hle/service/am/applets/error.h b/src/core/hle/service/am/applets/error.h new file mode 100644 index 000000000..fcf9caef2 --- /dev/null +++ b/src/core/hle/service/am/applets/error.h @@ -0,0 +1,47 @@ +// Copyright 2019 yuzu emulator team +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#pragma once + +#include "core/hle/result.h" +#include "core/hle/service/am/applets/applets.h" + +namespace Service::AM::Applets { + +union ErrorArguments; + +enum class ErrorAppletMode : u8 { + ShowError = 0, + ShowSystemError = 1, + ShowApplicationError = 2, + ShowEula = 3, + ShowErrorPctl = 4, + ShowErrorRecord = 5, + ShowUpdateEula = 8, +}; + +class Error final : public Applet { +public: + Error(const Core::Frontend::ErrorApplet& frontend); + ~Error() override; + + void Initialize() override; + + bool TransactionComplete() const override; + ResultCode GetStatus() const override; + void ExecuteInteractive() override; + void Execute() override; + + void DisplayCompleted(); + +private: + const Core::Frontend::ErrorApplet& frontend; + ResultCode error_code = RESULT_SUCCESS; + ErrorAppletMode mode; + std::unique_ptr<ErrorArguments> args; + + bool complete; +}; + +} // namespace Service::AM::Applets |