|
libfossil
|
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"
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. | |
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.
| void* fsl_repo_extract_state::callbackState |
Client state passed to fsl_repo_extract().
Its interpretation is callback-implementation-dependent.
| 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.
| 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.
| struct { ... } fsl_repo_extract_state::count |
These counters can be used by an extraction callback to calculate a progress percentage.
| fsl_cx* fsl_repo_extract_state::f |
| 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.
| uint32_t fsl_repo_extract_state::fileCount |
| uint32_t fsl_repo_extract_state::fileNumber |
| 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().