1 /* 2 * Copyright 2001-2010, Haiku Inc. All rights reserved. 3 * This file may be used under the terms of the MIT License. 4 * 5 * Authors: 6 * Janito V. Ferreira Filho 7 */ 8 #ifndef REVOKEMANAGER_H 9 #define REVOKEMANAGER_H 10 11 #include "Journal.h" 12 13 14 struct JournalRevokeHeader; 15 16 class RevokeManager { 17 public: 18 RevokeManager(bool has64bits); 19 virtual ~RevokeManager() = 0; 20 21 virtual status_t Insert(uint32 block, uint32 commitID) = 0; 22 virtual status_t Remove(uint32 block) = 0; 23 virtual bool Lookup(uint32 block, uint32 commitID) = 0; 24 25 uint32 NumRevokes() { return fRevokeCount; } 26 27 status_t ScanRevokeBlock(JournalRevokeHeader* revokeBlock, 28 uint32 commitID); 29 30 protected: 31 uint32 fRevokeCount; 32 bool fHas64bits; 33 }; 34 35 #endif // REVOKEMANAGER_H 36 37