Context for controlling a download. More...
#include </home/buildbot/bb-worker/worker/gnunet_firefly/build/src/service/fs/fs_api.h>
Data Fields | |
struct GNUNET_FS_Handle * | h |
Global FS context. More... | |
struct TopLevelActivity * | top |
Our top-level activity entry (if we are top-level, otherwise NULL). More... | |
struct GNUNET_MQ_Handle * | mq |
Connection to the FS service. More... | |
struct GNUNET_FS_DownloadContext * | parent |
Parent download (used when downloading files in directories). More... | |
struct GNUNET_FS_SearchResult * | search |
Associated search (used when downloading files based on search results), or NULL for none. More... | |
struct GNUNET_FS_DownloadContext * | child_head |
Head of list of child downloads. More... | |
struct GNUNET_FS_DownloadContext * | child_tail |
Tail of list of child downloads. More... | |
struct GNUNET_FS_DownloadContext * | prev |
Previous download belonging to the same parent. More... | |
struct GNUNET_FS_DownloadContext * | next |
Next download belonging to the same parent. More... | |
void * | client_info |
Context kept for the client. More... | |
struct GNUNET_FS_Uri * | uri |
URI that identifies the file that we are downloading. More... | |
struct GNUNET_FS_MetaData * | meta |
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_QueueEntry * | job_queue |
Our entry in the job queue. More... | |
struct GNUNET_FS_TreeEncoder * | te |
Tree encoder used for the reconstruction. More... | |
struct GNUNET_DISK_FileHandle * | rfh |
File handle for reading data from an existing file (to pass to tree encoder). More... | |
struct GNUNET_CONTAINER_MultiHashMap * | active |
Map of active requests (those waiting for a response). More... | |
struct DownloadRequest * | top_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_Task * | task |
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... | |
struct GNUNET_FS_Handle* GNUNET_FS_DownloadContext::h |
Global FS context.
Definition at line 1748 of file fs_api.h.
Referenced by create_download_context(), deserialize_download(), deserialize_subdownload(), do_reconnect(), get_download_sync_filename(), GNUNET_FS_download_make_status_(), GNUNET_FS_download_resume(), GNUNET_FS_download_signal_suspend_(), GNUNET_FS_download_start(), GNUNET_FS_download_start_downloading_(), GNUNET_FS_download_start_task_(), GNUNET_FS_download_stop(), search_result_stop(), and trigger_recursive_download().
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().
struct GNUNET_MQ_Handle* GNUNET_FS_DownloadContext::mq |
Connection to the FS service.
Definition at line 1758 of file fs_api.h.
Referenced by activate_fs_download(), deactivate_fs_download(), do_reconnect(), download_mq_error_handler(), GNUNET_FS_download_make_status_(), GNUNET_FS_download_start_downloading_(), process_result_with_request(), retry_entry(), schedule_block_download(), and try_reconnect().
struct GNUNET_FS_DownloadContext* GNUNET_FS_DownloadContext::parent |
Parent download (used when downloading files in directories).
Definition at line 1764 of file fs_api.h.
Referenced by check_completed(), deserialize_download(), deserialize_subdownload(), get_download_sync_filename(), GNUNET_FS_download_make_status_(), GNUNET_FS_download_signal_suspend_(), GNUNET_FS_download_start(), and GNUNET_FS_download_stop().
struct GNUNET_FS_SearchResult* GNUNET_FS_DownloadContext::search |
Associated search (used when downloading files based on search results), or NULL for none.
Definition at line 1770 of file fs_api.h.
Referenced by deserialize_download(), get_download_sync_filename(), GNUNET_FS_download_make_status_(), GNUNET_FS_download_signal_suspend_(), GNUNET_FS_download_start_from_search(), GNUNET_FS_download_start_task_(), GNUNET_FS_download_stop(), and search_result_stop().
struct GNUNET_FS_DownloadContext* GNUNET_FS_DownloadContext::child_head |
Head of list of child downloads.
Definition at line 1775 of file fs_api.h.
Referenced by check_completed(), deserialize_download(), free_download_context(), GNUNET_FS_download_signal_suspend_(), GNUNET_FS_download_start(), GNUNET_FS_download_stop(), signal_download_resume(), and trigger_recursive_download().
struct GNUNET_FS_DownloadContext* GNUNET_FS_DownloadContext::child_tail |
Tail of list of child downloads.
Definition at line 1780 of file fs_api.h.
Referenced by deserialize_download(), free_download_context(), GNUNET_FS_download_signal_suspend_(), GNUNET_FS_download_start(), and GNUNET_FS_download_stop().
struct GNUNET_FS_DownloadContext* GNUNET_FS_DownloadContext::prev |
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().
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_().
struct GNUNET_FS_Uri* GNUNET_FS_DownloadContext::uri |
URI that identifies the file that we are downloading.
Definition at line 1800 of file fs_api.h.
Referenced by create_download_context(), deserialize_download(), free_download_context(), full_recursive_download(), GNUNET_FS_download_make_status_(), GNUNET_FS_download_signal_suspend_(), GNUNET_FS_download_start_task_(), GNUNET_FS_download_stop(), GNUNET_FS_download_sync_(), match_full_data(), process_result_with_request(), reconstruct_cb(), trigger_recursive_download(), try_match_block(), and try_top_down_reconstruction().
struct GNUNET_FS_MetaData* GNUNET_FS_DownloadContext::meta |
Known meta-data for the file (can be NULL).
Definition at line 1805 of file fs_api.h.
Referenced by create_download_context(), deserialize_download(), free_download_context(), GNUNET_FS_download_signal_suspend_(), GNUNET_FS_download_start_task_(), GNUNET_FS_download_stop(), GNUNET_FS_download_sync_(), is_recursive_download(), and signal_download_resume().
char* GNUNET_FS_DownloadContext::emsg |
Error message, NULL if we're doing OK.
Definition at line 1810 of file fs_api.h.
Referenced by check_completed(), deserialize_download(), deserialize_subdownload(), free_download_context(), GNUNET_FS_download_start_task_(), GNUNET_FS_download_sync_(), process_result_with_request(), signal_download_resume(), and try_match_block().
char* GNUNET_FS_DownloadContext::serialization |
Random portion of filename we use for syncing state of this download.
Definition at line 1816 of file fs_api.h.
Referenced by deserialize_download(), free_download_context(), get_download_sync_filename(), GNUNET_FS_download_signal_suspend_(), GNUNET_FS_download_stop(), GNUNET_FS_download_sync_(), GNUNET_FS_search_result_sync_(), and search_result_stop().
char* GNUNET_FS_DownloadContext::filename |
Where are we writing the data (name of the file, can be NULL!).
Definition at line 1822 of file fs_api.h.
Referenced by create_download_context(), deserialize_download(), encrypt_existing_match(), free_download_context(), full_recursive_download(), GNUNET_FS_download_make_status_(), GNUNET_FS_download_signal_suspend_(), GNUNET_FS_download_start_task_(), GNUNET_FS_download_stop(), GNUNET_FS_download_sync_(), is_recursive_download(), process_result_with_request(), reconstruct_cb(), trigger_recursive_download(), try_match_block(), and try_top_down_reconstruction().
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().
struct GNUNET_FS_QueueEntry* GNUNET_FS_DownloadContext::job_queue |
Our entry in the job queue.
Definition at line 1834 of file fs_api.h.
Referenced by check_completed(), create_download_context(), deserialize_download(), GNUNET_FS_download_resume(), GNUNET_FS_download_signal_suspend_(), GNUNET_FS_download_start_downloading_(), GNUNET_FS_download_stop(), process_result_with_request(), and try_reconnect().
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().
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().
struct GNUNET_CONTAINER_MultiHashMap* GNUNET_FS_DownloadContext::active |
Map of active requests (those waiting for a response).
The key is the hash of the encrypted block (aka query).
Definition at line 1851 of file fs_api.h.
Referenced by activate_fs_download(), create_download_context(), deserialize_download(), do_reconnect(), free_download_context(), GNUNET_FS_download_signal_suspend_(), GNUNET_FS_download_start_downloading_(), GNUNET_FS_download_stop(), handle_put(), process_result_with_request(), reconstruct_cb(), and schedule_block_download().
struct DownloadRequest* GNUNET_FS_DownloadContext::top_request |
Top-level download request.
Definition at line 1856 of file fs_api.h.
Referenced by deserialize_download(), free_download_context(), GNUNET_FS_download_signal_suspend_(), GNUNET_FS_download_start_task_(), GNUNET_FS_download_stop(), GNUNET_FS_download_sync_(), match_full_data(), process_result_with_request(), reconstruct_cb(), and reconstruct_cont().
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().
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().
uint64_t GNUNET_FS_DownloadContext::offset |
What is the first offset that we're interested in?
Definition at line 1878 of file fs_api.h.
Referenced by create_download_context(), deserialize_download(), GNUNET_FS_download_start(), GNUNET_FS_download_start_from_search(), GNUNET_FS_download_start_task_(), GNUNET_FS_download_sync_(), process_result_with_request(), reconstruct_cb(), and try_match_block().
uint64_t GNUNET_FS_DownloadContext::length |
How many bytes starting from offset are desired? This is NOT the overall length of the file!
Definition at line 1884 of file fs_api.h.
Referenced by check_completed(), create_download_context(), deserialize_download(), GNUNET_FS_download_make_status_(), GNUNET_FS_download_resume(), GNUNET_FS_download_start(), GNUNET_FS_download_start_downloading_(), GNUNET_FS_download_start_from_search(), GNUNET_FS_download_start_task_(), GNUNET_FS_download_stop(), GNUNET_FS_download_sync_(), process_result_with_request(), reconstruct_cb(), and try_match_block().
uint64_t GNUNET_FS_DownloadContext::completed |
How many bytes have we already received within the specified range (DBlocks only).
Definition at line 1890 of file fs_api.h.
Referenced by check_completed(), deserialize_download(), GNUNET_FS_download_make_status_(), GNUNET_FS_download_start_downloading_(), GNUNET_FS_download_stop(), GNUNET_FS_download_sync_(), process_result_with_request(), reconstruct_cb(), and try_match_block().
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().
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_().
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().
uint32_t GNUNET_FS_DownloadContext::anonymity |
Desired level of anonymity.
Definition at line 1913 of file fs_api.h.
Referenced by create_download_context(), deserialize_download(), GNUNET_FS_download_make_status_(), GNUNET_FS_download_sync_(), retry_entry(), and trigger_recursive_download().
unsigned int GNUNET_FS_DownloadContext::treedepth |
The depth of the file-tree.
Definition at line 1918 of file fs_api.h.
Referenced by create_download_context(), deserialize_download(), GNUNET_FS_download_start_task_(), process_result_with_request(), and try_top_down_reconstruction().
enum GNUNET_FS_DownloadOptions GNUNET_FS_DownloadContext::options |
Options for the download.
Definition at line 1923 of file fs_api.h.
Referenced by httpdomain.httpdomain.HTTPResource::add_target_and_index(), httpdomain.autohttp.flask_base.AutoflaskBase::blueprints(), create_download_context(), deserialize_download(), httpdomain.autohttp.bottle.AutobottleDirective::endpoints(), httpdomain.autohttp.flask_base.AutoflaskBase::endpoints(), httpdomain.autohttp.tornado.AutoTornadoDirective::endpoints(), GNUNET_FS_download_make_status_(), GNUNET_FS_download_resume(), GNUNET_FS_download_start_downloading_(), GNUNET_FS_download_sync_(), is_recursive_download(), httpdomain.autohttp.bottle.AutobottleDirective::make_rst(), httpdomain.autohttp.tornado.AutoTornadoDirective::make_rst(), httpdomain.autohttp.flask_base.AutoflaskBase::make_rst(), httpdomain.autohttp.flask_base.AutoflaskBase::modules(), httpdomain.autohttp.flask_base.AutoflaskBase::order(), process_result_with_request(), retry_entry(), typescriptdomain.TypeScriptDefinition::run(), trigger_recursive_download(), httpdomain.autohttp.flask_base.AutoflaskBase::undoc_blueprints(), httpdomain.autohttp.bottle.AutobottleDirective::undoc_endpoints(), httpdomain.autohttp.flask_base.AutoflaskBase::undoc_endpoints(), httpdomain.autohttp.tornado.AutoTornadoDirective::undoc_endpoints(), and httpdomain.autohttp.flask_base.AutoflaskBase::undoc_modules().
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_().
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().