\hypertarget{notification_8c}{}\section{notification.\+c File Reference}
\label{notification_8c}\index{notification.\+c@{notification.\+c}}


Implementation of notification functions as defined in \hyperlink{kdbnotification_8h}{kdbnotification.\+h}.  


{\ttfamily \#include $<$kdbassert.\+h$>$}\newline
{\ttfamily \#include $<$kdbease.\+h$>$}\newline
{\ttfamily \#include $<$kdbinternal.\+h$>$}\newline
{\ttfamily \#include $<$kdbioprivate.\+h$>$}\newline
{\ttfamily \#include $<$kdblogger.\+h$>$}\newline
{\ttfamily \#include $<$kdbnotification.\+h$>$}\newline
{\ttfamily \#include $<$kdbnotificationinternal.\+h$>$}\newline
{\ttfamily \#include $<$stdio.\+h$>$}\newline
Include dependency graph for notification.\+c\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{notification_8c__incl}
\end{center}
\end{figure}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
int \hyperlink{notification_8c_aeae96154abdb5fdbf1b34a01e2b23e44}{elektra\+Notification\+Open} (K\+DB $\ast$kdb)
\begin{DoxyCompactList}\small\item\em Initialize the notification system for the given K\+DB instance. \end{DoxyCompactList}\item 
int \hyperlink{notification_8c_a5685dafbd4131011365628d6d9213594}{elektra\+Notification\+Close} (K\+DB $\ast$kdb)
\begin{DoxyCompactList}\small\item\em Stop the notification system for the given K\+DB instance. \end{DoxyCompactList}\item 
int \hyperlink{notification_8c_a362d557489c4199f6c765480a8a3cade}{elektra\+Notification\+Register\+Int} (K\+DB $\ast$kdb, Key $\ast$key, int $\ast$variable)
\begin{DoxyCompactList}\small\item\em Subscribe for automatic updates to a given integer variable when the given key value is changed. \end{DoxyCompactList}\item 
int \hyperlink{notification_8c_aec859714220d1e6a476910433bb77d83}{elektra\+Notification\+Register\+Callback} (K\+DB $\ast$kdb, Key $\ast$key, \hyperlink{kdbnotification_8h_ab5fc8807478f28217df170b86a85fd19}{Elektra\+Notification\+Change\+Callback} callback)
\begin{DoxyCompactList}\small\item\em Subscribe for updates via callback when a given key value is changed. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Implementation of notification functions as defined in \hyperlink{kdbnotification_8h}{kdbnotification.\+h}. 

\begin{DoxyCopyright}{Copyright}
B\+SD License (see L\+I\+C\+E\+N\+S\+E.\+md or \href{https://www.libelektra.org}{\tt https\+://www.\+libelektra.\+org}) 
\end{DoxyCopyright}


\subsection{Function Documentation}
\mbox{\Hypertarget{notification_8c_a5685dafbd4131011365628d6d9213594}\label{notification_8c_a5685dafbd4131011365628d6d9213594}} 
\index{notification.\+c@{notification.\+c}!elektra\+Notification\+Close@{elektra\+Notification\+Close}}
\index{elektra\+Notification\+Close@{elektra\+Notification\+Close}!notification.\+c@{notification.\+c}}
\subsubsection{\texorpdfstring{elektra\+Notification\+Close()}{elektraNotificationClose()}}
{\footnotesize\ttfamily int elektra\+Notification\+Close (\begin{DoxyParamCaption}\item[{K\+DB $\ast$}]{kdb }\end{DoxyParamCaption})}



Stop the notification system for the given K\+DB instance. 

May only be called after \hyperlink{kdbnotification_8h_aeae96154abdb5fdbf1b34a01e2b23e44}{elektra\+Notification\+Open()} was called for given K\+DB instance.


\begin{DoxyParams}{Parameters}
{\em kdb} & K\+DB instance \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em 1} & on success \\
\hline
{\em 0} & on error \\
\hline
\end{DoxyRetVals}
\mbox{\Hypertarget{notification_8c_aeae96154abdb5fdbf1b34a01e2b23e44}\label{notification_8c_aeae96154abdb5fdbf1b34a01e2b23e44}} 
\index{notification.\+c@{notification.\+c}!elektra\+Notification\+Open@{elektra\+Notification\+Open}}
\index{elektra\+Notification\+Open@{elektra\+Notification\+Open}!notification.\+c@{notification.\+c}}
\subsubsection{\texorpdfstring{elektra\+Notification\+Open()}{elektraNotificationOpen()}}
{\footnotesize\ttfamily int elektra\+Notification\+Open (\begin{DoxyParamCaption}\item[{K\+DB $\ast$}]{kdb }\end{DoxyParamCaption})}



Initialize the notification system for the given K\+DB instance. 

Asynchronous receiving of notifications requires an I/O binding. Use \hyperlink{group__kdbio_ga187345483bdfbb404919c6797bc2db77}{elektra\+Io\+Set\+Binding()} before calling this function.

May only be called once for a K\+DB instance. Subsequent calls return 0.


\begin{DoxyParams}{Parameters}
{\em kdb} & K\+DB instance \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em 1} & on success \\
\hline
{\em 0} & on error \\
\hline
\end{DoxyRetVals}
\mbox{\Hypertarget{notification_8c_aec859714220d1e6a476910433bb77d83}\label{notification_8c_aec859714220d1e6a476910433bb77d83}} 
\index{notification.\+c@{notification.\+c}!elektra\+Notification\+Register\+Callback@{elektra\+Notification\+Register\+Callback}}
\index{elektra\+Notification\+Register\+Callback@{elektra\+Notification\+Register\+Callback}!notification.\+c@{notification.\+c}}
\subsubsection{\texorpdfstring{elektra\+Notification\+Register\+Callback()}{elektraNotificationRegisterCallback()}}
{\footnotesize\ttfamily int elektra\+Notification\+Register\+Callback (\begin{DoxyParamCaption}\item[{K\+DB $\ast$}]{kdb,  }\item[{Key $\ast$}]{key,  }\item[{\hyperlink{kdbnotification_8h_ab5fc8807478f28217df170b86a85fd19}{Elektra\+Notification\+Change\+Callback}}]{callback }\end{DoxyParamCaption})}



Subscribe for updates via callback when a given key value is changed. 


\begin{DoxyParams}{Parameters}
{\em handle} & plugin handle \\
\hline
{\em key} & key to watch for changes \\
\hline
{\em callback} & callback function\\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em 1} & on success \\
\hline
{\em 0} & on failure \\
\hline
\end{DoxyRetVals}
\mbox{\Hypertarget{notification_8c_a362d557489c4199f6c765480a8a3cade}\label{notification_8c_a362d557489c4199f6c765480a8a3cade}} 
\index{notification.\+c@{notification.\+c}!elektra\+Notification\+Register\+Int@{elektra\+Notification\+Register\+Int}}
\index{elektra\+Notification\+Register\+Int@{elektra\+Notification\+Register\+Int}!notification.\+c@{notification.\+c}}
\subsubsection{\texorpdfstring{elektra\+Notification\+Register\+Int()}{elektraNotificationRegisterInt()}}
{\footnotesize\ttfamily int elektra\+Notification\+Register\+Int (\begin{DoxyParamCaption}\item[{K\+DB $\ast$}]{kdb,  }\item[{Key $\ast$}]{key,  }\item[{int $\ast$}]{variable }\end{DoxyParamCaption})}



Subscribe for automatic updates to a given integer variable when the given key value is changed. 


\begin{DoxyParams}{Parameters}
{\em handle} & plugin handle \\
\hline
{\em key} & key to watch for changes \\
\hline
{\em variable} & integer variable\\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em 1} & on success \\
\hline
{\em 0} & on failure \\
\hline
\end{DoxyRetVals}
