1 /* babel_handler.h declarations for the babel handler API
\r
2 * (c) 2006 By L. Ross Raszewski
\r
4 * This code is freely usable for all purposes.
\r
6 * This work is licensed under the Creative Commons Attribution2.5 License.
\r
7 * To view a copy of this license, visit
\r
8 * http://creativecommons.org/licenses/by/2.5/ or send a letter to
\r
10 * 543 Howard Street, 5th Floor,
\r
11 * San Francisco, California, 94105, USA.
\r
15 #ifndef BABEL_HANDLER_H
\r
16 #define BABEL_HANDLER_H
\r
20 /* Functions from babel_handler.c */
\r
21 char *babel_init(char *filename);
\r
22 /* initialize the babel handler */
\r
23 char *babel_init_raw(void *sf, int32 extent);
\r
24 /* Initialize from loaded data */
\r
25 int32 babel_treaty(int32 selector, void *output, int32 output_extent);
\r
26 /* Dispatch treaty calls */
\r
27 void babel_release(void);
\r
28 /* Release babel_handler resources */
\r
29 char *babel_get_format(void);
\r
30 /* return the format of the loaded file */
\r
31 int32 babel_md5_ifid(char *buffer, int32 extent);
\r
32 /* IFID generator of last resort */
\r
33 int32 babel_get_length(void);
\r
34 /* Fetch file length */
\r
35 int32 babel_get_story_length(void);
\r
36 /* Fetch file length */
\r
37 int32 babel_get_authoritative(void);
\r
38 /* Determine if babel handler has a good grasp on the format */
\r
39 void *babel_get_file(void);
\r
40 /* Get loaded story file */
\r
41 void *babel_get_story_file(void);
\r
42 /* Get loaded story file */
\r
44 /* threadsafe versions of above */
\r
45 char *babel_init_ctx(char *filename, void *);
\r
46 /* initialize the babel handler */
\r
47 int32 babel_treaty_ctx(int32 selector, void *output, int32 output_extent, void *);
\r
48 /* Dispatch treaty calls */
\r
49 void babel_release_ctx(void *);
\r
50 /* Release babel_handler resources */
\r
51 char *babel_get_format_ctx(void *);
\r
52 /* return the format of the loaded file */
\r
53 int32 babel_md5_ifid_ctx(char *buffer, int extent, void *);
\r
54 /* IFID generator of last resort */
\r
55 int32 babel_get_length_ctx(void *);
\r
56 int32 babel_get_story_length_ctx(void *);
\r
57 void *babel_get_file_ctx(void *bhp);
\r
58 void *babel_get_story_ctx(void *bhp);
\r
59 int32 babel_get_authoritative_ctx(void *bhp);
\r
60 char *babel_init_raw_ctx(void *sf, int32 extent, void *bhp);
\r
61 void *get_babel_ctx(void);
\r
62 void release_babel_ctx(void *);
\r
63 /* get and release babel contexts */
\r