2 * Copyright 2010, Axel Dörfler, axeld@pinc-software.de.
3 * This file may be used under the terms of the MIT License.
15 class BQueryFile
: public BEntryList
{
17 BQueryFile(const entry_ref
& ref
);
18 BQueryFile(const BEntry
& entry
);
19 BQueryFile(const char* path
);
20 BQueryFile(BQuery
& query
);
21 virtual ~BQueryFile();
23 status_t
InitCheck() const;
25 status_t
SetTo(const entry_ref
& ref
);
26 status_t
SetTo(const BEntry
& entry
);
27 status_t
SetTo(const char* path
);
28 status_t
SetTo(BQuery
& query
);
31 status_t
SetPredicate(const char* predicate
);
32 status_t
AddVolume(const BVolume
& volume
);
33 status_t
AddVolume(dev_t device
);
35 const char* Predicate() const;
36 int32
CountVolumes() const;
37 dev_t
VolumeAt(int32 index
) const;
39 status_t
WriteTo(const entry_ref
& ref
);
40 status_t
WriteTo(const char* path
);
42 // BEntryList implementation
44 virtual status_t
GetNextEntry(BEntry
* entry
,
45 bool traverse
= false);
46 virtual status_t
GetNextRef(entry_ref
* ref
);
47 virtual int32
GetNextDirents(struct dirent
* buffer
,
48 size_t length
, int32 count
= INT_MAX
);
49 virtual status_t
Rewind();
50 virtual int32
CountEntries();
52 static const char* MimeType();
55 status_t
_SetQuery(int32 index
);
62 int32 fCurrentVolumeIndex
;
66 #endif // _QUERY_FILE_H