1/*
2 * Copyright 2001-2009, Ingo Weinhold, ingo_weinhold@gmx.de.
3 * Distributed under the terms of the MIT License.
4 */
5#ifndef USERLAND_FS_SERVER_H
6#define USERLAND_FS_SERVER_H
7
8#include <Application.h>
9#include <image.h>
10
11namespace UserlandFSUtil {
12	class RequestPort;
13}
14using UserlandFSUtil::RequestPort;
15
16namespace UserlandFS {
17
18class FileSystem;
19class RequestThread;
20
21class UserlandFSServer : public BApplication {
22public:
23								UserlandFSServer(const char* signature);
24	virtual						~UserlandFSServer();
25
26			status_t			Init(const char* fileSystem, port_id port);
27
28	static	RequestPort*		GetNotificationRequestPort();
29	static	FileSystem*			GetFileSystem();
30
31private:
32			status_t			_Announce(const char* fsName, port_id port);
33
34private:
35			image_id			fAddOnImage;
36			FileSystem*			fFileSystem;
37			RequestPort*		fNotificationRequestPort;
38			RequestThread*		fRequestThreads;
39};
40
41}	// namespace UserlandFS
42
43using UserlandFS::FileSystem;
44using UserlandFS::RequestThread;
45using UserlandFS::UserlandFSServer;
46
47#endif	// USERLAND_FS_SERVER_H
48