Information for a file or directory that is about to be published. More...
#include </home/buildbot/bb-worker/worker/gnunet_firefly/build/src/service/fs/fs_api.h>
Data Fields | |
struct GNUNET_FS_FileInformation * | next |
Files in a directory are kept as a linked list. More... | |
struct GNUNET_FS_FileInformation * | dir |
If this is a file in a directory, "dir" refers to the directory; otherwise NULL. More... | |
struct GNUNET_FS_Handle * | h |
Handle to the master context. More... | |
void * | client_info |
Pointer kept for the client. More... | |
struct GNUNET_FS_MetaData * | meta |
Metadata to use for the file. More... | |
struct GNUNET_FS_Uri * | keywords |
Keywords to use for KBlocks. More... | |
struct GNUNET_FS_Uri * | chk_uri |
CHK for this file or directory. More... | |
struct GNUNET_FS_Uri * | sks_uri |
SKS URI for this file or directory. More... | |
struct GNUNET_FS_BlockOptions | bo |
Block options for the file. More... | |
struct GNUNET_TIME_Absolute | start_time |
At what time did we start this upload? More... | |
char * | serialization |
Under what filename is this struct serialized (for operational persistence). More... | |
struct GNUNET_FS_TreeEncoder * | te |
Encoder being used to publish this file. More... | |
char * | emsg |
Error message (non-NULL if this operation failed). More... | |
char * | filename |
Name of the file or directory (must be an absolute path). More... | |
union { | |
struct { | |
GNUNET_FS_DataReader reader | |
Function that can be used to read the data for the file. More... | |
void * reader_cls | |
Closure for reader. More... | |
struct GNUNET_HashCode file_id | |
If this file is being indexed, this value is set to the hash over the entire file (when the indexing process is started). More... | |
uint64_t file_size | |
Size of the file (in bytes). More... | |
int do_index | |
Should the file be indexed or inserted? More... | |
int have_hash | |
Is "file_id" already valid? Set to GNUNET_YES once the hash has been calculated. More... | |
int index_start_confirmed | |
Has the service confirmed our INDEX_START request? GNUNET_YES if this step has been completed. More... | |
} file | |
Data for a file. More... | |
struct { | |
struct GNUNET_FS_FileInformation * entries | |
Linked list of entries in the directory. More... | |
size_t dir_size | |
Size of the directory itself (in bytes); 0 if the size has not yet been calculated. More... | |
void * dir_data | |
Pointer to the data for the directory (or NULL if not available). More... | |
uint64_t contents_completed | |
How much of the directory have we published (relative to contents_size). More... | |
uint64_t contents_size | |
Sum of all of the sizes of all of the files in the directory. More... | |
} dir | |
Data for a directory. More... | |
} | data |
Data describing either the file or the directory. More... | |
int | is_directory |
Is this struct for a file or directory? More... | |
int | is_published |
Are we done publishing this file? More... | |
Information for a file or directory that is about to be published.
struct GNUNET_FS_FileInformation* GNUNET_FS_FileInformation::next |
Files in a directory are kept as a linked list.
Definition at line 232 of file fs_api.h.
Referenced by compute_contents_size(), deserialize_fi_node(), find_file_position(), GNUNET_FS_file_information_add(), GNUNET_FS_file_information_destroy(), GNUNET_FS_file_information_inspect(), GNUNET_FS_file_information_sync_(), and publish_content().
struct GNUNET_FS_FileInformation* GNUNET_FS_FileInformation::dir |
If this is a file in a directory, "dir" refers to the directory; otherwise NULL.
Definition at line 238 of file fs_api.h.
Referenced by compute_contents_size(), deserialize_fi_node(), find_file_position(), fip_signal_start(), GNUNET_FS_file_information_add(), GNUNET_FS_file_information_destroy(), GNUNET_FS_file_information_get_id(), GNUNET_FS_file_information_inspect(), GNUNET_FS_file_information_sync_(), publish_content(), and suspend_operation().
struct GNUNET_FS_Handle* GNUNET_FS_FileInformation::h |
Handle to the master context.
Definition at line 243 of file fs_api.h.
Referenced by GNUNET_FS_file_information_sync_().
void* GNUNET_FS_FileInformation::client_info |
Pointer kept for the client.
Definition at line 248 of file fs_api.h.
Referenced by ds_put_cont(), GNUNET_FS_file_information_create_empty_directory(), GNUNET_FS_file_information_create_from_data(), GNUNET_FS_file_information_create_from_file(), GNUNET_FS_file_information_create_from_reader(), GNUNET_FS_file_information_destroy(), and GNUNET_FS_file_information_inspect().
struct GNUNET_FS_MetaData* GNUNET_FS_FileInformation::meta |
Metadata to use for the file.
Definition at line 253 of file fs_api.h.
Referenced by GNUNET_FS_file_information_destroy(), GNUNET_FS_file_information_inspect(), GNUNET_FS_file_information_sync_(), publish_content(), and publish_sblock().
struct GNUNET_FS_Uri* GNUNET_FS_FileInformation::keywords |
Keywords to use for KBlocks.
Definition at line 258 of file fs_api.h.
Referenced by GNUNET_FS_file_information_create_empty_directory(), GNUNET_FS_file_information_create_from_data(), GNUNET_FS_file_information_create_from_file(), GNUNET_FS_file_information_create_from_reader(), GNUNET_FS_file_information_destroy(), GNUNET_FS_file_information_inspect(), and GNUNET_FS_file_information_sync_().
struct GNUNET_FS_Uri* GNUNET_FS_FileInformation::chk_uri |
CHK for this file or directory.
NULL if we have not yet computed it.
Definition at line 264 of file fs_api.h.
Referenced by fip_signal_resume(), fip_signal_stop(), GNUNET_FS_file_information_destroy(), GNUNET_FS_file_information_sync_(), GNUNET_FS_publish_stop(), publish_content(), publish_sblock(), and suspend_operation().
struct GNUNET_FS_Uri* GNUNET_FS_FileInformation::sks_uri |
SKS URI for this file or directory.
NULL if we have not yet computed it.
Definition at line 270 of file fs_api.h.
Referenced by GNUNET_FS_file_information_destroy(), GNUNET_FS_file_information_sync_(), and publish_sblocks_cont().
struct GNUNET_FS_BlockOptions GNUNET_FS_FileInformation::bo |
Block options for the file.
Definition at line 275 of file fs_api.h.
Referenced by GNUNET_FS_file_information_destroy(), GNUNET_FS_file_information_inspect(), GNUNET_FS_file_information_sync_(), and publish_sblock().
struct GNUNET_TIME_Absolute GNUNET_FS_FileInformation::start_time |
At what time did we start this upload?
Definition at line 280 of file fs_api.h.
Referenced by GNUNET_FS_file_information_sync_().
char* GNUNET_FS_FileInformation::serialization |
Under what filename is this struct serialized (for operational persistence).
Should be determined using 'mktemp'.
Definition at line 287 of file fs_api.h.
Referenced by find_file_position(), fip_signal_stop(), GNUNET_FS_file_information_destroy(), GNUNET_FS_file_information_get_id(), GNUNET_FS_file_information_sync_(), GNUNET_FS_publish_stop(), GNUNET_FS_publish_sync_(), and suspend_operation().
struct GNUNET_FS_TreeEncoder* GNUNET_FS_FileInformation::te |
Encoder being used to publish this file.
Definition at line 292 of file fs_api.h.
Referenced by GNUNET_FS_file_information_destroy().
char* GNUNET_FS_FileInformation::emsg |
Error message (non-NULL if this operation failed).
Definition at line 297 of file fs_api.h.
Referenced by block_reader(), check_index_start_failed(), ds_put_cont(), finish_reserve(), fip_signal_resume(), GNUNET_FS_file_information_destroy(), GNUNET_FS_file_information_sync_(), handle_index_start_failed(), publish_content(), and publish_kblocks_cont().
char* GNUNET_FS_FileInformation::filename |
Name of the file or directory (must be an absolute path).
Definition at line 302 of file fs_api.h.
Referenced by ds_put_cont(), GNUNET_FS_file_information_destroy(), GNUNET_FS_file_information_get_filename(), GNUNET_FS_file_information_set_filename(), and GNUNET_FS_file_information_sync_().
GNUNET_FS_DataReader GNUNET_FS_FileInformation::reader |
Function that can be used to read the data for the file.
Definition at line 317 of file fs_api.h.
Referenced by copy_from_reader(), GNUNET_FS_file_information_create_from_reader(), GNUNET_FS_file_information_destroy(), and publish_content().
void* GNUNET_FS_FileInformation::reader_cls |
Closure for reader.
Definition at line 322 of file fs_api.h.
Referenced by copy_from_reader(), GNUNET_FS_file_information_create_from_reader(), GNUNET_FS_file_information_destroy(), and publish_content().
struct GNUNET_HashCode GNUNET_FS_FileInformation::file_id |
If this file is being indexed, this value is set to the hash over the entire file (when the indexing process is started).
Otherwise this field is not used.
Definition at line 329 of file fs_api.h.
Referenced by GNUNET_FS_file_information_sync_().
uint64_t GNUNET_FS_FileInformation::file_size |
Size of the file (in bytes).
Definition at line 334 of file fs_api.h.
Referenced by compute_contents_size(), copy_from_reader(), GNUNET_FS_file_information_destroy(), GNUNET_FS_file_information_inspect(), GNUNET_FS_file_information_sync_(), publish_content(), and suspend_operation().
int GNUNET_FS_FileInformation::do_index |
Should the file be indexed or inserted?
Definition at line 339 of file fs_api.h.
Referenced by ds_put_cont(), GNUNET_FS_file_information_create_from_data(), GNUNET_FS_file_information_create_from_file(), GNUNET_FS_file_information_create_from_reader(), GNUNET_FS_file_information_destroy(), GNUNET_FS_file_information_inspect(), and GNUNET_FS_file_information_sync_().
int GNUNET_FS_FileInformation::have_hash |
Is "file_id" already valid? Set to GNUNET_YES once the hash has been calculated.
Definition at line 345 of file fs_api.h.
Referenced by GNUNET_FS_file_information_sync_().
int GNUNET_FS_FileInformation::index_start_confirmed |
Has the service confirmed our INDEX_START request? GNUNET_YES if this step has been completed.
Definition at line 351 of file fs_api.h.
Referenced by GNUNET_FS_file_information_sync_().
struct { ... } GNUNET_FS_FileInformation::file |
Data for a file.
Referenced by compute_contents_size(), copy_from_reader(), ds_put_cont(), GNUNET_FS_file_information_destroy(), GNUNET_FS_file_information_inspect(), GNUNET_FS_file_information_sync_(), publish_content(), and suspend_operation().
struct GNUNET_FS_FileInformation* GNUNET_FS_FileInformation::entries |
Linked list of entries in the directory.
Definition at line 362 of file fs_api.h.
Referenced by compute_contents_size(), find_file_position(), GNUNET_FS_file_information_destroy(), and GNUNET_FS_file_information_sync_().
size_t GNUNET_FS_FileInformation::dir_size |
Size of the directory itself (in bytes); 0 if the size has not yet been calculated.
Definition at line 368 of file fs_api.h.
Referenced by GNUNET_FS_file_information_destroy(), GNUNET_FS_file_information_inspect(), GNUNET_FS_file_information_sync_(), and suspend_operation().
void* GNUNET_FS_FileInformation::dir_data |
Pointer to the data for the directory (or NULL if not available).
Definition at line 374 of file fs_api.h.
Referenced by GNUNET_FS_file_information_destroy(), GNUNET_FS_file_information_sync_(), and publish_content().
uint64_t GNUNET_FS_FileInformation::contents_completed |
How much of the directory have we published (relative to contents_size).
Definition at line 379 of file fs_api.h.
Referenced by GNUNET_FS_file_information_sync_().
uint64_t GNUNET_FS_FileInformation::contents_size |
Sum of all of the sizes of all of the files in the directory.
Definition at line 384 of file fs_api.h.
Referenced by compute_contents_size(), and GNUNET_FS_file_information_sync_().
struct { ... } GNUNET_FS_FileInformation::dir |
Data for a directory.
union { ... } GNUNET_FS_FileInformation::data |
Data describing either the file or the directory.
Referenced by compute_contents_size(), copy_from_reader(), ds_put_cont(), find_file_position(), GNUNET_FS_file_information_destroy(), GNUNET_FS_file_information_inspect(), GNUNET_FS_file_information_sync_(), typescriptdomain.TypeScriptDomain::objects(), publish_content(), httpdomain.httpdomain.HTTPDomain::resolve_xref(), httpdomain.httpdomain.HTTPDomain::routes(), and suspend_operation().
int GNUNET_FS_FileInformation::is_directory |
Is this struct for a file or directory?
Definition at line 391 of file fs_api.h.
Referenced by compute_contents_size(), ds_put_cont(), find_file_position(), fip_signal_start(), GNUNET_FS_file_information_destroy(), GNUNET_FS_file_information_inspect(), GNUNET_FS_file_information_is_directory(), GNUNET_FS_file_information_sync_(), progress_proc(), publish_content(), and suspend_operation().
int GNUNET_FS_FileInformation::is_published |
Are we done publishing this file?
Definition at line 396 of file fs_api.h.
Referenced by GNUNET_FS_file_information_sync_().