summaryrefslogtreecommitdiffstats
path: root/lib/tevent/tevent.h
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2012-05-11 15:19:55 +0200
committerStefan Metzmacher <metze@samba.org>2012-06-08 19:00:05 +0200
commitba65400c6ee710b8b5857af5825a784b5c2d0d47 (patch)
treea8c19c0b5b490e63b35027813964dfe79d2b3277 /lib/tevent/tevent.h
parent796acbd9ffd20f13f320641b8a27f86624f3d701 (diff)
downloadsamba-ba65400c6ee710b8b5857af5825a784b5c2d0d47.tar.gz
samba-ba65400c6ee710b8b5857af5825a784b5c2d0d47.tar.xz
samba-ba65400c6ee710b8b5857af5825a784b5c2d0d47.zip
tevent: expose tevent_context_init_ops
This can be used to implement wrapper backends, while passing a private pointer to the backens init function via ev->additional_data. metze
Diffstat (limited to 'lib/tevent/tevent.h')
-rw-r--r--lib/tevent/tevent.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/tevent/tevent.h b/lib/tevent/tevent.h
index c8719fa4f19..dc61912be74 100644
--- a/lib/tevent/tevent.h
+++ b/lib/tevent/tevent.h
@@ -126,6 +126,20 @@ struct tevent_context *tevent_context_init(TALLOC_CTX *mem_ctx);
struct tevent_context *tevent_context_init_byname(TALLOC_CTX *mem_ctx, const char *name);
/**
+ * @brief Create a custom event context
+ *
+ * @param[in] mem_ctx The memory context to use.
+ * @param[in] ops The function pointer table of the backend.
+ * @param[in] additional_data The additional/private data to this instance
+ *
+ * @return An allocated tevent context, NULL on error.
+ *
+ */
+struct tevent_context *tevent_context_init_ops(TALLOC_CTX *mem_ctx,
+ const struct tevent_ops *ops,
+ void *additional_data);
+
+/**
* @brief List available backends.
*
* @param[in] mem_ctx The memory context to use.