* 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:
@@ -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;
|
||||
|
||||
@@ -41,6 +41,10 @@ public:
|
||||
const char* name, const char* parameters,
|
||||
BPartitionHandle** handle);
|
||||
|
||||
virtual status_t GetTypeForContentType(const char* contentType,
|
||||
BString* type);
|
||||
virtual bool IsSubSystemFor(const BMutablePartition* child);
|
||||
|
||||
private:
|
||||
BString fName;
|
||||
uint32 fFlags;
|
||||
@@ -62,14 +66,11 @@ public:
|
||||
virtual bool SupportsInitializingChild(
|
||||
const BMutablePartition* child,
|
||||
const char* diskSystem);
|
||||
virtual bool IsSubSystemFor(const BMutablePartition* child);
|
||||
|
||||
virtual status_t GetNextSupportedType(
|
||||
const BMutablePartition* child,
|
||||
int32* cookie, BString* type);
|
||||
// child can be NULL
|
||||
virtual status_t GetTypeForContentType(const char* contentType,
|
||||
BString* type);
|
||||
|
||||
virtual status_t GetPartitioningInfo(BPartitioningInfo* info);
|
||||
|
||||
|
||||
@@ -128,6 +128,18 @@ public:
|
||||
BDiskDeviceParameterEditor** editor);
|
||||
status_t SetContentParameters(const char* parameters);
|
||||
|
||||
status_t GetNextSupportedType(int32 *cookie,
|
||||
BString* type) const;
|
||||
// Returns all partition types for this
|
||||
// partition supported by the parent disk
|
||||
// system.
|
||||
status_t GetNextSupportedChildType(int32 *cookie,
|
||||
BString* type) const;
|
||||
// Returns all partition types for a child
|
||||
// of this partition supported by its disk
|
||||
// system.
|
||||
bool IsSubSystem(const char* diskSystem) const;
|
||||
|
||||
bool CanInitialize(const char* diskSystem) const;
|
||||
status_t GetInitializationParameterEditor(
|
||||
const char* system,
|
||||
|
||||
Reference in New Issue
Block a user