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);
21 struct load_url_result {
23 LOAD_OK, /* load complete. other members should only be
24 accessed if status == LOAD_OK */
26 LOAD_ERROR, /* only signalled to async loaders
27 * (sync will see a NULL result) */
29 LOAD_ASYNC, /* async load still in progress */
35 struct load_task *task;
38 /* callback type for asynchronous loads. The callback implementation is
39 * responsible for freeing result.
41 typedef void (*load_url_complete)(struct load_url_result *result, void *data);
43 /* Load a (potentially remote) file, and return a guaranteed-local name */
44 struct load_url_result *load_url_async(void *ctx, struct pb_url *url,
45 load_url_complete complete, void *data);
47 /* Cancel a pending load */
48 void load_url_async_cancel(struct load_url_result *res);
50 struct load_url_result *load_url(void *ctx, struct pb_url *url);