2012-05-30 18:13:09 +00:00
|
|
|
/*
|
|
|
|
* \brief Client-side implementation of the signal session interface
|
|
|
|
* \author Martin Stein
|
|
|
|
* \date 2012-05-05
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
2013-01-10 20:44:47 +00:00
|
|
|
* Copyright (C) 2012-2013 Genode Labs GmbH
|
2012-05-30 18:13:09 +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__SIGNAL_SESSION__CLIENT_H_
|
|
|
|
#define _INCLUDE__SIGNAL_SESSION__CLIENT_H_
|
|
|
|
|
|
|
|
/* Genode includes */
|
|
|
|
#include <signal_session/capability.h>
|
|
|
|
#include <signal_session/signal_session.h>
|
|
|
|
#include <base/rpc_client.h>
|
|
|
|
|
|
|
|
namespace Genode
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Client-side implementation of the signal session interface
|
|
|
|
*/
|
|
|
|
struct Signal_session_client : Rpc_client<Signal_session>
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Constructor
|
|
|
|
*
|
|
|
|
* \param s targeted signal session
|
|
|
|
*/
|
|
|
|
explicit Signal_session_client(Signal_session_capability const s)
|
|
|
|
: Rpc_client<Signal_session>(s) { }
|
|
|
|
|
|
|
|
/******************************
|
|
|
|
** Signal_session interface **
|
|
|
|
******************************/
|
|
|
|
|
|
|
|
Signal_receiver_capability alloc_receiver()
|
|
|
|
{ return call<Rpc_alloc_receiver>(); }
|
|
|
|
|
|
|
|
Signal_context_capability
|
|
|
|
alloc_context(Signal_receiver_capability const r,
|
2012-12-19 13:46:48 +00:00
|
|
|
unsigned const imprint) {
|
|
|
|
return call<Rpc_alloc_context>(r, imprint); }
|
2013-02-18 12:58:09 +00:00
|
|
|
|
|
|
|
void free_context(Signal_context_capability cap) {
|
|
|
|
call<Rpc_free_context>(cap); }
|
2012-05-30 18:13:09 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* _INCLUDE__SIGNAL_SESSION__CLIENT_H_ */
|