summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/am/applets/web_browser.h
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2019-01-10 23:04:38 +0100
committerGitHub <noreply@github.com>2019-01-10 23:04:38 +0100
commit83e8ad23310937bb72f4412c15f45231a19202f7 (patch)
tree80301af69b14a701f16e21d41ced436850085031 /src/core/hle/service/am/applets/web_browser.h
parentMerge pull request #2010 from ReinUsesLisp/gmem (diff)
parentbuild: Copy web engine resources to correct location (diff)
downloadyuzu-83e8ad23310937bb72f4412c15f45231a19202f7.tar
yuzu-83e8ad23310937bb72f4412c15f45231a19202f7.tar.gz
yuzu-83e8ad23310937bb72f4412c15f45231a19202f7.tar.bz2
yuzu-83e8ad23310937bb72f4412c15f45231a19202f7.tar.lz
yuzu-83e8ad23310937bb72f4412c15f45231a19202f7.tar.xz
yuzu-83e8ad23310937bb72f4412c15f45231a19202f7.tar.zst
yuzu-83e8ad23310937bb72f4412c15f45231a19202f7.zip
Diffstat (limited to 'src/core/hle/service/am/applets/web_browser.h')
-rw-r--r--src/core/hle/service/am/applets/web_browser.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/src/core/hle/service/am/applets/web_browser.h b/src/core/hle/service/am/applets/web_browser.h
new file mode 100644
index 000000000..b9e228fac
--- /dev/null
+++ b/src/core/hle/service/am/applets/web_browser.h
@@ -0,0 +1,44 @@
+// Copyright 2018 yuzu emulator team
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included.
+
+#pragma once
+
+#include "core/file_sys/vfs_types.h"
+#include "core/hle/service/am/am.h"
+#include "core/hle/service/am/applets/applets.h"
+
+namespace Service::AM::Applets {
+
+class WebBrowser final : public Applet {
+public:
+ WebBrowser();
+ ~WebBrowser() override;
+
+ void Initialize() override;
+
+ bool TransactionComplete() const override;
+ ResultCode GetStatus() const override;
+ void ExecuteInteractive() override;
+ void Execute() override;
+
+ // Callback to be fired when the frontend needs the manual RomFS unpacked to temporary
+ // directory. This is a blocking call and may take a while as some manuals can be up to 100MB in
+ // size. Attempting to access files at filename before invocation is likely to not work.
+ void UnpackRomFS();
+
+ // Callback to be fired when the frontend is finished browsing. This will delete the temporary
+ // manual RomFS extracted files, so ensure this is only called at actual finalization.
+ void Finalize();
+
+private:
+ bool complete = false;
+ bool unpacked = false;
+ ResultCode status = RESULT_SUCCESS;
+
+ FileSys::VirtualFile manual_romfs;
+ std::string temporary_dir;
+ std::string filename;
+};
+
+} // namespace Service::AM::Applets