.TH "kdbio.h" 3elektra "Fri Aug 4 2023" "Version 0.11.0" "Elektra" \" -*- nroff -*-
.ad l
.nh
.SH NAME
kdbio.h \- Elektra-I/O structures for I/O bindings, plugins and applications\&.  

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

.SS "Typedefs"

.in +1c
.ti -1c
.RI "typedef struct _ElektraIoInterface \fBElektraIoInterface\fP"
.br
.RI "I/O binding handle\&. "
.ti -1c
.RI "typedef struct _ElektraIoFdOperation \fBElektraIoFdOperation\fP"
.br
.RI "file descriptor watch operation handle "
.ti -1c
.RI "typedef struct _ElektraIoTimerOperation \fBElektraIoTimerOperation\fP"
.br
.RI "timer operation handle "
.ti -1c
.RI "typedef struct _ElektraIoIdleOperation \fBElektraIoIdleOperation\fP"
.br
.RI "idle operation handle "
.ti -1c
.RI "typedef void(* \fBElektraIoFdCallback\fP) (\fBElektraIoFdOperation\fP *fdOp, int flags)"
.br
.RI "Callback for file descriptor watch operations\&. "
.ti -1c
.RI "typedef void(* \fBElektraIoIdleCallback\fP) (\fBElektraIoIdleOperation\fP *idleOp)"
.br
.RI "Callback for idle operations\&. "
.ti -1c
.RI "typedef void(* \fBElektraIoTimerCallback\fP) (\fBElektraIoTimerOperation\fP *timerOp)"
.br
.RI "Callback for timer operations\&. "
.ti -1c
.RI "typedef int \fBElektraIoBindingAddFd\fP(\fBElektraIoInterface\fP *binding, \fBElektraIoFdOperation\fP *fdOp)"
.br
.RI "Add file descriptor to be watched by I/O binding\&. "
.ti -1c
.RI "typedef int \fBElektraIoBindingUpdateFd\fP(\fBElektraIoFdOperation\fP *fdOp)"
.br
.RI "Notify I/O binding about changes to file descriptor watch operation\&. "
.ti -1c
.RI "typedef int \fBElektraIoBindingRemoveFd\fP(\fBElektraIoFdOperation\fP *fdOp)"
.br
.RI "Remove file descriptor from I/O binding\&. "
.ti -1c
.RI "typedef int \fBElektraIoBindingAddTimer\fP(\fBElektraIoInterface\fP *binding, \fBElektraIoTimerOperation\fP *timerOp)"
.br
.RI "Add timer to I/O binding\&. "
.ti -1c
.RI "typedef int \fBElektraIoBindingUpdateTimer\fP(\fBElektraIoTimerOperation\fP *timerOp)"
.br
.RI "Notifiy I/O binding about changes to timer structure\&. "
.ti -1c
.RI "typedef int \fBElektraIoBindingRemoveTimer\fP(\fBElektraIoTimerOperation\fP *timerOp)"
.br
.RI "Remove timer from I/O binding\&. "
.ti -1c
.RI "typedef int \fBElektraIoBindingAddIdle\fP(\fBElektraIoInterface\fP *binding, \fBElektraIoIdleOperation\fP *idleOp)"
.br
.RI "Add idle to I/O binding\&. "
.ti -1c
.RI "typedef int \fBElektraIoBindingUpdateIdle\fP(\fBElektraIoIdleOperation\fP *idleOp)"
.br
.RI "Notifiy I/O binding about changes to idle structure\&. "
.ti -1c
.RI "typedef int \fBElektraIoBindingRemoveIdle\fP(\fBElektraIoIdleOperation\fP *idleOp)"
.br
.RI "Remove idle from I/O binding\&. "
.ti -1c
.RI "typedef int \fBElektraIoBindingCleanup\fP(\fBElektraIoInterface\fP *binding)"
.br
.RI "Free memory used by I/O binding\&. "
.in -1c
.SS "Enumerations"

.in +1c
.ti -1c
.RI "enum \fBElektraIoFdFlags\fP { \fBELEKTRA_IO_READABLE\fP = 1 << 0, \fBELEKTRA_IO_WRITABLE\fP = 1 << 1 }"
.br
.RI "Available flags for file descriptors operation bitmask\&. "
.in -1c
.SS "Functions"

.in +1c
.ti -1c
.RI "int \fBelektraIoBindingAddFd\fP (\fBElektraIoInterface\fP *binding, \fBElektraIoFdOperation\fP *fdOp)"
.br
.RI "Add file descriptor to be watched by I/O binding\&. "
.ti -1c
.RI "int \fBelektraIoBindingUpdateFd\fP (\fBElektraIoFdOperation\fP *fdOp)"
.br
.RI "Notify I/O binding about changes to file descriptor watch operation\&. "
.ti -1c
.RI "int \fBelektraIoBindingRemoveFd\fP (\fBElektraIoFdOperation\fP *fdOp)"
.br
.RI "Remove file descriptor from I/O binding\&. "
.ti -1c
.RI "int \fBelektraIoBindingAddTimer\fP (\fBElektraIoInterface\fP *binding, \fBElektraIoTimerOperation\fP *timerOp)"
.br
.RI "Add timer to I/O binding\&. "
.ti -1c
.RI "int \fBelektraIoBindingUpdateTimer\fP (\fBElektraIoTimerOperation\fP *timerOp)"
.br
.RI "Notifiy I/O binding about changes to timer structure\&. "
.ti -1c
.RI "int \fBelektraIoBindingRemoveTimer\fP (\fBElektraIoTimerOperation\fP *timerOp)"
.br
.RI "Remove timer from I/O binding\&. "
.ti -1c
.RI "int \fBelektraIoBindingAddIdle\fP (\fBElektraIoInterface\fP *binding, \fBElektraIoIdleOperation\fP *idleOp)"
.br
.RI "Add idle to I/O binding\&. "
.ti -1c
.RI "int \fBelektraIoBindingUpdateIdle\fP (\fBElektraIoIdleOperation\fP *idleOp)"
.br
.RI "Notifiy I/O binding about changes to idle structure\&. "
.ti -1c
.RI "int \fBelektraIoBindingRemoveIdle\fP (\fBElektraIoIdleOperation\fP *idleOp)"
.br
.RI "Remove idle from I/O binding\&. "
.ti -1c
.RI "int \fBelektraIoBindingCleanup\fP (\fBElektraIoInterface\fP *binding)"
.br
.RI "Free memory used by I/O binding\&. "
.ti -1c
.RI "\fBElektraIoInterface\fP * \fBelektraIoNewBinding\fP (\fBElektraIoBindingAddFd\fP *addFd, \fBElektraIoBindingUpdateFd\fP *updateFd, \fBElektraIoBindingRemoveFd\fP *removeFd, \fBElektraIoBindingAddTimer\fP *addTimer, \fBElektraIoBindingUpdateTimer\fP *updateTimer, \fBElektraIoBindingRemoveTimer\fP *removeTimer, \fBElektraIoBindingAddIdle\fP *addIdle, \fBElektraIoBindingUpdateIdle\fP *updateIdle, \fBElektraIoBindingRemoveIdle\fP *removeIdle, \fBElektraIoBindingCleanup\fP *cleanup)"
.br
.RI "Create a new I/O binding\&. "
.ti -1c
.RI "void * \fBelektraIoBindingGetData\fP (\fBElektraIoInterface\fP *binding)"
.br
.RI "Get private data from I/O Binding\&. "
.ti -1c
.RI "int \fBelektraIoBindingSetData\fP (\fBElektraIoInterface\fP *binding, void *data)"
.br
.RI "Set private data from I/O Binding\&. "
.ti -1c
.RI "\fBElektraIoFdOperation\fP * \fBelektraIoNewFdOperation\fP (int fd, int flags, int enabled, \fBElektraIoFdCallback\fP callback, void *data)"
.br
.RI "Create a new file descriptor watch operation\&. "
.ti -1c
.RI "int \fBelektraIoFdSetEnabled\fP (\fBElektraIoFdOperation\fP *fdOp, int enabled)"
.br
.RI "Enable or disable file descriptor watch operation\&. "
.ti -1c
.RI "int \fBelektraIoFdSetFlags\fP (\fBElektraIoFdOperation\fP *fdOp, int flags)"
.br
.RI "Update flag bitmask of file descriptor watch operation\&. "
.ti -1c
.RI "int \fBelektraIoFdGetFd\fP (\fBElektraIoFdOperation\fP *fdOp)"
.br
.RI "Get file descriptor number from operation\&. "
.ti -1c
.RI "void * \fBelektraIoFdGetData\fP (\fBElektraIoFdOperation\fP *fdOp)"
.br
.RI "Get private data from operation\&. "
.ti -1c
.RI "int \fBelektraIoFdSetBindingData\fP (\fBElektraIoFdOperation\fP *fdOp, void *data)"
.br
.RI "Set private binding data for operation\&. "
.ti -1c
.RI "void * \fBelektraIoFdGetBindingData\fP (\fBElektraIoFdOperation\fP *fdOp)"
.br
.RI "Get private binding data from operation\&. "
.ti -1c
.RI "\fBElektraIoInterface\fP * \fBelektraIoFdGetBinding\fP (\fBElektraIoFdOperation\fP *fdOp)"
.br
.RI "Get binding from operation\&. "
.ti -1c
.RI "int \fBelektraIoFdIsEnabled\fP (\fBElektraIoFdOperation\fP *fdOp)"
.br
.RI "Check if file descriptor watch operation is enabled or disabled\&. "
.ti -1c
.RI "int \fBelektraIoFdGetFlags\fP (\fBElektraIoFdOperation\fP *fdOp)"
.br
.RI "Get flag bitmask of file descriptor watch operation\&. "
.ti -1c
.RI "\fBElektraIoFdCallback\fP \fBelektraIoFdGetCallback\fP (\fBElektraIoFdOperation\fP *fdOp)"
.br
.RI "Get callback of file descriptor watch operation\&. "
.ti -1c
.RI "\fBElektraIoTimerOperation\fP * \fBelektraIoNewTimerOperation\fP (unsigned int interval, int enabled, \fBElektraIoTimerCallback\fP callback, void *data)"
.br
.RI "Create a new timer operation\&. "
.ti -1c
.RI "int \fBelektraIoTimerSetEnabled\fP (\fBElektraIoTimerOperation\fP *timerOp, int enabled)"
.br
.RI "Enable or disable timer operation\&. "
.ti -1c
.RI "int \fBelektraIoTimerIsEnabled\fP (\fBElektraIoTimerOperation\fP *timerOp)"
.br
.RI "Check if timer operation is enabled or disabled\&. "
.ti -1c
.RI "int \fBelektraIoTimerSetInterval\fP (\fBElektraIoTimerOperation\fP *timerOp, unsigned int interval)"
.br
.RI "Update interval of timer operation\&. "
.ti -1c
.RI "unsigned int \fBelektraIoTimerGetInterval\fP (\fBElektraIoTimerOperation\fP *timerOp)"
.br
.RI "Get interval of timer operation\&. "
.ti -1c
.RI "int \fBelektraIoTimerSetBindingData\fP (\fBElektraIoTimerOperation\fP *timerOp, void *data)"
.br
.RI "Set private binding data for operation\&. "
.ti -1c
.RI "void * \fBelektraIoTimerGetBindingData\fP (\fBElektraIoTimerOperation\fP *timerOp)"
.br
.RI "Get private binding data from operation\&. "
.ti -1c
.RI "\fBElektraIoInterface\fP * \fBelektraIoTimerGetBinding\fP (\fBElektraIoTimerOperation\fP *timerOp)"
.br
.RI "Get binding from operation\&. "
.ti -1c
.RI "void * \fBelektraIoTimerGetData\fP (\fBElektraIoTimerOperation\fP *timerOp)"
.br
.RI "Get private data from operation\&. "
.ti -1c
.RI "\fBElektraIoTimerCallback\fP \fBelektraIoTimerGetCallback\fP (\fBElektraIoTimerOperation\fP *timerOp)"
.br
.RI "Get callback of timer operation\&. "
.ti -1c
.RI "\fBElektraIoIdleOperation\fP * \fBelektraIoNewIdleOperation\fP (int enabled, \fBElektraIoIdleCallback\fP callback, void *data)"
.br
.RI "Create a new idle operation\&. "
.ti -1c
.RI "int \fBelektraIoIdleSetEnabled\fP (\fBElektraIoIdleOperation\fP *idleOp, int enabled)"
.br
.RI "Enable or disable idle operation\&. "
.ti -1c
.RI "int \fBelektraIoIdleIsEnabled\fP (\fBElektraIoIdleOperation\fP *idleOp)"
.br
.RI "Check if idle operation is enabled or disabled\&. "
.ti -1c
.RI "int \fBelektraIoIdleSetBindingData\fP (\fBElektraIoIdleOperation\fP *idleOp, void *data)"
.br
.RI "Set private binding data for operation\&. "
.ti -1c
.RI "void * \fBelektraIoIdleGetBindingData\fP (\fBElektraIoIdleOperation\fP *idleOp)"
.br
.RI "Get private binding data from operation\&. "
.ti -1c
.RI "\fBElektraIoInterface\fP * \fBelektraIoIdleGetBinding\fP (\fBElektraIoIdleOperation\fP *idleOp)"
.br
.RI "Get binding from operation\&. "
.ti -1c
.RI "void * \fBelektraIoIdleGetData\fP (\fBElektraIoIdleOperation\fP *idleOp)"
.br
.RI "Get private data from operation\&. "
.ti -1c
.RI "\fBElektraIoIdleCallback\fP \fBelektraIoIdleGetCallback\fP (\fBElektraIoIdleOperation\fP *idleOp)"
.br
.RI "Get callback of idle operation\&. "
.ti -1c
.RI "int \fBelektraIoContract\fP (KeySet *contract, \fBElektraIoInterface\fP *ioBinding)"
.br
.RI "Creates a contract for use with \fBkdbOpen()\fP that sets up an I/O binding\&. "
.ti -1c
.RI "\fBElektraIoInterface\fP * \fBelektraIoGetBinding\fP (KDB *kdb)"
.br
.RI "Get I/O binding for asynchronous I/O operations for KDB instance\&. "
.in -1c
.SH "Detailed Description"
.PP 
Elektra-I/O structures for I/O bindings, plugins and applications\&. 


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

.SH "Typedef Documentation"
.PP 
.SS "typedef int ElektraIoBindingAddFd(\fBElektraIoInterface\fP *binding, \fBElektraIoFdOperation\fP *fdOp)"

.PP
Add file descriptor to be watched by I/O binding\&. An operation may only be added to one binding\&.
.PP
\fBParameters\fP
.RS 4
\fIbinding\fP I/O binding handle 
.br
\fIfdOp\fP file descriptor operation handle 
.RE
.PP
\fBReturn values\fP
.RS 4
\fI1\fP on success 
.br
\fI0\fP on error 
.RE
.PP

.SS "typedef int ElektraIoBindingAddIdle(\fBElektraIoInterface\fP *binding, \fBElektraIoIdleOperation\fP *idleOp)"

.PP
Add idle to I/O binding\&. Idle callbacks are executed without negative effects on other IO sources or the application (e\&.g\&. next event loop iteration) An operation may only be added to one binding\&.
.PP
\fBParameters\fP
.RS 4
\fIbinding\fP I/O binding handle 
.br
\fIidleOp\fP idle operation handle 
.RE
.PP
\fBReturn values\fP
.RS 4
\fI1\fP on success 
.br
\fI0\fP on error 
.RE
.PP

.SS "typedef int ElektraIoBindingAddTimer(\fBElektraIoInterface\fP *binding, \fBElektraIoTimerOperation\fP *timerOp)"

.PP
Add timer to I/O binding\&. Timeouts callbacks are executed after the initial interval has elapsed and then repeatedly after the interval has elapsed\&. An operation may only be added to one binding\&.
.PP
\fBParameters\fP
.RS 4
\fIbinding\fP I/O binding handle 
.br
\fItimerOp\fP timer operation handle 
.RE
.PP
\fBReturn values\fP
.RS 4
\fI1\fP on success 
.br
\fI0\fP on error 
.RE
.PP

.SS "typedef int ElektraIoBindingCleanup(\fBElektraIoInterface\fP *binding)"

.PP
Free memory used by I/O binding\&. All added operations have to be removed before calling this function\&.
.PP
\fBParameters\fP
.RS 4
\fIbinding\fP I/O binding handle 
.RE
.PP
\fBReturn values\fP
.RS 4
\fI1\fP on success 
.br
\fI0\fP on error 
.RE
.PP

.SS "typedef int ElektraIoBindingRemoveFd(\fBElektraIoFdOperation\fP *fdOp)"

.PP
Remove file descriptor from I/O binding\&. 
.PP
\fBParameters\fP
.RS 4
\fIfdOp\fP file descriptor operation handle 
.RE
.PP
\fBReturn values\fP
.RS 4
\fI1\fP on success 
.br
\fI0\fP on error 
.RE
.PP

.SS "typedef int ElektraIoBindingRemoveIdle(\fBElektraIoIdleOperation\fP *idleOp)"

.PP
Remove idle from I/O binding\&. 
.PP
\fBParameters\fP
.RS 4
\fIidleOp\fP idle operation handle 
.RE
.PP
\fBReturn values\fP
.RS 4
\fI1\fP on success 
.br
\fI0\fP on error 
.RE
.PP

.SS "typedef int ElektraIoBindingRemoveTimer(\fBElektraIoTimerOperation\fP *timerOp)"

.PP
Remove timer from I/O binding\&. 
.PP
\fBParameters\fP
.RS 4
\fItimerOp\fP timer operation handle 
.RE
.PP
\fBReturn values\fP
.RS 4
\fI1\fP on success 
.br
\fI0\fP on error 
.RE
.PP

.SS "typedef int ElektraIoBindingUpdateFd(\fBElektraIoFdOperation\fP *fdOp)"

.PP
Notify I/O binding about changes to file descriptor watch operation\&. 
.PP
\fBParameters\fP
.RS 4
\fIfdOp\fP file descriptor operation handle 
.RE
.PP
\fBReturn values\fP
.RS 4
\fI1\fP on success 
.br
\fI0\fP on error 
.RE
.PP

.SS "typedef int ElektraIoBindingUpdateIdle(\fBElektraIoIdleOperation\fP *idleOp)"

.PP
Notifiy I/O binding about changes to idle structure\&. 
.PP
\fBParameters\fP
.RS 4
\fIidleOp\fP idle operation handle 
.RE
.PP
\fBReturn values\fP
.RS 4
\fI1\fP on success 
.br
\fI0\fP on error 
.RE
.PP

.SS "typedef int ElektraIoBindingUpdateTimer(\fBElektraIoTimerOperation\fP *timerOp)"

.PP
Notifiy I/O binding about changes to timer structure\&. 
.PP
\fBParameters\fP
.RS 4
\fItimerOp\fP timer operation handle 
.RE
.PP
\fBReturn values\fP
.RS 4
\fI1\fP on success 
.br
\fI0\fP on error 
.RE
.PP

.SS "typedef void(* ElektraIoFdCallback) (\fBElektraIoFdOperation\fP *fdOp, int flags)"

.PP
Callback for file descriptor watch operations\&. Called whenever a file descriptor status changes\&.
.PP
\fBParameters\fP
.RS 4
\fIfdOp\fP operation handle 
.br
\fIflags\fP current file descriptor flag bitmask 
.RE
.PP

.SS "typedef void(* ElektraIoIdleCallback) (\fBElektraIoIdleOperation\fP *idleOp)"

.PP
Callback for idle operations\&. Called whenever compute intensive tasks can be execute without interfering with other operations\&.
.PP
\fBParameters\fP
.RS 4
\fIidleOp\fP operation handle 
.RE
.PP

.SS "typedef void(* ElektraIoTimerCallback) (\fBElektraIoTimerOperation\fP *timerOp)"

.PP
Callback for timer operations\&. Called after the timer interval has elapsed\&.
.PP
\fBParameters\fP
.RS 4
\fItimerOp\fP operation handle 
.RE
.PP

.SH "Enumeration Type Documentation"
.PP 
.SS "enum \fBElektraIoFdFlags\fP"

.PP
Available flags for file descriptors operation bitmask\&. 
.PP
\fBEnumerator\fP
.in +1c
.TP
\fB\fIELEKTRA_IO_READABLE \fP\fP
file descriptor is readable 
.TP
\fB\fIELEKTRA_IO_WRITABLE \fP\fP
file descriptor is writable 
.SH "Function Documentation"
.PP 
.SS "int elektraIoBindingAddFd (\fBElektraIoInterface\fP * binding, \fBElektraIoFdOperation\fP * fdOp)"

.PP
Add file descriptor to be watched by I/O binding\&. An operation may only be added to one binding\&.
.PP
\fBParameters\fP
.RS 4
\fIbinding\fP I/O binding handle 
.br
\fIfdOp\fP file descriptor operation handle 
.RE
.PP
\fBReturn values\fP
.RS 4
\fI1\fP on success 
.br
\fI0\fP on error 
.RE
.PP

.SS "int elektraIoBindingAddIdle (\fBElektraIoInterface\fP * binding, \fBElektraIoIdleOperation\fP * idleOp)"

.PP
Add idle to I/O binding\&. Idle callbacks are executed without negative effects on other IO sources or the application (e\&.g\&. next event loop iteration) An operation may only be added to one binding\&.
.PP
\fBParameters\fP
.RS 4
\fIbinding\fP I/O binding handle 
.br
\fIidleOp\fP idle operation handle 
.RE
.PP
\fBReturn values\fP
.RS 4
\fI1\fP on success 
.br
\fI0\fP on error 
.RE
.PP

.SS "int elektraIoBindingAddTimer (\fBElektraIoInterface\fP * binding, \fBElektraIoTimerOperation\fP * timerOp)"

.PP
Add timer to I/O binding\&. Timeouts callbacks are executed after the initial interval has elapsed and then repeatedly after the interval has elapsed\&. An operation may only be added to one binding\&.
.PP
\fBParameters\fP
.RS 4
\fIbinding\fP I/O binding handle 
.br
\fItimerOp\fP timer operation handle 
.RE
.PP
\fBReturn values\fP
.RS 4
\fI1\fP on success 
.br
\fI0\fP on error 
.RE
.PP

.SS "int elektraIoBindingCleanup (\fBElektraIoInterface\fP * binding)"

.PP
Free memory used by I/O binding\&. All added operations have to be removed before calling this function\&.
.PP
\fBParameters\fP
.RS 4
\fIbinding\fP I/O binding handle 
.RE
.PP
\fBReturn values\fP
.RS 4
\fI1\fP on success 
.br
\fI0\fP on error 
.RE
.PP

.SS "void* elektraIoBindingGetData (\fBElektraIoInterface\fP * binding)"

.PP
Get private data from I/O Binding\&. To be used by I/O binding implementations only\&.
.PP
\fBParameters\fP
.RS 4
\fIbinding\fP I/O-Binding handle 
.RE
.PP
\fBReturns\fP
.RS 4
pointer to data or NULL on error 
.RE
.PP

.SS "int elektraIoBindingRemoveFd (\fBElektraIoFdOperation\fP * fdOp)"

.PP
Remove file descriptor from I/O binding\&. 
.PP
\fBParameters\fP
.RS 4
\fIfdOp\fP file descriptor operation handle 
.RE
.PP
\fBReturn values\fP
.RS 4
\fI1\fP on success 
.br
\fI0\fP on error 
.RE
.PP

.SS "int elektraIoBindingRemoveIdle (\fBElektraIoIdleOperation\fP * idleOp)"

.PP
Remove idle from I/O binding\&. 
.PP
\fBParameters\fP
.RS 4
\fIidleOp\fP idle operation handle 
.RE
.PP
\fBReturn values\fP
.RS 4
\fI1\fP on success 
.br
\fI0\fP on error 
.RE
.PP

.SS "int elektraIoBindingRemoveTimer (\fBElektraIoTimerOperation\fP * timerOp)"

.PP
Remove timer from I/O binding\&. 
.PP
\fBParameters\fP
.RS 4
\fItimerOp\fP timer operation handle 
.RE
.PP
\fBReturn values\fP
.RS 4
\fI1\fP on success 
.br
\fI0\fP on error 
.RE
.PP

.SS "int elektraIoBindingSetData (\fBElektraIoInterface\fP * binding, void * data)"

.PP
Set private data from I/O Binding\&. To be used by I/O binding implementations only\&.
.PP
\fBParameters\fP
.RS 4
\fIbinding\fP I/O binding handle 
.br
\fIdata\fP private data 
.RE
.PP
\fBReturn values\fP
.RS 4
\fI1\fP on success 
.br
\fI0\fP on error 
.RE
.PP

.SS "int elektraIoBindingUpdateFd (\fBElektraIoFdOperation\fP * fdOp)"

.PP
Notify I/O binding about changes to file descriptor watch operation\&. 
.PP
\fBParameters\fP
.RS 4
\fIfdOp\fP file descriptor operation handle 
.RE
.PP
\fBReturn values\fP
.RS 4
\fI1\fP on success 
.br
\fI0\fP on error 
.RE
.PP

.SS "int elektraIoBindingUpdateIdle (\fBElektraIoIdleOperation\fP * idleOp)"

.PP
Notifiy I/O binding about changes to idle structure\&. 
.PP
\fBParameters\fP
.RS 4
\fIidleOp\fP idle operation handle 
.RE
.PP
\fBReturn values\fP
.RS 4
\fI1\fP on success 
.br
\fI0\fP on error 
.RE
.PP

.SS "int elektraIoBindingUpdateTimer (\fBElektraIoTimerOperation\fP * timerOp)"

.PP
Notifiy I/O binding about changes to timer structure\&. 
.PP
\fBParameters\fP
.RS 4
\fItimerOp\fP timer operation handle 
.RE
.PP
\fBReturn values\fP
.RS 4
\fI1\fP on success 
.br
\fI0\fP on error 
.RE
.PP

.SS "int elektraIoContract (KeySet * contract, \fBElektraIoInterface\fP * ioBinding)"

.PP
Creates a contract for use with \fBkdbOpen()\fP that sets up an I/O binding\&. When you call \fBkdbOpen()\fP with this contract, the KDB instance will use \fCioBinding\fP as its I/O binding\&.
.PP
\fBParameters\fP
.RS 4
\fIcontract\fP The keyset into which the contract is written\&. 
.br
\fIioBinding\fP The ioBinding to use\&.
.RE
.PP
\fBReturn values\fP
.RS 4
\fI-1\fP if \fCcontract\fP or \fCioBinding\fP are NULL 
.br
\fI0\fP on success 
.RE
.PP

.SS "\fBElektraIoInterface\fP* elektraIoFdGetBinding (\fBElektraIoFdOperation\fP * fdOp)"

.PP
Get binding from operation\&. 
.PP
\fBParameters\fP
.RS 4
\fIfdOp\fP fd operation handle 
.RE
.PP
\fBReturns\fP
.RS 4
pointer to binding or NULL on error 
.RE
.PP

.SS "void* elektraIoFdGetBindingData (\fBElektraIoFdOperation\fP * fdOp)"

.PP
Get private binding data from operation\&. 
.PP
\fBParameters\fP
.RS 4
\fIfdOp\fP file descriptor operation handle 
.RE
.PP
\fBReturns\fP
.RS 4
pointer to data or NULL on error 
.RE
.PP

.SS "\fBElektraIoFdCallback\fP elektraIoFdGetCallback (\fBElektraIoFdOperation\fP * fdOp)"

.PP
Get callback of file descriptor watch operation\&. 
.PP
\fBParameters\fP
.RS 4
\fIfdOp\fP file descriptor operation handle 
.RE
.PP
\fBReturns\fP
.RS 4
callback 
.RE
.PP

.SS "void* elektraIoFdGetData (\fBElektraIoFdOperation\fP * fdOp)"

.PP
Get private data from operation\&. 
.PP
\fBParameters\fP
.RS 4
\fIfdOp\fP file descriptor operation handle 
.RE
.PP
\fBReturns\fP
.RS 4
pointer to data or NULL on error 
.RE
.PP

.SS "int elektraIoFdGetFd (\fBElektraIoFdOperation\fP * fdOp)"

.PP
Get file descriptor number from operation\&. 
.PP
\fBParameters\fP
.RS 4
\fIfdOp\fP file descriptor operation handle 
.RE
.PP
\fBReturns\fP
.RS 4
file descriptor number or 0 on error 
.RE
.PP

.SS "int elektraIoFdGetFlags (\fBElektraIoFdOperation\fP * fdOp)"

.PP
Get flag bitmask of file descriptor watch operation\&. 
.PP
\fBParameters\fP
.RS 4
\fIfdOp\fP file descriptor operation handle 
.RE
.PP
\fBReturns\fP
.RS 4
watch flag bitmask (see \fBElektraIoFdFlags\fP)\&. 
.RE
.PP

.SS "int elektraIoFdIsEnabled (\fBElektraIoFdOperation\fP * fdOp)"

.PP
Check if file descriptor watch operation is enabled or disabled\&. 
.PP
\fBParameters\fP
.RS 4
\fIfdOp\fP file descriptor operation handle 
.RE
.PP
\fBReturn values\fP
.RS 4
\fI0\fP if disabled 
.br
\fI1\fP if enabled 
.RE
.PP

.SS "int elektraIoFdSetBindingData (\fBElektraIoFdOperation\fP * fdOp, void * data)"

.PP
Set private binding data for operation\&. 
.PP
\fBParameters\fP
.RS 4
\fIfdOp\fP file descriptor operation handle 
.br
\fIdata\fP pointer to data 
.RE
.PP
\fBReturn values\fP
.RS 4
\fI1\fP on success 
.br
\fI0\fP on error 
.RE
.PP

.SS "int elektraIoFdSetEnabled (\fBElektraIoFdOperation\fP * fdOp, int enabled)"

.PP
Enable or disable file descriptor watch operation\&. 
.PP
\fBParameters\fP
.RS 4
\fIfdOp\fP file descriptor operation handle 
.br
\fIenabled\fP 0 to disabled, any other value for enabled 
.RE
.PP
\fBReturn values\fP
.RS 4
\fI1\fP on success 
.br
\fI0\fP on error 
.RE
.PP

.SS "int elektraIoFdSetFlags (\fBElektraIoFdOperation\fP * fdOp, int flags)"

.PP
Update flag bitmask of file descriptor watch operation\&. 
.PP
\fBParameters\fP
.RS 4
\fIfdOp\fP file descriptor operation handle 
.br
\fIflags\fP watch flag bitmask (see \fBElektraIoFdFlags\fP)\&. 
.RE
.PP
\fBReturn values\fP
.RS 4
\fI1\fP on success 
.br
\fI0\fP on error 
.RE
.PP

.SS "\fBElektraIoInterface\fP* elektraIoGetBinding (KDB * kdb)"

.PP
Get I/O binding for asynchronous I/O operations for KDB instance\&. Returns NULL if no I/O binding was set\&.
.PP
\fBParameters\fP
.RS 4
\fIkdb\fP KDB instance 
.RE
.PP
\fBReturns\fP
.RS 4
I/O binding or NULL 
.RE
.PP

.SS "\fBElektraIoInterface\fP* elektraIoIdleGetBinding (\fBElektraIoIdleOperation\fP * idleOp)"

.PP
Get binding from operation\&. 
.PP
\fBParameters\fP
.RS 4
\fIidleOp\fP idle operation handle 
.RE
.PP
\fBReturns\fP
.RS 4
pointer to binding or NULL on error 
.RE
.PP

.SS "void* elektraIoIdleGetBindingData (\fBElektraIoIdleOperation\fP * idleOp)"

.PP
Get private binding data from operation\&. 
.PP
\fBParameters\fP
.RS 4
\fIidleOp\fP idle operation handle 
.RE
.PP
\fBReturns\fP
.RS 4
pointer to data or NULL on error 
.RE
.PP

.SS "\fBElektraIoIdleCallback\fP elektraIoIdleGetCallback (\fBElektraIoIdleOperation\fP * idleOp)"

.PP
Get callback of idle operation\&. 
.PP
\fBParameters\fP
.RS 4
\fIidleOp\fP idle operation handle 
.RE
.PP
\fBReturns\fP
.RS 4
callback 
.RE
.PP

.SS "void* elektraIoIdleGetData (\fBElektraIoIdleOperation\fP * idleOp)"

.PP
Get private data from operation\&. 
.PP
\fBParameters\fP
.RS 4
\fIidleOp\fP idle operation handle 
.RE
.PP
\fBReturns\fP
.RS 4
pointer to data or NULL on error 
.RE
.PP

.SS "int elektraIoIdleIsEnabled (\fBElektraIoIdleOperation\fP * idleOp)"

.PP
Check if idle operation is enabled or disabled\&. 
.PP
\fBParameters\fP
.RS 4
\fIidleOp\fP idle operation handle 
.RE
.PP
\fBReturn values\fP
.RS 4
\fI0\fP if disabled 
.br
\fI1\fP if enabled 
.RE
.PP

.SS "int elektraIoIdleSetBindingData (\fBElektraIoIdleOperation\fP * idleOp, void * data)"

.PP
Set private binding data for operation\&. 
.PP
\fBParameters\fP
.RS 4
\fIidleOp\fP idle operation handle 
.br
\fIdata\fP pointer to data 
.RE
.PP
\fBReturn values\fP
.RS 4
\fI1\fP on success 
.br
\fI0\fP on error 
.RE
.PP

.SS "int elektraIoIdleSetEnabled (\fBElektraIoIdleOperation\fP * idleOp, int enabled)"

.PP
Enable or disable idle operation\&. 
.PP
\fBParameters\fP
.RS 4
\fIidleOp\fP idle operation handle 
.br
\fIenabled\fP 0 to disabled, any other value for enabled 
.RE
.PP
\fBReturn values\fP
.RS 4
\fI1\fP on success 
.br
\fI0\fP on error 
.RE
.PP

.SS "\fBElektraIoInterface\fP* elektraIoNewBinding (\fBElektraIoBindingAddFd\fP * addFd, \fBElektraIoBindingUpdateFd\fP * updateFd, \fBElektraIoBindingRemoveFd\fP * removeFd, \fBElektraIoBindingAddTimer\fP * addTimer, \fBElektraIoBindingUpdateTimer\fP * updateTimer, \fBElektraIoBindingRemoveTimer\fP * removeTimer, \fBElektraIoBindingAddIdle\fP * addIdle, \fBElektraIoBindingUpdateIdle\fP * updateIdle, \fBElektraIoBindingRemoveIdle\fP * removeIdle, \fBElektraIoBindingCleanup\fP * cleanup)"

.PP
Create a new I/O binding\&. Make sure to free returned data in \fBElektraIoBindingCleanup\fP\&.
.PP
\fBParameters\fP
.RS 4
\fIaddFd\fP function for adding a file descriptor watch operation 
.br
\fIupdateFd\fP function for updating a file descriptor operation 
.br
\fIremoveFd\fP function for removing a file descriptor operation 
.br
\fIaddTimer\fP function for adding a timer operation 
.br
\fIupdateTimer\fP function for updateing a timer operation 
.br
\fIremoveTimer\fP function for removing a timer operation 
.br
\fIaddIdle\fP function for adding an idle operation 
.br
\fIupdateIdle\fP function for updating an idle operation 
.br
\fIremoveIdle\fP function for removing an idle operation 
.br
\fIcleanup\fP function for cleaning up binding data 
.RE
.PP
\fBReturns\fP
.RS 4
newly created binding 
.RE
.PP

.SS "\fBElektraIoFdOperation\fP* elektraIoNewFdOperation (int fd, int flags, int enabled, \fBElektraIoFdCallback\fP callback, void * data)"

.PP
Create a new file descriptor watch operation\&. Free returned data after use\&.
.PP
\fBParameters\fP
.RS 4
\fIfd\fP file descriptor number 
.br
\fIflags\fP watch flag bitmask (see \fBElektraIoFdFlags\fP)\&. Select on which file descriptor state changes the callback should be invoked 
.br
\fIenabled\fP 0 to disabled, any other value for enabled 
.br
\fIcallback\fP Called when file descriptor state has changes 
.br
\fIdata\fP Custom private data 
.RE
.PP
\fBReturns\fP
.RS 4
file descriptor operation handle 
.RE
.PP

.SS "\fBElektraIoIdleOperation\fP* elektraIoNewIdleOperation (int enabled, \fBElektraIoIdleCallback\fP callback, void * data)"

.PP
Create a new idle operation\&. Free returned data after use\&.
.PP
\fBParameters\fP
.RS 4
\fIenabled\fP 0 to disable, any other value for enabled 
.br
\fIcallback\fP Called when file descriptor state has changes 
.br
\fIdata\fP Custom private data 
.RE
.PP
\fBReturns\fP
.RS 4
idle operation handle 
.RE
.PP

.SS "\fBElektraIoTimerOperation\fP* elektraIoNewTimerOperation (unsigned int interval, int enabled, \fBElektraIoTimerCallback\fP callback, void * data)"

.PP
Create a new timer operation\&. Free returned data after use\&.
.PP
\fBParameters\fP
.RS 4
\fIinterval\fP timer interval in milliseconds 
.br
\fIenabled\fP 0 to disable, any other value for enabled 
.br
\fIcallback\fP Called when file descriptor state has changes 
.br
\fIdata\fP Custom private data 
.RE
.PP
\fBReturns\fP
.RS 4
timer operation handle 
.RE
.PP

.SS "\fBElektraIoInterface\fP* elektraIoTimerGetBinding (\fBElektraIoTimerOperation\fP * timerOp)"

.PP
Get binding from operation\&. 
.PP
\fBParameters\fP
.RS 4
\fItimerOp\fP timer operation handle 
.RE
.PP
\fBReturns\fP
.RS 4
pointer to binding or NULL on error 
.RE
.PP

.SS "void* elektraIoTimerGetBindingData (\fBElektraIoTimerOperation\fP * timerOp)"

.PP
Get private binding data from operation\&. 
.PP
\fBParameters\fP
.RS 4
\fItimerOp\fP timer operation handle 
.RE
.PP
\fBReturns\fP
.RS 4
pointer to data or NULL on error 
.RE
.PP

.SS "\fBElektraIoTimerCallback\fP elektraIoTimerGetCallback (\fBElektraIoTimerOperation\fP * timerOp)"

.PP
Get callback of timer operation\&. 
.PP
\fBParameters\fP
.RS 4
\fItimerOp\fP timer operation handle 
.RE
.PP
\fBReturns\fP
.RS 4
callback 
.RE
.PP

.SS "void* elektraIoTimerGetData (\fBElektraIoTimerOperation\fP * timerOp)"

.PP
Get private data from operation\&. 
.PP
\fBParameters\fP
.RS 4
\fItimerOp\fP timer operation handle 
.RE
.PP
\fBReturns\fP
.RS 4
pointer to data or NULL on error 
.RE
.PP

.SS "unsigned int elektraIoTimerGetInterval (\fBElektraIoTimerOperation\fP * timerOp)"

.PP
Get interval of timer operation\&. 
.PP
\fBParameters\fP
.RS 4
\fItimerOp\fP timer operation handle 
.RE
.PP
\fBReturns\fP
.RS 4
timer interval in milliseconds, 0 on error 
.RE
.PP

.SS "int elektraIoTimerIsEnabled (\fBElektraIoTimerOperation\fP * timerOp)"

.PP
Check if timer operation is enabled or disabled\&. 
.PP
\fBParameters\fP
.RS 4
\fItimerOp\fP timer operation handle 
.RE
.PP
\fBReturn values\fP
.RS 4
\fI0\fP if disabled 
.br
\fI1\fP if enabled 
.RE
.PP

.SS "int elektraIoTimerSetBindingData (\fBElektraIoTimerOperation\fP * timerOp, void * data)"

.PP
Set private binding data for operation\&. 
.PP
\fBParameters\fP
.RS 4
\fItimerOp\fP timer operation handle 
.br
\fIdata\fP pointer to data 
.RE
.PP
\fBReturn values\fP
.RS 4
\fI1\fP on success 
.br
\fI0\fP on error 
.RE
.PP

.SS "int elektraIoTimerSetEnabled (\fBElektraIoTimerOperation\fP * timerOp, int enabled)"

.PP
Enable or disable timer operation\&. 
.PP
\fBParameters\fP
.RS 4
\fItimerOp\fP timer operation handle 
.br
\fIenabled\fP 0 to disabled, any other value for enabled 
.RE
.PP
\fBReturn values\fP
.RS 4
\fI1\fP on success 
.br
\fI0\fP on error 
.RE
.PP

.SS "int elektraIoTimerSetInterval (\fBElektraIoTimerOperation\fP * timerOp, unsigned int interval)"

.PP
Update interval of timer operation\&. 
.PP
\fBParameters\fP
.RS 4
\fItimerOp\fP timer operation handle 
.br
\fIinterval\fP timer interval in milliseconds 
.RE
.PP
\fBReturn values\fP
.RS 4
\fI1\fP on success 
.br
\fI0\fP on error 
.RE
.PP

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