06ba3f0acb
- B_GET_ICON_NAME: returns the name of an icon. This will then be read from a predefined location on disk (not yet implemented). This would also allow to add specifiers like "-boot", or "-fat|bfs|ntfs|...", and have special icons for those. - B_GET_VECTOR_ICON: retrieves the vector icon of a device, if any. * get_device_icon(BBitmap*, ...) now supports other color spaces than B_CMAP8. * Added get_device_icon(), BPartition::GetIcon(), and BVolume::GetIcon() variants that can also retrieve the icon data directly (like BNodeInfo::GetIcon()). * Reenabled the previous BPartition::GetIcon(), based on a patch by Justin O'Dell - this fixes #1391. * Tracker's MountMenu class now uses B_RGBA32 icons, instead of B_CMAP8. * Added vector icon to scsi_disk, and scsi_cd. The former doesn't have any special removable icon, though. * Header cleanup, added/updated license, whitespace cleanup. * Marked deprecated/obsolete driver ioctls in Drivers.h. * Removed OpenBeOS namespace in the headers I touched that still had them. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27001 a95241bf-73f2-0310-859d-f6bbb57e9c96
73 lines
1.6 KiB
C++
73 lines
1.6 KiB
C++
/*
|
|
* Copyright 2002-2008, Haiku Inc. All Rights Reserved.
|
|
* Distributed under the terms of the MIT License.
|
|
*/
|
|
#ifndef _VOLUME_H
|
|
#define _VOLUME_H
|
|
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <fs_info.h>
|
|
#include <Mime.h>
|
|
#include <StorageDefs.h>
|
|
#include <SupportDefs.h>
|
|
|
|
class BDirectory;
|
|
class BBitmap;
|
|
|
|
|
|
class BVolume {
|
|
public:
|
|
BVolume();
|
|
BVolume(dev_t device);
|
|
BVolume(const BVolume& volume);
|
|
virtual ~BVolume();
|
|
|
|
status_t InitCheck() const;
|
|
status_t SetTo(dev_t device);
|
|
void Unset();
|
|
|
|
dev_t Device() const;
|
|
|
|
status_t GetRootDirectory(BDirectory* directory) 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;
|
|
status_t GetIcon(uint8** _data, size_t* _size,
|
|
type_code* _type) 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& volume) const;
|
|
bool operator!=(const BVolume& volume) const;
|
|
BVolume& operator=(const BVolume& volume);
|
|
|
|
private:
|
|
virtual void _TurnUpTheVolume1();
|
|
virtual void _TurnUpTheVolume2();
|
|
virtual void _TurnUpTheVolume3();
|
|
virtual void _TurnUpTheVolume4();
|
|
virtual void _TurnUpTheVolume5();
|
|
virtual void _TurnUpTheVolume6();
|
|
virtual void _TurnUpTheVolume7();
|
|
virtual void _TurnUpTheVolume8();
|
|
|
|
dev_t fDevice;
|
|
status_t fCStatus;
|
|
int32 _reserved[8];
|
|
};
|
|
|
|
#endif // _VOLUME_H
|