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


Private declarations.  


{\ttfamily \#include $<$elektra.\+h$>$}\newline
{\ttfamily \#include $<$elektra/error.\+h$>$}\newline
{\ttfamily \#include $<$kdb.\+h$>$}\newline
{\ttfamily \#include $<$kdbextension.\+h$>$}\newline
{\ttfamily \#include $<$kdbhelper.\+h$>$}\newline
{\ttfamily \#include $<$kdbio.\+h$>$}\newline
{\ttfamily \#include $<$kdbmacros.\+h$>$}\newline
{\ttfamily \#include $<$kdbnotificationinternal.\+h$>$}\newline
{\ttfamily \#include $<$kdbplugin.\+h$>$}\newline
{\ttfamily \#include $<$kdbtypes.\+h$>$}\newline
{\ttfamily \#include $<$kdbglobal.\+h$>$}\newline
{\ttfamily \#include $<$limits.\+h$>$}\newline
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}
\doxysubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \mbox{\hyperlink{kdbprivate_8h_acf20140d9b29c3edc782e72b05b25bd1}{KEYSET\+\_\+\+SIZE}}~16
\begin{DoxyCompactList}\small\item\em The minimal allocation size of a keyset inclusive NULL byte. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{kdbprivate_8h_a05efd486827435a0e92220b69ae23519}\label{kdbprivate_8h_a05efd486827435a0e92220b69ae23519}} 
\#define \mbox{\hyperlink{kdbprivate_8h_a05efd486827435a0e92220b69ae23519}{NR\+\_\+\+OF\+\_\+\+PLUGINS}}~10
\begin{DoxyCompactList}\small\item\em How many plugins can exist in an backend. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{kdbprivate_8h_ae05f21372b7a85668978778868e341f3}\label{kdbprivate_8h_ae05f21372b7a85668978778868e341f3}} 
\#define \mbox{\hyperlink{kdbprivate_8h_ae05f21372b7a85668978778868e341f3}{COMMIT\+\_\+\+PLUGIN}}~7
\begin{DoxyCompactList}\small\item\em The index of the commit plugin. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{kdbprivate_8h_a88825343a6d2a664b06c61d0787132aa}\label{kdbprivate_8h_a88825343a6d2a664b06c61d0787132aa}} 
\#define \mbox{\hyperlink{kdbprivate_8h_a88825343a6d2a664b06c61d0787132aa}{STORAGE\+\_\+\+PLUGIN}}~5
\begin{DoxyCompactList}\small\item\em The index of the storage plugin. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{kdbprivate_8h_aa9ac7247e2adc4bfc9c4d5a41743cb4c}\label{kdbprivate_8h_aa9ac7247e2adc4bfc9c4d5a41743cb4c}} 
\#define \mbox{\hyperlink{kdbprivate_8h_aa9ac7247e2adc4bfc9c4d5a41743cb4c}{RESOLVER\+\_\+\+PLUGIN}}~0
\begin{DoxyCompactList}\small\item\em The index of the resolver plugin. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{kdbprivate_8h_a98a9dd0e80f70ba8ad12cc00fedf52fb}\label{kdbprivate_8h_a98a9dd0e80f70ba8ad12cc00fedf52fb}} 
\#define \mbox{\hyperlink{kdbprivate_8h_a98a9dd0e80f70ba8ad12cc00fedf52fb}{APPROXIMATE\+\_\+\+NR\+\_\+\+OF\+\_\+\+BACKENDS}}~16
\begin{DoxyCompactList}\small\item\em Trie optimization. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{kdbprivate_8h_a93f061df863d00deae4b596cb18b99f8}{KDB\+\_\+\+MAX\+\_\+\+UCHAR}}~(UCHAR\+\_\+\+MAX + 1)
\begin{DoxyCompactList}\small\item\em The maximum value of unsigned char+1, needed for iteration over trie children/values\+: \end{DoxyCompactList}\item 
\mbox{\Hypertarget{kdbprivate_8h_a93b6deccf1a55a100f74d2e076036f37}\label{kdbprivate_8h_a93b6deccf1a55a100f74d2e076036f37}} 
\#define \mbox{\hyperlink{kdbprivate_8h_a93b6deccf1a55a100f74d2e076036f37}{MAX\+\_\+\+LEN\+\_\+\+INT}}~31
\begin{DoxyCompactList}\small\item\em The maximum of how many characters an integer needs as decimal number. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{kdbprivate_8h_a8891eaf029de761514dca775f19d6e18}{KDB\+\_\+\+SYSTEM\+\_\+\+ELEKTRA}}~\char`\"{}system\+:/elektra\char`\"{}
\begin{DoxyCompactList}\small\item\em Backend mounting information. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{kdbprivate_8h_abecff8814a02da83ec5d19d6bbac76de}\label{kdbprivate_8h_abecff8814a02da83ec5d19d6bbac76de}} 
\#define \mbox{\hyperlink{kdbprivate_8h_abecff8814a02da83ec5d19d6bbac76de}{KDB\+\_\+\+CACHE\+\_\+\+PREFIX}}~\char`\"{}system\+:/elektra/cache\char`\"{}
\begin{DoxyCompactList}\small\item\em All keys below this are used for cache metadata in the global keyset. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{kdbprivate_8h_a22e02bbe80b6081a6485b3f3d2caec14}{test\+\_\+bit}}(var,  bit)~(((unsigned long long) (var)) \& ((unsigned long long) (bit)))
\begin{DoxyCompactList}\small\item\em Test a bit. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{kdbprivate_8h_a4874f05226547f6afa54ed6d65dc54ae}{set\+\_\+bit}}(var,  bit)~((var) $\vert$= ((unsigned long long) (bit)))
\begin{DoxyCompactList}\small\item\em Set a bit. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{kdbprivate_8h_a686cd59039c7112c10c8fbb82f9759e9}{clear\+\_\+bit}}(var,  bit)~((var) \&= $\sim$((unsigned long long) (bit)))
\begin{DoxyCompactList}\small\item\em Clear a bit. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Enumerations}
\begin{DoxyCompactItemize}
\item 
enum \mbox{\hyperlink{kdbprivate_8h_a351bbaa6e81f4d1d956bb71929dc7285}{keyflag\+\_\+t}} \{ \newline
\mbox{\hyperlink{kdbprivate_8h_a351bbaa6e81f4d1d956bb71929dc7285abedbc8b9c2dcfc51908d35aec7e7c756}{KEY\+\_\+\+FLAG\+\_\+\+SYNC}} = 1
, \mbox{\hyperlink{kdbprivate_8h_a351bbaa6e81f4d1d956bb71929dc7285ab32b7424934246d1934c430408bd871f}{KEY\+\_\+\+FLAG\+\_\+\+RO\+\_\+\+NAME}} = 1 $<$$<$ 1
, \mbox{\hyperlink{kdbprivate_8h_a351bbaa6e81f4d1d956bb71929dc7285abbd77cb92bacff89ef2694ec2cefb135}{KEY\+\_\+\+FLAG\+\_\+\+RO\+\_\+\+VALUE}} = 1 $<$$<$ 2
, \mbox{\hyperlink{kdbprivate_8h_a351bbaa6e81f4d1d956bb71929dc7285a22971f649e6a7f6087a44e84ca0ff60d}{KEY\+\_\+\+FLAG\+\_\+\+RO\+\_\+\+META}} = 1 $<$$<$ 3
, \newline
\mbox{\hyperlink{kdbprivate_8h_a351bbaa6e81f4d1d956bb71929dc7285a1778bfb5a0241719e0e04616442dbd88}{KEY\+\_\+\+FLAG\+\_\+\+MMAP\+\_\+\+STRUCT}} = 1 $<$$<$ 4
, \mbox{\hyperlink{kdbprivate_8h_a351bbaa6e81f4d1d956bb71929dc7285a95b18d8c59062a4a0f2ef948db64b853}{KEY\+\_\+\+FLAG\+\_\+\+MMAP\+\_\+\+KEY}} = 1 $<$$<$ 5
, \mbox{\hyperlink{kdbprivate_8h_a351bbaa6e81f4d1d956bb71929dc7285ac9ad82bd6821f6524e4a3c6c28671302}{KEY\+\_\+\+FLAG\+\_\+\+MMAP\+\_\+\+DATA}} = 1 $<$$<$ 6
 \}
\begin{DoxyCompactList}\small\item\em Key Flags. \end{DoxyCompactList}\item 
enum \mbox{\hyperlink{kdbprivate_8h_afaf34e9cffb5c9382ad09f0f1811a61d}{ksflag\+\_\+t}} \{ \mbox{\hyperlink{kdbprivate_8h_afaf34e9cffb5c9382ad09f0f1811a61da60841484247805681f2555220aa13a6b}{KS\+\_\+\+FLAG\+\_\+\+SYNC}} = 1
, \mbox{\hyperlink{kdbprivate_8h_afaf34e9cffb5c9382ad09f0f1811a61da910edb310bc5b520345c34570b7e4e56}{KS\+\_\+\+FLAG\+\_\+\+MMAP\+\_\+\+STRUCT}} = 1 $<$$<$ 2
, \mbox{\hyperlink{kdbprivate_8h_afaf34e9cffb5c9382ad09f0f1811a61da1244394c87ed042c2d8aaa57f4d0ce4b}{KS\+\_\+\+FLAG\+\_\+\+MMAP\+\_\+\+ARRAY}} = 1 $<$$<$ 3
 \}
\begin{DoxyCompactList}\small\item\em Advanced KS Flags. \end{DoxyCompactList}\item 
enum \mbox{\hyperlink{kdbprivate_8h_af7ad6ca41444a51395350791dbb2a0f8}{splitflag\+\_\+t}} \{ \mbox{\hyperlink{kdbprivate_8h_af7ad6ca41444a51395350791dbb2a0f8a26d34995557a981ce39558eae0c516f9}{SPLIT\+\_\+\+FLAG\+\_\+\+SYNC}} = 1
, \mbox{\hyperlink{kdbprivate_8h_af7ad6ca41444a51395350791dbb2a0f8a10600b1b4223a2f0d3938f8bbc48be06}{SPLIT\+\_\+\+FLAG\+\_\+\+CASCADING}} = 1 $<$$<$ 1
 \}
\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
Split $\ast$ \mbox{\hyperlink{kdbprivate_8h_aa17259b07015cf6c06f14814f52d01fb}{split\+New}} (void)
\begin{DoxyCompactList}\small\item\em Allocates a new split object. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{kdbprivate_8h_a455004883f0e5afccc5c78308060d70d}{split\+Del}} (Split $\ast$keysets)
\begin{DoxyCompactList}\small\item\em Delete a split object. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{kdbprivate_8h_a1fff7d9e737c42074ab661a1cd136b4c}{split\+Remove}} (Split $\ast$split, size\+\_\+t where)
\begin{DoxyCompactList}\small\item\em Remove one part of split. \end{DoxyCompactList}\item 
ssize\+\_\+t \mbox{\hyperlink{kdbprivate_8h_afa0850f1eb48f9f3cf6298c588b92246}{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 
int \mbox{\hyperlink{kdbprivate_8h_a9dcf76a5a8d1e3f93daf9e76d888e1af}{split\+Buildup}} (Split $\ast$split, KDB $\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 \mbox{\hyperlink{kdbprivate_8h_a9c5bcc3cf34af26d3d8c69bb3cc9dadb}{split\+Update\+File\+Name}} (Split $\ast$split, KDB $\ast$handle, Key $\ast$key)
\begin{DoxyCompactList}\small\item\em Update the (configuration) file name for the parent key. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{kdbprivate_8h_abd8e79fdbec5faf611bbd26df137343e}{split\+Appoint}} (Split $\ast$split, KDB $\ast$handle, Key\+Set $\ast$ks)
\begin{DoxyCompactList}\small\item\em Appoints all keys from ks to yet unsynced splits. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{kdbprivate_8h_afbeff288abf59244ddd44d82cb8d93d2}{split\+Get}} (Split $\ast$split, Key $\ast$warning\+Key, KDB $\ast$handle)
\begin{DoxyCompactList}\small\item\em Does some work after getting of backends is finished. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{kdbprivate_8h_a40883cc9699f727c1a31ba283b1d67ae}{split\+Merge\+Backends}} (Split $\ast$split, Key\+Set $\ast$dest)
\begin{DoxyCompactList}\small\item\em Merges together the backend based parts of split into dest, but bypasses the default split. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{kdbprivate_8h_ad79a6dc0ae814dad704b7b442394287d}{split\+Merge\+Default}} (Split $\ast$split, Key\+Set $\ast$dest)
\begin{DoxyCompactList}\small\item\em Merges the default split into dest. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{kdbprivate_8h_ae4fcdbb3d58fb0baba1459e0d8b0a94b}{split\+Divide}} (Split $\ast$split, KDB $\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 \mbox{\hyperlink{kdbprivate_8h_af6fb30481571a63cfb7745adaa02d526}{split\+Sync}} (Split $\ast$split)
\begin{DoxyCompactList}\small\item\em Add sync bits everywhere keys were removed/added. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{kdbprivate_8h_af8a0571065ace2b371e017cabdb9eca7}{split\+Prepare}} (Split $\ast$split)
\begin{DoxyCompactList}\small\item\em Prepares for \mbox{\hyperlink{group__kdb_ga11436b058408f83d303ca5e996832bcf}{kdb\+Set()}} mainloop afterwards. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{kdbprivate_8h_a7e1938ac64ef0c120c69c6c8c3943080}{split\+Update\+Size}} (Split $\ast$split)
\begin{DoxyCompactList}\small\item\em Also update sizes after \mbox{\hyperlink{group__kdb_ga11436b058408f83d303ca5e996832bcf}{kdb\+Set()}} to recognize multiple \mbox{\hyperlink{group__kdb_ga11436b058408f83d303ca5e996832bcf}{kdb\+Set()}} attempts. \end{DoxyCompactList}\item 
Backend $\ast$ \mbox{\hyperlink{kdbprivate_8h_aef2336c14e88bae9c48bd2f42720920d}{backend\+Open}} (Key\+Set $\ast$elektra\+\_\+config, Key\+Set $\ast$modules, Key\+Set $\ast$global, Key $\ast$error\+Key)
\begin{DoxyCompactList}\small\item\em Builds a backend out of the configuration supplied from\+: \end{DoxyCompactList}\item 
Backend $\ast$ \mbox{\hyperlink{kdbprivate_8h_a5227608d302910f25fc3a5c8968ab542}{backend\+Open\+Default}} (Key\+Set $\ast$modules, Key\+Set $\ast$global, const char $\ast$file, Key $\ast$error\+Key)
\begin{DoxyCompactList}\small\item\em Opens a default backend using the plugin named KDB\+\_\+\+RESOLVER and KDB\+\_\+\+STORAGE. \end{DoxyCompactList}\item 
Backend $\ast$ \mbox{\hyperlink{kdbprivate_8h_a1b936115b7d8c09c1905315839848c92}{backend\+Open\+Modules}} (Key\+Set $\ast$modules, Key\+Set $\ast$global, Key $\ast$error\+Key, elektra\+Cursor pos)
\item 
Backend $\ast$ \mbox{\hyperlink{kdbprivate_8h_ad17f21b41a12609232573971823089e0}{backend\+Open\+Version}} (Key\+Set $\ast$global, Key $\ast$error\+Key)
\begin{DoxyCompactList}\small\item\em Opens the internal version backend. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{kdbprivate_8h_a051ae3b70fe43b1632b975fb4c26535c}{backend\+Update\+Size}} (Backend $\ast$backend, Key $\ast$parent, int size)
\begin{DoxyCompactList}\small\item\em Update internal size in backend. \end{DoxyCompactList}\item 
Plugin $\ast$ \mbox{\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 \mbox{\hyperlink{kdbprivate_8h_ab524d910d9cd6f040d1673589a217df2}{elektra\+Process\+Plugin}} (const Key $\ast$cur, int $\ast$plugin\+Number, char $\ast$$\ast$plugin\+Name, char $\ast$$\ast$reference\+Name, Key $\ast$error\+Key)
\item 
int \mbox{\hyperlink{kdbprivate_8h_a2d7f402a564d2164783890d3e742b319}{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\+Set $\ast$global, Key $\ast$error\+Key)
\begin{DoxyCompactList}\small\item\em Load a plugin. \end{DoxyCompactList}\item 
size\+\_\+t \mbox{\hyperlink{kdbprivate_8h_a9c44a58fa46e132d04a513ff9c453201}{elektra\+Plugin\+Get\+Function}} (Plugin $\ast$plugin, const char $\ast$name)
\begin{DoxyCompactList}\small\item\em Retrieves a function exported by a plugin. \end{DoxyCompactList}\item 
Plugin $\ast$ \mbox{\hyperlink{kdbprivate_8h_a7b3681aca8accc06b86d25a31cc82643}{elektra\+Plugin\+Find\+Global}} (KDB $\ast$handle, const char $\ast$plugin\+Name)
\begin{DoxyCompactList}\small\item\em Searches the global plugins for a given plugin name. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{kdbprivate_8h_a2ada1ad09f79a80df86949991dba3cb7}{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$ \mbox{\hyperlink{kdbprivate_8h_a675eaba21b1311eb20920e6880de7052}{trie\+Lookup}} (Trie $\ast$trie, const char $\ast$name)
\begin{DoxyCompactList}\small\item\em The Trie structure. \end{DoxyCompactList}\item 
Trie $\ast$ \mbox{\hyperlink{kdbprivate_8h_ab957bbaadb387f0dd73d998e4fdb5d86}{trie\+Insert}} (Trie $\ast$trie, const char $\ast$name, Backend $\ast$value)
\begin{DoxyCompactList}\small\item\em Insert into trie. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{kdbprivate_8h_a1ff489dcf9cab7c95f88bb5a89242d9d}{mount\+Open}} (KDB $\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 \mbox{\hyperlink{kdbprivate_8h_a30835e0251609a411eea1d629f5f1729}{mount\+Default}} (KDB $\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 \mbox{\hyperlink{kdbprivate_8h_aef6fc92aedac3c04188c89e8a54f3c5f}{mount\+Modules}} (KDB $\ast$kdb, Key\+Set $\ast$modules, Key $\ast$error\+Key)
\begin{DoxyCompactList}\small\item\em Mount all module configurations. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{kdbprivate_8h_a23024da76a37a7d29b95d052ba17644e}{mount\+Version}} (KDB $\ast$kdb, Key $\ast$error\+Key)
\begin{DoxyCompactList}\small\item\em Mount the version backend. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{kdbprivate_8h_aae740f9dc4ff807f236a78a443c66524}{mount\+Backend}} (KDB $\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$ \mbox{\hyperlink{kdbprivate_8h_af951e2745e17d7b716632362199f3a30}{mount\+Get\+Mountpoint}} (KDB $\ast$handle, const char $\ast$where)
\begin{DoxyCompactList}\small\item\em Lookup a mountpoint in a handle for a specific key. \end{DoxyCompactList}\item 
Backend $\ast$ \mbox{\hyperlink{kdbprivate_8h_af949f28a2f16cff516f8b1db88010fbe}{mount\+Get\+Backend}} (KDB $\ast$handle, const char $\ast$where)
\begin{DoxyCompactList}\small\item\em Lookup a backend handle for a specific key. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{group__keyname_gae22037aad3f76f4454de4e6400637b39}{key\+Replace\+Prefix}} (Key $\ast$key, const Key $\ast$old\+Prefix, const Key $\ast$new\+Prefix)
\begin{DoxyCompactList}\small\item\em Replaces a prefix of the key name of {\ttfamily key}. \end{DoxyCompactList}\item 
Key $\ast$ \mbox{\hyperlink{kdbprivate_8h_a0edeebda49ef1ad7c054411a36a9bf38}{elektra\+Ks\+Pop\+At\+Cursor}} (Key\+Set $\ast$ks, elektra\+Cursor pos)
\begin{DoxyCompactList}\small\item\em Pop key at given cursor position. \end{DoxyCompactList}\item 
ssize\+\_\+t \mbox{\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 \mbox{\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 
Key\+Set $\ast$ \mbox{\hyperlink{group__kdb_ga1ba80a565f54490f362df95f401bcb29}{ks\+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}\item 
ssize\+\_\+t \mbox{\hyperlink{group__keyset_gaa9b59d3a7ccd58511b562755454d1fae}{ks\+Rename}} (Key\+Set $\ast$ks, const Key $\ast$root, const Key $\ast$new\+Root)
\begin{DoxyCompactList}\small\item\em Moves all keys below {\ttfamily root} to below {\ttfamily new\+Root}. \end{DoxyCompactList}\item 
elektra\+Cursor \mbox{\hyperlink{group__keyset_gaf29e567a3a733160303a452cc2366e69}{ks\+Find\+Hierarchy}} (const Key\+Set $\ast$ks, const Key $\ast$root, elektra\+Cursor $\ast$end)
\begin{DoxyCompactList}\small\item\em Searches for the start and optionally end of the key hierachy rooted at {\ttfamily root} in {\ttfamily ks}. \end{DoxyCompactList}\item 
bool \mbox{\hyperlink{group__keyname_ga26bacb092ebca8f69f3fee72069733d8}{elektra\+Key\+Name\+Validate}} (const char $\ast$name, bool is\+Complete)
\begin{DoxyCompactList}\small\item\em Takes an escaped key name and validates it. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{group__keyname_ga99ef3765a0ea0887c8ab72859ae2592e}{elektra\+Key\+Name\+Canonicalize}} (const char $\ast$name, char $\ast$$\ast$canonical\+Name, size\+\_\+t $\ast$canonical\+Size\+Ptr, size\+\_\+t offset, size\+\_\+t $\ast$usize\+Ptr)
\begin{DoxyCompactList}\small\item\em Takes a valid (non-\/)canonical key name and produces its canonical form. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{group__keyname_ga85dd2a5169e900c6c8371c54c7944edb}{elektra\+Key\+Name\+Unescape}} (const char $\ast$name, char $\ast$unescaped\+Name)
\begin{DoxyCompactList}\small\item\em Takes a canonical key name and unescapes it. \end{DoxyCompactList}\item 
size\+\_\+t \mbox{\hyperlink{group__keyname_ga35ac22f466de1a74ca72b05e8252980d}{elektra\+Key\+Name\+Escape\+Part}} (const char $\ast$part, char $\ast$$\ast$escaped\+Part)
\begin{DoxyCompactList}\small\item\em Takes a single key name part and produces its escaped form. \end{DoxyCompactList}\item 
Elektra\+Error $\ast$ \mbox{\hyperlink{kdbprivate_8h_a0affd2cf7caf29441bf7cdf1d7cbb351}{elektra\+Error\+Create}} (const char $\ast$code, const char $\ast$description, const char $\ast$module, const char $\ast$file, kdb\+\_\+long\+\_\+t line)
\begin{DoxyCompactList}\small\item\em Creates a new Elektra\+Error using the provided values. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{kdbprivate_8h_a5b397979459c52ed2031d7b997679fca}{elektra\+Error\+Add\+Warning}} (Elektra\+Error $\ast$error, Elektra\+Error $\ast$warning)
\begin{DoxyCompactList}\small\item\em Adds a warning to an existing Elektra\+Error struct. \end{DoxyCompactList}\item 
Elektra\+Error $\ast$ \mbox{\hyperlink{kdbprivate_8h_a8634e58bc4cda4babdc73247fc55e25a}{elektra\+Error\+From\+Key}} (Key $\ast$key)
\begin{DoxyCompactList}\small\item\em Extracts the error and all warnings from the given key. \end{DoxyCompactList}\item 
Elektra\+Error $\ast$ \mbox{\hyperlink{kdbprivate_8h_a02947b47c6ddd80d97f76a52677aac4a}{elektra\+Error\+Key\+Not\+Found}} (const char $\ast$keyname)
\begin{DoxyCompactList}\small\item\em Creates a \char`\"{}\+Key not found\char`\"{} error. \end{DoxyCompactList}\item 
Elektra\+Error $\ast$ \mbox{\hyperlink{kdbprivate_8h_a4925bb1b9eb65b1be0cc46982888b4c4}{elektra\+Error\+Wrong\+Type}} (const char $\ast$keyname, KDBType expected\+Type, KDBType actual\+Type)
\begin{DoxyCompactList}\small\item\em Creates a \char`\"{}\+Wrong type\char`\"{} error. \end{DoxyCompactList}\item 
Elektra\+Error $\ast$ \mbox{\hyperlink{kdbprivate_8h_a69e23143abcac7e05dd2d1d9d42ddc66}{elektra\+Error\+Null\+Error}} (const char $\ast$function)
\begin{DoxyCompactList}\small\item\em Creates a \char`\"{}\+Null error argument\char`\"{} error. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Private declarations. 

\begin{DoxyCopyright}{Copyright}
BSD License (see LICENSE.\+md or \href{https://www.libelektra.org}{\texttt{ https\+://www.\+libelektra.\+org}}) 
\end{DoxyCopyright}


\doxysubsection{Macro Definition Documentation}
\mbox{\Hypertarget{kdbprivate_8h_a686cd59039c7112c10c8fbb82f9759e9}\label{kdbprivate_8h_a686cd59039c7112c10c8fbb82f9759e9}} 
\index{kdbprivate.h@{kdbprivate.h}!clear\_bit@{clear\_bit}}
\index{clear\_bit@{clear\_bit}!kdbprivate.h@{kdbprivate.h}}
\doxysubsubsection{\texorpdfstring{clear\_bit}{clear\_bit}}
{\footnotesize\ttfamily \#define clear\+\_\+bit(\begin{DoxyParamCaption}\item[{}]{var,  }\item[{}]{bit }\end{DoxyParamCaption})~((var) \&= $\sim$((unsigned long long) (bit)))}



Clear a bit. 

\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{kdbprivate_8h_a4874f05226547f6afa54ed6d65dc54ae}{set\+\_\+bit()}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{kdbprivate_8h_a93f061df863d00deae4b596cb18b99f8}\label{kdbprivate_8h_a93f061df863d00deae4b596cb18b99f8}} 
\index{kdbprivate.h@{kdbprivate.h}!KDB\_MAX\_UCHAR@{KDB\_MAX\_UCHAR}}
\index{KDB\_MAX\_UCHAR@{KDB\_MAX\_UCHAR}!kdbprivate.h@{kdbprivate.h}}
\doxysubsubsection{\texorpdfstring{KDB\_MAX\_UCHAR}{KDB\_MAX\_UCHAR}}
{\footnotesize\ttfamily \#define KDB\+\_\+\+MAX\+\_\+\+UCHAR~(UCHAR\+\_\+\+MAX + 1)}



The maximum value of unsigned char+1, needed for iteration over trie children/values\+: 

for (i=0; i$<$KDB\+\_\+\+MAX\+\_\+\+UCHAR; ++i) \mbox{\Hypertarget{kdbprivate_8h_a8891eaf029de761514dca775f19d6e18}\label{kdbprivate_8h_a8891eaf029de761514dca775f19d6e18}} 
\index{kdbprivate.h@{kdbprivate.h}!KDB\_SYSTEM\_ELEKTRA@{KDB\_SYSTEM\_ELEKTRA}}
\index{KDB\_SYSTEM\_ELEKTRA@{KDB\_SYSTEM\_ELEKTRA}!kdbprivate.h@{kdbprivate.h}}
\doxysubsubsection{\texorpdfstring{KDB\_SYSTEM\_ELEKTRA}{KDB\_SYSTEM\_ELEKTRA}}
{\footnotesize\ttfamily \#define KDB\+\_\+\+SYSTEM\+\_\+\+ELEKTRA~\char`\"{}system\+:/elektra\char`\"{}}



Backend mounting information. 

This key directory tells you where each backend is mounted to which mountpoint. \mbox{\Hypertarget{kdbprivate_8h_acf20140d9b29c3edc782e72b05b25bd1}\label{kdbprivate_8h_acf20140d9b29c3edc782e72b05b25bd1}} 
\index{kdbprivate.h@{kdbprivate.h}!KEYSET\_SIZE@{KEYSET\_SIZE}}
\index{KEYSET\_SIZE@{KEYSET\_SIZE}!kdbprivate.h@{kdbprivate.h}}
\doxysubsubsection{\texorpdfstring{KEYSET\_SIZE}{KEYSET\_SIZE}}
{\footnotesize\ttfamily \#define KEYSET\+\_\+\+SIZE~16}



The minimal allocation size of a keyset inclusive NULL byte. 

ks\+Get\+Alloc() will return one less because it says how much can actually be stored. \mbox{\Hypertarget{kdbprivate_8h_a4874f05226547f6afa54ed6d65dc54ae}\label{kdbprivate_8h_a4874f05226547f6afa54ed6d65dc54ae}} 
\index{kdbprivate.h@{kdbprivate.h}!set\_bit@{set\_bit}}
\index{set\_bit@{set\_bit}!kdbprivate.h@{kdbprivate.h}}
\doxysubsubsection{\texorpdfstring{set\_bit}{set\_bit}}
{\footnotesize\ttfamily \#define set\+\_\+bit(\begin{DoxyParamCaption}\item[{}]{var,  }\item[{}]{bit }\end{DoxyParamCaption})~((var) $\vert$= ((unsigned long long) (bit)))}



Set a bit. 

\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{kdbprivate_8h_a686cd59039c7112c10c8fbb82f9759e9}{clear\+\_\+bit()}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{kdbprivate_8h_a22e02bbe80b6081a6485b3f3d2caec14}\label{kdbprivate_8h_a22e02bbe80b6081a6485b3f3d2caec14}} 
\index{kdbprivate.h@{kdbprivate.h}!test\_bit@{test\_bit}}
\index{test\_bit@{test\_bit}!kdbprivate.h@{kdbprivate.h}}
\doxysubsubsection{\texorpdfstring{test\_bit}{test\_bit}}
{\footnotesize\ttfamily \#define test\+\_\+bit(\begin{DoxyParamCaption}\item[{}]{var,  }\item[{}]{bit }\end{DoxyParamCaption})~(((unsigned long long) (var)) \& ((unsigned long long) (bit)))}



Test a bit. 

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


\doxysubsection{Enumeration Type Documentation}
\mbox{\Hypertarget{kdbprivate_8h_a351bbaa6e81f4d1d956bb71929dc7285}\label{kdbprivate_8h_a351bbaa6e81f4d1d956bb71929dc7285}} 
\index{kdbprivate.h@{kdbprivate.h}!keyflag\_t@{keyflag\_t}}
\index{keyflag\_t@{keyflag\_t}!kdbprivate.h@{kdbprivate.h}}
\doxysubsubsection{\texorpdfstring{keyflag\_t}{keyflag\_t}}
{\footnotesize\ttfamily enum \mbox{\hyperlink{kdbprivate_8h_a351bbaa6e81f4d1d956bb71929dc7285}{keyflag\+\_\+t}}}



Key Flags. 

Store a synchronizer state so that the Elektra knows if something has changed or not. \begin{DoxyEnumFields}{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{KEY\_FLAG\_SYNC@{KEY\_FLAG\_SYNC}!kdbprivate.h@{kdbprivate.h}}\index{kdbprivate.h@{kdbprivate.h}!KEY\_FLAG\_SYNC@{KEY\_FLAG\_SYNC}}}\mbox{\Hypertarget{kdbprivate_8h_a351bbaa6e81f4d1d956bb71929dc7285abedbc8b9c2dcfc51908d35aec7e7c756}\label{kdbprivate_8h_a351bbaa6e81f4d1d956bb71929dc7285abedbc8b9c2dcfc51908d35aec7e7c756}} 
KEY\+\_\+\+FLAG\+\_\+\+SYNC&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. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{KEY\_FLAG\_RO\_NAME@{KEY\_FLAG\_RO\_NAME}!kdbprivate.h@{kdbprivate.h}}\index{kdbprivate.h@{kdbprivate.h}!KEY\_FLAG\_RO\_NAME@{KEY\_FLAG\_RO\_NAME}}}\mbox{\Hypertarget{kdbprivate_8h_a351bbaa6e81f4d1d956bb71929dc7285ab32b7424934246d1934c430408bd871f}\label{kdbprivate_8h_a351bbaa6e81f4d1d956bb71929dc7285ab32b7424934246d1934c430408bd871f}} 
KEY\+\_\+\+FLAG\+\_\+\+RO\+\_\+\+NAME&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 metakeys and keys that are in a data structure that depends on name ordering. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{KEY\_FLAG\_RO\_VALUE@{KEY\_FLAG\_RO\_VALUE}!kdbprivate.h@{kdbprivate.h}}\index{kdbprivate.h@{kdbprivate.h}!KEY\_FLAG\_RO\_VALUE@{KEY\_FLAG\_RO\_VALUE}}}\mbox{\Hypertarget{kdbprivate_8h_a351bbaa6e81f4d1d956bb71929dc7285abbd77cb92bacff89ef2694ec2cefb135}\label{kdbprivate_8h_a351bbaa6e81f4d1d956bb71929dc7285abbd77cb92bacff89ef2694ec2cefb135}} 
KEY\+\_\+\+FLAG\+\_\+\+RO\+\_\+\+VALUE&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 metakeys \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{KEY\_FLAG\_RO\_META@{KEY\_FLAG\_RO\_META}!kdbprivate.h@{kdbprivate.h}}\index{kdbprivate.h@{kdbprivate.h}!KEY\_FLAG\_RO\_META@{KEY\_FLAG\_RO\_META}}}\mbox{\Hypertarget{kdbprivate_8h_a351bbaa6e81f4d1d956bb71929dc7285a22971f649e6a7f6087a44e84ca0ff60d}\label{kdbprivate_8h_a351bbaa6e81f4d1d956bb71929dc7285a22971f649e6a7f6087a44e84ca0ff60d}} 
KEY\+\_\+\+FLAG\+\_\+\+RO\+\_\+\+META&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 metakeys. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{KEY\_FLAG\_MMAP\_STRUCT@{KEY\_FLAG\_MMAP\_STRUCT}!kdbprivate.h@{kdbprivate.h}}\index{kdbprivate.h@{kdbprivate.h}!KEY\_FLAG\_MMAP\_STRUCT@{KEY\_FLAG\_MMAP\_STRUCT}}}\mbox{\Hypertarget{kdbprivate_8h_a351bbaa6e81f4d1d956bb71929dc7285a1778bfb5a0241719e0e04616442dbd88}\label{kdbprivate_8h_a351bbaa6e81f4d1d956bb71929dc7285a1778bfb5a0241719e0e04616442dbd88}} 
KEY\+\_\+\+FLAG\+\_\+\+MMAP\+\_\+\+STRUCT&Key struct lies inside a mmap region. This flag is set for Keys inside a mapped region. It prevents erroneous free() calls on these keys. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{KEY\_FLAG\_MMAP\_KEY@{KEY\_FLAG\_MMAP\_KEY}!kdbprivate.h@{kdbprivate.h}}\index{kdbprivate.h@{kdbprivate.h}!KEY\_FLAG\_MMAP\_KEY@{KEY\_FLAG\_MMAP\_KEY}}}\mbox{\Hypertarget{kdbprivate_8h_a351bbaa6e81f4d1d956bb71929dc7285a95b18d8c59062a4a0f2ef948db64b853}\label{kdbprivate_8h_a351bbaa6e81f4d1d956bb71929dc7285a95b18d8c59062a4a0f2ef948db64b853}} 
KEY\+\_\+\+FLAG\+\_\+\+MMAP\+\_\+\+KEY&Key name lies inside a mmap region. This flag is set once a Key name has been moved to a mapped region, and is removed if the name moves out of the mapped region. It prevents erroneous free() calls on these keys. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{KEY\_FLAG\_MMAP\_DATA@{KEY\_FLAG\_MMAP\_DATA}!kdbprivate.h@{kdbprivate.h}}\index{kdbprivate.h@{kdbprivate.h}!KEY\_FLAG\_MMAP\_DATA@{KEY\_FLAG\_MMAP\_DATA}}}\mbox{\Hypertarget{kdbprivate_8h_a351bbaa6e81f4d1d956bb71929dc7285ac9ad82bd6821f6524e4a3c6c28671302}\label{kdbprivate_8h_a351bbaa6e81f4d1d956bb71929dc7285ac9ad82bd6821f6524e4a3c6c28671302}} 
KEY\+\_\+\+FLAG\+\_\+\+MMAP\+\_\+\+DATA&Key value lies inside a mmap region. This flag is set once a Key value has been moved to a mapped region, and is removed if the value moves out of the mapped region. It prevents erroneous free() calls on these keys. \\
\hline

\end{DoxyEnumFields}
\mbox{\Hypertarget{kdbprivate_8h_afaf34e9cffb5c9382ad09f0f1811a61d}\label{kdbprivate_8h_afaf34e9cffb5c9382ad09f0f1811a61d}} 
\index{kdbprivate.h@{kdbprivate.h}!ksflag\_t@{ksflag\_t}}
\index{ksflag\_t@{ksflag\_t}!kdbprivate.h@{kdbprivate.h}}
\doxysubsubsection{\texorpdfstring{ksflag\_t}{ksflag\_t}}
{\footnotesize\ttfamily enum \mbox{\hyperlink{kdbprivate_8h_afaf34e9cffb5c9382ad09f0f1811a61d}{ksflag\+\_\+t}}}



Advanced KS Flags. 

Store a synchronizer state so that the Elektra knows if something has changed or not. \begin{DoxyEnumFields}{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{KS\_FLAG\_SYNC@{KS\_FLAG\_SYNC}!kdbprivate.h@{kdbprivate.h}}\index{kdbprivate.h@{kdbprivate.h}!KS\_FLAG\_SYNC@{KS\_FLAG\_SYNC}}}\mbox{\Hypertarget{kdbprivate_8h_afaf34e9cffb5c9382ad09f0f1811a61da60841484247805681f2555220aa13a6b}\label{kdbprivate_8h_afaf34e9cffb5c9382ad09f0f1811a61da60841484247805681f2555220aa13a6b}} 
KS\+\_\+\+FLAG\+\_\+\+SYNC&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. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{KS\_FLAG\_MMAP\_STRUCT@{KS\_FLAG\_MMAP\_STRUCT}!kdbprivate.h@{kdbprivate.h}}\index{kdbprivate.h@{kdbprivate.h}!KS\_FLAG\_MMAP\_STRUCT@{KS\_FLAG\_MMAP\_STRUCT}}}\mbox{\Hypertarget{kdbprivate_8h_afaf34e9cffb5c9382ad09f0f1811a61da910edb310bc5b520345c34570b7e4e56}\label{kdbprivate_8h_afaf34e9cffb5c9382ad09f0f1811a61da910edb310bc5b520345c34570b7e4e56}} 
KS\+\_\+\+FLAG\+\_\+\+MMAP\+\_\+\+STRUCT&Key\+Set struct lies inside a mmap region. This flag is set for Key\+Sets inside a mapped region. It prevents erroneous free() calls on these Key\+Sets. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{KS\_FLAG\_MMAP\_ARRAY@{KS\_FLAG\_MMAP\_ARRAY}!kdbprivate.h@{kdbprivate.h}}\index{kdbprivate.h@{kdbprivate.h}!KS\_FLAG\_MMAP\_ARRAY@{KS\_FLAG\_MMAP\_ARRAY}}}\mbox{\Hypertarget{kdbprivate_8h_afaf34e9cffb5c9382ad09f0f1811a61da1244394c87ed042c2d8aaa57f4d0ce4b}\label{kdbprivate_8h_afaf34e9cffb5c9382ad09f0f1811a61da1244394c87ed042c2d8aaa57f4d0ce4b}} 
KS\+\_\+\+FLAG\+\_\+\+MMAP\+\_\+\+ARRAY&Array of the Key\+Set lies inside a mmap region. This flag is set for Key\+Sets where the array is in a mapped region, and is removed if the array is moved out from the mapped region. It prevents erroneous free() calls on these arrays. \\
\hline

\end{DoxyEnumFields}
\mbox{\Hypertarget{kdbprivate_8h_af7ad6ca41444a51395350791dbb2a0f8}\label{kdbprivate_8h_af7ad6ca41444a51395350791dbb2a0f8}} 
\index{kdbprivate.h@{kdbprivate.h}!splitflag\_t@{splitflag\_t}}
\index{splitflag\_t@{splitflag\_t}!kdbprivate.h@{kdbprivate.h}}
\doxysubsubsection{\texorpdfstring{splitflag\_t}{splitflag\_t}}
{\footnotesize\ttfamily enum \mbox{\hyperlink{kdbprivate_8h_af7ad6ca41444a51395350791dbb2a0f8}{splitflag\+\_\+t}}}

\begin{DoxyEnumFields}{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{SPLIT\_FLAG\_SYNC@{SPLIT\_FLAG\_SYNC}!kdbprivate.h@{kdbprivate.h}}\index{kdbprivate.h@{kdbprivate.h}!SPLIT\_FLAG\_SYNC@{SPLIT\_FLAG\_SYNC}}}\mbox{\Hypertarget{kdbprivate_8h_af7ad6ca41444a51395350791dbb2a0f8a26d34995557a981ce39558eae0c516f9}\label{kdbprivate_8h_af7ad6ca41444a51395350791dbb2a0f8a26d34995557a981ce39558eae0c516f9}} 
SPLIT\+\_\+\+FLAG\+\_\+\+SYNC&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. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{SPLIT\_FLAG\_CASCADING@{SPLIT\_FLAG\_CASCADING}!kdbprivate.h@{kdbprivate.h}}\index{kdbprivate.h@{kdbprivate.h}!SPLIT\_FLAG\_CASCADING@{SPLIT\_FLAG\_CASCADING}}}\mbox{\Hypertarget{kdbprivate_8h_af7ad6ca41444a51395350791dbb2a0f8a10600b1b4223a2f0d3938f8bbc48be06}\label{kdbprivate_8h_af7ad6ca41444a51395350791dbb2a0f8a10600b1b4223a2f0d3938f8bbc48be06}} 
SPLIT\+\_\+\+FLAG\+\_\+\+CASCADING&Do we need relative checks? Is this a cascading backend? \\
\hline

\end{DoxyEnumFields}


\doxysubsection{Function Documentation}
\mbox{\Hypertarget{kdbprivate_8h_aef2336c14e88bae9c48bd2f42720920d}\label{kdbprivate_8h_aef2336c14e88bae9c48bd2f42720920d}} 
\index{kdbprivate.h@{kdbprivate.h}!backendOpen@{backendOpen}}
\index{backendOpen@{backendOpen}!kdbprivate.h@{kdbprivate.h}}
\doxysubsubsection{\texorpdfstring{backendOpen()}{backendOpen()}}
{\footnotesize\ttfamily Backend$\ast$ backend\+Open (\begin{DoxyParamCaption}\item[{Key\+Set $\ast$}]{elektra\+Config,  }\item[{Key\+Set $\ast$}]{modules,  }\item[{Key\+Set $\ast$}]{global,  }\item[{Key $\ast$}]{error\+Key }\end{DoxyParamCaption})}



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.

\mbox{\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\textquotesingle{}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 global} & the global keyset of the KDB instance \\
\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}
\mbox{\Hypertarget{kdbprivate_8h_a5227608d302910f25fc3a5c8968ab542}\label{kdbprivate_8h_a5227608d302910f25fc3a5c8968ab542}} 
\index{kdbprivate.h@{kdbprivate.h}!backendOpenDefault@{backendOpenDefault}}
\index{backendOpenDefault@{backendOpenDefault}!kdbprivate.h@{kdbprivate.h}}
\doxysubsubsection{\texorpdfstring{backendOpenDefault()}{backendOpenDefault()}}
{\footnotesize\ttfamily Backend$\ast$ backend\+Open\+Default (\begin{DoxyParamCaption}\item[{Key\+Set $\ast$}]{modules,  }\item[{Key\+Set $\ast$}]{global,  }\item[{const char $\ast$}]{file,  }\item[{Key $\ast$}]{error\+Key }\end{DoxyParamCaption})}



Opens a default backend using the plugin named KDB\+\_\+\+RESOLVER and KDB\+\_\+\+STORAGE. 


\begin{DoxyParams}{Parameters}
{\em modules} & the modules to work with \\
\hline
{\em global} & the global keyset of the KDB instance \\
\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}
\mbox{\Hypertarget{kdbprivate_8h_a1b936115b7d8c09c1905315839848c92}\label{kdbprivate_8h_a1b936115b7d8c09c1905315839848c92}} 
\index{kdbprivate.h@{kdbprivate.h}!backendOpenModules@{backendOpenModules}}
\index{backendOpenModules@{backendOpenModules}!kdbprivate.h@{kdbprivate.h}}
\doxysubsubsection{\texorpdfstring{backendOpenModules()}{backendOpenModules()}}
{\footnotesize\ttfamily Backend$\ast$ backend\+Open\+Modules (\begin{DoxyParamCaption}\item[{Key\+Set $\ast$}]{modules,  }\item[{Key\+Set $\ast$}]{global,  }\item[{Key $\ast$}]{error\+Key,  }\item[{elektra\+Cursor}]{pos }\end{DoxyParamCaption})}

\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 global} & the global keyset of the KDB instance \\
\hline
{\em error\+Key} & the key to issue warnings and errors to \\
\hline
{\em pos} & the position of plugin the use in {\ttfamily modules} \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{kdbprivate_8h_ad17f21b41a12609232573971823089e0}\label{kdbprivate_8h_ad17f21b41a12609232573971823089e0}} 
\index{kdbprivate.h@{kdbprivate.h}!backendOpenVersion@{backendOpenVersion}}
\index{backendOpenVersion@{backendOpenVersion}!kdbprivate.h@{kdbprivate.h}}
\doxysubsubsection{\texorpdfstring{backendOpenVersion()}{backendOpenVersion()}}
{\footnotesize\ttfamily Backend$\ast$ backend\+Open\+Version (\begin{DoxyParamCaption}\item[{Key\+Set $\ast$}]{global,  }\item[{Key $\ast$}]{error\+Key }\end{DoxyParamCaption})}



Opens the internal version backend. 


\begin{DoxyParams}{Parameters}
{\em global} & the global keyset of the KDB instance \\
\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}
\mbox{\Hypertarget{kdbprivate_8h_a051ae3b70fe43b1632b975fb4c26535c}\label{kdbprivate_8h_a051ae3b70fe43b1632b975fb4c26535c}} 
\index{kdbprivate.h@{kdbprivate.h}!backendUpdateSize@{backendUpdateSize}}
\index{backendUpdateSize@{backendUpdateSize}!kdbprivate.h@{kdbprivate.h}}
\doxysubsubsection{\texorpdfstring{backendUpdateSize()}{backendUpdateSize()}}
{\footnotesize\ttfamily int backend\+Update\+Size (\begin{DoxyParamCaption}\item[{Backend $\ast$}]{backend,  }\item[{Key $\ast$}]{parent,  }\item[{int}]{size }\end{DoxyParamCaption})}



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}
\mbox{\Hypertarget{kdbprivate_8h_a5b397979459c52ed2031d7b997679fca}\label{kdbprivate_8h_a5b397979459c52ed2031d7b997679fca}} 
\index{kdbprivate.h@{kdbprivate.h}!elektraErrorAddWarning@{elektraErrorAddWarning}}
\index{elektraErrorAddWarning@{elektraErrorAddWarning}!kdbprivate.h@{kdbprivate.h}}
\doxysubsubsection{\texorpdfstring{elektraErrorAddWarning()}{elektraErrorAddWarning()}}
{\footnotesize\ttfamily void elektra\+Error\+Add\+Warning (\begin{DoxyParamCaption}\item[{Elektra\+Error $\ast$}]{error,  }\item[{Elektra\+Error $\ast$}]{warning }\end{DoxyParamCaption})}



Adds a warning to an existing Elektra\+Error struct. 

If you want to report a warning without an error, create a dummy error with \mbox{\hyperlink{group__highlevel_ga4895fb4c40822a11219846b189395db0}{elektra\+Error\+Pure\+Warning()}} and then add a warning to it.


\begin{DoxyParams}{Parameters}
{\em error} & The error to which {\ttfamily warning} shall be added. \\
\hline
{\em warning} & The warning to add. Once added it is owned by {\ttfamily error}. DO NOT call \mbox{\hyperlink{group__highlevel_ga591f7ed4b57a341928bf7bb3d7adb693}{elektra\+Error\+Reset()}} on it afterwards. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{kdbprivate_8h_a0affd2cf7caf29441bf7cdf1d7cbb351}\label{kdbprivate_8h_a0affd2cf7caf29441bf7cdf1d7cbb351}} 
\index{kdbprivate.h@{kdbprivate.h}!elektraErrorCreate@{elektraErrorCreate}}
\index{elektraErrorCreate@{elektraErrorCreate}!kdbprivate.h@{kdbprivate.h}}
\doxysubsubsection{\texorpdfstring{elektraErrorCreate()}{elektraErrorCreate()}}
{\footnotesize\ttfamily Elektra\+Error$\ast$ elektra\+Error\+Create (\begin{DoxyParamCaption}\item[{const char $\ast$}]{code,  }\item[{const char $\ast$}]{description,  }\item[{const char $\ast$}]{module,  }\item[{const char $\ast$}]{file,  }\item[{kdb\+\_\+long\+\_\+t}]{line }\end{DoxyParamCaption})}



Creates a new Elektra\+Error using the provided values. 

The returned value will be allocated with \mbox{\hyperlink{internal_8c_a848ed030434c76176167fac6ab79429c}{elektra\+Calloc()}}.


\begin{DoxyParams}{Parameters}
{\em code} & The error code of the error. Will be copied and stored in the struct. \\
\hline
{\em description} & The description of the error. Will be copied and stored in the struct. \\
\hline
{\em module} & The module that raised the error. Will be copied and stored in the struct. \\
\hline
{\em file} & The file that raised the error. Will be copied and stored in the struct. \\
\hline
{\em line} & The line in which the error was raised.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A newly allocated Elektra\+Error (free with \mbox{\hyperlink{group__highlevel_ga591f7ed4b57a341928bf7bb3d7adb693}{elektra\+Error\+Reset()}}). 
\end{DoxyReturn}
\mbox{\Hypertarget{kdbprivate_8h_a8634e58bc4cda4babdc73247fc55e25a}\label{kdbprivate_8h_a8634e58bc4cda4babdc73247fc55e25a}} 
\index{kdbprivate.h@{kdbprivate.h}!elektraErrorFromKey@{elektraErrorFromKey}}
\index{elektraErrorFromKey@{elektraErrorFromKey}!kdbprivate.h@{kdbprivate.h}}
\doxysubsubsection{\texorpdfstring{elektraErrorFromKey()}{elektraErrorFromKey()}}
{\footnotesize\ttfamily Elektra\+Error$\ast$ elektra\+Error\+From\+Key (\begin{DoxyParamCaption}\item[{Key $\ast$}]{key }\end{DoxyParamCaption})}



Extracts the error and all warnings from the given key. 

If no error exists, a pure warning error will be used. \begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__highlevel_ga4895fb4c40822a11219846b189395db0}{elektra\+Error\+Pure\+Warning}}
\end{DoxySeeAlso}
\begin{DoxyNote}{Note}
Use the functions in \mbox{\hyperlink{errors_8c}{src/libs/elektra/errors.\+c}} to add errors to a key.
\end{DoxyNote}

\begin{DoxyParams}{Parameters}
{\em key} & The to extract error and warnings from.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A newly allocated Elektra\+Error (free with \mbox{\hyperlink{group__highlevel_ga591f7ed4b57a341928bf7bb3d7adb693}{elektra\+Error\+Reset()}}). 
\end{DoxyReturn}
\mbox{\Hypertarget{kdbprivate_8h_a02947b47c6ddd80d97f76a52677aac4a}\label{kdbprivate_8h_a02947b47c6ddd80d97f76a52677aac4a}} 
\index{kdbprivate.h@{kdbprivate.h}!elektraErrorKeyNotFound@{elektraErrorKeyNotFound}}
\index{elektraErrorKeyNotFound@{elektraErrorKeyNotFound}!kdbprivate.h@{kdbprivate.h}}
\doxysubsubsection{\texorpdfstring{elektraErrorKeyNotFound()}{elektraErrorKeyNotFound()}}
{\footnotesize\ttfamily Elektra\+Error$\ast$ elektra\+Error\+Key\+Not\+Found (\begin{DoxyParamCaption}\item[{const char $\ast$}]{keyname }\end{DoxyParamCaption})}



Creates a \char`\"{}\+Key not found\char`\"{} error. 


\begin{DoxyParams}{Parameters}
{\em keyname} & The name of the key that wasn\textquotesingle{}t found.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A newly allocated Elektra\+Error (free with \mbox{\hyperlink{group__highlevel_ga591f7ed4b57a341928bf7bb3d7adb693}{elektra\+Error\+Reset()}}). 
\end{DoxyReturn}
\mbox{\Hypertarget{kdbprivate_8h_a69e23143abcac7e05dd2d1d9d42ddc66}\label{kdbprivate_8h_a69e23143abcac7e05dd2d1d9d42ddc66}} 
\index{kdbprivate.h@{kdbprivate.h}!elektraErrorNullError@{elektraErrorNullError}}
\index{elektraErrorNullError@{elektraErrorNullError}!kdbprivate.h@{kdbprivate.h}}
\doxysubsubsection{\texorpdfstring{elektraErrorNullError()}{elektraErrorNullError()}}
{\footnotesize\ttfamily Elektra\+Error$\ast$ elektra\+Error\+Null\+Error (\begin{DoxyParamCaption}\item[{const char $\ast$}]{function }\end{DoxyParamCaption})}



Creates a \char`\"{}\+Null error argument\char`\"{} error. 


\begin{DoxyParams}{Parameters}
{\em function} & The name of the function that was called with a null pointer error argument.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A newly allocated Elektra\+Error (free with \mbox{\hyperlink{group__highlevel_ga591f7ed4b57a341928bf7bb3d7adb693}{elektra\+Error\+Reset()}}). 
\end{DoxyReturn}
\mbox{\Hypertarget{kdbprivate_8h_a4925bb1b9eb65b1be0cc46982888b4c4}\label{kdbprivate_8h_a4925bb1b9eb65b1be0cc46982888b4c4}} 
\index{kdbprivate.h@{kdbprivate.h}!elektraErrorWrongType@{elektraErrorWrongType}}
\index{elektraErrorWrongType@{elektraErrorWrongType}!kdbprivate.h@{kdbprivate.h}}
\doxysubsubsection{\texorpdfstring{elektraErrorWrongType()}{elektraErrorWrongType()}}
{\footnotesize\ttfamily Elektra\+Error$\ast$ elektra\+Error\+Wrong\+Type (\begin{DoxyParamCaption}\item[{const char $\ast$}]{keyname,  }\item[{KDBType}]{expected\+Type,  }\item[{KDBType}]{actual\+Type }\end{DoxyParamCaption})}



Creates a \char`\"{}\+Wrong type\char`\"{} error. 


\begin{DoxyParams}{Parameters}
{\em keyname} & The name of the key that had the wrong type. \\
\hline
{\em expected\+Type} & The type that was expected. \\
\hline
{\em actual\+Type} & The type that was actually found.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A newly allocated Elektra\+Error (free with \mbox{\hyperlink{group__highlevel_ga591f7ed4b57a341928bf7bb3d7adb693}{elektra\+Error\+Reset()}}). 
\end{DoxyReturn}
\mbox{\Hypertarget{kdbprivate_8h_a0edeebda49ef1ad7c054411a36a9bf38}\label{kdbprivate_8h_a0edeebda49ef1ad7c054411a36a9bf38}} 
\index{kdbprivate.h@{kdbprivate.h}!elektraKsPopAtCursor@{elektraKsPopAtCursor}}
\index{elektraKsPopAtCursor@{elektraKsPopAtCursor}!kdbprivate.h@{kdbprivate.h}}
\doxysubsubsection{\texorpdfstring{elektraKsPopAtCursor()}{elektraKsPopAtCursor()}}
{\footnotesize\ttfamily Key$\ast$ elektra\+Ks\+Pop\+At\+Cursor (\begin{DoxyParamCaption}\item[{Key\+Set $\ast$}]{ks,  }\item[{elektra\+Cursor}]{pos }\end{DoxyParamCaption})}



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}
\begin{DoxyReturn}{Returns}
the popped key 
\end{DoxyReturn}

\begin{DoxyRetVals}{Return values}
{\em 0} & if ks is 0 \\
\hline
\end{DoxyRetVals}
\mbox{\Hypertarget{kdbprivate_8h_a6360a1271f6410f25fbb9b95e346da1a}\label{kdbprivate_8h_a6360a1271f6410f25fbb9b95e346da1a}} 
\index{kdbprivate.h@{kdbprivate.h}!elektraMemcpy@{elektraMemcpy}}
\index{elektraMemcpy@{elektraMemcpy}!kdbprivate.h@{kdbprivate.h}}
\doxysubsubsection{\texorpdfstring{elektraMemcpy()}{elektraMemcpy()}}
{\footnotesize\ttfamily ssize\+\_\+t elektra\+Memcpy (\begin{DoxyParamCaption}\item[{Key $\ast$$\ast$}]{array1,  }\item[{Key $\ast$$\ast$}]{array2,  }\item[{size\+\_\+t}]{size }\end{DoxyParamCaption})}



Internal Methods for Elektra. 

To use them\+: 
\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{preprocessor}{\#include <\mbox{\hyperlink{kdbinternal_8h}{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 \mbox{\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}
\mbox{\Hypertarget{kdbprivate_8h_abc60bdbe5d252a99734b0122687560be}\label{kdbprivate_8h_abc60bdbe5d252a99734b0122687560be}} 
\index{kdbprivate.h@{kdbprivate.h}!elektraMemmove@{elektraMemmove}}
\index{elektraMemmove@{elektraMemmove}!kdbprivate.h@{kdbprivate.h}}
\doxysubsubsection{\texorpdfstring{elektraMemmove()}{elektraMemmove()}}
{\footnotesize\ttfamily ssize\+\_\+t elektra\+Memmove (\begin{DoxyParamCaption}\item[{Key $\ast$$\ast$}]{array1,  }\item[{Key $\ast$$\ast$}]{array2,  }\item[{size\+\_\+t}]{size }\end{DoxyParamCaption})}



Copies the key array2 into where array1 points. 

It copies size elements.

Overlapping is ok. If they do not overlap consider \mbox{\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}
\mbox{\Hypertarget{kdbprivate_8h_a7b3681aca8accc06b86d25a31cc82643}\label{kdbprivate_8h_a7b3681aca8accc06b86d25a31cc82643}} 
\index{kdbprivate.h@{kdbprivate.h}!elektraPluginFindGlobal@{elektraPluginFindGlobal}}
\index{elektraPluginFindGlobal@{elektraPluginFindGlobal}!kdbprivate.h@{kdbprivate.h}}
\doxysubsubsection{\texorpdfstring{elektraPluginFindGlobal()}{elektraPluginFindGlobal()}}
{\footnotesize\ttfamily Plugin$\ast$ elektra\+Plugin\+Find\+Global (\begin{DoxyParamCaption}\item[{KDB $\ast$}]{handle,  }\item[{const char $\ast$}]{plugin\+Name }\end{DoxyParamCaption})}



Searches the global plugins for a given plugin name. 

NOTE\+: if the list plugin occupies the prerollback position, this queries the list plugin first, and only if we don\textquotesingle{}t find anything there, we look directly in the global plugins array


\begin{DoxyParams}{Parameters}
{\em handle} & The KDB handle to search \\
\hline
{\em plugin\+Name} & The plugin name to look for\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the plugin handle, if found or NULL otherwise 
\end{DoxyReturn}
\mbox{\Hypertarget{kdbprivate_8h_a9c44a58fa46e132d04a513ff9c453201}\label{kdbprivate_8h_a9c44a58fa46e132d04a513ff9c453201}} 
\index{kdbprivate.h@{kdbprivate.h}!elektraPluginGetFunction@{elektraPluginGetFunction}}
\index{elektraPluginGetFunction@{elektraPluginGetFunction}!kdbprivate.h@{kdbprivate.h}}
\doxysubsubsection{\texorpdfstring{elektraPluginGetFunction()}{elektraPluginGetFunction()}}
{\footnotesize\ttfamily size\+\_\+t elektra\+Plugin\+Get\+Function (\begin{DoxyParamCaption}\item[{Plugin $\ast$}]{plugin,  }\item[{const char $\ast$}]{name }\end{DoxyParamCaption})}



Retrieves a function exported by a plugin. 


\begin{DoxyParams}{Parameters}
{\em plugin} & Plugin handle \\
\hline
{\em name} & Function name \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Pointer to function. NULL if function not found or not enough memory available 
\end{DoxyReturn}
\mbox{\Hypertarget{kdbprivate_8h_a853bd9e11745f72b944d56e0c521e454}\label{kdbprivate_8h_a853bd9e11745f72b944d56e0c521e454}} 
\index{kdbprivate.h@{kdbprivate.h}!elektraPluginOpen@{elektraPluginOpen}}
\index{elektraPluginOpen@{elektraPluginOpen}!kdbprivate.h@{kdbprivate.h}}
\doxysubsubsection{\texorpdfstring{elektraPluginOpen()}{elektraPluginOpen()}}
{\footnotesize\ttfamily 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})}



Opens a plugin. 

The config will be used as is. So be sure to transfer ownership of the config to it, with e.\+g. \mbox{\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}
\mbox{\Hypertarget{kdbprivate_8h_ab524d910d9cd6f040d1673589a217df2}\label{kdbprivate_8h_ab524d910d9cd6f040d1673589a217df2}} 
\index{kdbprivate.h@{kdbprivate.h}!elektraProcessPlugin@{elektraProcessPlugin}}
\index{elektraProcessPlugin@{elektraProcessPlugin}!kdbprivate.h@{kdbprivate.h}}
\doxysubsubsection{\texorpdfstring{elektraProcessPlugin()}{elektraProcessPlugin()}}
{\footnotesize\ttfamily int elektra\+Process\+Plugin (\begin{DoxyParamCaption}\item[{const 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})}


\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}
\mbox{\Hypertarget{kdbprivate_8h_a2d7f402a564d2164783890d3e742b319}\label{kdbprivate_8h_a2d7f402a564d2164783890d3e742b319}} 
\index{kdbprivate.h@{kdbprivate.h}!elektraProcessPlugins@{elektraProcessPlugins}}
\index{elektraProcessPlugins@{elektraProcessPlugins}!kdbprivate.h@{kdbprivate.h}}
\doxysubsubsection{\texorpdfstring{elektraProcessPlugins()}{elektraProcessPlugins()}}
{\footnotesize\ttfamily 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\+Set $\ast$}]{global,  }\item[{Key $\ast$}]{error\+Key }\end{DoxyParamCaption})}



Load a plugin. 

The array of plugins must be set to 0. Its length is NR\+\_\+\+OF\+\_\+\+PLUGINS.

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
{\em global} & the global keyset of the KDB instance\\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em -\/1} & on failure \\
\hline
\end{DoxyRetVals}
\mbox{\Hypertarget{kdbprivate_8h_aae740f9dc4ff807f236a78a443c66524}\label{kdbprivate_8h_aae740f9dc4ff807f236a78a443c66524}} 
\index{kdbprivate.h@{kdbprivate.h}!mountBackend@{mountBackend}}
\index{mountBackend@{mountBackend}!kdbprivate.h@{kdbprivate.h}}
\doxysubsubsection{\texorpdfstring{mountBackend()}{mountBackend()}}
{\footnotesize\ttfamily int mount\+Backend (\begin{DoxyParamCaption}\item[{KDB $\ast$}]{kdb,  }\item[{Backend $\ast$}]{backend,  }\item[{Key $\ast$}]{error\+Key }\end{DoxyParamCaption})}



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 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}
\mbox{\Hypertarget{kdbprivate_8h_a30835e0251609a411eea1d629f5f1729}\label{kdbprivate_8h_a30835e0251609a411eea1d629f5f1729}} 
\index{kdbprivate.h@{kdbprivate.h}!mountDefault@{mountDefault}}
\index{mountDefault@{mountDefault}!kdbprivate.h@{kdbprivate.h}}
\doxysubsubsection{\texorpdfstring{mountDefault()}{mountDefault()}}
{\footnotesize\ttfamily int mount\+Default (\begin{DoxyParamCaption}\item[{KDB $\ast$}]{kdb,  }\item[{Key\+Set $\ast$}]{modules,  }\item[{int}]{in\+Fallback,  }\item[{Key $\ast$}]{error\+Key }\end{DoxyParamCaption})}



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

\begin{DoxyPrecond}{Precondition}
Default Backend is closed. 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}
\mbox{\Hypertarget{kdbprivate_8h_af949f28a2f16cff516f8b1db88010fbe}\label{kdbprivate_8h_af949f28a2f16cff516f8b1db88010fbe}} 
\index{kdbprivate.h@{kdbprivate.h}!mountGetBackend@{mountGetBackend}}
\index{mountGetBackend@{mountGetBackend}!kdbprivate.h@{kdbprivate.h}}
\doxysubsubsection{\texorpdfstring{mountGetBackend()}{mountGetBackend()}}
{\footnotesize\ttfamily Backend$\ast$ mount\+Get\+Backend (\begin{DoxyParamCaption}\item[{KDB $\ast$}]{handle,  }\item[{const char $\ast$}]{where }\end{DoxyParamCaption})}



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 KDB 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 where} & the key name, that should be looked up. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the backend handle associated with the key 
\end{DoxyReturn}
\mbox{\Hypertarget{kdbprivate_8h_af951e2745e17d7b716632362199f3a30}\label{kdbprivate_8h_af951e2745e17d7b716632362199f3a30}} 
\index{kdbprivate.h@{kdbprivate.h}!mountGetMountpoint@{mountGetMountpoint}}
\index{mountGetMountpoint@{mountGetMountpoint}!kdbprivate.h@{kdbprivate.h}}
\doxysubsubsection{\texorpdfstring{mountGetMountpoint()}{mountGetMountpoint()}}
{\footnotesize\ttfamily Key$\ast$ mount\+Get\+Mountpoint (\begin{DoxyParamCaption}\item[{KDB $\ast$}]{handle,  }\item[{const char $\ast$}]{where }\end{DoxyParamCaption})}



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}{0}
\DoxyCodeLine{KDB * handle = \mbox{\hyperlink{group__kdb_ga844e1299a84c3fbf1d3a905c5c893ba5}{kdbOpen}}();}
\DoxyCodeLine{Key *mountpoint=0;}
\DoxyCodeLine{mountpoint=kdbGetMountpoint(handle, \textcolor{stringliteral}{"{}system:/template"{}});}
\DoxyCodeLine{}
\DoxyCodeLine{printf(\textcolor{stringliteral}{"{}The backend I am using is \%s mounted in \%s\(\backslash\)n"{}},}
\DoxyCodeLine{        \mbox{\hyperlink{group__keyvalue_ga6f29609c5da53c6dc26a98678d5752af}{keyValue}}(mountpoint),}
\DoxyCodeLine{        \mbox{\hyperlink{group__keyname_ga8e805c726a60da921d3736cda7813513}{keyName}}(mountpoint));}
\DoxyCodeLine{\mbox{\hyperlink{group__kdb_gadb54dc9fda17ee07deb9444df745c96f}{kdbClose}} (handle);}

\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em handle} & is the data structure, where the mounted directories are saved. \\
\hline
{\em where} & the key name, that should be looked up. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the mountpoint associated with the key 
\end{DoxyReturn}
\mbox{\Hypertarget{kdbprivate_8h_aef6fc92aedac3c04188c89e8a54f3c5f}\label{kdbprivate_8h_aef6fc92aedac3c04188c89e8a54f3c5f}} 
\index{kdbprivate.h@{kdbprivate.h}!mountModules@{mountModules}}
\index{mountModules@{mountModules}!kdbprivate.h@{kdbprivate.h}}
\doxysubsubsection{\texorpdfstring{mountModules()}{mountModules()}}
{\footnotesize\ttfamily int mount\+Modules (\begin{DoxyParamCaption}\item[{KDB $\ast$}]{kdb,  }\item[{Key\+Set $\ast$}]{modules,  }\item[{Key $\ast$}]{error\+Key }\end{DoxyParamCaption})}



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}
\mbox{\Hypertarget{kdbprivate_8h_a1ff489dcf9cab7c95f88bb5a89242d9d}\label{kdbprivate_8h_a1ff489dcf9cab7c95f88bb5a89242d9d}} 
\index{kdbprivate.h@{kdbprivate.h}!mountOpen@{mountOpen}}
\index{mountOpen@{mountOpen}!kdbprivate.h@{kdbprivate.h}}
\doxysubsubsection{\texorpdfstring{mountOpen()}{mountOpen()}}
{\footnotesize\ttfamily int mount\+Open (\begin{DoxyParamCaption}\item[{KDB $\ast$}]{kdb,  }\item[{Key\+Set $\ast$}]{config,  }\item[{Key\+Set $\ast$}]{modules,  }\item[{Key $\ast$}]{error\+Key }\end{DoxyParamCaption})}



Creates a trie from a given configuration. 

The config will be deleted within this function.

\begin{DoxyNote}{Note}
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}
\mbox{\Hypertarget{kdbprivate_8h_a23024da76a37a7d29b95d052ba17644e}\label{kdbprivate_8h_a23024da76a37a7d29b95d052ba17644e}} 
\index{kdbprivate.h@{kdbprivate.h}!mountVersion@{mountVersion}}
\index{mountVersion@{mountVersion}!kdbprivate.h@{kdbprivate.h}}
\doxysubsubsection{\texorpdfstring{mountVersion()}{mountVersion()}}
{\footnotesize\ttfamily int mount\+Version (\begin{DoxyParamCaption}\item[{KDB $\ast$}]{kdb,  }\item[{Key $\ast$}]{error\+Key }\end{DoxyParamCaption})}



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}
\mbox{\Hypertarget{kdbprivate_8h_afa0850f1eb48f9f3cf6298c588b92246}\label{kdbprivate_8h_afa0850f1eb48f9f3cf6298c588b92246}} 
\index{kdbprivate.h@{kdbprivate.h}!splitAppend@{splitAppend}}
\index{splitAppend@{splitAppend}!kdbprivate.h@{kdbprivate.h}}
\doxysubsubsection{\texorpdfstring{splitAppend()}{splitAppend()}}
{\footnotesize\ttfamily ssize\+\_\+t split\+Append (\begin{DoxyParamCaption}\item[{Split $\ast$}]{split,  }\item[{Backend $\ast$}]{backend,  }\item[{Key $\ast$}]{parent\+Key,  }\item[{int}]{syncbits }\end{DoxyParamCaption})}



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}
\mbox{\Hypertarget{kdbprivate_8h_abd8e79fdbec5faf611bbd26df137343e}\label{kdbprivate_8h_abd8e79fdbec5faf611bbd26df137343e}} 
\index{kdbprivate.h@{kdbprivate.h}!splitAppoint@{splitAppoint}}
\index{splitAppoint@{splitAppoint}!kdbprivate.h@{kdbprivate.h}}
\doxysubsubsection{\texorpdfstring{splitAppoint()}{splitAppoint()}}
{\footnotesize\ttfamily int split\+Appoint (\begin{DoxyParamCaption}\item[{Split $\ast$}]{split,  }\item[{KDB $\ast$}]{handle,  }\item[{Key\+Set $\ast$}]{ks }\end{DoxyParamCaption})}



Appoints all keys from ks to yet unsynced splits. 

\begin{DoxyPrecond}{Precondition}
\mbox{\hyperlink{split_8c_ad04a357eb6e46aa889e7f72f063e0263}{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}
\mbox{\Hypertarget{kdbprivate_8h_a9dcf76a5a8d1e3f93daf9e76d888e1af}\label{kdbprivate_8h_a9dcf76a5a8d1e3f93daf9e76d888e1af}} 
\index{kdbprivate.h@{kdbprivate.h}!splitBuildup@{splitBuildup}}
\index{splitBuildup@{splitBuildup}!kdbprivate.h@{kdbprivate.h}}
\doxysubsubsection{\texorpdfstring{splitBuildup()}{splitBuildup()}}
{\footnotesize\ttfamily int split\+Buildup (\begin{DoxyParamCaption}\item[{Split $\ast$}]{split,  }\item[{KDB $\ast$}]{kdb,  }\item[{Key $\ast$}]{parent\+Key }\end{DoxyParamCaption})}



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 \mbox{\hyperlink{split_8c_aa17259b07015cf6c06f14814f52d01fb}{split\+New()}}.

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

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}
\mbox{\Hypertarget{kdbprivate_8h_a455004883f0e5afccc5c78308060d70d}\label{kdbprivate_8h_a455004883f0e5afccc5c78308060d70d}} 
\index{kdbprivate.h@{kdbprivate.h}!splitDel@{splitDel}}
\index{splitDel@{splitDel}!kdbprivate.h@{kdbprivate.h}}
\doxysubsubsection{\texorpdfstring{splitDel()}{splitDel()}}
{\footnotesize\ttfamily void split\+Del (\begin{DoxyParamCaption}\item[{Split $\ast$}]{keysets }\end{DoxyParamCaption})}



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}
\mbox{\Hypertarget{kdbprivate_8h_ae4fcdbb3d58fb0baba1459e0d8b0a94b}\label{kdbprivate_8h_ae4fcdbb3d58fb0baba1459e0d8b0a94b}} 
\index{kdbprivate.h@{kdbprivate.h}!splitDivide@{splitDivide}}
\index{splitDivide@{splitDivide}!kdbprivate.h@{kdbprivate.h}}
\doxysubsubsection{\texorpdfstring{splitDivide()}{splitDivide()}}
{\footnotesize\ttfamily int split\+Divide (\begin{DoxyParamCaption}\item[{Split $\ast$}]{split,  }\item[{KDB $\ast$}]{handle,  }\item[{Key\+Set $\ast$}]{ks }\end{DoxyParamCaption})}



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

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

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

\begin{DoxyPrecond}{Precondition}
\mbox{\hyperlink{split_8c_ad04a357eb6e46aa889e7f72f063e0263}{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}
\mbox{\Hypertarget{kdbprivate_8h_afbeff288abf59244ddd44d82cb8d93d2}\label{kdbprivate_8h_afbeff288abf59244ddd44d82cb8d93d2}} 
\index{kdbprivate.h@{kdbprivate.h}!splitGet@{splitGet}}
\index{splitGet@{splitGet}!kdbprivate.h@{kdbprivate.h}}
\doxysubsubsection{\texorpdfstring{splitGet()}{splitGet()}}
{\footnotesize\ttfamily int split\+Get (\begin{DoxyParamCaption}\item[{Split $\ast$}]{split,  }\item[{Key $\ast$}]{warning\+Key,  }\item[{KDB $\ast$}]{handle }\end{DoxyParamCaption})}



Does some work after getting of backends is finished. 


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

\begin{DoxyPrecond}{Precondition}
\mbox{\hyperlink{split_8c_abd8e79fdbec5faf611bbd26df137343e}{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}
\mbox{\Hypertarget{kdbprivate_8h_a40883cc9699f727c1a31ba283b1d67ae}\label{kdbprivate_8h_a40883cc9699f727c1a31ba283b1d67ae}} 
\index{kdbprivate.h@{kdbprivate.h}!splitMergeBackends@{splitMergeBackends}}
\index{splitMergeBackends@{splitMergeBackends}!kdbprivate.h@{kdbprivate.h}}
\doxysubsubsection{\texorpdfstring{splitMergeBackends()}{splitMergeBackends()}}
{\footnotesize\ttfamily int split\+Merge\+Backends (\begin{DoxyParamCaption}\item[{Split $\ast$}]{split,  }\item[{Key\+Set $\ast$}]{dest }\end{DoxyParamCaption})}



Merges together the backend based parts of split into dest, but bypasses the default split. 


\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}
\mbox{\Hypertarget{kdbprivate_8h_ad79a6dc0ae814dad704b7b442394287d}\label{kdbprivate_8h_ad79a6dc0ae814dad704b7b442394287d}} 
\index{kdbprivate.h@{kdbprivate.h}!splitMergeDefault@{splitMergeDefault}}
\index{splitMergeDefault@{splitMergeDefault}!kdbprivate.h@{kdbprivate.h}}
\doxysubsubsection{\texorpdfstring{splitMergeDefault()}{splitMergeDefault()}}
{\footnotesize\ttfamily int split\+Merge\+Default (\begin{DoxyParamCaption}\item[{Split $\ast$}]{split,  }\item[{Key\+Set $\ast$}]{dest }\end{DoxyParamCaption})}



Merges the default 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}
\mbox{\Hypertarget{kdbprivate_8h_aa17259b07015cf6c06f14814f52d01fb}\label{kdbprivate_8h_aa17259b07015cf6c06f14814f52d01fb}} 
\index{kdbprivate.h@{kdbprivate.h}!splitNew@{splitNew}}
\index{splitNew@{splitNew}!kdbprivate.h@{kdbprivate.h}}
\doxysubsubsection{\texorpdfstring{splitNew()}{splitNew()}}
{\footnotesize\ttfamily Split$\ast$ split\+New (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}



Allocates a new split object. 

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

Initially the size is 0 and alloc is APPROXIMATE\+\_\+\+NR\+\_\+\+OF\+\_\+\+BACKENDS.

\begin{DoxyReturn}{Returns}
a fresh allocated split object
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{split_8c_a455004883f0e5afccc5c78308060d70d}{split\+Del()}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{kdbprivate_8h_af8a0571065ace2b371e017cabdb9eca7}\label{kdbprivate_8h_af8a0571065ace2b371e017cabdb9eca7}} 
\index{kdbprivate.h@{kdbprivate.h}!splitPrepare@{splitPrepare}}
\index{splitPrepare@{splitPrepare}!kdbprivate.h@{kdbprivate.h}}
\doxysubsubsection{\texorpdfstring{splitPrepare()}{splitPrepare()}}
{\footnotesize\ttfamily void split\+Prepare (\begin{DoxyParamCaption}\item[{Split $\ast$}]{split }\end{DoxyParamCaption})}



Prepares for \mbox{\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}
\mbox{\Hypertarget{kdbprivate_8h_a1fff7d9e737c42074ab661a1cd136b4c}\label{kdbprivate_8h_a1fff7d9e737c42074ab661a1cd136b4c}} 
\index{kdbprivate.h@{kdbprivate.h}!splitRemove@{splitRemove}}
\index{splitRemove@{splitRemove}!kdbprivate.h@{kdbprivate.h}}
\doxysubsubsection{\texorpdfstring{splitRemove()}{splitRemove()}}
{\footnotesize\ttfamily void split\+Remove (\begin{DoxyParamCaption}\item[{Split $\ast$}]{split,  }\item[{size\+\_\+t}]{where }\end{DoxyParamCaption})}



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}
\mbox{\Hypertarget{kdbprivate_8h_af6fb30481571a63cfb7745adaa02d526}\label{kdbprivate_8h_af6fb30481571a63cfb7745adaa02d526}} 
\index{kdbprivate.h@{kdbprivate.h}!splitSync@{splitSync}}
\index{splitSync@{splitSync}!kdbprivate.h@{kdbprivate.h}}
\doxysubsubsection{\texorpdfstring{splitSync()}{splitSync()}}
{\footnotesize\ttfamily int split\+Sync (\begin{DoxyParamCaption}\item[{Split $\ast$}]{split }\end{DoxyParamCaption})}



Add sync bits everywhere keys were removed/added. 


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

Only \mbox{\hyperlink{split_8c_ae4fcdbb3d58fb0baba1459e0d8b0a94b}{split\+Divide()}} together with this function can really decide if sync is needed or not.

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

\begin{DoxyRetVals}{Return values}
{\em 0} & if \mbox{\hyperlink{group__kdb_ga11436b058408f83d303ca5e996832bcf}{kdb\+Set()}} is not needed \\
\hline
{\em 1} & if \mbox{\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\+: \mbox{\hyperlink{group__kdb_ga28e385fd9cb7ccfe0b2f1ed2f62453a1}{kdb\+Get()}} was not executed before \\
\hline
{\em -\/3} & wrong dir state\+: \mbox{\hyperlink{group__kdb_ga28e385fd9cb7ccfe0b2f1ed2f62453a1}{kdb\+Get()}} was not executed before \\
\hline
{\em -\/4} & wrong user state\+: \mbox{\hyperlink{group__kdb_ga28e385fd9cb7ccfe0b2f1ed2f62453a1}{kdb\+Get()}} was not executed before \\
\hline
{\em -\/5} & wrong system state\+: \mbox{\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}
\mbox{\Hypertarget{kdbprivate_8h_a9c5bcc3cf34af26d3d8c69bb3cc9dadb}\label{kdbprivate_8h_a9c5bcc3cf34af26d3d8c69bb3cc9dadb}} 
\index{kdbprivate.h@{kdbprivate.h}!splitUpdateFileName@{splitUpdateFileName}}
\index{splitUpdateFileName@{splitUpdateFileName}!kdbprivate.h@{kdbprivate.h}}
\doxysubsubsection{\texorpdfstring{splitUpdateFileName()}{splitUpdateFileName()}}
{\footnotesize\ttfamily void split\+Update\+File\+Name (\begin{DoxyParamCaption}\item[{Split $\ast$}]{split,  }\item[{KDB $\ast$}]{handle,  }\item[{Key $\ast$}]{key }\end{DoxyParamCaption})}



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}
\mbox{\Hypertarget{kdbprivate_8h_a7e1938ac64ef0c120c69c6c8c3943080}\label{kdbprivate_8h_a7e1938ac64ef0c120c69c6c8c3943080}} 
\index{kdbprivate.h@{kdbprivate.h}!splitUpdateSize@{splitUpdateSize}}
\index{splitUpdateSize@{splitUpdateSize}!kdbprivate.h@{kdbprivate.h}}
\doxysubsubsection{\texorpdfstring{splitUpdateSize()}{splitUpdateSize()}}
{\footnotesize\ttfamily int split\+Update\+Size (\begin{DoxyParamCaption}\item[{Split $\ast$}]{split }\end{DoxyParamCaption})}



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

\begin{DoxyWarning}{Warning}
cant use the same code with split\+Get because there is no default split part for \mbox{\hyperlink{group__kdb_ga11436b058408f83d303ca5e996832bcf}{kdb\+Set()}}. 
\end{DoxyWarning}
\mbox{\Hypertarget{kdbprivate_8h_a2ada1ad09f79a80df86949991dba3cb7}\label{kdbprivate_8h_a2ada1ad09f79a80df86949991dba3cb7}} 
\index{kdbprivate.h@{kdbprivate.h}!trieClose@{trieClose}}
\index{trieClose@{trieClose}!kdbprivate.h@{kdbprivate.h}}
\doxysubsubsection{\texorpdfstring{trieClose()}{trieClose()}}
{\footnotesize\ttfamily int trie\+Close (\begin{DoxyParamCaption}\item[{Trie $\ast$}]{trie,  }\item[{Key $\ast$}]{error\+Key }\end{DoxyParamCaption})}



Closes the trie and all opened backends within. 


\begin{DoxyParams}{Parameters}
{\em trie} & the trie to close \\
\hline
{\em error\+Key} & the key used to report warnings\\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em 0} & on success \\
\hline
\end{DoxyRetVals}
\mbox{\Hypertarget{kdbprivate_8h_ab957bbaadb387f0dd73d998e4fdb5d86}\label{kdbprivate_8h_ab957bbaadb387f0dd73d998e4fdb5d86}} 
\index{kdbprivate.h@{kdbprivate.h}!trieInsert@{trieInsert}}
\index{trieInsert@{trieInsert}!kdbprivate.h@{kdbprivate.h}}
\doxysubsubsection{\texorpdfstring{trieInsert()}{trieInsert()}}
{\footnotesize\ttfamily Trie$\ast$ trie\+Insert (\begin{DoxyParamCaption}\item[{Trie $\ast$}]{trie,  }\item[{const char $\ast$}]{name,  }\item[{Backend $\ast$}]{value }\end{DoxyParamCaption})}



Insert into trie. 


\begin{DoxyParams}{Parameters}
{\em trie} & the trie to insert to (0 to create a new trie) \\
\hline
{\em name} & the key\textquotesingle{}s name to insert \\
\hline
{\em value} & the value to insert\\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em trie} & on success \\
\hline
\end{DoxyRetVals}
\mbox{\Hypertarget{kdbprivate_8h_a675eaba21b1311eb20920e6880de7052}\label{kdbprivate_8h_a675eaba21b1311eb20920e6880de7052}} 
\index{kdbprivate.h@{kdbprivate.h}!trieLookup@{trieLookup}}
\index{trieLookup@{trieLookup}!kdbprivate.h@{kdbprivate.h}}
\doxysubsubsection{\texorpdfstring{trieLookup()}{trieLookup()}}
{\footnotesize\ttfamily Backend$\ast$ trie\+Lookup (\begin{DoxyParamCaption}\item[{Trie $\ast$}]{trie,  }\item[{const char $\ast$}]{name }\end{DoxyParamCaption})}



The Trie structure. 

Lookups a backend inside the trie.

\begin{DoxyReturn}{Returns}
the backend if found 

0 otherwise 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em trie} & the trie object to work with \\
\hline
{\em key} & the name of this key will be looked up \\
\hline
\end{DoxyParams}
