diff options
author | Yuri Kunde Schlesner <yuriks@yuriks.net> | 2015-01-30 19:07:04 +0100 |
---|---|---|
committer | Yuri Kunde Schlesner <yuriks@yuriks.net> | 2015-02-02 18:36:59 +0100 |
commit | 8779b31fe60c728ace89a9b5128b68feffa9c7d7 (patch) | |
tree | b83440cbe4187f1fe120a5a247919a1ecbb1c65d /src/core/hle/service/service.h | |
parent | Filesys: Move creation of Handles for File/Directory to service handlers (diff) | |
download | yuzu-8779b31fe60c728ace89a9b5128b68feffa9c7d7.tar yuzu-8779b31fe60c728ace89a9b5128b68feffa9c7d7.tar.gz yuzu-8779b31fe60c728ace89a9b5128b68feffa9c7d7.tar.bz2 yuzu-8779b31fe60c728ace89a9b5128b68feffa9c7d7.tar.lz yuzu-8779b31fe60c728ace89a9b5128b68feffa9c7d7.tar.xz yuzu-8779b31fe60c728ace89a9b5128b68feffa9c7d7.tar.zst yuzu-8779b31fe60c728ace89a9b5128b68feffa9c7d7.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/service/service.h | 30 |
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 |