34 lines
641 B
C
34 lines
641 B
C
/*
|
|
* noisebox.h -- interfaces for noise provision.
|
|
*/
|
|
|
|
#include <fuse.h>
|
|
#include <stddef.h>
|
|
|
|
#ifndef NOISEBOX_H
|
|
#define NOISEBOX_H
|
|
|
|
typedef struct {
|
|
char *name;
|
|
uint64_t size;
|
|
} NoiseFile;
|
|
|
|
typedef struct {
|
|
char* name;
|
|
void *state;
|
|
|
|
int noisefile_count;
|
|
NoiseFile **files;
|
|
|
|
int (*get_noise)(size_t, off_t, char*, struct fuse_file_info *);
|
|
|
|
// int (*do_readdir)(const char *path, void *buffer, fuse_fill_dir_t filler,
|
|
// off_t offset, struct fuse_file_info *fi);
|
|
int (*do_open)(const char *, struct fuse_file_info *);
|
|
} Noiser;
|
|
|
|
Noiser* zero_init(void);
|
|
Noiser* mersenne_init(void);
|
|
|
|
#endif
|