#ifndef _KERNEL_DEVICE_RAMDRV_H
#define _KERNEL_DEVICE_RAMDRV_H

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

struct device;

struct ramdrv_init {
  size_t total_size;
  size_t sector_size;
  uint8_t* buffer;
};

struct ramdrv {
  size_t total_size;
  size_t sector_size;
  uint8_t* buffer;
};

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

void ramdrv_fini (struct device* device);

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

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

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

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

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

#endif // _KERNEL_DEVICE_RAMDRV_H
