summaryrefslogtreecommitdiff
path: root/src/cache/handle.h
blob: d42cd5a8ea817acf407695bbf84ffba99334720e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#pragma once

#include <al/types.h>
#include <nnwt/thread.h>

#include "wait.h"

struct cch_entry;
struct cch_handle {
    struct cch_entry *entry;
    off_t pointer;
    struct cch_wait wait;
};

s32 cch_handle_read(struct cch_handle *handle, u8 *buf, s32 count);
s32 cch_handle_write(struct cch_handle *handle, const u8 *buf, s32 count);
off_t cch_handle_seek(struct cch_handle *handle, off_t offset, s32 whence);
bool cch_handle_can_seek(struct cch_handle *handle);
void cch_handle_disable(struct cch_handle *handle);
void cch_handle_enable(struct cch_handle *handle);