+struct load_task;
+
+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 */
+
+ LOAD_CANCELLED,
+ } status;
+ struct pb_url *url;
+ const char *local;
+ bool cleanup_local;
+ struct load_task *task;
+};
+
+/* 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);
+
+/* Start transfers that were waiting for network connectivity */
+void pending_network_jobs_start(void);
+void pending_network_jobs_cancel(void);
+