summaryrefslogtreecommitdiff
path: root/lib/tevent/tevent.h
diff options
context:
space:
mode:
authorAndreas Schneider <asn@redhat.com>2010-02-08 21:10:55 +0100
committerAndreas Schneider <asn@samba.org>2010-05-05 09:28:04 +0200
commitd8a6b23b072f59bb2568d3cca9d496d47181292d (patch)
tree9177153764af937fd36691e67466155cf32450f4 /lib/tevent/tevent.h
parente286966bbabf41a7b1ef45da52b789c716ea9940 (diff)
downloadsamba-d8a6b23b072f59bb2568d3cca9d496d47181292d.tar.gz
samba-d8a6b23b072f59bb2568d3cca9d496d47181292d.tar.bz2
samba-d8a6b23b072f59bb2568d3cca9d496d47181292d.zip
tevent: Create a typedef for the debug function callback.
Diffstat (limited to 'lib/tevent/tevent.h')
-rw-r--r--lib/tevent/tevent.h26
1 files changed, 20 insertions, 6 deletions
diff --git a/lib/tevent/tevent.h b/lib/tevent/tevent.h
index 3252423b34..5aea1c3ed7 100644
--- a/lib/tevent/tevent.h
+++ b/lib/tevent/tevent.h
@@ -460,20 +460,34 @@ enum tevent_debug_level {
};
/**
+ * @brief The tevent debug callbac.
+ *
+ * @param[in] context The memory context to use.
+ *
+ * @param[in] level The debug level.
+ *
+ * @param[in] fmt The format string.
+ *
+ * @param[in] ap The arguments for the format string.
+ */
+typedef void (*tevent_debug_fn)(void *context,
+ enum tevent_debug_level level,
+ const char *fmt,
+ va_list ap) PRINTF_ATTRIBUTE(3,0);
+
+/**
* Set destination for tevent debug messages
*
- * @param[in] ev Event context to debug
- * @param[in] debug Function to handle output printing
+ * @param[in] ev Event context to debug
+ * @param[in] debug Function to handle output printing
+ * @param[in] context The context to pass to the debug function.
*
* @return Always returns 0 as of version 0.9.8
*
* @note Default is to emit no debug messages
*/
int tevent_set_debug(struct tevent_context *ev,
- void (*debug)(void *context,
- enum tevent_debug_level level,
- const char *fmt,
- va_list ap) PRINTF_ATTRIBUTE(3,0),
+ tevent_debug_fn debug,
void *context);
/**