.TH "hooks.c" 3elektra "Fri Aug 4 2023" "Version 0.11.0" "Elektra" \" -*- nroff -*-
.ad l
.nh
.SH NAME
hooks.c
.SH SYNOPSIS
.br
.PP
\fC#include <kdbinternal\&.h>\fP
.br

.SS "Functions"

.in +1c
.ti -1c
.RI "void \fBfreeHooks\fP (KDB *kdb, Key *errorKey)"
.br
.RI "Uninitializes and frees all hooks in the passed KDB handle\&. "
.ti -1c
.RI "Plugin * \fBelektraFindInternalNotificationPlugin\fP (KDB *kdb)"
.br
.RI "This method looks for the hook plugin 'internalnotification'\&. "
.ti -1c
.RI "int \fBinitHooks\fP (KDB *kdb, const KeySet *config, KeySet *modules, const KeySet *contract, Key *errorKey)"
.br
.RI "Initializes the hooks stored in the passed KDB handle\&. "
.in -1c
.SH "Detailed Description"
.PP 

.PP
\fBCopyright\fP
.RS 4
BSD License (see LICENSE\&.md or https://www.libelektra.org) 
.RE
.PP

.SH "Function Documentation"
.PP 
.SS "Plugin* elektraFindInternalNotificationPlugin (KDB * kdb)"

.PP
This method looks for the hook plugin 'internalnotification'\&. 
.PP
\fBParameters\fP
.RS 4
\fIkdb\fP the KDB instance in which to search 
.RE
.PP
\fBReturns\fP
.RS 4
NULL if not loaded, pointer to the plugin otherwise 
.RE
.PP

.SS "void freeHooks (KDB * kdb, Key * errorKey)"

.PP
Uninitializes and frees all hooks in the passed KDB handle\&. 
.PP
\fBParameters\fP
.RS 4
\fIkdb\fP the KDB handle where the hooks should be freed 
.br
\fIerrorKey\fP the key which holds errors and warnings which were issued 
.RE
.PP

.SS "int initHooks (KDB * kdb, const KeySet * config, KeySet * modules, const KeySet * contract, Key * errorKey)"

.PP
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 \fCconfig\fP and \fCcontract\fP will be used to determine which hooks to populate\&.
.PP
\fBParameters\fP
.RS 4
\fIkdb\fP the KDB instance where the hooks should be initialized 
.br
\fIconfig\fP KeySet containing the current config in \fCsystem:/elektra\fP namespace 
.br
\fImodules\fP the current list of loaded modules 
.br
\fIcontract\fP the contract passed to \fCkdbOpen\fP 
.br
\fIerrorKey\fP the key which holds errors and warnings which were issued 
.RE
.PP
\fBReturns\fP
.RS 4
0 on success, -1 on failure 
.RE
.PP

.SH "Author"
.PP 
Generated automatically by Doxygen for Elektra from the source code\&.
