\hypertarget{group__Eina__Binary__Buffer__Group}{}\section{Binary Buffer}
\label{group__Eina__Binary__Buffer__Group}\index{Binary Buffer@{Binary Buffer}}


These functions provide string buffers management.  


\subsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
typedef struct \hyperlink{struct__Eina__Strbuf}{\+\_\+\+Eina\+\_\+\+Strbuf} \hyperlink{group__Eina__Binary__Buffer__Group_ga914e43cfe068d65db0dd3fbb80bcfd2a}{Eina\+\_\+\+Binbuf}\hypertarget{group__Eina__Binary__Buffer__Group_ga914e43cfe068d65db0dd3fbb80bcfd2a}{}\label{group__Eina__Binary__Buffer__Group_ga914e43cfe068d65db0dd3fbb80bcfd2a}

\begin{DoxyCompactList}\small\item\em Type for a string buffer. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI} \hyperlink{group__Eina__Binary__Buffer__Group_ga914e43cfe068d65db0dd3fbb80bcfd2a}{Eina\+\_\+\+Binbuf} $\ast$ \hyperlink{group__Eina__Binary__Buffer__Group_ga3fd61ff27de5e842411aea6c0eb78014}{eina\+\_\+binbuf\+\_\+new} (void) \hyperlink{group__Eina__Types__Group_gaabeaa41dd47f4b4d3991b10ba00bc59c}{E\+I\+N\+A\+\_\+\+M\+A\+L\+L\+OC} \hyperlink{group__Eina__Types__Group_ga4ba89e4b58eff707a6cf05ffe0cd4dea}{E\+I\+N\+A\+\_\+\+W\+A\+R\+N\+\_\+\+U\+N\+U\+S\+E\+D\+\_\+\+R\+E\+S\+U\+LT}
\begin{DoxyCompactList}\small\item\em Create a new string buffer. \end{DoxyCompactList}\item 
\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI} \hyperlink{group__Eina__Binary__Buffer__Group_ga914e43cfe068d65db0dd3fbb80bcfd2a}{Eina\+\_\+\+Binbuf} $\ast$ \hyperlink{group__Eina__Binary__Buffer__Group_ga5e290b72992028c7a0b9ca0badf3f6a3}{eina\+\_\+binbuf\+\_\+manage\+\_\+new\+\_\+length} (unsigned char $\ast$str, size\+\_\+t length) \hyperlink{group__Eina__Types__Group_gaabeaa41dd47f4b4d3991b10ba00bc59c}{E\+I\+N\+A\+\_\+\+M\+A\+L\+L\+OC} \hyperlink{group__Eina__Types__Group_ga4ba89e4b58eff707a6cf05ffe0cd4dea}{E\+I\+N\+A\+\_\+\+W\+A\+R\+N\+\_\+\+U\+N\+U\+S\+E\+D\+\_\+\+R\+E\+S\+U\+LT} \hyperlink{group__Eina__Types__Group_gad5b2116495471db12a34bab9a34edfaa}{E\+I\+N\+A\+\_\+\+D\+E\+P\+R\+E\+C\+A\+T\+ED}
\begin{DoxyCompactList}\small\item\em Create a new string buffer using the passed string. \end{DoxyCompactList}\item 
\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI} \hyperlink{group__Eina__Binary__Buffer__Group_ga914e43cfe068d65db0dd3fbb80bcfd2a}{Eina\+\_\+\+Binbuf} $\ast$ \hyperlink{group__Eina__Binary__Buffer__Group_ga1367fdcc68208e0be66c4a8c07327445}{eina\+\_\+binbuf\+\_\+manage\+\_\+new} (const unsigned char $\ast$str, size\+\_\+t length, \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} ro) \hyperlink{group__Eina__Types__Group_gaabeaa41dd47f4b4d3991b10ba00bc59c}{E\+I\+N\+A\+\_\+\+M\+A\+L\+L\+OC} \hyperlink{group__Eina__Types__Group_ga4ba89e4b58eff707a6cf05ffe0cd4dea}{E\+I\+N\+A\+\_\+\+W\+A\+R\+N\+\_\+\+U\+N\+U\+S\+E\+D\+\_\+\+R\+E\+S\+U\+LT}
\begin{DoxyCompactList}\small\item\em Create a new string buffer using the passed string. \end{DoxyCompactList}\item 
\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI} \hyperlink{group__Eina__Binary__Buffer__Group_ga914e43cfe068d65db0dd3fbb80bcfd2a}{Eina\+\_\+\+Binbuf} $\ast$ \hyperlink{group__Eina__Binary__Buffer__Group_ga23e36813e936440cfd4f2c2c85f1542c}{eina\+\_\+binbuf\+\_\+manage\+\_\+read\+\_\+only\+\_\+new\+\_\+length} (const unsigned char $\ast$str, size\+\_\+t length) \hyperlink{group__Eina__Types__Group_gaabeaa41dd47f4b4d3991b10ba00bc59c}{E\+I\+N\+A\+\_\+\+M\+A\+L\+L\+OC} \hyperlink{group__Eina__Types__Group_ga4ba89e4b58eff707a6cf05ffe0cd4dea}{E\+I\+N\+A\+\_\+\+W\+A\+R\+N\+\_\+\+U\+N\+U\+S\+E\+D\+\_\+\+R\+E\+S\+U\+LT} \hyperlink{group__Eina__Types__Group_gad5b2116495471db12a34bab9a34edfaa}{E\+I\+N\+A\+\_\+\+D\+E\+P\+R\+E\+C\+A\+T\+ED}
\begin{DoxyCompactList}\small\item\em Create a new string buffer using the passed string. \end{DoxyCompactList}\item 
\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI} void \hyperlink{group__Eina__Binary__Buffer__Group_ga225d04b203e52cac2825cfe8478fa01f}{eina\+\_\+binbuf\+\_\+free} (\hyperlink{group__Eina__Binary__Buffer__Group_ga914e43cfe068d65db0dd3fbb80bcfd2a}{Eina\+\_\+\+Binbuf} $\ast$buf) \hyperlink{group__Eina__Types__Group_ga1a066aa3069f7e43279021cc1e378fac}{E\+I\+N\+A\+\_\+\+A\+R\+G\+\_\+\+N\+O\+N\+N\+U\+LL}(1)
\begin{DoxyCompactList}\small\item\em Free a string buffer. \end{DoxyCompactList}\item 
\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI} void \hyperlink{group__Eina__Binary__Buffer__Group_gabf2fb4392cc13359bf741355b76991a1}{eina\+\_\+binbuf\+\_\+reset} (\hyperlink{group__Eina__Binary__Buffer__Group_ga914e43cfe068d65db0dd3fbb80bcfd2a}{Eina\+\_\+\+Binbuf} $\ast$buf) \hyperlink{group__Eina__Types__Group_ga1a066aa3069f7e43279021cc1e378fac}{E\+I\+N\+A\+\_\+\+A\+R\+G\+\_\+\+N\+O\+N\+N\+U\+LL}(1)
\begin{DoxyCompactList}\small\item\em Reset a string buffer. \end{DoxyCompactList}\item 
\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI} \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} \hyperlink{group__Eina__Binary__Buffer__Group_gab4b8d7a1e45eaf5ec6250a126c6ef967}{eina\+\_\+binbuf\+\_\+append\+\_\+length} (\hyperlink{group__Eina__Binary__Buffer__Group_ga914e43cfe068d65db0dd3fbb80bcfd2a}{Eina\+\_\+\+Binbuf} $\ast$buf, const unsigned char $\ast$str, size\+\_\+t length) \hyperlink{group__Eina__Types__Group_ga1a066aa3069f7e43279021cc1e378fac}{E\+I\+N\+A\+\_\+\+A\+R\+G\+\_\+\+N\+O\+N\+N\+U\+LL}(1
\begin{DoxyCompactList}\small\item\em Append a string of exact length to a buffer, reallocating as necessary. \end{DoxyCompactList}\item 
\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI} \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} \hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI} \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} \hyperlink{group__Eina__Binary__Buffer__Group_ga0a73c0674ea07814529cedddc1522b33}{eina\+\_\+binbuf\+\_\+append\+\_\+buffer} (\hyperlink{group__Eina__Binary__Buffer__Group_ga914e43cfe068d65db0dd3fbb80bcfd2a}{Eina\+\_\+\+Binbuf} $\ast$buf, const \hyperlink{group__Eina__Binary__Buffer__Group_ga914e43cfe068d65db0dd3fbb80bcfd2a}{Eina\+\_\+\+Binbuf} $\ast$data) \hyperlink{group__Eina__Types__Group_ga1a066aa3069f7e43279021cc1e378fac}{E\+I\+N\+A\+\_\+\+A\+R\+G\+\_\+\+N\+O\+N\+N\+U\+LL}(1
\begin{DoxyCompactList}\small\item\em Append an Eina\+\_\+\+Binbuf to a buffer, reallocating as necessary. \end{DoxyCompactList}\item 
\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI} \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} \hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI} \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} \hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI} \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} \hyperlink{group__Eina__Binary__Buffer__Group_ga101a344756880e885f676addc550d90b}{eina\+\_\+binbuf\+\_\+append\+\_\+char} (\hyperlink{group__Eina__Binary__Buffer__Group_ga914e43cfe068d65db0dd3fbb80bcfd2a}{Eina\+\_\+\+Binbuf} $\ast$buf, unsigned char c) \hyperlink{group__Eina__Types__Group_ga1a066aa3069f7e43279021cc1e378fac}{E\+I\+N\+A\+\_\+\+A\+R\+G\+\_\+\+N\+O\+N\+N\+U\+LL}(1)
\begin{DoxyCompactList}\small\item\em Append a character to a string buffer, reallocating as necessary. \end{DoxyCompactList}\item 
\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI} \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} \hyperlink{group__Eina__Binary__Buffer__Group_ga4d3ce6de335bfff107ff809186768da8}{eina\+\_\+binbuf\+\_\+insert\+\_\+length} (\hyperlink{group__Eina__Binary__Buffer__Group_ga914e43cfe068d65db0dd3fbb80bcfd2a}{Eina\+\_\+\+Binbuf} $\ast$buf, const unsigned char $\ast$str, size\+\_\+t length, size\+\_\+t pos) \hyperlink{group__Eina__Types__Group_ga1a066aa3069f7e43279021cc1e378fac}{E\+I\+N\+A\+\_\+\+A\+R\+G\+\_\+\+N\+O\+N\+N\+U\+LL}(1
\begin{DoxyCompactList}\small\item\em Insert a string of exact length to a buffer, reallocating as necessary. \end{DoxyCompactList}\item 
\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI} \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} \hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI} \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} \hyperlink{group__Eina__Binary__Buffer__Group_ga3c5f8a122bc7cff86a99d3323a6ba9b1}{eina\+\_\+binbuf\+\_\+insert\+\_\+char} (\hyperlink{group__Eina__Binary__Buffer__Group_ga914e43cfe068d65db0dd3fbb80bcfd2a}{Eina\+\_\+\+Binbuf} $\ast$buf, unsigned char c, size\+\_\+t pos) \hyperlink{group__Eina__Types__Group_ga1a066aa3069f7e43279021cc1e378fac}{E\+I\+N\+A\+\_\+\+A\+R\+G\+\_\+\+N\+O\+N\+N\+U\+LL}(1)
\begin{DoxyCompactList}\small\item\em Insert a character to a string buffer, reallocating as necessary. \end{DoxyCompactList}\item 
\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI} \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} \hyperlink{group__Eina__Binary__Buffer__Group_gaef7673ef94bc09f27a556c10bfcc1f6c}{eina\+\_\+binbuf\+\_\+remove} (\hyperlink{group__Eina__Binary__Buffer__Group_ga914e43cfe068d65db0dd3fbb80bcfd2a}{Eina\+\_\+\+Binbuf} $\ast$buf, size\+\_\+t start, size\+\_\+t end) \hyperlink{group__Eina__Types__Group_ga1a066aa3069f7e43279021cc1e378fac}{E\+I\+N\+A\+\_\+\+A\+R\+G\+\_\+\+N\+O\+N\+N\+U\+LL}(1)
\begin{DoxyCompactList}\small\item\em Remove a slice of the given string buffer. \end{DoxyCompactList}\item 
\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI} const unsigned char $\ast$ \hyperlink{group__Eina__Binary__Buffer__Group_gace23717e3c4371cc0b3f299147cec187}{eina\+\_\+binbuf\+\_\+string\+\_\+get} (const \hyperlink{group__Eina__Binary__Buffer__Group_ga914e43cfe068d65db0dd3fbb80bcfd2a}{Eina\+\_\+\+Binbuf} $\ast$buf) \hyperlink{group__Eina__Types__Group_ga1a066aa3069f7e43279021cc1e378fac}{E\+I\+N\+A\+\_\+\+A\+R\+G\+\_\+\+N\+O\+N\+N\+U\+LL}(1) \hyperlink{group__Eina__Types__Group_ga4ba89e4b58eff707a6cf05ffe0cd4dea}{E\+I\+N\+A\+\_\+\+W\+A\+R\+N\+\_\+\+U\+N\+U\+S\+E\+D\+\_\+\+R\+E\+S\+U\+LT}
\begin{DoxyCompactList}\small\item\em Retrieve a pointer to the contents of a string buffer. \end{DoxyCompactList}\item 
\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI} unsigned char $\ast$ \hyperlink{group__Eina__Binary__Buffer__Group_ga0db56911173efa0164372671cfe3f344}{eina\+\_\+binbuf\+\_\+string\+\_\+steal} (\hyperlink{group__Eina__Binary__Buffer__Group_ga914e43cfe068d65db0dd3fbb80bcfd2a}{Eina\+\_\+\+Binbuf} $\ast$buf) \hyperlink{group__Eina__Types__Group_gaabeaa41dd47f4b4d3991b10ba00bc59c}{E\+I\+N\+A\+\_\+\+M\+A\+L\+L\+OC} \hyperlink{group__Eina__Types__Group_ga4ba89e4b58eff707a6cf05ffe0cd4dea}{E\+I\+N\+A\+\_\+\+W\+A\+R\+N\+\_\+\+U\+N\+U\+S\+E\+D\+\_\+\+R\+E\+S\+U\+LT} \hyperlink{group__Eina__Types__Group_ga1a066aa3069f7e43279021cc1e378fac}{E\+I\+N\+A\+\_\+\+A\+R\+G\+\_\+\+N\+O\+N\+N\+U\+LL}(1)
\begin{DoxyCompactList}\small\item\em Steal the contents of a string buffer. \end{DoxyCompactList}\item 
\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI} void \hyperlink{group__Eina__Binary__Buffer__Group_ga091befb5454e6e140263bfb2a9d378dc}{eina\+\_\+binbuf\+\_\+string\+\_\+free} (\hyperlink{group__Eina__Binary__Buffer__Group_ga914e43cfe068d65db0dd3fbb80bcfd2a}{Eina\+\_\+\+Binbuf} $\ast$buf) \hyperlink{group__Eina__Types__Group_ga1a066aa3069f7e43279021cc1e378fac}{E\+I\+N\+A\+\_\+\+A\+R\+G\+\_\+\+N\+O\+N\+N\+U\+LL}(1)
\begin{DoxyCompactList}\small\item\em Free the contents of a string buffer but not the buffer. \end{DoxyCompactList}\item 
\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI} size\+\_\+t \hyperlink{group__Eina__Binary__Buffer__Group_gade3052a6c39b4be19c25be92687cded3}{eina\+\_\+binbuf\+\_\+length\+\_\+get} (const \hyperlink{group__Eina__Binary__Buffer__Group_ga914e43cfe068d65db0dd3fbb80bcfd2a}{Eina\+\_\+\+Binbuf} $\ast$buf) \hyperlink{group__Eina__Types__Group_ga1a066aa3069f7e43279021cc1e378fac}{E\+I\+N\+A\+\_\+\+A\+R\+G\+\_\+\+N\+O\+N\+N\+U\+LL}(1) \hyperlink{group__Eina__Types__Group_ga4ba89e4b58eff707a6cf05ffe0cd4dea}{E\+I\+N\+A\+\_\+\+W\+A\+R\+N\+\_\+\+U\+N\+U\+S\+E\+D\+\_\+\+R\+E\+S\+U\+LT}
\begin{DoxyCompactList}\small\item\em Retrieve the length of the string buffer content. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
These functions provide string buffers management. 

The Binary Buffer data type is designed to be a mutable string, allowing to append, prepend or insert a string to a buffer. 

\subsection{Function Documentation}
\index{Binary Buffer@{Binary Buffer}!eina\+\_\+binbuf\+\_\+new@{eina\+\_\+binbuf\+\_\+new}}
\index{eina\+\_\+binbuf\+\_\+new@{eina\+\_\+binbuf\+\_\+new}!Binary Buffer@{Binary Buffer}}
\subsubsection[{\texorpdfstring{eina\+\_\+binbuf\+\_\+new(void) E\+I\+N\+A\+\_\+\+M\+A\+L\+L\+O\+C E\+I\+N\+A\+\_\+\+W\+A\+R\+N\+\_\+\+U\+N\+U\+S\+E\+D\+\_\+\+R\+E\+S\+U\+LT}{eina_binbuf_new(void) EINA_MALLOC EINA_WARN_UNUSED_RESULT}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+PI} {\bf Eina\+\_\+\+Binbuf}$\ast$ eina\+\_\+binbuf\+\_\+new (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}\hypertarget{group__Eina__Binary__Buffer__Group_ga3fd61ff27de5e842411aea6c0eb78014}{}\label{group__Eina__Binary__Buffer__Group_ga3fd61ff27de5e842411aea6c0eb78014}


Create a new string buffer. 

\begin{DoxyReturn}{Returns}
Newly allocated string buffer instance.
\end{DoxyReturn}
This function creates a new string buffer. On error, {\ttfamily N\+U\+LL} is returned. To free the resources, use \hyperlink{group__Eina__Binary__Buffer__Group_ga225d04b203e52cac2825cfe8478fa01f}{eina\+\_\+binbuf\+\_\+free()}.

\begin{DoxySeeAlso}{See also}
\hyperlink{group__Eina__Binary__Buffer__Group_ga225d04b203e52cac2825cfe8478fa01f}{eina\+\_\+binbuf\+\_\+free()} 

eina\+\_\+binbuf\+\_\+append() 

\hyperlink{group__Eina__Binary__Buffer__Group_gace23717e3c4371cc0b3f299147cec187}{eina\+\_\+binbuf\+\_\+string\+\_\+get()} 
\end{DoxySeeAlso}


Referenced by ecore\+\_\+con\+\_\+client\+\_\+send(), ecore\+\_\+con\+\_\+server\+\_\+send(), eet\+\_\+mode\+\_\+get(), emile\+\_\+binbuf\+\_\+cipher(), and emile\+\_\+binbuf\+\_\+decipher().

\index{Binary Buffer@{Binary Buffer}!eina\+\_\+binbuf\+\_\+manage\+\_\+new\+\_\+length@{eina\+\_\+binbuf\+\_\+manage\+\_\+new\+\_\+length}}
\index{eina\+\_\+binbuf\+\_\+manage\+\_\+new\+\_\+length@{eina\+\_\+binbuf\+\_\+manage\+\_\+new\+\_\+length}!Binary Buffer@{Binary Buffer}}
\subsubsection[{\texorpdfstring{eina\+\_\+binbuf\+\_\+manage\+\_\+new\+\_\+length(unsigned char $\ast$str, size\+\_\+t length) E\+I\+N\+A\+\_\+\+M\+A\+L\+L\+O\+C E\+I\+N\+A\+\_\+\+W\+A\+R\+N\+\_\+\+U\+N\+U\+S\+E\+D\+\_\+\+R\+E\+S\+U\+L\+T E\+I\+N\+A\+\_\+\+D\+E\+P\+R\+E\+C\+A\+T\+ED}{eina_binbuf_manage_new_length(unsigned char *str, size_t length) EINA_MALLOC EINA_WARN_UNUSED_RESULT EINA_DEPRECATED}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+PI} {\bf Eina\+\_\+\+Binbuf}$\ast$ eina\+\_\+binbuf\+\_\+manage\+\_\+new\+\_\+length (
\begin{DoxyParamCaption}
\item[{unsigned char $\ast$}]{str, }
\item[{size\+\_\+t}]{length}
\end{DoxyParamCaption}
)}\hypertarget{group__Eina__Binary__Buffer__Group_ga5e290b72992028c7a0b9ca0badf3f6a3}{}\label{group__Eina__Binary__Buffer__Group_ga5e290b72992028c7a0b9ca0badf3f6a3}


Create a new string buffer using the passed string. 

The passed string is used directly as the buffer, it\textquotesingle{}s somehow the opposite function of \hyperlink{group__Eina__Binary__Buffer__Group_ga0db56911173efa0164372671cfe3f344}{eina\+\_\+binbuf\+\_\+string\+\_\+steal} . The passed string must be malloced.


\begin{DoxyParams}{Parameters}
{\em str} & the string to manage \\
\hline
{\em length} & the length of the string. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Newly allocated string buffer instance.
\end{DoxyReturn}
This function creates a new string buffer. On error, {\ttfamily N\+U\+LL} is returned. To free the resources, use \hyperlink{group__Eina__Binary__Buffer__Group_ga225d04b203e52cac2825cfe8478fa01f}{eina\+\_\+binbuf\+\_\+free()}.

\begin{DoxySeeAlso}{See also}
\hyperlink{group__Eina__Binary__Buffer__Group_ga1367fdcc68208e0be66c4a8c07327445}{eina\+\_\+binbuf\+\_\+manage\+\_\+new()} 
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
1.\+2.\+0 
\end{DoxySince}
\index{Binary Buffer@{Binary Buffer}!eina\+\_\+binbuf\+\_\+manage\+\_\+new@{eina\+\_\+binbuf\+\_\+manage\+\_\+new}}
\index{eina\+\_\+binbuf\+\_\+manage\+\_\+new@{eina\+\_\+binbuf\+\_\+manage\+\_\+new}!Binary Buffer@{Binary Buffer}}
\subsubsection[{\texorpdfstring{eina\+\_\+binbuf\+\_\+manage\+\_\+new(const unsigned char $\ast$str, size\+\_\+t length, Eina\+\_\+\+Bool ro) E\+I\+N\+A\+\_\+\+M\+A\+L\+L\+O\+C E\+I\+N\+A\+\_\+\+W\+A\+R\+N\+\_\+\+U\+N\+U\+S\+E\+D\+\_\+\+R\+E\+S\+U\+LT}{eina_binbuf_manage_new(const unsigned char *str, size_t length, Eina_Bool ro) EINA_MALLOC EINA_WARN_UNUSED_RESULT}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+PI} {\bf Eina\+\_\+\+Binbuf}$\ast$ eina\+\_\+binbuf\+\_\+manage\+\_\+new (
\begin{DoxyParamCaption}
\item[{const unsigned char $\ast$}]{str, }
\item[{size\+\_\+t}]{length, }
\item[{{\bf Eina\+\_\+\+Bool}}]{ro}
\end{DoxyParamCaption}
)}\hypertarget{group__Eina__Binary__Buffer__Group_ga1367fdcc68208e0be66c4a8c07327445}{}\label{group__Eina__Binary__Buffer__Group_ga1367fdcc68208e0be66c4a8c07327445}


Create a new string buffer using the passed string. 

The passed string is used directly as the buffer, it\textquotesingle{}s somehow the opposite function of \hyperlink{group__Eina__Binary__Buffer__Group_ga0db56911173efa0164372671cfe3f344}{eina\+\_\+binbuf\+\_\+string\+\_\+steal} .


\begin{DoxyParams}{Parameters}
{\em str} & the string to start from \\
\hline
{\em length} & the length of the string. \\
\hline
{\em ro} & the passed string will not be touched if set to E\+I\+N\+A\+\_\+\+T\+R\+UE. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Newly allocated string buffer instance.
\end{DoxyReturn}
This function creates a new string buffer. On error, {\ttfamily N\+U\+LL} is returned. To free the resources, use \hyperlink{group__Eina__Binary__Buffer__Group_ga225d04b203e52cac2825cfe8478fa01f}{eina\+\_\+binbuf\+\_\+free()}. It will not touch the buffer if ro is set to {\ttfamily E\+I\+N\+A\+\_\+\+T\+R\+UE}, but it will also not copy it. If ro is set to {\ttfamily E\+I\+N\+A\+\_\+\+T\+R\+UE} any change operation will create a fresh new memory, copy old data there and starting modifying that one.

\begin{DoxySeeAlso}{See also}
\hyperlink{group__Eina__Binary__Buffer__Group_ga1367fdcc68208e0be66c4a8c07327445}{eina\+\_\+binbuf\+\_\+manage\+\_\+new()} 

\hyperlink{group__Eina__Binary__Buffer__Group_ga5e290b72992028c7a0b9ca0badf3f6a3}{eina\+\_\+binbuf\+\_\+manage\+\_\+new\+\_\+length()} 

\hyperlink{group__Eina__Binary__Buffer__Group_ga23e36813e936440cfd4f2c2c85f1542c}{eina\+\_\+binbuf\+\_\+manage\+\_\+read\+\_\+only\+\_\+new\+\_\+length()}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
1.\+14.\+0 
\end{DoxySince}


Referenced by edje\+\_\+edit\+\_\+sound\+\_\+samplebuffer\+\_\+get(), eet\+\_\+alias(), eet\+\_\+data\+\_\+image\+\_\+header\+\_\+decode(), eet\+\_\+identity\+\_\+certificate\+\_\+print(), eet\+\_\+list\+\_\+entries(), eet\+\_\+write\+\_\+cipher(), emile\+\_\+compress(), emile\+\_\+decompress(), and emile\+\_\+shutdown().

\index{Binary Buffer@{Binary Buffer}!eina\+\_\+binbuf\+\_\+manage\+\_\+read\+\_\+only\+\_\+new\+\_\+length@{eina\+\_\+binbuf\+\_\+manage\+\_\+read\+\_\+only\+\_\+new\+\_\+length}}
\index{eina\+\_\+binbuf\+\_\+manage\+\_\+read\+\_\+only\+\_\+new\+\_\+length@{eina\+\_\+binbuf\+\_\+manage\+\_\+read\+\_\+only\+\_\+new\+\_\+length}!Binary Buffer@{Binary Buffer}}
\subsubsection[{\texorpdfstring{eina\+\_\+binbuf\+\_\+manage\+\_\+read\+\_\+only\+\_\+new\+\_\+length(const unsigned char $\ast$str, size\+\_\+t length) E\+I\+N\+A\+\_\+\+M\+A\+L\+L\+O\+C E\+I\+N\+A\+\_\+\+W\+A\+R\+N\+\_\+\+U\+N\+U\+S\+E\+D\+\_\+\+R\+E\+S\+U\+L\+T E\+I\+N\+A\+\_\+\+D\+E\+P\+R\+E\+C\+A\+T\+ED}{eina_binbuf_manage_read_only_new_length(const unsigned char *str, size_t length) EINA_MALLOC EINA_WARN_UNUSED_RESULT EINA_DEPRECATED}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+PI} {\bf Eina\+\_\+\+Binbuf}$\ast$ eina\+\_\+binbuf\+\_\+manage\+\_\+read\+\_\+only\+\_\+new\+\_\+length (
\begin{DoxyParamCaption}
\item[{const unsigned char $\ast$}]{str, }
\item[{size\+\_\+t}]{length}
\end{DoxyParamCaption}
)}\hypertarget{group__Eina__Binary__Buffer__Group_ga23e36813e936440cfd4f2c2c85f1542c}{}\label{group__Eina__Binary__Buffer__Group_ga23e36813e936440cfd4f2c2c85f1542c}


Create a new string buffer using the passed string. 

The passed string is used directly as the buffer, it\textquotesingle{}s somehow the opposite function of \hyperlink{group__Eina__Binary__Buffer__Group_ga0db56911173efa0164372671cfe3f344}{eina\+\_\+binbuf\+\_\+string\+\_\+steal} . The passed string will not be touched.


\begin{DoxyParams}{Parameters}
{\em str} & the string to start from \\
\hline
{\em length} & the length of the string. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Newly allocated string buffer instance.
\end{DoxyReturn}
This function creates a new string buffer. On error, {\ttfamily N\+U\+LL} is returned. To free the resources, use \hyperlink{group__Eina__Binary__Buffer__Group_ga225d04b203e52cac2825cfe8478fa01f}{eina\+\_\+binbuf\+\_\+free()}. It will not touch the internal buffer. Any changing operation will create a fresh new memory, copy old data there and starting modifying that one.

\begin{DoxySeeAlso}{See also}
\hyperlink{group__Eina__Binary__Buffer__Group_ga1367fdcc68208e0be66c4a8c07327445}{eina\+\_\+binbuf\+\_\+manage\+\_\+new()} 
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
1.\+9.\+0 
\end{DoxySince}
\index{Binary Buffer@{Binary Buffer}!eina\+\_\+binbuf\+\_\+free@{eina\+\_\+binbuf\+\_\+free}}
\index{eina\+\_\+binbuf\+\_\+free@{eina\+\_\+binbuf\+\_\+free}!Binary Buffer@{Binary Buffer}}
\subsubsection[{\texorpdfstring{eina\+\_\+binbuf\+\_\+free(\+Eina\+\_\+\+Binbuf $\ast$buf) E\+I\+N\+A\+\_\+\+A\+R\+G\+\_\+\+N\+O\+N\+N\+U\+L\+L(1)}{eina_binbuf_free(Eina_Binbuf *buf) EINA_ARG_NONNULL(1)}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+PI} void eina\+\_\+binbuf\+\_\+free (
\begin{DoxyParamCaption}
\item[{{\bf Eina\+\_\+\+Binbuf} $\ast$}]{buf}
\end{DoxyParamCaption}
)}\hypertarget{group__Eina__Binary__Buffer__Group_ga225d04b203e52cac2825cfe8478fa01f}{}\label{group__Eina__Binary__Buffer__Group_ga225d04b203e52cac2825cfe8478fa01f}


Free a string buffer. 


\begin{DoxyParams}{Parameters}
{\em buf} & The string buffer to free.\\
\hline
\end{DoxyParams}
This function frees the memory of {\ttfamily buf}. {\ttfamily buf} must have been created by \hyperlink{group__Eina__Binary__Buffer__Group_ga3fd61ff27de5e842411aea6c0eb78014}{eina\+\_\+binbuf\+\_\+new()}. 

Referenced by ecore\+\_\+con\+\_\+client\+\_\+fd\+\_\+get(), eet\+\_\+alias(), eet\+\_\+alias\+\_\+get(), eet\+\_\+data\+\_\+image\+\_\+header\+\_\+decode(), eet\+\_\+identity\+\_\+certificate\+\_\+print(), eet\+\_\+mode\+\_\+get(), eet\+\_\+read\+\_\+cipher(), eet\+\_\+read\+\_\+direct(), eet\+\_\+write\+\_\+cipher(), emile\+\_\+binbuf\+\_\+cipher(), emile\+\_\+binbuf\+\_\+decipher(), emile\+\_\+decompress(), and emile\+\_\+shutdown().

\index{Binary Buffer@{Binary Buffer}!eina\+\_\+binbuf\+\_\+reset@{eina\+\_\+binbuf\+\_\+reset}}
\index{eina\+\_\+binbuf\+\_\+reset@{eina\+\_\+binbuf\+\_\+reset}!Binary Buffer@{Binary Buffer}}
\subsubsection[{\texorpdfstring{eina\+\_\+binbuf\+\_\+reset(\+Eina\+\_\+\+Binbuf $\ast$buf) E\+I\+N\+A\+\_\+\+A\+R\+G\+\_\+\+N\+O\+N\+N\+U\+L\+L(1)}{eina_binbuf_reset(Eina_Binbuf *buf) EINA_ARG_NONNULL(1)}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+PI} void eina\+\_\+binbuf\+\_\+reset (
\begin{DoxyParamCaption}
\item[{{\bf Eina\+\_\+\+Binbuf} $\ast$}]{buf}
\end{DoxyParamCaption}
)}\hypertarget{group__Eina__Binary__Buffer__Group_gabf2fb4392cc13359bf741355b76991a1}{}\label{group__Eina__Binary__Buffer__Group_gabf2fb4392cc13359bf741355b76991a1}


Reset a string buffer. 


\begin{DoxyParams}{Parameters}
{\em buf} & The string buffer to reset.\\
\hline
\end{DoxyParams}
This function reset {\ttfamily buf\+:} the buffer len is set to 0, and the string is set to \textquotesingle{}\textbackslash{}0\textquotesingle{}. No memory is free\textquotesingle{}d. \index{Binary Buffer@{Binary Buffer}!eina\+\_\+binbuf\+\_\+append\+\_\+length@{eina\+\_\+binbuf\+\_\+append\+\_\+length}}
\index{eina\+\_\+binbuf\+\_\+append\+\_\+length@{eina\+\_\+binbuf\+\_\+append\+\_\+length}!Binary Buffer@{Binary Buffer}}
\subsubsection[{\texorpdfstring{eina\+\_\+binbuf\+\_\+append\+\_\+length(\+Eina\+\_\+\+Binbuf $\ast$buf, const unsigned char $\ast$str, size\+\_\+t length) E\+I\+N\+A\+\_\+\+A\+R\+G\+\_\+\+N\+O\+N\+N\+U\+L\+L(1}{eina_binbuf_append_length(Eina_Binbuf *buf, const unsigned char *str, size_t length) EINA_ARG_NONNULL(1}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+PI} {\bf Eina\+\_\+\+Bool} eina\+\_\+binbuf\+\_\+append\+\_\+length (
\begin{DoxyParamCaption}
\item[{{\bf Eina\+\_\+\+Binbuf} $\ast$}]{buf, }
\item[{const unsigned char $\ast$}]{str, }
\item[{size\+\_\+t}]{length}
\end{DoxyParamCaption}
)}\hypertarget{group__Eina__Binary__Buffer__Group_gab4b8d7a1e45eaf5ec6250a126c6ef967}{}\label{group__Eina__Binary__Buffer__Group_gab4b8d7a1e45eaf5ec6250a126c6ef967}


Append a string of exact length to a buffer, reallocating as necessary. 


\begin{DoxyParams}{Parameters}
{\em buf} & The string buffer to append to. \\
\hline
{\em str} & The string to append. \\
\hline
{\em length} & The exact length to use. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{E\+I\+N\+A\+\_\+\+T\+R\+UE} on success, \hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{E\+I\+N\+A\+\_\+\+F\+A\+L\+SE} on failure.
\end{DoxyReturn}
This function appends {\ttfamily str} to {\ttfamily buf}. {\ttfamily str} must be of size at most {\ttfamily length}. It is slightly faster than eina\+\_\+binbuf\+\_\+append() as it does not compute the size of {\ttfamily str}. It is useful when dealing with strings of known size, such as eina\+\_\+strngshare. If {\ttfamily buf} can\textquotesingle{}t append it, \hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{E\+I\+N\+A\+\_\+\+F\+A\+L\+SE} is returned, otherwise \hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{E\+I\+N\+A\+\_\+\+T\+R\+UE} is returned.

\begin{DoxySeeAlso}{See also}
eina\+\_\+stringshare\+\_\+length() 

eina\+\_\+binbuf\+\_\+append() 

eina\+\_\+binbuf\+\_\+append\+\_\+n() 
\end{DoxySeeAlso}


Referenced by ecore\+\_\+con\+\_\+client\+\_\+send(), ecore\+\_\+con\+\_\+server\+\_\+send(), eet\+\_\+mode\+\_\+get(), emile\+\_\+binbuf\+\_\+cipher(), and emile\+\_\+binbuf\+\_\+decipher().

\index{Binary Buffer@{Binary Buffer}!eina\+\_\+binbuf\+\_\+append\+\_\+buffer@{eina\+\_\+binbuf\+\_\+append\+\_\+buffer}}
\index{eina\+\_\+binbuf\+\_\+append\+\_\+buffer@{eina\+\_\+binbuf\+\_\+append\+\_\+buffer}!Binary Buffer@{Binary Buffer}}
\subsubsection[{\texorpdfstring{eina\+\_\+binbuf\+\_\+append\+\_\+buffer(\+Eina\+\_\+\+Binbuf $\ast$buf, const Eina\+\_\+\+Binbuf $\ast$data) E\+I\+N\+A\+\_\+\+A\+R\+G\+\_\+\+N\+O\+N\+N\+U\+L\+L(1}{eina_binbuf_append_buffer(Eina_Binbuf *buf, const Eina_Binbuf *data) EINA_ARG_NONNULL(1}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+PI} {\bf Eina\+\_\+\+Bool} {\bf E\+A\+PI} {\bf Eina\+\_\+\+Bool} eina\+\_\+binbuf\+\_\+append\+\_\+buffer (
\begin{DoxyParamCaption}
\item[{{\bf Eina\+\_\+\+Binbuf} $\ast$}]{buf, }
\item[{const {\bf Eina\+\_\+\+Binbuf} $\ast$}]{data}
\end{DoxyParamCaption}
)}\hypertarget{group__Eina__Binary__Buffer__Group_ga0a73c0674ea07814529cedddc1522b33}{}\label{group__Eina__Binary__Buffer__Group_ga0a73c0674ea07814529cedddc1522b33}


Append an Eina\+\_\+\+Binbuf to a buffer, reallocating as necessary. 


\begin{DoxyParams}{Parameters}
{\em buf} & The string buffer to append to. \\
\hline
{\em data} & The string buffer to append. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{E\+I\+N\+A\+\_\+\+T\+R\+UE} on success, \hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{E\+I\+N\+A\+\_\+\+F\+A\+L\+SE} on failure.
\end{DoxyReturn}
This function appends {\ttfamily data} to {\ttfamily buf}. {\ttfamily data} must be allocated and different from {\ttfamily N\+U\+LL}. It is slightly faster than eina\+\_\+binbuf\+\_\+append() as it does not compute the size of {\ttfamily str}. If {\ttfamily buf} can\textquotesingle{}t append it, \hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{E\+I\+N\+A\+\_\+\+F\+A\+L\+SE} is returned, otherwise \hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{E\+I\+N\+A\+\_\+\+T\+R\+UE} is returned.

\begin{DoxySeeAlso}{See also}
eina\+\_\+binbuf\+\_\+append() 

eina\+\_\+binbuf\+\_\+append\+\_\+n() 

\hyperlink{group__Eina__Binary__Buffer__Group_gab4b8d7a1e45eaf5ec6250a126c6ef967}{eina\+\_\+binbuf\+\_\+append\+\_\+length()} 
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
1.\+9.\+0 
\end{DoxySince}


Referenced by emile\+\_\+binbuf\+\_\+cipher().

\index{Binary Buffer@{Binary Buffer}!eina\+\_\+binbuf\+\_\+append\+\_\+char@{eina\+\_\+binbuf\+\_\+append\+\_\+char}}
\index{eina\+\_\+binbuf\+\_\+append\+\_\+char@{eina\+\_\+binbuf\+\_\+append\+\_\+char}!Binary Buffer@{Binary Buffer}}
\subsubsection[{\texorpdfstring{eina\+\_\+binbuf\+\_\+append\+\_\+char(\+Eina\+\_\+\+Binbuf $\ast$buf, unsigned char c) E\+I\+N\+A\+\_\+\+A\+R\+G\+\_\+\+N\+O\+N\+N\+U\+L\+L(1)}{eina_binbuf_append_char(Eina_Binbuf *buf, unsigned char c) EINA_ARG_NONNULL(1)}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+PI} {\bf Eina\+\_\+\+Bool} {\bf E\+A\+PI} {\bf Eina\+\_\+\+Bool} {\bf E\+A\+PI} {\bf Eina\+\_\+\+Bool} eina\+\_\+binbuf\+\_\+append\+\_\+char (
\begin{DoxyParamCaption}
\item[{{\bf Eina\+\_\+\+Binbuf} $\ast$}]{buf, }
\item[{unsigned char}]{c}
\end{DoxyParamCaption}
)}\hypertarget{group__Eina__Binary__Buffer__Group_ga101a344756880e885f676addc550d90b}{}\label{group__Eina__Binary__Buffer__Group_ga101a344756880e885f676addc550d90b}


Append a character to a string buffer, reallocating as necessary. 


\begin{DoxyParams}{Parameters}
{\em buf} & The string buffer to append to. \\
\hline
{\em c} & The char to append. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{E\+I\+N\+A\+\_\+\+T\+R\+UE} on success, \hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{E\+I\+N\+A\+\_\+\+F\+A\+L\+SE} on failure.
\end{DoxyReturn}
This function inserts {\ttfamily c} to {\ttfamily buf}. If it can not insert it, \hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{E\+I\+N\+A\+\_\+\+F\+A\+L\+SE} is returned, otherwise \hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{E\+I\+N\+A\+\_\+\+T\+R\+UE} is returned. \index{Binary Buffer@{Binary Buffer}!eina\+\_\+binbuf\+\_\+insert\+\_\+length@{eina\+\_\+binbuf\+\_\+insert\+\_\+length}}
\index{eina\+\_\+binbuf\+\_\+insert\+\_\+length@{eina\+\_\+binbuf\+\_\+insert\+\_\+length}!Binary Buffer@{Binary Buffer}}
\subsubsection[{\texorpdfstring{eina\+\_\+binbuf\+\_\+insert\+\_\+length(\+Eina\+\_\+\+Binbuf $\ast$buf, const unsigned char $\ast$str, size\+\_\+t length, size\+\_\+t pos) E\+I\+N\+A\+\_\+\+A\+R\+G\+\_\+\+N\+O\+N\+N\+U\+L\+L(1}{eina_binbuf_insert_length(Eina_Binbuf *buf, const unsigned char *str, size_t length, size_t pos) EINA_ARG_NONNULL(1}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+PI} {\bf Eina\+\_\+\+Bool} eina\+\_\+binbuf\+\_\+insert\+\_\+length (
\begin{DoxyParamCaption}
\item[{{\bf Eina\+\_\+\+Binbuf} $\ast$}]{buf, }
\item[{const unsigned char $\ast$}]{str, }
\item[{size\+\_\+t}]{length, }
\item[{size\+\_\+t}]{pos}
\end{DoxyParamCaption}
)}\hypertarget{group__Eina__Binary__Buffer__Group_ga4d3ce6de335bfff107ff809186768da8}{}\label{group__Eina__Binary__Buffer__Group_ga4d3ce6de335bfff107ff809186768da8}


Insert a string of exact length to a buffer, reallocating as necessary. 


\begin{DoxyParams}{Parameters}
{\em buf} & The string buffer to insert to. \\
\hline
{\em str} & The string to insert. \\
\hline
{\em length} & The exact length to use. \\
\hline
{\em pos} & The position to insert the string. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{E\+I\+N\+A\+\_\+\+T\+R\+UE} on success, \hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{E\+I\+N\+A\+\_\+\+F\+A\+L\+SE} on failure.
\end{DoxyReturn}
This function inserts {\ttfamily str} to {\ttfamily buf}. {\ttfamily str} must be of size at most {\ttfamily length}. It is slightly faster than eina\+\_\+binbuf\+\_\+insert() as it does not compute the size of {\ttfamily str}. It is useful when dealing with strings of known size, such as eina\+\_\+strngshare. If {\ttfamily buf} can\textquotesingle{}t insert it, \hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{E\+I\+N\+A\+\_\+\+F\+A\+L\+SE} is returned, otherwise \hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{E\+I\+N\+A\+\_\+\+T\+R\+UE} is returned.

\begin{DoxySeeAlso}{See also}
eina\+\_\+stringshare\+\_\+length() 

eina\+\_\+binbuf\+\_\+insert() 

eina\+\_\+binbuf\+\_\+insert\+\_\+n() 
\end{DoxySeeAlso}
\index{Binary Buffer@{Binary Buffer}!eina\+\_\+binbuf\+\_\+insert\+\_\+char@{eina\+\_\+binbuf\+\_\+insert\+\_\+char}}
\index{eina\+\_\+binbuf\+\_\+insert\+\_\+char@{eina\+\_\+binbuf\+\_\+insert\+\_\+char}!Binary Buffer@{Binary Buffer}}
\subsubsection[{\texorpdfstring{eina\+\_\+binbuf\+\_\+insert\+\_\+char(\+Eina\+\_\+\+Binbuf $\ast$buf, unsigned char c, size\+\_\+t pos) E\+I\+N\+A\+\_\+\+A\+R\+G\+\_\+\+N\+O\+N\+N\+U\+L\+L(1)}{eina_binbuf_insert_char(Eina_Binbuf *buf, unsigned char c, size_t pos) EINA_ARG_NONNULL(1)}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+PI} {\bf Eina\+\_\+\+Bool} {\bf E\+A\+PI} {\bf Eina\+\_\+\+Bool} eina\+\_\+binbuf\+\_\+insert\+\_\+char (
\begin{DoxyParamCaption}
\item[{{\bf Eina\+\_\+\+Binbuf} $\ast$}]{buf, }
\item[{unsigned char}]{c, }
\item[{size\+\_\+t}]{pos}
\end{DoxyParamCaption}
)}\hypertarget{group__Eina__Binary__Buffer__Group_ga3c5f8a122bc7cff86a99d3323a6ba9b1}{}\label{group__Eina__Binary__Buffer__Group_ga3c5f8a122bc7cff86a99d3323a6ba9b1}


Insert a character to a string buffer, reallocating as necessary. 


\begin{DoxyParams}{Parameters}
{\em buf} & The string buffer to insert to. \\
\hline
{\em c} & The char to insert. \\
\hline
{\em pos} & The position to insert the char. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{E\+I\+N\+A\+\_\+\+T\+R\+UE} on success, \hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{E\+I\+N\+A\+\_\+\+F\+A\+L\+SE} on failure.
\end{DoxyReturn}
This function inserts {\ttfamily c} to {\ttfamily buf} at position {\ttfamily pos}. If {\ttfamily buf} can\textquotesingle{}t append it, \hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{E\+I\+N\+A\+\_\+\+F\+A\+L\+SE} is returned, otherwise \hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{E\+I\+N\+A\+\_\+\+T\+R\+UE} is returned. \index{Binary Buffer@{Binary Buffer}!eina\+\_\+binbuf\+\_\+remove@{eina\+\_\+binbuf\+\_\+remove}}
\index{eina\+\_\+binbuf\+\_\+remove@{eina\+\_\+binbuf\+\_\+remove}!Binary Buffer@{Binary Buffer}}
\subsubsection[{\texorpdfstring{eina\+\_\+binbuf\+\_\+remove(\+Eina\+\_\+\+Binbuf $\ast$buf, size\+\_\+t start, size\+\_\+t end) E\+I\+N\+A\+\_\+\+A\+R\+G\+\_\+\+N\+O\+N\+N\+U\+L\+L(1)}{eina_binbuf_remove(Eina_Binbuf *buf, size_t start, size_t end) EINA_ARG_NONNULL(1)}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+PI} {\bf Eina\+\_\+\+Bool} eina\+\_\+binbuf\+\_\+remove (
\begin{DoxyParamCaption}
\item[{{\bf Eina\+\_\+\+Binbuf} $\ast$}]{buf, }
\item[{size\+\_\+t}]{start, }
\item[{size\+\_\+t}]{end}
\end{DoxyParamCaption}
)}\hypertarget{group__Eina__Binary__Buffer__Group_gaef7673ef94bc09f27a556c10bfcc1f6c}{}\label{group__Eina__Binary__Buffer__Group_gaef7673ef94bc09f27a556c10bfcc1f6c}


Remove a slice of the given string buffer. 


\begin{DoxyParams}{Parameters}
{\em buf} & The string buffer to remove a slice. \\
\hline
{\em start} & The initial (inclusive) slice position to start removing, in bytes. \\
\hline
{\em end} & The final (non-\/inclusive) slice position to finish removing, in bytes. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{E\+I\+N\+A\+\_\+\+T\+R\+UE} on success, \hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{E\+I\+N\+A\+\_\+\+F\+A\+L\+SE} on failure.
\end{DoxyReturn}
This function removes a slice of {\ttfamily buf}, starting at {\ttfamily start} (inclusive) and ending at {\ttfamily end} (non-\/inclusive). Both values are in bytes. It returns \hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{E\+I\+N\+A\+\_\+\+F\+A\+L\+SE} on failure, \hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{E\+I\+N\+A\+\_\+\+T\+R\+UE} otherwise. 

Referenced by ecore\+\_\+con\+\_\+client\+\_\+fd\+\_\+get(), emile\+\_\+binbuf\+\_\+cipher(), and emile\+\_\+binbuf\+\_\+decipher().

\index{Binary Buffer@{Binary Buffer}!eina\+\_\+binbuf\+\_\+string\+\_\+get@{eina\+\_\+binbuf\+\_\+string\+\_\+get}}
\index{eina\+\_\+binbuf\+\_\+string\+\_\+get@{eina\+\_\+binbuf\+\_\+string\+\_\+get}!Binary Buffer@{Binary Buffer}}
\subsubsection[{\texorpdfstring{eina\+\_\+binbuf\+\_\+string\+\_\+get(const Eina\+\_\+\+Binbuf $\ast$buf) E\+I\+N\+A\+\_\+\+A\+R\+G\+\_\+\+N\+O\+N\+N\+U\+L\+L(1) E\+I\+N\+A\+\_\+\+W\+A\+R\+N\+\_\+\+U\+N\+U\+S\+E\+D\+\_\+\+R\+E\+S\+U\+LT}{eina_binbuf_string_get(const Eina_Binbuf *buf) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+PI} const unsigned char$\ast$ eina\+\_\+binbuf\+\_\+string\+\_\+get (
\begin{DoxyParamCaption}
\item[{const {\bf Eina\+\_\+\+Binbuf} $\ast$}]{buf}
\end{DoxyParamCaption}
)}\hypertarget{group__Eina__Binary__Buffer__Group_gace23717e3c4371cc0b3f299147cec187}{}\label{group__Eina__Binary__Buffer__Group_gace23717e3c4371cc0b3f299147cec187}


Retrieve a pointer to the contents of a string buffer. 


\begin{DoxyParams}{Parameters}
{\em buf} & The string buffer. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The current string in the string buffer.
\end{DoxyReturn}
This function returns the string contained in {\ttfamily buf}. The returned value must not be modified and will no longer be valid if {\ttfamily buf} is modified. In other words, any eina\+\_\+binbuf\+\_\+append() or similar will make that pointer invalid.

\begin{DoxySeeAlso}{See also}
\hyperlink{group__Eina__Binary__Buffer__Group_ga0db56911173efa0164372671cfe3f344}{eina\+\_\+binbuf\+\_\+string\+\_\+steal()} 
\end{DoxySeeAlso}


Referenced by ecore\+\_\+con\+\_\+client\+\_\+fd\+\_\+get(), eet\+\_\+alias\+\_\+get(), eet\+\_\+data\+\_\+image\+\_\+header\+\_\+decode(), eet\+\_\+read\+\_\+direct(), emile\+\_\+binbuf\+\_\+cipher(), emile\+\_\+binbuf\+\_\+decipher(), emile\+\_\+compress(), and emile\+\_\+expand().

\index{Binary Buffer@{Binary Buffer}!eina\+\_\+binbuf\+\_\+string\+\_\+steal@{eina\+\_\+binbuf\+\_\+string\+\_\+steal}}
\index{eina\+\_\+binbuf\+\_\+string\+\_\+steal@{eina\+\_\+binbuf\+\_\+string\+\_\+steal}!Binary Buffer@{Binary Buffer}}
\subsubsection[{\texorpdfstring{eina\+\_\+binbuf\+\_\+string\+\_\+steal(\+Eina\+\_\+\+Binbuf $\ast$buf) E\+I\+N\+A\+\_\+\+M\+A\+L\+L\+O\+C E\+I\+N\+A\+\_\+\+W\+A\+R\+N\+\_\+\+U\+N\+U\+S\+E\+D\+\_\+\+R\+E\+S\+U\+L\+T E\+I\+N\+A\+\_\+\+A\+R\+G\+\_\+\+N\+O\+N\+N\+U\+L\+L(1)}{eina_binbuf_string_steal(Eina_Binbuf *buf) EINA_MALLOC EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1)}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+PI} unsigned char$\ast$ eina\+\_\+binbuf\+\_\+string\+\_\+steal (
\begin{DoxyParamCaption}
\item[{{\bf Eina\+\_\+\+Binbuf} $\ast$}]{buf}
\end{DoxyParamCaption}
)}\hypertarget{group__Eina__Binary__Buffer__Group_ga0db56911173efa0164372671cfe3f344}{}\label{group__Eina__Binary__Buffer__Group_ga0db56911173efa0164372671cfe3f344}


Steal the contents of a string buffer. 


\begin{DoxyParams}{Parameters}
{\em buf} & The string buffer to steal. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The current string in the string buffer.
\end{DoxyReturn}
This function returns the string contained in {\ttfamily buf}. {\ttfamily buf} is then initialized and does not own the returned string anymore. The caller must release the memory of the returned string by calling free().

\begin{DoxySeeAlso}{See also}
\hyperlink{group__Eina__Binary__Buffer__Group_gace23717e3c4371cc0b3f299147cec187}{eina\+\_\+binbuf\+\_\+string\+\_\+get()} 
\end{DoxySeeAlso}


Referenced by eet\+\_\+alias\+\_\+get(), eet\+\_\+identity\+\_\+certificate\+\_\+print(), eet\+\_\+mode\+\_\+get(), and eet\+\_\+read\+\_\+cipher().

\index{Binary Buffer@{Binary Buffer}!eina\+\_\+binbuf\+\_\+string\+\_\+free@{eina\+\_\+binbuf\+\_\+string\+\_\+free}}
\index{eina\+\_\+binbuf\+\_\+string\+\_\+free@{eina\+\_\+binbuf\+\_\+string\+\_\+free}!Binary Buffer@{Binary Buffer}}
\subsubsection[{\texorpdfstring{eina\+\_\+binbuf\+\_\+string\+\_\+free(\+Eina\+\_\+\+Binbuf $\ast$buf) E\+I\+N\+A\+\_\+\+A\+R\+G\+\_\+\+N\+O\+N\+N\+U\+L\+L(1)}{eina_binbuf_string_free(Eina_Binbuf *buf) EINA_ARG_NONNULL(1)}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+PI} void eina\+\_\+binbuf\+\_\+string\+\_\+free (
\begin{DoxyParamCaption}
\item[{{\bf Eina\+\_\+\+Binbuf} $\ast$}]{buf}
\end{DoxyParamCaption}
)}\hypertarget{group__Eina__Binary__Buffer__Group_ga091befb5454e6e140263bfb2a9d378dc}{}\label{group__Eina__Binary__Buffer__Group_ga091befb5454e6e140263bfb2a9d378dc}


Free the contents of a string buffer but not the buffer. 


\begin{DoxyParams}{Parameters}
{\em buf} & The string buffer to free the string of.\\
\hline
\end{DoxyParams}
This function frees the string contained in {\ttfamily buf} without freeing {\ttfamily buf}. \index{Binary Buffer@{Binary Buffer}!eina\+\_\+binbuf\+\_\+length\+\_\+get@{eina\+\_\+binbuf\+\_\+length\+\_\+get}}
\index{eina\+\_\+binbuf\+\_\+length\+\_\+get@{eina\+\_\+binbuf\+\_\+length\+\_\+get}!Binary Buffer@{Binary Buffer}}
\subsubsection[{\texorpdfstring{eina\+\_\+binbuf\+\_\+length\+\_\+get(const Eina\+\_\+\+Binbuf $\ast$buf) E\+I\+N\+A\+\_\+\+A\+R\+G\+\_\+\+N\+O\+N\+N\+U\+L\+L(1) E\+I\+N\+A\+\_\+\+W\+A\+R\+N\+\_\+\+U\+N\+U\+S\+E\+D\+\_\+\+R\+E\+S\+U\+LT}{eina_binbuf_length_get(const Eina_Binbuf *buf) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+PI} size\+\_\+t eina\+\_\+binbuf\+\_\+length\+\_\+get (
\begin{DoxyParamCaption}
\item[{const {\bf Eina\+\_\+\+Binbuf} $\ast$}]{buf}
\end{DoxyParamCaption}
)}\hypertarget{group__Eina__Binary__Buffer__Group_gade3052a6c39b4be19c25be92687cded3}{}\label{group__Eina__Binary__Buffer__Group_gade3052a6c39b4be19c25be92687cded3}


Retrieve the length of the string buffer content. 


\begin{DoxyParams}{Parameters}
{\em buf} & The string buffer. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The current length of the string, in bytes.
\end{DoxyReturn}
This function returns the length of {\ttfamily buf}. 

Referenced by ecore\+\_\+con\+\_\+client\+\_\+fd\+\_\+get(), eet\+\_\+alias\+\_\+get(), eet\+\_\+identity\+\_\+certificate\+\_\+print(), eet\+\_\+mode\+\_\+get(), eet\+\_\+read\+\_\+cipher(), eet\+\_\+read\+\_\+direct(), eet\+\_\+write\+\_\+cipher(), emile\+\_\+binbuf\+\_\+cipher(), emile\+\_\+binbuf\+\_\+decipher(), emile\+\_\+compress(), and emile\+\_\+expand().

