mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-25 00:11:07 +00:00
e3be65833f
This patch moves the VFS file-system factory to a separate vfs library that is independent from libc. This enables libc-less Genode programs to easily use the VFS infrastructure. Fixes #1561
50 lines
1.1 KiB
C++
50 lines
1.1 KiB
C++
/*
|
|
* \brief Interface for creating file-system instances
|
|
* \author Norman Feske
|
|
* \date 2014-04-07
|
|
*/
|
|
|
|
/*
|
|
* Copyright (C) 2014 Genode Labs GmbH
|
|
*
|
|
* This file is part of the Genode OS framework, which is distributed
|
|
* under the terms of the GNU General Public License version 2.
|
|
*/
|
|
|
|
#ifndef _INCLUDE__VFS__FILE_SYSTEM_FACTORY_H_
|
|
#define _INCLUDE__VFS__FILE_SYSTEM_FACTORY_H_
|
|
|
|
#include <vfs/file_system.h>
|
|
|
|
namespace Vfs {
|
|
|
|
struct File_system_factory;
|
|
struct Global_file_system_factory;
|
|
|
|
/**
|
|
* Return singleton instance of a file-system factory
|
|
*/
|
|
Global_file_system_factory &global_file_system_factory();
|
|
}
|
|
|
|
|
|
struct Vfs::File_system_factory
|
|
{
|
|
virtual File_system *create(Xml_node node) = 0;
|
|
};
|
|
|
|
|
|
struct Vfs::Global_file_system_factory : File_system_factory
|
|
{
|
|
/**
|
|
* Register an additional factory for new file-system type
|
|
*
|
|
* \name name of file-system type
|
|
* \factory factory to create instances of this file-system type
|
|
*/
|
|
virtual void extend(char const *name, File_system_factory &factory) = 0;
|
|
};
|
|
|
|
|
|
#endif /* _INCLUDE__VFS__FILE_SYSTEM_FACTORY_H_ */
|