1 //---------------------------------------------------------------------- 2 // This software is part of the OpenBeOS distribution and is covered 3 // by the OpenBeOS license. 4 //--------------------------------------------------------------------- 5 /*! 6 \file EntryList.h 7 BEntryList interface declaration. 8 */ 9 10 #ifndef _ENTRY_LIST_H 11 #define _ENTRY_LIST_H 12 13 #include <dirent.h> 14 #include <SupportDefs.h> 15 16 #ifdef USE_OPENBEOS_NAMESPACE 17 namespace OpenBeOS { 18 #endif 19 20 // Forward declarations 21 class BEntry; 22 struct entry_ref; 23 24 //! Interface for iterating through a list of filesystem entries 25 /*! Defines a general interface for iterating through a list of entries (i.e. 26 files in a folder 27 28 @author <a href='mailto:tylerdauwalder@users.sf.net'>Tyler Dauwalder</a> 29 @author Be Inc. 30 @version 0.0.0 31 */ 32 class BEntryList { 33 public: 34 BEntryList(); 35 virtual ~BEntryList(); 36 37 virtual status_t GetNextEntry(BEntry *entry, bool traverse = false) = 0; 38 virtual status_t GetNextRef(entry_ref *ref) = 0; 39 virtual int32 GetNextDirents(struct dirent *buf, size_t length, 40 int32 count = INT_MAX) = 0; 41 virtual status_t Rewind() = 0; 42 virtual int32 CountEntries() = 0; 43 44 private: 45 virtual void _ReservedEntryList1(); 46 virtual void _ReservedEntryList2(); 47 virtual void _ReservedEntryList3(); 48 virtual void _ReservedEntryList4(); 49 virtual void _ReservedEntryList5(); 50 virtual void _ReservedEntryList6(); 51 virtual void _ReservedEntryList7(); 52 virtual void _ReservedEntryList8(); 53 54 }; 55 56 #ifdef USE_OPENBEOS_NAMESPACE 57 }; // namespace OpenBeOS 58 #endif 59 60 #endif // _ENTRY_LIST_H 61 62 63