summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/acc/async_context.h
diff options
context:
space:
mode:
authorChloe Marcec <dmarcecguzman@gmail.com>2021-09-06 13:16:21 +0200
committerChloe Marcec <dmarcecguzman@gmail.com>2021-09-06 13:16:21 +0200
commit4e2aa50cefd56f4bb119c9c6e6ab89afbb31351e (patch)
tree0962f803f2826a1d6e3ae573309f4a84bd897950 /src/core/hle/service/acc/async_context.h
parentMerge pull request #6968 from bunnei/nvflinger-event (diff)
downloadyuzu-4e2aa50cefd56f4bb119c9c6e6ab89afbb31351e.tar
yuzu-4e2aa50cefd56f4bb119c9c6e6ab89afbb31351e.tar.gz
yuzu-4e2aa50cefd56f4bb119c9c6e6ab89afbb31351e.tar.bz2
yuzu-4e2aa50cefd56f4bb119c9c6e6ab89afbb31351e.tar.lz
yuzu-4e2aa50cefd56f4bb119c9c6e6ab89afbb31351e.tar.xz
yuzu-4e2aa50cefd56f4bb119c9c6e6ab89afbb31351e.tar.zst
yuzu-4e2aa50cefd56f4bb119c9c6e6ab89afbb31351e.zip
Diffstat (limited to '')
-rw-r--r--src/core/hle/service/acc/async_context.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/core/hle/service/acc/async_context.h b/src/core/hle/service/acc/async_context.h
new file mode 100644
index 000000000..2453a79f5
--- /dev/null
+++ b/src/core/hle/service/acc/async_context.h
@@ -0,0 +1,36 @@
+// Copyright 2021 yuzu emulator team
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included.
+
+#pragma once
+
+#include "core/hle/kernel/k_event.h"
+#include "core/hle/service/service.h"
+
+namespace Core {
+class System;
+}
+
+namespace Service::Account {
+
+class IAsyncContext : public ServiceFramework<IAsyncContext> {
+public:
+ explicit IAsyncContext(Core::System& system_);
+
+ void GetSystemEvent(Kernel::HLERequestContext& ctx);
+ void Cancel(Kernel::HLERequestContext& ctx);
+ void HasDone(Kernel::HLERequestContext& ctx);
+ void GetResult(Kernel::HLERequestContext& ctx);
+
+protected:
+ virtual bool IsComplete() = 0;
+ virtual void Cancel() = 0;
+ virtual ResultCode GetResult() = 0;
+
+ void MarkComplete();
+
+ bool is_complete{false};
+ Kernel::KEvent compeletion_event;
+};
+
+} // namespace Service::Account