xref: /haiku/headers/os/storage/VolumeRoster.h (revision 83b1a68c52ba3e0e8796282759f694b7fdddf06d)
1 /*
2  * Copyright 2002-2010, Haiku, Inc. All Rights Reserved.
3  * Distributed under the terms of the MIT License.
4  */
5 #ifndef _VOLUME_ROSTER_H
6 #define _VOLUME_ROSTER_H
7 
8 
9 #include <Application.h>
10 #include <SupportDefs.h>
11 #include <Volume.h>
12 
13 
14 class BVolume;
15 class BMessenger;
16 
17 
18 class BVolumeRoster {
19 public:
20 								BVolumeRoster();
21 	virtual						~BVolumeRoster();
22 
23 			status_t			GetNextVolume(BVolume* volume);
24 			void				Rewind();
25 
26 			status_t			GetBootVolume(BVolume* volume);
27 
28 			status_t			StartWatching(
29 									BMessenger messenger = be_app_messenger);
30 			void				StopWatching();
31 			BMessenger			Messenger() const;
32 
33 private:
34 	virtual	void				_SeveredVRoster1();
35 	virtual	void				_SeveredVRoster2();
36 
37 private:
38 			int32				fCookie;
39 									// The iteration cookie for next_dev()
40 									// Initialized to 0
41 			BMessenger*			fTarget;
42 									// BMessenger referring to the target to
43 									// which the watching notification
44 									// messages are sent. The object is
45 									// allocated and owned by the roster,
46 									// or NULL if not watching.
47 			uint32				_reserved[3];
48 									// FBC
49 };
50 
51 
52 #endif	// _VOLUME_ROSTER_H
53