2003-06-10 03:04:54 +04:00
|
|
|
// KFileSystem.h
|
|
|
|
//
|
|
|
|
// KFileSystem implements the KDiskSystem interface for file systems.
|
|
|
|
// It works with the FS API.
|
|
|
|
|
|
|
|
#ifndef _K_FILE_DISK_DEVICE_SYSTEM_H
|
|
|
|
#define _K_FILE_DISK_DEVICE_SYSTEM_H
|
|
|
|
|
|
|
|
#include "KDiskSystem.h"
|
|
|
|
|
2003-06-23 03:03:58 +04:00
|
|
|
struct fs_module_info;
|
|
|
|
|
2003-06-10 03:04:54 +04:00
|
|
|
namespace BPrivate {
|
|
|
|
namespace DiskDevice {
|
|
|
|
|
2003-06-11 02:36:53 +04:00
|
|
|
class KFileSystem : public KDiskSystem {
|
|
|
|
public:
|
2003-06-10 03:04:54 +04:00
|
|
|
KFileSystem(const char *name);
|
|
|
|
virtual ~KFileSystem();
|
|
|
|
|
2003-06-23 03:03:58 +04:00
|
|
|
virtual status_t Init();
|
|
|
|
|
2003-06-10 03:04:54 +04:00
|
|
|
// Scanning
|
|
|
|
|
|
|
|
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);
|
|
|
|
|
|
|
|
// Querying
|
|
|
|
|
|
|
|
virtual bool SupportsDefragmenting(KPartition *partition,
|
|
|
|
bool *whileMounted);
|
|
|
|
virtual bool SupportsRepairing(KPartition *partition, bool checkOnly,
|
|
|
|
bool *whileMounted);
|
|
|
|
virtual bool SupportsResizing(KPartition *partition, bool *whileMounted);
|
2003-07-20 00:29:58 +04:00
|
|
|
virtual bool SupportsMoving(KPartition *partition, bool *isNoOp);
|
2003-07-16 01:41:32 +04:00
|
|
|
virtual bool SupportsSettingContentName(KPartition *partition,
|
|
|
|
bool *whileMounted);
|
2003-07-20 00:29:58 +04:00
|
|
|
virtual bool SupportsSettingContentParameters(KPartition *partition,
|
|
|
|
bool *whileMounted);
|
2003-07-16 01:41:32 +04:00
|
|
|
virtual bool SupportsInitializing(KPartition *partition);
|
2003-06-10 03:04:54 +04:00
|
|
|
|
|
|
|
virtual bool ValidateResize(KPartition *partition, off_t *size);
|
|
|
|
virtual bool ValidateMove(KPartition *partition, off_t *start);
|
2003-07-16 01:41:32 +04:00
|
|
|
virtual bool ValidateSetContentName(KPartition *partition, char *name);
|
2003-07-20 21:15:35 +04:00
|
|
|
virtual bool ValidateSetContentParameters(KPartition *partition,
|
2003-06-10 03:04:54 +04:00
|
|
|
const char *parameters);
|
2003-07-20 00:29:58 +04:00
|
|
|
virtual bool ValidateInitialize(KPartition *partition, char *name,
|
|
|
|
const char *parameters);
|
2003-06-10 03:04:54 +04:00
|
|
|
|
2003-07-25 02:53:23 +04:00
|
|
|
// Shadow partition modification
|
|
|
|
|
|
|
|
virtual status_t ShadowPartitionChanged(KPartition *partition,
|
|
|
|
uint32 operation);
|
|
|
|
|
2003-06-10 03:04:54 +04:00
|
|
|
// Writing
|
|
|
|
|
|
|
|
virtual status_t Defragment(KPartition *partition, KDiskDeviceJob *job);
|
|
|
|
virtual status_t Repair(KPartition *partition, bool checkOnly,
|
|
|
|
KDiskDeviceJob *job);
|
|
|
|
virtual status_t Resize(KPartition *partition, off_t size,
|
|
|
|
KDiskDeviceJob *job);
|
|
|
|
virtual status_t Move(KPartition *partition, off_t offset,
|
|
|
|
KDiskDeviceJob *job);
|
2003-07-16 01:41:32 +04:00
|
|
|
virtual status_t SetContentName(KPartition *partition, char *name,
|
|
|
|
KDiskDeviceJob *job);
|
2003-06-10 03:04:54 +04:00
|
|
|
virtual status_t SetContentParameters(KPartition *partition,
|
|
|
|
const char *parameters,
|
|
|
|
KDiskDeviceJob *job);
|
2003-07-20 00:29:58 +04:00
|
|
|
virtual status_t Initialize(KPartition *partition, const char *name,
|
|
|
|
const char *parameters, KDiskDeviceJob *job);
|
2003-06-10 03:04:54 +04:00
|
|
|
|
2003-06-11 02:36:53 +04:00
|
|
|
protected:
|
|
|
|
virtual status_t LoadModule();
|
|
|
|
virtual void UnloadModule();
|
2003-06-23 03:03:58 +04:00
|
|
|
|
|
|
|
private:
|
|
|
|
fs_module_info *fModule;
|
2003-06-10 03:04:54 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace DiskDevice
|
|
|
|
} // namespace BPrivate
|
|
|
|
|
|
|
|
using BPrivate::DiskDevice::KFileSystem;
|
|
|
|
|
|
|
|
#endif // _K_FILE_DISK_DEVICE_SYSTEM_H
|