\doxysection{oggz\+\_\+io.\+h File Reference}
\label{oggz__io_8h}\index{oggz\_io.h@{oggz\_io.h}}


Overriding the functions used for input and output of raw data.  


\doxysubsubsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
typedef size\+\_\+t($\ast$ \textbf{ Oggz\+IORead}) (void $\ast$user\+\_\+handle, void $\ast$buf, size\+\_\+t n)
\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. \end{DoxyCompactList}\item 
typedef size\+\_\+t($\ast$ \textbf{ Oggz\+IOWrite}) (void $\ast$user\+\_\+handle, void $\ast$buf, size\+\_\+t n)
\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. \end{DoxyCompactList}\item 
typedef int($\ast$ \textbf{ Oggz\+IOSeek}) (void $\ast$user\+\_\+handle, long offset, int whence)
\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. \end{DoxyCompactList}\item 
typedef long($\ast$ \textbf{ Oggz\+IOTell}) (void $\ast$user\+\_\+handle)
\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. \end{DoxyCompactList}\item 
typedef int($\ast$ \textbf{ Oggz\+IOFlush}) (void $\ast$user\+\_\+handle)
\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. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
int \textbf{ oggz\+\_\+io\+\_\+set\+\_\+read} (\textbf{ OGGZ} $\ast$oggz, \textbf{ Oggz\+IORead} read, void $\ast$user\+\_\+handle)
\begin{DoxyCompactList}\small\item\em Set a function for Oggz to call when it needs to read input data. \end{DoxyCompactList}\item 
void $\ast$ \textbf{ oggz\+\_\+io\+\_\+get\+\_\+read\+\_\+user\+\_\+handle} (\textbf{ OGGZ} $\ast$oggz)
\begin{DoxyCompactList}\small\item\em Retrieve the user\+\_\+handle associated with the function you have provided for reading input data. \end{DoxyCompactList}\item 
int \textbf{ oggz\+\_\+io\+\_\+set\+\_\+write} (\textbf{ OGGZ} $\ast$oggz, \textbf{ Oggz\+IOWrite} write, void $\ast$user\+\_\+handle)
\begin{DoxyCompactList}\small\item\em Set a function for Oggz to call when it needs to write output data. \end{DoxyCompactList}\item 
void $\ast$ \textbf{ oggz\+\_\+io\+\_\+get\+\_\+write\+\_\+user\+\_\+handle} (\textbf{ OGGZ} $\ast$oggz)
\begin{DoxyCompactList}\small\item\em Retrieve the user\+\_\+handle associated with the function you have provided for writing output data. \end{DoxyCompactList}\item 
int \textbf{ oggz\+\_\+io\+\_\+set\+\_\+seek} (\textbf{ OGGZ} $\ast$oggz, \textbf{ Oggz\+IOSeek} seek, void $\ast$user\+\_\+handle)
\begin{DoxyCompactList}\small\item\em Set a function for Oggz to call when it needs to seek on its raw data. \end{DoxyCompactList}\item 
void $\ast$ \textbf{ oggz\+\_\+io\+\_\+get\+\_\+seek\+\_\+user\+\_\+handle} (\textbf{ OGGZ} $\ast$oggz)
\begin{DoxyCompactList}\small\item\em Retrieve the user\+\_\+handle associated with the function you have provided for seeking on input or output data. \end{DoxyCompactList}\item 
int \textbf{ oggz\+\_\+io\+\_\+set\+\_\+tell} (\textbf{ OGGZ} $\ast$oggz, \textbf{ Oggz\+IOTell} tell, void $\ast$user\+\_\+handle)
\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). \end{DoxyCompactList}\item 
void $\ast$ \textbf{ oggz\+\_\+io\+\_\+get\+\_\+tell\+\_\+user\+\_\+handle} (\textbf{ OGGZ} $\ast$oggz)
\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. \end{DoxyCompactList}\item 
int \textbf{ oggz\+\_\+io\+\_\+set\+\_\+flush} (\textbf{ OGGZ} $\ast$oggz, \textbf{ Oggz\+IOFlush} flush, void $\ast$user\+\_\+handle)
\begin{DoxyCompactList}\small\item\em Set a function for Oggz to call when it needs to flush its output. \end{DoxyCompactList}\item 
void $\ast$ \textbf{ oggz\+\_\+io\+\_\+get\+\_\+flush\+\_\+user\+\_\+handle} (\textbf{ OGGZ} $\ast$oggz)
\begin{DoxyCompactList}\small\item\em Retrieve the user\+\_\+handle associated with the function you have provided for flushing output. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Overriding the functions used for input and output of raw data. 

Oggz\+IO 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.

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}.

\begin{DoxyNote}{Note}
Opening a file with \doxyref{oggz\+\_\+open()}{p.}{oggz_8h_a558cdcfc23c139d8f87312dc34f6e5b6} or \doxyref{oggz\+\_\+open\+\_\+stdio()}{p.}{oggz_8h_a3da4287bd4b67ee1dddd60fcd67e3038} is equivalent to calling \doxyref{oggz\+\_\+new()}{p.}{oggz_8h_a69d4565e89aa585b5151af0c046f9e12} and setting stdio based functions for data IO. 
\end{DoxyNote}


\doxysubsection{Typedef Documentation}
\index{oggz\_io.h@{oggz\_io.h}!OggzIOFlush@{OggzIOFlush}}
\index{OggzIOFlush@{OggzIOFlush}!oggz\_io.h@{oggz\_io.h}}
\doxysubsubsection{OggzIOFlush}
{\footnotesize\ttfamily \label{oggz__io_8h_a0d85b43cb94c30e2afcef3189bf4d634} 
typedef int($\ast$ Oggz\+IOFlush) (void $\ast$user\+\_\+handle)}



This is the signature of a function which you provide for Oggz to call when it needs to flush the output data. 

The behaviour of this function is similar to that of fflush() in stdio.


\begin{DoxyParams}{Parameters}
{\em user\+\_\+handle} & A generic pointer you have provided earlier \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em 0} & Success \\
\hline
{\em $<$  0} & An error condition \\
\hline
\end{DoxyRetVals}
\index{oggz\_io.h@{oggz\_io.h}!OggzIORead@{OggzIORead}}
\index{OggzIORead@{OggzIORead}!oggz\_io.h@{oggz\_io.h}}
\doxysubsubsection{OggzIORead}
{\footnotesize\ttfamily \label{oggz__io_8h_ae0f7d3aa88d7b0fc24c13ba2b001c499} 
typedef size\+\_\+t($\ast$ Oggz\+IORead) (void $\ast$user\+\_\+handle, void $\ast$buf, size\+\_\+t n)}



This is the signature of a function which you provide for Oggz to call when it needs to acquire raw input data. 


\begin{DoxyParams}{Parameters}
{\em user\+\_\+handle} & A generic pointer you have provided earlier \\
\hline
{\em n} & The length in bytes that Oggz wants to read \\
\hline
{\em buf} & The buffer that you read data into \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em $>$  0} & The number of bytes successfully read into the buffer \\
\hline
{\em 0} & to indicate that there is no more data to read (End of file) \\
\hline
{\em $<$  0} & An error condition \\
\hline
\end{DoxyRetVals}
\index{oggz\_io.h@{oggz\_io.h}!OggzIOSeek@{OggzIOSeek}}
\index{OggzIOSeek@{OggzIOSeek}!oggz\_io.h@{oggz\_io.h}}
\doxysubsubsection{OggzIOSeek}
{\footnotesize\ttfamily \label{oggz__io_8h_ad47acd67e78e684481a18f7f9913429f} 
typedef int($\ast$ Oggz\+IOSeek) (void $\ast$user\+\_\+handle, long offset, int whence)}



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. 


\begin{DoxyParams}{Parameters}
{\em user\+\_\+handle} & A generic pointer you have provided earlier \\
\hline
{\em offset} & The offset in bytes to seek to \\
\hline
{\em whence} & SEEK\+\_\+\+SET, SEEK\+\_\+\+CUR or SEEK\+\_\+\+END (as for stdio.\+h) \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em $>$= 0} & The offset seeked to \\
\hline
{\em $<$  0} & An error condition\\
\hline
\end{DoxyRetVals}
\begin{DoxyNote}{Note}
If you provide an \doxyref{Oggz\+IOSeek}{p.}{oggz__io_8h_ad47acd67e78e684481a18f7f9913429f} function, you MUST also provide an \doxyref{Oggz\+IOTell}{p.}{oggz__io_8h_a5531d500852299a350ebf05a4895abfb} function, or else all your seeks will fail. 
\end{DoxyNote}
\index{oggz\_io.h@{oggz\_io.h}!OggzIOTell@{OggzIOTell}}
\index{OggzIOTell@{OggzIOTell}!oggz\_io.h@{oggz\_io.h}}
\doxysubsubsection{OggzIOTell}
{\footnotesize\ttfamily \label{oggz__io_8h_a5531d500852299a350ebf05a4895abfb} 
typedef long($\ast$ Oggz\+IOTell) (void $\ast$user\+\_\+handle)}



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. 


\begin{DoxyParams}{Parameters}
{\em user\+\_\+handle} & A generic pointer you have provided earlier \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em $>$= 0} & The offset \\
\hline
{\em $<$  0} & An error condition \\
\hline
\end{DoxyRetVals}
\index{oggz\_io.h@{oggz\_io.h}!OggzIOWrite@{OggzIOWrite}}
\index{OggzIOWrite@{OggzIOWrite}!oggz\_io.h@{oggz\_io.h}}
\doxysubsubsection{OggzIOWrite}
{\footnotesize\ttfamily \label{oggz__io_8h_ae897337f2b2996435525f75ce06c9b10} 
typedef size\+\_\+t($\ast$ Oggz\+IOWrite) (void $\ast$user\+\_\+handle, void $\ast$buf, size\+\_\+t n)}



This is the signature of a function which you provide for Oggz to call when it needs to output raw data. 


\begin{DoxyParams}{Parameters}
{\em user\+\_\+handle} & A generic pointer you have provided earlier \\
\hline
{\em n} & The length in bytes of the data \\
\hline
{\em buf} & A buffer containing data to write \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em $>$= 0} & The number of bytes successfully written (may be less than {\itshape n} if a write error has occurred) \\
\hline
{\em $<$  0} & An error condition \\
\hline
\end{DoxyRetVals}


\doxysubsection{Function Documentation}
\index{oggz\_io.h@{oggz\_io.h}!oggz\_io\_get\_flush\_user\_handle@{oggz\_io\_get\_flush\_user\_handle}}
\index{oggz\_io\_get\_flush\_user\_handle@{oggz\_io\_get\_flush\_user\_handle}!oggz\_io.h@{oggz\_io.h}}
\doxysubsubsection{oggz\_io\_get\_flush\_user\_handle()}
{\footnotesize\ttfamily \label{oggz__io_8h_a0e575f39d8b08077af7744d0c739bb3c} 
void $\ast$ oggz\+\_\+io\+\_\+get\+\_\+flush\+\_\+user\+\_\+handle (\begin{DoxyParamCaption}\item[{\textbf{ OGGZ} $\ast$}]{oggz}{}\end{DoxyParamCaption})}



Retrieve the user\+\_\+handle associated with the function you have provided for flushing output. 


\begin{DoxyParams}{Parameters}
{\em oggz} & An \doxyref{OGGZ}{p.}{oggz_8h_a672d218df13da45a4b41d5366211bfee} handle \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the associated user\+\_\+handle 
\end{DoxyReturn}
\index{oggz\_io.h@{oggz\_io.h}!oggz\_io\_get\_read\_user\_handle@{oggz\_io\_get\_read\_user\_handle}}
\index{oggz\_io\_get\_read\_user\_handle@{oggz\_io\_get\_read\_user\_handle}!oggz\_io.h@{oggz\_io.h}}
\doxysubsubsection{oggz\_io\_get\_read\_user\_handle()}
{\footnotesize\ttfamily \label{oggz__io_8h_a211f321b125bcc3dff1c5709e069191e} 
void $\ast$ oggz\+\_\+io\+\_\+get\+\_\+read\+\_\+user\+\_\+handle (\begin{DoxyParamCaption}\item[{\textbf{ OGGZ} $\ast$}]{oggz}{}\end{DoxyParamCaption})}



Retrieve the user\+\_\+handle associated with the function you have provided for reading input data. 


\begin{DoxyParams}{Parameters}
{\em oggz} & An \doxyref{OGGZ}{p.}{oggz_8h_a672d218df13da45a4b41d5366211bfee} handle \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the associated user\+\_\+handle 
\end{DoxyReturn}
\index{oggz\_io.h@{oggz\_io.h}!oggz\_io\_get\_seek\_user\_handle@{oggz\_io\_get\_seek\_user\_handle}}
\index{oggz\_io\_get\_seek\_user\_handle@{oggz\_io\_get\_seek\_user\_handle}!oggz\_io.h@{oggz\_io.h}}
\doxysubsubsection{oggz\_io\_get\_seek\_user\_handle()}
{\footnotesize\ttfamily \label{oggz__io_8h_af6fda4132a0dbec62fc1ce9041cd215d} 
void $\ast$ oggz\+\_\+io\+\_\+get\+\_\+seek\+\_\+user\+\_\+handle (\begin{DoxyParamCaption}\item[{\textbf{ OGGZ} $\ast$}]{oggz}{}\end{DoxyParamCaption})}



Retrieve the user\+\_\+handle associated with the function you have provided for seeking on input or output data. 


\begin{DoxyParams}{Parameters}
{\em oggz} & An \doxyref{OGGZ}{p.}{oggz_8h_a672d218df13da45a4b41d5366211bfee} handle \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the associated user\+\_\+handle 
\end{DoxyReturn}
\index{oggz\_io.h@{oggz\_io.h}!oggz\_io\_get\_tell\_user\_handle@{oggz\_io\_get\_tell\_user\_handle}}
\index{oggz\_io\_get\_tell\_user\_handle@{oggz\_io\_get\_tell\_user\_handle}!oggz\_io.h@{oggz\_io.h}}
\doxysubsubsection{oggz\_io\_get\_tell\_user\_handle()}
{\footnotesize\ttfamily \label{oggz__io_8h_ad737ef4e61ebe7b23f43e0598f80952d} 
void $\ast$ oggz\+\_\+io\+\_\+get\+\_\+tell\+\_\+user\+\_\+handle (\begin{DoxyParamCaption}\item[{\textbf{ OGGZ} $\ast$}]{oggz}{}\end{DoxyParamCaption})}



Retrieve the user\+\_\+handle associated with the function you have provided for determining the current offset in input or output data. 


\begin{DoxyParams}{Parameters}
{\em oggz} & An \doxyref{OGGZ}{p.}{oggz_8h_a672d218df13da45a4b41d5366211bfee} handle \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the associated user\+\_\+handle 
\end{DoxyReturn}
\index{oggz\_io.h@{oggz\_io.h}!oggz\_io\_get\_write\_user\_handle@{oggz\_io\_get\_write\_user\_handle}}
\index{oggz\_io\_get\_write\_user\_handle@{oggz\_io\_get\_write\_user\_handle}!oggz\_io.h@{oggz\_io.h}}
\doxysubsubsection{oggz\_io\_get\_write\_user\_handle()}
{\footnotesize\ttfamily \label{oggz__io_8h_afb5bc39b46ffa0cdaa0c4d8aec5cd021} 
void $\ast$ oggz\+\_\+io\+\_\+get\+\_\+write\+\_\+user\+\_\+handle (\begin{DoxyParamCaption}\item[{\textbf{ OGGZ} $\ast$}]{oggz}{}\end{DoxyParamCaption})}



Retrieve the user\+\_\+handle associated with the function you have provided for writing output data. 


\begin{DoxyParams}{Parameters}
{\em oggz} & An \doxyref{OGGZ}{p.}{oggz_8h_a672d218df13da45a4b41d5366211bfee} handle \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the associated user\+\_\+handle 
\end{DoxyReturn}
\index{oggz\_io.h@{oggz\_io.h}!oggz\_io\_set\_flush@{oggz\_io\_set\_flush}}
\index{oggz\_io\_set\_flush@{oggz\_io\_set\_flush}!oggz\_io.h@{oggz\_io.h}}
\doxysubsubsection{oggz\_io\_set\_flush()}
{\footnotesize\ttfamily \label{oggz__io_8h_af45a2d33c7e17d1b64f794b32d69e7da} 
int oggz\+\_\+io\+\_\+set\+\_\+flush (\begin{DoxyParamCaption}\item[{\textbf{ OGGZ} $\ast$}]{oggz}{, }\item[{\textbf{ Oggz\+IOFlush}}]{flush}{, }\item[{void $\ast$}]{user\+\_\+handle}{}\end{DoxyParamCaption})}



Set a function for Oggz to call when it needs to flush its output. 

The meaning of this is similar to that of fflush() in stdio.


\begin{DoxyParams}{Parameters}
{\em oggz} & An \doxyref{OGGZ}{p.}{oggz_8h_a672d218df13da45a4b41d5366211bfee} handle \\
\hline
{\em flush} & Your flushing function \\
\hline
{\em user\+\_\+handle} & Any arbitrary data you wish to pass to the function \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em 0} & Success \\
\hline
{\em OGGZ\+\_\+\+ERR\+\_\+\+BAD\+\_\+\+OGGZ} & {\itshape oggz} does not refer to an existing \doxyref{OGGZ}{p.}{oggz_8h_a672d218df13da45a4b41d5366211bfee} \\
\hline
{\em OGGZ\+\_\+\+ERR\+\_\+\+INVALID} & Operation not suitable for this \doxyref{OGGZ}{p.}{oggz_8h_a672d218df13da45a4b41d5366211bfee}; {\itshape oggz} not open for writing. \\
\hline
{\em OGGZ\+\_\+\+ERR\+\_\+\+OUT\+\_\+\+OF\+\_\+\+MEMORY} & Out of memory \\
\hline
\end{DoxyRetVals}
\index{oggz\_io.h@{oggz\_io.h}!oggz\_io\_set\_read@{oggz\_io\_set\_read}}
\index{oggz\_io\_set\_read@{oggz\_io\_set\_read}!oggz\_io.h@{oggz\_io.h}}
\doxysubsubsection{oggz\_io\_set\_read()}
{\footnotesize\ttfamily \label{oggz__io_8h_a640ecb60fcee9323f1f735ad23f7abc4} 
int oggz\+\_\+io\+\_\+set\+\_\+read (\begin{DoxyParamCaption}\item[{\textbf{ OGGZ} $\ast$}]{oggz}{, }\item[{\textbf{ Oggz\+IORead}}]{read}{, }\item[{void $\ast$}]{user\+\_\+handle}{}\end{DoxyParamCaption})}



Set a function for Oggz to call when it needs to read input data. 


\begin{DoxyParams}{Parameters}
{\em oggz} & An \doxyref{OGGZ}{p.}{oggz_8h_a672d218df13da45a4b41d5366211bfee} handle \\
\hline
{\em read} & Your reading function \\
\hline
{\em user\+\_\+handle} & Any arbitrary data you wish to pass to the function \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em 0} & Success \\
\hline
{\em OGGZ\+\_\+\+ERR\+\_\+\+BAD\+\_\+\+OGGZ} & {\itshape oggz} does not refer to an existing \doxyref{OGGZ}{p.}{oggz_8h_a672d218df13da45a4b41d5366211bfee} \\
\hline
{\em OGGZ\+\_\+\+ERR\+\_\+\+INVALID} & Operation not suitable for this \doxyref{OGGZ}{p.}{oggz_8h_a672d218df13da45a4b41d5366211bfee}; {\itshape oggz} not open for reading. \\
\hline
{\em OGGZ\+\_\+\+ERR\+\_\+\+OUT\+\_\+\+OF\+\_\+\+MEMORY} & Out of memory \\
\hline
\end{DoxyRetVals}
\index{oggz\_io.h@{oggz\_io.h}!oggz\_io\_set\_seek@{oggz\_io\_set\_seek}}
\index{oggz\_io\_set\_seek@{oggz\_io\_set\_seek}!oggz\_io.h@{oggz\_io.h}}
\doxysubsubsection{oggz\_io\_set\_seek()}
{\footnotesize\ttfamily \label{oggz__io_8h_a8482fb0783df2621e811c14d642b01fc} 
int oggz\+\_\+io\+\_\+set\+\_\+seek (\begin{DoxyParamCaption}\item[{\textbf{ OGGZ} $\ast$}]{oggz}{, }\item[{\textbf{ Oggz\+IOSeek}}]{seek}{, }\item[{void $\ast$}]{user\+\_\+handle}{}\end{DoxyParamCaption})}



Set a function for Oggz to call when it needs to seek on its raw data. 


\begin{DoxyParams}{Parameters}
{\em oggz} & An \doxyref{OGGZ}{p.}{oggz_8h_a672d218df13da45a4b41d5366211bfee} handle \\
\hline
{\em seek} & Your seeking function \\
\hline
{\em user\+\_\+handle} & Any arbitrary data you wish to pass to the function \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em 0} & Success \\
\hline
{\em OGGZ\+\_\+\+ERR\+\_\+\+BAD\+\_\+\+OGGZ} & {\itshape oggz} does not refer to an existing \doxyref{OGGZ}{p.}{oggz_8h_a672d218df13da45a4b41d5366211bfee} \\
\hline
{\em OGGZ\+\_\+\+ERR\+\_\+\+INVALID} & Operation not suitable for this \doxyref{OGGZ}{p.}{oggz_8h_a672d218df13da45a4b41d5366211bfee} \\
\hline
{\em OGGZ\+\_\+\+ERR\+\_\+\+OUT\+\_\+\+OF\+\_\+\+MEMORY} & Out of memory\\
\hline
\end{DoxyRetVals}
\begin{DoxyNote}{Note}
If you provide an \doxyref{Oggz\+IOSeek}{p.}{oggz__io_8h_ad47acd67e78e684481a18f7f9913429f} function, you MUST also provide an \doxyref{Oggz\+IOTell}{p.}{oggz__io_8h_a5531d500852299a350ebf05a4895abfb} function, or else all your seeks will fail. 
\end{DoxyNote}
\index{oggz\_io.h@{oggz\_io.h}!oggz\_io\_set\_tell@{oggz\_io\_set\_tell}}
\index{oggz\_io\_set\_tell@{oggz\_io\_set\_tell}!oggz\_io.h@{oggz\_io.h}}
\doxysubsubsection{oggz\_io\_set\_tell()}
{\footnotesize\ttfamily \label{oggz__io_8h_ad97da84267d72ab9abf8dbb9ff5e8931} 
int oggz\+\_\+io\+\_\+set\+\_\+tell (\begin{DoxyParamCaption}\item[{\textbf{ OGGZ} $\ast$}]{oggz}{, }\item[{\textbf{ Oggz\+IOTell}}]{tell}{, }\item[{void $\ast$}]{user\+\_\+handle}{}\end{DoxyParamCaption})}



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). 


\begin{DoxyParams}{Parameters}
{\em oggz} & An \doxyref{OGGZ}{p.}{oggz_8h_a672d218df13da45a4b41d5366211bfee} handle \\
\hline
{\em tell} & Your tell function \\
\hline
{\em user\+\_\+handle} & Any arbitrary data you wish to pass to the function \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em 0} & Success \\
\hline
{\em OGGZ\+\_\+\+ERR\+\_\+\+BAD\+\_\+\+OGGZ} & {\itshape oggz} does not refer to an existing \doxyref{OGGZ}{p.}{oggz_8h_a672d218df13da45a4b41d5366211bfee} \\
\hline
{\em OGGZ\+\_\+\+ERR\+\_\+\+INVALID} & Operation not suitable for this \doxyref{OGGZ}{p.}{oggz_8h_a672d218df13da45a4b41d5366211bfee} \\
\hline
{\em OGGZ\+\_\+\+ERR\+\_\+\+OUT\+\_\+\+OF\+\_\+\+MEMORY} & Out of memory \\
\hline
\end{DoxyRetVals}
\index{oggz\_io.h@{oggz\_io.h}!oggz\_io\_set\_write@{oggz\_io\_set\_write}}
\index{oggz\_io\_set\_write@{oggz\_io\_set\_write}!oggz\_io.h@{oggz\_io.h}}
\doxysubsubsection{oggz\_io\_set\_write()}
{\footnotesize\ttfamily \label{oggz__io_8h_af92f5b20bb5f247b5302dfc8b4edfbee} 
int oggz\+\_\+io\+\_\+set\+\_\+write (\begin{DoxyParamCaption}\item[{\textbf{ OGGZ} $\ast$}]{oggz}{, }\item[{\textbf{ Oggz\+IOWrite}}]{write}{, }\item[{void $\ast$}]{user\+\_\+handle}{}\end{DoxyParamCaption})}



Set a function for Oggz to call when it needs to write output data. 


\begin{DoxyParams}{Parameters}
{\em oggz} & An \doxyref{OGGZ}{p.}{oggz_8h_a672d218df13da45a4b41d5366211bfee} handle \\
\hline
{\em write} & Your writing function \\
\hline
{\em user\+\_\+handle} & Any arbitrary data you wish to pass to the function \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em 0} & Success \\
\hline
{\em OGGZ\+\_\+\+ERR\+\_\+\+BAD\+\_\+\+OGGZ} & {\itshape oggz} does not refer to an existing \doxyref{OGGZ}{p.}{oggz_8h_a672d218df13da45a4b41d5366211bfee} \\
\hline
{\em OGGZ\+\_\+\+ERR\+\_\+\+INVALID} & Operation not suitable for this \doxyref{OGGZ}{p.}{oggz_8h_a672d218df13da45a4b41d5366211bfee}; {\itshape oggz} not open for writing. \\
\hline
{\em OGGZ\+\_\+\+ERR\+\_\+\+OUT\+\_\+\+OF\+\_\+\+MEMORY} & Out of memory \\
\hline
\end{DoxyRetVals}
