2012-08-08 11:20:20 +00:00
|
|
|
/*
|
|
|
|
* \brief Client-side CAP session interface
|
|
|
|
* \author Norman Feske
|
2013-02-22 14:26:43 +00:00
|
|
|
* \author Alexander Boettcher
|
2012-08-08 11:20:20 +00:00
|
|
|
* \date 2006-07-10
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
2015-01-05 21:09:51 +00:00
|
|
|
* Copyright (C) 2006-2015 Genode Labs GmbH
|
2012-08-08 11:20:20 +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__CLIENT_H_
|
|
|
|
#define _INCLUDE__CAP_SESSION__CLIENT_H_
|
|
|
|
|
|
|
|
#include <cap_session/capability.h>
|
|
|
|
#include <cap_session/cap_session.h>
|
|
|
|
#include <base/rpc_client.h>
|
|
|
|
|
|
|
|
namespace Genode {
|
|
|
|
|
|
|
|
struct Cap_session_client : Rpc_client<Cap_session>
|
|
|
|
{
|
|
|
|
explicit Cap_session_client(Cap_session_capability session)
|
|
|
|
: Rpc_client<Cap_session>(session) { }
|
|
|
|
|
|
|
|
Native_capability alloc(Native_capability ep, addr_t entry = 0,
|
|
|
|
addr_t flags = 0)
|
|
|
|
{
|
2015-01-05 21:09:51 +00:00
|
|
|
return call<Rpc_alloc>(ep, entry, flags);
|
2012-08-08 11:20:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void free(Native_capability cap) { call<Rpc_free>(cap); }
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* _INCLUDE__CAP_SESSION__CLIENT_H_ */
|