1c70623faSIngo Weinhold /* 2c70623faSIngo Weinhold * Copyright 2007, Ingo Weinhold, ingo_weinhold@gmx.de. 3c70623faSIngo Weinhold * Distributed under the terms of the MIT License. 4c70623faSIngo Weinhold */ 5c70623faSIngo Weinhold #ifndef _PARTITION_REFERENCE_H 6c70623faSIngo Weinhold #define _PARTITION_REFERENCE_H 7c70623faSIngo Weinhold 8c70623faSIngo Weinhold #include <DiskDeviceDefs.h> 9c70623faSIngo Weinhold 10c70623faSIngo Weinhold #include <Referenceable.h> 11c70623faSIngo Weinhold 12c70623faSIngo Weinhold 13c70623faSIngo Weinhold namespace BPrivate { 14c70623faSIngo Weinhold 15c70623faSIngo Weinhold 16c70623faSIngo Weinhold class PartitionReference : public Referenceable { 17c70623faSIngo Weinhold public: 18c70623faSIngo Weinhold PartitionReference(partition_id id = -1, 19*300868ceSIngo Weinhold int32 changeCounter = 0); 20c70623faSIngo Weinhold ~PartitionReference(); 21c70623faSIngo Weinhold 22*300868ceSIngo Weinhold void SetTo(partition_id id, int32 changeCounter); 23*300868ceSIngo Weinhold 24c70623faSIngo Weinhold partition_id PartitionID() const; 25c70623faSIngo Weinhold void SetPartitionID(partition_id id); 26c70623faSIngo Weinhold 27*300868ceSIngo Weinhold int32 ChangeCounter() const; 28*300868ceSIngo Weinhold void SetChangeCounter(int32 counter); 29c70623faSIngo Weinhold 30c70623faSIngo Weinhold private: 31c70623faSIngo Weinhold partition_id fID; 32*300868ceSIngo Weinhold int32 fChangeCounter; 33c70623faSIngo Weinhold }; 34c70623faSIngo Weinhold 35c70623faSIngo Weinhold 36c70623faSIngo Weinhold } // namespace BPrivate 37c70623faSIngo Weinhold 38c70623faSIngo Weinhold using BPrivate::PartitionReference; 39c70623faSIngo Weinhold 40c70623faSIngo Weinhold #endif // _PARTITION_REFERENCE_H 41