1 // UserlandFSServer.h 2 3 #ifndef USERLAND_FS_SERVER_H 4 #define USERLAND_FS_SERVER_H 5 6 #include <Application.h> 7 #include <image.h> 8 9 namespace UserlandFSUtil { 10 class RequestPort; 11 } 12 using UserlandFSUtil::RequestPort; 13 14 namespace UserlandFS { 15 16 class FileSystem; 17 class RequestThread; 18 19 class UserlandFSServer : public BApplication { 20 public: 21 UserlandFSServer(const char* signature); 22 virtual ~UserlandFSServer(); 23 24 status_t Init(const char* fileSystem); 25 26 static RequestPort* GetNotificationRequestPort(); 27 static FileSystem* GetFileSystem(); 28 29 private: 30 status_t _RegisterWithDispatcher(const char* fsName); 31 status_t _CreateBeOSKernelInterface(const char* fsName, 32 image_id image, FileSystem** fileSystem); 33 status_t _CreateHaikuKernelInterface(const char* fsName, 34 image_id image, FileSystem** fileSystem); 35 36 private: 37 image_id fAddOnImage; 38 FileSystem* fFileSystem; 39 RequestPort* fNotificationRequestPort; 40 RequestThread* fRequestThreads; 41 bool fBlockCacheInitialized; 42 }; 43 44 } // namespace UserlandFS 45 46 using UserlandFS::FileSystem; 47 using UserlandFS::RequestThread; 48 using UserlandFS::UserlandFSServer; 49 50 #endif // USERLAND_FS_SERVER_H 51