2006-10-13 14:35:04 +04:00
|
|
|
/*
|
|
|
|
* Copyright 2003-2006, Haiku Inc.
|
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*
|
|
|
|
* Authors:
|
|
|
|
* Ingo Weinhold, bonefish@users.sf.net
|
|
|
|
*/
|
2003-02-09 02:32:51 +03:00
|
|
|
#ifndef _DISK_DEVICE_PRIVATE_H
|
|
|
|
#define _DISK_DEVICE_PRIVATE_H
|
|
|
|
|
2006-10-13 14:35:04 +04:00
|
|
|
|
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;
|
2004-11-01 20:02:12 +03:00
|
|
|
class BPath;
|
2003-02-16 21:03:59 +03:00
|
|
|
|
2006-10-13 14:35:04 +04:00
|
|
|
|
2003-02-09 02:32:51 +03:00
|
|
|
namespace BPrivate {
|
|
|
|
|
|
|
|
// PartitionFilter
|
|
|
|
class PartitionFilter {
|
|
|
|
public:
|
2006-10-13 14:35:04 +04:00
|
|
|
virtual ~PartitionFilter();
|
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
|