Restore the "GPL licensing not permitted" in GLUT license headers.
[haiku.git] / headers / os / storage / Volume.h
blob1d53f7bfbbbdccdb94f25d90b788c3559359b032
1 /*
2 * Copyright 2002-2009, Haiku Inc. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
4 */
5 #ifndef _VOLUME_H
6 #define _VOLUME_H
9 #include <sys/types.h>
11 #include <fs_info.h>
12 #include <Mime.h>
13 #include <StorageDefs.h>
14 #include <SupportDefs.h>
17 class BDirectory;
18 class BBitmap;
21 class BVolume {
22 public:
23 BVolume();
24 BVolume(dev_t device);
25 BVolume(const BVolume& volume);
26 virtual ~BVolume();
28 status_t InitCheck() const;
29 status_t SetTo(dev_t device);
30 void Unset();
32 dev_t Device() const;
34 status_t GetRootDirectory(BDirectory* directory) const;
36 off_t Capacity() const;
37 off_t FreeBytes() const;
38 off_t BlockSize() const;
40 status_t GetName(char* name) const;
41 status_t SetName(const char* name);
43 status_t GetIcon(BBitmap* icon, icon_size which) const;
44 status_t GetIcon(uint8** _data, size_t* _size,
45 type_code* _type) const;
47 bool IsRemovable() const;
48 bool IsReadOnly() const;
49 bool IsPersistent() const;
50 bool IsShared() const;
51 bool KnowsMime() const;
52 bool KnowsAttr() const;
53 bool KnowsQuery() const;
55 bool operator==(const BVolume& volume) const;
56 bool operator!=(const BVolume& volume) const;
57 BVolume& operator=(const BVolume& volume);
59 private:
60 virtual void _TurnUpTheVolume1();
61 virtual void _TurnUpTheVolume2();
62 virtual void _TurnUpTheVolume3();
63 virtual void _TurnUpTheVolume4();
64 virtual void _TurnUpTheVolume5();
65 virtual void _TurnUpTheVolume6();
66 virtual void _TurnUpTheVolume7();
67 virtual void _TurnUpTheVolume8();
69 dev_t fDevice;
70 // The device ID of the volume.
71 status_t fCStatus;
72 // The initialization status of the object.
73 int32 _reserved[8];
74 // FBC
78 #endif // _VOLUME_H