summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/service.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/core/hle/service/service.h49
1 files changed, 16 insertions, 33 deletions
diff --git a/src/core/hle/service/service.h b/src/core/hle/service/service.h
index 22e2119d7..0f79a1b7e 100644
--- a/src/core/hle/service/service.h
+++ b/src/core/hle/service/service.h
@@ -8,7 +8,7 @@
#include <string>
#include <boost/container/flat_map.hpp>
#include "common/common_types.h"
-#include "core/hle/kernel/hle_ipc.h"
+#include "core/hle/service/hle_ipc.h"
////////////////////////////////////////////////////////////////////////////////////////////////////
// Namespace Service
@@ -18,9 +18,6 @@ class System;
}
namespace Kernel {
-class HLERequestContext;
-class KClientPort;
-class KPort;
class KServerSession;
class ServiceThread;
} // namespace Kernel
@@ -31,10 +28,10 @@ namespace FileSystem {
class FileSystemController;
}
-namespace NVFlinger {
+namespace Nvnflinger {
class HosBinderDriverServer;
-class NVFlinger;
-} // namespace NVFlinger
+class Nvnflinger;
+} // namespace Nvnflinger
namespace SM {
class ServiceManager;
@@ -52,7 +49,7 @@ static_assert(ServerSessionCountMax == 0x40,
*
* @see ServiceFramework
*/
-class ServiceFrameworkBase : public Kernel::SessionRequestHandler {
+class ServiceFrameworkBase : public SessionRequestHandler {
public:
/// Returns the string identifier used to connect to the service.
std::string GetServiceName() const {
@@ -67,26 +64,19 @@ public:
return max_sessions;
}
- /// Creates a port pair and registers this service with the given ServiceManager.
- void InstallAsService(SM::ServiceManager& service_manager);
-
/// Invokes a service request routine using the HIPC protocol.
- void InvokeRequest(Kernel::HLERequestContext& ctx);
+ void InvokeRequest(HLERequestContext& ctx);
/// Invokes a service request routine using the HIPC protocol.
- void InvokeRequestTipc(Kernel::HLERequestContext& ctx);
-
- /// Creates a port pair and registers it on the kernel's global port registry.
- Kernel::KClientPort& CreatePort();
+ void InvokeRequestTipc(HLERequestContext& ctx);
/// Handles a synchronization request for the service.
- Result HandleSyncRequest(Kernel::KServerSession& session,
- Kernel::HLERequestContext& context) override;
+ Result HandleSyncRequest(Kernel::KServerSession& session, HLERequestContext& context) override;
protected:
/// Member-function pointer type of SyncRequest handlers.
template <typename Self>
- using HandlerFnP = void (Self::*)(Kernel::HLERequestContext&);
+ using HandlerFnP = void (Self::*)(HLERequestContext&);
/// Used to gain exclusive access to the service members, e.g. from CoreTiming thread.
[[nodiscard]] std::scoped_lock<std::mutex> LockService() {
@@ -99,9 +89,6 @@ protected:
/// Identifier string used to connect to the service.
std::string service_name;
- /// Port used by ManageNamedPort.
- Kernel::KPort* named_port{};
-
private:
template <typename T>
friend class ServiceFramework;
@@ -113,16 +100,15 @@ private:
};
using InvokerFn = void(ServiceFrameworkBase* object, HandlerFnP<ServiceFrameworkBase> member,
- Kernel::HLERequestContext& ctx);
+ HLERequestContext& ctx);
explicit ServiceFrameworkBase(Core::System& system_, const char* service_name_,
- ServiceThreadType thread_type, u32 max_sessions_,
- InvokerFn* handler_invoker_);
+ u32 max_sessions_, InvokerFn* handler_invoker_);
~ServiceFrameworkBase() override;
void RegisterHandlersBase(const FunctionInfoBase* functions, std::size_t n);
void RegisterHandlersBaseTipc(const FunctionInfoBase* functions, std::size_t n);
- void ReportUnimplementedFunction(Kernel::HLERequestContext& ctx, const FunctionInfoBase* info);
+ void ReportUnimplementedFunction(HLERequestContext& ctx, const FunctionInfoBase* info);
/// Maximum number of concurrent sessions that this service can handle.
u32 max_sessions;
@@ -181,15 +167,12 @@ protected:
*
* @param system_ The system context to construct this service under.
* @param service_name_ Name of the service.
- * @param thread_type Specifies the thread type for this service. If this is set to CreateNew,
- * it creates a new thread for it, otherwise this uses the default thread.
* @param max_sessions_ Maximum number of sessions that can be connected to this service at the
* same time.
*/
explicit ServiceFramework(Core::System& system_, const char* service_name_,
- ServiceThreadType thread_type = ServiceThreadType::Default,
u32 max_sessions_ = ServerSessionCountMax)
- : ServiceFrameworkBase(system_, service_name_, thread_type, max_sessions_, Invoker) {}
+ : ServiceFrameworkBase(system_, service_name_, max_sessions_, Invoker) {}
/// Registers handlers in the service.
template <std::size_t N>
@@ -227,7 +210,7 @@ private:
* of the derived class in order to invoke one of it's functions through a pointer.
*/
static void Invoker(ServiceFrameworkBase* object, HandlerFnP<ServiceFrameworkBase> member,
- Kernel::HLERequestContext& ctx) {
+ HLERequestContext& ctx) {
// Cast back up to our original types and call the member function
(static_cast<Self*>(object)->*static_cast<HandlerFnP<Self>>(member))(ctx);
}
@@ -245,8 +228,8 @@ public:
void KillNVNFlinger();
private:
- std::unique_ptr<NVFlinger::HosBinderDriverServer> hos_binder_driver_server;
- std::unique_ptr<NVFlinger::NVFlinger> nv_flinger;
+ std::unique_ptr<Nvnflinger::HosBinderDriverServer> hos_binder_driver_server;
+ std::unique_ptr<Nvnflinger::Nvnflinger> nv_flinger;
};
} // namespace Service