GNUnet 0.22.2
GNUNET_FS_TreeEncoder Struct Reference

Context for an ECRS-based file encoder that computes the Merkle-ish-CHK tree. More...

Collaboration diagram for GNUNET_FS_TreeEncoder:
[legend]

Data Fields

struct GNUNET_FS_Handleh
 Global FS context. More...
 
void * cls
 Closure for all callbacks. More...
 
GNUNET_FS_TreeBlockProcessor proc
 Function to call on encrypted blocks. More...
 
GNUNET_FS_TreeProgressCallback progress
 Function to call with progress information. More...
 
GNUNET_FS_DataReader reader
 Function to call to receive input data. More...
 
GNUNET_SCHEDULER_TaskCallback cont
 Function to call once we're done with processing. More...
 
char * emsg
 Set to an error message (if we had an error). More...
 
struct GNUNET_FS_Uriuri
 Set to the URI (upon successful completion) More...
 
uint64_t size
 Overall file size. More...
 
uint64_t publish_offset
 How far are we? More...
 
unsigned int current_depth
 How deep are we? Depth 0 is for the DBLOCKs. More...
 
unsigned int chk_tree_depth
 How deep is the tree? Always > 0. More...
 
struct ContentHashKeychk_tree
 In-memory cache of the current CHK tree. More...
 
int in_next
 Are we currently in 'GNUNET_FS_tree_encoder_next'? Flag used to prevent recursion. More...
 

Detailed Description

Context for an ECRS-based file encoder that computes the Merkle-ish-CHK tree.

Definition at line 35 of file fs_tree.c.

Field Documentation

◆ h

struct GNUNET_FS_Handle* GNUNET_FS_TreeEncoder::h

Global FS context.

Definition at line 40 of file fs_tree.c.

Referenced by GNUNET_FS_tree_encoder_create().

◆ cls

void* GNUNET_FS_TreeEncoder::cls

Closure for all callbacks.

Definition at line 45 of file fs_tree.c.

Referenced by GNUNET_FS_tree_encoder_create(), GNUNET_FS_tree_encoder_finish(), and GNUNET_FS_tree_encoder_next().

◆ proc

GNUNET_FS_TreeBlockProcessor GNUNET_FS_TreeEncoder::proc

Function to call on encrypted blocks.

Definition at line 50 of file fs_tree.c.

Referenced by GNUNET_FS_tree_encoder_create(), and GNUNET_FS_tree_encoder_next().

◆ progress

GNUNET_FS_TreeProgressCallback GNUNET_FS_TreeEncoder::progress

Function to call with progress information.

Definition at line 55 of file fs_tree.c.

Referenced by GNUNET_FS_tree_encoder_create(), and GNUNET_FS_tree_encoder_next().

◆ reader

GNUNET_FS_DataReader GNUNET_FS_TreeEncoder::reader

Function to call to receive input data.

Definition at line 60 of file fs_tree.c.

Referenced by GNUNET_FS_tree_encoder_create(), GNUNET_FS_tree_encoder_finish(), and GNUNET_FS_tree_encoder_next().

◆ cont

GNUNET_SCHEDULER_TaskCallback GNUNET_FS_TreeEncoder::cont

Function to call once we're done with processing.

Definition at line 65 of file fs_tree.c.

Referenced by GNUNET_FS_tree_encoder_create(), and GNUNET_FS_tree_encoder_next().

◆ emsg

char* GNUNET_FS_TreeEncoder::emsg

Set to an error message (if we had an error).

Definition at line 70 of file fs_tree.c.

Referenced by GNUNET_FS_tree_encoder_finish(), and GNUNET_FS_tree_encoder_next().

◆ uri

struct GNUNET_FS_Uri* GNUNET_FS_TreeEncoder::uri

Set to the URI (upon successful completion)

Definition at line 75 of file fs_tree.c.

Referenced by GNUNET_FS_tree_encoder_finish(), GNUNET_FS_tree_encoder_get_uri(), and GNUNET_FS_tree_encoder_next().

◆ size

uint64_t GNUNET_FS_TreeEncoder::size

Overall file size.

Definition at line 80 of file fs_tree.c.

Referenced by GNUNET_FS_tree_encoder_create(), and GNUNET_FS_tree_encoder_next().

◆ publish_offset

uint64_t GNUNET_FS_TreeEncoder::publish_offset

How far are we?

Definition at line 85 of file fs_tree.c.

Referenced by GNUNET_FS_tree_encoder_next().

◆ current_depth

unsigned int GNUNET_FS_TreeEncoder::current_depth

How deep are we? Depth 0 is for the DBLOCKs.

Definition at line 90 of file fs_tree.c.

Referenced by GNUNET_FS_tree_encoder_next().

◆ chk_tree_depth

unsigned int GNUNET_FS_TreeEncoder::chk_tree_depth

How deep is the tree? Always > 0.

Definition at line 95 of file fs_tree.c.

Referenced by GNUNET_FS_tree_encoder_create(), and GNUNET_FS_tree_encoder_next().

◆ chk_tree

struct ContentHashKey* GNUNET_FS_TreeEncoder::chk_tree

In-memory cache of the current CHK tree.

This struct will contain the CHK values from the root to the currently processed node in the tree as identified by "current_depth" and "publish_offset". The "chktree" will be initially NULL, then allocated to a sufficient number of entries for the size of the file and finally freed once the upload is complete.

Definition at line 108 of file fs_tree.c.

Referenced by GNUNET_FS_tree_encoder_create(), GNUNET_FS_tree_encoder_finish(), and GNUNET_FS_tree_encoder_next().

◆ in_next

int GNUNET_FS_TreeEncoder::in_next

Are we currently in 'GNUNET_FS_tree_encoder_next'? Flag used to prevent recursion.

Definition at line 114 of file fs_tree.c.

Referenced by GNUNET_FS_tree_encoder_finish(), and GNUNET_FS_tree_encoder_next().


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