diff options
author | bunnei <bunneidev@gmail.com> | 2018-02-20 16:44:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-20 16:44:55 +0100 |
commit | 587f22b610115d18f1631bcd502d268b6ac5b021 (patch) | |
tree | 742a7dce5c5ad73d64653ebd964d2056d651ef6c /src/core/hle/service/friend | |
parent | Merge pull request #202 from bunnei/scheduler-cleanup (diff) | |
parent | acc_u0: Stub ListOpenUsers service function. (diff) | |
download | yuzu-587f22b610115d18f1631bcd502d268b6ac5b021.tar yuzu-587f22b610115d18f1631bcd502d268b6ac5b021.tar.gz yuzu-587f22b610115d18f1631bcd502d268b6ac5b021.tar.bz2 yuzu-587f22b610115d18f1631bcd502d268b6ac5b021.tar.lz yuzu-587f22b610115d18f1631bcd502d268b6ac5b021.tar.xz yuzu-587f22b610115d18f1631bcd502d268b6ac5b021.tar.zst yuzu-587f22b610115d18f1631bcd502d268b6ac5b021.zip |
Diffstat (limited to 'src/core/hle/service/friend')
-rw-r--r-- | src/core/hle/service/friend/friend.cpp | 28 | ||||
-rw-r--r-- | src/core/hle/service/friend/friend.h | 29 | ||||
-rw-r--r-- | src/core/hle/service/friend/friend_a.cpp | 19 | ||||
-rw-r--r-- | src/core/hle/service/friend/friend_a.h | 18 |
4 files changed, 94 insertions, 0 deletions
diff --git a/src/core/hle/service/friend/friend.cpp b/src/core/hle/service/friend/friend.cpp new file mode 100644 index 000000000..26593bb0c --- /dev/null +++ b/src/core/hle/service/friend/friend.cpp @@ -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 diff --git a/src/core/hle/service/friend/friend.h b/src/core/hle/service/friend/friend.h new file mode 100644 index 000000000..ffa498397 --- /dev/null +++ b/src/core/hle/service/friend/friend.h @@ -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 diff --git a/src/core/hle/service/friend/friend_a.cpp b/src/core/hle/service/friend/friend_a.cpp new file mode 100644 index 000000000..e1f2397c2 --- /dev/null +++ b/src/core/hle/service/friend/friend_a.cpp @@ -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 diff --git a/src/core/hle/service/friend/friend_a.h b/src/core/hle/service/friend/friend_a.h new file mode 100644 index 000000000..68fa58297 --- /dev/null +++ b/src/core/hle/service/friend/friend_a.h @@ -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 |