diff options
author | Yuri Kunde Schlesner <yuriks@yuriks.net> | 2017-06-07 06:25:28 +0200 |
---|---|---|
committer | Yuri Kunde Schlesner <yuriks@yuriks.net> | 2017-06-09 05:59:19 +0200 |
commit | 6f368abe13bbf980b41b0209ddd5ca067761028a (patch) | |
tree | 1323e29c159f50d8a68186c99142d7ed2c0f9237 /src/core/hle/service/sm/sm.h | |
parent | Service: Remove a few redundant namespace qualifiers (diff) | |
download | yuzu-6f368abe13bbf980b41b0209ddd5ca067761028a.tar yuzu-6f368abe13bbf980b41b0209ddd5ca067761028a.tar.gz yuzu-6f368abe13bbf980b41b0209ddd5ca067761028a.tar.bz2 yuzu-6f368abe13bbf980b41b0209ddd5ca067761028a.tar.lz yuzu-6f368abe13bbf980b41b0209ddd5ca067761028a.tar.xz yuzu-6f368abe13bbf980b41b0209ddd5ca067761028a.tar.zst yuzu-6f368abe13bbf980b41b0209ddd5ca067761028a.zip |
Diffstat (limited to 'src/core/hle/service/sm/sm.h')
-rw-r--r-- | src/core/hle/service/sm/sm.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/core/hle/service/sm/sm.h b/src/core/hle/service/sm/sm.h index 5fac5455c..8f0dbf2db 100644 --- a/src/core/hle/service/sm/sm.h +++ b/src/core/hle/service/sm/sm.h @@ -20,6 +20,8 @@ class SessionRequestHandler; namespace Service { namespace SM { +class SRV; + constexpr ResultCode ERR_SERVICE_NOT_REGISTERED(1, ErrorModule::SRV, ErrorSummary::WouldBlock, ErrorLevel::Temporary); // 0xD0406401 constexpr ResultCode ERR_MAX_CONNECTIONS_REACHED(2, ErrorModule::SRV, ErrorSummary::WouldBlock, @@ -33,17 +35,21 @@ constexpr ResultCode ERR_NAME_CONTAINS_NUL(7, ErrorModule::SRV, ErrorSummary::Wr class ServiceManager { public: + static void InstallInterfaces(std::shared_ptr<ServiceManager> self); + ResultVal<Kernel::SharedPtr<Kernel::ServerPort>> RegisterService(std::string name, unsigned int max_sessions); ResultVal<Kernel::SharedPtr<Kernel::ClientPort>> GetServicePort(const std::string& name); ResultVal<Kernel::SharedPtr<Kernel::ClientSession>> ConnectToService(const std::string& name); private: - /// Map of services registered with the "srv:" service, retrieved using GetServiceHandle. + std::weak_ptr<SRV> srv_interface; + + /// Map of registered services, retrieved using GetServicePort or ConnectToService. std::unordered_map<std::string, Kernel::SharedPtr<Kernel::ClientPort>> registered_services; }; -extern std::unique_ptr<ServiceManager> g_service_manager; +extern std::shared_ptr<ServiceManager> g_service_manager; } // namespace SM } // namespace Service |