mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-28 05:34:11 -04:00
Stratosphere: Add IWaitable, WaitableManager
This commit is contained in:
parent
8e25534912
commit
cbb0a084a6
8 changed files with 244 additions and 9 deletions
|
@ -3,22 +3,29 @@
|
|||
#include <type_traits>
|
||||
|
||||
#include "iserviceobject.hpp"
|
||||
#include "iwaitable.hpp"
|
||||
#include "servicesession.hpp"
|
||||
|
||||
template <typename T>
|
||||
class ServiceSession;
|
||||
|
||||
template <typename T>
|
||||
class ServiceServer {
|
||||
class ServiceServer : IWaitable {
|
||||
static_assert(std::is_base_of<IServiceObject, T>::value, "Service Objects must derive from IServiceObject");
|
||||
|
||||
Handle port_handle;
|
||||
unsigned int max_sessions;
|
||||
unsigned int num_sessions;
|
||||
ServiceSession<T> **sessions;
|
||||
|
||||
public:
|
||||
ServiceServer(const char *service_name, unsigned int max_s);
|
||||
~ServiceServer();
|
||||
Result process();
|
||||
virtual ~ServiceServer();
|
||||
|
||||
/* IWaitable */
|
||||
virtual unsigned int get_num_waitables();
|
||||
virtual void get_waitables(IWaitable **dst);
|
||||
virtual void delete_child(IWaitable *child);
|
||||
virtual Handle get_handle();
|
||||
virtual Result handle_signaled();
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue