libfossil
fsl_repo_extract_state Struct Reference

Callback state for use with fsl_repo_extract_f() implementations to stream a given version of a repository's file's, one file at a time, to a client. More...

#include "repo.h"

Collaboration diagram for fsl_repo_extract_state:

Data Fields

void * callbackState
 Client state passed to fsl_repo_extract().
fsl_id_t checkinRid
 RID of the checkin version for this file.
fsl_buffer const * content
 If the fsl_repo_extract_opt object which was used to initiate the current extraction has the extractContent member set to false, this will be a NULL pointer.
struct { 
   uint32_t   fileCount 
 Total number of files to extract. More...
   uint32_t   fileNumber 
 The current file number, starting at 1. More...
} count
 These counters can be used by an extraction callback to calculate a progress percentage.
fsl_cx * f
 The associated Fossil context.
fsl_card_F const * fCard
 The F-card being iterated over.
fsl_id_t fileRid
 File-level blob.rid for fc.

Detailed Description

Callback state for use with fsl_repo_extract_f() implementations to stream a given version of a repository's file's, one file at a time, to a client.

Instances are never created by client code, only by fsl_repo_extract() and its delegates, which pass them to client-provided fsl_repo_extract_f() functions.

Definition at line 2509 of file repo.h.

Field Documentation

◆ callbackState

void* fsl_repo_extract_state::callbackState

Client state passed to fsl_repo_extract().

Its interpretation is callback-implementation-dependent.

Definition at line 2529 of file repo.h.

◆ checkinRid

fsl_id_t fsl_repo_extract_state::checkinRid

RID of the checkin version for this file.

For a given call to fsl_repo_extract(), this number will be the same across all calls to the callback function.

Definition at line 2519 of file repo.h.

◆ content

fsl_buffer const* fsl_repo_extract_state::content

If the fsl_repo_extract_opt object which was used to initiate the current extraction has the extractContent member set to false, this will be a NULL pointer.

If it's true, this member points to a transient buffer which holds the full, undelta'd/uncompressed content of fc's file record. The content bytes are owned by fsl_repo_extract() and are invalidated as soon as this callback returns, so the callback must copy/consume them immediately if needed.

Definition at line 2562 of file repo.h.

◆ [struct]

struct { ... } fsl_repo_extract_state::count

These counters can be used by an extraction callback to calculate a progress percentage.

◆ f

fsl_cx* fsl_repo_extract_state::f

The associated Fossil context.

Definition at line 2513 of file repo.h.

◆ fCard

fsl_card_F const* fsl_repo_extract_state::fCard

The F-card being iterated over.

This holds the repo-level metadata associated with the file, other than its RID, which is available via this->fileRid.

Deleted files are NOT reported via the extraction process because reporting them accurately is trickier and more expensive than it could be. Thus this member's uuid field will always be non-NULL.

Certain operations which use this class, e.g. fsl_repo_ckout() and fsl_ckout_update(), will temporarily synthesize an F-card to represent the state of a file update, in which case this object's contents might not 100% reflect any given db-side state. e.g. fsl_ckout_update() synthesizes an F-card which reflects the current state of a file after applying an update operation to it. In such cases, the fCard->uuid may refer to a repository-side file even though the hash of the on-disk file contents may differ because of, e.g., a merge.

Definition at line 2550 of file repo.h.

◆ fileCount

uint32_t fsl_repo_extract_state::fileCount

Total number of files to extract.

Definition at line 2572 of file repo.h.

◆ fileNumber

uint32_t fsl_repo_extract_state::fileNumber

The current file number, starting at 1.

Definition at line 2570 of file repo.h.

◆ fileRid

fsl_id_t fsl_repo_extract_state::fileRid

File-level blob.rid for fc.

Can be used with, e.g., fsl_mtime_of_manifest_file().

Definition at line 2524 of file repo.h.


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