.TH "kdbnotification.h" 3elektra "Fri Aug 4 2023" "Version 0.11.0" "Elektra" \" -*- nroff -*-
.ad l
.nh
.SH NAME
kdbnotification.h \- Elektra-Notification structures and declarations for application developers\&.  

.SH SYNOPSIS
.br
.PP
\fC#include 'kdb\&.h'\fP
.br
\fC#include 'kdbtypes\&.h'\fP
.br

.SS "Typedefs"

.in +1c
.ti -1c
.RI "typedef void(* \fBElektraNotificationConversionErrorCallback\fP) (Key *key, void *context)"
.br
.RI "Callback function called when string to number conversion failed\&. "
.ti -1c
.RI "typedef void(* \fBElektraNotificationChangeCallback\fP) (Key *key, void *context)"
.br
.RI "Callback function for key changes\&. "
.in -1c
.SS "Functions"

.in +1c
.ti -1c
.RI "int \fBelektraNotificationContract\fP (KeySet *contract)"
.br
.RI "Creates a contract for use with \fBkdbOpen()\fP that sets up notifications\&. "
.ti -1c
.RI "int \fBelektraNotificationRegisterCallback\fP (KDB *kdb, Key *key, \fBElektraNotificationChangeCallback\fP callback, void *context)"
.br
.RI "Subscribe for updates via callback when a given key value is changed\&. "
.ti -1c
.RI "int \fBelektraNotificationRegisterCallbackSameOrBelow\fP (KDB *kdb, Key *key, \fBElektraNotificationChangeCallback\fP callback, void *context)"
.br
.RI "Subscribe for updates via callback when a given key or a key below changed\&. "
.in -1c
.PP
.RI "\fB\fP"
.br

.in +1c
.in +1c
.ti -1c
.RI "int \fBelektraNotificationRegisterInt\fP (KDB *kdb, Key *key, int *variable)"
.br
.RI "Subscribe for automatic updates to a given variable when the given key value is changed\&. "
.ti -1c
.RI "int \fBelektraNotificationRegisterUnsignedInt\fP (KDB *kdb, Key *key, unsigned int *variable)"
.br
.RI "Subscribe for automatic updates to a given variable when the given key value is changed\&. "
.ti -1c
.RI "int \fBelektraNotificationRegisterLong\fP (KDB *kdb, Key *key, long *variable)"
.br
.RI "Subscribe for automatic updates to a given variable when the given key value is changed\&. "
.ti -1c
.RI "int \fBelektraNotificationRegisterUnsignedLong\fP (KDB *kdb, Key *key, unsigned long *variable)"
.br
.RI "Subscribe for automatic updates to a given variable when the given key value is changed\&. "
.ti -1c
.RI "int \fBelektraNotificationRegisterLongLong\fP (KDB *kdb, Key *key, long long *variable)"
.br
.RI "Subscribe for automatic updates to a given variable when the given key value is changed\&. "
.ti -1c
.RI "int \fBelektraNotificationRegisterUnsignedLongLong\fP (KDB *kdb, Key *key, unsigned long long *variable)"
.br
.RI "Subscribe for automatic updates to a given variable when the given key value is changed\&. "
.ti -1c
.RI "int \fBelektraNotificationRegisterFloat\fP (KDB *kdb, Key *key, float *variable)"
.br
.RI "Subscribe for automatic updates to a given variable when the given key value is changed\&. "
.ti -1c
.RI "int \fBelektraNotificationRegisterDouble\fP (KDB *kdb, Key *key, double *variable)"
.br
.RI "Subscribe for automatic updates to a given variable when the given key value is changed\&. "
.ti -1c
.RI "int \fBelektraNotificationRegisterKdbBoolean\fP (KDB *kdb, Key *key, kdb_boolean_t *variable)"
.br
.RI "Subscribe for automatic updates to a given variable when the given key value is changed\&. "
.ti -1c
.RI "int \fBelektraNotificationRegisterKdbChar\fP (KDB *kdb, Key *key, kdb_char_t *variable)"
.br
.RI "Subscribe for automatic updates to a given variable when the given key value is changed\&. "
.ti -1c
.RI "int \fBelektraNotificationRegisterKdbOctet\fP (KDB *kdb, Key *key, kdb_octet_t *variable)"
.br
.RI "Subscribe for automatic updates to a given variable when the given key value is changed\&. "
.ti -1c
.RI "int \fBelektraNotificationRegisterKdbShort\fP (KDB *kdb, Key *key, kdb_short_t *variable)"
.br
.RI "Subscribe for automatic updates to a given variable when the given key value is changed\&. "
.ti -1c
.RI "int \fBelektraNotificationRegisterKdbUnsignedShort\fP (KDB *kdb, Key *key, kdb_unsigned_short_t *variable)"
.br
.RI "Subscribe for automatic updates to a given variable when the given key value is changed\&. "
.ti -1c
.RI "int \fBelektraNotificationRegisterKdbLong\fP (KDB *kdb, Key *key, kdb_long_t *variable)"
.br
.RI "Subscribe for automatic updates to a given variable when the given key value is changed\&. "
.ti -1c
.RI "int \fBelektraNotificationRegisterKdbUnsignedLong\fP (KDB *kdb, Key *key, kdb_unsigned_long_t *variable)"
.br
.RI "Subscribe for automatic updates to a given variable when the given key value is changed\&. "
.ti -1c
.RI "int \fBelektraNotificationRegisterKdbLongLong\fP (KDB *kdb, Key *key, kdb_long_long_t *variable)"
.br
.RI "Subscribe for automatic updates to a given variable when the given key value is changed\&. "
.ti -1c
.RI "int \fBelektraNotificationRegisterKdbUnsignedLongLong\fP (KDB *kdb, Key *key, kdb_unsigned_long_long_t *variable)"
.br
.RI "Subscribe for automatic updates to a given variable when the given key value is changed\&. "
.ti -1c
.RI "int \fBelektraNotificationRegisterKdbFloat\fP (KDB *kdb, Key *key, kdb_float_t *variable)"
.br
.RI "Subscribe for automatic updates to a given variable when the given key value is changed\&. "
.ti -1c
.RI "int \fBelektraNotificationRegisterKdbDouble\fP (KDB *kdb, Key *key, kdb_double_t *variable)"
.br
.RI "Subscribe for automatic updates to a given variable when the given key value is changed\&. "
.in -1c
.in -1c
.SH "Detailed Description"
.PP 
Elektra-Notification structures and declarations for application developers\&. 


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

.SH "Function Documentation"
.PP 
.SS "int elektraNotificationContract (KeySet * contract)"

.PP
Creates a contract for use with \fBkdbOpen()\fP that sets up notifications\&. When you call \fBkdbOpen()\fP with this contract, the \fCinternalnotification\fP plugin will be mounted automatically\&. This allows you to call other \fCelektraNotification*\fP functions\&.
.PP
If you need to configure notification transport plugins, you should manually add the relevant keys to \fCcontract\fP\&.
.PP
\fBParameters\fP
.RS 4
\fIcontract\fP The keyset into which the contract is written\&.
.RE
.PP
\fBReturn values\fP
.RS 4
\fI-1\fP if \fCcontract\fP is NULL 
.br
\fI0\fP on success 
.RE
.PP

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