2010-04-13 13:48:02 +04:00
|
|
|
/*
|
|
|
|
* Copyright 2002-2010, Haiku, Inc. All Rights Reserved.
|
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*/
|
2002-08-12 11:24:02 +04:00
|
|
|
#ifndef _VOLUME_ROSTER_H
|
|
|
|
#define _VOLUME_ROSTER_H
|
2002-07-24 01:39:49 +04:00
|
|
|
|
2010-04-13 13:48:02 +04:00
|
|
|
|
2002-12-09 15:45:59 +03:00
|
|
|
#include <Application.h>
|
2002-07-24 01:39:49 +04:00
|
|
|
#include <SupportDefs.h>
|
|
|
|
#include <Volume.h>
|
|
|
|
|
|
|
|
|
|
|
|
class BVolume;
|
|
|
|
class BMessenger;
|
|
|
|
|
2010-04-13 13:48:02 +04:00
|
|
|
|
2002-07-24 01:39:49 +04:00
|
|
|
class BVolumeRoster {
|
2002-12-09 15:45:59 +03:00
|
|
|
public:
|
2010-04-13 13:48:02 +04:00
|
|
|
BVolumeRoster();
|
|
|
|
virtual ~BVolumeRoster();
|
2002-07-24 01:39:49 +04:00
|
|
|
|
2010-04-13 13:48:02 +04:00
|
|
|
status_t GetNextVolume(BVolume* volume);
|
|
|
|
void Rewind();
|
2002-07-24 01:39:49 +04:00
|
|
|
|
2010-04-13 13:48:02 +04:00
|
|
|
status_t GetBootVolume(BVolume* volume);
|
2002-07-24 01:39:49 +04:00
|
|
|
|
2010-04-13 13:48:02 +04:00
|
|
|
status_t StartWatching(
|
|
|
|
BMessenger messenger = be_app_messenger);
|
|
|
|
void StopWatching();
|
|
|
|
BMessenger Messenger() const;
|
|
|
|
|
|
|
|
private:
|
|
|
|
virtual void _SeveredVRoster1();
|
|
|
|
virtual void _SeveredVRoster2();
|
2002-07-24 01:39:49 +04:00
|
|
|
|
2002-12-09 15:45:59 +03:00
|
|
|
private:
|
2010-04-13 13:48:02 +04:00
|
|
|
int32 fCookie;
|
2013-02-23 03:11:14 +04:00
|
|
|
// The iteration cookie for next_dev()
|
|
|
|
// Initialized to 0
|
2010-04-13 13:48:02 +04:00
|
|
|
BMessenger* fTarget;
|
2013-02-23 03:11:14 +04:00
|
|
|
// BMessenger referring to the target to
|
|
|
|
// which the watching notification
|
|
|
|
// messages are sent. The object is
|
|
|
|
// allocated and owned by the roster,
|
|
|
|
// or NULL if not watching.
|
2010-04-13 13:48:02 +04:00
|
|
|
uint32 _reserved[3];
|
2013-02-23 03:11:14 +04:00
|
|
|
// FBC
|
2002-07-24 01:39:49 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2002-08-12 11:24:02 +04:00
|
|
|
#endif // _VOLUME_ROSTER_H
|