BVolume Class Reference

#include <Volume.h>

List of all members.


Detailed Description

The BVolume class lets you ask questions about specific "volumes," where a volume is any independent file system.

See also:
Using BVolume


Public Member Functions

 BVolume ()
 BVolume (dev_t dev)
 BVolume (const BVolume &vol)
virtual ~BVolume ()
status_t InitCheck () const
status_t SetTo (dev_t dev)
void Unset (void)
dev_t Device () const
status_t GetRootDirectory (BDirectory *dir) const
off_t Capacity () const
off_t FreeBytes () const
status_t GetName (char *name) const
status_t SetName (const char *name)
status_t GetIcon (BBitmap *icon, icon_size which) const
bool IsRemovable () const
bool IsReadOnly () const
bool IsPersistent () const
bool IsShared () const
bool KnowsMime () const
bool KnowsAttr () const
bool KnowsQuery () const
bool operator== (const BVolume &vol) const
bool operator!= (const BVolume &vol) const
BVolumeoperator= (const BVolume &vol)

Friends

class BVolumeRoster


Constructor & Destructor Documentation

BVolume  ) 
 

Creates a new BVolume object and initializes it according to the argument. The status of the initialization is recorded by the InitCheck() function.

The default constructor does nothing and sets InitCheck() to B_NO_INIT.

BVolume dev_t  dev  ) 
 

Creates a new BVolume object and initializes it according to the argument. The status of the initialization is recorded by the InitCheck() function.

The dev constructor sets the BVolume to point to the volume represented by the argument. See the SetTo() function for status codes.

Parameters:
dev dev_t structure

BVolume const BVolume vol  ) 
 

Creates a new BVolume object and initializes it according to the argument. The status of the initialization is recorded by the InitCheck() function.

The copy constructor sets the object to point to the same device as does the argument.

Parameters:
vol BVolume object

~BVolume  )  [virtual]
 

Destroys the BVolume object.


Member Function Documentation

off_t Capacity  )  const
 

Returns:
The volume's total storage capacity and the amount of storage that's currently unused. The measurement are in bytes.

dev_t Device  )  const
 

Returns:
The object's dev_t number.

off_t FreeBytes  )  const
 

Returns:
The volume's total storage capacity and the amount of storage that's currently unused. The measurement are in bytes.

status_t GetIcon BBitmap icon,
icon_size  which
const
 

Returns:
The volume's icon in icon. which specifies the icon to retrieve, either B_MINI_ICON (16x16) or B_LARGE_ICON (32x32).
See also:
get_device_icon()

status_t GetName char *  buf  )  const
 

Copies the name of the volume into buffer.

Parameters:
buf Buffer for volume name

status_t GetRootDirectory BDirectory dir  )  const
 

Initializes dir (which must be allocated) to refer to the volume's "root directory." The root directory stands at the "root" of the volume's file hierarchy.

Parameters:
dir BDirectory object
Note:
That this isn't necessarily the root of the entire file hierarchy.

status_t InitCheck  )  const
 

Returns:
The status of the last initialization (from either the constructor or SetTo()).

bool IsPersistent  )  const
 

This function answer media-related questions about the volume:

Returns:
Is the storage persistent (such as on a floppy or hard disk)?

bool IsReadOnly  )  const
 

This function answer media-related questions about the volume:

Returns:
Can it be read but not written to?

bool IsRemovable  )  const
 

This function answer media-related questions about the volume:

Returns:
Can the media be removed?

bool IsShared  )  const
 

This function answer media-related questions about the volume:

Returns:
Is it accessed through the network (as opposed to being directly connected to this computer)?

bool KnowsAttr  )  const
 

This function answer questions about the file system on the volume:

Returns:
Do its files accept attributes?

bool KnowsMime  )  const
 

This function answer questions about the file system on the volume:

Returns:
Does it use MIME to type files?

bool KnowsQuery  )  const
 

This function answer questions about the file system on the volume:

Returns:
Can it respond to queries?

bool operator!= const BVolume vol  )  const
 

Comparison Operator

The BVolume object are said to be not equal if they not refer to the same volume, or if they're both uninitialized.

Returns:
true, if not equal

false, if equal

BVolume & operator= const BVolume vol  ) 
 

Assignment operator

In the expression

BVolume a = b;

BVolume a is initialized to refer to the same volume as b. To gauge the success of the assignment, you should call InitCheck() immediately afterwards. Assigning a BVolume to itself is safe.

Assigning from an uninitialized BVolume is "successful": The assigned-to BVolume will also be uninitialized ( B_NO_INIT).

bool operator== const BVolume vol  )  const
 

Comparison Operator

The BVolume object are said to be equal if they refer to the same volume, or if they're both uninitialized.

Returns:
true, if equal

false, if not equal

status_t SetName const char *  name  ) 
 

status_t SetTo dev_t  dev  ) 
 

Initializes the BVolume object to represent the volume (device) identified by the argument.

Parameters:
dev dev_t structure

void Unset void   ) 
 

Uninitializes the BVolume.


Friends And Related Function Documentation

friend class BVolumeRoster [friend]
 


Copyright 2005 by yellowTAB GmbH, Be Inc., Palm Source Inc. and their respective legal successors
All rights reserved.