
\begin{DoxyItemize}
\item infos = Plugin for internal notification
\item infos/author = Thomas Wahringer \href{mailto:waht@libelektra.org}{\tt waht@libelektra.\+org}
\item infos/licence = B\+SD
\item infos/needs =
\item infos/provides =
\item infos/recommends =
\item infos/placements = postgetstorage postcommit
\item infos/status = global libc unittest concept unfinished experimental
\item infos/metadata =
\item infos/description = Plugin for internal notification
\end{DoxyItemize}

Allows applications to automatically update registered variables when the value of a specified key has changed.

It is recommended to use the notification wrapper (see \href{https://www.libelektra.org/tutorials/notifications}{\tt notification tutorial}) instead of this plugin directly. The wrapper has a simple A\+PI and decouples applications from the actual plugin.

\subsection*{Exported Methods}

This plugin exports the following functions. The functions addresses are exported below {\ttfamily system/elektra/modules/internalnotification/exports/}.

All functions have a similar signature\+:


\begin{DoxyCode}
\textcolor{keywordtype}{int} registerX (Plugin * handle, Key * key, ...);
\end{DoxyCode}


If the given {\ttfamily key} is contained in a Key\+Set on a kdb\+Get or kdb\+Set operation a action according to the function\textquotesingle{}s description is executed. Cascading keys as {\ttfamily key} names are also supported.

{\itshape Parameters}


\begin{DoxyItemize}
\item {\itshape handle} The internal plugin {\ttfamily handle} is exported as {\ttfamily system/elektra/modules/internalnotification/exports/handle}.
\item {\itshape key} Key to watch for changes.
\end{DoxyItemize}

Please note that the plugin A\+PI may change as this plugin is experimental.

\subsubsection*{int register\+Int (Plugin $\ast$ handle, Key $\ast$ key, int $\ast$ variable)}

The key\textquotesingle{}s value is converted to integer and the registered variable is updated with the new value.

{\itshape Additional Parameters}


\begin{DoxyItemize}
\item {\itshape variable} Pointer to the variable
\end{DoxyItemize}

\subsubsection*{int register\+Callback (Plugin $\ast$ handle, Key $\ast$ key, Elektra\+Notification\+Change\+Callback callback)}

When the key changes the callback is called with the new key.

{\itshape Additional Parameters}


\begin{DoxyItemize}
\item {\itshape callback} Callback function with the signature {\ttfamily void ($\ast$\+Elektra\+Notification\+Change\+Callback) (Key $\ast$ key)}. 
\end{DoxyItemize}