Browse Source
Merge pull request #806 from lioncash/friend
friend: Deduplicate interfaces
pull/15/merge
bunnei
8 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with
15 additions and
48 deletions
-
src/core/CMakeLists.txt
-
src/core/hle/service/friend/friend.cpp
-
src/core/hle/service/friend/friend_u.cpp
-
src/core/hle/service/friend/friend_u.h
-
src/core/hle/service/friend/interface.cpp
-
src/core/hle/service/friend/interface.h
|
|
|
@ -146,10 +146,8 @@ add_library(core STATIC |
|
|
|
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/friend/friend_u.cpp |
|
|
|
hle/service/friend/friend_u.h |
|
|
|
hle/service/friend/interface.cpp |
|
|
|
hle/service/friend/interface.h |
|
|
|
hle/service/hid/hid.cpp |
|
|
|
hle/service/hid/hid.h |
|
|
|
hle/service/lm/lm.cpp |
|
|
|
|
|
|
|
@ -5,8 +5,7 @@ |
|
|
|
#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"
|
|
|
|
#include "core/hle/service/friend/friend_u.h"
|
|
|
|
#include "core/hle/service/friend/interface.h"
|
|
|
|
|
|
|
|
namespace Service::Friend { |
|
|
|
|
|
|
|
@ -21,8 +20,11 @@ Module::Interface::Interface(std::shared_ptr<Module> module, const char* name) |
|
|
|
|
|
|
|
void InstallInterfaces(SM::ServiceManager& service_manager) { |
|
|
|
auto module = std::make_shared<Module>(); |
|
|
|
std::make_shared<Friend_A>(module)->InstallAsService(service_manager); |
|
|
|
std::make_shared<Friend_U>(module)->InstallAsService(service_manager); |
|
|
|
std::make_shared<Friend>(module, "friend:a")->InstallAsService(service_manager); |
|
|
|
std::make_shared<Friend>(module, "friend:m")->InstallAsService(service_manager); |
|
|
|
std::make_shared<Friend>(module, "friend:s")->InstallAsService(service_manager); |
|
|
|
std::make_shared<Friend>(module, "friend:u")->InstallAsService(service_manager); |
|
|
|
std::make_shared<Friend>(module, "friend:v")->InstallAsService(service_manager); |
|
|
|
} |
|
|
|
|
|
|
|
} // namespace Service::Friend
|
|
|
|
@ -1,18 +0,0 @@ |
|
|
|
// 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_u.h"
|
|
|
|
|
|
|
|
namespace Service::Friend { |
|
|
|
|
|
|
|
Friend_U::Friend_U(std::shared_ptr<Module> module) |
|
|
|
: Module::Interface(std::move(module), "friend:u") { |
|
|
|
static const FunctionInfo functions[] = { |
|
|
|
{0, &Friend_U::CreateFriendService, "CreateFriendService"}, |
|
|
|
{1, nullptr, "CreateNotificationService"}, |
|
|
|
}; |
|
|
|
RegisterHandlers(functions); |
|
|
|
} |
|
|
|
|
|
|
|
} // namespace Service::Friend
|
|
|
|
@ -1,16 +0,0 @@ |
|
|
|
// 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::Friend { |
|
|
|
|
|
|
|
class Friend_U final : public Module::Interface { |
|
|
|
public: |
|
|
|
explicit Friend_U(std::shared_ptr<Module> module); |
|
|
|
}; |
|
|
|
|
|
|
|
} // namespace Service::Friend |
|
|
|
@ -2,15 +2,16 @@ |
|
|
|
// Licensed under GPLv2 or any later version
|
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
|
|
|
#include "core/hle/service/friend/friend_a.h"
|
|
|
|
#include "core/hle/service/friend/interface.h"
|
|
|
|
|
|
|
|
namespace Service::Friend { |
|
|
|
|
|
|
|
Friend_A::Friend_A(std::shared_ptr<Module> module) |
|
|
|
: Module::Interface(std::move(module), "friend:a") { |
|
|
|
Friend::Friend(std::shared_ptr<Module> module, const char* name) |
|
|
|
: Interface(std::move(module), name) { |
|
|
|
static const FunctionInfo functions[] = { |
|
|
|
{0, &Friend_A::CreateFriendService, "CreateFriendService"}, |
|
|
|
{0, &Friend::CreateFriendService, "CreateFriendService"}, |
|
|
|
{1, nullptr, "CreateNotificationService"}, |
|
|
|
{2, nullptr, "CreateDaemonSuspendSessionService"}, |
|
|
|
}; |
|
|
|
RegisterHandlers(functions); |
|
|
|
} |
|
|
|
@ -8,9 +8,9 @@ |
|
|
|
|
|
|
|
namespace Service::Friend { |
|
|
|
|
|
|
|
class Friend_A final : public Module::Interface { |
|
|
|
class Friend final : public Module::Interface { |
|
|
|
public: |
|
|
|
explicit Friend_A(std::shared_ptr<Module> module); |
|
|
|
explicit Friend(std::shared_ptr<Module> module, const char* name); |
|
|
|
}; |
|
|
|
|
|
|
|
} // namespace Service::Friend |