aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/hle/service/service.h
diff options
context:
space:
mode:
authorGravatar bunnei <ericbunnie@gmail.com>2014-04-15 22:40:19 -0400
committerGravatar bunnei <ericbunnie@gmail.com>2014-04-15 22:40:19 -0400
commit7ec5950bc4c8e4a786df1f4c3392d7b5332d1613 (patch)
tree7d7046dcced5ce635921ebdadabf1a1aa8b0647f /src/core/hle/service/service.h
parentcb504e236bb21816b5794a14c4dc57d93766e5a8 (diff)
- extracted srv: calls from service.cpp and put in its own module
- added function tables for service calls - lots of refactoring
Diffstat (limited to 'src/core/hle/service/service.h')
-rw-r--r--src/core/hle/service/service.h19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/core/hle/service/service.h b/src/core/hle/service/service.h
index 365583ed..9368a9f0 100644
--- a/src/core/hle/service/service.h
+++ b/src/core/hle/service/service.h
@@ -39,14 +39,6 @@ public:
/**
* 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
*/
virtual std::string GetPortName() const {
@@ -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<u32, HLE::FunctionDef> m_functions;
};
/// Simple class to manage accessing services from ports and UID handles