2011-12-22 15:19:25 +00:00
|
|
|
/*
|
|
|
|
* \brief Client-side loader-session interface
|
|
|
|
* \author Christian Prochaska
|
|
|
|
* \date 2009-10-05
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
2013-01-10 20:44:47 +00:00
|
|
|
* Copyright (C) 2009-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__LOADER_SESSION__CLIENT_H_
|
|
|
|
#define _INCLUDE__LOADER_SESSION__CLIENT_H_
|
|
|
|
|
|
|
|
#include <loader_session/loader_session.h>
|
|
|
|
#include <loader_session/capability.h>
|
|
|
|
#include <base/rpc_client.h>
|
|
|
|
#include <os/alarm.h>
|
|
|
|
|
2015-03-04 20:12:14 +00:00
|
|
|
namespace Loader { struct Session_client; }
|
2011-12-22 15:19:25 +00:00
|
|
|
|
2012-04-17 16:46:14 +00:00
|
|
|
|
2015-03-04 20:12:14 +00:00
|
|
|
struct Loader::Session_client : Genode::Rpc_client<Session>
|
|
|
|
{
|
|
|
|
explicit Session_client(Loader::Session_capability session)
|
|
|
|
: Rpc_client<Session>(session) { }
|
2012-04-17 16:46:14 +00:00
|
|
|
|
2015-03-04 20:12:14 +00:00
|
|
|
Dataspace_capability alloc_rom_module(Name const &name,
|
|
|
|
size_t size) override {
|
|
|
|
return call<Rpc_alloc_rom_module>(name, size); }
|
2012-04-17 16:46:14 +00:00
|
|
|
|
2015-03-04 20:12:14 +00:00
|
|
|
void commit_rom_module(Name const &name) override {
|
|
|
|
call<Rpc_commit_rom_module>(name); }
|
2012-04-17 16:46:14 +00:00
|
|
|
|
2015-03-04 20:12:14 +00:00
|
|
|
void ram_quota(size_t quantum) override {
|
|
|
|
call<Rpc_ram_quota>(quantum); }
|
2012-04-17 16:46:14 +00:00
|
|
|
|
2015-03-04 20:12:14 +00:00
|
|
|
void constrain_geometry(Area size) override {
|
|
|
|
call<Rpc_constrain_geometry>(size); }
|
2014-06-04 19:01:18 +00:00
|
|
|
|
2015-03-04 20:12:14 +00:00
|
|
|
void parent_view(Nitpicker::View_capability view) override {
|
|
|
|
call<Rpc_parent_view>(view); }
|
2012-04-17 16:46:14 +00:00
|
|
|
|
2015-03-04 20:12:14 +00:00
|
|
|
void view_ready_sigh(Signal_context_capability sigh) override {
|
|
|
|
call<Rpc_view_ready_sigh>(sigh); }
|
2013-01-04 14:24:11 +00:00
|
|
|
|
2015-03-04 20:12:14 +00:00
|
|
|
void fault_sigh(Signal_context_capability sigh) override {
|
|
|
|
call<Rpc_fault_sigh>(sigh); }
|
2012-04-17 16:46:14 +00:00
|
|
|
|
2016-03-08 14:58:05 +00:00
|
|
|
void start(Name const &binary, Name const &label = "") override {
|
|
|
|
call<Rpc_start>(binary, label); }
|
2012-04-17 16:46:14 +00:00
|
|
|
|
2015-03-04 20:12:14 +00:00
|
|
|
void view_geometry(Rect rect, Point offset) override {
|
|
|
|
call<Rpc_view_geometry>(rect, offset); }
|
|
|
|
|
|
|
|
Area view_size() const override {
|
|
|
|
return call<Rpc_view_size>(); }
|
|
|
|
};
|
2011-12-22 15:19:25 +00:00
|
|
|
|
|
|
|
#endif /* _INCLUDE__PLUGIN_SESSION__CLIENT_H_ */
|