2011-12-22 15:19:25 +00:00
|
|
|
/*
|
|
|
|
* \brief Connection to CAP service
|
|
|
|
* \author Norman Feske
|
|
|
|
* \date 2008-08-22
|
2016-01-19 19:24:22 +00:00
|
|
|
*
|
|
|
|
* \deprecated
|
|
|
|
*
|
|
|
|
* This header is scheduled for removal. It exists for API compatiblity only.
|
2011-12-22 15:19:25 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
2013-01-10 20:44:47 +00:00
|
|
|
* Copyright (C) 2008-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__CAP_SESSION__CONNECTION_H_
|
|
|
|
#define _INCLUDE__CAP_SESSION__CONNECTION_H_
|
|
|
|
|
2016-01-19 19:24:22 +00:00
|
|
|
#include <cap_session/cap_session.h>
|
|
|
|
#include <pd_session/client.h>
|
|
|
|
#include <base/env.h>
|
2011-12-22 15:19:25 +00:00
|
|
|
|
2015-03-04 20:12:14 +00:00
|
|
|
namespace Genode { struct Cap_connection; }
|
2011-12-22 15:19:25 +00:00
|
|
|
|
2015-03-04 20:12:14 +00:00
|
|
|
|
2016-01-19 19:24:22 +00:00
|
|
|
/*
|
|
|
|
* There are no CAP connections anymore. The only situation where CAP
|
|
|
|
* connections were created was inside old-fashioned servers that used
|
|
|
|
* to create an 'Rpc_entrypoint' manually. The 'Rpc_entrypoint' requires
|
|
|
|
* a CAP session as constructor argument. We accommodate this use case
|
|
|
|
* by allocating RPC capabilities from the server's protection domain.
|
|
|
|
*
|
|
|
|
* Modern components no longer create 'Rpc_entrypoint' objects directly
|
|
|
|
* but instead use the new 'Entrypoint' interface.
|
|
|
|
*/
|
|
|
|
struct Genode::Cap_connection : Pd_session_client
|
2015-03-04 20:12:14 +00:00
|
|
|
{
|
2016-01-19 19:24:22 +00:00
|
|
|
Cap_connection() : Pd_session_client(env()->pd_session_cap()) { }
|
2015-03-04 20:12:14 +00:00
|
|
|
};
|
2011-12-22 15:19:25 +00:00
|
|
|
|
|
|
|
#endif /* _INCLUDE__CAP_SESSION__CONNECTION_H_ */
|