From 7ec5950bc4c8e4a786df1f4c3392d7b5332d1613 Mon Sep 17 00:00:00 2001 From: bunnei Date: Tue, 15 Apr 2014 22:40:19 -0400 Subject: - extracted srv: calls from service.cpp and put in its own module - added function tables for service calls - lots of refactoring --- src/core/hle/service/service.h | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'src/core/hle/service/service.h') diff --git a/src/core/hle/service/service.h b/src/core/hle/service/service.h index 365583ed2..9368a9f0f 100644 --- a/src/core/hle/service/service.h +++ b/src/core/hle/service/service.h @@ -37,14 +37,6 @@ public: return (NativeUID)m_uid; } - /** - * Gets the string name used by CTROS for a service - * @return String name of service - */ - virtual std::string GetName() const { - return "[UNKNOWN SERVICE NAME]"; - } - /** * Gets the string name used by CTROS for a service * @return Port name of service @@ -59,8 +51,19 @@ public: */ virtual Syscall::Result Sync() = 0; +protected: + /** + * Registers the functions in the service + */ + void Register(const HLE::FunctionDef* functions, int len) { + for (int i = 0; i < len; i++) { + m_functions[functions[i].id] = functions[i]; + } + } + private: u32 m_uid; + std::map m_functions; }; /// Simple class to manage accessing services from ports and UID handles -- cgit v1.2.3