2018-04-03 13:59:35 +00:00
|
|
|
/*
|
|
|
|
* \brief Cross-plugin VFS environment
|
|
|
|
* \author Emery Hemingway
|
2022-12-02 08:53:16 +00:00
|
|
|
* \author Norman Feske
|
2018-04-03 13:59:35 +00:00
|
|
|
* \date 2018-04-02
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
2019-03-25 14:41:43 +00:00
|
|
|
* Copyright (C) 2018-2019 Genode Labs GmbH
|
2018-04-03 13:59:35 +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.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _INCLUDE__VFS__ENV_H_
|
|
|
|
#define _INCLUDE__VFS__ENV_H_
|
|
|
|
|
|
|
|
#include <vfs/file_system.h>
|
2022-12-02 08:53:16 +00:00
|
|
|
#include <vfs/remote_io.h>
|
2018-04-03 13:59:35 +00:00
|
|
|
#include <base/allocator.h>
|
|
|
|
#include <base/env.h>
|
|
|
|
|
|
|
|
namespace Vfs { struct Env; }
|
|
|
|
|
|
|
|
struct Vfs::Env : Interface
|
|
|
|
{
|
|
|
|
virtual Genode::Env &env() = 0;
|
|
|
|
|
|
|
|
/**
|
2022-12-02 08:53:16 +00:00
|
|
|
* Allocator for creating stuctures shared across open VFS handles
|
2018-04-03 13:59:35 +00:00
|
|
|
*/
|
|
|
|
virtual Genode::Allocator &alloc() = 0;
|
|
|
|
|
|
|
|
/**
|
2022-12-02 08:53:16 +00:00
|
|
|
* VFS root file system
|
2018-04-03 13:59:35 +00:00
|
|
|
*/
|
|
|
|
virtual File_system &root_dir() = 0;
|
2022-12-02 08:53:16 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Registry of deferred wakeups for plugins interacting with remote peers
|
|
|
|
*/
|
|
|
|
virtual Remote_io::Deferred_wakeups &deferred_wakeups() = 0;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Interface tailored for triggering and waiting for I/O
|
|
|
|
*/
|
|
|
|
struct Io : Interface, Genode::Noncopyable
|
|
|
|
{
|
|
|
|
virtual void progress() = 0;
|
|
|
|
};
|
|
|
|
|
|
|
|
virtual Io &io() = 0;
|
2018-04-03 13:59:35 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* _INCLUDE__VFS__ENV_H_ */
|