genode/repos/base/include/log_session/log_session.h

66 lines
1.3 KiB
C
Raw Normal View History

2011-12-22 15:19:25 +00:00
/*
* \brief Log text output session interface
* \author Norman Feske
* \date 2006-09-15
*/
/*
* Copyright (C) 2006-2017 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 Affero General Public License version 3.
2011-12-22 15:19:25 +00:00
*/
#ifndef _INCLUDE__LOG_SESSION__LOG_SESSION_H_
#define _INCLUDE__LOG_SESSION__LOG_SESSION_H_
#include <base/capability.h>
#include <base/stdint.h>
#include <base/rpc_args.h>
#include <session/session.h>
namespace Genode {
struct Log_session;
struct Log_session_client;
}
2011-12-22 15:19:25 +00:00
struct Genode::Log_session : Session
{
2017-05-24 12:41:19 +00:00
/**
* \noapi
*/
static const char *service_name() { return "LOG"; }
2011-12-22 15:19:25 +00:00
/*
* A LOG connection consumes a dataspace capability for the session-object
* allocation and its session capability.
*/
enum { CAP_QUOTA = 2 };
typedef Log_session_client Client;
virtual ~Log_session() { }
2011-12-22 15:19:25 +00:00
/* the lowest platform-specific maximum IPC payload size (OKL4) */
enum { MAX_STRING_LEN = 232 };
typedef Rpc_in_buffer<MAX_STRING_LEN> String;
2011-12-22 15:19:25 +00:00
/**
* Output null-terminated string
*/
virtual void write(String const &string) = 0;
2011-12-22 15:19:25 +00:00
/*********************
** RPC declaration **
*********************/
GENODE_RPC(Rpc_write, void, write, String const &);
GENODE_RPC_INTERFACE(Rpc_write);
};
2011-12-22 15:19:25 +00:00
#endif /* _INCLUDE__LOG_SESSION__LOG_SESSION_H_ */