haiku/headers/os/storage/Volume.h
Stephan Aßmus d0f1a68746 Added method BlockSize() to get the block size of the underlying file system.
Untested but with good chances to actually work.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34106 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-18 09:47:42 +00:00

74 lines
1.6 KiB
C++

/*
* Copyright 2002-2009, 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;
off_t BlockSize() 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