summaryrefslogtreecommitdiff
path: root/src/core/hle/service/ngct
diff options
context:
space:
mode:
authorGravatar Liam2023-09-13 22:06:33 -0400
committerGravatar Liam2023-09-14 09:14:08 -0400
commit9d7eebde7b06f3a921707dfb7ebdee22ab9d257e (patch)
tree2cbb987de3e7e6640f0ff4b5ecdf4096eb8961a5 /src/core/hle/service/ngct
parentMerge pull request #11385 from liamwhite/acceptcancel (diff)
downloadyuzu-9d7eebde7b06f3a921707dfb7ebdee22ab9d257e.tar.gz
yuzu-9d7eebde7b06f3a921707dfb7ebdee22ab9d257e.tar.xz
yuzu-9d7eebde7b06f3a921707dfb7ebdee22ab9d257e.zip
ngc: implement service
Diffstat (limited to 'src/core/hle/service/ngct')
-rw-r--r--src/core/hle/service/ngct/ngct.cpp62
-rw-r--r--src/core/hle/service/ngct/ngct.h14
2 files changed, 0 insertions, 76 deletions
diff --git a/src/core/hle/service/ngct/ngct.cpp b/src/core/hle/service/ngct/ngct.cpp
deleted file mode 100644
index 493c80ed2..000000000
--- a/src/core/hle/service/ngct/ngct.cpp
+++ /dev/null
@@ -1,62 +0,0 @@
1// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
2// SPDX-License-Identifier: GPL-2.0-or-later
3
4#include "common/string_util.h"
5#include "core/core.h"
6#include "core/hle/service/ipc_helpers.h"
7#include "core/hle/service/ngct/ngct.h"
8#include "core/hle/service/server_manager.h"
9#include "core/hle/service/service.h"
10
11namespace Service::NGCT {
12
13class IService final : public ServiceFramework<IService> {
14public:
15 explicit IService(Core::System& system_) : ServiceFramework{system_, "ngct:u"} {
16 // clang-format off
17 static const FunctionInfo functions[] = {
18 {0, &IService::Match, "Match"},
19 {1, &IService::Filter, "Filter"},
20 };
21 // clang-format on
22
23 RegisterHandlers(functions);
24 }
25
26private:
27 void Match(HLERequestContext& ctx) {
28 const auto buffer = ctx.ReadBuffer();
29 const auto text = Common::StringFromFixedZeroTerminatedBuffer(
30 reinterpret_cast<const char*>(buffer.data()), buffer.size());
31
32 LOG_WARNING(Service_NGCT, "(STUBBED) called, text={}", text);
33
34 IPC::ResponseBuilder rb{ctx, 3};
35 rb.Push(ResultSuccess);
36 // Return false since we don't censor anything
37 rb.Push(false);
38 }
39
40 void Filter(HLERequestContext& ctx) {
41 const auto buffer = ctx.ReadBuffer();
42 const auto text = Common::StringFromFixedZeroTerminatedBuffer(
43 reinterpret_cast<const char*>(buffer.data()), buffer.size());
44
45 LOG_WARNING(Service_NGCT, "(STUBBED) called, text={}", text);
46
47 // Return the same string since we don't censor anything
48 ctx.WriteBuffer(buffer);
49
50 IPC::ResponseBuilder rb{ctx, 2};
51 rb.Push(ResultSuccess);
52 }
53};
54
55void LoopProcess(Core::System& system) {
56 auto server_manager = std::make_unique<ServerManager>(system);
57
58 server_manager->RegisterNamedService("ngct:u", std::make_shared<IService>(system));
59 ServerManager::RunServer(std::move(server_manager));
60}
61
62} // namespace Service::NGCT
diff --git a/src/core/hle/service/ngct/ngct.h b/src/core/hle/service/ngct/ngct.h
deleted file mode 100644
index 27c34dad4..000000000
--- a/src/core/hle/service/ngct/ngct.h
+++ /dev/null
@@ -1,14 +0,0 @@
1// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
2// SPDX-License-Identifier: GPL-2.0-or-later
3
4#pragma once
5
6namespace Core {
7class System;
8}
9
10namespace Service::NGCT {
11
12void LoopProcess(Core::System& system);
13
14} // namespace Service::NGCT