#include <VolumeRoster.h>
GetNextVolume() function.StartWatching().)BVolumeRoster object depends on what you're going to do with it:BVolumeRoster on the stack is sufficient.must keep your BVolumeRoster object around. The watching stops when the object is deleted.BVolumeRoster object can perform both functions: You can use it to step through the volume list at the same time that it's watching volumes.
Public Member Functions | |
| BVolumeRoster () | |
| virtual | ~BVolumeRoster () |
| status_t | GetNextVolume (BVolume *vol) |
| void | Rewind () |
| status_t | GetBootVolume (BVolume *vol) |
| status_t | StartWatching (BMessenger msngr=be_app_messenger) |
| void | StopWatching (void) |
| BMessenger | Messenger (void) const |
|
|
Creates a new BVolumeRoster object. You don't have to "initialize" the object before using it (as you do with most other Storage Kit classes). You can call GetNextVolume() (or whatever) immediately after constructing. |
|
|
Destroys the object. If this BVolumeRoster object was watching volumes, the watch is called off. |
|
|
Initializes vol to refer to the "boot volume." This is the volume that was used to boot the computer. vol must be allocated before you pass it in. If the boot volume can't be found, the argument is uninitialized.
|
|
|
Retrieves the "next" volume from the volume list and uses it to initialize the argument (which must be allocated). When the function return
|
|
|
|
|
|
Rewinds the volume list such that the next GetNextVolume() will return the first element in the list. |
|
|
This function start the BVolumeRoster's volume-watching facility. (This is actually just a convenient cover for the Node Monitor.) StartWatching() registers a request for notifications of volume mounts and unmounts. The notifications are sent (as BMessages) to the BHandler/BLooper pair specified by the argument. There are separate messages for mounting and unmounting; their formats are described below. The caller retains possession of the BHandler/BLooper that the BMessenger represents. The volume watching continues until this BVolumeRoster object is destroyed, or until you call...
There are separate notifications (BMessages) for volume-mounted and volume- unmounted events. See the
|
|
|
These functions stop the BVolumeRoster's volume-watching facility. (This is actually just a convenient cover for the Node Monitor.) This function tells the volume-watcher to stop watching. In other words, notifications of volume mounts and unmounts are no longer sent to the BVolumeRoster's target. |