From 5dea1faeddc519b7f93f4be23a4a774b44469764 Mon Sep 17 00:00:00 2001 From: mailwl Date: Tue, 13 Dec 2016 09:35:24 +0300 Subject: Service/ACT: move ACT services to folder --- src/core/CMakeLists.txt | 10 ++++++---- src/core/hle/service/act/act.cpp | 18 ++++++++++++++++++ src/core/hle/service/act/act.h | 14 ++++++++++++++ src/core/hle/service/act/act_a.cpp | 30 ++++++++++++++++++++++++++++++ src/core/hle/service/act/act_a.h | 22 ++++++++++++++++++++++ src/core/hle/service/act/act_u.cpp | 26 ++++++++++++++++++++++++++ src/core/hle/service/act/act_u.h | 22 ++++++++++++++++++++++ src/core/hle/service/act_a.cpp | 29 ----------------------------- src/core/hle/service/act_a.h | 22 ---------------------- src/core/hle/service/act_u.cpp | 25 ------------------------- src/core/hle/service/act_u.h | 22 ---------------------- src/core/hle/service/service.cpp | 6 ++---- 12 files changed, 140 insertions(+), 106 deletions(-) create mode 100644 src/core/hle/service/act/act.cpp create mode 100644 src/core/hle/service/act/act.h create mode 100644 src/core/hle/service/act/act_a.cpp create mode 100644 src/core/hle/service/act/act_a.h create mode 100644 src/core/hle/service/act/act_u.cpp create mode 100644 src/core/hle/service/act/act_u.h delete mode 100644 src/core/hle/service/act_a.cpp delete mode 100644 src/core/hle/service/act_a.h delete mode 100644 src/core/hle/service/act_u.cpp delete mode 100644 src/core/hle/service/act_u.h (limited to 'src') diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index e26677079..266c9d8ad 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -52,8 +52,9 @@ set(SRCS hle/kernel/timer.cpp hle/kernel/vm_manager.cpp hle/service/ac_u.cpp - hle/service/act_a.cpp - hle/service/act_u.cpp + hle/service/act/act.cpp + hle/service/act/act_a.cpp + hle/service/act/act_u.cpp hle/service/am/am.cpp hle/service/am/am_app.cpp hle/service/am/am_net.cpp @@ -215,8 +216,9 @@ set(HEADERS hle/kernel/vm_manager.h hle/result.h hle/service/ac_u.h - hle/service/act_a.h - hle/service/act_u.h + hle/service/act/act.h + hle/service/act/act_a.h + hle/service/act/act_u.h hle/service/am/am.h hle/service/am/am_app.h hle/service/am/am_net.h diff --git a/src/core/hle/service/act/act.cpp b/src/core/hle/service/act/act.cpp new file mode 100644 index 000000000..9600036c0 --- /dev/null +++ b/src/core/hle/service/act/act.cpp @@ -0,0 +1,18 @@ +// Copyright 2016 Citra Emulator Project +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#include "core/hle/service/act/act.h" +#include "core/hle/service/act/act_a.h" +#include "core/hle/service/act/act_u.h" + +namespace Service { +namespace ACT { + +void Init() { + AddService(new ACT_A); + AddService(new ACT_U); +} + +} // namespace ACT +} // namespace Service diff --git a/src/core/hle/service/act/act.h b/src/core/hle/service/act/act.h new file mode 100644 index 000000000..3481532c0 --- /dev/null +++ b/src/core/hle/service/act/act.h @@ -0,0 +1,14 @@ +// Copyright 2016 Citra Emulator Project +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#pragma once + +namespace Service { +namespace ACT { + +/// Initialize AM service +void Init(); + +} // namespace ACT +} // namespace Service diff --git a/src/core/hle/service/act/act_a.cpp b/src/core/hle/service/act/act_a.cpp new file mode 100644 index 000000000..5c523368f --- /dev/null +++ b/src/core/hle/service/act/act_a.cpp @@ -0,0 +1,30 @@ +// Copyright 2016 Citra Emulator Project +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#include "core/hle/service/act/act.h" +#include "core/hle/service/act/act_a.h" + +namespace Service { +namespace ACT { + +const Interface::FunctionInfo FunctionTable[] = { + // act:u shared commands + {0x00010084, nullptr, "Initialize"}, + {0x00020040, nullptr, "GetErrorCode"}, + {0x000600C2, nullptr, "GetAccountDataBlock"}, + {0x000B0042, nullptr, "AcquireEulaList"}, + {0x000D0040, nullptr, "GenerateUuid"}, + // act:a + {0x041300C2, nullptr, "UpdateMiiImage"}, + {0x041B0142, nullptr, "AgreeEula"}, + {0x04210042, nullptr, "UploadMii"}, + {0x04230082, nullptr, "ValidateMailAddress"}, +}; + +ACT_A::ACT_A() { + Register(FunctionTable); +} + +} // namespace ACT +} // namespace Service diff --git a/src/core/hle/service/act/act_a.h b/src/core/hle/service/act/act_a.h new file mode 100644 index 000000000..e3adb03e5 --- /dev/null +++ b/src/core/hle/service/act/act_a.h @@ -0,0 +1,22 @@ +// Copyright 2016 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 Service { +namespace ACT { + +class ACT_A final : public Service::Interface { +public: + ACT_A(); + + std::string GetPortName() const override { + return "act:a"; + } +}; + +} // namespace ACT +} // namespace Service diff --git a/src/core/hle/service/act/act_u.cpp b/src/core/hle/service/act/act_u.cpp new file mode 100644 index 000000000..cf98aa1d6 --- /dev/null +++ b/src/core/hle/service/act/act_u.cpp @@ -0,0 +1,26 @@ +// Copyright 2014 Citra Emulator Project +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#include "core/hle/service/act/act.h" +#include "core/hle/service/act/act_u.h" + +namespace Service { +namespace ACT { + +const Interface::FunctionInfo FunctionTable[] = { + // clang-format off + {0x00010084, nullptr, "Initialize"}, + {0x00020040, nullptr, "GetErrorCode"}, + {0x000600C2, nullptr, "GetAccountDataBlock"}, + {0x000B0042, nullptr, "AcquireEulaList"}, + {0x000D0040, nullptr, "GenerateUuid"}, + // clang-format on +}; + +ACT_U::ACT_U() { + Register(FunctionTable); +} + +} // namespace ACT +} // namespace Service diff --git a/src/core/hle/service/act/act_u.h b/src/core/hle/service/act/act_u.h new file mode 100644 index 000000000..9d8538fbf --- /dev/null +++ b/src/core/hle/service/act/act_u.h @@ -0,0 +1,22 @@ +// 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 Service { +namespace ACT { + +class ACT_U final : public Interface { +public: + ACT_U(); + + std::string GetPortName() const override { + return "act:u"; + } +}; + +} // namespace ACT +} // namespace Service diff --git a/src/core/hle/service/act_a.cpp b/src/core/hle/service/act_a.cpp deleted file mode 100644 index 9880aafff..000000000 --- a/src/core/hle/service/act_a.cpp +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright 2016 Citra Emulator Project -// Licensed under GPLv2 or any later version -// Refer to the license.txt file included. - -#include "core/hle/service/act_a.h" - -namespace Service { -namespace ACT { - -const Interface::FunctionInfo FunctionTable[] = { - // act:u shared commands - {0x00010084, nullptr, "Initialize"}, - {0x00020040, nullptr, "GetErrorCode"}, - {0x000600C2, nullptr, "GetAccountDataBlock"}, - {0x000B0042, nullptr, "AcquireEulaList"}, - {0x000D0040, nullptr, "GenerateUuid"}, - // act:a - {0x041300C2, nullptr, "UpdateMiiImage"}, - {0x041B0142, nullptr, "AgreeEula"}, - {0x04210042, nullptr, "UploadMii"}, - {0x04230082, nullptr, "ValidateMailAddress"}, -}; - -ACT_A::ACT_A() { - Register(FunctionTable); -} - -} // namespace ACT -} // namespace Service diff --git a/src/core/hle/service/act_a.h b/src/core/hle/service/act_a.h deleted file mode 100644 index e3adb03e5..000000000 --- a/src/core/hle/service/act_a.h +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright 2016 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 Service { -namespace ACT { - -class ACT_A final : public Service::Interface { -public: - ACT_A(); - - std::string GetPortName() const override { - return "act:a"; - } -}; - -} // namespace ACT -} // namespace Service diff --git a/src/core/hle/service/act_u.cpp b/src/core/hle/service/act_u.cpp deleted file mode 100644 index b4f69c57d..000000000 --- a/src/core/hle/service/act_u.cpp +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright 2014 Citra Emulator Project -// Licensed under GPLv2 or any later version -// Refer to the license.txt file included. - -#include "core/hle/service/act_u.h" - -namespace Service { -namespace ACT { - -const Interface::FunctionInfo FunctionTable[] = { - // clang-format off - {0x00010084, nullptr, "Initialize"}, - {0x00020040, nullptr, "GetErrorCode"}, - {0x000600C2, nullptr, "GetAccountDataBlock"}, - {0x000B0042, nullptr, "AcquireEulaList"}, - {0x000D0040, nullptr, "GenerateUuid"}, - // clang-format on -}; - -ACT_U::ACT_U() { - Register(FunctionTable); -} - -} // namespace ACT -} // namespace Service diff --git a/src/core/hle/service/act_u.h b/src/core/hle/service/act_u.h deleted file mode 100644 index 9d8538fbf..000000000 --- a/src/core/hle/service/act_u.h +++ /dev/null @@ -1,22 +0,0 @@ -// 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 Service { -namespace ACT { - -class ACT_U final : public Interface { -public: - ACT_U(); - - std::string GetPortName() const override { - return "act:u"; - } -}; - -} // namespace ACT -} // namespace Service diff --git a/src/core/hle/service/service.cpp b/src/core/hle/service/service.cpp index effecc043..3e70e05ae 100644 --- a/src/core/hle/service/service.cpp +++ b/src/core/hle/service/service.cpp @@ -5,8 +5,7 @@ #include "common/logging/log.h" #include "common/string_util.h" #include "core/hle/service/ac_u.h" -#include "core/hle/service/act_a.h" -#include "core/hle/service/act_u.h" +#include "core/hle/service/act/act.h" #include "core/hle/service/am/am.h" #include "core/hle/service/apt/apt.h" #include "core/hle/service/boss/boss.h" @@ -113,6 +112,7 @@ void Init() { AddNamedPort(new ERR::ERR_F); FS::ArchiveInit(); + ACT::Init(); AM::Init(); APT::Init(); BOSS::Init(); @@ -132,8 +132,6 @@ void Init() { QTM::Init(); AddService(new AC::AC_U); - AddService(new ACT::ACT_A); - AddService(new ACT::ACT_U); AddService(new CSND::CSND_SND); AddService(new DSP_DSP::Interface); AddService(new GSP::GSP_GPU); -- cgit v1.2.3