12 void *(*open)(const char *fname, void *udata);
13 void (*close)(void *fp, void *udata);
14 long (*seek)(void *fp, long offs, int whence, void *udata);
15 long (*read)(void *fp, void *buf, long size, void *udata);
18 /* options (ass_set_option/ass_get_option) */
20 ASS_OPEN_FALLTHROUGH /* try all matching handlers if the first fails to open the file */
27 void ass_set_option(int opt, int val);
28 int ass_get_option(int opt);
30 /* add a handler for a specific path prefixes. 0 matches every path */
31 int ass_add_path(const char *prefix, const char *path);
32 int ass_add_archive(const char *prefix, const char *arfile);
33 int ass_add_url(const char *prefix, const char *url);
34 int ass_add_user(const char *prefix, struct ass_fileops *cb);
37 ass_file *ass_fopen(const char *fname, const char *mode);
38 void ass_fclose(ass_file *fp);
39 long ass_fseek(ass_file *fp, long offs, int whence);
40 long ass_ftell(ass_file *fp);
42 size_t ass_fread(void *buf, size_t size, size_t count, ass_file *fp);
44 /* convenience functions, derived from the above */
45 int ass_fgetc(ass_file *fp);
46 char *ass_fgets(char *s, int size, ass_file *fp);
53 #endif /* ASSMAN_H_ */