mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-06-02 07:39:49 -04:00
Stratosphere: Skeleton templated IPC Server code
This commit is contained in:
parent
5345d7c206
commit
8e25534912
4 changed files with 100 additions and 0 deletions
24
stratosphere/loader/source/serviceserver.hpp
Normal file
24
stratosphere/loader/source/serviceserver.hpp
Normal file
|
@ -0,0 +1,24 @@
|
|||
#pragma once
|
||||
#include <switch.h>
|
||||
#include <type_traits>
|
||||
|
||||
#include "iserviceobject.hpp"
|
||||
#include "servicesession.hpp"
|
||||
|
||||
template <typename T>
|
||||
class ServiceSession;
|
||||
|
||||
template <typename T>
|
||||
class ServiceServer {
|
||||
static_assert(std::is_base_of<IServiceObject, T>::value, "Service Objects must derive from IServiceObject");
|
||||
|
||||
Handle port_handle;
|
||||
unsigned int max_sessions;
|
||||
ServiceSession<T> **sessions;
|
||||
|
||||
public:
|
||||
ServiceServer(const char *service_name, unsigned int max_s);
|
||||
~ServiceServer();
|
||||
Result process();
|
||||
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue