GNUnet 0.22.0
GNUNET_FS_DownloadContext Struct Reference

Context for controlling a download. More...

#include </home/buildbot/bb-worker/worker/gnunet_firefly/build/src/service/fs/fs_api.h>

Collaboration diagram for GNUNET_FS_DownloadContext:
[legend]

Data Fields

struct GNUNET_FS_Handleh
 Global FS context. More...
 
struct TopLevelActivitytop
 Our top-level activity entry (if we are top-level, otherwise NULL). More...
 
struct GNUNET_MQ_Handlemq
 Connection to the FS service. More...
 
struct GNUNET_FS_DownloadContextparent
 Parent download (used when downloading files in directories). More...
 
struct GNUNET_FS_SearchResultsearch
 Associated search (used when downloading files based on search results), or NULL for none. More...
 
struct GNUNET_FS_DownloadContextchild_head
 Head of list of child downloads. More...
 
struct GNUNET_FS_DownloadContextchild_tail
 Tail of list of child downloads. More...
 
struct GNUNET_FS_DownloadContextprev
 Previous download belonging to the same parent. More...
 
struct GNUNET_FS_DownloadContextnext
 Next download belonging to the same parent. More...
 
void * client_info
 Context kept for the client. More...
 
struct GNUNET_FS_Uriuri
 URI that identifies the file that we are downloading. More...
 
struct GNUNET_FS_MetaDatameta
 Known meta-data for the file (can be NULL). More...
 
char * emsg
 Error message, NULL if we're doing OK. More...
 
char * serialization
 Random portion of filename we use for syncing state of this download. More...
 
char * filename
 Where are we writing the data (name of the file, can be NULL!). More...
 
char * temp_filename
 Where are we writing the data temporarily (name of the file, can be NULL!); used if we do not have a permanent name and we are a directory and we do a recursive download. More...
 
struct GNUNET_FS_QueueEntryjob_queue
 Our entry in the job queue. More...
 
struct GNUNET_FS_TreeEncoderte
 Tree encoder used for the reconstruction. More...
 
struct GNUNET_DISK_FileHandlerfh
 File handle for reading data from an existing file (to pass to tree encoder). More...
 
struct GNUNET_CONTAINER_MultiHashMapactive
 Map of active requests (those waiting for a response). More...
 
struct DownloadRequesttop_request
 Top-level download request. More...
 
struct GNUNET_PeerIdentity target
 Identity of the peer having the content, or all-zeros if we don't know of such a peer. More...
 
struct GNUNET_SCHEDULER_Tasktask
 ID of a task that is using this struct and that must be cancelled when the download is being stopped (if not NULL). More...
 
uint64_t offset
 What is the first offset that we're interested in? More...
 
uint64_t length
 How many bytes starting from offset are desired? This is NOT the overall length of the file! More...
 
uint64_t completed
 How many bytes have we already received within the specified range (DBlocks only). More...
 
uint64_t old_file_size
 What was the size of the file on disk that we're downloading before we started? Used to detect if there is a point in checking an existing block on disk for matching the desired content. More...
 
struct GNUNET_TIME_Absolute start_time
 Time download was started. More...
 
struct GNUNET_TIME_Relative reconnect_backoff
 How long to wait before we try to reconnect to FS service? More...
 
uint32_t anonymity
 Desired level of anonymity. More...
 
unsigned int treedepth
 The depth of the file-tree. More...
 
enum GNUNET_FS_DownloadOptions options
 Options for the download. More...
 
int has_finished
 Flag set upon transitive completion (includes child downloads). More...
 
int issue_requests
 Are we ready to issue requests (reconstructions are finished)? More...
 

Detailed Description

Context for controlling a download.

Definition at line 1743 of file fs_api.h.

Field Documentation

◆ h

◆ top

struct TopLevelActivity* GNUNET_FS_DownloadContext::top

Our top-level activity entry (if we are top-level, otherwise NULL).

Definition at line 1753 of file fs_api.h.

Referenced by deserialize_download(), GNUNET_FS_download_signal_suspend_(), GNUNET_FS_download_start(), GNUNET_FS_download_stop(), and search_result_stop().

◆ mq

◆ parent

struct GNUNET_FS_DownloadContext* GNUNET_FS_DownloadContext::parent

◆ search

struct GNUNET_FS_SearchResult* GNUNET_FS_DownloadContext::search

◆ child_head

◆ child_tail

struct GNUNET_FS_DownloadContext* GNUNET_FS_DownloadContext::child_tail

◆ prev

struct GNUNET_FS_DownloadContext* GNUNET_FS_DownloadContext::prev

Previous download belonging to the same parent.

Definition at line 1785 of file fs_api.h.

◆ next

struct GNUNET_FS_DownloadContext* GNUNET_FS_DownloadContext::next

Next download belonging to the same parent.

Definition at line 1790 of file fs_api.h.

Referenced by check_completed(), signal_download_resume(), and trigger_recursive_download().

◆ client_info

void* GNUNET_FS_DownloadContext::client_info

Context kept for the client.

Definition at line 1795 of file fs_api.h.

Referenced by create_download_context(), and GNUNET_FS_download_make_status_().

◆ uri

◆ meta

◆ emsg

◆ serialization

char* GNUNET_FS_DownloadContext::serialization

◆ filename

◆ temp_filename

char* GNUNET_FS_DownloadContext::temp_filename

Where are we writing the data temporarily (name of the file, can be NULL!); used if we do not have a permanent name and we are a directory and we do a recursive download.

Definition at line 1829 of file fs_api.h.

Referenced by create_download_context(), deserialize_download(), free_download_context(), full_recursive_download(), GNUNET_FS_download_signal_suspend_(), GNUNET_FS_download_stop(), GNUNET_FS_download_sync_(), process_result_with_request(), and try_match_block().

◆ job_queue

◆ te

struct GNUNET_FS_TreeEncoder* GNUNET_FS_DownloadContext::te

Tree encoder used for the reconstruction.

Definition at line 1839 of file fs_api.h.

Referenced by get_next_block(), GNUNET_FS_download_signal_suspend_(), GNUNET_FS_download_start_task_(), and GNUNET_FS_download_stop().

◆ rfh

struct GNUNET_DISK_FileHandle* GNUNET_FS_DownloadContext::rfh

File handle for reading data from an existing file (to pass to tree encoder).

Definition at line 1845 of file fs_api.h.

Referenced by check_completed(), fh_reader(), GNUNET_FS_download_signal_suspend_(), GNUNET_FS_download_start_task_(), reconstruct_cont(), and try_top_down_reconstruction().

◆ active

struct GNUNET_CONTAINER_MultiHashMap* GNUNET_FS_DownloadContext::active

◆ top_request

◆ target

struct GNUNET_PeerIdentity GNUNET_FS_DownloadContext::target

Identity of the peer having the content, or all-zeros if we don't know of such a peer.

Definition at line 1862 of file fs_api.h.

Referenced by create_download_context(), deserialize_download(), and retry_entry().

◆ task

struct GNUNET_SCHEDULER_Task* GNUNET_FS_DownloadContext::task

ID of a task that is using this struct and that must be cancelled when the download is being stopped (if not NULL).

Used for the task that adds some artificial delay when trying to reconnect to the FS service or the task processing incrementally the data on disk, or the task requesting blocks, etc.

Definition at line 1872 of file fs_api.h.

Referenced by check_completed(), create_download_context(), deserialize_download(), do_reconnect(), get_next_block(), GNUNET_FS_download_resume(), GNUNET_FS_download_signal_suspend_(), GNUNET_FS_download_start_downloading_(), GNUNET_FS_download_start_task_(), GNUNET_FS_download_stop(), reconstruct_cb(), reconstruct_cont(), and try_reconnect().

◆ offset

◆ length

◆ completed

uint64_t GNUNET_FS_DownloadContext::completed

◆ old_file_size

uint64_t GNUNET_FS_DownloadContext::old_file_size

What was the size of the file on disk that we're downloading before we started? Used to detect if there is a point in checking an existing block on disk for matching the desired content.

0 if the file did not exist already.

Definition at line 1898 of file fs_api.h.

Referenced by create_download_context(), deserialize_download(), GNUNET_FS_download_sync_(), and try_top_down_reconstruction().

◆ start_time

struct GNUNET_TIME_Absolute GNUNET_FS_DownloadContext::start_time

Time download was started.

Definition at line 1903 of file fs_api.h.

Referenced by create_download_context(), deserialize_download(), GNUNET_FS_download_make_status_(), and GNUNET_FS_download_sync_().

◆ reconnect_backoff

struct GNUNET_TIME_Relative GNUNET_FS_DownloadContext::reconnect_backoff

How long to wait before we try to reconnect to FS service?

Definition at line 1908 of file fs_api.h.

Referenced by try_reconnect().

◆ anonymity

uint32_t GNUNET_FS_DownloadContext::anonymity

◆ treedepth

unsigned int GNUNET_FS_DownloadContext::treedepth

◆ options

◆ has_finished

int GNUNET_FS_DownloadContext::has_finished

Flag set upon transitive completion (includes child downloads).

This flag is only set to GNUNET_YES for directories where all child-downloads have also completed (and signalled completion).

Definition at line 1930 of file fs_api.h.

Referenced by check_completed(), deserialize_download(), and GNUNET_FS_download_sync_().

◆ issue_requests

int GNUNET_FS_DownloadContext::issue_requests

Are we ready to issue requests (reconstructions are finished)?

Definition at line 1935 of file fs_api.h.

Referenced by GNUNET_FS_download_start_task_(), process_result_with_request(), and reconstruct_cont().


The documentation for this struct was generated from the following file: