created the skeletal cache.c
This commit is contained in:
parent
1b0a01aa30
commit
90eccb6049
2
Makefile
2
Makefile
|
@ -2,7 +2,7 @@ VERSION=1.0.4
|
|||
|
||||
CFLAGS+= -g -O2 -Wall -Wextra -D_FILE_OFFSET_BITS=64 -DVERSION=\"$(VERSION)\" `pkg-config --cflags-only-I gumbo libcurl fuse`
|
||||
LDFLAGS+= -lgumbo -lcurl -lfuse -lcrypto `pkg-config --libs-only-L gumbo libcurl fuse`
|
||||
COBJS = main.o network.o fuse_local.o link.o
|
||||
COBJS = main.o network.o fuse_local.o link.o cache.o
|
||||
|
||||
prefix ?= /usr/local
|
||||
|
||||
|
|
42
src/cache.c
42
src/cache.c
|
@ -1 +1,43 @@
|
|||
#include "cache.h"
|
||||
|
||||
off_t Cache_read(const char *filepath, off_t offset, size_t size)
|
||||
{
|
||||
}
|
||||
|
||||
size_t Cache_write(const char *filepath, off_t offset, size_t size,
|
||||
const uint8_t *content)
|
||||
{
|
||||
}
|
||||
|
||||
int Cache_create(const char *filepath, size_t size)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Cache *Cache_open(const char *filepath)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
int Meta_write(Cache *cf)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
int Meta_read(Cache *cf)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
size_t Data_read(Cache *cf, off_t offset, size_t size)
|
||||
{
|
||||
}
|
||||
|
||||
size_t Data_write(Cache *cf, off_t offset, size_t size,
|
||||
const uint8_t *content)
|
||||
{
|
||||
}
|
||||
|
||||
int Data_create(Cache *cf, size_t size)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -38,13 +38,8 @@ typedef struct {
|
|||
|
||||
/**
|
||||
* \brief read from a cache file
|
||||
* \details This is the God function which does everything, it is probably an
|
||||
* anti-pattern. This function does the following:
|
||||
* - Try and open the cache file
|
||||
* - If the cache file does not exist,
|
||||
* -
|
||||
*/
|
||||
size_t Cache_read(const char *filepath, off_t offset, size_t size);
|
||||
off_t Cache_read(const char *filepath, off_t offset, size_t size);
|
||||
|
||||
/**
|
||||
* \brief write to a cache file
|
||||
|
|
Loading…
Reference in New Issue