1f0bc0312SIngo Weinhold //---------------------------------------------------------------------- 2f0bc0312SIngo Weinhold // This software is part of the OpenBeOS distribution and is covered 3f0bc0312SIngo Weinhold // by the OpenBeOS license. 4f0bc0312SIngo Weinhold //--------------------------------------------------------------------- 5f0bc0312SIngo Weinhold 6f0bc0312SIngo Weinhold #ifndef _DISK_DEVICE_PRIVATE_H 7f0bc0312SIngo Weinhold #define _DISK_DEVICE_PRIVATE_H 8f0bc0312SIngo Weinhold 9*5c7270efSIngo Weinhold #include <DiskDeviceDefs.h> 10f0bc0312SIngo Weinhold #include <DiskDeviceVisitor.h> 11f0bc0312SIngo Weinhold 12e2077e8dSIngo Weinhold class BMessenger; 13e2077e8dSIngo Weinhold 14f0bc0312SIngo Weinhold namespace BPrivate { 15f0bc0312SIngo Weinhold 16f0bc0312SIngo Weinhold // PartitionFilter 17f0bc0312SIngo Weinhold class PartitionFilter { 18f0bc0312SIngo Weinhold public: 19f0bc0312SIngo Weinhold virtual bool Filter(BPartition *partition) = 0; 20f0bc0312SIngo Weinhold }; 21f0bc0312SIngo Weinhold 22f0bc0312SIngo Weinhold // PartitionFilterVisitor 23f0bc0312SIngo Weinhold class PartitionFilterVisitor : public BDiskDeviceVisitor { 24f0bc0312SIngo Weinhold public: 25f0bc0312SIngo Weinhold PartitionFilterVisitor(BDiskDeviceVisitor *visitor, 26f0bc0312SIngo Weinhold PartitionFilter *filter); 27f0bc0312SIngo Weinhold 28f0bc0312SIngo Weinhold virtual bool Visit(BDiskDevice *device); 29f0bc0312SIngo Weinhold virtual bool Visit(BPartition *partition); 30f0bc0312SIngo Weinhold 31f0bc0312SIngo Weinhold private: 32f0bc0312SIngo Weinhold BDiskDeviceVisitor *fVisitor; 33f0bc0312SIngo Weinhold PartitionFilter *fFilter; 34f0bc0312SIngo Weinhold }; 35f0bc0312SIngo Weinhold 36f0bc0312SIngo Weinhold // IDFinderVisitor 37f0bc0312SIngo Weinhold class IDFinderVisitor : public BDiskDeviceVisitor { 38f0bc0312SIngo Weinhold public: 39bef8916eSIngo Weinhold IDFinderVisitor(partition_id id); 40f0bc0312SIngo Weinhold 41f0bc0312SIngo Weinhold virtual bool Visit(BDiskDevice *device); 42f0bc0312SIngo Weinhold virtual bool Visit(BPartition *partition); 43f0bc0312SIngo Weinhold 44f0bc0312SIngo Weinhold private: 45bef8916eSIngo Weinhold partition_id fID; 46f0bc0312SIngo Weinhold }; 47f0bc0312SIngo Weinhold 48f0bc0312SIngo Weinhold } // namespace BPrivate 49f0bc0312SIngo Weinhold 50f0bc0312SIngo Weinhold using BPrivate::PartitionFilter; 51f0bc0312SIngo Weinhold using BPrivate::PartitionFilterVisitor; 52f0bc0312SIngo Weinhold using BPrivate::IDFinderVisitor; 53f0bc0312SIngo Weinhold 54f0bc0312SIngo Weinhold #endif // _DISK_DEVICE_PRIVATE_H 55