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 11 namespace UserlandFSUtil { 12 class RequestPort; 13 } 14 using UserlandFSUtil::RequestPort; 15 16 namespace UserlandFS { 17 18 class FileSystem; 19 class RequestThread; 20 21 class UserlandFSServer : public BApplication { 22 public: 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 31 private: 32 status_t _Announce(const char* fsName, port_id port); 33 34 private: 35 image_id fAddOnImage; 36 FileSystem* fFileSystem; 37 RequestPort* fNotificationRequestPort; 38 RequestThread* fRequestThreads; 39 }; 40 41 } // namespace UserlandFS 42 43 using UserlandFS::FileSystem; 44 using UserlandFS::RequestThread; 45 using UserlandFS::UserlandFSServer; 46 47 #endif // USERLAND_FS_SERVER_H 48