Stratosphere: Fill out Loader main(), fix template classes.
This commit is contained in:
@@ -10,7 +10,7 @@ template <typename T>
|
||||
class ServiceServer;
|
||||
|
||||
template <typename T>
|
||||
class ServiceSession : IWaitable {
|
||||
class ServiceSession : public IWaitable {
|
||||
static_assert(std::is_base_of<IServiceObject, T>::value, "Service Objects must derive from IServiceObject");
|
||||
|
||||
T *service_object;
|
||||
@@ -18,7 +18,7 @@ class ServiceSession : IWaitable {
|
||||
Handle server_handle;
|
||||
Handle client_handle;
|
||||
public:
|
||||
ServiceSession(ServiceServer<T> *s, Handle s_h, Handle c_h) : server(s), server_handle(s_h), client_handle(c_h) {
|
||||
ServiceSession<T>(ServiceServer<T> *s, Handle s_h, Handle c_h) : server(s), server_handle(s_h), client_handle(c_h) {
|
||||
this->service_object = new T();
|
||||
}
|
||||
|
||||
@@ -37,9 +37,24 @@ class ServiceSession : IWaitable {
|
||||
Handle get_client_handle() { return this->client_handle; }
|
||||
|
||||
/* 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();
|
||||
virtual unsigned int get_num_waitables() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
virtual void get_waitables(IWaitable **dst) {
|
||||
dst[0] = this;
|
||||
}
|
||||
|
||||
virtual void delete_child(IWaitable *child) {
|
||||
/* TODO: Panic, because we can never have any children. */
|
||||
}
|
||||
|
||||
virtual Handle get_handle() {
|
||||
return this->server_handle;
|
||||
}
|
||||
|
||||
virtual Result handle_signaled() {
|
||||
/* TODO */
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user