xref: /haiku/headers/os/storage/VolumeRoster.h (revision 25a7b01d15612846f332751841da3579db313082)
1f46308c9SAxel Dörfler /*
2f46308c9SAxel Dörfler  * Copyright 2002-2010, Haiku, Inc. All Rights Reserved.
3f46308c9SAxel Dörfler  * Distributed under the terms of the MIT License.
42807c366SIngo Weinhold  */
582b75665STyler Dauwalder #ifndef _VOLUME_ROSTER_H
682b75665STyler Dauwalder #define _VOLUME_ROSTER_H
75ebee1cfSTyler Dauwalder 
8f46308c9SAxel Dörfler 
92807c366SIngo Weinhold #include <Application.h>
105ebee1cfSTyler Dauwalder #include <SupportDefs.h>
115ebee1cfSTyler Dauwalder #include <Volume.h>
125ebee1cfSTyler Dauwalder 
135ebee1cfSTyler Dauwalder 
145ebee1cfSTyler Dauwalder class BVolume;
155ebee1cfSTyler Dauwalder class BMessenger;
165ebee1cfSTyler Dauwalder 
17f46308c9SAxel Dörfler 
185ebee1cfSTyler Dauwalder class BVolumeRoster {
195ebee1cfSTyler Dauwalder public:
202807c366SIngo Weinhold 								BVolumeRoster();
212807c366SIngo Weinhold 	virtual						~BVolumeRoster();
225ebee1cfSTyler Dauwalder 
232807c366SIngo Weinhold 			status_t			GetNextVolume(BVolume* volume);
242807c366SIngo Weinhold 			void				Rewind();
255ebee1cfSTyler Dauwalder 
262807c366SIngo Weinhold 			status_t			GetBootVolume(BVolume* volume);
275ebee1cfSTyler Dauwalder 
28f46308c9SAxel Dörfler 			status_t			StartWatching(
29f46308c9SAxel Dörfler 									BMessenger messenger = be_app_messenger);
302807c366SIngo Weinhold 			void				StopWatching();
312807c366SIngo Weinhold 			BMessenger			Messenger() const;
325ebee1cfSTyler Dauwalder 
335ebee1cfSTyler Dauwalder private:
347c44680aSIngo Weinhold 	virtual	void				_SeveredVRoster1();
357c44680aSIngo Weinhold 	virtual	void				_SeveredVRoster2();
365ebee1cfSTyler Dauwalder 
37f46308c9SAxel Dörfler private:
382807c366SIngo Weinhold 			int32				fCookie;
39*5dd07610SJohn Scipione 									// The iteration cookie for next_dev()
40*5dd07610SJohn Scipione 									// Initialized to 0
415ebee1cfSTyler Dauwalder 			BMessenger*			fTarget;
42*5dd07610SJohn Scipione 									// BMessenger referring to the target to
43*5dd07610SJohn Scipione 									// which the watching notification
44*5dd07610SJohn Scipione 									// messages are sent. The object is
45*5dd07610SJohn Scipione 									// allocated and owned by the roster,
46*5dd07610SJohn Scipione 									// or NULL if not watching.
475ebee1cfSTyler Dauwalder 			uint32				_reserved[3];
48*5dd07610SJohn Scipione 									// FBC
495ebee1cfSTyler Dauwalder };
505ebee1cfSTyler Dauwalder 
515ebee1cfSTyler Dauwalder 
5282b75665STyler Dauwalder #endif	// _VOLUME_ROSTER_H
53