mirror of
https://github.com/genodelabs/genode.git
synced 2025-05-02 08:42:52 +00:00
This patch extracts the child-management functionality from the init component into a new library called "sandbox". The library API is located at 'os/include/os/sandbox.h'. The sandbox API allows for the interaction of the component with the sandboxed children by providing locally implemented services. This mechanism is illustrated by the new test at os/src/test/sandbox. Issue #3601
44 lines
797 B
C++
44 lines
797 B
C++
/*
|
|
* \brief Sandbox verbosity
|
|
* \author Norman Feske
|
|
* \date 2017-01-03
|
|
*/
|
|
|
|
/*
|
|
* Copyright (C) 2017 Genode Labs GmbH
|
|
*
|
|
* This file is part of the Genode OS framework, which is distributed
|
|
* under the terms of the GNU Affero General Public License version 3.
|
|
*/
|
|
|
|
#ifndef _LIB__SANDBOX__VERBOSE_H_
|
|
#define _LIB__SANDBOX__VERBOSE_H_
|
|
|
|
/* Genode includes */
|
|
#include <util/noncopyable.h>
|
|
#include <util/xml_node.h>
|
|
|
|
/* local includes */
|
|
#include <types.h>
|
|
|
|
namespace Sandbox { struct Verbose; }
|
|
|
|
|
|
class Sandbox::Verbose : Genode::Noncopyable
|
|
{
|
|
private:
|
|
|
|
bool _enabled = false;
|
|
|
|
public:
|
|
|
|
Verbose() { }
|
|
|
|
Verbose(Genode::Xml_node config)
|
|
: _enabled(config.attribute_value("verbose", false)) { }
|
|
|
|
bool enabled() const { return _enabled; }
|
|
};
|
|
|
|
#endif /* _LIB__SANDBOX__VERBOSE_H_ */
|