hle: kernel: Migrate KClientPort to KAutoObject.

This commit is contained in:
bunnei
2021-04-21 21:43:25 -07:00
parent aa2844bcf9
commit 0297448fbc
18 changed files with 92 additions and 63 deletions

View File

@ -10,7 +10,7 @@
#include <unordered_map>
#include "common/concepts.h"
#include "core/hle/kernel/client_port.h"
#include "core/hle/kernel/k_client_port.h"
#include "core/hle/kernel/object.h"
#include "core/hle/kernel/server_port.h"
#include "core/hle/result.h"
@ -21,7 +21,7 @@ class System;
}
namespace Kernel {
class ClientPort;
class KClientPort;
class KClientSession;
class KernelCore;
class ServerPort;
@ -58,7 +58,7 @@ public:
ResultVal<std::shared_ptr<Kernel::ServerPort>> RegisterService(std::string name,
u32 max_sessions);
ResultCode UnregisterService(const std::string& name);
ResultVal<std::shared_ptr<Kernel::ClientPort>> GetServicePort(const std::string& name);
ResultVal<Kernel::KClientPort*> GetServicePort(const std::string& name);
template <Common::DerivedFrom<Kernel::SessionRequestHandler> T>
std::shared_ptr<T> GetService(const std::string& service_name) const {
@ -81,7 +81,7 @@ private:
std::unique_ptr<Controller> controller_interface;
/// Map of registered services, retrieved using GetServicePort.
std::unordered_map<std::string, std::shared_ptr<Kernel::ClientPort>> registered_services;
std::unordered_map<std::string, Kernel::KClientPort*> registered_services;
/// Kernel context
Kernel::KernelCore& kernel;