2011-12-22 15:19:25 +00:00
|
|
|
/*
|
2013-01-10 11:10:41 +00:00
|
|
|
* \brief Connection to audio service
|
2011-12-22 15:19:25 +00:00
|
|
|
* \author Sebastian Sumpf
|
2013-01-10 11:10:41 +00:00
|
|
|
* \date 2012-12-20
|
2011-12-22 15:19:25 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
2017-02-20 12:23:52 +00:00
|
|
|
* Copyright (C) 2012-2017 Genode Labs GmbH
|
2011-12-22 15:19:25 +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.
|
2011-12-22 15:19:25 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _INCLUDE__AUDIO_OUT_SESSION__CONNECTION_H_
|
|
|
|
#define _INCLUDE__AUDIO_OUT_SESSION__CONNECTION_H_
|
|
|
|
|
|
|
|
#include <audio_out_session/client.h>
|
|
|
|
#include <base/connection.h>
|
|
|
|
#include <base/allocator.h>
|
|
|
|
|
2015-03-04 20:12:14 +00:00
|
|
|
namespace Audio_out { struct Connection; }
|
2011-12-22 15:19:25 +00:00
|
|
|
|
2013-01-10 11:10:41 +00:00
|
|
|
|
|
|
|
struct Audio_out::Connection : Genode::Connection<Session>, Audio_out::Session_client
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Constructor
|
|
|
|
*
|
|
|
|
* \param channel channel identifier (e.g., "front left")
|
|
|
|
* \param alloc_signal install 'alloc_signal', the client may then use
|
|
|
|
* 'wait_for_alloc' when the stream is full
|
|
|
|
* \param progress_signal install progress signal, the client may then
|
|
|
|
* call 'wait_for_progress', which is sent when the
|
|
|
|
* server processed one or more packets
|
|
|
|
*/
|
2016-05-10 15:24:51 +00:00
|
|
|
Connection(Genode::Env &env,
|
|
|
|
char const *channel,
|
|
|
|
bool alloc_signal = true,
|
|
|
|
bool progress_signal = false)
|
|
|
|
:
|
2023-03-03 11:07:28 +00:00
|
|
|
Genode::Connection<Session>(env, Label(),
|
|
|
|
Ram_quota { 2*4096 + 2048 + sizeof(Stream) },
|
|
|
|
Args("channel=\"", channel, "\"")),
|
2017-01-06 14:32:53 +00:00
|
|
|
Session_client(env.rm(), cap(), alloc_signal, progress_signal)
|
2016-05-10 15:24:51 +00:00
|
|
|
{ }
|
2013-01-10 11:10:41 +00:00
|
|
|
};
|
|
|
|
|
2011-12-22 15:19:25 +00:00
|
|
|
#endif /* _INCLUDE__AUDIO_OUT_SESSION__CONNECTION_H_ */
|