* Moved GetNextSupportedType() and IsSubSystemFor() from

BDiskSystem to BPartition and reimplemented them using the userland
  add-on backend instead of syscalls. As a side effect this solves the
  TODO I recently added in GetNextSupportedType().
* Reimplemented BDiskSystem::GetTypeForContentType() using the userland
  add-on backend instead of a syscall.
* Moved GetTypeForContentType() and IsSubSystemFor() from
  BPartitionHandle to BDiskSystemAddOn. They were misplaced.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22592 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2007-10-17 01:01:49 +00:00
parent d712d042ea
commit fe6bd3b5b7
8 changed files with 132 additions and 63 deletions
+6 -7
View File
@@ -9,9 +9,12 @@
#include <DiskDeviceDefs.h>
#include <String.h>
class BPartition;
class BString;
struct user_disk_system_info;
class BDiskSystem {
public:
BDiskSystem();
@@ -40,21 +43,17 @@ public:
bool SupportsDeletingChild() const;
bool SupportsInitializing() const;
status_t GetNextSupportedType(BPartition *partition, int32 *cookie,
char *type) const;
// Returns all types the disk system supports for children of the
// supplied partition.
status_t GetTypeForContentType(const char *contentType, char *type) const;
status_t GetTypeForContentType(const char *contentType,
BString* type) const;
bool IsPartitioningSystem() const;
bool IsFileSystem() const;
bool IsSubSystemFor(BPartition *parent) const;
BDiskSystem& operator=(const BDiskSystem& other);
private:
status_t _SetTo(disk_system_id id);
status_t _SetTo(user_disk_system_info *info);
status_t _SetTo(const user_disk_system_info *info);
void _Unset();
friend class BDiskDeviceRoster;