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