2011-12-22 16:19:25 +01:00
|
|
|
/*
|
|
|
|
* \brief Directory-service interface
|
|
|
|
* \author Norman Feske
|
|
|
|
* \date 2011-02-17
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
2012-01-03 15:35:05 +01:00
|
|
|
* Copyright (C) 2011-2012 Genode Labs GmbH
|
2011-12-22 16:19:25 +01:00
|
|
|
*
|
|
|
|
* This file is part of the Genode OS framework, which is distributed
|
|
|
|
* under the terms of the GNU General Public License version 2.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _NOUX__DIRECTORY_SERVICE_H_
|
|
|
|
#define _NOUX__DIRECTORY_SERVICE_H_
|
|
|
|
|
|
|
|
/* Genode includes */
|
|
|
|
#include <dataspace/capability.h>
|
|
|
|
|
|
|
|
/* Noux includes */
|
|
|
|
#include <noux_session/sysio.h>
|
|
|
|
|
|
|
|
namespace Noux {
|
|
|
|
|
|
|
|
class Vfs_handle;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Abstract interface to stateless directory service
|
|
|
|
*/
|
|
|
|
struct Directory_service
|
|
|
|
{
|
2012-04-23 20:42:55 +02:00
|
|
|
virtual Dataspace_capability dataspace(char const *path) = 0;
|
|
|
|
virtual void release(Dataspace_capability) = 0;
|
2011-12-22 16:19:25 +01:00
|
|
|
|
|
|
|
virtual Vfs_handle *open(Sysio *sysio, char const *path) = 0;
|
|
|
|
|
|
|
|
virtual bool stat(Sysio *sysio, char const *path) = 0;
|
|
|
|
virtual bool dirent(Sysio *sysio, char const *path) = 0;
|
|
|
|
|
|
|
|
virtual void close(Vfs_handle *handle) = 0;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* _NOUX__DIRECTORY_SERVICE_H_ */
|