1 // ---------------------------------------------------------------------- 2 // This software is part of the OpenBeOS distribution and is covered 3 // by the OpenBeOS license. 4 // 5 // File Name: Directory.cpp 6 // 7 // Description: BVolume class 8 // ---------------------------------------------------------------------- 9 /*! 10 \file Volume.h 11 BVolume interface declarations. 12 */ 13 #ifndef _VOLUME_H 14 #define _VOLUME_H 15 16 #include <sys/types.h> 17 18 #include <fs_info.h> 19 #include <Mime.h> 20 #include <StorageDefs.h> 21 #include <SupportDefs.h> 22 23 #ifdef USE_OPENBEOS_NAMESPACE 24 namespace OpenBeOS { 25 #endif 26 27 class BDirectory; 28 class BBitmap; 29 30 class BVolume { 31 public: 32 BVolume(); 33 BVolume(dev_t dev); 34 BVolume(const BVolume &vol); 35 virtual ~BVolume(); 36 37 status_t InitCheck() const; 38 status_t SetTo(dev_t dev); 39 void Unset(); 40 41 dev_t Device() const; 42 43 status_t GetRootDirectory(BDirectory *directory) const; 44 45 off_t Capacity() const; 46 off_t FreeBytes() const; 47 48 status_t GetName(char *name) const; 49 status_t SetName(const char *name); 50 51 status_t GetIcon(BBitmap *icon, icon_size which) const; 52 53 bool IsRemovable() const; 54 bool IsReadOnly() const; 55 bool IsPersistent() const; 56 bool IsShared() const; 57 bool KnowsMime() const; 58 bool KnowsAttr() const; 59 bool KnowsQuery() const; 60 61 bool operator==(const BVolume &volume) const; 62 bool operator!=(const BVolume &volume) const; 63 BVolume &operator=(const BVolume &volume); 64 65 private: 66 // friend class BVolumeRoster; 67 68 virtual void _ReservedVolume1(); 69 virtual void _ReservedVolume2(); 70 virtual void _ReservedVolume3(); 71 virtual void _ReservedVolume4(); 72 virtual void _ReservedVolume5(); 73 virtual void _ReservedVolume6(); 74 virtual void _ReservedVolume7(); 75 virtual void _ReservedVolume8(); 76 77 dev_t fDevice; 78 status_t fCStatus; 79 int32 _reserved[8]; 80 }; 81 82 #ifdef USE_OPENBEOS_NAMESPACE 83 } // namespace OpenBeOS 84 #endif 85 86 #endif // _VOLUME_H 87