\doxysubsection{buf.\+h}
\label{buf_8h_source}\index{buf.h@{buf.h}}
\mbox{\hyperlink{buf_8h}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{00001 \textcolor{comment}{/*= -\/*-\/ c-\/basic-\/offset: 4; indent-\/tabs-\/mode: nil; -\/*-\/}}
\DoxyCodeLine{00002 \textcolor{comment}{ *}}
\DoxyCodeLine{00003 \textcolor{comment}{ * librsync -\/-\/ the library for network deltas}}
\DoxyCodeLine{00004 \textcolor{comment}{ *}}
\DoxyCodeLine{00005 \textcolor{comment}{ * Copyright (C) 2000, 2001 by Martin Pool <mbp@sourcefrog.net>}}
\DoxyCodeLine{00006 \textcolor{comment}{ *}}
\DoxyCodeLine{00007 \textcolor{comment}{ * This program is free software; you can redistribute it and/or}}
\DoxyCodeLine{00008 \textcolor{comment}{ * modify it under the terms of the GNU Lesser General Public License}}
\DoxyCodeLine{00009 \textcolor{comment}{ * as published by the Free Software Foundation; either version 2.1 of}}
\DoxyCodeLine{00010 \textcolor{comment}{ * the License, or (at your option) any later version.}}
\DoxyCodeLine{00011 \textcolor{comment}{ *}}
\DoxyCodeLine{00012 \textcolor{comment}{ * This program is distributed in the hope that it will be useful, but}}
\DoxyCodeLine{00013 \textcolor{comment}{ * WITHOUT ANY WARRANTY; without even the implied warranty of}}
\DoxyCodeLine{00014 \textcolor{comment}{ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU}}
\DoxyCodeLine{00015 \textcolor{comment}{ * Lesser General Public License for more details.}}
\DoxyCodeLine{00016 \textcolor{comment}{ *}}
\DoxyCodeLine{00017 \textcolor{comment}{ * You should have received a copy of the GNU Lesser General Public}}
\DoxyCodeLine{00018 \textcolor{comment}{ * License along with this program; if not, write to the Free Software}}
\DoxyCodeLine{00019 \textcolor{comment}{ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.}}
\DoxyCodeLine{00020 \textcolor{comment}{ */}}
\DoxyCodeLine{00021 \textcolor{comment}{}}
\DoxyCodeLine{00022 \textcolor{comment}{/** \(\backslash\)file buf.h}}
\DoxyCodeLine{00023 \textcolor{comment}{ * Buffers that map between stdio file streams and librsync streams.}}
\DoxyCodeLine{00024 \textcolor{comment}{ *}}
\DoxyCodeLine{00025 \textcolor{comment}{ * As the stream consumes input and produces output, it is refilled from}}
\DoxyCodeLine{00026 \textcolor{comment}{ * appropriate input and output FILEs. A dynamically allocated buffer of}}
\DoxyCodeLine{00027 \textcolor{comment}{ * configurable size is used as an intermediary.}}
\DoxyCodeLine{00028 \textcolor{comment}{ *}}
\DoxyCodeLine{00029 \textcolor{comment}{ * \(\backslash\)todo Perhaps be more efficient by filling the buffer on every call even if}}
\DoxyCodeLine{00030 \textcolor{comment}{ * not yet completely empty. Check that it's really our buffer, and shuffle}}
\DoxyCodeLine{00031 \textcolor{comment}{ * remaining data down to the front.}}
\DoxyCodeLine{00032 \textcolor{comment}{ *}}
\DoxyCodeLine{00033 \textcolor{comment}{ * \(\backslash\)todo Perhaps expose a routine for shuffling the buffers. */}}
\DoxyCodeLine{00034 \textcolor{preprocessor}{\#ifndef BUF\_H}}
\DoxyCodeLine{00035 \textcolor{preprocessor}{\#  define BUF\_H}}
\DoxyCodeLine{00036 }
\DoxyCodeLine{00037 \textcolor{preprocessor}{\#  include <stdio.h>}}
\DoxyCodeLine{00038 \textcolor{preprocessor}{\#  include "{}librsync.h"{}}}
\DoxyCodeLine{00039 }
\DoxyCodeLine{00040 \textcolor{keyword}{typedef} \textcolor{keyword}{struct }rs\_filebuf rs\_filebuf\_t;}
\DoxyCodeLine{00041 }
\DoxyCodeLine{00042 rs\_filebuf\_t *rs\_filebuf\_new(FILE *f, \textcolor{keywordtype}{size\_t} buf\_len);}
\DoxyCodeLine{00043 }
\DoxyCodeLine{00044 \textcolor{keywordtype}{void} rs\_filebuf\_free(rs\_filebuf\_t *fb);}
\DoxyCodeLine{00045 }
\DoxyCodeLine{00046 rs\_result rs\_infilebuf\_fill(rs\_job\_t *, rs\_buffers\_t *buf, \textcolor{keywordtype}{void} *fb);}
\DoxyCodeLine{00047 }
\DoxyCodeLine{00048 rs\_result rs\_outfilebuf\_drain(rs\_job\_t *, rs\_buffers\_t *, \textcolor{keywordtype}{void} *fb);}
\DoxyCodeLine{00049 }
\DoxyCodeLine{00050 \textcolor{preprocessor}{\#endif                          }\textcolor{comment}{/* !BUF\_H */}\textcolor{preprocessor}{}}

\end{DoxyCode}
