#ifndef _KERNEL_DEVICE_PARTDRV_H
#define _KERNEL_DEVICE_PARTDRV_H

#include <libk/std.h>
#include <proc/proc.h>
#include <proc/reschedule.h>

struct device;

struct partdrv_init {
  struct device* super;
  size_t start_sector;
  size_t total_size;
};

struct partdrv {
  struct device* super;
  size_t start_sector;
  size_t total_size;
};

bool partdrv_init (struct device* device, void* arg);

void partdrv_fini (struct device* device);

int partdrv_read (struct device* device, struct proc* proc, struct reschedule_ctx* rctx, void* a1,
                  void* a2, void* a3, void* a4);

int partdrv_write (struct device* device, struct proc* proc, struct reschedule_ctx* rctx, void* a1,
                   void* a2, void* a3, void* a4);

int partdrv_get_device_type (struct device* device, struct proc* proc, struct reschedule_ctx* rctx,
                             void* a1, void* a2, void* a3, void* a4);

int partdrv_get_sector_size (struct device* device, struct proc* proc, struct reschedule_ctx* rctx,
                             void* a1, void* a2, void* a3, void* a4);

int partdrv_get_size (struct device* device, struct proc* proc, struct reschedule_ctx* rctx,
                      void* a1, void* a2, void* a3, void* a4);

#endif // _KERNEL_DEVICE_PARTDRV_H
