summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/service.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle/service/service.h')
-rw-r--r--src/core/hle/service/service.h30
1 files changed, 6 insertions, 24 deletions
diff --git a/src/core/hle/service/service.h b/src/core/hle/service/service.h
index e75d5008b..533d3565b 100644
--- a/src/core/hle/service/service.h
+++ b/src/core/hle/service/service.h
@@ -5,9 +5,10 @@
#pragma once
#include <algorithm>
-#include <vector>
#include <map>
#include <string>
+#include <unordered_map>
+#include <vector>
#include "common/common.h"
#include "common/string_util.h"
@@ -121,34 +122,15 @@ private:
};
-/// Simple class to manage accessing services from ports and UID handles
-class Manager {
-public:
- /// Add a service to the manager
- void AddService(Interface* service);
-
- /// Removes a service from the manager
- void DeleteService(const std::string& port_name);
-
- /// Get a Service Interface from its Handle
- Interface* FetchFromHandle(Handle handle);
-
- /// Get a Service Interface from its port
- Interface* FetchFromPortName(const std::string& port_name);
-
-private:
- std::vector<Interface*> m_services;
- std::map<std::string, u32> m_port_map;
-};
-
/// Initialize ServiceManager
void Init();
/// Shutdown ServiceManager
void Shutdown();
-
-extern Manager* g_manager; ///< Service manager
-
+/// Map of named ports managed by the kernel, which can be retrieved using the ConnectToPort SVC.
+extern std::unordered_map<std::string, Kernel::SharedPtr<Interface>> g_kernel_named_ports;
+/// Map of services registered with the "srv:" service, retrieved using GetServiceHandle.
+extern std::unordered_map<std::string, Kernel::SharedPtr<Interface>> g_srv_services;
} // namespace