|
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 (gchar *file, filesize_t size, gchar *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 *, guint32, const gchar *,...) G_GNUC_PRINTF(3 |
void | download_stop_v (struct download *d, guint32 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_retry (struct download *) |
void | download_close (void) |
| Terminating processing, cleanup data structures.
|
gboolean | download_server_nopush (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_verify_start (struct download *d) |
| Called when the verification daemon task starts processing a download.
|
void | download_verify_progress (struct download *d, guint32 hashed) |
| Called to register the current verification progress.
|
void | download_verify_done (struct download *d, gchar *digest, guint elapsed) |
| Called when download verification is finished and digest is known.
|
void | download_verify_error (struct download *d) |
| Called when we cannot verify the SHA1 for the file (I/O error, etc...).
|
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, 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 *name, const gchar *hostname, host_addr_t addr, guint16 port, const gchar *guid, gboolean push, const gnet_host_vec_t *proxies, gnet_search_t search) |
| Create special non-persisted download that will request "/" on the remote host and expect a stream of Gnutella query hits back.
|
void | download_abort_browse_host (gpointer download, gnet_search_t sh) |
| Abort browse-hosst 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_browse_received (struct download *d, ssize_t received) |
| Called when more data has been received.
|
void | download_browse_maybe_finished (struct download *d) |
| Called when all the received data so far have been processed to check whether we are done.
|
Variables |
GSList * | sl_unqueued |
| Global Data.
|