btrfs: [] on the end of a struct field is a variable length array.
[haiku.git] / src / add-ons / kernel / file_systems / bindfs / Volume.h
blob6d06e24baa4bb451ce784c4dd3bcf87a5e353055
1 /*
2 * Copyright 2011, Oliver Tappe <zooey@hirschkaefer.de>
3 * Distributed under the terms of the MIT License.
4 */
5 #ifndef VOLUME_H
6 #define VOLUME_H
9 #include <fs_interface.h>
12 class Node;
13 struct vnode;
16 class Volume {
17 public:
18 Volume(fs_volume* fsVolume);
19 ~Volume();
21 fs_volume* FSVolume() const { return fFSVolume; }
22 dev_t ID() const { return fFSVolume->id; }
24 fs_volume* SourceFSVolume() const
25 { return fSourceFSVolume; }
27 Node* RootNode() const { return fRootNode; }
28 const char* Name() const { return fName; }
30 status_t Mount(const char* parameterString);
31 void Unmount();
33 const fs_vnode_ops* VnodeOps() const { return &fVnodeOps; }
35 private:
36 struct VolumeListener;
37 friend struct VolumeListener;
39 private:
40 status_t _InitVnodeOpsFrom(fs_vnode* sourceNode);
42 private:
43 fs_volume* fFSVolume;
44 fs_volume* fSourceFSVolume;
45 vnode* fSourceVnode;
46 Node* fRootNode;
48 fs_vnode_ops fVnodeOps;
50 char fName[B_PATH_NAME_LENGTH];
54 #endif // VOLUME_H