\hypertarget{elektra_2plugin_8c}{\section{plugin.\+c File Reference}
\label{elektra_2plugin_8c}\index{plugin.\+c@{plugin.\+c}}
}


Interna of plugin functionality.  


{\ttfamily \#include $<$kdberrors.\+h$>$}\\*
{\ttfamily \#include $<$kdbinternal.\+h$>$}\\*
{\ttfamily \#include $<$kdbversion.\+h$>$}\\*
Include dependency graph for elektra/plugin.c\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{elektra_2plugin_8c__incl}
\end{center}
\end{figure}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
int \hyperlink{elektra_2plugin_8c_a0c1bb87ce27fcf307fa71468206872c2}{elektra\+Process\+Plugin} (Key $\ast$cur, int $\ast$plugin\+Number, char $\ast$$\ast$plugin\+Name, char $\ast$$\ast$reference\+Name, Key $\ast$error\+Key)
\item 
int \hyperlink{elektra_2plugin_8c_a42a9038eca54799559e3b9b7294fc689}{elektra\+Process\+Plugins} (Plugin $\ast$$\ast$plugins, Key\+Set $\ast$modules, Key\+Set $\ast$reference\+Plugins, Key\+Set $\ast$config, Key\+Set $\ast$system\+Config, Key $\ast$error\+Key)
\begin{DoxyCompactList}\small\item\em Load a plugin. \end{DoxyCompactList}\item 
Plugin $\ast$ \hyperlink{elektra_2plugin_8c_a32a70a7876542c51d153164ac5108a57}{elektra\+Plugin\+Open} (const char $\ast$name, Key\+Set $\ast$modules, Key\+Set $\ast$config, Key $\ast$error\+Key)
\begin{DoxyCompactList}\small\item\em Opens a plugin. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Interna of plugin functionality. 

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


\subsection{Function Documentation}
\hypertarget{elektra_2plugin_8c_a32a70a7876542c51d153164ac5108a57}{\index{elektra/plugin.\+c@{elektra/plugin.\+c}!elektra\+Plugin\+Open@{elektra\+Plugin\+Open}}
\index{elektra\+Plugin\+Open@{elektra\+Plugin\+Open}!elektra/plugin.\+c@{elektra/plugin.\+c}}
\subsubsection[{elektra\+Plugin\+Open}]{\setlength{\rightskip}{0pt plus 5cm}Plugin$\ast$ elektra\+Plugin\+Open (
\begin{DoxyParamCaption}
\item[{const char $\ast$}]{name, }
\item[{Key\+Set $\ast$}]{modules, }
\item[{Key\+Set $\ast$}]{config, }
\item[{Key $\ast$}]{error\+Key}
\end{DoxyParamCaption}
)}}\label{elektra_2plugin_8c_a32a70a7876542c51d153164ac5108a57}


Opens a plugin. 

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

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

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


Load a plugin. 

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

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


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

\begin{DoxyRetVals}{Return values}
{\em -\/1} & on failure \\
\hline
\end{DoxyRetVals}
