librsync  2.3.4
Data Structures | Macros | Functions
job.h File Reference

Generic state-machine interface. More...

Include dependency graph for job.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  rs_job
 The contents of this structure are private. More...
 

Macros

#define RS_JOB_TAG   20010225
 Magic job tag number for checking jobs have been initialized. More...
 
#define MAX_DELTA_CMD   (1<<16)
 Max length of a singled delta command is including command bytes. More...
 
#define rs_job_check(job)
 Assert that a job is valid. More...
 

Functions

rs_job_trs_job_new (const char *, rs_result(*statefn)(rs_job_t *))
 

Detailed Description

Generic state-machine interface.

The point of this is that we need to be able to suspend and resume processing at any point at which the buffers may block.

See also
Streaming API
rs_job_iter()
rs_job

Definition in file job.h.

Macro Definition Documentation

◆ RS_JOB_TAG

#define RS_JOB_TAG   20010225

Magic job tag number for checking jobs have been initialized.

Definition at line 39 of file job.h.

◆ MAX_DELTA_CMD

#define MAX_DELTA_CMD   (1<<16)

Max length of a singled delta command is including command bytes.

This is used to constrain and set the internal buffer sizes.

Definition at line 44 of file job.h.

◆ rs_job_check

#define rs_job_check (   job)
Value:
do {\
assert(job->dogtag == RS_JOB_TAG);\
} while (0)
#define RS_JOB_TAG
Magic job tag number for checking jobs have been initialized.
Definition: job.h:39

Assert that a job is valid.

We don't use a static inline function here so that assert failure output points at where rs_job_check() was called from.

Definition at line 130 of file job.h.

Function Documentation

◆ rs_job_new()

rs_job_t * rs_job_new ( const char *  job_name,
rs_result(*)(rs_job_t *)  statefn 
)

Definition at line 40 of file job.c.