summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2020-04-27 06:15:53 +0200
committerGravatar Nikias Bassen2020-04-27 06:15:53 +0200
commita48b8fbf7fb80c9f4d6d2419c7f27205293c092d (patch)
treee9da7bb0e29bbc6f791778ddb39626c7c73134e6 /include
parentdc20b07d9877ae0078930e1d977d10bfcda572e2 (diff)
downloadlibimobiledevice-a48b8fbf7fb80c9f4d6d2419c7f27205293c092d.tar.gz
libimobiledevice-a48b8fbf7fb80c9f4d6d2419c7f27205293c092d.tar.bz2
syslog_relay: Add new function syslog_relay_start_capture_raw
to allow access to the unprocessed raw data
Diffstat (limited to 'include')
-rw-r--r--include/libimobiledevice/syslog_relay.h24
1 files changed, 23 insertions, 1 deletions
diff --git a/include/libimobiledevice/syslog_relay.h b/include/libimobiledevice/syslog_relay.h
index ea7b649..89d9489 100644
--- a/include/libimobiledevice/syslog_relay.h
+++ b/include/libimobiledevice/syslog_relay.h
@@ -3,7 +3,8 @@
* @brief Capture the syslog output from a device.
* \internal
*
- * Copyright (c) 2013-2014 Martin Szulecki All Rights Reserved.
+ * Copyright (c) 2019-2020 Nikias Bassen, All Rights Reserved.
+ * Copyright (c) 2013-2014 Martin Szulecki, All Rights Reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -109,6 +110,27 @@ syslog_relay_error_t syslog_relay_client_free(syslog_relay_client_t client);
syslog_relay_error_t syslog_relay_start_capture(syslog_relay_client_t client, syslog_relay_receive_cb_t callback, void* user_data);
/**
+ * Starts capturing the *raw* syslog of the device using a callback.
+ * This function is like syslog_relay_start_capture with the difference that
+ * it will neither check nor process the received data before passing it to
+ * the callback function.
+ *
+ * Use syslog_relay_stop_capture() to stop receiving the syslog.
+ *
+ * @note Use syslog_relay_start_capture for a safer implementation.
+ *
+ * @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_raw(syslog_relay_client_t client, syslog_relay_receive_cb_t callback, void* user_data);
+
+/**
* Stops capturing the syslog of the device.
*
* Use syslog_relay_start_capture() to start receiving the syslog.