Merge pull request #205 from bunnei/more-puyo-stubs
Stub several friend:a and acc:u0 service functions
This commit is contained in:
commit
587f22b610
|
@ -36,6 +36,7 @@ namespace Log {
|
||||||
SUB(Service, Audio) \
|
SUB(Service, Audio) \
|
||||||
SUB(Service, AM) \
|
SUB(Service, AM) \
|
||||||
SUB(Service, APM) \
|
SUB(Service, APM) \
|
||||||
|
SUB(Service, Friend) \
|
||||||
SUB(Service, FS) \
|
SUB(Service, FS) \
|
||||||
SUB(Service, HID) \
|
SUB(Service, HID) \
|
||||||
SUB(Service, LM) \
|
SUB(Service, LM) \
|
||||||
|
|
|
@ -53,6 +53,7 @@ enum class Class : ClassType {
|
||||||
Service_AM, ///< The AM (Applet manager) service
|
Service_AM, ///< The AM (Applet manager) service
|
||||||
Service_APM, ///< The APM (Performance) service
|
Service_APM, ///< The APM (Performance) service
|
||||||
Service_Audio, ///< The Audio (Audio control) service
|
Service_Audio, ///< The Audio (Audio control) service
|
||||||
|
Service_Friend, ///< The friend service
|
||||||
Service_FS, ///< The FS (Filesystem) service
|
Service_FS, ///< The FS (Filesystem) service
|
||||||
Service_HID, ///< The HID (Human interface device) service
|
Service_HID, ///< The HID (Human interface device) service
|
||||||
Service_LM, ///< The LM (Logger) service
|
Service_LM, ///< The LM (Logger) service
|
||||||
|
|
|
@ -112,6 +112,10 @@ add_library(core STATIC
|
||||||
hle/service/filesystem/filesystem.h
|
hle/service/filesystem/filesystem.h
|
||||||
hle/service/filesystem/fsp_srv.cpp
|
hle/service/filesystem/fsp_srv.cpp
|
||||||
hle/service/filesystem/fsp_srv.h
|
hle/service/filesystem/fsp_srv.h
|
||||||
|
hle/service/friend/friend.cpp
|
||||||
|
hle/service/friend/friend.h
|
||||||
|
hle/service/friend/friend_a.cpp
|
||||||
|
hle/service/friend/friend_a.h
|
||||||
hle/service/hid/hid.cpp
|
hle/service/hid/hid.cpp
|
||||||
hle/service/hid/hid.h
|
hle/service/hid/hid.h
|
||||||
hle/service/lm/lm.cpp
|
hle/service/lm/lm.cpp
|
||||||
|
|
|
@ -65,11 +65,19 @@ void ACC_U0::GetUserExistence(Kernel::HLERequestContext& ctx) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void ACC_U0::ListAllUsers(Kernel::HLERequestContext& ctx) {
|
void ACC_U0::ListAllUsers(Kernel::HLERequestContext& ctx) {
|
||||||
|
LOG_WARNING(Service_ACC, "(STUBBED) called");
|
||||||
|
constexpr std::array<u128, 10> user_ids{DEFAULT_USER_ID};
|
||||||
|
ctx.WriteBuffer(user_ids.data(), user_ids.size());
|
||||||
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
|
rb.Push(RESULT_SUCCESS);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ACC_U0::ListOpenUsers(Kernel::HLERequestContext& ctx) {
|
||||||
|
LOG_WARNING(Service_ACC, "(STUBBED) called");
|
||||||
constexpr std::array<u128, 10> user_ids{DEFAULT_USER_ID};
|
constexpr std::array<u128, 10> user_ids{DEFAULT_USER_ID};
|
||||||
ctx.WriteBuffer(user_ids.data(), user_ids.size());
|
ctx.WriteBuffer(user_ids.data(), user_ids.size());
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(RESULT_SUCCESS);
|
||||||
LOG_DEBUG(Service_ACC, "called");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ACC_U0::GetProfile(Kernel::HLERequestContext& ctx) {
|
void ACC_U0::GetProfile(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -103,6 +111,7 @@ ACC_U0::ACC_U0() : ServiceFramework("acc:u0") {
|
||||||
static const FunctionInfo functions[] = {
|
static const FunctionInfo functions[] = {
|
||||||
{1, &ACC_U0::GetUserExistence, "GetUserExistence"},
|
{1, &ACC_U0::GetUserExistence, "GetUserExistence"},
|
||||||
{2, &ACC_U0::ListAllUsers, "ListAllUsers"},
|
{2, &ACC_U0::ListAllUsers, "ListAllUsers"},
|
||||||
|
{3, &ACC_U0::ListOpenUsers, "ListOpenUsers"},
|
||||||
{4, &ACC_U0::GetLastOpenedUser, "GetLastOpenedUser"},
|
{4, &ACC_U0::GetLastOpenedUser, "GetLastOpenedUser"},
|
||||||
{5, &ACC_U0::GetProfile, "GetProfile"},
|
{5, &ACC_U0::GetProfile, "GetProfile"},
|
||||||
{100, &ACC_U0::InitializeApplicationInfo, "InitializeApplicationInfo"},
|
{100, &ACC_U0::InitializeApplicationInfo, "InitializeApplicationInfo"},
|
||||||
|
|
|
@ -29,6 +29,7 @@ public:
|
||||||
private:
|
private:
|
||||||
void GetUserExistence(Kernel::HLERequestContext& ctx);
|
void GetUserExistence(Kernel::HLERequestContext& ctx);
|
||||||
void ListAllUsers(Kernel::HLERequestContext& ctx);
|
void ListAllUsers(Kernel::HLERequestContext& ctx);
|
||||||
|
void ListOpenUsers(Kernel::HLERequestContext& ctx);
|
||||||
void GetLastOpenedUser(Kernel::HLERequestContext& ctx);
|
void GetLastOpenedUser(Kernel::HLERequestContext& ctx);
|
||||||
void GetProfile(Kernel::HLERequestContext& ctx);
|
void GetProfile(Kernel::HLERequestContext& ctx);
|
||||||
void InitializeApplicationInfo(Kernel::HLERequestContext& ctx);
|
void InitializeApplicationInfo(Kernel::HLERequestContext& ctx);
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
// Copyright 2018 yuzu emulator team
|
||||||
|
// Licensed under GPLv2 or any later version
|
||||||
|
// Refer to the license.txt file included.
|
||||||
|
|
||||||
|
#include "common/logging/log.h"
|
||||||
|
#include "core/hle/ipc_helpers.h"
|
||||||
|
#include "core/hle/service/friend/friend.h"
|
||||||
|
#include "core/hle/service/friend/friend_a.h"
|
||||||
|
|
||||||
|
namespace Service {
|
||||||
|
namespace Friend {
|
||||||
|
|
||||||
|
void Module::Interface::Unknown(Kernel::HLERequestContext& ctx) {
|
||||||
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
|
rb.Push(RESULT_SUCCESS);
|
||||||
|
LOG_WARNING(Service_Friend, "(STUBBED) called");
|
||||||
|
}
|
||||||
|
|
||||||
|
Module::Interface::Interface(std::shared_ptr<Module> module, const char* name)
|
||||||
|
: ServiceFramework(name), module(std::move(module)) {}
|
||||||
|
|
||||||
|
void InstallInterfaces(SM::ServiceManager& service_manager) {
|
||||||
|
auto module = std::make_shared<Module>();
|
||||||
|
std::make_shared<Friend_A>(module)->InstallAsService(service_manager);
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace Friend
|
||||||
|
} // namespace Service
|
|
@ -0,0 +1,29 @@
|
||||||
|
// Copyright 2018 yuzu emulator team
|
||||||
|
// 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 Friend {
|
||||||
|
|
||||||
|
class Module final {
|
||||||
|
public:
|
||||||
|
class Interface : public ServiceFramework<Interface> {
|
||||||
|
public:
|
||||||
|
Interface(std::shared_ptr<Module> module, const char* name);
|
||||||
|
|
||||||
|
void Unknown(Kernel::HLERequestContext& ctx);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
std::shared_ptr<Module> module;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
/// Registers all Friend services with the specified service manager.
|
||||||
|
void InstallInterfaces(SM::ServiceManager& service_manager);
|
||||||
|
|
||||||
|
} // namespace Friend
|
||||||
|
} // namespace Service
|
|
@ -0,0 +1,19 @@
|
||||||
|
// Copyright 2018 yuzu emulator team
|
||||||
|
// Licensed under GPLv2 or any later version
|
||||||
|
// Refer to the license.txt file included.
|
||||||
|
|
||||||
|
#include "core/hle/service/friend/friend_a.h"
|
||||||
|
|
||||||
|
namespace Service {
|
||||||
|
namespace Friend {
|
||||||
|
|
||||||
|
Friend_A::Friend_A(std::shared_ptr<Module> module)
|
||||||
|
: Module::Interface(std::move(module), "friend:a") {
|
||||||
|
static const FunctionInfo functions[] = {
|
||||||
|
{0, &Friend_A::Unknown, "Unknown"},
|
||||||
|
};
|
||||||
|
RegisterHandlers(functions);
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace Friend
|
||||||
|
} // namespace Service
|
|
@ -0,0 +1,18 @@
|
||||||
|
// Copyright 2018 yuzu emulator team
|
||||||
|
// Licensed under GPLv2 or any later version
|
||||||
|
// Refer to the license.txt file included.
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "core/hle/service/friend/friend.h"
|
||||||
|
|
||||||
|
namespace Service {
|
||||||
|
namespace Friend {
|
||||||
|
|
||||||
|
class Friend_A final : public Module::Interface {
|
||||||
|
public:
|
||||||
|
explicit Friend_A(std::shared_ptr<Module> module);
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace Friend
|
||||||
|
} // namespace Service
|
|
@ -20,6 +20,7 @@
|
||||||
#include "core/hle/service/apm/apm.h"
|
#include "core/hle/service/apm/apm.h"
|
||||||
#include "core/hle/service/audio/audio.h"
|
#include "core/hle/service/audio/audio.h"
|
||||||
#include "core/hle/service/filesystem/filesystem.h"
|
#include "core/hle/service/filesystem/filesystem.h"
|
||||||
|
#include "core/hle/service/friend/friend.h"
|
||||||
#include "core/hle/service/hid/hid.h"
|
#include "core/hle/service/hid/hid.h"
|
||||||
#include "core/hle/service/lm/lm.h"
|
#include "core/hle/service/lm/lm.h"
|
||||||
#include "core/hle/service/nifm/nifm.h"
|
#include "core/hle/service/nifm/nifm.h"
|
||||||
|
@ -180,6 +181,7 @@ void Init() {
|
||||||
APM::InstallInterfaces(*SM::g_service_manager);
|
APM::InstallInterfaces(*SM::g_service_manager);
|
||||||
Audio::InstallInterfaces(*SM::g_service_manager);
|
Audio::InstallInterfaces(*SM::g_service_manager);
|
||||||
FileSystem::InstallInterfaces(*SM::g_service_manager);
|
FileSystem::InstallInterfaces(*SM::g_service_manager);
|
||||||
|
Friend::InstallInterfaces(*SM::g_service_manager);
|
||||||
HID::InstallInterfaces(*SM::g_service_manager);
|
HID::InstallInterfaces(*SM::g_service_manager);
|
||||||
LM::InstallInterfaces(*SM::g_service_manager);
|
LM::InstallInterfaces(*SM::g_service_manager);
|
||||||
NIFM::InstallInterfaces(*SM::g_service_manager);
|
NIFM::InstallInterfaces(*SM::g_service_manager);
|
||||||
|
|
Reference in New Issue