service/nifm: Deduplicate interface code

Rather than having the same code for each nifm service variant, we can
centralize it on one class and get rid of a bit of extra code.
This commit is contained in:
Lioncash
2018-07-25 17:07:32 -04:00
parent 1e4935c3a0
commit 85ed42a1d2
9 changed files with 30 additions and 141 deletions

View File

@ -4,24 +4,13 @@
#pragma once
#include "core/hle/service/service.h"
namespace Service::SM {
class ServiceManager;
}
namespace Service::NIFM {
class Module final {
public:
class Interface : public ServiceFramework<Interface> {
public:
explicit Interface(std::shared_ptr<Module> module, const char* name);
void CreateGeneralServiceOld(Kernel::HLERequestContext& ctx);
void CreateGeneralService(Kernel::HLERequestContext& ctx);
protected:
std::shared_ptr<Module> module;
};
};
/// Registers all NIFM services with the specified service manager.
void InstallInterfaces(SM::ServiceManager& service_manager);
} // namespace Service::NIFM