btrfs: [] on the end of a struct field is a variable length array.
[haiku.git] / headers / private / kernel / disk_device_manager / KFileSystem.h
blob409cd9c4a0799842f4c11313ececbacaf593ca65
1 /*
2 * Copyright 2003-2011, Haiku, Inc. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
5 * Authors:
6 * Ingo Weinhold <bonefish@cs.tu-berlin.de>
8 * KFileSystem implements the KDiskSystem interface for file systems.
9 */
10 #ifndef _K_FILE_DISK_DEVICE_SYSTEM_H
11 #define _K_FILE_DISK_DEVICE_SYSTEM_H
13 #include "KDiskSystem.h"
16 struct file_system_module_info;
19 namespace BPrivate {
20 namespace DiskDevice {
23 //! \brief Wrapper for the C interface of a filesystem add-on.
24 class KFileSystem : public KDiskSystem {
25 public:
26 KFileSystem(const char* name);
27 virtual ~KFileSystem();
29 virtual status_t Init();
31 // Scanning
33 virtual float Identify(KPartition* partition, void** cookie);
34 virtual status_t Scan(KPartition* partition, void* cookie);
35 virtual void FreeIdentifyCookie(KPartition* partition,
36 void* cookie);
37 virtual void FreeContentCookie(KPartition* partition);
39 // Writing
41 virtual status_t Defragment(KPartition* partition,
42 disk_job_id job);
43 virtual status_t Repair(KPartition* partition, bool checkOnly,
44 disk_job_id job);
45 virtual status_t Resize(KPartition* partition, off_t size,
46 disk_job_id job);
47 virtual status_t Move(KPartition* partition, off_t offset,
48 disk_job_id job);
49 virtual status_t SetContentName(KPartition* partition,
50 const char* name, disk_job_id job);
51 virtual status_t SetContentParameters(KPartition* partition,
52 const char* parameters, disk_job_id job);
53 virtual status_t Initialize(KPartition* partition,
54 const char* name, const char* parameters,
55 disk_job_id job);
56 virtual status_t Uninitialize(KPartition* partition,
57 disk_job_id job);
59 protected:
60 virtual status_t LoadModule();
61 virtual void UnloadModule();
63 private:
64 file_system_module_info* fModule;
68 } // namespace DiskDevice
69 } // namespace BPrivate
71 using BPrivate::DiskDevice::KFileSystem;
73 #endif // _K_FILE_DISK_DEVICE_SYSTEM_H