fs-api-private.h revision 140afad728d78c56fb4c0256f94eb81a213688db
#ifndef FS_API_PRIVATE_H
#define FS_API_PRIVATE_H
#include "fs-api.h"
#include "module-context.h"
struct fs_api_module_register {
unsigned int id;
};
union fs_api_module_context {
struct fs_api_module_register *reg;
};
extern struct fs_api_module_register fs_api_module_register;
struct fs_vfuncs {
const struct fs_settings *set);
enum fs_open_mode mode,
enum fs_open_flags flags);
void *context);
const char *value);
enum fs_iter_flags flags);
};
struct fs {
const char *name;
struct fs_vfuncs v;
char *temp_path_prefix;
int refcount;
char *username, *session_id;
struct fs_settings set;
/* may be used by fs_wait_async() to do the waiting */
unsigned int files_open_count;
};
struct fs_file {
/* linked list of all files */
char *path;
enum fs_open_flags flags;
struct istream *seekable_input;
struct istream *pending_read_input;
const struct hash_method *write_digest_method;
void *write_digest;
struct istream *copy_input;
struct ostream *copy_output;
unsigned int write_pending:1;
unsigned int metadata_changed:1;
unsigned int read_or_prefetch_counted:1;
unsigned int lookup_metadata_counted:1;
unsigned int stat_counted:1;
};
struct fs_lock {
};
struct fs_iter {
/* linked list of all iters */
enum fs_iter_flags flags;
struct timeval start_time;
bool async_have_more;
void *async_context;
};
extern const struct fs fs_class_dict;
extern const struct fs fs_class_posix;
extern const struct fs fs_class_randomfail;
extern const struct fs fs_class_metawrap;
extern const struct fs fs_class_sis;
extern const struct fs fs_class_sis_queue;
extern const struct fs fs_class_test;
#endif