2003-02-09 02:32:51 +03:00
|
|
|
//----------------------------------------------------------------------
|
|
|
|
// This software is part of the OpenBeOS distribution and is covered
|
|
|
|
// by the OpenBeOS license.
|
|
|
|
//---------------------------------------------------------------------
|
|
|
|
|
|
|
|
#ifndef _DISK_DEVICE_PRIVATE_H
|
|
|
|
#define _DISK_DEVICE_PRIVATE_H
|
|
|
|
|
2003-07-07 03:11:10 +04:00
|
|
|
#include <DiskDeviceDefs.h>
|
2003-02-09 02:32:51 +03:00
|
|
|
#include <DiskDeviceVisitor.h>
|
|
|
|
|
2003-02-16 21:03:59 +03:00
|
|
|
class BMessenger;
|
|
|
|
|
2003-02-09 02:32:51 +03:00
|
|
|
namespace BPrivate {
|
|
|
|
|
|
|
|
// PartitionFilter
|
|
|
|
class PartitionFilter {
|
|
|
|
public:
|
2003-07-08 22:26:15 +04:00
|
|
|
virtual bool Filter(BPartition *partition, int32 level) = 0;
|
2003-02-09 02:32:51 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
// PartitionFilterVisitor
|
|
|
|
class PartitionFilterVisitor : public BDiskDeviceVisitor {
|
|
|
|
public:
|
|
|
|
PartitionFilterVisitor(BDiskDeviceVisitor *visitor,
|
|
|
|
PartitionFilter *filter);
|
|
|
|
|
|
|
|
virtual bool Visit(BDiskDevice *device);
|
2003-07-08 22:26:15 +04:00
|
|
|
virtual bool Visit(BPartition *partition, int32 level);
|
2003-02-09 02:32:51 +03:00
|
|
|
|
|
|
|
private:
|
|
|
|
BDiskDeviceVisitor *fVisitor;
|
|
|
|
PartitionFilter *fFilter;
|
|
|
|
};
|
|
|
|
|
|
|
|
// IDFinderVisitor
|
|
|
|
class IDFinderVisitor : public BDiskDeviceVisitor {
|
|
|
|
public:
|
2003-06-10 03:02:16 +04:00
|
|
|
IDFinderVisitor(partition_id id);
|
2003-02-09 02:32:51 +03:00
|
|
|
|
|
|
|
virtual bool Visit(BDiskDevice *device);
|
2003-07-08 22:26:15 +04:00
|
|
|
virtual bool Visit(BPartition *partition, int32 level);
|
2003-02-09 02:32:51 +03:00
|
|
|
|
|
|
|
private:
|
2003-06-10 03:02:16 +04:00
|
|
|
partition_id fID;
|
2003-02-09 02:32:51 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace BPrivate
|
|
|
|
|
|
|
|
using BPrivate::PartitionFilter;
|
|
|
|
using BPrivate::PartitionFilterVisitor;
|
|
|
|
using BPrivate::IDFinderVisitor;
|
|
|
|
|
|
|
|
#endif // _DISK_DEVICE_PRIVATE_H
|