genode/os/include/loader_session/client.h
Norman Feske bcf6714eff Re-implementation of the loader service, ref #187
The original loader service was primarily motivated by the
browser-plugin scenario presented on our live CD. The new version
implements a more general session interface, which widens the
application scope of the service and, at the same time, reduces its
implementation complexity.

The complexity reduction is achieved by removing the original limitation
of supplying the new sub system as a single binary blob only. The server
used to implement heuristics and functionality for dealing with
different kinds of blobs such as ELF images or TAR archives. This has
been replaced by a session-local ROM service, which can be equipped with
an arbitrary number of ROM modules supplied by the loader client prior
starting the new sub system. Even though the TAR support has been
removed, a separate instance of the 'tar_rom' service can be used within
the subsystem to provide the formerly built-in functionality.
2012-05-02 16:54:18 +02:00

56 lines
1.4 KiB
C++

/*
* \brief Client-side loader-session interface
* \author Christian Prochaska
* \date 2009-10-05
*/
/*
* Copyright (C) 2009-2012 Genode Labs GmbH
*
* 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 {
struct Session_client : Rpc_client<Session>
{
explicit Session_client(Loader::Session_capability session)
: Rpc_client<Session>(session) { }
Dataspace_capability alloc_rom_module(Name const &name, size_t size) {
return call<Rpc_alloc_rom_module>(name, size); }
void commit_rom_module(Name const &name) {
call<Rpc_commit_rom_module>(name); }
void ram_quota(size_t quantum) {
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>(); }
};
}
#endif /* _INCLUDE__PLUGIN_SESSION__CLIENT_H_ */