GNUnet  0.11.x
Data Fields
GNUNET_FS_FileInformation Struct Reference

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

#include </home/handbook/gnunet/src/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_CONTAINER_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 226 of file fs_api.h.

Field Documentation

◆ next

struct GNUNET_FS_FileInformation* GNUNET_FS_FileInformation::next

◆ dir [1/2]

struct GNUNET_FS_FileInformation* GNUNET_FS_FileInformation::dir

◆ h

struct GNUNET_FS_Handle* GNUNET_FS_FileInformation::h

◆ client_info

void* GNUNET_FS_FileInformation::client_info

◆ meta

struct GNUNET_CONTAINER_MetaData* GNUNET_FS_FileInformation::meta

◆ keywords

struct GNUNET_FS_Uri* GNUNET_FS_FileInformation::keywords

◆ chk_uri

struct GNUNET_FS_Uri* GNUNET_FS_FileInformation::chk_uri

◆ 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 269 of file fs_api.h.

Referenced by deserialize_fi_node(), GNUNET_FS_file_information_destroy(), GNUNET_FS_file_information_sync_(), publish_sblocks_cont(), and signal_publish_completion().

◆ 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 279 of file fs_api.h.

Referenced by deserialize_fi_node(), GNUNET_FS_file_information_sync_(), GNUNET_FS_publish_main_(), and GNUNET_FS_publish_make_status_().

◆ serialization

char* GNUNET_FS_FileInformation::serialization

Under what filename is this struct serialized (for operational persistence).

Should be determined using 'mktemp'.

Definition at line 286 of file fs_api.h.

Referenced by deserialize_fi_node(), 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 291 of file fs_api.h.

Referenced by encode_cont(), GNUNET_FS_file_information_destroy(), and publish_content().

◆ 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 316 of file fs_api.h.

Referenced by GNUNET_FS_file_information_create_from_reader().

◆ reader_cls

void* GNUNET_FS_FileInformation::reader_cls

Closure for reader.

Definition at line 321 of file fs_api.h.

Referenced by GNUNET_FS_file_information_create_from_reader().

◆ 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 328 of file fs_api.h.

◆ file_size

uint64_t GNUNET_FS_FileInformation::file_size

Size of the file (in bytes).

Definition at line 333 of file fs_api.h.

◆ do_index

int GNUNET_FS_FileInformation::do_index

Should the file be indexed or inserted?

Definition at line 338 of file fs_api.h.

Referenced by GNUNET_FS_file_information_create_from_reader().

◆ 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 344 of file fs_api.h.

◆ 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 350 of file fs_api.h.

◆ file

struct { ... } GNUNET_FS_FileInformation::file

◆ entries

struct GNUNET_FS_FileInformation* GNUNET_FS_FileInformation::entries

◆ dir_size

size_t GNUNET_FS_FileInformation::dir_size

◆ dir_data

void* GNUNET_FS_FileInformation::dir_data

Pointer to the data for the directory (or NULL if not available).

Definition at line 373 of file fs_api.h.

Referenced by block_reader(), deserialize_fi_node(), 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 378 of file fs_api.h.

Referenced by deserialize_fi_node(), and 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 383 of file fs_api.h.

Referenced by compute_contents_size(), deserialize_fi_node(), and GNUNET_FS_file_information_sync_().

◆ dir [2/2]

struct { ... } GNUNET_FS_FileInformation::dir

Data for a directory.

◆ data

union { ... } GNUNET_FS_FileInformation::data

◆ is_directory

int GNUNET_FS_FileInformation::is_directory

◆ is_published

int GNUNET_FS_FileInformation::is_published

Are we done publishing this file?

Definition at line 395 of file fs_api.h.

Referenced by deserialize_fi_node(), and GNUNET_FS_file_information_sync_().


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