\doxysubsection{job.\+h File Reference}
\label{job_8h}\index{job.h@{job.h}}


Generic state-\/machine interface.  


Include dependency graph for job.\+h\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{job_8h__incl}
\end{center}
\end{figure}
This graph shows which files directly or indirectly include this file\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{job_8h__dep__incl}
\end{center}
\end{figure}
\doxysubsubsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \mbox{\hyperlink{structrs__job}{rs\+\_\+job}}
\begin{DoxyCompactList}\small\item\em The contents of this structure are private. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \mbox{\hyperlink{job_8h_a4d281d644a0a999beb08c2353fd84279}{RS\+\_\+\+JOB\+\_\+\+TAG}}~20010225
\begin{DoxyCompactList}\small\item\em Magic job tag number for checking jobs have been initialized. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{job_8h_abdbdf5fbcdaed953e687867db175e4c5}{MAX\+\_\+\+DELTA\+\_\+\+CMD}}~(1$<$$<$16)
\begin{DoxyCompactList}\small\item\em Max length of a singled delta command is including command bytes. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{job_8h_ab715a4b7294c5fe2ae74765477a521dd}{rs\+\_\+job\+\_\+check}}(job)
\begin{DoxyCompactList}\small\item\em Assert that a job is valid. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{librsync_8h_add6622b38e3fa557301a190876d5ed4a}{rs\+\_\+job\+\_\+t}} $\ast$ \mbox{\hyperlink{job_8h_ad6121365900dae19a3747de04415616d}{rs\+\_\+job\+\_\+new}} (const char $\ast$, \mbox{\hyperlink{librsync_8h_a7feb858ceba3b8f3cf048d49be108253}{rs\+\_\+result}}($\ast$statefn)(\mbox{\hyperlink{librsync_8h_add6622b38e3fa557301a190876d5ed4a}{rs\+\_\+job\+\_\+t}} $\ast$))
\end{DoxyCompactItemize}


\doxysubsubsection{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.

\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{api_streaming}{Streaming API}} 

\mbox{\hyperlink{librsync_8h_aede8e0f42424b9aa29093f94b59ea029}{rs\+\_\+job\+\_\+iter()}} 

\mbox{\hyperlink{structrs__job}{rs\+\_\+job}} 
\end{DoxySeeAlso}


Definition in file \mbox{\hyperlink{job_8h_source}{job.\+h}}.



\doxysubsubsection{Macro Definition Documentation}
\mbox{\label{job_8h_a4d281d644a0a999beb08c2353fd84279}} 
\index{job.h@{job.h}!RS\_JOB\_TAG@{RS\_JOB\_TAG}}
\index{RS\_JOB\_TAG@{RS\_JOB\_TAG}!job.h@{job.h}}
\doxyparagraph{\texorpdfstring{RS\_JOB\_TAG}{RS\_JOB\_TAG}}
{\footnotesize\ttfamily \#define RS\+\_\+\+JOB\+\_\+\+TAG~20010225}



Magic job tag number for checking jobs have been initialized. 



Definition at line \mbox{\hyperlink{job_8h_source_l00039}{39}} of file \mbox{\hyperlink{job_8h_source}{job.\+h}}.

\mbox{\label{job_8h_abdbdf5fbcdaed953e687867db175e4c5}} 
\index{job.h@{job.h}!MAX\_DELTA\_CMD@{MAX\_DELTA\_CMD}}
\index{MAX\_DELTA\_CMD@{MAX\_DELTA\_CMD}!job.h@{job.h}}
\doxyparagraph{\texorpdfstring{MAX\_DELTA\_CMD}{MAX\_DELTA\_CMD}}
{\footnotesize\ttfamily \#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 \mbox{\hyperlink{job_8h_source_l00044}{44}} of file \mbox{\hyperlink{job_8h_source}{job.\+h}}.

\mbox{\label{job_8h_ab715a4b7294c5fe2ae74765477a521dd}} 
\index{job.h@{job.h}!rs\_job\_check@{rs\_job\_check}}
\index{rs\_job\_check@{rs\_job\_check}!job.h@{job.h}}
\doxyparagraph{\texorpdfstring{rs\_job\_check}{rs\_job\_check}}
{\footnotesize\ttfamily \#define rs\+\_\+job\+\_\+check(\begin{DoxyParamCaption}\item[{}]{job }\end{DoxyParamCaption})}

{\bfseries Value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{    \textcolor{keywordflow}{do} \{\(\backslash\)}
\DoxyCodeLine{    assert(job-\/>dogtag == RS\_JOB\_TAG);\(\backslash\)}
\DoxyCodeLine{\} \textcolor{keywordflow}{while} (0)}

\end{DoxyCode}


Assert that a job is valid. 

We don\textquotesingle{}t use a static inline function here so that assert failure output points at where \mbox{\hyperlink{job_8h_ab715a4b7294c5fe2ae74765477a521dd}{rs\+\_\+job\+\_\+check()}} was called from. 

Definition at line \mbox{\hyperlink{job_8h_source_l00130}{130}} of file \mbox{\hyperlink{job_8h_source}{job.\+h}}.



\doxysubsubsection{Function Documentation}
\mbox{\label{job_8h_ad6121365900dae19a3747de04415616d}} 
\index{job.h@{job.h}!rs\_job\_new@{rs\_job\_new}}
\index{rs\_job\_new@{rs\_job\_new}!job.h@{job.h}}
\doxyparagraph{\texorpdfstring{rs\_job\_new()}{rs\_job\_new()}}
{\footnotesize\ttfamily \mbox{\hyperlink{librsync_8h_add6622b38e3fa557301a190876d5ed4a}{rs\+\_\+job\+\_\+t}} $\ast$ rs\+\_\+job\+\_\+new (\begin{DoxyParamCaption}\item[{const char $\ast$}]{job\+\_\+name,  }\item[{\mbox{\hyperlink{librsync_8h_a7feb858ceba3b8f3cf048d49be108253}{rs\+\_\+result}}($\ast$)(\mbox{\hyperlink{librsync_8h_add6622b38e3fa557301a190876d5ed4a}{rs\+\_\+job\+\_\+t}} $\ast$)}]{statefn }\end{DoxyParamCaption})}



Definition at line \mbox{\hyperlink{job_8c_source_l00040}{40}} of file \mbox{\hyperlink{job_8c_source}{job.\+c}}.

