1*1c29b26eSIngo Weinhold /* 2*1c29b26eSIngo Weinhold * Copyright 2013, Haiku, Inc. 3*1c29b26eSIngo Weinhold * Distributed under the terms of the MIT License. 4*1c29b26eSIngo Weinhold * 5*1c29b26eSIngo Weinhold * Authors: 6*1c29b26eSIngo Weinhold * Ingo Weinhold, ingo_weinhold@gmx.de 7*1c29b26eSIngo Weinhold */ 8*1c29b26eSIngo Weinhold #ifndef VIRTUAL_DIRECTORY_ENTRY_LIST_H 9*1c29b26eSIngo Weinhold #define VIRTUAL_DIRECTORY_ENTRY_LIST_H 10*1c29b26eSIngo Weinhold 11*1c29b26eSIngo Weinhold 12*1c29b26eSIngo Weinhold #include <StringList.h> 13*1c29b26eSIngo Weinhold 14*1c29b26eSIngo Weinhold #include <MergedDirectory.h> 15*1c29b26eSIngo Weinhold 16*1c29b26eSIngo Weinhold #include "EntryIterator.h" 17*1c29b26eSIngo Weinhold 18*1c29b26eSIngo Weinhold 19*1c29b26eSIngo Weinhold namespace BPrivate { 20*1c29b26eSIngo Weinhold 21*1c29b26eSIngo Weinhold 22*1c29b26eSIngo Weinhold class Model; 23*1c29b26eSIngo Weinhold 24*1c29b26eSIngo Weinhold 25*1c29b26eSIngo Weinhold class VirtualDirectoryEntryList : public EntryListBase { 26*1c29b26eSIngo Weinhold public: 27*1c29b26eSIngo Weinhold VirtualDirectoryEntryList(Model* model); 28*1c29b26eSIngo Weinhold VirtualDirectoryEntryList( 29*1c29b26eSIngo Weinhold const node_ref& definitionFileRef, 30*1c29b26eSIngo Weinhold const BStringList& directoryPaths); 31*1c29b26eSIngo Weinhold virtual ~VirtualDirectoryEntryList(); 32*1c29b26eSIngo Weinhold 33*1c29b26eSIngo Weinhold virtual status_t InitCheck() const; 34*1c29b26eSIngo Weinhold 35*1c29b26eSIngo Weinhold virtual status_t GetNextEntry(BEntry* entry, 36*1c29b26eSIngo Weinhold bool traverse = false); 37*1c29b26eSIngo Weinhold virtual status_t GetNextRef(entry_ref* ref); 38*1c29b26eSIngo Weinhold virtual int32 GetNextDirents(struct dirent* buffer, 39*1c29b26eSIngo Weinhold size_t length, int32 count = INT_MAX); 40*1c29b26eSIngo Weinhold 41*1c29b26eSIngo Weinhold virtual status_t Rewind(); 42*1c29b26eSIngo Weinhold virtual int32 CountEntries(); 43*1c29b26eSIngo Weinhold 44*1c29b26eSIngo Weinhold private: 45*1c29b26eSIngo Weinhold 46*1c29b26eSIngo Weinhold status_t _InitMergedDirectory( 47*1c29b26eSIngo Weinhold const BStringList& directoryPaths); 48*1c29b26eSIngo Weinhold private: 49*1c29b26eSIngo Weinhold node_ref fDefinitionFileRef; 50*1c29b26eSIngo Weinhold BMergedDirectory fMergedDirectory; 51*1c29b26eSIngo Weinhold }; 52*1c29b26eSIngo Weinhold 53*1c29b26eSIngo Weinhold 54*1c29b26eSIngo Weinhold } // namespace BPrivate 55*1c29b26eSIngo Weinhold 56*1c29b26eSIngo Weinhold 57*1c29b26eSIngo Weinhold #endif // VIRTUAL_DIRECTORY_ENTRY_LIST_H 58