2020-02-21 00:18:40 +01:00
|
|
|
#ifndef VDISK_H_INCLUDED
|
|
|
|
#define VDISK_H_INCLUDED
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <inttypes.h>
|
|
|
|
#include "kolibri.h"
|
|
|
|
|
2020-03-07 23:09:36 +01:00
|
|
|
void *vdisk_init(const char *fname, unsigned cache_size);
|
2020-02-21 00:18:40 +01:00
|
|
|
|
|
|
|
__attribute__((__stdcall__))
|
|
|
|
void vdisk_close(void *userdata);
|
|
|
|
|
|
|
|
__attribute__((__stdcall__))
|
2020-03-07 23:09:36 +01:00
|
|
|
int vdisk_read(void *userdata, void *buffer, off_t startsector,
|
|
|
|
size_t *numsectors);
|
2020-02-21 00:18:40 +01:00
|
|
|
|
|
|
|
__attribute__((__stdcall__))
|
2020-03-07 23:09:36 +01:00
|
|
|
int vdisk_write(void *userdata, void *buffer, off_t startsector,
|
|
|
|
size_t *numsectors);
|
2020-02-21 00:18:40 +01:00
|
|
|
|
|
|
|
__attribute__((__stdcall__))
|
|
|
|
int vdisk_querymedia(void *userdata, diskmediainfo_t *minfo);
|
|
|
|
|
2020-02-21 03:21:09 +01:00
|
|
|
__attribute__((__stdcall__))
|
2020-03-07 23:09:36 +01:00
|
|
|
unsigned int vdisk_adjust_cache_size(void *userdata, unsigned suggested_size);
|
2020-02-21 03:21:09 +01:00
|
|
|
|
2020-02-21 00:18:40 +01:00
|
|
|
#endif // VDISK_H_INCLUDED
|