2 * Copyright 2003-2011, Haiku, Inc. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
6 * Ingo Weinhold <bonefish@cs.tu-berlin.de>
8 * KFileSystem implements the KDiskSystem interface for file systems.
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
;
20 namespace DiskDevice
{
23 //! \brief Wrapper for the C interface of a filesystem add-on.
24 class KFileSystem
: public KDiskSystem
{
26 KFileSystem(const char* name
);
27 virtual ~KFileSystem();
29 virtual status_t
Init();
33 virtual float Identify(KPartition
* partition
, void** cookie
);
34 virtual status_t
Scan(KPartition
* partition
, void* cookie
);
35 virtual void FreeIdentifyCookie(KPartition
* partition
,
37 virtual void FreeContentCookie(KPartition
* partition
);
41 virtual status_t
Defragment(KPartition
* partition
,
43 virtual status_t
Repair(KPartition
* partition
, bool checkOnly
,
45 virtual status_t
Resize(KPartition
* partition
, off_t size
,
47 virtual status_t
Move(KPartition
* partition
, off_t offset
,
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
,
56 virtual status_t
Uninitialize(KPartition
* partition
,
60 virtual status_t
LoadModule();
61 virtual void UnloadModule();
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