GNUnet 0.22.2
GNUNET_FS_FileInformation Struct Reference

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>

Collaboration diagram for GNUNET_FS_FileInformation:
[legend]

Data Fields

struct GNUNET_FS_FileInformationnext
 Files in a directory are kept as a linked list. More...
 
struct GNUNET_FS_FileInformationdir
 If this is a file in a directory, "dir" refers to the directory; otherwise NULL. More...
 
struct GNUNET_FS_Handleh
 Handle to the master context. More...
 
void * client_info
 Pointer kept for the client. More...
 
struct GNUNET_FS_MetaDatameta
 Metadata to use for the file. More...
 
struct GNUNET_FS_Urikeywords
 Keywords to use for KBlocks. More...
 
struct GNUNET_FS_Urichk_uri
 CHK for this file or directory. More...
 
struct GNUNET_FS_Urisks_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_TreeEncoderte
 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...
 

Detailed Description

Information for a file or directory that is about to be published.

Definition at line 227 of file fs_api.h.

Field Documentation

◆ next

◆ dir [1/2]

◆ h

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_().

◆ client_info

◆ meta

struct GNUNET_FS_MetaData* GNUNET_FS_FileInformation::meta

◆ keywords

◆ chk_uri

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().

◆ sks_uri

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().

◆ bo

struct GNUNET_FS_BlockOptions GNUNET_FS_FileInformation::bo

◆ start_time

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_().

◆ serialization

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().

◆ te

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().

◆ emsg

char* GNUNET_FS_FileInformation::emsg

◆ filename

char* GNUNET_FS_FileInformation::filename

◆ reader

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().

◆ reader_cls

void* GNUNET_FS_FileInformation::reader_cls

◆ file_id

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_().

◆ file_size

uint64_t GNUNET_FS_FileInformation::file_size

◆ do_index

◆ have_hash

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_().

◆ index_start_confirmed

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_().

◆ 

◆ entries

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_().

◆ dir_size

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().

◆ dir_data

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().

◆ contents_completed

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_().

◆ contents_size

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_().

◆  [2/2]

struct { ... } GNUNET_FS_FileInformation::dir

Data for a directory.

◆ 

◆ is_directory

◆ is_published

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_().


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