1 /*
2 * \brief Log text output session interface
3 * \author Norman Feske
4 * \date 2006-09-15
5 */
6
7 /*
8 * Copyright (C) 2006-2013 Genode Labs GmbH
9 *
10 * This file is part of the Genode OS framework, which is distributed
11 * under the terms of the GNU General Public License version 2.
12 */
13
14 #ifndef _INCLUDE__LOG_SESSION__LOG_SESSION_H_
15 #define _INCLUDE__LOG_SESSION__LOG_SESSION_H_
16
17 #include <base/capability.h>
18 #include <base/stdint.h>
19 #include <base/rpc_args.h>
20 #include <session/session.h>
21
22 namespace Genode { struct Log_session; }
23
24
25 struct Genode::Log_session : Session
26 {
27 static const char *service_name() { return "LOG"; }
28
29 virtual ~Log_session() { }
30
31 typedef Rpc_in_buffer<256> String;
32
33 /**
34 * Output null-terminated string
35 *
36 * \return number of written characters
37 */
38 virtual size_t write(String const &string) = 0;
39
40
41 /*********************
42 ** RPC declaration **
43 *********************/
44
45 GENODE_RPC(Rpc_write, size_t, write, String const &);
46 GENODE_RPC_INTERFACE(Rpc_write);
47 };
48
49 #endif /* _INCLUDE__LOG_SESSION__LOG_SESSION_H_ */