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 95c7270efSIngo Weinhold #include <DiskDeviceDefs.h> 10f0bc0312SIngo Weinhold #include <DiskDeviceVisitor.h> 11f0bc0312SIngo Weinhold 12e2077e8dSIngo Weinhold class BMessenger; 13*419458bcSIngo Weinhold class BPath; 14e2077e8dSIngo Weinhold 15f0bc0312SIngo Weinhold namespace BPrivate { 16f0bc0312SIngo Weinhold 17f0bc0312SIngo Weinhold // PartitionFilter 18f0bc0312SIngo Weinhold class PartitionFilter { 19f0bc0312SIngo Weinhold public: 20671a7455SIngo Weinhold virtual bool Filter(BPartition *partition, int32 level) = 0; 21f0bc0312SIngo Weinhold }; 22f0bc0312SIngo Weinhold 23f0bc0312SIngo Weinhold // PartitionFilterVisitor 24f0bc0312SIngo Weinhold class PartitionFilterVisitor : public BDiskDeviceVisitor { 25f0bc0312SIngo Weinhold public: 26f0bc0312SIngo Weinhold PartitionFilterVisitor(BDiskDeviceVisitor *visitor, 27f0bc0312SIngo Weinhold PartitionFilter *filter); 28f0bc0312SIngo Weinhold 29f0bc0312SIngo Weinhold virtual bool Visit(BDiskDevice *device); 30671a7455SIngo Weinhold virtual bool Visit(BPartition *partition, int32 level); 31f0bc0312SIngo Weinhold 32f0bc0312SIngo Weinhold private: 33f0bc0312SIngo Weinhold BDiskDeviceVisitor *fVisitor; 34f0bc0312SIngo Weinhold PartitionFilter *fFilter; 35f0bc0312SIngo Weinhold }; 36f0bc0312SIngo Weinhold 37f0bc0312SIngo Weinhold // IDFinderVisitor 38f0bc0312SIngo Weinhold class IDFinderVisitor : public BDiskDeviceVisitor { 39f0bc0312SIngo Weinhold public: 40bef8916eSIngo Weinhold IDFinderVisitor(partition_id id); 41f0bc0312SIngo Weinhold 42f0bc0312SIngo Weinhold virtual bool Visit(BDiskDevice *device); 43671a7455SIngo Weinhold virtual bool Visit(BPartition *partition, int32 level); 44f0bc0312SIngo Weinhold 45f0bc0312SIngo Weinhold private: 46bef8916eSIngo Weinhold partition_id fID; 47f0bc0312SIngo Weinhold }; 48f0bc0312SIngo Weinhold 49*419458bcSIngo Weinhold status_t get_unique_partition_mount_point(BPartition *partition, 50*419458bcSIngo Weinhold BPath *mountPoint); 51*419458bcSIngo Weinhold 52f0bc0312SIngo Weinhold } // namespace BPrivate 53f0bc0312SIngo Weinhold 54f0bc0312SIngo Weinhold using BPrivate::PartitionFilter; 55f0bc0312SIngo Weinhold using BPrivate::PartitionFilterVisitor; 56f0bc0312SIngo Weinhold using BPrivate::IDFinderVisitor; 57*419458bcSIngo Weinhold using BPrivate::get_unique_partition_mount_point; 58f0bc0312SIngo Weinhold 59f0bc0312SIngo Weinhold #endif // _DISK_DEVICE_PRIVATE_H 60