summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/nifm/nifm.cpp
diff options
context:
space:
mode:
authormailwl <mailwl@gmail.com>2018-02-22 15:28:15 +0100
committermailwl <mailwl@gmail.com>2018-02-22 15:28:15 +0100
commite4f94ee30bce782eb9a02cd988a9325a9f97e0d6 (patch)
tree9aff20e8bc3f135eb4df6275347ec5ec43923d7d /src/core/hle/service/nifm/nifm.cpp
parentStub am::SetScreenShotPermission, and bsd::StartMonitoring functions (diff)
downloadyuzu-e4f94ee30bce782eb9a02cd988a9325a9f97e0d6.tar
yuzu-e4f94ee30bce782eb9a02cd988a9325a9f97e0d6.tar.gz
yuzu-e4f94ee30bce782eb9a02cd988a9325a9f97e0d6.tar.bz2
yuzu-e4f94ee30bce782eb9a02cd988a9325a9f97e0d6.tar.lz
yuzu-e4f94ee30bce782eb9a02cd988a9325a9f97e0d6.tar.xz
yuzu-e4f94ee30bce782eb9a02cd988a9325a9f97e0d6.tar.zst
yuzu-e4f94ee30bce782eb9a02cd988a9325a9f97e0d6.zip
Diffstat (limited to '')
-rw-r--r--src/core/hle/service/nifm/nifm.cpp32
1 files changed, 29 insertions, 3 deletions
diff --git a/src/core/hle/service/nifm/nifm.cpp b/src/core/hle/service/nifm/nifm.cpp
index 290a2ee74..e6f05eae5 100644
--- a/src/core/hle/service/nifm/nifm.cpp
+++ b/src/core/hle/service/nifm/nifm.cpp
@@ -3,6 +3,7 @@
// Refer to the license.txt file included.
#include "core/hle/ipc_helpers.h"
+#include "core/hle/kernel/event.h"
#include "core/hle/service/nifm/nifm.h"
#include "core/hle/service/nifm/nifm_a.h"
#include "core/hle/service/nifm/nifm_s.h"
@@ -28,9 +29,9 @@ class IRequest final : public ServiceFramework<IRequest> {
public:
explicit IRequest() : ServiceFramework("IRequest") {
static const FunctionInfo functions[] = {
- {0, nullptr, "GetRequestState"},
- {1, nullptr, "GetResult"},
- {2, nullptr, "GetSystemEventReadableHandles"},
+ {0, &IRequest::GetRequestState, "GetRequestState"},
+ {1, &IRequest::GetResult, "GetResult"},
+ {2, &IRequest::GetSystemEventReadableHandles, "GetSystemEventReadableHandles"},
{3, nullptr, "Cancel"},
{4, nullptr, "Submit"},
{5, nullptr, "SetRequirement"},
@@ -55,7 +56,32 @@ public:
{25, nullptr, "UnregisterSocketDescriptor"},
};
RegisterHandlers(functions);
+
+ event1 = Kernel::Event::Create(Kernel::ResetType::OneShot, "IRequest:Event1");
+ event2 = Kernel::Event::Create(Kernel::ResetType::OneShot, "IRequest:Event2");
+ }
+
+private:
+ void GetRequestState(Kernel::HLERequestContext& ctx) {
+ LOG_WARNING(Service_NIFM, "(STUBBED) called");
+ IPC::ResponseBuilder rb{ctx, 3};
+ rb.Push(RESULT_SUCCESS);
+ rb.Push<u32>(0);
}
+ void GetResult(Kernel::HLERequestContext& ctx) {
+ LOG_WARNING(Service_NIFM, "(STUBBED) called");
+ IPC::ResponseBuilder rb{ctx, 3};
+ rb.Push(RESULT_SUCCESS);
+ rb.Push<u32>(0);
+ }
+ void GetSystemEventReadableHandles(Kernel::HLERequestContext& ctx) {
+ LOG_WARNING(Service_NIFM, "(STUBBED) called");
+ IPC::ResponseBuilder rb{ctx, 2, 2};
+ rb.Push(RESULT_SUCCESS);
+ rb.PushCopyObjects(event1, event2);
+ }
+
+ Kernel::SharedPtr<Kernel::Event> event1, event2;
};
class INetworkProfile final : public ServiceFramework<INetworkProfile> {