2 * Copyright 2003-2006, Haiku Inc.
3 * Distributed under the terms of the MIT License.
6 * Ingo Weinhold, bonefish@users.sf.net
8 #ifndef _DISK_DEVICE_PRIVATE_H
9 #define _DISK_DEVICE_PRIVATE_H
12 #include <DiskDeviceDefs.h>
13 #include <DiskDeviceVisitor.h>
22 class PartitionFilter
{
24 virtual ~PartitionFilter();
25 virtual bool Filter(BPartition
*partition
, int32 level
) = 0;
28 // PartitionFilterVisitor
29 class PartitionFilterVisitor
: public BDiskDeviceVisitor
{
31 PartitionFilterVisitor(BDiskDeviceVisitor
*visitor
,
32 PartitionFilter
*filter
);
34 virtual bool Visit(BDiskDevice
*device
);
35 virtual bool Visit(BPartition
*partition
, int32 level
);
38 BDiskDeviceVisitor
*fVisitor
;
39 PartitionFilter
*fFilter
;
43 class IDFinderVisitor
: public BDiskDeviceVisitor
{
45 IDFinderVisitor(partition_id id
);
47 virtual bool Visit(BDiskDevice
*device
);
48 virtual bool Visit(BPartition
*partition
, int32 level
);
54 } // namespace BPrivate
56 using BPrivate::PartitionFilter
;
57 using BPrivate::PartitionFilterVisitor
;
58 using BPrivate::IDFinderVisitor
;
60 #endif // _DISK_DEVICE_PRIVATE_H