\hypertarget{kdbprivate_8h}{\section{kdbprivate.\+h File Reference}
\label{kdbprivate_8h}\index{kdbprivate.\+h@{kdbprivate.\+h}}
}


Private declarations.  


{\ttfamily \#include $<$kdb.\+h$>$}\\*
{\ttfamily \#include $<$kdbconfig.\+h$>$}\\*
{\ttfamily \#include $<$kdbextension.\+h$>$}\\*
{\ttfamily \#include $<$kdbhelper.\+h$>$}\\*
{\ttfamily \#include $<$kdbplugin.\+h$>$}\\*
{\ttfamily \#include $<$kdbproposal.\+h$>$}\\*
{\ttfamily \#include $<$kdbtypes.\+h$>$}\\*
{\ttfamily \#include $<$limits.\+h$>$}\\*
Include dependency graph for kdbprivate.\+h\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{kdbprivate_8h__incl}
\end{center}
\end{figure}
This graph shows which files directly or indirectly include this file\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{kdbprivate_8h__dep__incl}
\end{center}
\end{figure}
\subsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \hyperlink{kdbprivate_8h_acf20140d9b29c3edc782e72b05b25bd1}{K\+E\+Y\+S\+E\+T\+\_\+\+S\+I\+Z\+E}~16
\begin{DoxyCompactList}\small\item\em The minimal allocation size of a keyset inclusive N\+U\+L\+L byte. \end{DoxyCompactList}\item 
\#define \hyperlink{kdbprivate_8h_a05efd486827435a0e92220b69ae23519}{N\+R\+\_\+\+O\+F\+\_\+\+P\+L\+U\+G\+I\+N\+S}~10
\begin{DoxyCompactList}\small\item\em How many plugins can exist in an backend. \end{DoxyCompactList}\item 
\hypertarget{kdbprivate_8h_ae05f21372b7a85668978778868e341f3}{\#define \hyperlink{kdbprivate_8h_ae05f21372b7a85668978778868e341f3}{C\+O\+M\+M\+I\+T\+\_\+\+P\+L\+U\+G\+I\+N}~7}\label{kdbprivate_8h_ae05f21372b7a85668978778868e341f3}

\begin{DoxyCompactList}\small\item\em The index of the commit plugin. \end{DoxyCompactList}\item 
\hypertarget{kdbprivate_8h_a88825343a6d2a664b06c61d0787132aa}{\#define \hyperlink{kdbprivate_8h_a88825343a6d2a664b06c61d0787132aa}{S\+T\+O\+R\+A\+G\+E\+\_\+\+P\+L\+U\+G\+I\+N}~5}\label{kdbprivate_8h_a88825343a6d2a664b06c61d0787132aa}

\begin{DoxyCompactList}\small\item\em The index of the storage plugin. \end{DoxyCompactList}\item 
\hypertarget{kdbprivate_8h_aa9ac7247e2adc4bfc9c4d5a41743cb4c}{\#define \hyperlink{kdbprivate_8h_aa9ac7247e2adc4bfc9c4d5a41743cb4c}{R\+E\+S\+O\+L\+V\+E\+R\+\_\+\+P\+L\+U\+G\+I\+N}~0}\label{kdbprivate_8h_aa9ac7247e2adc4bfc9c4d5a41743cb4c}

\begin{DoxyCompactList}\small\item\em The index of the resolver plugin. \end{DoxyCompactList}\item 
\hypertarget{kdbprivate_8h_a98a9dd0e80f70ba8ad12cc00fedf52fb}{\#define \hyperlink{kdbprivate_8h_a98a9dd0e80f70ba8ad12cc00fedf52fb}{A\+P\+P\+R\+O\+X\+I\+M\+A\+T\+E\+\_\+\+N\+R\+\_\+\+O\+F\+\_\+\+B\+A\+C\+K\+E\+N\+D\+S}~16}\label{kdbprivate_8h_a98a9dd0e80f70ba8ad12cc00fedf52fb}

\begin{DoxyCompactList}\small\item\em Trie optimization. \end{DoxyCompactList}\item 
\#define \hyperlink{kdbprivate_8h_a93b6deccf1a55a100f74d2e076036f37}{M\+A\+X\+\_\+\+L\+E\+N\+\_\+\+I\+N\+T}~31
\begin{DoxyCompactList}\small\item\em The maximum of how many characters an integer needs as decimal number. \end{DoxyCompactList}\item 
\#define \hyperlink{kdbprivate_8h_a8891eaf029de761514dca775f19d6e18}{K\+D\+B\+\_\+\+S\+Y\+S\+T\+E\+M\+\_\+\+E\+L\+E\+K\+T\+R\+A}~\char`\"{}system/elektra\char`\"{}
\begin{DoxyCompactList}\small\item\em Backend mounting information. \end{DoxyCompactList}\item 
\#define \hyperlink{kdbprivate_8h_a22e02bbe80b6081a6485b3f3d2caec14}{test\+\_\+bit}(var, bit)~((var) \& (bit))
\begin{DoxyCompactList}\small\item\em Test a bit. \end{DoxyCompactList}\item 
\#define \hyperlink{kdbprivate_8h_a4874f05226547f6afa54ed6d65dc54ae}{set\+\_\+bit}(var, bit)~((var) $\vert$= (bit))
\begin{DoxyCompactList}\small\item\em Set a bit. \end{DoxyCompactList}\item 
\#define \hyperlink{kdbprivate_8h_a686cd59039c7112c10c8fbb82f9759e9}{clear\+\_\+bit}(var, bit)~((var) \&= $\sim$(bit))
\begin{DoxyCompactList}\small\item\em Clear a bit. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Enumerations}
\begin{DoxyCompactItemize}
\item 
enum \hyperlink{kdbprivate_8h_a351bbaa6e81f4d1d956bb71929dc7285}{keyflag\+\_\+t} \{ \hyperlink{kdbprivate_8h_a351bbaa6e81f4d1d956bb71929dc7285abedbc8b9c2dcfc51908d35aec7e7c756}{K\+E\+Y\+\_\+\+F\+L\+A\+G\+\_\+\+S\+Y\+N\+C} = 1, 
\hyperlink{kdbprivate_8h_a351bbaa6e81f4d1d956bb71929dc7285ab32b7424934246d1934c430408bd871f}{K\+E\+Y\+\_\+\+F\+L\+A\+G\+\_\+\+R\+O\+\_\+\+N\+A\+M\+E} = 1 $<$$<$ 1, 
\hyperlink{kdbprivate_8h_a351bbaa6e81f4d1d956bb71929dc7285abbd77cb92bacff89ef2694ec2cefb135}{K\+E\+Y\+\_\+\+F\+L\+A\+G\+\_\+\+R\+O\+\_\+\+V\+A\+L\+U\+E} = 1 $<$$<$ 2, 
\hyperlink{kdbprivate_8h_a351bbaa6e81f4d1d956bb71929dc7285a22971f649e6a7f6087a44e84ca0ff60d}{K\+E\+Y\+\_\+\+F\+L\+A\+G\+\_\+\+R\+O\+\_\+\+M\+E\+T\+A} = 1 $<$$<$ 3
 \}
\begin{DoxyCompactList}\small\item\em Key Flags. \end{DoxyCompactList}\item 
enum \hyperlink{kdbprivate_8h_afaf34e9cffb5c9382ad09f0f1811a61d}{ksflag\+\_\+t} \{ \hyperlink{kdbprivate_8h_afaf34e9cffb5c9382ad09f0f1811a61da60841484247805681f2555220aa13a6b}{K\+S\+\_\+\+F\+L\+A\+G\+\_\+\+S\+Y\+N\+C} = 1
 \}
\begin{DoxyCompactList}\small\item\em Ks Flags. \end{DoxyCompactList}\item 
\hypertarget{kdbprivate_8h_a3d9ffc270c8970dedd83d9ef26bc1a08}{enum \hyperlink{kdbprivate_8h_a3d9ffc270c8970dedd83d9ef26bc1a08}{Globalplugin\+Positions} }\label{kdbprivate_8h_a3d9ffc270c8970dedd83d9ef26bc1a08}

\begin{DoxyCompactList}\small\item\em Helper for identifying global plugin positions. \end{DoxyCompactList}\item 
enum \hyperlink{kdbprivate_8h_af7ad6ca41444a51395350791dbb2a0f8}{splitflag\+\_\+t} \{ \hyperlink{kdbprivate_8h_af7ad6ca41444a51395350791dbb2a0f8a26d34995557a981ce39558eae0c516f9}{S\+P\+L\+I\+T\+\_\+\+F\+L\+A\+G\+\_\+\+S\+Y\+N\+C} = 1, 
\hyperlink{kdbprivate_8h_af7ad6ca41444a51395350791dbb2a0f8a10600b1b4223a2f0d3938f8bbc48be06}{S\+P\+L\+I\+T\+\_\+\+F\+L\+A\+G\+\_\+\+C\+A\+S\+C\+A\+D\+I\+N\+G} = 1 $<$$<$ 1
 \}
\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
Split $\ast$ \hyperlink{kdbprivate_8h_ad2245a38809f28e325cd9b32089b4c68}{elektra\+Split\+New} (void)
\begin{DoxyCompactList}\small\item\em Allocates a new split object. \end{DoxyCompactList}\item 
void \hyperlink{kdbprivate_8h_ae569ef1bc4cd8e931b4a7840d8ce48e6}{elektra\+Split\+Del} (Split $\ast$keysets)
\begin{DoxyCompactList}\small\item\em Delete a split object. \end{DoxyCompactList}\item 
void \hyperlink{kdbprivate_8h_af677c7c96b215a61d76c7b4a8f8db877}{elektra\+Split\+Resize} (Split $\ast$ret)
\begin{DoxyCompactList}\small\item\em Doubles the size of how many parts of keysets can be appended. \end{DoxyCompactList}\item 
void \hyperlink{kdbprivate_8h_ab6067083cc1afb5d42180bf75f7f86ef}{elektra\+Split\+Remove} (Split $\ast$split, size\+\_\+t where)
\begin{DoxyCompactList}\small\item\em Remove one part of split. \end{DoxyCompactList}\item 
ssize\+\_\+t \hyperlink{kdbprivate_8h_a0c8c5c6c26aa42404d8aa06e6476a0f6}{elektra\+Split\+Append} (Split $\ast$split, Backend $\ast$backend, Key $\ast$parent\+Key, int syncbits)
\begin{DoxyCompactList}\small\item\em Increases the size of split and appends a new empty keyset. \end{DoxyCompactList}\item 
ssize\+\_\+t \hyperlink{kdbprivate_8h_a7a36f0da2272fde84ecfc09090669cea}{elektra\+Split\+Search\+Backend} (Split $\ast$split, Backend $\ast$backend, Key $\ast$key)
\begin{DoxyCompactList}\small\item\em Determines if the backend is already inserted or not. \end{DoxyCompactList}\item 
int \hyperlink{kdbprivate_8h_afb25e1f946f07e5490a962a42320a0cc}{elektra\+Split\+Search\+Root} (Split $\ast$split, Key $\ast$parent\+Key)
\item 
int \hyperlink{kdbprivate_8h_a7141dca0099564b12859a370fb060b6d}{elektra\+Split\+Buildup} (Split $\ast$split, K\+D\+B $\ast$handle, Key $\ast$parent\+Key)
\begin{DoxyCompactList}\small\item\em Walks through kdb-\/$>$split and adds all backends below parent\+Key to split. \end{DoxyCompactList}\item 
void \hyperlink{kdbprivate_8h_a5dde14941040fe97dd036555e858bb69}{elektra\+Split\+Update\+File\+Name} (Split $\ast$split, K\+D\+B $\ast$handle, Key $\ast$key)
\begin{DoxyCompactList}\small\item\em Update the (configuration) file name for the parent key. \end{DoxyCompactList}\item 
int \hyperlink{kdbprivate_8h_afee68d5935a6875ece69945e32242895}{elektra\+Split\+Appoint} (Split $\ast$split, K\+D\+B $\ast$handle, Key\+Set $\ast$ks)
\begin{DoxyCompactList}\small\item\em Appoints all keys from ks to yet unsynced splits. \end{DoxyCompactList}\item 
int \hyperlink{kdbprivate_8h_ab9abad2c6146816e966976d9f18f0c88}{elektra\+Split\+Get} (Split $\ast$split, Key $\ast$warning\+Key, K\+D\+B $\ast$handle)
\begin{DoxyCompactList}\small\item\em Does some work after getting of backends is finished. \end{DoxyCompactList}\item 
int \hyperlink{kdbprivate_8h_af3b1e5f1810964dddc3bd3a00822bca6}{elektra\+Split\+Merge} (Split $\ast$split, Key\+Set $\ast$dest)
\begin{DoxyCompactList}\small\item\em Merges together all parts of split into dest. \end{DoxyCompactList}\item 
int \hyperlink{kdbprivate_8h_a603c8c0fce6da478623a68367e2c7175}{elektra\+Split\+Check\+Size} (Split $\ast$split)
\begin{DoxyCompactList}\small\item\em Check if any of the split is uninitialized. \end{DoxyCompactList}\item 
int \hyperlink{kdbprivate_8h_a447e430a045cef7b107762171fbdc104}{elektra\+Split\+Divide} (Split $\ast$split, K\+D\+B $\ast$handle, Key\+Set $\ast$ks)
\begin{DoxyCompactList}\small\item\em Splits up the keysets and search for a sync bit in every key. \end{DoxyCompactList}\item 
int \hyperlink{kdbprivate_8h_a3176eff9c1b5a9bfcf3d2e648f537993}{elektra\+Split\+Sync} (Split $\ast$split)
\begin{DoxyCompactList}\small\item\em Add sync bits everywhere keys were removed/added. \end{DoxyCompactList}\item 
void \hyperlink{kdbprivate_8h_a44f9f801daa8ff1b29e48e31e49752f7}{elektra\+Split\+Prepare} (Split $\ast$split)
\begin{DoxyCompactList}\small\item\em Prepares for \hyperlink{group__kdb_ga11436b058408f83d303ca5e996832bcf}{kdb\+Set()} mainloop afterwards. \end{DoxyCompactList}\item 
int \hyperlink{kdbprivate_8h_af7619472c17c782befa93d2e029bc328}{elektra\+Split\+Update\+Size} (Split $\ast$split)
\begin{DoxyCompactList}\small\item\em Also update sizes after \hyperlink{group__kdb_ga11436b058408f83d303ca5e996832bcf}{kdb\+Set()} to recognize multiple \hyperlink{group__kdb_ga11436b058408f83d303ca5e996832bcf}{kdb\+Set()} attempts. \end{DoxyCompactList}\item 
Backend $\ast$ \hyperlink{kdbprivate_8h_a1d5b34cee8e0f62c0ea9f44c0e1cb675}{elektra\+Backend\+Open} (Key\+Set $\ast$elektra\+\_\+config, Key\+Set $\ast$modules, Key $\ast$error\+Key)
\begin{DoxyCompactList}\small\item\em Builds a backend out of the configuration supplied from\+: \end{DoxyCompactList}\item 
Backend $\ast$ \hyperlink{kdbprivate_8h_af3d7927d2eee6d2003f38a5f8679883b}{elektra\+Backend\+Open\+Missing} (Key $\ast$mountpoint)
\begin{DoxyCompactList}\small\item\em Opens the internal backend that indicates that a backend is missing at that place. \end{DoxyCompactList}\item 
Backend $\ast$ \hyperlink{kdbprivate_8h_a9ecb7fc73f33af5353756068d90e7862}{elektra\+Backend\+Open\+Default} (Key\+Set $\ast$modules, const char $\ast$file, Key $\ast$error\+Key)
\begin{DoxyCompactList}\small\item\em Opens a default backend using the plugin named K\+D\+B\+\_\+\+R\+E\+S\+O\+L\+V\+E\+R and K\+D\+B\+\_\+\+S\+T\+O\+R\+A\+G\+E. \end{DoxyCompactList}\item 
Backend $\ast$ \hyperlink{kdbprivate_8h_a2875836c10c37e9ee4b86847a82f8b77}{elektra\+Backend\+Open\+Modules} (Key\+Set $\ast$modules, Key $\ast$error\+Key)
\item 
Backend $\ast$ \hyperlink{kdbprivate_8h_a70e47734bdace223415ecb804d5126c5}{elektra\+Backend\+Open\+Version} (Key $\ast$error\+Key)
\begin{DoxyCompactList}\small\item\em Opens the internal version backend. \end{DoxyCompactList}\item 
int \hyperlink{kdbprivate_8h_adf493c5336da5955af376dc1b7cdb264}{elektra\+Backend\+Update\+Size} (Backend $\ast$backend, Key $\ast$parent, int size)
\begin{DoxyCompactList}\small\item\em Update internal size in backend. \end{DoxyCompactList}\item 
int \hyperlink{kdbprivate_8h_a0c1bb87ce27fcf307fa71468206872c2}{elektra\+Process\+Plugin} (Key $\ast$cur, int $\ast$plugin\+Number, char $\ast$$\ast$plugin\+Name, char $\ast$$\ast$reference\+Name, Key $\ast$error\+Key)
\item 
int \hyperlink{kdbprivate_8h_a42a9038eca54799559e3b9b7294fc689}{elektra\+Process\+Plugins} (Plugin $\ast$$\ast$plugins, Key\+Set $\ast$modules, Key\+Set $\ast$reference\+Plugins, Key\+Set $\ast$config, Key\+Set $\ast$system\+Config, Key $\ast$error\+Key)
\begin{DoxyCompactList}\small\item\em Load a plugin. \end{DoxyCompactList}\item 
Plugin $\ast$ \hyperlink{kdbprivate_8h_a853bd9e11745f72b944d56e0c521e454}{elektra\+Plugin\+Open} (const char $\ast$backendname, Key\+Set $\ast$modules, Key\+Set $\ast$config, Key $\ast$error\+Key)
\begin{DoxyCompactList}\small\item\em Opens a plugin. \end{DoxyCompactList}\item 
int \hyperlink{group__trie_gafbd6d64636af0f06b703c1b0c32c0372}{elektra\+Trie\+Close} (Trie $\ast$trie, Key $\ast$error\+Key)
\begin{DoxyCompactList}\small\item\em Closes the trie and all opened backends within. \end{DoxyCompactList}\item 
Backend $\ast$ \hyperlink{group__trie_ga01cd822dd59a8929211f9ec804c15561}{elektra\+Trie\+Lookup} (Trie $\ast$trie, const Key $\ast$key)
\begin{DoxyCompactList}\small\item\em Internal Datastructure for mountpoints. \end{DoxyCompactList}\item 
int \hyperlink{kdbprivate_8h_ad3c84032644ff56feb44106a7924d3fe}{elektra\+Mount\+Open} (K\+D\+B $\ast$kdb, Key\+Set $\ast$config, Key\+Set $\ast$modules, Key $\ast$error\+Key)
\begin{DoxyCompactList}\small\item\em Creates a trie from a given configuration. \end{DoxyCompactList}\item 
int \hyperlink{kdbprivate_8h_a10c21e6fe8931013a0dd3f00c87833d8}{elektra\+Mount\+Default} (K\+D\+B $\ast$kdb, Key\+Set $\ast$modules, int in\+Fallback, Key $\ast$error\+Key)
\begin{DoxyCompactList}\small\item\em Reopens the default backend and mounts the default backend if needed. \end{DoxyCompactList}\item 
int \hyperlink{kdbprivate_8h_a54e32ffc628b2ca1e1876efb6d28cfc7}{elektra\+Mount\+Modules} (K\+D\+B $\ast$kdb, Key\+Set $\ast$modules, Key $\ast$error\+Key)
\begin{DoxyCompactList}\small\item\em Mount all module configurations. \end{DoxyCompactList}\item 
int \hyperlink{kdbprivate_8h_a6362fc7585d7a308c08005cb3cb1a4cd}{elektra\+Mount\+Version} (K\+D\+B $\ast$kdb, Key $\ast$error\+Key)
\begin{DoxyCompactList}\small\item\em Mount the version backend. \end{DoxyCompactList}\item 
int \hyperlink{kdbprivate_8h_a746a6f6758e8cdfb985b4c46a0e246ff}{elektra\+Mount\+Backend} (K\+D\+B $\ast$kdb, Backend $\ast$backend, Key $\ast$error\+Key)
\begin{DoxyCompactList}\small\item\em Mounts a backend into the trie. \end{DoxyCompactList}\item 
Key $\ast$ \hyperlink{kdbprivate_8h_a0cdbb658c5ac280672e4ac22419075f1}{elektra\+Mount\+Get\+Mountpoint} (K\+D\+B $\ast$handle, const Key $\ast$where)
\begin{DoxyCompactList}\small\item\em Lookup a mountpoint in a handle for a specific key. \end{DoxyCompactList}\item 
Backend $\ast$ \hyperlink{kdbprivate_8h_aa66ed093e4c71d97018ffc66d46d0e1f}{elektra\+Mount\+Get\+Backend} (K\+D\+B $\ast$handle, const Key $\ast$key)
\begin{DoxyCompactList}\small\item\em Lookup a backend handle for a specific key. \end{DoxyCompactList}\item 
Key $\ast$ \hyperlink{kdbprivate_8h_a17a6c04aa1ff61c84a8cf9658c5ca5a2}{elektra\+Ks\+Prev} (Key\+Set $\ast$ks)
\begin{DoxyCompactList}\small\item\em Returns the previous Key in a Key\+Set. \end{DoxyCompactList}\item 
Key $\ast$ \hyperlink{kdbprivate_8h_a97b55b0908f9c9434fc0753a0d7089b8}{elektra\+Ks\+Pop\+At\+Cursor} (Key\+Set $\ast$ks, cursor\+\_\+t pos)
\begin{DoxyCompactList}\small\item\em Pop key at given cursor position. \end{DoxyCompactList}\item 
int \hyperlink{kdbprivate_8h_aec09df442faca2e1e8cf233d22fefa63}{elektra\+Key\+Lock} (Key $\ast$key, enum \hyperlink{group__proposal_ga824e384e248ed1e05448294bff7271c0}{elektra\+Lock\+Options} what)
\begin{DoxyCompactList}\small\item\em Permanently locks a part of the key. \end{DoxyCompactList}\item 
ssize\+\_\+t \hyperlink{kdbprivate_8h_a6360a1271f6410f25fbb9b95e346da1a}{elektra\+Memcpy} (Key $\ast$$\ast$array1, Key $\ast$$\ast$array2, size\+\_\+t size)
\begin{DoxyCompactList}\small\item\em Internal Methods for Elektra. \end{DoxyCompactList}\item 
ssize\+\_\+t \hyperlink{kdbprivate_8h_abc60bdbe5d252a99734b0122687560be}{elektra\+Memmove} (Key $\ast$$\ast$array1, Key $\ast$$\ast$array2, size\+\_\+t size)
\begin{DoxyCompactList}\small\item\em Copies the key array2 into where array1 points. \end{DoxyCompactList}\item 
char $\ast$ \hyperlink{kdbprivate_8h_a04ad42d215b2ce5ed83e1a9354f6ba94}{elektra\+Str\+N\+Dup} (const char $\ast$s, size\+\_\+t l)
\begin{DoxyCompactList}\small\item\em Copy buffer into new allocated memory. \end{DoxyCompactList}\item 
int \hyperlink{kdbprivate_8h_a7126bbb84c75bb98c1e3641dcdf32c6b}{elektra\+Validate\+Key\+Name} (const char $\ast$name, size\+\_\+t size)
\begin{DoxyCompactList}\small\item\em Validates whether the supplied keyname is valid. \end{DoxyCompactList}\item 
Key\+Set $\ast$ \hyperlink{kdbprivate_8h_ab436b020c8292d4c40ea2b27dc70305d}{elektra\+Rename\+Keys} (Key\+Set $\ast$config, const char $\ast$name)
\begin{DoxyCompactList}\small\item\em Takes the first key and cuts off this common part for all other keys, instead name will be prepended. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Private declarations. 

\begin{DoxyCopyright}{Copyright}
B\+S\+D License (see doc/\+C\+O\+P\+Y\+I\+N\+G or \href{http://www.libelektra.org}{\tt http\+://www.\+libelektra.\+org}) 
\end{DoxyCopyright}


\subsection{Macro Definition Documentation}
\hypertarget{kdbprivate_8h_a686cd59039c7112c10c8fbb82f9759e9}{\index{kdbprivate.\+h@{kdbprivate.\+h}!clear\+\_\+bit@{clear\+\_\+bit}}
\index{clear\+\_\+bit@{clear\+\_\+bit}!kdbprivate.\+h@{kdbprivate.\+h}}
\subsubsection[{clear\+\_\+bit}]{\setlength{\rightskip}{0pt plus 5cm}\#define clear\+\_\+bit(
\begin{DoxyParamCaption}
\item[{}]{var, }
\item[{}]{bit}
\end{DoxyParamCaption}
)~((var) \&= $\sim$(bit))}}\label{kdbprivate_8h_a686cd59039c7112c10c8fbb82f9759e9}


Clear a bit. 

\begin{DoxySeeAlso}{See also}
\hyperlink{kdbprivate_8h_a4874f05226547f6afa54ed6d65dc54ae}{set\+\_\+bit()} 
\end{DoxySeeAlso}
\hypertarget{kdbprivate_8h_a8891eaf029de761514dca775f19d6e18}{\index{kdbprivate.\+h@{kdbprivate.\+h}!K\+D\+B\+\_\+\+S\+Y\+S\+T\+E\+M\+\_\+\+E\+L\+E\+K\+T\+R\+A@{K\+D\+B\+\_\+\+S\+Y\+S\+T\+E\+M\+\_\+\+E\+L\+E\+K\+T\+R\+A}}
\index{K\+D\+B\+\_\+\+S\+Y\+S\+T\+E\+M\+\_\+\+E\+L\+E\+K\+T\+R\+A@{K\+D\+B\+\_\+\+S\+Y\+S\+T\+E\+M\+\_\+\+E\+L\+E\+K\+T\+R\+A}!kdbprivate.\+h@{kdbprivate.\+h}}
\subsubsection[{K\+D\+B\+\_\+\+S\+Y\+S\+T\+E\+M\+\_\+\+E\+L\+E\+K\+T\+R\+A}]{\setlength{\rightskip}{0pt plus 5cm}\#define K\+D\+B\+\_\+\+S\+Y\+S\+T\+E\+M\+\_\+\+E\+L\+E\+K\+T\+R\+A~\char`\"{}system/elektra\char`\"{}}}\label{kdbprivate_8h_a8891eaf029de761514dca775f19d6e18}


Backend mounting information. 

This key directory tells you where each backend is mounted to which mountpoint. \hypertarget{kdbprivate_8h_acf20140d9b29c3edc782e72b05b25bd1}{\index{kdbprivate.\+h@{kdbprivate.\+h}!K\+E\+Y\+S\+E\+T\+\_\+\+S\+I\+Z\+E@{K\+E\+Y\+S\+E\+T\+\_\+\+S\+I\+Z\+E}}
\index{K\+E\+Y\+S\+E\+T\+\_\+\+S\+I\+Z\+E@{K\+E\+Y\+S\+E\+T\+\_\+\+S\+I\+Z\+E}!kdbprivate.\+h@{kdbprivate.\+h}}
\subsubsection[{K\+E\+Y\+S\+E\+T\+\_\+\+S\+I\+Z\+E}]{\setlength{\rightskip}{0pt plus 5cm}\#define K\+E\+Y\+S\+E\+T\+\_\+\+S\+I\+Z\+E~16}}\label{kdbprivate_8h_acf20140d9b29c3edc782e72b05b25bd1}


The minimal allocation size of a keyset inclusive N\+U\+L\+L byte. 

ks\+Get\+Alloc() will return one less because it says how much can actually be stored. \hypertarget{kdbprivate_8h_a93b6deccf1a55a100f74d2e076036f37}{\index{kdbprivate.\+h@{kdbprivate.\+h}!M\+A\+X\+\_\+\+L\+E\+N\+\_\+\+I\+N\+T@{M\+A\+X\+\_\+\+L\+E\+N\+\_\+\+I\+N\+T}}
\index{M\+A\+X\+\_\+\+L\+E\+N\+\_\+\+I\+N\+T@{M\+A\+X\+\_\+\+L\+E\+N\+\_\+\+I\+N\+T}!kdbprivate.\+h@{kdbprivate.\+h}}
\subsubsection[{M\+A\+X\+\_\+\+L\+E\+N\+\_\+\+I\+N\+T}]{\setlength{\rightskip}{0pt plus 5cm}\#define M\+A\+X\+\_\+\+L\+E\+N\+\_\+\+I\+N\+T~31}}\label{kdbprivate_8h_a93b6deccf1a55a100f74d2e076036f37}


The maximum of how many characters an integer needs as decimal number. 

\hypertarget{kdbprivate_8h_a05efd486827435a0e92220b69ae23519}{\index{kdbprivate.\+h@{kdbprivate.\+h}!N\+R\+\_\+\+O\+F\+\_\+\+P\+L\+U\+G\+I\+N\+S@{N\+R\+\_\+\+O\+F\+\_\+\+P\+L\+U\+G\+I\+N\+S}}
\index{N\+R\+\_\+\+O\+F\+\_\+\+P\+L\+U\+G\+I\+N\+S@{N\+R\+\_\+\+O\+F\+\_\+\+P\+L\+U\+G\+I\+N\+S}!kdbprivate.\+h@{kdbprivate.\+h}}
\subsubsection[{N\+R\+\_\+\+O\+F\+\_\+\+P\+L\+U\+G\+I\+N\+S}]{\setlength{\rightskip}{0pt plus 5cm}\#define N\+R\+\_\+\+O\+F\+\_\+\+P\+L\+U\+G\+I\+N\+S~10}}\label{kdbprivate_8h_a05efd486827435a0e92220b69ae23519}


How many plugins can exist in an backend. 

\hypertarget{kdbprivate_8h_a4874f05226547f6afa54ed6d65dc54ae}{\index{kdbprivate.\+h@{kdbprivate.\+h}!set\+\_\+bit@{set\+\_\+bit}}
\index{set\+\_\+bit@{set\+\_\+bit}!kdbprivate.\+h@{kdbprivate.\+h}}
\subsubsection[{set\+\_\+bit}]{\setlength{\rightskip}{0pt plus 5cm}\#define set\+\_\+bit(
\begin{DoxyParamCaption}
\item[{}]{var, }
\item[{}]{bit}
\end{DoxyParamCaption}
)~((var) $\vert$= (bit))}}\label{kdbprivate_8h_a4874f05226547f6afa54ed6d65dc54ae}


Set a bit. 

\begin{DoxySeeAlso}{See also}
\hyperlink{kdbprivate_8h_a686cd59039c7112c10c8fbb82f9759e9}{clear\+\_\+bit()} 
\end{DoxySeeAlso}
\hypertarget{kdbprivate_8h_a22e02bbe80b6081a6485b3f3d2caec14}{\index{kdbprivate.\+h@{kdbprivate.\+h}!test\+\_\+bit@{test\+\_\+bit}}
\index{test\+\_\+bit@{test\+\_\+bit}!kdbprivate.\+h@{kdbprivate.\+h}}
\subsubsection[{test\+\_\+bit}]{\setlength{\rightskip}{0pt plus 5cm}\#define test\+\_\+bit(
\begin{DoxyParamCaption}
\item[{}]{var, }
\item[{}]{bit}
\end{DoxyParamCaption}
)~((var) \& (bit))}}\label{kdbprivate_8h_a22e02bbe80b6081a6485b3f3d2caec14}


Test a bit. 

\begin{DoxySeeAlso}{See also}
\hyperlink{kdbprivate_8h_a4874f05226547f6afa54ed6d65dc54ae}{set\+\_\+bit()}, \hyperlink{kdbprivate_8h_a686cd59039c7112c10c8fbb82f9759e9}{clear\+\_\+bit()} 
\end{DoxySeeAlso}


\subsection{Enumeration Type Documentation}
\hypertarget{kdbprivate_8h_a351bbaa6e81f4d1d956bb71929dc7285}{\index{kdbprivate.\+h@{kdbprivate.\+h}!keyflag\+\_\+t@{keyflag\+\_\+t}}
\index{keyflag\+\_\+t@{keyflag\+\_\+t}!kdbprivate.\+h@{kdbprivate.\+h}}
\subsubsection[{keyflag\+\_\+t}]{\setlength{\rightskip}{0pt plus 5cm}enum {\bf keyflag\+\_\+t}}}\label{kdbprivate_8h_a351bbaa6e81f4d1d956bb71929dc7285}


Key Flags. 

Store a synchronizer state so that the Elektra knows if something has changed or not. \begin{Desc}
\item[Enumerator]\par
\begin{description}
\index{K\+E\+Y\+\_\+\+F\+L\+A\+G\+\_\+\+S\+Y\+N\+C@{K\+E\+Y\+\_\+\+F\+L\+A\+G\+\_\+\+S\+Y\+N\+C}!kdbprivate.\+h@{kdbprivate.\+h}}\index{kdbprivate.\+h@{kdbprivate.\+h}!K\+E\+Y\+\_\+\+F\+L\+A\+G\+\_\+\+S\+Y\+N\+C@{K\+E\+Y\+\_\+\+F\+L\+A\+G\+\_\+\+S\+Y\+N\+C}}\item[{\em 
\hypertarget{kdbprivate_8h_a351bbaa6e81f4d1d956bb71929dc7285abedbc8b9c2dcfc51908d35aec7e7c756}{K\+E\+Y\+\_\+\+F\+L\+A\+G\+\_\+\+S\+Y\+N\+C}\label{kdbprivate_8h_a351bbaa6e81f4d1d956bb71929dc7285abedbc8b9c2dcfc51908d35aec7e7c756}
}]Key need sync. If name, value or metadata are changed this flag will be set, so that the backend will sync the key to database. \index{K\+E\+Y\+\_\+\+F\+L\+A\+G\+\_\+\+R\+O\+\_\+\+N\+A\+M\+E@{K\+E\+Y\+\_\+\+F\+L\+A\+G\+\_\+\+R\+O\+\_\+\+N\+A\+M\+E}!kdbprivate.\+h@{kdbprivate.\+h}}\index{kdbprivate.\+h@{kdbprivate.\+h}!K\+E\+Y\+\_\+\+F\+L\+A\+G\+\_\+\+R\+O\+\_\+\+N\+A\+M\+E@{K\+E\+Y\+\_\+\+F\+L\+A\+G\+\_\+\+R\+O\+\_\+\+N\+A\+M\+E}}\item[{\em 
\hypertarget{kdbprivate_8h_a351bbaa6e81f4d1d956bb71929dc7285ab32b7424934246d1934c430408bd871f}{K\+E\+Y\+\_\+\+F\+L\+A\+G\+\_\+\+R\+O\+\_\+\+N\+A\+M\+E}\label{kdbprivate_8h_a351bbaa6e81f4d1d956bb71929dc7285ab32b7424934246d1934c430408bd871f}
}]Read only flag for name. Key name is read only and not allowed to be changed. All attempts to change the name will lead to an error. Needed for meta keys and keys that are in a data structure that depends on name ordering. \index{K\+E\+Y\+\_\+\+F\+L\+A\+G\+\_\+\+R\+O\+\_\+\+V\+A\+L\+U\+E@{K\+E\+Y\+\_\+\+F\+L\+A\+G\+\_\+\+R\+O\+\_\+\+V\+A\+L\+U\+E}!kdbprivate.\+h@{kdbprivate.\+h}}\index{kdbprivate.\+h@{kdbprivate.\+h}!K\+E\+Y\+\_\+\+F\+L\+A\+G\+\_\+\+R\+O\+\_\+\+V\+A\+L\+U\+E@{K\+E\+Y\+\_\+\+F\+L\+A\+G\+\_\+\+R\+O\+\_\+\+V\+A\+L\+U\+E}}\item[{\em 
\hypertarget{kdbprivate_8h_a351bbaa6e81f4d1d956bb71929dc7285abbd77cb92bacff89ef2694ec2cefb135}{K\+E\+Y\+\_\+\+F\+L\+A\+G\+\_\+\+R\+O\+\_\+\+V\+A\+L\+U\+E}\label{kdbprivate_8h_a351bbaa6e81f4d1d956bb71929dc7285abbd77cb92bacff89ef2694ec2cefb135}
}]Read only flag for value. Key value is read only and not allowed to be changed. All attempts to change the value will lead to an error. Needed for meta keys \index{K\+E\+Y\+\_\+\+F\+L\+A\+G\+\_\+\+R\+O\+\_\+\+M\+E\+T\+A@{K\+E\+Y\+\_\+\+F\+L\+A\+G\+\_\+\+R\+O\+\_\+\+M\+E\+T\+A}!kdbprivate.\+h@{kdbprivate.\+h}}\index{kdbprivate.\+h@{kdbprivate.\+h}!K\+E\+Y\+\_\+\+F\+L\+A\+G\+\_\+\+R\+O\+\_\+\+M\+E\+T\+A@{K\+E\+Y\+\_\+\+F\+L\+A\+G\+\_\+\+R\+O\+\_\+\+M\+E\+T\+A}}\item[{\em 
\hypertarget{kdbprivate_8h_a351bbaa6e81f4d1d956bb71929dc7285a22971f649e6a7f6087a44e84ca0ff60d}{K\+E\+Y\+\_\+\+F\+L\+A\+G\+\_\+\+R\+O\+\_\+\+M\+E\+T\+A}\label{kdbprivate_8h_a351bbaa6e81f4d1d956bb71929dc7285a22971f649e6a7f6087a44e84ca0ff60d}
}]Read only flag for meta. Key meta is read only and not allowed to be changed. All attempts to change the value will lead to an error. Needed for meta keys. \end{description}
\end{Desc}
\hypertarget{kdbprivate_8h_afaf34e9cffb5c9382ad09f0f1811a61d}{\index{kdbprivate.\+h@{kdbprivate.\+h}!ksflag\+\_\+t@{ksflag\+\_\+t}}
\index{ksflag\+\_\+t@{ksflag\+\_\+t}!kdbprivate.\+h@{kdbprivate.\+h}}
\subsubsection[{ksflag\+\_\+t}]{\setlength{\rightskip}{0pt plus 5cm}enum {\bf ksflag\+\_\+t}}}\label{kdbprivate_8h_afaf34e9cffb5c9382ad09f0f1811a61d}


Ks Flags. 

Store a synchronizer state so that the Elektra knows if something has changed or not. \begin{Desc}
\item[Enumerator]\par
\begin{description}
\index{K\+S\+\_\+\+F\+L\+A\+G\+\_\+\+S\+Y\+N\+C@{K\+S\+\_\+\+F\+L\+A\+G\+\_\+\+S\+Y\+N\+C}!kdbprivate.\+h@{kdbprivate.\+h}}\index{kdbprivate.\+h@{kdbprivate.\+h}!K\+S\+\_\+\+F\+L\+A\+G\+\_\+\+S\+Y\+N\+C@{K\+S\+\_\+\+F\+L\+A\+G\+\_\+\+S\+Y\+N\+C}}\item[{\em 
\hypertarget{kdbprivate_8h_afaf34e9cffb5c9382ad09f0f1811a61da60841484247805681f2555220aa13a6b}{K\+S\+\_\+\+F\+L\+A\+G\+\_\+\+S\+Y\+N\+C}\label{kdbprivate_8h_afaf34e9cffb5c9382ad09f0f1811a61da60841484247805681f2555220aa13a6b}
}]Key\+Set need sync. If keys were popped from the Keyset this flag will be set, so that the backend will sync the keys to database. \end{description}
\end{Desc}
\hypertarget{kdbprivate_8h_af7ad6ca41444a51395350791dbb2a0f8}{\index{kdbprivate.\+h@{kdbprivate.\+h}!splitflag\+\_\+t@{splitflag\+\_\+t}}
\index{splitflag\+\_\+t@{splitflag\+\_\+t}!kdbprivate.\+h@{kdbprivate.\+h}}
\subsubsection[{splitflag\+\_\+t}]{\setlength{\rightskip}{0pt plus 5cm}enum {\bf splitflag\+\_\+t}}}\label{kdbprivate_8h_af7ad6ca41444a51395350791dbb2a0f8}
\begin{Desc}
\item[Enumerator]\par
\begin{description}
\index{S\+P\+L\+I\+T\+\_\+\+F\+L\+A\+G\+\_\+\+S\+Y\+N\+C@{S\+P\+L\+I\+T\+\_\+\+F\+L\+A\+G\+\_\+\+S\+Y\+N\+C}!kdbprivate.\+h@{kdbprivate.\+h}}\index{kdbprivate.\+h@{kdbprivate.\+h}!S\+P\+L\+I\+T\+\_\+\+F\+L\+A\+G\+\_\+\+S\+Y\+N\+C@{S\+P\+L\+I\+T\+\_\+\+F\+L\+A\+G\+\_\+\+S\+Y\+N\+C}}\item[{\em 
\hypertarget{kdbprivate_8h_af7ad6ca41444a51395350791dbb2a0f8a26d34995557a981ce39558eae0c516f9}{S\+P\+L\+I\+T\+\_\+\+F\+L\+A\+G\+\_\+\+S\+Y\+N\+C}\label{kdbprivate_8h_af7ad6ca41444a51395350791dbb2a0f8a26d34995557a981ce39558eae0c516f9}
}]Key\+Set in Split need sync. Is there any key in there which need to be synced? If keys were popped from the Keyset this flag will be set, so that the backend will sync the keys to database. \index{S\+P\+L\+I\+T\+\_\+\+F\+L\+A\+G\+\_\+\+C\+A\+S\+C\+A\+D\+I\+N\+G@{S\+P\+L\+I\+T\+\_\+\+F\+L\+A\+G\+\_\+\+C\+A\+S\+C\+A\+D\+I\+N\+G}!kdbprivate.\+h@{kdbprivate.\+h}}\index{kdbprivate.\+h@{kdbprivate.\+h}!S\+P\+L\+I\+T\+\_\+\+F\+L\+A\+G\+\_\+\+C\+A\+S\+C\+A\+D\+I\+N\+G@{S\+P\+L\+I\+T\+\_\+\+F\+L\+A\+G\+\_\+\+C\+A\+S\+C\+A\+D\+I\+N\+G}}\item[{\em 
\hypertarget{kdbprivate_8h_af7ad6ca41444a51395350791dbb2a0f8a10600b1b4223a2f0d3938f8bbc48be06}{S\+P\+L\+I\+T\+\_\+\+F\+L\+A\+G\+\_\+\+C\+A\+S\+C\+A\+D\+I\+N\+G}\label{kdbprivate_8h_af7ad6ca41444a51395350791dbb2a0f8a10600b1b4223a2f0d3938f8bbc48be06}
}]Do we need relative checks? Is this a cascading backend? \end{description}
\end{Desc}


\subsection{Function Documentation}
\hypertarget{kdbprivate_8h_a1d5b34cee8e0f62c0ea9f44c0e1cb675}{\index{kdbprivate.\+h@{kdbprivate.\+h}!elektra\+Backend\+Open@{elektra\+Backend\+Open}}
\index{elektra\+Backend\+Open@{elektra\+Backend\+Open}!kdbprivate.\+h@{kdbprivate.\+h}}
\subsubsection[{elektra\+Backend\+Open}]{\setlength{\rightskip}{0pt plus 5cm}Backend$\ast$ elektra\+Backend\+Open (
\begin{DoxyParamCaption}
\item[{Key\+Set $\ast$}]{elektra\+Config, }
\item[{Key\+Set $\ast$}]{modules, }
\item[{Key $\ast$}]{error\+Key}
\end{DoxyParamCaption}
)}}\label{kdbprivate_8h_a1d5b34cee8e0f62c0ea9f44c0e1cb675}


Builds a backend out of the configuration supplied from\+: 

\begin{DoxyVerb}system/elektra/mountpoints/<name>
\end{DoxyVerb}


The root key must be like the above example. You do not need to rewind the keyset. But every key must be below the root key.

The internal consistency will be checked in this function. If necessary parts are missing, like no plugins, they cant be loaded or similar 0 will be returned.

\hyperlink{group__keyset_ga6b00cf82b59af4d883a9bad6cf4a4a4a}{ks\+Cut()} is perfectly suitable for cutting out the configuration like needed.

\begin{DoxyNote}{Note}
The given Key\+Set will be deleted within the function, don't use it afterwards.
\end{DoxyNote}

\begin{DoxyParams}{Parameters}
{\em elektra\+Config} & the configuration to work with. It is used to build up this backend. \\
\hline
{\em modules} & used to load new modules or get references to existing one \\
\hline
{\em error\+Key} & the key where an error and warnings are added\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a pointer to a freshly allocated backend this could be the requested backend or a so called \char`\"{}missing backend\char`\"{}. 
\end{DoxyReturn}

\begin{DoxyRetVals}{Return values}
{\em 0} & if out of memory \\
\hline
\end{DoxyRetVals}
\hypertarget{kdbprivate_8h_a9ecb7fc73f33af5353756068d90e7862}{\index{kdbprivate.\+h@{kdbprivate.\+h}!elektra\+Backend\+Open\+Default@{elektra\+Backend\+Open\+Default}}
\index{elektra\+Backend\+Open\+Default@{elektra\+Backend\+Open\+Default}!kdbprivate.\+h@{kdbprivate.\+h}}
\subsubsection[{elektra\+Backend\+Open\+Default}]{\setlength{\rightskip}{0pt plus 5cm}Backend$\ast$ elektra\+Backend\+Open\+Default (
\begin{DoxyParamCaption}
\item[{Key\+Set $\ast$}]{modules, }
\item[{const char $\ast$}]{file, }
\item[{Key $\ast$}]{error\+Key}
\end{DoxyParamCaption}
)}}\label{kdbprivate_8h_a9ecb7fc73f33af5353756068d90e7862}


Opens a default backend using the plugin named K\+D\+B\+\_\+\+R\+E\+S\+O\+L\+V\+E\+R and K\+D\+B\+\_\+\+S\+T\+O\+R\+A\+G\+E. 


\begin{DoxyParams}{Parameters}
{\em modules} & the modules to work with \\
\hline
{\em error\+Key} & the key to issue warnings and errors to \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the fresh allocated default backend or 0 if it failed 
\end{DoxyReturn}
\hypertarget{kdbprivate_8h_af3d7927d2eee6d2003f38a5f8679883b}{\index{kdbprivate.\+h@{kdbprivate.\+h}!elektra\+Backend\+Open\+Missing@{elektra\+Backend\+Open\+Missing}}
\index{elektra\+Backend\+Open\+Missing@{elektra\+Backend\+Open\+Missing}!kdbprivate.\+h@{kdbprivate.\+h}}
\subsubsection[{elektra\+Backend\+Open\+Missing}]{\setlength{\rightskip}{0pt plus 5cm}Backend$\ast$ elektra\+Backend\+Open\+Missing (
\begin{DoxyParamCaption}
\item[{Key $\ast$}]{mp}
\end{DoxyParamCaption}
)}}\label{kdbprivate_8h_af3d7927d2eee6d2003f38a5f8679883b}


Opens the internal backend that indicates that a backend is missing at that place. 

\begin{DoxyReturn}{Returns}
the fresh allocated backend or 0 if no memory 
\end{DoxyReturn}
\hypertarget{kdbprivate_8h_a2875836c10c37e9ee4b86847a82f8b77}{\index{kdbprivate.\+h@{kdbprivate.\+h}!elektra\+Backend\+Open\+Modules@{elektra\+Backend\+Open\+Modules}}
\index{elektra\+Backend\+Open\+Modules@{elektra\+Backend\+Open\+Modules}!kdbprivate.\+h@{kdbprivate.\+h}}
\subsubsection[{elektra\+Backend\+Open\+Modules}]{\setlength{\rightskip}{0pt plus 5cm}Backend$\ast$ elektra\+Backend\+Open\+Modules (
\begin{DoxyParamCaption}
\item[{Key\+Set $\ast$}]{modules, }
\item[{Key $\ast$}]{error\+Key}
\end{DoxyParamCaption}
)}}\label{kdbprivate_8h_a2875836c10c37e9ee4b86847a82f8b77}
\begin{DoxyReturn}{Returns}
a backend which gives plugin configuration of the module which is currently point to.
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em modules} & the modules to work with \\
\hline
{\em error\+Key} & the key to issue warnings and errors to \\
\hline
\end{DoxyParams}
\hypertarget{kdbprivate_8h_a70e47734bdace223415ecb804d5126c5}{\index{kdbprivate.\+h@{kdbprivate.\+h}!elektra\+Backend\+Open\+Version@{elektra\+Backend\+Open\+Version}}
\index{elektra\+Backend\+Open\+Version@{elektra\+Backend\+Open\+Version}!kdbprivate.\+h@{kdbprivate.\+h}}
\subsubsection[{elektra\+Backend\+Open\+Version}]{\setlength{\rightskip}{0pt plus 5cm}Backend$\ast$ elektra\+Backend\+Open\+Version (
\begin{DoxyParamCaption}
\item[{Key $\ast$}]{error\+Key}
\end{DoxyParamCaption}
)}}\label{kdbprivate_8h_a70e47734bdace223415ecb804d5126c5}


Opens the internal version backend. 


\begin{DoxyParams}{Parameters}
{\em error\+Key} & the key to issue warnings and errors to \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the fresh allocated default backend or 0 if it failed 
\end{DoxyReturn}
\hypertarget{kdbprivate_8h_adf493c5336da5955af376dc1b7cdb264}{\index{kdbprivate.\+h@{kdbprivate.\+h}!elektra\+Backend\+Update\+Size@{elektra\+Backend\+Update\+Size}}
\index{elektra\+Backend\+Update\+Size@{elektra\+Backend\+Update\+Size}!kdbprivate.\+h@{kdbprivate.\+h}}
\subsubsection[{elektra\+Backend\+Update\+Size}]{\setlength{\rightskip}{0pt plus 5cm}int elektra\+Backend\+Update\+Size (
\begin{DoxyParamCaption}
\item[{Backend $\ast$}]{backend, }
\item[{Key $\ast$}]{parent, }
\item[{int}]{size}
\end{DoxyParamCaption}
)}}\label{kdbprivate_8h_adf493c5336da5955af376dc1b7cdb264}


Update internal size in backend. 


\begin{DoxyParams}{Parameters}
{\em backend} & the backend to update \\
\hline
{\em parent} & for parent \\
\hline
{\em size} & to update (-\/1 default, 0 empty, $>$0 otherwise)\\
\hline
\end{DoxyParams}
\begin{DoxyPrecond}{Precondition}
parent must be serializable namespace
\end{DoxyPrecond}

\begin{DoxyRetVals}{Return values}
{\em -\/1} & if invalid parent (assert) \\
\hline
{\em 0} & on success \\
\hline
\end{DoxyRetVals}
\hypertarget{kdbprivate_8h_aec09df442faca2e1e8cf233d22fefa63}{\index{kdbprivate.\+h@{kdbprivate.\+h}!elektra\+Key\+Lock@{elektra\+Key\+Lock}}
\index{elektra\+Key\+Lock@{elektra\+Key\+Lock}!kdbprivate.\+h@{kdbprivate.\+h}}
\subsubsection[{elektra\+Key\+Lock}]{\setlength{\rightskip}{0pt plus 5cm}int elektra\+Key\+Lock (
\begin{DoxyParamCaption}
\item[{Key $\ast$}]{key, }
\item[{enum {\bf elektra\+Lock\+Options}}]{what}
\end{DoxyParamCaption}
)}}\label{kdbprivate_8h_aec09df442faca2e1e8cf233d22fefa63}


Permanently locks a part of the key. 

This can be\+:
\begin{DoxyItemize}
\item K\+E\+Y\+\_\+\+F\+L\+A\+G\+\_\+\+L\+O\+C\+K\+\_\+\+N\+A\+M\+E to lock the name
\item K\+E\+Y\+\_\+\+F\+L\+A\+G\+\_\+\+L\+O\+C\+K\+\_\+\+V\+A\+L\+U\+E to lock the value
\item K\+E\+Y\+\_\+\+F\+L\+A\+G\+\_\+\+L\+O\+C\+K\+\_\+\+M\+E\+T\+A to lock the meta data
\end{DoxyItemize}

To unlock the key, duplicate it.

It is also possible to lock when the key is created with \hyperlink{group__key_gad23c65b44bf48d773759e1f9a4d43b89}{key\+New()}.

Some data structures need to lock the key (most likely its name), so that the ordering does not get confused.


\begin{DoxyParams}{Parameters}
{\em key} & which name should be locked\\
\hline
\end{DoxyParams}
\begin{DoxySeeAlso}{See also}
\hyperlink{group__key_gad23c65b44bf48d773759e1f9a4d43b89}{key\+New()}, \hyperlink{group__key_gae6ec6a60cc4b8c1463fa08623d056ce3}{key\+Dup()}, \hyperlink{group__keyset_gaa5a1d467a4d71041edce68ea7748ce45}{ks\+Append\+Key()} 
\end{DoxySeeAlso}

\begin{DoxyRetVals}{Return values}
{\em $>$0} & the bits that were successfully locked \\
\hline
{\em 0} & if everything was locked before \\
\hline
{\em -\/1} & if it could not be locked (nullpointer) \\
\hline
\end{DoxyRetVals}
\hypertarget{kdbprivate_8h_a97b55b0908f9c9434fc0753a0d7089b8}{\index{kdbprivate.\+h@{kdbprivate.\+h}!elektra\+Ks\+Pop\+At\+Cursor@{elektra\+Ks\+Pop\+At\+Cursor}}
\index{elektra\+Ks\+Pop\+At\+Cursor@{elektra\+Ks\+Pop\+At\+Cursor}!kdbprivate.\+h@{kdbprivate.\+h}}
\subsubsection[{elektra\+Ks\+Pop\+At\+Cursor}]{\setlength{\rightskip}{0pt plus 5cm}Key$\ast$ elektra\+Ks\+Pop\+At\+Cursor (
\begin{DoxyParamCaption}
\item[{Key\+Set $\ast$}]{ks, }
\item[{cursor\+\_\+t}]{pos}
\end{DoxyParamCaption}
)}}\label{kdbprivate_8h_a97b55b0908f9c9434fc0753a0d7089b8}


Pop key at given cursor position. 


\begin{DoxyParams}{Parameters}
{\em ks} & the keyset to pop key from \\
\hline
{\em c} & where to pop\\
\hline
\end{DoxyParams}
The internal cursor will be rewinded using \hyperlink{group__keyset_gabe793ff51f1728e3429c84a8a9086b70}{ks\+Rewind()}. You can use \hyperlink{group__keyset_gaffe507ab9281c322eb16c3e992075d29}{ks\+Get\+Cursor()} and \hyperlink{group__keyset_gad94c9ffaa3e8034564c0712fd407c345}{ks\+Set\+Cursor()} jump back to the previous position. e.\+g. to pop at current position within \hyperlink{group__keyset_ga317321c9065b5a4b3e33fe1c399bcec9}{ks\+Next()} loop\+: 
\begin{DoxyCode}
1 cursor\_t c = ksGetCursor(ks);
2 keyDel (ksPopAtCursor(ks, c));
3 ksSetCursor(ks, c);
4 ksPrev(ks); // to have correct key after next ksNext()
\end{DoxyCode}


\begin{DoxyWarning}{Warning}
do not use, will be superseded by external iterator A\+P\+I
\end{DoxyWarning}
\begin{DoxyReturn}{Returns}
the popped key 
\end{DoxyReturn}

\begin{DoxyRetVals}{Return values}
{\em 0} & if ks is 0 \\
\hline
\end{DoxyRetVals}
\hypertarget{kdbprivate_8h_a17a6c04aa1ff61c84a8cf9658c5ca5a2}{\index{kdbprivate.\+h@{kdbprivate.\+h}!elektra\+Ks\+Prev@{elektra\+Ks\+Prev}}
\index{elektra\+Ks\+Prev@{elektra\+Ks\+Prev}!kdbprivate.\+h@{kdbprivate.\+h}}
\subsubsection[{elektra\+Ks\+Prev}]{\setlength{\rightskip}{0pt plus 5cm}Key$\ast$ elektra\+Ks\+Prev (
\begin{DoxyParamCaption}
\item[{Key\+Set $\ast$}]{ks}
\end{DoxyParamCaption}
)}}\label{kdbprivate_8h_a17a6c04aa1ff61c84a8cf9658c5ca5a2}


Returns the previous Key in a Key\+Set. 

Key\+Sets have an internal cursor that can be reset with \hyperlink{group__keyset_gabe793ff51f1728e3429c84a8a9086b70}{ks\+Rewind()}. Every time \hyperlink{group__api_gae7d268f13dd89a6e126b3718b117996f}{ks\+Prev()} is called the cursor is decremented and the new current Key is returned.

You'll get a N\+U\+L\+L pointer if the key before begin of the Key\+Set was reached.

Don't delete the key, use \hyperlink{group__keyset_gae42530b04defb772059de0600159cf69}{ks\+Pop()} if you want to delete it.

\begin{DoxyReturn}{Returns}
the new current Key 
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\hyperlink{group__keyset_gabe793ff51f1728e3429c84a8a9086b70}{ks\+Rewind()}, \hyperlink{group__keyset_ga4287b9416912c5f2ab9c195cb74fb094}{ks\+Current()} 
\end{DoxySeeAlso}
\hypertarget{kdbprivate_8h_a6360a1271f6410f25fbb9b95e346da1a}{\index{kdbprivate.\+h@{kdbprivate.\+h}!elektra\+Memcpy@{elektra\+Memcpy}}
\index{elektra\+Memcpy@{elektra\+Memcpy}!kdbprivate.\+h@{kdbprivate.\+h}}
\subsubsection[{elektra\+Memcpy}]{\setlength{\rightskip}{0pt plus 5cm}ssize\+\_\+t elektra\+Memcpy (
\begin{DoxyParamCaption}
\item[{Key $\ast$$\ast$}]{array1, }
\item[{Key $\ast$$\ast$}]{array2, }
\item[{size\+\_\+t}]{size}
\end{DoxyParamCaption}
)}}\label{kdbprivate_8h_a6360a1271f6410f25fbb9b95e346da1a}


Internal Methods for Elektra. 

To use them\+: 
\begin{DoxyCode}
1 #include <kdbinternal.h>
\end{DoxyCode}


There are some areas where libraries have to reimplement some basic functions to archive support for non-\/standard systems, for testing purposes or to provide a little more convenience. Copies the key array2 into where array1 points. It copies size elements.

Overlapping is prohibited, use \hyperlink{internal_8c_abc60bdbe5d252a99734b0122687560be}{elektra\+Memmove()} instead.


\begin{DoxyParams}{Parameters}
{\em array1} & the destination \\
\hline
{\em array2} & the source \\
\hline
{\em size} & how many pointer to Keys to copy \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em -\/1} & on null pointers \\
\hline
{\em 0} & if nothing was done \\
\hline
\end{DoxyRetVals}
\begin{DoxyReturn}{Returns}
size how many keys were copied 
\end{DoxyReturn}
\hypertarget{kdbprivate_8h_abc60bdbe5d252a99734b0122687560be}{\index{kdbprivate.\+h@{kdbprivate.\+h}!elektra\+Memmove@{elektra\+Memmove}}
\index{elektra\+Memmove@{elektra\+Memmove}!kdbprivate.\+h@{kdbprivate.\+h}}
\subsubsection[{elektra\+Memmove}]{\setlength{\rightskip}{0pt plus 5cm}ssize\+\_\+t elektra\+Memmove (
\begin{DoxyParamCaption}
\item[{Key $\ast$$\ast$}]{array1, }
\item[{Key $\ast$$\ast$}]{array2, }
\item[{size\+\_\+t}]{size}
\end{DoxyParamCaption}
)}}\label{kdbprivate_8h_abc60bdbe5d252a99734b0122687560be}


Copies the key array2 into where array1 points. 

It copies size elements.

Overlapping is ok. If they do not overlap consider \hyperlink{internal_8c_a6360a1271f6410f25fbb9b95e346da1a}{elektra\+Memcpy()} instead.


\begin{DoxyParams}{Parameters}
{\em array1} & the destination \\
\hline
{\em array2} & the source \\
\hline
{\em size} & how many pointer to Keys to copy \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em -\/1} & on null pointers \\
\hline
{\em 0} & if nothing was done \\
\hline
\end{DoxyRetVals}
\begin{DoxyReturn}{Returns}
size how many keys were copied 
\end{DoxyReturn}
\hypertarget{kdbprivate_8h_a746a6f6758e8cdfb985b4c46a0e246ff}{\index{kdbprivate.\+h@{kdbprivate.\+h}!elektra\+Mount\+Backend@{elektra\+Mount\+Backend}}
\index{elektra\+Mount\+Backend@{elektra\+Mount\+Backend}!kdbprivate.\+h@{kdbprivate.\+h}}
\subsubsection[{elektra\+Mount\+Backend}]{\setlength{\rightskip}{0pt plus 5cm}int elektra\+Mount\+Backend (
\begin{DoxyParamCaption}
\item[{K\+D\+B $\ast$}]{kdb, }
\item[{Backend $\ast$}]{backend, }
\item[{Key $\ast$}]{error\+Key}
\end{DoxyParamCaption}
)}}\label{kdbprivate_8h_a746a6f6758e8cdfb985b4c46a0e246ff}


Mounts a backend into the trie. 

\begin{DoxyPrecond}{Precondition}
user must pass correctly allocated backend 
\end{DoxyPrecond}
\begin{DoxyPostcond}{Postcondition}
sets reference counter of backend
\end{DoxyPostcond}
\begin{DoxyWarning}{Warning}
in case of init and default backends, the reference counter needs to be modified {\itshape after} calling elektra\+Mount\+Backend.
\end{DoxyWarning}

\begin{DoxyParams}{Parameters}
{\em kdb} & the handle to work with \\
\hline
{\em backend} & the backend to mount \\
\hline
{\em error\+Key} & the key used to report warnings \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em -\/1} & on failure \\
\hline
{\em 1} & on success \\
\hline
\end{DoxyRetVals}
\hypertarget{kdbprivate_8h_a10c21e6fe8931013a0dd3f00c87833d8}{\index{kdbprivate.\+h@{kdbprivate.\+h}!elektra\+Mount\+Default@{elektra\+Mount\+Default}}
\index{elektra\+Mount\+Default@{elektra\+Mount\+Default}!kdbprivate.\+h@{kdbprivate.\+h}}
\subsubsection[{elektra\+Mount\+Default}]{\setlength{\rightskip}{0pt plus 5cm}int elektra\+Mount\+Default (
\begin{DoxyParamCaption}
\item[{K\+D\+B $\ast$}]{kdb, }
\item[{Key\+Set $\ast$}]{modules, }
\item[{int}]{in\+Fallback, }
\item[{Key $\ast$}]{error\+Key}
\end{DoxyParamCaption}
)}}\label{kdbprivate_8h_a10c21e6fe8931013a0dd3f00c87833d8}


Reopens the default backend and mounts the default backend if needed. 

\begin{DoxyPrecond}{Precondition}
Default Backend is closed. elektra\+Mount\+Open was executed before.
\end{DoxyPrecond}

\begin{DoxyParams}{Parameters}
{\em kdb} & the handle to work with \\
\hline
{\em modules} & the current list of loaded modules \\
\hline
{\em error\+Key} & the key used to report warnings \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em -\/1} & on error \\
\hline
{\em 0} & on success \\
\hline
\end{DoxyRetVals}
\hypertarget{kdbprivate_8h_aa66ed093e4c71d97018ffc66d46d0e1f}{\index{kdbprivate.\+h@{kdbprivate.\+h}!elektra\+Mount\+Get\+Backend@{elektra\+Mount\+Get\+Backend}}
\index{elektra\+Mount\+Get\+Backend@{elektra\+Mount\+Get\+Backend}!kdbprivate.\+h@{kdbprivate.\+h}}
\subsubsection[{elektra\+Mount\+Get\+Backend}]{\setlength{\rightskip}{0pt plus 5cm}Backend$\ast$ elektra\+Mount\+Get\+Backend (
\begin{DoxyParamCaption}
\item[{K\+D\+B $\ast$}]{handle, }
\item[{const Key $\ast$}]{key}
\end{DoxyParamCaption}
)}}\label{kdbprivate_8h_aa66ed093e4c71d97018ffc66d46d0e1f}


Lookup a backend handle for a specific key. 

The required canonical name is ensured by using a key as parameter, which will transform the key to canonical representation.

Will return handle when no more specific K\+D\+B could be found.

If key is 0 or invalid the default backend will be returned.


\begin{DoxyParams}{Parameters}
{\em handle} & is the data structure, where the mounted directories are saved. \\
\hline
{\em key} & the key, that should be looked up. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the backend handle associated with the key 
\end{DoxyReturn}
\hypertarget{kdbprivate_8h_a0cdbb658c5ac280672e4ac22419075f1}{\index{kdbprivate.\+h@{kdbprivate.\+h}!elektra\+Mount\+Get\+Mountpoint@{elektra\+Mount\+Get\+Mountpoint}}
\index{elektra\+Mount\+Get\+Mountpoint@{elektra\+Mount\+Get\+Mountpoint}!kdbprivate.\+h@{kdbprivate.\+h}}
\subsubsection[{elektra\+Mount\+Get\+Mountpoint}]{\setlength{\rightskip}{0pt plus 5cm}Key$\ast$ elektra\+Mount\+Get\+Mountpoint (
\begin{DoxyParamCaption}
\item[{K\+D\+B $\ast$}]{handle, }
\item[{const Key $\ast$}]{where}
\end{DoxyParamCaption}
)}}\label{kdbprivate_8h_a0cdbb658c5ac280672e4ac22419075f1}


Lookup a mountpoint in a handle for a specific key. 

Will return a key representing the mountpoint or null if there is no appropriate mountpoint e.\+g. its the root mountpoint.

\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
1 Key * key = keyNew ("system/template");
2 KDB * handle = kdbOpen();
3 Key *mountpoint=0;
4 mountpoint=kdbGetMountpoint(handle, key);
5 
6 printf("The backend I am using is %s mounted in %s\(\backslash\)n",
7         keyValue(mountpoint),
8         keyName(mountpoint));
9 kdbClose (handle);
10 keyDel (key);
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em handle} & is the data structure, where the mounted directories are saved. \\
\hline
{\em where} & the key, that should be looked up. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the mountpoint associated with the key 
\end{DoxyReturn}
\hypertarget{kdbprivate_8h_a54e32ffc628b2ca1e1876efb6d28cfc7}{\index{kdbprivate.\+h@{kdbprivate.\+h}!elektra\+Mount\+Modules@{elektra\+Mount\+Modules}}
\index{elektra\+Mount\+Modules@{elektra\+Mount\+Modules}!kdbprivate.\+h@{kdbprivate.\+h}}
\subsubsection[{elektra\+Mount\+Modules}]{\setlength{\rightskip}{0pt plus 5cm}int elektra\+Mount\+Modules (
\begin{DoxyParamCaption}
\item[{K\+D\+B $\ast$}]{kdb, }
\item[{Key\+Set $\ast$}]{modules, }
\item[{Key $\ast$}]{error\+Key}
\end{DoxyParamCaption}
)}}\label{kdbprivate_8h_a54e32ffc628b2ca1e1876efb6d28cfc7}


Mount all module configurations. 


\begin{DoxyParams}{Parameters}
{\em kdb} & the handle to work with \\
\hline
{\em modules} & the current list of loaded modules \\
\hline
{\em error\+Key} & the key used to report warnings\\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em -\/1} & if not rootkey was found \\
\hline
{\em 0} & otherwise \\
\hline
\end{DoxyRetVals}
\hypertarget{kdbprivate_8h_ad3c84032644ff56feb44106a7924d3fe}{\index{kdbprivate.\+h@{kdbprivate.\+h}!elektra\+Mount\+Open@{elektra\+Mount\+Open}}
\index{elektra\+Mount\+Open@{elektra\+Mount\+Open}!kdbprivate.\+h@{kdbprivate.\+h}}
\subsubsection[{elektra\+Mount\+Open}]{\setlength{\rightskip}{0pt plus 5cm}int elektra\+Mount\+Open (
\begin{DoxyParamCaption}
\item[{K\+D\+B $\ast$}]{kdb, }
\item[{Key\+Set $\ast$}]{config, }
\item[{Key\+Set $\ast$}]{modules, }
\item[{Key $\ast$}]{error\+Key}
\end{DoxyParamCaption}
)}}\label{kdbprivate_8h_ad3c84032644ff56feb44106a7924d3fe}


Creates a trie from a given configuration. 

The config will be deleted within this function.

\begin{DoxyNote}{Note}
elektra\+Mount\+Default is not allowed to be executed before
\end{DoxyNote}

\begin{DoxyParams}{Parameters}
{\em kdb} & the handle to work with \\
\hline
{\em modules} & the current list of loaded modules \\
\hline
{\em config} & the configuration which should be used to build up the trie. \\
\hline
{\em error\+Key} & the key used to report warnings \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em -\/1} & on failure \\
\hline
{\em 0} & on success \\
\hline
\end{DoxyRetVals}
\hypertarget{kdbprivate_8h_a6362fc7585d7a308c08005cb3cb1a4cd}{\index{kdbprivate.\+h@{kdbprivate.\+h}!elektra\+Mount\+Version@{elektra\+Mount\+Version}}
\index{elektra\+Mount\+Version@{elektra\+Mount\+Version}!kdbprivate.\+h@{kdbprivate.\+h}}
\subsubsection[{elektra\+Mount\+Version}]{\setlength{\rightskip}{0pt plus 5cm}int elektra\+Mount\+Version (
\begin{DoxyParamCaption}
\item[{K\+D\+B $\ast$}]{kdb, }
\item[{Key $\ast$}]{error\+Key}
\end{DoxyParamCaption}
)}}\label{kdbprivate_8h_a6362fc7585d7a308c08005cb3cb1a4cd}


Mount the version backend. 


\begin{DoxyParams}{Parameters}
{\em kdb} & the handle to work with \\
\hline
{\em error\+Key} & the key used to report warnings\\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em 0} & on success \\
\hline
\end{DoxyRetVals}
\hypertarget{kdbprivate_8h_a853bd9e11745f72b944d56e0c521e454}{\index{kdbprivate.\+h@{kdbprivate.\+h}!elektra\+Plugin\+Open@{elektra\+Plugin\+Open}}
\index{elektra\+Plugin\+Open@{elektra\+Plugin\+Open}!kdbprivate.\+h@{kdbprivate.\+h}}
\subsubsection[{elektra\+Plugin\+Open}]{\setlength{\rightskip}{0pt plus 5cm}Plugin$\ast$ elektra\+Plugin\+Open (
\begin{DoxyParamCaption}
\item[{const char $\ast$}]{name, }
\item[{Key\+Set $\ast$}]{modules, }
\item[{Key\+Set $\ast$}]{config, }
\item[{Key $\ast$}]{error\+Key}
\end{DoxyParamCaption}
)}}\label{kdbprivate_8h_a853bd9e11745f72b944d56e0c521e454}


Opens a plugin. 

The config will be used as is. So be sure to transfer ownership of the config to it, with e.\+g. \hyperlink{group__keyset_gac59e4b328245463f1451f68d5106151c}{ks\+Dup()}. elektra\+Plugin\+Close() will delete the config.

\begin{DoxyReturn}{Returns}
a pointer to a new created plugin or 0 on error 
\end{DoxyReturn}
\hypertarget{kdbprivate_8h_a0c1bb87ce27fcf307fa71468206872c2}{\index{kdbprivate.\+h@{kdbprivate.\+h}!elektra\+Process\+Plugin@{elektra\+Process\+Plugin}}
\index{elektra\+Process\+Plugin@{elektra\+Process\+Plugin}!kdbprivate.\+h@{kdbprivate.\+h}}
\subsubsection[{elektra\+Process\+Plugin}]{\setlength{\rightskip}{0pt plus 5cm}int elektra\+Process\+Plugin (
\begin{DoxyParamCaption}
\item[{Key $\ast$}]{cur, }
\item[{int $\ast$}]{plugin\+Number, }
\item[{char $\ast$$\ast$}]{plugin\+Name, }
\item[{char $\ast$$\ast$}]{reference\+Name, }
\item[{Key $\ast$}]{error\+Key}
\end{DoxyParamCaption}
)}}\label{kdbprivate_8h_a0c1bb87ce27fcf307fa71468206872c2}

\begin{DoxyRetVals}{Return values}
{\em 1} & and an allocated string of the plugin\+Name if a new plugins should be created. \\
\hline
{\em 2} & and an allocated string of the reference\+Name if an old plugin should be used \\
\hline
{\em 3} & and both if a new plugin should be created and made available for later back referencing. \\
\hline
{\em -\/1} & on error \\
\hline
\end{DoxyRetVals}
\hypertarget{kdbprivate_8h_a42a9038eca54799559e3b9b7294fc689}{\index{kdbprivate.\+h@{kdbprivate.\+h}!elektra\+Process\+Plugins@{elektra\+Process\+Plugins}}
\index{elektra\+Process\+Plugins@{elektra\+Process\+Plugins}!kdbprivate.\+h@{kdbprivate.\+h}}
\subsubsection[{elektra\+Process\+Plugins}]{\setlength{\rightskip}{0pt plus 5cm}int elektra\+Process\+Plugins (
\begin{DoxyParamCaption}
\item[{Plugin $\ast$$\ast$}]{plugins, }
\item[{Key\+Set $\ast$}]{modules, }
\item[{Key\+Set $\ast$}]{reference\+Plugins, }
\item[{Key\+Set $\ast$}]{config, }
\item[{Key\+Set $\ast$}]{system\+Config, }
\item[{Key $\ast$}]{error\+Key}
\end{DoxyParamCaption}
)}}\label{kdbprivate_8h_a42a9038eca54799559e3b9b7294fc689}


Load a plugin. 

The array of plugins must be set to 0. Its length is N\+R\+\_\+\+O\+F\+\_\+\+P\+L\+U\+G\+I\+N\+S.

system\+Config will only be used, not deleted.


\begin{DoxyParams}{Parameters}
{\em config} & the config with the information how the plugins should be put together \\
\hline
{\em system\+Config} & the shared (system) config for the plugins. Every plugin additional get this config.\\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em -\/1} & on failure \\
\hline
\end{DoxyRetVals}
\hypertarget{kdbprivate_8h_ab436b020c8292d4c40ea2b27dc70305d}{\index{kdbprivate.\+h@{kdbprivate.\+h}!elektra\+Rename\+Keys@{elektra\+Rename\+Keys}}
\index{elektra\+Rename\+Keys@{elektra\+Rename\+Keys}!kdbprivate.\+h@{kdbprivate.\+h}}
\subsubsection[{elektra\+Rename\+Keys}]{\setlength{\rightskip}{0pt plus 5cm}Key\+Set$\ast$ elektra\+Rename\+Keys (
\begin{DoxyParamCaption}
\item[{Key\+Set $\ast$}]{config, }
\item[{const char $\ast$}]{name}
\end{DoxyParamCaption}
)}}\label{kdbprivate_8h_ab436b020c8292d4c40ea2b27dc70305d}


Takes the first key and cuts off this common part for all other keys, instead name will be prepended. 

\begin{DoxyReturn}{Returns}
a new allocated keyset with keys in user namespace.
\end{DoxyReturn}
The first key is removed in the resulting keyset. \hypertarget{kdbprivate_8h_a0c8c5c6c26aa42404d8aa06e6476a0f6}{\index{kdbprivate.\+h@{kdbprivate.\+h}!elektra\+Split\+Append@{elektra\+Split\+Append}}
\index{elektra\+Split\+Append@{elektra\+Split\+Append}!kdbprivate.\+h@{kdbprivate.\+h}}
\subsubsection[{elektra\+Split\+Append}]{\setlength{\rightskip}{0pt plus 5cm}ssize\+\_\+t elektra\+Split\+Append (
\begin{DoxyParamCaption}
\item[{Split $\ast$}]{split, }
\item[{Backend $\ast$}]{backend, }
\item[{Key $\ast$}]{parent\+Key, }
\item[{int}]{syncbits}
\end{DoxyParamCaption}
)}}\label{kdbprivate_8h_a0c8c5c6c26aa42404d8aa06e6476a0f6}


Increases the size of split and appends a new empty keyset. 

Initializes the element with the given parameters at size-\/1 to be used.

Will automatically resize split if needed.


\begin{DoxyParams}{Parameters}
{\em split} & the split object to work with \\
\hline
{\em backend} & the backend which should be appended \\
\hline
{\em parent\+Key} & the parent\+Key which should be appended \\
\hline
{\em syncbits} & the initial syncstate which should be appended\\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em -\/1} & if no split is found \\
\hline
\end{DoxyRetVals}
\begin{DoxyReturn}{Returns}
the position of the new element\+: size-\/1 
\end{DoxyReturn}
\hypertarget{kdbprivate_8h_afee68d5935a6875ece69945e32242895}{\index{kdbprivate.\+h@{kdbprivate.\+h}!elektra\+Split\+Appoint@{elektra\+Split\+Appoint}}
\index{elektra\+Split\+Appoint@{elektra\+Split\+Appoint}!kdbprivate.\+h@{kdbprivate.\+h}}
\subsubsection[{elektra\+Split\+Appoint}]{\setlength{\rightskip}{0pt plus 5cm}int elektra\+Split\+Appoint (
\begin{DoxyParamCaption}
\item[{Split $\ast$}]{split, }
\item[{K\+D\+B $\ast$}]{handle, }
\item[{Key\+Set $\ast$}]{ks}
\end{DoxyParamCaption}
)}}\label{kdbprivate_8h_afee68d5935a6875ece69945e32242895}


Appoints all keys from ks to yet unsynced splits. 

\begin{DoxyPrecond}{Precondition}
\hyperlink{split_8c_aabebbc4b0e47527f59942fcf95b9fcb5}{elektra\+Split\+Buildup()} need to be executed before.
\end{DoxyPrecond}

\begin{DoxyParams}{Parameters}
{\em split} & the split object to work with \\
\hline
{\em handle} & to determine to which backend a key belongs \\
\hline
{\em ks} & the keyset to appoint to split\\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em 1} & on success \\
\hline
{\em -\/1} & if no backend was found for a key \\
\hline
\end{DoxyRetVals}
\hypertarget{kdbprivate_8h_a7141dca0099564b12859a370fb060b6d}{\index{kdbprivate.\+h@{kdbprivate.\+h}!elektra\+Split\+Buildup@{elektra\+Split\+Buildup}}
\index{elektra\+Split\+Buildup@{elektra\+Split\+Buildup}!kdbprivate.\+h@{kdbprivate.\+h}}
\subsubsection[{elektra\+Split\+Buildup}]{\setlength{\rightskip}{0pt plus 5cm}int elektra\+Split\+Buildup (
\begin{DoxyParamCaption}
\item[{Split $\ast$}]{split, }
\item[{K\+D\+B $\ast$}]{kdb, }
\item[{Key $\ast$}]{parent\+Key}
\end{DoxyParamCaption}
)}}\label{kdbprivate_8h_a7141dca0099564b12859a370fb060b6d}


Walks through kdb-\/$>$split and adds all backends below parent\+Key to split. 

Sets syncbits to 2 if it is a default or root backend (which needs splitting). The information is copied from kdb-\/$>$split.

\begin{DoxyPrecond}{Precondition}
split needs to be empty, directly after creation with \hyperlink{split_8c_ad2245a38809f28e325cd9b32089b4c68}{elektra\+Split\+New()}.

there needs to be a valid default\+Backend but its ok not to have a trie inside K\+D\+B.

parent\+Key must be a valid key! (could be implemented more generally, but that would require splitting up of keysets of the same backend)
\end{DoxyPrecond}

\begin{DoxyParams}{Parameters}
{\em split} & will get all backends appended \\
\hline
{\em kdb} & the handle to get information about backends \\
\hline
{\em parent\+Key} & the information below which key the backends are from interest\\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em 1} & always \\
\hline
\end{DoxyRetVals}
\hypertarget{kdbprivate_8h_a603c8c0fce6da478623a68367e2c7175}{\index{kdbprivate.\+h@{kdbprivate.\+h}!elektra\+Split\+Check\+Size@{elektra\+Split\+Check\+Size}}
\index{elektra\+Split\+Check\+Size@{elektra\+Split\+Check\+Size}!kdbprivate.\+h@{kdbprivate.\+h}}
\subsubsection[{elektra\+Split\+Check\+Size}]{\setlength{\rightskip}{0pt plus 5cm}int elektra\+Split\+Check\+Size (
\begin{DoxyParamCaption}
\item[{Split $\ast$}]{split}
\end{DoxyParamCaption}
)}}\label{kdbprivate_8h_a603c8c0fce6da478623a68367e2c7175}


Check if any of the split is uninitialized. 


\begin{DoxyParams}{Parameters}
{\em split} & \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em -\/1} & if size is wrong \\
\hline
{\em 1} & if everything is ok \\
\hline
\end{DoxyRetVals}
\hypertarget{kdbprivate_8h_ae569ef1bc4cd8e931b4a7840d8ce48e6}{\index{kdbprivate.\+h@{kdbprivate.\+h}!elektra\+Split\+Del@{elektra\+Split\+Del}}
\index{elektra\+Split\+Del@{elektra\+Split\+Del}!kdbprivate.\+h@{kdbprivate.\+h}}
\subsubsection[{elektra\+Split\+Del}]{\setlength{\rightskip}{0pt plus 5cm}void elektra\+Split\+Del (
\begin{DoxyParamCaption}
\item[{Split $\ast$}]{keysets}
\end{DoxyParamCaption}
)}}\label{kdbprivate_8h_ae569ef1bc4cd8e931b4a7840d8ce48e6}


Delete a split object. 

Will free all allocated resources of a split keyset.


\begin{DoxyParams}{Parameters}
{\em keysets} & the split object to work with \\
\hline
\end{DoxyParams}
\hypertarget{kdbprivate_8h_a447e430a045cef7b107762171fbdc104}{\index{kdbprivate.\+h@{kdbprivate.\+h}!elektra\+Split\+Divide@{elektra\+Split\+Divide}}
\index{elektra\+Split\+Divide@{elektra\+Split\+Divide}!kdbprivate.\+h@{kdbprivate.\+h}}
\subsubsection[{elektra\+Split\+Divide}]{\setlength{\rightskip}{0pt plus 5cm}int elektra\+Split\+Divide (
\begin{DoxyParamCaption}
\item[{Split $\ast$}]{split, }
\item[{K\+D\+B $\ast$}]{handle, }
\item[{Key\+Set $\ast$}]{ks}
\end{DoxyParamCaption}
)}}\label{kdbprivate_8h_a447e430a045cef7b107762171fbdc104}


Splits up the keysets and search for a sync bit in every key. 

It does not check if there were removed keys, see \hyperlink{split_8c_a3176eff9c1b5a9bfcf3d2e648f537993}{elektra\+Split\+Sync()} for the next step.

It does not create new backends, this has to be done by buildup before.

\begin{DoxyPrecond}{Precondition}
\hyperlink{split_8c_aabebbc4b0e47527f59942fcf95b9fcb5}{elektra\+Split\+Buildup()} need to be executed before.
\end{DoxyPrecond}

\begin{DoxyParams}{Parameters}
{\em split} & the split object to work with \\
\hline
{\em handle} & to get information where the individual keys belong \\
\hline
{\em ks} & the keyset to divide\\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em 0} & if there were no sync bits \\
\hline
{\em 1} & if there were sync bits \\
\hline
{\em -\/1} & if no backend was found for any key \\
\hline
\end{DoxyRetVals}
\hypertarget{kdbprivate_8h_ab9abad2c6146816e966976d9f18f0c88}{\index{kdbprivate.\+h@{kdbprivate.\+h}!elektra\+Split\+Get@{elektra\+Split\+Get}}
\index{elektra\+Split\+Get@{elektra\+Split\+Get}!kdbprivate.\+h@{kdbprivate.\+h}}
\subsubsection[{elektra\+Split\+Get}]{\setlength{\rightskip}{0pt plus 5cm}int elektra\+Split\+Get (
\begin{DoxyParamCaption}
\item[{Split $\ast$}]{split, }
\item[{Key $\ast$}]{warning\+Key, }
\item[{K\+D\+B $\ast$}]{handle}
\end{DoxyParamCaption}
)}}\label{kdbprivate_8h_ab9abad2c6146816e966976d9f18f0c88}


Does some work after getting of backends is finished. 


\begin{DoxyItemize}
\item Update sizes
\item Removal of wrong keys
\end{DoxyItemize}

\begin{DoxyPrecond}{Precondition}
\hyperlink{split_8c_afee68d5935a6875ece69945e32242895}{elektra\+Split\+Appoint()} needs to be executed before.
\end{DoxyPrecond}

\begin{DoxyItemize}
\item check if keys are in correct backend
\item remove syncbits
\item update sizes in the backends
\end{DoxyItemize}


\begin{DoxyParams}{Parameters}
{\em split} & the split object to work with \\
\hline
{\em warning\+Key} & postcondition violations are reported here \\
\hline
{\em handle} & the handle to preprocess the keys \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em 1} & on success \\
\hline
{\em -\/1} & if no backend was found for a key or split-\/$>$parents has invalid namespace \\
\hline
\end{DoxyRetVals}
\hypertarget{kdbprivate_8h_af3b1e5f1810964dddc3bd3a00822bca6}{\index{kdbprivate.\+h@{kdbprivate.\+h}!elektra\+Split\+Merge@{elektra\+Split\+Merge}}
\index{elektra\+Split\+Merge@{elektra\+Split\+Merge}!kdbprivate.\+h@{kdbprivate.\+h}}
\subsubsection[{elektra\+Split\+Merge}]{\setlength{\rightskip}{0pt plus 5cm}int elektra\+Split\+Merge (
\begin{DoxyParamCaption}
\item[{Split $\ast$}]{split, }
\item[{Key\+Set $\ast$}]{dest}
\end{DoxyParamCaption}
)}}\label{kdbprivate_8h_af3b1e5f1810964dddc3bd3a00822bca6}


Merges together all parts of split into dest. 


\begin{DoxyParams}{Parameters}
{\em split} & the split object to work with \\
\hline
{\em dest} & the destination keyset where all keysets are appended. \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em 1} & on success \\
\hline
\end{DoxyRetVals}
\hypertarget{kdbprivate_8h_ad2245a38809f28e325cd9b32089b4c68}{\index{kdbprivate.\+h@{kdbprivate.\+h}!elektra\+Split\+New@{elektra\+Split\+New}}
\index{elektra\+Split\+New@{elektra\+Split\+New}!kdbprivate.\+h@{kdbprivate.\+h}}
\subsubsection[{elektra\+Split\+New}]{\setlength{\rightskip}{0pt plus 5cm}Split$\ast$ elektra\+Split\+New (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}}\label{kdbprivate_8h_ad2245a38809f28e325cd9b32089b4c68}


Allocates a new split object. 

Splits up a keyset into multiple keysets where each of them will passed to the correct \hyperlink{group__kdb_ga11436b058408f83d303ca5e996832bcf}{kdb\+Set()}.

Initially the size is 0 and alloc is A\+P\+P\+R\+O\+X\+I\+M\+A\+T\+E\+\_\+\+N\+R\+\_\+\+O\+F\+\_\+\+B\+A\+C\+K\+E\+N\+D\+S.

\begin{DoxyReturn}{Returns}
a fresh allocated split object
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\hyperlink{split_8c_ae569ef1bc4cd8e931b4a7840d8ce48e6}{elektra\+Split\+Del()} 
\end{DoxySeeAlso}
\hypertarget{kdbprivate_8h_a44f9f801daa8ff1b29e48e31e49752f7}{\index{kdbprivate.\+h@{kdbprivate.\+h}!elektra\+Split\+Prepare@{elektra\+Split\+Prepare}}
\index{elektra\+Split\+Prepare@{elektra\+Split\+Prepare}!kdbprivate.\+h@{kdbprivate.\+h}}
\subsubsection[{elektra\+Split\+Prepare}]{\setlength{\rightskip}{0pt plus 5cm}void elektra\+Split\+Prepare (
\begin{DoxyParamCaption}
\item[{Split $\ast$}]{split}
\end{DoxyParamCaption}
)}}\label{kdbprivate_8h_a44f9f801daa8ff1b29e48e31e49752f7}


Prepares for \hyperlink{group__kdb_ga11436b058408f83d303ca5e996832bcf}{kdb\+Set()} mainloop afterwards. 

All splits which do not need sync are removed and a deep copy of the remaining keysets is done.


\begin{DoxyParams}{Parameters}
{\em split} & the split object to work with \\
\hline
\end{DoxyParams}
\hypertarget{kdbprivate_8h_ab6067083cc1afb5d42180bf75f7f86ef}{\index{kdbprivate.\+h@{kdbprivate.\+h}!elektra\+Split\+Remove@{elektra\+Split\+Remove}}
\index{elektra\+Split\+Remove@{elektra\+Split\+Remove}!kdbprivate.\+h@{kdbprivate.\+h}}
\subsubsection[{elektra\+Split\+Remove}]{\setlength{\rightskip}{0pt plus 5cm}void elektra\+Split\+Remove (
\begin{DoxyParamCaption}
\item[{Split $\ast$}]{split, }
\item[{size\+\_\+t}]{where}
\end{DoxyParamCaption}
)}}\label{kdbprivate_8h_ab6067083cc1afb5d42180bf75f7f86ef}


Remove one part of split. 


\begin{DoxyParams}{Parameters}
{\em split} & the split object to work with \\
\hline
{\em where} & the position to cut away\\
\hline
\end{DoxyParams}
\begin{DoxyPrecond}{Precondition}
where must be within the size of the split 
\end{DoxyPrecond}
\begin{DoxyPostcond}{Postcondition}
split will be removed 
\end{DoxyPostcond}
\hypertarget{kdbprivate_8h_af677c7c96b215a61d76c7b4a8f8db877}{\index{kdbprivate.\+h@{kdbprivate.\+h}!elektra\+Split\+Resize@{elektra\+Split\+Resize}}
\index{elektra\+Split\+Resize@{elektra\+Split\+Resize}!kdbprivate.\+h@{kdbprivate.\+h}}
\subsubsection[{elektra\+Split\+Resize}]{\setlength{\rightskip}{0pt plus 5cm}void elektra\+Split\+Resize (
\begin{DoxyParamCaption}
\item[{Split $\ast$}]{split}
\end{DoxyParamCaption}
)}}\label{kdbprivate_8h_af677c7c96b215a61d76c7b4a8f8db877}


Doubles the size of how many parts of keysets can be appended. 


\begin{DoxyParams}{Parameters}
{\em split} & the split object to work with \\
\hline
\end{DoxyParams}
\hypertarget{kdbprivate_8h_a7a36f0da2272fde84ecfc09090669cea}{\index{kdbprivate.\+h@{kdbprivate.\+h}!elektra\+Split\+Search\+Backend@{elektra\+Split\+Search\+Backend}}
\index{elektra\+Split\+Search\+Backend@{elektra\+Split\+Search\+Backend}!kdbprivate.\+h@{kdbprivate.\+h}}
\subsubsection[{elektra\+Split\+Search\+Backend}]{\setlength{\rightskip}{0pt plus 5cm}ssize\+\_\+t elektra\+Split\+Search\+Backend (
\begin{DoxyParamCaption}
\item[{Split $\ast$}]{split, }
\item[{Backend $\ast$}]{backend, }
\item[{Key $\ast$}]{parent}
\end{DoxyParamCaption}
)}}\label{kdbprivate_8h_a7a36f0da2272fde84ecfc09090669cea}


Determines if the backend is already inserted or not. 

\begin{DoxyWarning}{Warning}
If no parent Key is given, the default/root backends won't be searched.
\end{DoxyWarning}

\begin{DoxyParams}{Parameters}
{\em split} & the split object to work with \\
\hline
{\em backend} & the backend to search for \\
\hline
{\em parent} & the key to check for domains in default/root backends. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
pos of backend if it already exist 
\end{DoxyReturn}

\begin{DoxyRetVals}{Return values}
{\em -\/1} & if it does not exist \\
\hline
\end{DoxyRetVals}
\hypertarget{kdbprivate_8h_afb25e1f946f07e5490a962a42320a0cc}{\index{kdbprivate.\+h@{kdbprivate.\+h}!elektra\+Split\+Search\+Root@{elektra\+Split\+Search\+Root}}
\index{elektra\+Split\+Search\+Root@{elektra\+Split\+Search\+Root}!kdbprivate.\+h@{kdbprivate.\+h}}
\subsubsection[{elektra\+Split\+Search\+Root}]{\setlength{\rightskip}{0pt plus 5cm}int elektra\+Split\+Search\+Root (
\begin{DoxyParamCaption}
\item[{Split $\ast$}]{split, }
\item[{Key $\ast$}]{parent\+Key}
\end{DoxyParamCaption}
)}}\label{kdbprivate_8h_afb25e1f946f07e5490a962a42320a0cc}

\begin{DoxyRetVals}{Return values}
{\em 1} & if one of the backends in split has all keys below parent\+Key \\
\hline
{\em 0} & if parent\+Key == 0 or there are keys below or same than parent\+Key which do not fit in any of split keysets \\
\hline
\end{DoxyRetVals}

\begin{DoxyParams}{Parameters}
{\em split} & the split object to work with \\
\hline
{\em parent\+Key} & the key which relation is searched for \\
\hline
\end{DoxyParams}
\hypertarget{kdbprivate_8h_a3176eff9c1b5a9bfcf3d2e648f537993}{\index{kdbprivate.\+h@{kdbprivate.\+h}!elektra\+Split\+Sync@{elektra\+Split\+Sync}}
\index{elektra\+Split\+Sync@{elektra\+Split\+Sync}!kdbprivate.\+h@{kdbprivate.\+h}}
\subsubsection[{elektra\+Split\+Sync}]{\setlength{\rightskip}{0pt plus 5cm}int elektra\+Split\+Sync (
\begin{DoxyParamCaption}
\item[{Split $\ast$}]{split}
\end{DoxyParamCaption}
)}}\label{kdbprivate_8h_a3176eff9c1b5a9bfcf3d2e648f537993}


Add sync bits everywhere keys were removed/added. 


\begin{DoxyItemize}
\item checks if the size of a previous \hyperlink{group__kdb_ga28e385fd9cb7ccfe0b2f1ed2f62453a1}{kdb\+Get()} is unchanged.
\item checks if in correct state (\hyperlink{group__kdb_ga28e385fd9cb7ccfe0b2f1ed2f62453a1}{kdb\+Get()} needs to be executed before)
\end{DoxyItemize}

Only \hyperlink{split_8c_a447e430a045cef7b107762171fbdc104}{elektra\+Split\+Divide()} together with this function can really decide if sync is needed or not.

\begin{DoxyPrecond}{Precondition}
split needs to be processed with \hyperlink{split_8c_a447e430a045cef7b107762171fbdc104}{elektra\+Split\+Divide()} before.
\end{DoxyPrecond}

\begin{DoxyRetVals}{Return values}
{\em 0} & if \hyperlink{group__kdb_ga11436b058408f83d303ca5e996832bcf}{kdb\+Set()} is not needed \\
\hline
{\em 1} & if \hyperlink{group__kdb_ga11436b058408f83d303ca5e996832bcf}{kdb\+Set()} is needed \\
\hline
{\em -\/1} & on wrong keys (also has assert, should not happen) \\
\hline
{\em -\/2} & wrong spec state\+: \hyperlink{group__kdb_ga28e385fd9cb7ccfe0b2f1ed2f62453a1}{kdb\+Get()} was not executed before \\
\hline
{\em -\/3} & wrong dir state\+: \hyperlink{group__kdb_ga28e385fd9cb7ccfe0b2f1ed2f62453a1}{kdb\+Get()} was not executed before \\
\hline
{\em -\/4} & wrong user state\+: \hyperlink{group__kdb_ga28e385fd9cb7ccfe0b2f1ed2f62453a1}{kdb\+Get()} was not executed before \\
\hline
{\em -\/5} & wrong system state\+: \hyperlink{group__kdb_ga28e385fd9cb7ccfe0b2f1ed2f62453a1}{kdb\+Get()} was not executed before \\
\hline
\end{DoxyRetVals}
\begin{DoxyPrecond}{Precondition}
user/system was split before. 
\end{DoxyPrecond}

\begin{DoxyParams}{Parameters}
{\em split} & the split object to work with \\
\hline
\end{DoxyParams}
\hypertarget{kdbprivate_8h_a5dde14941040fe97dd036555e858bb69}{\index{kdbprivate.\+h@{kdbprivate.\+h}!elektra\+Split\+Update\+File\+Name@{elektra\+Split\+Update\+File\+Name}}
\index{elektra\+Split\+Update\+File\+Name@{elektra\+Split\+Update\+File\+Name}!kdbprivate.\+h@{kdbprivate.\+h}}
\subsubsection[{elektra\+Split\+Update\+File\+Name}]{\setlength{\rightskip}{0pt plus 5cm}void elektra\+Split\+Update\+File\+Name (
\begin{DoxyParamCaption}
\item[{Split $\ast$}]{split, }
\item[{K\+D\+B $\ast$}]{handle, }
\item[{Key $\ast$}]{key}
\end{DoxyParamCaption}
)}}\label{kdbprivate_8h_a5dde14941040fe97dd036555e858bb69}


Update the (configuration) file name for the parent key. 


\begin{DoxyParams}{Parameters}
{\em split} & the split to work with \\
\hline
{\em handle} & the handle to work with \\
\hline
{\em key} & the parent\+Key that should be updated (name must be correct) \\
\hline
\end{DoxyParams}
\hypertarget{kdbprivate_8h_af7619472c17c782befa93d2e029bc328}{\index{kdbprivate.\+h@{kdbprivate.\+h}!elektra\+Split\+Update\+Size@{elektra\+Split\+Update\+Size}}
\index{elektra\+Split\+Update\+Size@{elektra\+Split\+Update\+Size}!kdbprivate.\+h@{kdbprivate.\+h}}
\subsubsection[{elektra\+Split\+Update\+Size}]{\setlength{\rightskip}{0pt plus 5cm}int elektra\+Split\+Update\+Size (
\begin{DoxyParamCaption}
\item[{Split $\ast$}]{split}
\end{DoxyParamCaption}
)}}\label{kdbprivate_8h_af7619472c17c782befa93d2e029bc328}


Also update sizes after \hyperlink{group__kdb_ga11436b058408f83d303ca5e996832bcf}{kdb\+Set()} to recognize multiple \hyperlink{group__kdb_ga11436b058408f83d303ca5e996832bcf}{kdb\+Set()} attempts. 

\begin{DoxyWarning}{Warning}
cant use the same code with elektra\+Split\+Get because there is no default split part for \hyperlink{group__kdb_ga11436b058408f83d303ca5e996832bcf}{kdb\+Set()}. 
\end{DoxyWarning}
\hypertarget{kdbprivate_8h_a04ad42d215b2ce5ed83e1a9354f6ba94}{\index{kdbprivate.\+h@{kdbprivate.\+h}!elektra\+Str\+N\+Dup@{elektra\+Str\+N\+Dup}}
\index{elektra\+Str\+N\+Dup@{elektra\+Str\+N\+Dup}!kdbprivate.\+h@{kdbprivate.\+h}}
\subsubsection[{elektra\+Str\+N\+Dup}]{\setlength{\rightskip}{0pt plus 5cm}char$\ast$ elektra\+Str\+N\+Dup (
\begin{DoxyParamCaption}
\item[{const char $\ast$}]{s, }
\item[{size\+\_\+t}]{l}
\end{DoxyParamCaption}
)}}\label{kdbprivate_8h_a04ad42d215b2ce5ed83e1a9354f6ba94}


Copy buffer into new allocated memory. 

You need to free the memory yourself.

This function also works with \textbackslash{}0 characters in the buffer. The length is taken as given, it must be correct.

\begin{DoxyReturn}{Returns}
0 if out of memory, a pointer otherwise 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em s} & must be a allocated buffer \\
\hline
{\em l} & the length of s \\
\hline
\end{DoxyParams}
\hypertarget{kdbprivate_8h_a7126bbb84c75bb98c1e3641dcdf32c6b}{\index{kdbprivate.\+h@{kdbprivate.\+h}!elektra\+Validate\+Key\+Name@{elektra\+Validate\+Key\+Name}}
\index{elektra\+Validate\+Key\+Name@{elektra\+Validate\+Key\+Name}!kdbprivate.\+h@{kdbprivate.\+h}}
\subsubsection[{elektra\+Validate\+Key\+Name}]{\setlength{\rightskip}{0pt plus 5cm}int elektra\+Validate\+Key\+Name (
\begin{DoxyParamCaption}
\item[{const char $\ast$}]{name, }
\item[{size\+\_\+t}]{size}
\end{DoxyParamCaption}
)}}\label{kdbprivate_8h_a7126bbb84c75bb98c1e3641dcdf32c6b}


Validates whether the supplied keyname is valid. 

The function looks for tangling escape characters in the end and for a minimum length.

Does not check for valid namespaces

\begin{DoxyPrecond}{Precondition}
size must be at least 2
\end{DoxyPrecond}

\begin{DoxyParams}{Parameters}
{\em name} & the key name that is to be checked \\
\hline
{\em size} & a elektra\+Str\+Len of the key name \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em true} & if the supplied keyname part is valid \\
\hline
{\em false} & if its invalid \\
\hline
\end{DoxyRetVals}
