Got rid of the List template class in the disk device manager source dir. Instead we use the Vector based Kernel Utils classes now. Various related changes.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3810 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2003-07-02 16:29:33 +00:00
parent aabf9e6b16
commit 5b489f6f16
8 changed files with 157 additions and 474 deletions
@@ -4,7 +4,6 @@
#define _K_DISK_DEVICE_MANAGER_H
#include "disk_device_manager.h"
#include "List.h"
#include "Locker.h"
namespace BPrivate {
@@ -58,7 +57,7 @@ public:
// manager must be locked
int32 CountDevices();
KDiskDevice *DeviceAt(int32 index);
KDiskDevice *NextDevice(int32 *cookie);
bool PartitionAdded(KPartition *partition); // implementation internal
bool PartitionRemoved(KPartition *partition); //
@@ -82,7 +81,7 @@ public:
KDiskSystem *DiskSystemWithName(const char *name);
KDiskSystem *DiskSystemWithID(disk_system_id id);
int32 CountDiskSystems();
KDiskSystem *DiskSystemAt(int32 index);
KDiskSystem *NextDiskSystem(int32 *cookie);
KDiskSystem *LoadDiskSystem(disk_system_id id);
KDiskSystem *LoadNextDiskSystem(int32 *cookie);
@@ -106,11 +105,16 @@ private:
status_t _ScanDevice(KDiskDevice *device);
status_t _ScanPartition(KPartition *partition);
struct DeviceMap;
struct DiskSystemMap;
struct PartitionMap;
struct PartitionSet;
BLocker fLock;
List<KDiskDevice*> fDevices; // TODO: Optimize!
List<KPartition*> fPartitions; //
List<KDiskSystem*> fDiskSystems; //
List<KPartition*> fObsoletePartitions; //
DeviceMap *fDevices;
PartitionMap *fPartitions;
DiskSystemMap *fDiskSystems;
PartitionSet *fObsoletePartitions;
static KDiskDeviceManager *fDefaultManager;
};
@@ -3,8 +3,9 @@
#ifndef _K_DISK_DEVICE_PARTITION_H
#define _K_DISK_DEVICE_PARTITION_H
#include <Vector.h>
#include "disk_device_manager.h"
#include "List.h"
// partition flags
// TODO: move to another header (must be accessible from userland API impl.)
@@ -164,8 +165,10 @@ private:
static int32 _NextID();
protected:
typedef Vector<KPartition*> PartitionVector;
partition_data fPartitionData;
List<KPartition*> fChildren;
PartitionVector fChildren;
KDiskDevice *fDevice;
KPartition *fParent;
KDiskSystem *fDiskSystem;