summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/am/applets/applet_profile_select.h
diff options
context:
space:
mode:
authorMorph <39850852+Morph1984@users.noreply.github.com>2021-07-14 06:38:24 +0200
committerMorph <39850852+Morph1984@users.noreply.github.com>2021-07-14 07:07:09 +0200
commit79824d7d1b69382571e5c05fe3e66485212d06f5 (patch)
tree59feef24b4a021b67ea88f0e4224e6067fb9110c /src/core/hle/service/am/applets/applet_profile_select.h
parentapplets: Append qt_ prefix to Qt frontend applets (diff)
downloadyuzu-79824d7d1b69382571e5c05fe3e66485212d06f5.tar
yuzu-79824d7d1b69382571e5c05fe3e66485212d06f5.tar.gz
yuzu-79824d7d1b69382571e5c05fe3e66485212d06f5.tar.bz2
yuzu-79824d7d1b69382571e5c05fe3e66485212d06f5.tar.lz
yuzu-79824d7d1b69382571e5c05fe3e66485212d06f5.tar.xz
yuzu-79824d7d1b69382571e5c05fe3e66485212d06f5.tar.zst
yuzu-79824d7d1b69382571e5c05fe3e66485212d06f5.zip
Diffstat (limited to 'src/core/hle/service/am/applets/applet_profile_select.h')
-rw-r--r--src/core/hle/service/am/applets/applet_profile_select.h59
1 files changed, 59 insertions, 0 deletions
diff --git a/src/core/hle/service/am/applets/applet_profile_select.h b/src/core/hle/service/am/applets/applet_profile_select.h
new file mode 100644
index 000000000..8fb76e6c4
--- /dev/null
+++ b/src/core/hle/service/am/applets/applet_profile_select.h
@@ -0,0 +1,59 @@
+// Copyright 2018 yuzu emulator team
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included.
+
+#pragma once
+
+#include <vector>
+
+#include "common/common_funcs.h"
+#include "common/uuid.h"
+#include "core/hle/result.h"
+#include "core/hle/service/am/applets/applets.h"
+
+namespace Core {
+class System;
+}
+
+namespace Service::AM::Applets {
+
+struct UserSelectionConfig {
+ // TODO(DarkLordZach): RE this structure
+ // It seems to be flags and the like that determine the UI of the applet on the switch... from
+ // my research this is safe to ignore for now.
+ INSERT_PADDING_BYTES(0xA0);
+};
+static_assert(sizeof(UserSelectionConfig) == 0xA0, "UserSelectionConfig has incorrect size.");
+
+struct UserSelectionOutput {
+ u64 result;
+ u128 uuid_selected;
+};
+static_assert(sizeof(UserSelectionOutput) == 0x18, "UserSelectionOutput has incorrect size.");
+
+class ProfileSelect final : public Applet {
+public:
+ explicit ProfileSelect(Core::System& system_, LibraryAppletMode applet_mode_,
+ const Core::Frontend::ProfileSelectApplet& frontend_);
+ ~ProfileSelect() override;
+
+ void Initialize() override;
+
+ bool TransactionComplete() const override;
+ ResultCode GetStatus() const override;
+ void ExecuteInteractive() override;
+ void Execute() override;
+
+ void SelectionComplete(std::optional<Common::UUID> uuid);
+
+private:
+ const Core::Frontend::ProfileSelectApplet& frontend;
+
+ UserSelectionConfig config;
+ bool complete = false;
+ ResultCode status = ResultSuccess;
+ std::vector<u8> final_data;
+ Core::System& system;
+};
+
+} // namespace Service::AM::Applets