summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/am/applets/web_browser.h
diff options
context:
space:
mode:
authorMorph <39850852+Morph1984@users.noreply.github.com>2020-11-08 13:17:12 +0100
committerMorph <39850852+Morph1984@users.noreply.github.com>2020-12-18 16:33:27 +0100
commitccb439efb088c990b41a6ceb5b1b330c8c27a1aa (patch)
tree81361beb06ba045f4ea875763cacf89f8170d390 /src/core/hle/service/am/applets/web_browser.h
parentMerge pull request #5205 from Morph1984/oss-extended-plus-minus (diff)
downloadyuzu-ccb439efb088c990b41a6ceb5b1b330c8c27a1aa.tar
yuzu-ccb439efb088c990b41a6ceb5b1b330c8c27a1aa.tar.gz
yuzu-ccb439efb088c990b41a6ceb5b1b330c8c27a1aa.tar.bz2
yuzu-ccb439efb088c990b41a6ceb5b1b330c8c27a1aa.tar.lz
yuzu-ccb439efb088c990b41a6ceb5b1b330c8c27a1aa.tar.xz
yuzu-ccb439efb088c990b41a6ceb5b1b330c8c27a1aa.tar.zst
yuzu-ccb439efb088c990b41a6ceb5b1b330c8c27a1aa.zip
Diffstat (limited to '')
-rw-r--r--src/core/hle/service/am/applets/web_browser.h59
1 files changed, 8 insertions, 51 deletions
diff --git a/src/core/hle/service/am/applets/web_browser.h b/src/core/hle/service/am/applets/web_browser.h
index 8d4027411..0584142e5 100644
--- a/src/core/hle/service/am/applets/web_browser.h
+++ b/src/core/hle/service/am/applets/web_browser.h
@@ -1,12 +1,12 @@
-// Copyright 2018 yuzu emulator team
+// Copyright 2020 yuzu Emulator Project
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
#pragma once
-#include <map>
-#include "core/file_sys/vfs_types.h"
-#include "core/hle/service/am/am.h"
+#include "common/common_funcs.h"
+#include "common/common_types.h"
+#include "core/hle/result.h"
#include "core/hle/service/am/applets/applets.h"
namespace Core {
@@ -15,14 +15,9 @@ class System;
namespace Service::AM::Applets {
-enum class ShimKind : u32;
-enum class ShopWebTarget;
-enum class WebArgTLVType : u16;
-
class WebBrowser final : public Applet {
public:
- WebBrowser(Core::System& system_, Core::Frontend::WebBrowserApplet& frontend_,
- Core::Frontend::ECommerceApplet* frontend_e_commerce_ = nullptr);
+ WebBrowser(Core::System& system_, const Core::Frontend::WebBrowserApplet& frontend_);
~WebBrowser() override;
@@ -33,49 +28,11 @@ public:
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:
- void InitializeInternal();
- void ExecuteInternal();
-
- // Specific initializers for the types of web applets
- void InitializeShop();
- void InitializeOffline();
-
- // Specific executors for the types of web applets
- void ExecuteShop();
- void ExecuteOffline();
-
- Core::Frontend::WebBrowserApplet& frontend;
-
- // Extra frontends for specialized functions
- Core::Frontend::ECommerceApplet* frontend_e_commerce;
-
- bool complete = false;
- bool unpacked = false;
- ResultCode status = RESULT_SUCCESS;
-
- ShimKind kind;
- std::map<WebArgTLVType, std::vector<u8>> args;
-
- FileSys::VirtualFile offline_romfs;
- std::string temporary_dir;
- std::string filename;
+ const Core::Frontend::WebBrowserApplet& frontend;
- ShopWebTarget shop_web_target;
- std::map<std::string, std::string, std::less<>> shop_query;
- std::optional<u64> title_id = 0;
- std::optional<u128> user_id;
- std::optional<bool> shop_full_display;
- std::string shop_extra_parameter;
+ bool complete{false};
+ ResultCode status{RESULT_SUCCESS};
Core::System& system;
};