Code

store, plugin: Let the plugin module determine an objects backends.
[sysdb.git] / src / include / utils / channel.h
index ca450ce22282dc2af98b7889f7fc15189a544b86..49d37fdcfec6ec6d87df83697a382fa243b48575 100644 (file)
@@ -101,14 +101,25 @@ sdb_channel_read(sdb_channel_t *chan, void *data);
  * to the channel. If non-NULL, the value pointed to by the 'want...'
  * arguments will be "true" iff the respective operation is ready. If the
  * '..._data' arguments are non-NULL, the respective operation is executed
- * atomically once the channel is ready for it. If 'abstime' is specified, the
- * operation will time out with an error if the specified absolute time has
- * passed.
+ * atomically once the channel is ready for it. If 'timeout' is specified, the
+ * operation will time out with an error after the specified time has passed.
  */
 int
 sdb_channel_select(sdb_channel_t *chan, int *wantread, void *read_data,
                int *wantwrite, void *write_data, const struct timespec *timeout);
 
+/* sdb_channel_shutdown:
+ * Initiate a shutdown of the channel. Any subsequent writes will fail. Read
+ * operations will still be possible until the channel buffer is empty and
+ * then fail as well. Failing operations set errno to EBADF.
+ *
+ * Returns:
+ *  - 0 on success
+ *  - a negative value else
+ */
+int
+sdb_channel_shutdown(sdb_channel_t *chan);
+
 #ifdef __cplusplus
 } /* extern "C" */
 #endif