xref: /haiku/src/kits/storage/disk_device/PartitionReference.h (revision c3e066cf6d35a86d29396d4e740f9811e506b66c)
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 
16*c3e066cfSIngo Weinhold class PartitionReference : public BReferenceable {
17c70623faSIngo Weinhold public:
18c70623faSIngo Weinhold 								PartitionReference(partition_id id = -1,
19300868ceSIngo Weinhold 									int32 changeCounter = 0);
20c70623faSIngo Weinhold 								~PartitionReference();
21c70623faSIngo Weinhold 
22300868ceSIngo Weinhold 			void				SetTo(partition_id id, int32 changeCounter);
23300868ceSIngo Weinhold 
24c70623faSIngo Weinhold 			partition_id		PartitionID() const;
25c70623faSIngo Weinhold 			void				SetPartitionID(partition_id id);
26c70623faSIngo Weinhold 
27300868ceSIngo Weinhold 			int32				ChangeCounter() const;
28300868ceSIngo Weinhold 			void				SetChangeCounter(int32 counter);
29c70623faSIngo Weinhold 
30c70623faSIngo Weinhold private:
31c70623faSIngo Weinhold 			partition_id		fID;
32300868ceSIngo 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