diff options
author | bunnei <bunneidev@gmail.com> | 2017-10-10 23:32:14 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2017-10-10 23:32:14 +0200 |
commit | 0906de9a14b735d1d409290ca050eb7d2c2d3d84 (patch) | |
tree | 79bb57d3a4dc4ca377e7a62744c3941de29e785b /src/core/hle/applets/applet.h | |
parent | Merge remote-tracking branch 'upstream/master' into nx (diff) | |
download | yuzu-0906de9a14b735d1d409290ca050eb7d2c2d3d84.tar yuzu-0906de9a14b735d1d409290ca050eb7d2c2d3d84.tar.gz yuzu-0906de9a14b735d1d409290ca050eb7d2c2d3d84.tar.bz2 yuzu-0906de9a14b735d1d409290ca050eb7d2c2d3d84.tar.lz yuzu-0906de9a14b735d1d409290ca050eb7d2c2d3d84.tar.xz yuzu-0906de9a14b735d1d409290ca050eb7d2c2d3d84.tar.zst yuzu-0906de9a14b735d1d409290ca050eb7d2c2d3d84.zip |
Diffstat (limited to 'src/core/hle/applets/applet.h')
-rw-r--r-- | src/core/hle/applets/applet.h | 83 |
1 files changed, 0 insertions, 83 deletions
diff --git a/src/core/hle/applets/applet.h b/src/core/hle/applets/applet.h deleted file mode 100644 index ebeed9813..000000000 --- a/src/core/hle/applets/applet.h +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright 2015 Citra Emulator Project -// Licensed under GPLv2 or any later version -// Refer to the license.txt file included. - -#pragma once - -#include <memory> -#include "core/hle/result.h" -#include "core/hle/service/apt/apt.h" - -namespace HLE { -namespace Applets { - -class Applet { -public: - virtual ~Applet() = default; - - /** - * Creates an instance of the Applet subclass identified by the parameter. - * and stores it in a global map. - * @param id Id of the applet to create. - * @returns ResultCode Whether the operation was successful or not. - */ - static ResultCode Create(Service::APT::AppletId id); - - /** - * Retrieves the Applet instance identified by the specified id. - * @param id Id of the Applet to retrieve. - * @returns Requested Applet or nullptr if not found. - */ - static std::shared_ptr<Applet> Get(Service::APT::AppletId id); - - /** - * Handles a parameter from the application. - * @param parameter Parameter data to handle. - * @returns ResultCode Whether the operation was successful or not. - */ - virtual ResultCode ReceiveParameter(const Service::APT::MessageParameter& parameter) = 0; - - /** - * Handles the Applet start event, triggered from the application. - * @param parameter Parameter data to handle. - * @returns ResultCode Whether the operation was successful or not. - */ - ResultCode Start(const Service::APT::AppletStartupParameter& parameter); - - /** - * Whether the applet is currently executing instead of the host application or not. - */ - bool IsRunning() const; - - /** - * Handles an update tick for the Applet, lets it update the screen, send commands, etc. - */ - virtual void Update() = 0; - -protected: - explicit Applet(Service::APT::AppletId id) : id(id) {} - - /** - * Handles the Applet start event, triggered from the application. - * @param parameter Parameter data to handle. - * @returns ResultCode Whether the operation was successful or not. - */ - virtual ResultCode StartImpl(const Service::APT::AppletStartupParameter& parameter) = 0; - - Service::APT::AppletId id; ///< Id of this Applet - std::shared_ptr<std::vector<u8>> heap_memory; ///< Heap memory for this Applet - - /// Whether this applet is currently running instead of the host application or not. - bool is_running = false; -}; - -/// Returns whether a library applet is currently running -bool IsLibraryAppletRunning(); - -/// Initializes the HLE applets -void Init(); - -/// Shuts down the HLE applets -void Shutdown(); -} -} // namespace |