7 * Utility function for joining two paths. Adds a / between a and b if
10 * Returns a newly-allocated string.
12 char *join_paths(void *alloc_ctx, const char *a, const char *b);
15 * Returns the base path for mount points
17 const char *mount_base(void);
20 struct load_url_result {
22 LOAD_OK, /* load complete. other members should only be
23 accessed if status == LOAD_OK */
25 LOAD_ERROR, /* only signalled to async loaders
26 * (sync will see a NULL result) */
28 LOAD_ASYNC, /* async load still in progress */
34 /* callback type for asynchronous loads. The callback implementation is
35 * responsible for freeing result.
37 typedef void (*load_url_complete)(struct load_url_result *result, void *data);
39 /* Load a (potentially remote) file, and return a guaranteed-local name */
40 struct load_url_result *load_url_async(void *ctx, struct pb_url *url,
41 load_url_complete complete, void *data);
43 struct load_url_result *load_url(void *ctx, struct pb_url *url);