Blame doc/liboggz/latex/oggz__io_8h.tex

Packit a38265
\section{oggz\_\-io.h File Reference}
Packit a38265
\label{oggz__io_8h}\index{oggz\_\-io.h@{oggz\_\-io.h}}
Packit a38265
Packit a38265
Packit a38265
Overriding the functions used for input and output of raw data.  
Packit a38265
Packit a38265
Packit a38265
\subsection*{Typedefs}
Packit a38265
\begin{DoxyCompactItemize}
Packit a38265
\item 
Packit a38265
typedef size\_\-t($\ast$ {\bf OggzIORead} )(void $\ast$user\_\-handle, void $\ast$buf, size\_\-t n)
Packit a38265
\begin{DoxyCompactList}\small\item\em This is the signature of a function which you provide for Oggz to call when it needs to acquire raw input data. \item\end{DoxyCompactList}\item 
Packit a38265
typedef size\_\-t($\ast$ {\bf OggzIOWrite} )(void $\ast$user\_\-handle, void $\ast$buf, size\_\-t n)
Packit a38265
\begin{DoxyCompactList}\small\item\em This is the signature of a function which you provide for Oggz to call when it needs to output raw data. \item\end{DoxyCompactList}\item 
Packit a38265
typedef int($\ast$ {\bf OggzIOSeek} )(void $\ast$user\_\-handle, long offset, int whence)
Packit a38265
\begin{DoxyCompactList}\small\item\em This is the signature of a function which you provide for Oggz to call when it needs to seek on the raw input or output data. \item\end{DoxyCompactList}\item 
Packit a38265
typedef long($\ast$ {\bf OggzIOTell} )(void $\ast$user\_\-handle)
Packit a38265
\begin{DoxyCompactList}\small\item\em This is the signature of a function which you provide for Oggz to call when it needs to determine the current offset of the raw input or output data. \item\end{DoxyCompactList}\item 
Packit a38265
typedef int($\ast$ {\bf OggzIOFlush} )(void $\ast$user\_\-handle)
Packit a38265
\begin{DoxyCompactList}\small\item\em This is the signature of a function which you provide for Oggz to call when it needs to flush the output data. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
Packit a38265
\subsection*{Functions}
Packit a38265
\begin{DoxyCompactItemize}
Packit a38265
\item 
Packit a38265
int {\bf oggz\_\-io\_\-set\_\-read} ({\bf OGGZ} $\ast$oggz, {\bf OggzIORead} read, void $\ast$user\_\-handle)
Packit a38265
\begin{DoxyCompactList}\small\item\em Set a function for Oggz to call when it needs to read input data. \item\end{DoxyCompactList}\item 
Packit a38265
void $\ast$ {\bf oggz\_\-io\_\-get\_\-read\_\-user\_\-handle} ({\bf OGGZ} $\ast$oggz)
Packit a38265
\begin{DoxyCompactList}\small\item\em Retrieve the user\_\-handle associated with the function you have provided for reading input data. \item\end{DoxyCompactList}\item 
Packit a38265
int {\bf oggz\_\-io\_\-set\_\-write} ({\bf OGGZ} $\ast$oggz, {\bf OggzIOWrite} write, void $\ast$user\_\-handle)
Packit a38265
\begin{DoxyCompactList}\small\item\em Set a function for Oggz to call when it needs to write output data. \item\end{DoxyCompactList}\item 
Packit a38265
void $\ast$ {\bf oggz\_\-io\_\-get\_\-write\_\-user\_\-handle} ({\bf OGGZ} $\ast$oggz)
Packit a38265
\begin{DoxyCompactList}\small\item\em Retrieve the user\_\-handle associated with the function you have provided for writing output data. \item\end{DoxyCompactList}\item 
Packit a38265
int {\bf oggz\_\-io\_\-set\_\-seek} ({\bf OGGZ} $\ast$oggz, {\bf OggzIOSeek} seek, void $\ast$user\_\-handle)
Packit a38265
\begin{DoxyCompactList}\small\item\em Set a function for Oggz to call when it needs to seek on its raw data. \item\end{DoxyCompactList}\item 
Packit a38265
void $\ast$ {\bf oggz\_\-io\_\-get\_\-seek\_\-user\_\-handle} ({\bf OGGZ} $\ast$oggz)
Packit a38265
\begin{DoxyCompactList}\small\item\em Retrieve the user\_\-handle associated with the function you have provided for seeking on input or output data. \item\end{DoxyCompactList}\item 
Packit a38265
int {\bf oggz\_\-io\_\-set\_\-tell} ({\bf OGGZ} $\ast$oggz, {\bf OggzIOTell} tell, void $\ast$user\_\-handle)
Packit a38265
\begin{DoxyCompactList}\small\item\em Set a function for Oggz to call when it needs to determine the offset within its input data (if OGGZ\_\-READ) or output data (if OGGZ\_\-WRITE). \item\end{DoxyCompactList}\item 
Packit a38265
void $\ast$ {\bf oggz\_\-io\_\-get\_\-tell\_\-user\_\-handle} ({\bf OGGZ} $\ast$oggz)
Packit a38265
\begin{DoxyCompactList}\small\item\em Retrieve the user\_\-handle associated with the function you have provided for determining the current offset in input or output data. \item\end{DoxyCompactList}\item 
Packit a38265
int {\bf oggz\_\-io\_\-set\_\-flush} ({\bf OGGZ} $\ast$oggz, {\bf OggzIOFlush} flush, void $\ast$user\_\-handle)
Packit a38265
\begin{DoxyCompactList}\small\item\em Set a function for Oggz to call when it needs to flush its output. \item\end{DoxyCompactList}\item 
Packit a38265
void $\ast$ {\bf oggz\_\-io\_\-get\_\-flush\_\-user\_\-handle} ({\bf OGGZ} $\ast$oggz)
Packit a38265
\begin{DoxyCompactList}\small\item\em Retrieve the user\_\-handle associated with the function you have provided for flushing output. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
Packit a38265
Packit a38265
Packit a38265
\subsection{Detailed Description}
Packit a38265
Overriding the functions used for input and output of raw data. OggzIO provides a way of overriding the functions Oggz uses to access its raw input or output data. This is required in many situations where the raw stream cannot be accessed via stdio, but can be accessed by other means. This is typically useful within media frameworks, where accessing and moving around in the data is possible only using methods provided by the framework.
Packit a38265
Packit a38265
The functions you provide for overriding IO will be used by Oggz whenever you call \doxyref{oggz\_\-read()}{p.}{group__read__api_ga3ce7a31de5da56375057436c6b5108f2} or \doxyref{oggz\_\-write()}{p.}{group__write__api_ga3c97d94ea425d64546adf9c368b71904}. They will also be used repeatedly by Oggz when you call \doxyref{oggz\_\-seek()}{p.}{group__seek__api_gaeef4b261d443701207954e5a636d6817}.
Packit a38265
Packit a38265
\begin{DoxyNote}{Note}
Packit a38265
Opening a file with \doxyref{oggz\_\-open()}{p.}{oggz_8h_a65197cdd03f755f7ebfabf2fdff4c7db} or \doxyref{oggz\_\-open\_\-stdio()}{p.}{oggz_8h_ac49e9de0bc4ef1d91b43b13605f98b19} is equivalent to calling \doxyref{oggz\_\-new()}{p.}{oggz_8h_a6eb34d123389ae38d993601f9e7bb9d6} and setting stdio based functions for data IO. 
Packit a38265
\end{DoxyNote}
Packit a38265
Packit a38265
Packit a38265
\subsection{Typedef Documentation}
Packit a38265
\index{oggz\_\-io.h@{oggz\_\-io.h}!OggzIOFlush@{OggzIOFlush}}
Packit a38265
\index{OggzIOFlush@{OggzIOFlush}!oggz_io.h@{oggz\_\-io.h}}
Packit a38265
\subsubsection[{OggzIOFlush}]{\setlength{\rightskip}{0pt plus 5cm}typedef int($\ast$ {\bf OggzIOFlush})(void $\ast$user\_\-handle)}\label{oggz__io_8h_a2d41d748db3b60bb25f716bcebf2f1e3}
Packit a38265
Packit a38265
Packit a38265
This is the signature of a function which you provide for Oggz to call when it needs to flush the output data. 
Packit a38265
Packit a38265
The behaviour of this function is similar to that of fflush() in stdio.
Packit a38265
Packit a38265
Packit a38265
\begin{DoxyParams}{Parameters}
Packit a38265
\item[{\em user\_\-handle}]A generic pointer you have provided earlier \end{DoxyParams}
Packit a38265
Packit a38265
\begin{DoxyRetVals}{Return values}
Packit a38265
\item[{\em 0}]Success \item[{\em $<$  0}]An error condition \end{DoxyRetVals}
Packit a38265
\index{oggz\_\-io.h@{oggz\_\-io.h}!OggzIORead@{OggzIORead}}
Packit a38265
\index{OggzIORead@{OggzIORead}!oggz_io.h@{oggz\_\-io.h}}
Packit a38265
\subsubsection[{OggzIORead}]{\setlength{\rightskip}{0pt plus 5cm}typedef size\_\-t($\ast$ {\bf OggzIORead})(void $\ast$user\_\-handle, void $\ast$buf, size\_\-t n)}\label{oggz__io_8h_ae4995dabd7027c5a2273fe6db94c4733}
Packit a38265
Packit a38265
Packit a38265
This is the signature of a function which you provide for Oggz to call when it needs to acquire raw input data. 
Packit a38265
Packit a38265
Packit a38265
\begin{DoxyParams}{Parameters}
Packit a38265
\item[{\em user\_\-handle}]A generic pointer you have provided earlier \item[{\em n}]The length in bytes that Oggz wants to read \item[{\em buf}]The buffer that you read data into \end{DoxyParams}
Packit a38265
Packit a38265
\begin{DoxyRetVals}{Return values}
Packit a38265
\item[{\em $>$  0}]The number of bytes successfully read into the buffer \item[{\em 0}]to indicate that there is no more data to read (End of file) \item[{\em $<$  0}]An error condition \end{DoxyRetVals}
Packit a38265
\index{oggz\_\-io.h@{oggz\_\-io.h}!OggzIOSeek@{OggzIOSeek}}
Packit a38265
\index{OggzIOSeek@{OggzIOSeek}!oggz_io.h@{oggz\_\-io.h}}
Packit a38265
\subsubsection[{OggzIOSeek}]{\setlength{\rightskip}{0pt plus 5cm}typedef int($\ast$ {\bf OggzIOSeek})(void $\ast$user\_\-handle, long offset, int whence)}\label{oggz__io_8h_ab92c1e4e1bc98165cb7e9a0920a09b75}
Packit a38265
Packit a38265
Packit a38265
This is the signature of a function which you provide for Oggz to call when it needs to seek on the raw input or output data. 
Packit a38265
Packit a38265
Packit a38265
\begin{DoxyParams}{Parameters}
Packit a38265
\item[{\em user\_\-handle}]A generic pointer you have provided earlier \item[{\em offset}]The offset in bytes to seek to \item[{\em whence}]SEEK\_\-SET, SEEK\_\-CUR or SEEK\_\-END (as for stdio.h) \end{DoxyParams}
Packit a38265
Packit a38265
\begin{DoxyRetVals}{Return values}
Packit a38265
\item[{\em $>$= 0}]The offset seeked to \item[{\em $<$  0}]An error condition\end{DoxyRetVals}
Packit a38265
\begin{DoxyNote}{Note}
Packit a38265
If you provide an OggzIOSeek function, you MUST also provide an OggzIOTell function, or else all your seeks will fail. 
Packit a38265
\end{DoxyNote}
Packit a38265
\index{oggz\_\-io.h@{oggz\_\-io.h}!OggzIOTell@{OggzIOTell}}
Packit a38265
\index{OggzIOTell@{OggzIOTell}!oggz_io.h@{oggz\_\-io.h}}
Packit a38265
\subsubsection[{OggzIOTell}]{\setlength{\rightskip}{0pt plus 5cm}typedef long($\ast$ {\bf OggzIOTell})(void $\ast$user\_\-handle)}\label{oggz__io_8h_adac7e4773781ad067f0591e1699fd669}
Packit a38265
Packit a38265
Packit a38265
This is the signature of a function which you provide for Oggz to call when it needs to determine the current offset of the raw input or output data. 
Packit a38265
Packit a38265
Packit a38265
\begin{DoxyParams}{Parameters}
Packit a38265
\item[{\em user\_\-handle}]A generic pointer you have provided earlier \end{DoxyParams}
Packit a38265
Packit a38265
\begin{DoxyRetVals}{Return values}
Packit a38265
\item[{\em $>$= 0}]The offset \item[{\em $<$  0}]An error condition \end{DoxyRetVals}
Packit a38265
\index{oggz\_\-io.h@{oggz\_\-io.h}!OggzIOWrite@{OggzIOWrite}}
Packit a38265
\index{OggzIOWrite@{OggzIOWrite}!oggz_io.h@{oggz\_\-io.h}}
Packit a38265
\subsubsection[{OggzIOWrite}]{\setlength{\rightskip}{0pt plus 5cm}typedef size\_\-t($\ast$ {\bf OggzIOWrite})(void $\ast$user\_\-handle, void $\ast$buf, size\_\-t n)}\label{oggz__io_8h_a0274a389b81ba93dae32d3d2fe39637f}
Packit a38265
Packit a38265
Packit a38265
This is the signature of a function which you provide for Oggz to call when it needs to output raw data. 
Packit a38265
Packit a38265
Packit a38265
\begin{DoxyParams}{Parameters}
Packit a38265
\item[{\em user\_\-handle}]A generic pointer you have provided earlier \item[{\em n}]The length in bytes of the data \item[{\em buf}]A buffer containing data to write \end{DoxyParams}
Packit a38265
Packit a38265
\begin{DoxyRetVals}{Return values}
Packit a38265
\item[{\em $>$= 0}]The number of bytes successfully written (may be less than {\itshape n\/} if a write error has occurred) \item[{\em $<$  0}]An error condition \end{DoxyRetVals}
Packit a38265
Packit a38265
Packit a38265
\subsection{Function Documentation}
Packit a38265
\index{oggz\_\-io.h@{oggz\_\-io.h}!oggz\_\-io\_\-get\_\-flush\_\-user\_\-handle@{oggz\_\-io\_\-get\_\-flush\_\-user\_\-handle}}
Packit a38265
\index{oggz\_\-io\_\-get\_\-flush\_\-user\_\-handle@{oggz\_\-io\_\-get\_\-flush\_\-user\_\-handle}!oggz_io.h@{oggz\_\-io.h}}
Packit a38265
\subsubsection[{oggz\_\-io\_\-get\_\-flush\_\-user\_\-handle}]{\setlength{\rightskip}{0pt plus 5cm}void$\ast$ oggz\_\-io\_\-get\_\-flush\_\-user\_\-handle ({\bf OGGZ} $\ast$ {\em oggz})}\label{oggz__io_8h_a6150bee0cc28c68553bdcc6d020f6932}
Packit a38265
Packit a38265
Packit a38265
Retrieve the user\_\-handle associated with the function you have provided for flushing output. 
Packit a38265
Packit a38265
Packit a38265
\begin{DoxyParams}{Parameters}
Packit a38265
\item[{\em oggz}]An OGGZ handle \end{DoxyParams}
Packit a38265
\begin{DoxyReturn}{Returns}
Packit a38265
the associated user\_\-handle 
Packit a38265
\end{DoxyReturn}
Packit a38265
\index{oggz\_\-io.h@{oggz\_\-io.h}!oggz\_\-io\_\-get\_\-read\_\-user\_\-handle@{oggz\_\-io\_\-get\_\-read\_\-user\_\-handle}}
Packit a38265
\index{oggz\_\-io\_\-get\_\-read\_\-user\_\-handle@{oggz\_\-io\_\-get\_\-read\_\-user\_\-handle}!oggz_io.h@{oggz\_\-io.h}}
Packit a38265
\subsubsection[{oggz\_\-io\_\-get\_\-read\_\-user\_\-handle}]{\setlength{\rightskip}{0pt plus 5cm}void$\ast$ oggz\_\-io\_\-get\_\-read\_\-user\_\-handle ({\bf OGGZ} $\ast$ {\em oggz})}\label{oggz__io_8h_af5bbd37e9a390e3c282fdc8bfadc43f6}
Packit a38265
Packit a38265
Packit a38265
Retrieve the user\_\-handle associated with the function you have provided for reading input data. 
Packit a38265
Packit a38265
Packit a38265
\begin{DoxyParams}{Parameters}
Packit a38265
\item[{\em oggz}]An OGGZ handle \end{DoxyParams}
Packit a38265
\begin{DoxyReturn}{Returns}
Packit a38265
the associated user\_\-handle 
Packit a38265
\end{DoxyReturn}
Packit a38265
\index{oggz\_\-io.h@{oggz\_\-io.h}!oggz\_\-io\_\-get\_\-seek\_\-user\_\-handle@{oggz\_\-io\_\-get\_\-seek\_\-user\_\-handle}}
Packit a38265
\index{oggz\_\-io\_\-get\_\-seek\_\-user\_\-handle@{oggz\_\-io\_\-get\_\-seek\_\-user\_\-handle}!oggz_io.h@{oggz\_\-io.h}}
Packit a38265
\subsubsection[{oggz\_\-io\_\-get\_\-seek\_\-user\_\-handle}]{\setlength{\rightskip}{0pt plus 5cm}void$\ast$ oggz\_\-io\_\-get\_\-seek\_\-user\_\-handle ({\bf OGGZ} $\ast$ {\em oggz})}\label{oggz__io_8h_a718ea817110f0d94d9d6f3a457707a08}
Packit a38265
Packit a38265
Packit a38265
Retrieve the user\_\-handle associated with the function you have provided for seeking on input or output data. 
Packit a38265
Packit a38265
Packit a38265
\begin{DoxyParams}{Parameters}
Packit a38265
\item[{\em oggz}]An OGGZ handle \end{DoxyParams}
Packit a38265
\begin{DoxyReturn}{Returns}
Packit a38265
the associated user\_\-handle 
Packit a38265
\end{DoxyReturn}
Packit a38265
\index{oggz\_\-io.h@{oggz\_\-io.h}!oggz\_\-io\_\-get\_\-tell\_\-user\_\-handle@{oggz\_\-io\_\-get\_\-tell\_\-user\_\-handle}}
Packit a38265
\index{oggz\_\-io\_\-get\_\-tell\_\-user\_\-handle@{oggz\_\-io\_\-get\_\-tell\_\-user\_\-handle}!oggz_io.h@{oggz\_\-io.h}}
Packit a38265
\subsubsection[{oggz\_\-io\_\-get\_\-tell\_\-user\_\-handle}]{\setlength{\rightskip}{0pt plus 5cm}void$\ast$ oggz\_\-io\_\-get\_\-tell\_\-user\_\-handle ({\bf OGGZ} $\ast$ {\em oggz})}\label{oggz__io_8h_a54b69e5159280c1224025df925e67b50}
Packit a38265
Packit a38265
Packit a38265
Retrieve the user\_\-handle associated with the function you have provided for determining the current offset in input or output data. 
Packit a38265
Packit a38265
Packit a38265
\begin{DoxyParams}{Parameters}
Packit a38265
\item[{\em oggz}]An OGGZ handle \end{DoxyParams}
Packit a38265
\begin{DoxyReturn}{Returns}
Packit a38265
the associated user\_\-handle 
Packit a38265
\end{DoxyReturn}
Packit a38265
\index{oggz\_\-io.h@{oggz\_\-io.h}!oggz\_\-io\_\-get\_\-write\_\-user\_\-handle@{oggz\_\-io\_\-get\_\-write\_\-user\_\-handle}}
Packit a38265
\index{oggz\_\-io\_\-get\_\-write\_\-user\_\-handle@{oggz\_\-io\_\-get\_\-write\_\-user\_\-handle}!oggz_io.h@{oggz\_\-io.h}}
Packit a38265
\subsubsection[{oggz\_\-io\_\-get\_\-write\_\-user\_\-handle}]{\setlength{\rightskip}{0pt plus 5cm}void$\ast$ oggz\_\-io\_\-get\_\-write\_\-user\_\-handle ({\bf OGGZ} $\ast$ {\em oggz})}\label{oggz__io_8h_a024a62f080f1b64c465b0bf475ebfd2e}
Packit a38265
Packit a38265
Packit a38265
Retrieve the user\_\-handle associated with the function you have provided for writing output data. 
Packit a38265
Packit a38265
Packit a38265
\begin{DoxyParams}{Parameters}
Packit a38265
\item[{\em oggz}]An OGGZ handle \end{DoxyParams}
Packit a38265
\begin{DoxyReturn}{Returns}
Packit a38265
the associated user\_\-handle 
Packit a38265
\end{DoxyReturn}
Packit a38265
\index{oggz\_\-io.h@{oggz\_\-io.h}!oggz\_\-io\_\-set\_\-flush@{oggz\_\-io\_\-set\_\-flush}}
Packit a38265
\index{oggz\_\-io\_\-set\_\-flush@{oggz\_\-io\_\-set\_\-flush}!oggz_io.h@{oggz\_\-io.h}}
Packit a38265
\subsubsection[{oggz\_\-io\_\-set\_\-flush}]{\setlength{\rightskip}{0pt plus 5cm}int oggz\_\-io\_\-set\_\-flush ({\bf OGGZ} $\ast$ {\em oggz}, \/  {\bf OggzIOFlush} {\em flush}, \/  void $\ast$ {\em user\_\-handle})}\label{oggz__io_8h_af45a2d33c7e17d1b64f794b32d69e7da}
Packit a38265
Packit a38265
Packit a38265
Set a function for Oggz to call when it needs to flush its output. 
Packit a38265
Packit a38265
The meaning of this is similar to that of fflush() in stdio.
Packit a38265
Packit a38265
Packit a38265
\begin{DoxyParams}{Parameters}
Packit a38265
\item[{\em oggz}]An OGGZ handle \item[{\em flush}]Your flushing function \item[{\em user\_\-handle}]Any arbitrary data you wish to pass to the function \end{DoxyParams}
Packit a38265
Packit a38265
\begin{DoxyRetVals}{Return values}
Packit a38265
\item[{\em 0}]Success \item[{\em OGGZ\_\-ERR\_\-BAD\_\-OGGZ}]{\itshape oggz\/} does not refer to an existing OGGZ \item[{\em OGGZ\_\-ERR\_\-INVALID}]Operation not suitable for this OGGZ; {\itshape oggz\/} not open for writing. \item[{\em OGGZ\_\-ERR\_\-OUT\_\-OF\_\-MEMORY}]Out of memory \end{DoxyRetVals}
Packit a38265
\index{oggz\_\-io.h@{oggz\_\-io.h}!oggz\_\-io\_\-set\_\-read@{oggz\_\-io\_\-set\_\-read}}
Packit a38265
\index{oggz\_\-io\_\-set\_\-read@{oggz\_\-io\_\-set\_\-read}!oggz_io.h@{oggz\_\-io.h}}
Packit a38265
\subsubsection[{oggz\_\-io\_\-set\_\-read}]{\setlength{\rightskip}{0pt plus 5cm}int oggz\_\-io\_\-set\_\-read ({\bf OGGZ} $\ast$ {\em oggz}, \/  {\bf OggzIORead} {\em read}, \/  void $\ast$ {\em user\_\-handle})}\label{oggz__io_8h_a640ecb60fcee9323f1f735ad23f7abc4}
Packit a38265
Packit a38265
Packit a38265
Set a function for Oggz to call when it needs to read input data. 
Packit a38265
Packit a38265
Packit a38265
\begin{DoxyParams}{Parameters}
Packit a38265
\item[{\em oggz}]An OGGZ handle \item[{\em read}]Your reading function \item[{\em user\_\-handle}]Any arbitrary data you wish to pass to the function \end{DoxyParams}
Packit a38265
Packit a38265
\begin{DoxyRetVals}{Return values}
Packit a38265
\item[{\em 0}]Success \item[{\em OGGZ\_\-ERR\_\-BAD\_\-OGGZ}]{\itshape oggz\/} does not refer to an existing OGGZ \item[{\em OGGZ\_\-ERR\_\-INVALID}]Operation not suitable for this OGGZ; {\itshape oggz\/} not open for reading. \item[{\em OGGZ\_\-ERR\_\-OUT\_\-OF\_\-MEMORY}]Out of memory \end{DoxyRetVals}
Packit a38265
\index{oggz\_\-io.h@{oggz\_\-io.h}!oggz\_\-io\_\-set\_\-seek@{oggz\_\-io\_\-set\_\-seek}}
Packit a38265
\index{oggz\_\-io\_\-set\_\-seek@{oggz\_\-io\_\-set\_\-seek}!oggz_io.h@{oggz\_\-io.h}}
Packit a38265
\subsubsection[{oggz\_\-io\_\-set\_\-seek}]{\setlength{\rightskip}{0pt plus 5cm}int oggz\_\-io\_\-set\_\-seek ({\bf OGGZ} $\ast$ {\em oggz}, \/  {\bf OggzIOSeek} {\em seek}, \/  void $\ast$ {\em user\_\-handle})}\label{oggz__io_8h_a8482fb0783df2621e811c14d642b01fc}
Packit a38265
Packit a38265
Packit a38265
Set a function for Oggz to call when it needs to seek on its raw data. 
Packit a38265
Packit a38265
Packit a38265
\begin{DoxyParams}{Parameters}
Packit a38265
\item[{\em oggz}]An OGGZ handle \item[{\em seek}]Your seeking function \item[{\em user\_\-handle}]Any arbitrary data you wish to pass to the function \end{DoxyParams}
Packit a38265
Packit a38265
\begin{DoxyRetVals}{Return values}
Packit a38265
\item[{\em 0}]Success \item[{\em OGGZ\_\-ERR\_\-BAD\_\-OGGZ}]{\itshape oggz\/} does not refer to an existing OGGZ \item[{\em OGGZ\_\-ERR\_\-INVALID}]Operation not suitable for this OGGZ \item[{\em OGGZ\_\-ERR\_\-OUT\_\-OF\_\-MEMORY}]Out of memory\end{DoxyRetVals}
Packit a38265
\begin{DoxyNote}{Note}
Packit a38265
If you provide an OggzIOSeek function, you MUST also provide an OggzIOTell function, or else all your seeks will fail. 
Packit a38265
\end{DoxyNote}
Packit a38265
\index{oggz\_\-io.h@{oggz\_\-io.h}!oggz\_\-io\_\-set\_\-tell@{oggz\_\-io\_\-set\_\-tell}}
Packit a38265
\index{oggz\_\-io\_\-set\_\-tell@{oggz\_\-io\_\-set\_\-tell}!oggz_io.h@{oggz\_\-io.h}}
Packit a38265
\subsubsection[{oggz\_\-io\_\-set\_\-tell}]{\setlength{\rightskip}{0pt plus 5cm}int oggz\_\-io\_\-set\_\-tell ({\bf OGGZ} $\ast$ {\em oggz}, \/  {\bf OggzIOTell} {\em tell}, \/  void $\ast$ {\em user\_\-handle})}\label{oggz__io_8h_ad97da84267d72ab9abf8dbb9ff5e8931}
Packit a38265
Packit a38265
Packit a38265
Set a function for Oggz to call when it needs to determine the offset within its input data (if OGGZ\_\-READ) or output data (if OGGZ\_\-WRITE). 
Packit a38265
Packit a38265
Packit a38265
\begin{DoxyParams}{Parameters}
Packit a38265
\item[{\em oggz}]An OGGZ handle \item[{\em tell}]Your tell function \item[{\em user\_\-handle}]Any arbitrary data you wish to pass to the function \end{DoxyParams}
Packit a38265
Packit a38265
\begin{DoxyRetVals}{Return values}
Packit a38265
\item[{\em 0}]Success \item[{\em OGGZ\_\-ERR\_\-BAD\_\-OGGZ}]{\itshape oggz\/} does not refer to an existing OGGZ \item[{\em OGGZ\_\-ERR\_\-INVALID}]Operation not suitable for this OGGZ \item[{\em OGGZ\_\-ERR\_\-OUT\_\-OF\_\-MEMORY}]Out of memory \end{DoxyRetVals}
Packit a38265
\index{oggz\_\-io.h@{oggz\_\-io.h}!oggz\_\-io\_\-set\_\-write@{oggz\_\-io\_\-set\_\-write}}
Packit a38265
\index{oggz\_\-io\_\-set\_\-write@{oggz\_\-io\_\-set\_\-write}!oggz_io.h@{oggz\_\-io.h}}
Packit a38265
\subsubsection[{oggz\_\-io\_\-set\_\-write}]{\setlength{\rightskip}{0pt plus 5cm}int oggz\_\-io\_\-set\_\-write ({\bf OGGZ} $\ast$ {\em oggz}, \/  {\bf OggzIOWrite} {\em write}, \/  void $\ast$ {\em user\_\-handle})}\label{oggz__io_8h_af92f5b20bb5f247b5302dfc8b4edfbee}
Packit a38265
Packit a38265
Packit a38265
Set a function for Oggz to call when it needs to write output data. 
Packit a38265
Packit a38265
Packit a38265
\begin{DoxyParams}{Parameters}
Packit a38265
\item[{\em oggz}]An OGGZ handle \item[{\em write}]Your writing function \item[{\em user\_\-handle}]Any arbitrary data you wish to pass to the function \end{DoxyParams}
Packit a38265
Packit a38265
\begin{DoxyRetVals}{Return values}
Packit a38265
\item[{\em 0}]Success \item[{\em OGGZ\_\-ERR\_\-BAD\_\-OGGZ}]{\itshape oggz\/} does not refer to an existing OGGZ \item[{\em OGGZ\_\-ERR\_\-INVALID}]Operation not suitable for this OGGZ; {\itshape oggz\/} not open for writing. \item[{\em OGGZ\_\-ERR\_\-OUT\_\-OF\_\-MEMORY}]Out of memory \end{DoxyRetVals}