2012-06-11 15:01:51 +00:00
|
|
|
/*
|
|
|
|
* \brief A server for connecting two 'Terminal' sessions
|
|
|
|
* \author Christian Prochaska
|
|
|
|
* \date 2012-05-16
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
2017-01-17 13:55:49 +00:00
|
|
|
* Copyright (C) 2012-2017 Genode Labs GmbH
|
2012-06-11 15:01:51 +00:00
|
|
|
*
|
|
|
|
* This file is part of the Genode OS framework, which is distributed
|
2017-02-20 12:23:52 +00:00
|
|
|
* under the terms of the GNU Affero General Public License version 3.
|
2012-06-11 15:01:51 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
/* Genode includes */
|
2017-01-17 13:55:49 +00:00
|
|
|
#include <base/component.h>
|
|
|
|
#include <base/heap.h>
|
2012-06-11 15:01:51 +00:00
|
|
|
|
|
|
|
/* local includes */
|
|
|
|
#include "terminal_root.h"
|
|
|
|
|
2017-01-17 13:55:49 +00:00
|
|
|
namespace Terminal_crosslink {
|
|
|
|
|
2012-06-11 15:01:51 +00:00
|
|
|
using namespace Genode;
|
|
|
|
|
2017-01-17 13:55:49 +00:00
|
|
|
struct Main;
|
|
|
|
}
|
2012-06-11 15:01:51 +00:00
|
|
|
|
2017-01-17 13:55:49 +00:00
|
|
|
struct Terminal_crosslink::Main
|
|
|
|
{
|
|
|
|
Env &_env;
|
|
|
|
Heap _heap { _env.ram(), _env.rm() };
|
2012-06-11 15:01:51 +00:00
|
|
|
|
2017-01-17 13:55:49 +00:00
|
|
|
Root _terminal_root { _env, _heap };
|
|
|
|
|
|
|
|
Main(Env &env) : _env(env)
|
|
|
|
{
|
|
|
|
env.parent().announce(env.ep().manage(_terminal_root));
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
void Component::construct(Genode::Env &env)
|
|
|
|
{
|
|
|
|
static Terminal_crosslink::Main main(env);
|
2012-06-11 15:01:51 +00:00
|
|
|
}
|