2 * Copyright 2010, Haiku Inc. All rights reserved.
3 * This file may be used under the terms of the MIT License.
6 * Janito V. Ferreira Filho
8 #ifndef HTREE_ENTRY_ITERATOR_H
9 #define HTREE_ENTRY_ITERATOR_H
12 #include <AutoDeleter.h>
14 #include "DirectoryIterator.h"
20 class HTreeEntryIterator
{
22 HTreeEntryIterator(off_t offset
,
24 ~HTreeEntryIterator();
28 status_t
Lookup(uint32 hash
, int indirections
,
29 DirectoryIterator
** iterator
,
31 bool HasCollision() { return fHasCollision
; }
33 status_t
GetNext(uint32
& offset
);
35 uint32
BlocksNeededForNewEntry();
36 status_t
InsertEntry(Transaction
& transaction
,
37 uint32 hash
, off_t block
,
38 off_t newBlocksPos
, bool hasCollision
);
40 HTreeEntryIterator(uint32 block
,
41 uint32 blockSize
, Inode
* directory
,
42 HTreeEntryIterator
* parent
,
51 uint16 fLimit
, fCount
;
58 HTreeEntryIterator
* fParent
;
59 HTreeEntryIterator
* fChild
;
62 #endif // HTREE_ENTRY_ITERATOR_H