+
+struct load_url_result {
+ enum {
+ LOAD_OK, /* load complete. other members should only be
+ accessed if status == LOAD_OK */
+
+ LOAD_ERROR, /* only signalled to async loaders
+ * (sync will see a NULL result) */
+
+ LOAD_ASYNC, /* async load still in progress */
+ } status;
+ const char *local;
+ bool cleanup_local;
+};
+
+/* callback type for asynchronous loads. The callback implementation is
+ * responsible for freeing result.
+ */
+typedef void (*load_url_complete)(struct load_url_result *result, void *data);