btrfs: [] on the end of a struct field is a variable length array.
[haiku.git] / headers / private / storage / DiskDevicePrivate.h
blob9c18dd01eec7c026665037909bb459dc65d91e20
1 /*
2 * Copyright 2003-2006, Haiku Inc.
3 * Distributed under the terms of the MIT License.
5 * Authors:
6 * Ingo Weinhold, bonefish@users.sf.net
7 */
8 #ifndef _DISK_DEVICE_PRIVATE_H
9 #define _DISK_DEVICE_PRIVATE_H
12 #include <DiskDeviceDefs.h>
13 #include <DiskDeviceVisitor.h>
15 class BMessenger;
16 class BPath;
19 namespace BPrivate {
21 // PartitionFilter
22 class PartitionFilter {
23 public:
24 virtual ~PartitionFilter();
25 virtual bool Filter(BPartition *partition, int32 level) = 0;
28 // PartitionFilterVisitor
29 class PartitionFilterVisitor : public BDiskDeviceVisitor {
30 public:
31 PartitionFilterVisitor(BDiskDeviceVisitor *visitor,
32 PartitionFilter *filter);
34 virtual bool Visit(BDiskDevice *device);
35 virtual bool Visit(BPartition *partition, int32 level);
37 private:
38 BDiskDeviceVisitor *fVisitor;
39 PartitionFilter *fFilter;
42 // IDFinderVisitor
43 class IDFinderVisitor : public BDiskDeviceVisitor {
44 public:
45 IDFinderVisitor(partition_id id);
47 virtual bool Visit(BDiskDevice *device);
48 virtual bool Visit(BPartition *partition, int32 level);
50 private:
51 partition_id fID;
54 } // namespace BPrivate
56 using BPrivate::PartitionFilter;
57 using BPrivate::PartitionFilterVisitor;
58 using BPrivate::IDFinderVisitor;
60 #endif // _DISK_DEVICE_PRIVATE_H