|
Functions |
| void | download_init (void) |
| | Initialize downloading data structures.
|
| void | download_restore_state (void) |
| | Initialize downloading data structures.
|
| void | download_store_if_dirty (void) |
| | Store pending download if needed.
|
| void | download_timer (time_t now) |
| | Download heartbeat timer.
|
| void | download_info_change_all (fileinfo_t *old_fi, fileinfo_t *new_fi) |
| | Change all the fileinfo of downloads from `old_fi' to `new_fi'.
|
| void | download_orphan_new (const gchar *file, filesize_t size, const struct sha1 *sha1, fileinfo_t *fi) |
| | Fake a new download for an existing file that is marked complete in its fileinfo trailer.
|
| void | download_queue (struct download *d, const gchar *fmt,...) G_GNUC_PRINTF(2 |
| void | download_stop (struct download *, download_status_t, const gchar *,...) G_GNUC_PRINTF(3 |
| void | download_stop_v (struct download *d, download_status_t new_status, const gchar *reason, va_list ap) |
| | Vectorized version common to download_stop() and download_unavailable().
|
| void | download_push_ack (struct gnutella_socket *) |
| | Initiate download on the remotely initiated connection.
|
| void | download_fallback_to_push (struct download *, gboolean, gboolean) |
| | Direct download failed, let's try it with a push request.
|
| void | download_pickup_queued (void) |
| | Pick up new downloads from the queue as needed.
|
| void | download_forget (struct download *, gboolean unavailable) |
| | Forget about download: stop it if running.
|
| gboolean | download_start_prepare (struct download *d) |
| | Make download a "running" one (in running list, unqueued), then call download_start_prepare_running().
|
| gboolean | download_start_prepare_running (struct download *d) |
| | Setup the download structure with proper range offset, and check that the download is not otherwise completed.
|
| void | download_send_request (struct download *) |
| | Send the HTTP request for a download, then prepare I/O reading callbacks to read the incoming status line and following headers.
|
| void | download_connected (struct download *) |
| | This function is called once a connection has been established.
|
| void | download_close (void) |
| | Terminating processing, cleanup data structures.
|
| gboolean | download_server_nopush (const gchar *guid, const host_addr_t addr, guint16 port) |
| | Check whether we can safely ignore Push indication for this server, identified by its GUID, IP and port.
|
| void | download_free_removed (void) |
| | Free all downloads listed in the `sl_removed' list.
|
| void | download_redirect_to_server (struct download *d, const host_addr_t addr, guint16 port) |
| | Move download from a server to another when the IP:port changed due to a Location: redirection for instance, or because of a QUEUE callback.
|
| void | download_actively_queued (struct download *d, gboolean queued) |
| | Mark a download as being actively queued.
|
| void | download_move_start (struct download *d) |
| | Called when the moving daemon task starts processing a download.
|
| void | download_move_progress (struct download *d, filesize_t copied) |
| | Called to register the current moving progress.
|
| void | download_move_done (struct download *d, const gchar *pathname, guint elapsed) |
| | Called when file has been moved/renamed with its fileinfo trailer stripped.
|
| void | download_move_error (struct download *d) |
| | Called when we cannot move the file (I/O error, etc...).
|
| guint | extract_retry_after (struct download *d, const header_t *header) |
| | Extract Retry-After delay from header, returning 0 if none.
|
| gboolean | is_faked_download (const struct download *d) |
| download * | download_find_waiting_unparq (const host_addr_t addr, guint16 port) |
| | Find a waiting download on the specified server, identified by its IP:port for which we have no PARQ information yet.
|
| void | download_set_socket_rx_size (gint rx_size) |
| | Change the socket RX buffer size for all the currently connected downloads.
|
| void | download_proxy_newstate (struct download *d) |
| | Called when the status of the HTTP request made by the client push-proxy code changes.
|
| void | download_proxy_sent (struct download *d) |
| | Called by client push-proxy side when we got indication that the PUSH has been sent.
|
| void | download_proxy_failed (struct download *d) |
| | Called by client push-proxy side to indicate that it could not send a PUSH.
|
| download * | download_browse_start (const gchar *hostname, host_addr_t addr, guint16 port, const gchar *guid, const gnet_host_vec_t *proxies, gnet_search_t search, guint32 flags) |
| | Create special non-persisted download that will request "/" on the remote host and expect a stream of Gnutella query hits back.
|
| download * | download_thex_start (const gchar *uri, const struct sha1 *sha1, const struct tth *tth, filesize_t filesize, const gchar *hostname, host_addr_t addr, guint16 port, const gchar *guid, const gnet_host_vec_t *proxies, guint32 flags) |
| | Create special non-persisted download that will request THEX data from the remote host.
|
| void | download_abort_browse_host (struct download *d, gnet_search_t sh) |
| | Abort browse-host download when corresponding search is closed.
|
| void | download_got_eof (struct download *d) |
| | Called when an EOF is received during data reception.
|
| void | download_rx_done (struct download *d) |
| | Called when all data has been received.
|
| void | download_data_received (struct download *d, ssize_t received) |
| | Called when more data has been received on the RX stack, for non-file downloads (e.g.
|
| void | download_maybe_finished (struct download *d) |
| | Called when all the received data so far have been processed to check whether we are done.
|
| gboolean | download_handle_http (const gchar *url) |
| gboolean | download_is_stalled (struct download *d) |