\hypertarget{hooks_8c}{}\doxysection{hooks.\+c File Reference}
\label{hooks_8c}\index{hooks.c@{hooks.c}}
{\ttfamily \#include $<$kdbinternal.\+h$>$}\newline
Include dependency graph for hooks.\+c\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{hooks_8c__incl}
\end{center}
\end{figure}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
void \mbox{\hyperlink{hooks_8c_a1578be51bff442159d04a5cfd3fbeb5a}{free\+Hooks}} (KDB $\ast$kdb, Key $\ast$error\+Key)
\begin{DoxyCompactList}\small\item\em Uninitializes and frees all hooks in the passed KDB handle. \end{DoxyCompactList}\item 
Plugin $\ast$ \mbox{\hyperlink{hooks_8c_ad14db012d93631679d1aa26539d15770}{elektra\+Find\+Internal\+Notification\+Plugin}} (KDB $\ast$kdb)
\begin{DoxyCompactList}\small\item\em This method looks for the hook plugin \textquotesingle{}internalnotification\textquotesingle{}. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{hooks_8c_ae7bbcecc6ef81631ebfa94662f5c9b1a}{init\+Hooks}} (KDB $\ast$kdb, const Key\+Set $\ast$config, Key\+Set $\ast$modules, const Key\+Set $\ast$contract, Key $\ast$error\+Key)
\begin{DoxyCompactList}\small\item\em Initializes the hooks stored in the passed KDB handle. \end{DoxyCompactList}\end{DoxyCompactItemize}


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


\doxysubsection{Function Documentation}
\mbox{\Hypertarget{hooks_8c_ad14db012d93631679d1aa26539d15770}\label{hooks_8c_ad14db012d93631679d1aa26539d15770}} 
\index{hooks.c@{hooks.c}!elektraFindInternalNotificationPlugin@{elektraFindInternalNotificationPlugin}}
\index{elektraFindInternalNotificationPlugin@{elektraFindInternalNotificationPlugin}!hooks.c@{hooks.c}}
\doxysubsubsection{\texorpdfstring{elektraFindInternalNotificationPlugin()}{elektraFindInternalNotificationPlugin()}}
{\footnotesize\ttfamily Plugin$\ast$ elektra\+Find\+Internal\+Notification\+Plugin (\begin{DoxyParamCaption}\item[{KDB $\ast$}]{kdb }\end{DoxyParamCaption})}



This method looks for the hook plugin \textquotesingle{}internalnotification\textquotesingle{}. 


\begin{DoxyParams}{Parameters}
{\em kdb} & the KDB instance in which to search \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
NULL if not loaded, pointer to the plugin otherwise 
\end{DoxyReturn}
\mbox{\Hypertarget{hooks_8c_a1578be51bff442159d04a5cfd3fbeb5a}\label{hooks_8c_a1578be51bff442159d04a5cfd3fbeb5a}} 
\index{hooks.c@{hooks.c}!freeHooks@{freeHooks}}
\index{freeHooks@{freeHooks}!hooks.c@{hooks.c}}
\doxysubsubsection{\texorpdfstring{freeHooks()}{freeHooks()}}
{\footnotesize\ttfamily void free\+Hooks (\begin{DoxyParamCaption}\item[{KDB $\ast$}]{kdb,  }\item[{Key $\ast$}]{error\+Key }\end{DoxyParamCaption})}



Uninitializes and frees all hooks in the passed KDB handle. 


\begin{DoxyParams}{Parameters}
{\em kdb} & the KDB handle where the hooks should be freed \\
\hline
{\em error\+Key} & the key which holds errors and warnings which were issued \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{hooks_8c_ae7bbcecc6ef81631ebfa94662f5c9b1a}\label{hooks_8c_ae7bbcecc6ef81631ebfa94662f5c9b1a}} 
\index{hooks.c@{hooks.c}!initHooks@{initHooks}}
\index{initHooks@{initHooks}!hooks.c@{hooks.c}}
\doxysubsubsection{\texorpdfstring{initHooks()}{initHooks()}}
{\footnotesize\ttfamily int init\+Hooks (\begin{DoxyParamCaption}\item[{KDB $\ast$}]{kdb,  }\item[{const Key\+Set $\ast$}]{config,  }\item[{Key\+Set $\ast$}]{modules,  }\item[{const Key\+Set $\ast$}]{contract,  }\item[{Key $\ast$}]{error\+Key }\end{DoxyParamCaption})}



Initializes the hooks stored in the passed KDB handle. 

If the handle already contains initialized hooks, they will be reinitialized, including unloading and loading of their plugins. Parameters {\ttfamily config} and {\ttfamily contract} will be used to determine which hooks to populate.


\begin{DoxyParams}{Parameters}
{\em kdb} & the KDB instance where the hooks should be initialized \\
\hline
{\em config} & Key\+Set containing the current config in {\ttfamily system\+:/elektra} namespace \\
\hline
{\em modules} & the current list of loaded modules \\
\hline
{\em contract} & the contract passed to {\ttfamily kdb\+Open} \\
\hline
{\em error\+Key} & the key which holds errors and warnings which were issued \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 on success, -\/1 on failure 
\end{DoxyReturn}
