VERY experimental Nintendo Switch 2 emulator
C++
More services & small clean ups
purpasmart969796bc1fa251
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txtindex c00fc34931..fdd97c1843 100644--- a/src/core/CMakeLists.txt+++ b/src/core/CMakeLists.txt@@ -32,8 +32,10 @@ set(SRCShle/kernel/shared_memory.cpphle/kernel/thread.cpphle/service/ac_u.cpp+ hle/service/act_u.cpphle/service/am_app.cpphle/service/am_net.cpp+ hle/service/apt_a.cpphle/service/apt_u.cpphle/service/boss_u.cpphle/service/cecd_u.cpp@@ -43,17 +45,19 @@ set(SRCShle/service/csnd_snd.cpphle/service/dsp_dsp.cpphle/service/err_f.cpp+ hle/service/frd_u.cpphle/service/fs/archive.cpphle/service/fs/fs_user.cpp- hle/service/frd_u.cpphle/service/gsp_gpu.cpphle/service/hid_user.cpp+ hle/service/http_c.cpphle/service/ir_rst.cpphle/service/ir_u.cpphle/service/ldr_ro.cpphle/service/mic_u.cpp- hle/service/nim_aoc.cpphle/service/ndm_u.cpp+ hle/service/news_u.cpp+ hle/service/nim_aoc.cpphle/service/nwm_uds.cpphle/service/pm_app.cpphle/service/ptm_u.cpp@@ -118,8 +122,10 @@ set(HEADERShle/kernel/shared_memory.hhle/kernel/thread.hhle/service/ac_u.h+ hle/service/act_u.hhle/service/am_app.hhle/service/am_net.h+ hle/service/apt_a.hhle/service/apt_u.hhle/service/boss_u.hhle/service/cecd_u.h@@ -129,17 +135,19 @@ set(HEADERShle/service/csnd_snd.hhle/service/dsp_dsp.hhle/service/err_f.h+ hle/service/frd_u.hhle/service/fs/archive.hhle/service/fs/fs_user.h- hle/service/frd_u.hhle/service/gsp_gpu.hhle/service/hid_user.h+ hle/service/http_c.hhle/service/ir_rst.hhle/service/ir_u.hhle/service/ldr_ro.hhle/service/mic_u.h- hle/service/nim_aoc.hhle/service/ndm_u.h+ hle/service/news_u.h+ hle/service/nim_aoc.hhle/service/nwm_uds.hhle/service/pm_app.hhle/service/ptm_u.hdiff --git a/src/core/hle/service/ac_u.cpp b/src/core/hle/service/ac_u.cppindex d180bb4ec5..20a3fa2e51 100644--- a/src/core/hle/service/ac_u.cpp+++ b/src/core/hle/service/ac_u.cpp@@ -56,7 +56,4 @@ Interface::Interface() {Register(FunctionTable, ARRAY_SIZE(FunctionTable));}-Interface::~Interface() {-}-} // namespacediff --git a/src/core/hle/service/ac_u.h b/src/core/hle/service/ac_u.hindex 097b18c4e3..f1d26ebe8f 100644--- a/src/core/hle/service/ac_u.h+++ b/src/core/hle/service/ac_u.h@@ -16,11 +16,7 @@ namespace AC_U {class Interface : public Service::Interface {public:Interface();- ~Interface();- /**- * Gets the string port name used by CTROS for the service- * @return Port name of service- */+std::string GetPortName() const override {return "ac:u";}diff --git a/src/core/hle/service/act_u.cpp b/src/core/hle/service/act_u.cppnew file mode 100644index 0000000000..10870f14b5--- /dev/null+++ b/src/core/hle/service/act_u.cpp@@ -0,0 +1,24 @@+// Copyright 2014 Citra Emulator Project+// Licensed under GPLv2 or any later version+// Refer to the license.txt file included.++#include "common/log.h"+#include "core/hle/hle.h"+#include "core/hle/service/act_u.h"++////////////////////////////////////////////////////////////////////////////////////////////////////+// Namespace ACT_U++namespace ACT_U {++// Empty arrays are illegal -- commented out until an entry is added.+//const Interface::FunctionInfo FunctionTable[] = { };++////////////////////////////////////////////////////////////////////////////////////////////////////+// Interface class++Interface::Interface() {+ //Register(FunctionTable, ARRAY_SIZE(FunctionTable));+}++} // namespacediff --git a/src/core/hle/service/act_u.h b/src/core/hle/service/act_u.hnew file mode 100644index 0000000000..be41454a4a--- /dev/null+++ b/src/core/hle/service/act_u.h@@ -0,0 +1,23 @@+// Copyright 2014 Citra Emulator Project+// Licensed under GPLv2 or any later version+// Refer to the license.txt file included.++#pragma once++#include "core/hle/service/service.h"++////////////////////////////////////////////////////////////////////////////////////////////////////+// Namespace ACT_U++namespace ACT_U {++class Interface : public Service::Interface {+public:+ Interface();++ std::string GetPortName() const override {+ return "act:u";+ }+};++} // namespacediff --git a/src/core/hle/service/am_app.h b/src/core/hle/service/am_app.hindex 30a0be4c58..50dc2f5a2c 100644--- a/src/core/hle/service/am_app.h+++ b/src/core/hle/service/am_app.h@@ -15,10 +15,6 @@ class Interface : public Service::Interface {public:Interface();- /**- * Gets the string port name used by CTROS for the service- * @return Port name of service- */std::string GetPortName() const override {return "am:app";}diff --git a/src/core/hle/service/am_net.cpp b/src/core/hle/service/am_net.cppindex 943205e9ed..112844e5bf 100644--- a/src/core/hle/service/am_net.cpp+++ b/src/core/hle/service/am_net.cpp@@ -41,7 +41,4 @@ Interface::Interface() {Register(FunctionTable, ARRAY_SIZE(FunctionTable));}-Interface::~Interface() {-}-} // namespacediff --git a/src/core/hle/service/am_net.h b/src/core/hle/service/am_net.hindex c0dbfb4442..616c33ee8f 100644--- a/src/core/hle/service/am_net.h+++ b/src/core/hle/service/am_net.h@@ -14,11 +14,7 @@ namespace AM_NET {class Interface : public Service::Interface {public:Interface();- ~Interface();- /**- * Gets the string port name used by CTROS for the service- * @return Port name of service- */+std::string GetPortName() const override {return "am:net";}diff --git a/src/core/hle/service/apt_a.cpp b/src/core/hle/service/apt_a.cppnew file mode 100644index 0000000000..dcf5ec4fef--- /dev/null+++ b/src/core/hle/service/apt_a.cpp@@ -0,0 +1,34 @@+// Copyright 2014 Citra Emulator Project+// Licensed under GPLv2 or any later version+// Refer to the license.txt file included.++#include "common/log.h"+#include "core/hle/hle.h"+#include "core/hle/service/apt_a.h"++////////////////////////////////////////////////////////////////////////////////////////////////////+// Namespace APT_A++namespace APT_A {++const Interface::FunctionInfo FunctionTable[] = {+ {0x00010040, nullptr, "GetLockHandle?"},+ {0x00020080, nullptr, "Initialize?"},+ {0x00030040, nullptr, "Enable?"},+ {0x00040040, nullptr, "Finalize?"},+ {0x00050040, nullptr, "GetAppletManInfo?"},+ {0x00060040, nullptr, "GetAppletInfo?"},+ {0x003B0040, nullptr, "CancelLibraryApplet?"},+ {0x00430040, nullptr, "NotifyToWait?"},+ {0x004B00C2, nullptr, "AppletUtility?"},+ {0x00550040, nullptr, "WriteInputToNsState?"},+};++////////////////////////////////////////////////////////////////////////////////////////////////////+// Interface class++Interface::Interface() {+ Register(FunctionTable, ARRAY_SIZE(FunctionTable));+}++} // namespacediff --git a/src/core/hle/service/apt_a.h b/src/core/hle/service/apt_a.hnew file mode 100644index 0000000000..6cbf1288f1--- /dev/null+++ b/src/core/hle/service/apt_a.h@@ -0,0 +1,23 @@+// Copyright 2014 Citra Emulator Project+// Licensed under GPLv2 or any later version+// Refer to the license.txt file included.++#pragma once++#include "core/hle/service/service.h"++////////////////////////////////////////////////////////////////////////////////////////////////////+// Namespace APT_A++namespace APT_A {++class Interface : public Service::Interface {+public:+ Interface();++ std::string GetPortName() const override {+ return "APT:A";+ }+};++} // namespacediff --git a/src/core/hle/service/apt_u.cpp b/src/core/hle/service/apt_u.cppindex b9edf0323f..e7df72ed7f 100644--- a/src/core/hle/service/apt_u.cpp+++ b/src/core/hle/service/apt_u.cpp@@ -330,7 +330,4 @@ Interface::Interface() {Register(FunctionTable, ARRAY_SIZE(FunctionTable));}-Interface::~Interface() {-}-} // namespacediff --git a/src/core/hle/service/apt_u.h b/src/core/hle/service/apt_u.hindex 3807cbecc3..aad918cfc8 100644--- a/src/core/hle/service/apt_u.h+++ b/src/core/hle/service/apt_u.h@@ -20,15 +20,8 @@ namespace APT_U {/// Interface to "APT:U" serviceclass Interface : public Service::Interface {public:-Interface();- ~Interface();-- /**- * Gets the string port name used by CTROS for the service- * @return Port name of service- */std::string GetPortName() const override {return "APT:U";}diff --git a/src/core/hle/service/boss_u.cpp b/src/core/hle/service/boss_u.cppindex 24cd413da5..1820ea7ad9 100644--- a/src/core/hle/service/boss_u.cpp+++ b/src/core/hle/service/boss_u.cpp@@ -11,18 +11,15 @@namespace BOSS_U {- const Interface::FunctionInfo FunctionTable[] = {- {0x00020100, nullptr, "GetStorageInfo"},- };+const Interface::FunctionInfo FunctionTable[] = {+ {0x00020100, nullptr, "GetStorageInfo"},+};- ////////////////////////////////////////////////////////////////////////////////////////////////////- // Interface class-- Interface::Interface() {- Register(FunctionTable, ARRAY_SIZE(FunctionTable));- }+////////////////////////////////////////////////////////////////////////////////////////////////////+// Interface class- Interface::~Interface() {- }+Interface::Interface() {+ Register(FunctionTable, ARRAY_SIZE(FunctionTable));+}} // namespacediff --git a/src/core/hle/service/boss_u.h b/src/core/hle/service/boss_u.hindex 31e4d0c3a2..2668f2dfd9 100644--- a/src/core/hle/service/boss_u.h+++ b/src/core/hle/service/boss_u.h@@ -11,17 +11,13 @@namespace BOSS_U {- class Interface : public Service::Interface {- public:- Interface();- ~Interface();- /**- * Gets the string port name used by CTROS for the service- * @return Port name of service- */- std::string GetPortName() const {- return "boss:U";- }- };+class Interface : public Service::Interface {+public:+ Interface();++ std::string GetPortName() const override {+ return "boss:U";+ }+};} // namespacediff --git a/src/core/hle/service/cecd_u.h b/src/core/hle/service/cecd_u.hindex 0c9968bfed..e67564135d 100644--- a/src/core/hle/service/cecd_u.h+++ b/src/core/hle/service/cecd_u.h@@ -15,10 +15,6 @@ class Interface : public Service::Interface {public:Interface();- /**- * Gets the string port name used by CTROS for the service- * @return Port name of service- */std::string GetPortName() const override {return "cecd:u";}diff --git a/src/core/hle/service/cfg/cfg_i.cpp b/src/core/hle/service/cfg/cfg_i.cppindex 3254cc10e2..7c1ee8ac37 100644--- a/src/core/hle/service/cfg/cfg_i.cpp+++ b/src/core/hle/service/cfg/cfg_i.cpp@@ -66,40 +66,40 @@ static void FormatConfig(Service::Interface* self) {}const Interface::FunctionInfo FunctionTable[] = {- {0x04010082, GetConfigInfoBlk8, "GetConfigInfoBlk8"},- {0x04020082, nullptr, "SetConfigInfoBlk4"},- {0x04030000, UpdateConfigNANDSavegame, "UpdateConfigNANDSavegame"},- {0x04040042, nullptr, "GetLocalFriendCodeSeedData"},- {0x04050000, nullptr, "GetLocalFriendCodeSeed"},- {0x04060000, nullptr, "SecureInfoGetRegion"},- {0x04070000, nullptr, "SecureInfoGetByte101"},- {0x04080042, nullptr, "SecureInfoGetSerialNo"},- {0x04090000, nullptr, "UpdateConfigBlk00040003"},- {0x08010082, GetConfigInfoBlk8, "GetConfigInfoBlk8"},- {0x08020082, nullptr, "SetConfigInfoBlk4"},- {0x08030000, UpdateConfigNANDSavegame, "UpdateConfigNANDSavegame"},- {0x080400C2, nullptr, "CreateConfigInfoBlk"},- {0x08050000, nullptr, "DeleteConfigNANDSavefile"},- {0x08060000, FormatConfig, "FormatConfig"},- {0x08070000, nullptr, "Unknown"},- {0x08080000, nullptr, "UpdateConfigBlk1"},- {0x08090000, nullptr, "UpdateConfigBlk2"},- {0x080A0000, nullptr, "UpdateConfigBlk3"},- {0x080B0082, nullptr, "SetGetLocalFriendCodeSeedData"},- {0x080C0042, nullptr, "SetLocalFriendCodeSeedSignature"},- {0x080D0000, nullptr, "DeleteCreateNANDLocalFriendCodeSeed"},- {0x080E0000, nullptr, "VerifySigLocalFriendCodeSeed"},- {0x080F0042, nullptr, "GetLocalFriendCodeSeedData"},- {0x08100000, nullptr, "GetLocalFriendCodeSeed"},- {0x08110084, nullptr, "SetSecureInfo"},- {0x08120000, nullptr, "DeleteCreateNANDSecureInfo"},- {0x08130000, nullptr, "VerifySigSecureInfo"},- {0x08140042, nullptr, "SecureInfoGetData"},- {0x08150042, nullptr, "SecureInfoGetSignature"},- {0x08160000, nullptr, "SecureInfoGetRegion"},- {0x08170000, nullptr, "SecureInfoGetByte101"},- {0x08180042, nullptr, "SecureInfoGetSerialNo"},+ {0x04010082, GetConfigInfoBlk8, "GetConfigInfoBlk8"},+ {0x04020082, nullptr, "SetConfigInfoBlk4"},+ {0x04030000, UpdateConfigNANDSavegame, "UpdateConfigNANDSavegame"},+ {0x04040042, nullptr, "GetLocalFriendCodeSeedData"},+ {0x04050000, nullptr, "GetLocalFriendCodeSeed"},+ {0x04060000, nullptr, "SecureInfoGetRegion"},+ {0x04070000, nullptr, "SecureInfoGetByte101"},+ {0x04080042, nullptr, "SecureInfoGetSerialNo"},+ {0x04090000, nullptr, "UpdateConfigBlk00040003"},+ {0x08010082, GetConfigInfoBlk8, "GetConfigInfoBlk8"},+ {0x08020082, nullptr, "SetConfigInfoBlk4"},+ {0x08030000, UpdateConfigNANDSavegame, "UpdateConfigNANDSavegame"},+ {0x080400C2, nullptr, "CreateConfigInfoBlk"},+ {0x08050000, nullptr, "DeleteConfigNANDSavefile"},+ {0x08060000, FormatConfig, "FormatConfig"},+ {0x08080000, nullptr, "UpdateConfigBlk1"},+ {0x08090000, nullptr, "UpdateConfigBlk2"},+ {0x080A0000, nullptr, "UpdateConfigBlk3"},+ {0x080B0082, nullptr, "SetGetLocalFriendCodeSeedData"},+ {0x080C0042, nullptr, "SetLocalFriendCodeSeedSignature"},+ {0x080D0000, nullptr, "DeleteCreateNANDLocalFriendCodeSeed"},+ {0x080E0000, nullptr, "VerifySigLocalFriendCodeSeed"},+ {0x080F0042, nullptr, "GetLocalFriendCodeSeedData"},+ {0x08100000, nullptr, "GetLocalFriendCodeSeed"},+ {0x08110084, nullptr, "SetSecureInfo"},+ {0x08120000, nullptr, "DeleteCreateNANDSecureInfo"},+ {0x08130000, nullptr, "VerifySigSecureInfo"},+ {0x08140042, nullptr, "SecureInfoGetData"},+ {0x08150042, nullptr, "SecureInfoGetSignature"},+ {0x08160000, nullptr, "SecureInfoGetRegion"},+ {0x08170000, nullptr, "SecureInfoGetByte101"},+ {0x08180042, nullptr, "SecureInfoGetSerialNo"},};+////////////////////////////////////////////////////////////////////////////////////////////////////// Interface class@@ -107,7 +107,4 @@ Interface::Interface() {Register(FunctionTable, ARRAY_SIZE(FunctionTable));}-Interface::~Interface() {-}-} // namespacediff --git a/src/core/hle/service/cfg/cfg_i.h b/src/core/hle/service/cfg/cfg_i.hindex 577aad236b..a498dd5892 100644--- a/src/core/hle/service/cfg/cfg_i.h+++ b/src/core/hle/service/cfg/cfg_i.h@@ -14,11 +14,7 @@ namespace CFG_I {class Interface : public Service::Interface {public:Interface();- ~Interface();- /**- * Gets the string port name used by CTROS for the service- * @return Port name of service- */+std::string GetPortName() const override {return "cfg:i";}diff --git a/src/core/hle/service/cfg/cfg_u.cpp b/src/core/hle/service/cfg/cfg_u.cppindex 59934ea46b..03c01cf908 100644--- a/src/core/hle/service/cfg/cfg_u.cpp+++ b/src/core/hle/service/cfg/cfg_u.cpp@@ -181,6 +181,7 @@ const Interface::FunctionInfo FunctionTable[] = {{0x00090040, GetCountryCodeString, "GetCountryCodeString"},{0x000A0040, GetCountryCodeID, "GetCountryCodeID"},};+////////////////////////////////////////////////////////////////////////////////////////////////////// Interface class@@ -188,7 +189,4 @@ Interface::Interface() {Register(FunctionTable, ARRAY_SIZE(FunctionTable));}-Interface::~Interface() {-}-} // namespacediff --git a/src/core/hle/service/cfg/cfg_u.h b/src/core/hle/service/cfg/cfg_u.hindex 0136bff53e..9ad73f355e 100644--- a/src/core/hle/service/cfg/cfg_u.h+++ b/src/core/hle/service/cfg/cfg_u.h@@ -14,11 +14,7 @@ namespace CFG_U {class Interface : public Service::Interface {public:Interface();- ~Interface();- /**- * Gets the string port name used by CTROS for the service- * @return Port name of service- */+std::string GetPortName() const override {return "cfg:u";}diff --git a/src/core/hle/service/csnd_snd.cpp b/src/core/hle/service/csnd_snd.cppindex 3f62c7e9ca..aef8cfbca8 100644--- a/src/core/hle/service/csnd_snd.cpp+++ b/src/core/hle/service/csnd_snd.cpp@@ -33,7 +33,4 @@ Interface::Interface() {Register(FunctionTable, ARRAY_SIZE(FunctionTable));}-Interface::~Interface() {-}-} // namespacediff --git a/src/core/hle/service/csnd_snd.h b/src/core/hle/service/csnd_snd.hindex 85aab1dd35..a84752473c 100644--- a/src/core/hle/service/csnd_snd.h+++ b/src/core/hle/service/csnd_snd.h@@ -14,11 +14,7 @@ namespace CSND_SND {class Interface : public Service::Interface {public:Interface();- ~Interface();- /**- * Gets the string port name used by CTROS for the service- * @return Port name of service- */+std::string GetPortName() const override {return "csnd:SND";}diff --git a/src/core/hle/service/dsp_dsp.cpp b/src/core/hle/service/dsp_dsp.cppindex 4c1c5b70ba..2cf4d118f9 100644--- a/src/core/hle/service/dsp_dsp.cpp+++ b/src/core/hle/service/dsp_dsp.cpp@@ -190,7 +190,4 @@ Interface::Interface() {Register(FunctionTable, ARRAY_SIZE(FunctionTable));}-Interface::~Interface() {-}-} // namespacediff --git a/src/core/hle/service/dsp_dsp.h b/src/core/hle/service/dsp_dsp.hindex 7bf27fe0f3..0b8b64600a 100644--- a/src/core/hle/service/dsp_dsp.h+++ b/src/core/hle/service/dsp_dsp.h@@ -14,11 +14,7 @@ namespace DSP_DSP {class Interface : public Service::Interface {public:Interface();- ~Interface();- /**- * Gets the string port name used by CTROS for the service- * @return Port name of service- */+std::string GetPortName() const override {return "dsp::DSP";}diff --git a/src/core/hle/service/err_f.cpp b/src/core/hle/service/err_f.cppindex 5c7cce8411..8c900eabcd 100644--- a/src/core/hle/service/err_f.cpp+++ b/src/core/hle/service/err_f.cpp@@ -11,17 +11,15 @@namespace ERR_F {- const Interface::FunctionInfo FunctionTable[] = {- {0x00010800, nullptr, "ThrowFatalError"}- };- ////////////////////////////////////////////////////////////////////////////////////////////////////- // Interface class+const Interface::FunctionInfo FunctionTable[] = {+ {0x00010800, nullptr, "ThrowFatalError"}+};- Interface::Interface() {- Register(FunctionTable, ARRAY_SIZE(FunctionTable));- }+////////////////////////////////////////////////////////////////////////////////////////////////////+// Interface class- Interface::~Interface() {- }+Interface::Interface() {+ Register(FunctionTable, ARRAY_SIZE(FunctionTable));+}} // namespacediff --git a/src/core/hle/service/err_f.h b/src/core/hle/service/err_f.hindex 2c61c3651c..892d8af9b9 100644--- a/src/core/hle/service/err_f.h+++ b/src/core/hle/service/err_f.h@@ -11,17 +11,13 @@namespace ERR_F {- class Interface : public Service::Interface {- public:- Interface();- ~Interface();- /**- * Gets the string port name used by CTROS for the service- * @return Port name of service- */- std::string GetPortName() const override {- return "err:f";- }- };+class Interface : public Service::Interface {+public:+ Interface();++ std::string GetPortName() const override {+ return "err:f";+ }+};} // namespacediff --git a/src/core/hle/service/frd_u.cpp b/src/core/hle/service/frd_u.cppindex c2ecef5bbe..021186e573 100644--- a/src/core/hle/service/frd_u.cpp+++ b/src/core/hle/service/frd_u.cpp@@ -11,25 +11,23 @@namespace FRD_U {- const Interface::FunctionInfo FunctionTable[] = {- {0x00050000, nullptr, "GetFriendKey"},- {0x00080000, nullptr, "GetMyPresence"},- {0x00100040, nullptr, "GetPassword"},- {0x00190042, nullptr, "GetFriendFavoriteGame"},- {0x001A00C4, nullptr, "GetFriendInfo"},- {0x001B0080, nullptr, "IsOnFriendList"},- {0x001C0042, nullptr, "DecodeLocalFriendCode"},- {0x001D0002, nullptr, "SetCurrentlyPlayingText"},- {0x00320042, nullptr, "SetClientSdkVersion"}- };- ////////////////////////////////////////////////////////////////////////////////////////////////////- // Interface class+const Interface::FunctionInfo FunctionTable[] = {+ {0x00050000, nullptr, "GetFriendKey"},+ {0x00080000, nullptr, "GetMyPresence"},+ {0x00100040, nullptr, "GetPassword"},+ {0x00190042, nullptr, "GetFriendFavoriteGame"},+ {0x001A00C4, nullptr, "GetFriendInfo"},+ {0x001B0080, nullptr, "IsOnFriendList"},+ {0x001C0042, nullptr, "DecodeLocalFriendCode"},+ {0x001D0002, nullptr, "SetCurrentlyPlayingText"},+ {0x00320042, nullptr, "SetClientSdkVersion"}+};- Interface::Interface() {- Register(FunctionTable, ARRAY_SIZE(FunctionTable));- }+////////////////////////////////////////////////////////////////////////////////////////////////////+// Interface class- Interface::~Interface() {- }+Interface::Interface() {+ Register(FunctionTable, ARRAY_SIZE(FunctionTable));+}} // namespacediff --git a/src/core/hle/service/frd_u.h b/src/core/hle/service/frd_u.hindex e030f8b3b8..ab8897d5bd 100644--- a/src/core/hle/service/frd_u.h+++ b/src/core/hle/service/frd_u.h@@ -11,17 +11,13 @@namespace FRD_U {- class Interface : public Service::Interface {- public:- Interface();- ~Interface();- /**- * Gets the string port name used by CTROS for the service- * @return Port name of service- */- std::string GetPortName() const override {- return "frd:u";- }- };+class Interface : public Service::Interface {+public:+ Interface();++ std::string GetPortName() const override {+ return "frd:u";+ }+};} // namespacediff --git a/src/core/hle/service/fs/fs_user.cpp b/src/core/hle/service/fs/fs_user.cppindex 5e9b85cc7b..027c68d01f 100644--- a/src/core/hle/service/fs/fs_user.cpp+++ b/src/core/hle/service/fs/fs_user.cpp@@ -580,8 +580,5 @@ FSUserInterface::FSUserInterface() {Register(FunctionTable, ARRAY_SIZE(FunctionTable));}-FSUserInterface::~FSUserInterface() {-}-} // namespace FS} // namespace Servicediff --git a/src/core/hle/service/fs/fs_user.h b/src/core/hle/service/fs/fs_user.hindex af4da269b4..2d896dd5fd 100644--- a/src/core/hle/service/fs/fs_user.h+++ b/src/core/hle/service/fs/fs_user.h@@ -15,15 +15,8 @@ namespace FS {/// Interface to "fs:USER" serviceclass FSUserInterface : public Service::Interface {public:-FSUserInterface();- ~FSUserInterface();-- /**- * Gets the string port name used by CTROS for the service- * @return Port name of service- */std::string GetPortName() const override {return "fs:USER";}diff --git a/src/core/hle/service/gsp_gpu.cpp b/src/core/hle/service/gsp_gpu.cppindex 1f841078ab..0127d4ee5d 100644--- a/src/core/hle/service/gsp_gpu.cpp+++ b/src/core/hle/service/gsp_gpu.cpp@@ -396,7 +396,4 @@ Interface::Interface() {g_thread_id = 1;}-Interface::~Interface() {-}-} // namespacediff --git a/src/core/hle/service/gsp_gpu.h b/src/core/hle/service/gsp_gpu.hindex 56b5a16c91..932b6170fb 100644--- a/src/core/hle/service/gsp_gpu.h+++ b/src/core/hle/service/gsp_gpu.h@@ -158,19 +158,11 @@ static_assert(sizeof(CommandBuffer) == 0x200, "CommandBuffer struct has incorrec/// Interface to "srv:" serviceclass Interface : public Service::Interface {public:-Interface();- ~Interface();-- /**- * Gets the string port name used by CTROS for the service- * @return Port name of service- */std::string GetPortName() const override {return "gsp::Gpu";}-};/**diff --git a/src/core/hle/service/hid_user.cpp b/src/core/hle/service/hid_user.cppindex cec9b1bfbb..99b0ea5a07 100644--- a/src/core/hle/service/hid_user.cpp+++ b/src/core/hle/service/hid_user.cpp@@ -179,7 +179,6 @@ const Interface::FunctionInfo FunctionTable[] = {{0x00170000, nullptr, "GetSoundVolume"},};-////////////////////////////////////////////////////////////////////////////////////////////////////// Interface class@@ -196,7 +195,4 @@ Interface::Interface() {Register(FunctionTable, ARRAY_SIZE(FunctionTable));}-Interface::~Interface() {-}-} // namespacediff --git a/src/core/hle/service/hid_user.h b/src/core/hle/service/hid_user.hindex 2164ad8961..5b96dda60c 100644--- a/src/core/hle/service/hid_user.h+++ b/src/core/hle/service/hid_user.h@@ -102,19 +102,11 @@ void PadUpdateComplete();*/class Interface : public Service::Interface {public:-Interface();- ~Interface();-- /**- * Gets the string port name used by CTROS for the service- * @return Port name of service- */std::string GetPortName() const override {return "hid:USER";}-};} // namespacediff --git a/src/core/hle/service/http_c.cpp b/src/core/hle/service/http_c.cppnew file mode 100644index 0000000000..d0bff552f0--- /dev/null+++ b/src/core/hle/service/http_c.cpp@@ -0,0 +1,64 @@+// Copyright 2014 Citra Emulator Project+// Licensed under GPLv2 or any later version+// Refer to the license.txt file included.++#include "common/log.h"+#include "core/hle/hle.h"+#include "core/hle/service/http_c.h"++////////////////////////////////////////////////////////////////////////////////////////////////////+// Namespace HTTP_C++namespace HTTP_C {++const Interface::FunctionInfo FunctionTable[] = {+ {0x00010044, nullptr, "Initialize"},+ {0x00020082, nullptr, "CreateContext"},+ {0x00030040, nullptr, "CloseContext"},+ {0x00040040, nullptr, "CancelConnection"},+ {0x00050040, nullptr, "GetRequestState"},+ {0x00060040, nullptr, "GetDownloadSizeState"},+ {0x00070040, nullptr, "GetRequestError"},+ {0x00080042, nullptr, "InitializeConnectionSession"},+ {0x00090040, nullptr, "BeginRequest"},+ {0x000A0040, nullptr, "BeginRequestAsync"},+ {0x000B0082, nullptr, "ReceiveData"},+ {0x000C0102, nullptr, "ReceiveDataTimeout"},+ {0x000D0146, nullptr, "SetProxy"},+ {0x000E0040, nullptr, "SetProxyDefault"},+ {0x000F00C4, nullptr, "SetBasicAuthorization"},+ {0x00100080, nullptr, "SetSocketBufferSize"},+ {0x001100C4, nullptr, "AddRequestHeader"},+ {0x001200C4, nullptr, "AddPostDataAscii"},+ {0x001300C4, nullptr, "AddPostDataBinary"},+ {0x00140082, nullptr, "AddPostDataRaw"},+ {0x00150080, nullptr, "SetPostDataType"},+ {0x001600C4, nullptr, "SendPostDataAscii"},+ {0x00170144, nullptr, "SendPostDataAsciiTimeout"},+ {0x001800C4, nullptr, "SendPostDataBinary"},+ {0x00190144, nullptr, "SendPostDataBinaryTimeout"},+ {0x001A0082, nullptr, "SendPostDataRaw"},+ {0x001B0102, nullptr, "SendPOSTDataRawTimeout"},+ {0x001C0080, nullptr, "SetPostDataEncoding"},+ {0x001D0040, nullptr, "NotifyFinishSendPostData"},+ {0x001E00C4, nullptr, "GetResponseHeader"},+ {0x001F0144, nullptr, "GetResponseHeaderTimeout"},+ {0x00200082, nullptr, "GetResponseData"},+ {0x00210102, nullptr, "GetResponseDataTimeout"},+ {0x00220040, nullptr, "GetResponseStatusCode"},+ {0x002300C0, nullptr, "GetResponseStatusCodeTimeout"},+ {0x00240082, nullptr, "AddTrustedRootCA"},+ {0x00350186, nullptr, "SetDefaultProxy"},+ {0x00360000, nullptr, "ClearDNSCache"},+ {0x00370080, nullptr, "SetKeepAlive"},+ {0x003800C0, nullptr, "Finalize"},+};++////////////////////////////////////////////////////////////////////////////////////////////////////+// Interface class++Interface::Interface() {+ Register(FunctionTable, ARRAY_SIZE(FunctionTable));+}++} // namespacediff --git a/src/core/hle/service/http_c.h b/src/core/hle/service/http_c.hnew file mode 100644index 0000000000..5ea3d1df39--- /dev/null+++ b/src/core/hle/service/http_c.h@@ -0,0 +1,23 @@+// Copyright 2014 Citra Emulator Project+// Licensed under GPLv2 or any later version+// Refer to the license.txt file included.++#pragma once++#include "core/hle/service/service.h"++////////////////////////////////////////////////////////////////////////////////////////////////////+// Namespace HTTP_C++namespace HTTP_C {++class Interface : public Service::Interface {+public:+ Interface();++ std::string GetPortName() const override {+ return "http:C";+ }+};++} // namespacediff --git a/src/core/hle/service/ir_rst.cpp b/src/core/hle/service/ir_rst.cppindex 6145b8b2cc..b388afb155 100644--- a/src/core/hle/service/ir_rst.cpp+++ b/src/core/hle/service/ir_rst.cpp@@ -30,7 +30,4 @@ Interface::Interface() {Register(FunctionTable, ARRAY_SIZE(FunctionTable));}-Interface::~Interface() {-}-} // namespacediff --git a/src/core/hle/service/ir_rst.h b/src/core/hle/service/ir_rst.hindex 2fdab9f026..deef701c59 100644--- a/src/core/hle/service/ir_rst.h+++ b/src/core/hle/service/ir_rst.h@@ -14,11 +14,7 @@ namespace IR_RST {class Interface : public Service::Interface {public:Interface();- ~Interface();- /**- * Gets the string port name used by CTROS for the service- * @return Port name of service- */+std::string GetPortName() const override {return "ir:rst";}diff --git a/src/core/hle/service/ir_u.cpp b/src/core/hle/service/ir_u.cppindex db62a9c98c..da6f38e411 100644--- a/src/core/hle/service/ir_u.cpp+++ b/src/core/hle/service/ir_u.cpp@@ -39,7 +39,4 @@ Interface::Interface() {Register(FunctionTable, ARRAY_SIZE(FunctionTable));}-Interface::~Interface() {-}-} // namespacediff --git a/src/core/hle/service/ir_u.h b/src/core/hle/service/ir_u.hindex cf1c73f523..ec47a15244 100644--- a/src/core/hle/service/ir_u.h+++ b/src/core/hle/service/ir_u.h@@ -14,11 +14,7 @@ namespace IR_U {class Interface : public Service::Interface {public:Interface();- ~Interface();- /**- * Gets the string port name used by CTROS for the service- * @return Port name of service- */+std::string GetPortName() const override {return "ir:u";}diff --git a/src/core/hle/service/ldr_ro.cpp b/src/core/hle/service/ldr_ro.cppindex c08313f9a1..9c9e90a401 100644--- a/src/core/hle/service/ldr_ro.cpp+++ b/src/core/hle/service/ldr_ro.cpp@@ -18,6 +18,7 @@ const Interface::FunctionInfo FunctionTable[] = {{0x000402C2, nullptr, "CRO_LoadAndFix"},{0x000500C2, nullptr, "CRO_ApplyRelocationPatchesAndLink"}};+////////////////////////////////////////////////////////////////////////////////////////////////////// Interface classdiff --git a/src/core/hle/service/ldr_ro.h b/src/core/hle/service/ldr_ro.hindex 7716ae74e5..331637cdeb 100644--- a/src/core/hle/service/ldr_ro.h+++ b/src/core/hle/service/ldr_ro.h@@ -15,10 +15,6 @@ class Interface : public Service::Interface {public:Interface();- /**- * Gets the string port name used by CTROS for the service- * @return Port name of service- */std::string GetPortName() const override {return "ldr:ro";}diff --git a/src/core/hle/service/mic_u.cpp b/src/core/hle/service/mic_u.cppindex 399548d4df..82bce91807 100644--- a/src/core/hle/service/mic_u.cpp+++ b/src/core/hle/service/mic_u.cpp@@ -37,7 +37,4 @@ Interface::Interface() {Register(FunctionTable, ARRAY_SIZE(FunctionTable));}-Interface::~Interface() {-}-} // namespacediff --git a/src/core/hle/service/mic_u.h b/src/core/hle/service/mic_u.hindex 26842e5f1d..dc795d14cd 100644--- a/src/core/hle/service/mic_u.h+++ b/src/core/hle/service/mic_u.h@@ -16,11 +16,7 @@ namespace MIC_U {class Interface : public Service::Interface {public:Interface();- ~Interface();- /**- * Gets the string port name used by CTROS for the service- * @return Port name of service- */+std::string GetPortName() const override {return "mic:u";}diff --git a/src/core/hle/service/ndm_u.cpp b/src/core/hle/service/ndm_u.cppindex 141c311fd3..233b14f6d8 100644--- a/src/core/hle/service/ndm_u.cpp+++ b/src/core/hle/service/ndm_u.cpp@@ -24,7 +24,4 @@ Interface::Interface() {Register(FunctionTable, ARRAY_SIZE(FunctionTable));}-Interface::~Interface() {-}-} // namespacediff --git a/src/core/hle/service/ndm_u.h b/src/core/hle/service/ndm_u.hindex 62ed901c2e..51c4b39021 100644--- a/src/core/hle/service/ndm_u.h+++ b/src/core/hle/service/ndm_u.h@@ -15,19 +15,11 @@ namespace NDM_U {class Interface : public Service::Interface {public:-Interface();- ~Interface();-- /**- * Gets the string port name used by CTROS for the service- * @return Port name of service- */std::string GetPortName() const override {return "ndm:u";}-};} // namespacediff --git a/src/core/hle/service/news_u.cpp b/src/core/hle/service/news_u.cppnew file mode 100644index 0000000000..b5adad4c6f--- /dev/null+++ b/src/core/hle/service/news_u.cpp@@ -0,0 +1,25 @@+// Copyright 2014 Citra Emulator Project+// Licensed under GPLv2 or any later version+// Refer to the license.txt file included.++#include "common/log.h"+#include "core/hle/hle.h"+#include "core/hle/service/news_u.h"++////////////////////////////////////////////////////////////////////////////////////////////////////+// Namespace NEWS_U++namespace NEWS_U {++const Interface::FunctionInfo FunctionTable[] = {+ {0x000100C8, nullptr, "AddNotification"},+};++////////////////////////////////////////////////////////////////////////////////////////////////////+// Interface class++Interface::Interface() {+ Register(FunctionTable, ARRAY_SIZE(FunctionTable));+}++} // namespacediff --git a/src/core/hle/service/news_u.h b/src/core/hle/service/news_u.hnew file mode 100644index 0000000000..0473cd19cb--- /dev/null+++ b/src/core/hle/service/news_u.h@@ -0,0 +1,23 @@+// Copyright 2014 Citra Emulator Project+// Licensed under GPLv2 or any later version+// Refer to the license.txt file included.++#pragma once++#include "core/hle/service/service.h"++////////////////////////////////////////////////////////////////////////////////////////////////////+// Namespace NEWS_U++namespace NEWS_U {++class Interface : public Service::Interface {+public:+ Interface();++ std::string GetPortName() const override {+ return "news:u";+ }+};++} // namespacediff --git a/src/core/hle/service/nim_aoc.h b/src/core/hle/service/nim_aoc.hindex 33aa25c912..aeb71eed2a 100644--- a/src/core/hle/service/nim_aoc.h+++ b/src/core/hle/service/nim_aoc.h@@ -15,10 +15,6 @@ class Interface : public Service::Interface {public:Interface();- /**- * Gets the string port name used by CTROS for the service- * @return Port name of service- */std::string GetPortName() const override {return "nim:aoc";}diff --git a/src/core/hle/service/nwm_uds.cpp b/src/core/hle/service/nwm_uds.cppindex 2491d14d62..ce456a966c 100644--- a/src/core/hle/service/nwm_uds.cpp+++ b/src/core/hle/service/nwm_uds.cpp@@ -29,7 +29,4 @@ Interface::Interface() {Register(FunctionTable, ARRAY_SIZE(FunctionTable));}-Interface::~Interface() {-}-} // namespacediff --git a/src/core/hle/service/nwm_uds.h b/src/core/hle/service/nwm_uds.hindex cd27f78fc1..9043f5aa72 100644--- a/src/core/hle/service/nwm_uds.h+++ b/src/core/hle/service/nwm_uds.h@@ -16,11 +16,7 @@ namespace NWM_UDS {class Interface : public Service::Interface {public:Interface();- ~Interface();- /**- * Gets the string port name used by CTROS for the service- * @return Port name of service- */+std::string GetPortName() const override {return "nwm:UDS";}diff --git a/src/core/hle/service/pm_app.cpp b/src/core/hle/service/pm_app.cppindex 729255348b..529dccafbb 100644--- a/src/core/hle/service/pm_app.cpp+++ b/src/core/hle/service/pm_app.cpp@@ -29,7 +29,4 @@ Interface::Interface() {Register(FunctionTable, ARRAY_SIZE(FunctionTable));}-Interface::~Interface() {-}-} // namespacediff --git a/src/core/hle/service/pm_app.h b/src/core/hle/service/pm_app.hindex 7ed617e5eb..c1fb1f9da7 100644--- a/src/core/hle/service/pm_app.h+++ b/src/core/hle/service/pm_app.h@@ -14,11 +14,7 @@ namespace PM_APP {class Interface : public Service::Interface {public:Interface();- ~Interface();- /**- * Gets the string port name used by CTROS for the service- * @return Port name of service- */+std::string GetPortName() const override {return "pm:app";}diff --git a/src/core/hle/service/ptm_u.cpp b/src/core/hle/service/ptm_u.cppindex da48729da8..d1498f05c4 100644--- a/src/core/hle/service/ptm_u.cpp+++ b/src/core/hle/service/ptm_u.cpp@@ -122,7 +122,4 @@ Interface::Interface() {Register(FunctionTable, ARRAY_SIZE(FunctionTable));}-Interface::~Interface() {-}-} // namespacediff --git a/src/core/hle/service/ptm_u.h b/src/core/hle/service/ptm_u.hindex c9e0c519f1..a44624fd59 100644--- a/src/core/hle/service/ptm_u.h+++ b/src/core/hle/service/ptm_u.h@@ -16,11 +16,7 @@ namespace PTM_U {class Interface : public Service::Interface {public:Interface();- ~Interface();- /**- * Gets the string port name used by CTROS for the service- * @return Port name of service- */+std::string GetPortName() const override {return "ptm:u";}diff --git a/src/core/hle/service/service.cpp b/src/core/hle/service/service.cppindex 664f914d6b..44e4fbcb2d 100644--- a/src/core/hle/service/service.cpp+++ b/src/core/hle/service/service.cpp@@ -7,8 +7,10 @@#include "core/hle/service/service.h"#include "core/hle/service/ac_u.h"+#include "core/hle/service/act_u.h"#include "core/hle/service/am_app.h"#include "core/hle/service/am_net.h"+#include "core/hle/service/apt_a.h"#include "core/hle/service/apt_u.h"#include "core/hle/service/boss_u.h"#include "core/hle/service/cecd_u.h"@@ -21,12 +23,14 @@#include "core/hle/service/frd_u.h"#include "core/hle/service/gsp_gpu.h"#include "core/hle/service/hid_user.h"+#include "core/hle/service/http_c.h"#include "core/hle/service/ir_rst.h"#include "core/hle/service/ir_u.h"#include "core/hle/service/ldr_ro.h"#include "core/hle/service/mic_u.h"-#include "core/hle/service/nim_aoc.h"#include "core/hle/service/ndm_u.h"+#include "core/hle/service/news_u.h"+#include "core/hle/service/nim_aoc.h"#include "core/hle/service/nwm_uds.h"#include "core/hle/service/pm_app.h"#include "core/hle/service/ptm_u.h"@@ -88,8 +92,10 @@ void Init() {g_manager->AddService(new SRV::Interface);g_manager->AddService(new AC_U::Interface);+ g_manager->AddService(new ACT_U::Interface);g_manager->AddService(new AM_APP::Interface);g_manager->AddService(new AM_NET::Interface);+ g_manager->AddService(new APT_A::Interface);g_manager->AddService(new APT_U::Interface);g_manager->AddService(new BOSS_U::Interface);g_manager->AddService(new CECD_U::Interface);@@ -102,12 +108,14 @@ void Init() {g_manager->AddService(new FS::FSUserInterface);g_manager->AddService(new GSP_GPU::Interface);g_manager->AddService(new HID_User::Interface);+ g_manager->AddService(new HTTP_C::Interface);g_manager->AddService(new IR_RST::Interface);g_manager->AddService(new IR_U::Interface);g_manager->AddService(new LDR_RO::Interface);g_manager->AddService(new MIC_U::Interface);- g_manager->AddService(new NIM_AOC::Interface);g_manager->AddService(new NDM_U::Interface);+ g_manager->AddService(new NEWS_U::Interface);+ g_manager->AddService(new NIM_AOC::Interface);g_manager->AddService(new NWM_UDS::Interface);g_manager->AddService(new PM_APP::Interface);g_manager->AddService(new PTM_U::Interface);diff --git a/src/core/hle/service/soc_u.cpp b/src/core/hle/service/soc_u.cppindex 03deabe43a..ef4f9829de 100644--- a/src/core/hle/service/soc_u.cpp+++ b/src/core/hle/service/soc_u.cpp@@ -52,7 +52,4 @@ Interface::Interface() {Register(FunctionTable, ARRAY_SIZE(FunctionTable));}-Interface::~Interface() {-}-} // namespacediff --git a/src/core/hle/service/soc_u.h b/src/core/hle/service/soc_u.hindex 5c96237307..2edf3b482a 100644--- a/src/core/hle/service/soc_u.h+++ b/src/core/hle/service/soc_u.h@@ -14,11 +14,7 @@ namespace SOC_U {class Interface : public Service::Interface {public:Interface();- ~Interface();- /**- * Gets the string port name used by CTROS for the service- * @return Port name of service- */+std::string GetPortName() const override {return "soc:U";}diff --git a/src/core/hle/service/srv.cpp b/src/core/hle/service/srv.cppindex 05ff1846b1..25fab1a4f6 100644--- a/src/core/hle/service/srv.cpp+++ b/src/core/hle/service/srv.cpp@@ -68,7 +68,4 @@ Interface::Interface() {Register(FunctionTable, ARRAY_SIZE(FunctionTable));}-Interface::~Interface() {-}-} // namespacediff --git a/src/core/hle/service/srv.h b/src/core/hle/service/srv.hindex 4f3e01acaf..653aba5cb3 100644--- a/src/core/hle/service/srv.h+++ b/src/core/hle/service/srv.h@@ -11,21 +11,12 @@ namespace SRV {/// Interface to "srv:" serviceclass Interface : public Service::Interface {-public:-Interface();- ~Interface();-- /**- * Gets the string name used by CTROS for the service- * @return Port name of service- */std::string GetPortName() const override {return "srv:";}-};} // namespacediff --git a/src/core/hle/service/ssl_c.cpp b/src/core/hle/service/ssl_c.cppindex d5b0c4b06c..360516cdf7 100644--- a/src/core/hle/service/ssl_c.cpp+++ b/src/core/hle/service/ssl_c.cpp@@ -25,7 +25,4 @@ Interface::Interface() {Register(FunctionTable, ARRAY_SIZE(FunctionTable));}-Interface::~Interface() {-}-} // namespacediff --git a/src/core/hle/service/ssl_c.h b/src/core/hle/service/ssl_c.hindex 6281503a5d..58e87c1cb2 100644--- a/src/core/hle/service/ssl_c.h+++ b/src/core/hle/service/ssl_c.h@@ -14,12 +14,8 @@ namespace SSL_C {class Interface : public Service::Interface {public:Interface();- ~Interface();- /**- * Gets the string port name used by CTROS for the service- * @return Port name of service- */- std::string GetPortName() const {++ std::string GetPortName() const override {return "ssl:C";}};