2007-07-27 20:32:47 +04:00
|
|
|
/*
|
2011-06-13 05:53:11 +04:00
|
|
|
* Copyright 2003-2011, Haiku, Inc. All Rights Reserved.
|
2007-07-27 20:32:47 +04:00
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*
|
|
|
|
* Authors:
|
|
|
|
* Ingo Weinhold <bonefish@cs.tu-berlin.de>
|
|
|
|
*
|
|
|
|
* KFileSystem implements the KDiskSystem interface for file systems.
|
|
|
|
*/
|
2003-06-10 03:04:54 +04:00
|
|
|
#ifndef _K_FILE_DISK_DEVICE_SYSTEM_H
|
|
|
|
#define _K_FILE_DISK_DEVICE_SYSTEM_H
|
|
|
|
|
|
|
|
#include "KDiskSystem.h"
|
|
|
|
|
2007-11-05 03:42:47 +03:00
|
|
|
|
2005-05-23 21:15:56 +04:00
|
|
|
struct file_system_module_info;
|
2003-06-23 03:03:58 +04:00
|
|
|
|
2007-11-05 03:42:47 +03:00
|
|
|
|
2003-06-10 03:04:54 +04:00
|
|
|
namespace BPrivate {
|
|
|
|
namespace DiskDevice {
|
|
|
|
|
2007-11-05 03:42:47 +03:00
|
|
|
|
2007-07-27 20:32:47 +04:00
|
|
|
//! \brief Wrapper for the C interface of a filesystem add-on.
|
2003-06-11 02:36:53 +04:00
|
|
|
class KFileSystem : public KDiskSystem {
|
|
|
|
public:
|
2007-11-05 03:42:47 +03:00
|
|
|
KFileSystem(const char* name);
|
|
|
|
virtual ~KFileSystem();
|
2003-06-10 03:04:54 +04:00
|
|
|
|
2007-11-05 03:42:47 +03:00
|
|
|
virtual status_t Init();
|
2003-06-23 03:03:58 +04:00
|
|
|
|
2003-06-10 03:04:54 +04:00
|
|
|
// Scanning
|
|
|
|
|
2007-11-05 03:42:47 +03:00
|
|
|
virtual float Identify(KPartition* partition, void** cookie);
|
|
|
|
virtual status_t Scan(KPartition* partition, void* cookie);
|
|
|
|
virtual void FreeIdentifyCookie(KPartition* partition,
|
|
|
|
void* cookie);
|
|
|
|
virtual void FreeContentCookie(KPartition* partition);
|
2003-06-10 03:04:54 +04:00
|
|
|
|
|
|
|
// Writing
|
|
|
|
|
2007-11-05 03:42:47 +03:00
|
|
|
virtual status_t Defragment(KPartition* partition,
|
|
|
|
disk_job_id job);
|
|
|
|
virtual status_t Repair(KPartition* partition, bool checkOnly,
|
|
|
|
disk_job_id job);
|
|
|
|
virtual status_t Resize(KPartition* partition, off_t size,
|
|
|
|
disk_job_id job);
|
|
|
|
virtual status_t Move(KPartition* partition, off_t offset,
|
|
|
|
disk_job_id job);
|
|
|
|
virtual status_t SetContentName(KPartition* partition,
|
|
|
|
const char* name, disk_job_id job);
|
|
|
|
virtual status_t SetContentParameters(KPartition* partition,
|
|
|
|
const char* parameters, disk_job_id job);
|
|
|
|
virtual status_t Initialize(KPartition* partition,
|
|
|
|
const char* name, const char* parameters,
|
|
|
|
disk_job_id job);
|
2011-06-13 05:53:11 +04:00
|
|
|
virtual status_t Uninitialize(KPartition* partition,
|
|
|
|
disk_job_id job);
|
2003-06-10 03:04:54 +04:00
|
|
|
|
2003-06-11 02:36:53 +04:00
|
|
|
protected:
|
2007-11-05 03:42:47 +03:00
|
|
|
virtual status_t LoadModule();
|
|
|
|
virtual void UnloadModule();
|
2003-06-23 03:03:58 +04:00
|
|
|
|
|
|
|
private:
|
2007-11-05 03:42:47 +03:00
|
|
|
file_system_module_info* fModule;
|
2003-06-10 03:04:54 +04:00
|
|
|
};
|
|
|
|
|
2007-11-05 03:42:47 +03:00
|
|
|
|
2003-06-10 03:04:54 +04:00
|
|
|
} // namespace DiskDevice
|
|
|
|
} // namespace BPrivate
|
|
|
|
|
|
|
|
using BPrivate::DiskDevice::KFileSystem;
|
|
|
|
|
|
|
|
#endif // _K_FILE_DISK_DEVICE_SYSTEM_H
|