From 20d958dfd16cde46b4aec566db85a2c67cfba551 Mon Sep 17 00:00:00 2001 From: Martin Szulecki Date: Fri, 19 Jul 2013 00:12:11 +0200 Subject: syslog_relay: Add doc comments for syslog_relay(_start|_stop)_capture() --- src/syslog_relay.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'src/syslog_relay.c') diff --git a/src/syslog_relay.c b/src/syslog_relay.c index 2936700..b908153 100644 --- a/src/syslog_relay.c +++ b/src/syslog_relay.c @@ -232,6 +232,20 @@ void *syslog_relay_worker(void *arg) return NULL; } +/** + * Starts capturing the syslog of the device using a callback. + * + * Use syslog_relay_stop_capture() to stop receiving the syslog. + * + * @param client The syslog_relay client to use + * @param callback Callback to receive each character from the syslog. + * @param user_data Custom pointer passed to the callback function. + * + * @return SYSLOG_RELAY_E_SUCCESS on success, + * SYSLOG_RELAY_E_INVALID_ARG when one or more parameters are + * invalid or SYSLOG_RELAY_E_UNKNOWN_ERROR when an unspecified + * error occurs or a syslog capture has already been started. + */ syslog_relay_error_t syslog_relay_start_capture(syslog_relay_client_t client, syslog_relay_receive_cb_t callback, void* user_data) { if (!client || !callback) @@ -259,6 +273,18 @@ syslog_relay_error_t syslog_relay_start_capture(syslog_relay_client_t client, sy return res; } +/** + * Stops capturing the syslog of the device. + * + * Use syslog_relay_start_capture() to start receiving the syslog. + * + * @param client The syslog_relay client to use + * + * @return SYSLOG_RELAY_E_SUCCESS on success, + * SYSLOG_RELAY_E_INVALID_ARG when one or more parameters are + * invalid or SYSLOG_RELAY_E_UNKNOWN_ERROR when an unspecified + * error occurs or a syslog capture has already been started. + */ syslog_relay_error_t syslog_relay_stop_capture(syslog_relay_client_t client) { if (client->worker) { -- cgit v1.1-32-gdbae