2011-12-22 15:19:25 +00:00
|
|
|
/*
|
|
|
|
* \brief Client-side parent interface
|
|
|
|
* \author Norman Feske
|
|
|
|
* \date 2006-05-10
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
2013-01-10 20:44:47 +00:00
|
|
|
* Copyright (C) 2006-2013 Genode Labs GmbH
|
2011-12-22 15:19:25 +00:00
|
|
|
*
|
|
|
|
* This file is part of the Genode OS framework, which is distributed
|
|
|
|
* under the terms of the GNU General Public License version 2.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _INCLUDE__PARENT__CLIENT_H_
|
|
|
|
#define _INCLUDE__PARENT__CLIENT_H_
|
|
|
|
|
|
|
|
#include <parent/capability.h>
|
|
|
|
#include <base/rpc_client.h>
|
|
|
|
|
2015-03-04 20:12:14 +00:00
|
|
|
namespace Genode { struct Parent_client; }
|
2011-12-22 15:19:25 +00:00
|
|
|
|
|
|
|
|
2015-03-04 20:12:14 +00:00
|
|
|
struct Genode::Parent_client : Rpc_client<Parent>
|
|
|
|
{
|
|
|
|
explicit Parent_client(Parent_capability parent)
|
|
|
|
: Rpc_client<Parent>(parent) { }
|
2011-12-22 15:19:25 +00:00
|
|
|
|
2015-03-04 20:12:14 +00:00
|
|
|
void exit(int exit_value) override { call<Rpc_exit>(exit_value); }
|
2011-12-22 15:19:25 +00:00
|
|
|
|
2015-03-04 20:12:14 +00:00
|
|
|
void announce(Service_name const &service, Root_capability root) override {
|
|
|
|
call<Rpc_announce>(service, root); }
|
2011-12-22 15:19:25 +00:00
|
|
|
|
2015-03-04 20:12:14 +00:00
|
|
|
Session_capability session(Service_name const &service,
|
|
|
|
Session_args const &args,
|
|
|
|
Affinity const &affinity) override {
|
|
|
|
return call<Rpc_session>(service, args, affinity); }
|
2011-12-22 15:19:25 +00:00
|
|
|
|
2015-03-04 20:12:14 +00:00
|
|
|
void upgrade(Session_capability to_session, Upgrade_args const &args) override {
|
|
|
|
call<Rpc_upgrade>(to_session, args); }
|
2012-10-10 11:54:46 +00:00
|
|
|
|
2015-03-04 20:12:14 +00:00
|
|
|
void close(Session_capability session) override { call<Rpc_close>(session); }
|
2013-09-19 18:39:35 +00:00
|
|
|
|
2015-03-04 20:12:14 +00:00
|
|
|
Thread_capability main_thread_cap() const override {
|
|
|
|
return call<Rpc_main_thread>(); }
|
2013-09-19 18:39:35 +00:00
|
|
|
|
2015-03-04 20:12:14 +00:00
|
|
|
void resource_avail_sigh(Signal_context_capability sigh) override {
|
|
|
|
call<Rpc_resource_avail_sigh>(sigh); }
|
2013-09-19 18:39:35 +00:00
|
|
|
|
2015-03-04 20:12:14 +00:00
|
|
|
void resource_request(Resource_args const &args) override {
|
|
|
|
call<Rpc_resource_request>(args); }
|
2013-09-19 18:39:35 +00:00
|
|
|
|
2015-03-04 20:12:14 +00:00
|
|
|
void yield_sigh(Signal_context_capability sigh) override {
|
|
|
|
call<Rpc_yield_sigh>(sigh); }
|
2013-09-19 18:39:35 +00:00
|
|
|
|
2015-03-04 20:12:14 +00:00
|
|
|
Resource_args yield_request() override { return call<Rpc_yield_request>(); }
|
|
|
|
|
|
|
|
void yield_response() override { call<Rpc_yield_response>(); }
|
|
|
|
};
|
2011-12-22 15:19:25 +00:00
|
|
|
|
|
|
|
#endif /* _INCLUDE__PARENT__CLIENT_H_ */
|