diff options
author | Zach Hilman <zachhilman@gmail.com> | 2019-03-12 00:38:53 +0100 |
---|---|---|
committer | Zach Hilman <zachhilman@gmail.com> | 2019-04-17 17:35:24 +0200 |
commit | f6e229505583d37c8320f3a01b3f86018fcde22b (patch) | |
tree | dbdb77d0c739b5e1d5da1e010ca28bcd0d5c5f79 /src/core/hle/service/am/applets/stub_applet.cpp | |
parent | general_frontend: Add frontend scaffold for PhotoViewer applet (diff) | |
download | yuzu-f6e229505583d37c8320f3a01b3f86018fcde22b.tar yuzu-f6e229505583d37c8320f3a01b3f86018fcde22b.tar.gz yuzu-f6e229505583d37c8320f3a01b3f86018fcde22b.tar.bz2 yuzu-f6e229505583d37c8320f3a01b3f86018fcde22b.tar.lz yuzu-f6e229505583d37c8320f3a01b3f86018fcde22b.tar.xz yuzu-f6e229505583d37c8320f3a01b3f86018fcde22b.tar.zst yuzu-f6e229505583d37c8320f3a01b3f86018fcde22b.zip |
Diffstat (limited to 'src/core/hle/service/am/applets/stub_applet.cpp')
-rw-r--r-- | src/core/hle/service/am/applets/stub_applet.cpp | 70 |
1 files changed, 0 insertions, 70 deletions
diff --git a/src/core/hle/service/am/applets/stub_applet.cpp b/src/core/hle/service/am/applets/stub_applet.cpp deleted file mode 100644 index ed166b87d..000000000 --- a/src/core/hle/service/am/applets/stub_applet.cpp +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright 2018 yuzu emulator team -// Licensed under GPLv2 or any later version -// Refer to the license.txt file included. - -#include <string> - -#include "common/hex_util.h" -#include "common/logging/log.h" -#include "core/hle/result.h" -#include "core/hle/service/am/am.h" -#include "core/hle/service/am/applets/stub_applet.h" - -namespace Service::AM::Applets { - -static void LogCurrentStorage(AppletDataBroker& broker, std::string prefix) { - std::unique_ptr<IStorage> storage = broker.PopNormalDataToApplet(); - for (; storage != nullptr; storage = broker.PopNormalDataToApplet()) { - const auto data = storage->GetData(); - LOG_INFO(Service_AM, - "called (STUBBED), during {} recieved normal data with size={:08X}, data={}", - prefix, data.size(), Common::HexVectorToString(data)); - } - - storage = broker.PopInteractiveDataToApplet(); - for (; storage != nullptr; storage = broker.PopInteractiveDataToApplet()) { - const auto data = storage->GetData(); - LOG_INFO(Service_AM, - "called (STUBBED), during {} recieved interactive data with size={:08X}, data={}", - prefix, data.size(), Common::HexVectorToString(data)); - } -} - -StubApplet::StubApplet() = default; - -StubApplet::~StubApplet() = default; - -void StubApplet::Initialize() { - LOG_WARNING(Service_AM, "called (STUBBED)"); - Applet::Initialize(); - LogCurrentStorage(broker, "Initialize"); -} - -bool StubApplet::TransactionComplete() const { - LOG_WARNING(Service_AM, "called (STUBBED)"); - return true; -} - -ResultCode StubApplet::GetStatus() const { - LOG_WARNING(Service_AM, "called (STUBBED)"); - return RESULT_SUCCESS; -} - -void StubApplet::ExecuteInteractive() { - LOG_WARNING(Service_AM, "called (STUBBED)"); - LogCurrentStorage(broker, "ExecuteInteractive"); - - broker.PushNormalDataFromApplet(IStorage{std::vector<u8>(0x1000)}); - broker.PushInteractiveDataFromApplet(IStorage{std::vector<u8>(0x1000)}); - broker.SignalStateChanged(); -} - -void StubApplet::Execute() { - LOG_WARNING(Service_AM, "called (STUBBED)"); - LogCurrentStorage(broker, "Execute"); - - broker.PushNormalDataFromApplet(IStorage{std::vector<u8>(0x1000)}); - broker.PushInteractiveDataFromApplet(IStorage{std::vector<u8>(0x1000)}); - broker.SignalStateChanged(); -} -} // namespace Service::AM::Applets |