From 37e582c395afafecb3217c2ce640a67e5e469864 Mon Sep 17 00:00:00 2001 From: archshift Date: Mon, 10 Nov 2014 22:41:17 -0800 Subject: Add FRD:U service and functions --- src/core/CMakeLists.txt | 2 ++ src/core/hle/service/frd_u.cpp | 35 +++++++++++++++++++++++++++++++++++ src/core/hle/service/frd_u.h | 27 +++++++++++++++++++++++++++ src/core/hle/service/service.cpp | 2 ++ 4 files changed, 66 insertions(+) create mode 100644 src/core/hle/service/frd_u.cpp create mode 100644 src/core/hle/service/frd_u.h diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index f67481359..f41d52e80 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -36,6 +36,7 @@ set(SRCS hle/service/dsp_dsp.cpp hle/service/err_f.cpp hle/service/fs_user.cpp + hle/service/frd_u.cpp hle/service/gsp_gpu.cpp hle/service/hid_user.cpp hle/service/mic_u.cpp @@ -106,6 +107,7 @@ set(HEADERS hle/service/dsp_dsp.h hle/service/err_f.h hle/service/fs_user.h + hle/service/frd_u.h hle/service/gsp_gpu.h hle/service/hid_user.h hle/service/mic_u.h diff --git a/src/core/hle/service/frd_u.cpp b/src/core/hle/service/frd_u.cpp new file mode 100644 index 000000000..58023e536 --- /dev/null +++ b/src/core/hle/service/frd_u.cpp @@ -0,0 +1,35 @@ +// Copyright 2014 Citra Emulator Project +// Licensed under GPLv2 +// Refer to the license.txt file included. + +#include "common/log.h" +#include "core/hle/hle.h" +#include "core/hle/service/frd_u.h" + +//////////////////////////////////////////////////////////////////////////////////////////////////// +// Namespace FRD_U + +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 + + Interface::Interface() { + Register(FunctionTable, ARRAY_SIZE(FunctionTable)); + } + + Interface::~Interface() { + } + +} // namespace diff --git a/src/core/hle/service/frd_u.h b/src/core/hle/service/frd_u.h new file mode 100644 index 000000000..9df8a815a --- /dev/null +++ b/src/core/hle/service/frd_u.h @@ -0,0 +1,27 @@ +// Copyright 2014 Citra Emulator Project +// Licensed under GPLv2 +// Refer to the license.txt file included. + +#pragma once + +#include "core/hle/service/service.h" + +//////////////////////////////////////////////////////////////////////////////////////////////////// +// Namespace FRD_U + +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 { + return "frd:u"; + } + }; + +} // namespace diff --git a/src/core/hle/service/service.cpp b/src/core/hle/service/service.cpp index b144a77d4..bb0f80e98 100644 --- a/src/core/hle/service/service.cpp +++ b/src/core/hle/service/service.cpp @@ -12,6 +12,7 @@ #include "core/hle/service/dsp_dsp.h" #include "core/hle/service/err_f.h" #include "core/hle/service/fs_user.h" +#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/mic_u.h" @@ -80,6 +81,7 @@ void Init() { g_manager->AddService(new CFG_U::Interface); g_manager->AddService(new DSP_DSP::Interface); g_manager->AddService(new ERR_F::Interface); + g_manager->AddService(new FRD_U::Interface); g_manager->AddService(new FS_User::Interface); g_manager->AddService(new GSP_GPU::Interface); g_manager->AddService(new HID_User::Interface); -- cgit v1.2.3