2011-12-22 15:19:25 +00:00
|
|
|
/*
|
|
|
|
* \brief Client-side loader-session interface
|
|
|
|
* \author Christian Prochaska
|
|
|
|
* \date 2009-10-05
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
2012-01-03 14:35:05 +00:00
|
|
|
* Copyright (C) 2009-2012 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>
|
|
|
|
|
|
|
|
namespace Loader {
|
|
|
|
|
2012-04-17 16:46:14 +00:00
|
|
|
struct Session_client : Rpc_client<Session>
|
2011-12-22 15:19:25 +00:00
|
|
|
{
|
2012-04-17 16:46:14 +00:00
|
|
|
explicit Session_client(Loader::Session_capability session)
|
|
|
|
: Rpc_client<Session>(session) { }
|
|
|
|
|
2012-07-02 12:25:04 +00:00
|
|
|
Dataspace_capability alloc_rom_module(Name const &name, size_t size) {
|
2012-04-17 16:46:14 +00:00
|
|
|
return call<Rpc_alloc_rom_module>(name, size); }
|
|
|
|
|
|
|
|
void commit_rom_module(Name const &name) {
|
|
|
|
call<Rpc_commit_rom_module>(name); }
|
|
|
|
|
2012-07-02 12:25:04 +00:00
|
|
|
void ram_quota(size_t quantum) {
|
2012-04-17 16:46:14 +00:00
|
|
|
call<Rpc_ram_quota>(quantum); }
|
|
|
|
|
|
|
|
void constrain_geometry(int width, int height) {
|
|
|
|
call<Rpc_constrain_geometry>(width, height); }
|
|
|
|
|
|
|
|
void view_ready_sigh(Signal_context_capability sigh) {
|
|
|
|
call<Rpc_view_ready_sigh>(sigh); }
|
|
|
|
|
|
|
|
void start(Name const &binary, Name const &label = "") {
|
|
|
|
call<Rpc_start>(binary, label); }
|
|
|
|
|
|
|
|
Nitpicker::View_capability view() {
|
|
|
|
return call<Rpc_view>(); }
|
|
|
|
|
|
|
|
View_geometry view_geometry() {
|
|
|
|
return call<Rpc_view_geometry>(); }
|
2011-12-22 15:19:25 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* _INCLUDE__PLUGIN_SESSION__CLIENT_H_ */
|