diff options
| author | 2013-07-19 00:12:11 +0200 | |
|---|---|---|
| committer | 2013-07-19 00:12:11 +0200 | |
| commit | 20d958dfd16cde46b4aec566db85a2c67cfba551 (patch) | |
| tree | c5d74dbd1cb0f35e39fea42f6c455d88122a7003 /src | |
| parent | e70cd77d5d1e2a7591b50af106f43ca9fd6a945e (diff) | |
| download | libimobiledevice-20d958dfd16cde46b4aec566db85a2c67cfba551.tar.gz libimobiledevice-20d958dfd16cde46b4aec566db85a2c67cfba551.tar.bz2 | |
syslog_relay: Add doc comments for syslog_relay(_start|_stop)_capture()
Diffstat (limited to 'src')
| -rw-r--r-- | src/syslog_relay.c | 26 |
1 files changed, 26 insertions, 0 deletions
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) | |||
| 232 | return NULL; | 232 | return NULL; |
| 233 | } | 233 | } |
| 234 | 234 | ||
| 235 | /** | ||
| 236 | * Starts capturing the syslog of the device using a callback. | ||
| 237 | * | ||
| 238 | * Use syslog_relay_stop_capture() to stop receiving the syslog. | ||
| 239 | * | ||
| 240 | * @param client The syslog_relay client to use | ||
| 241 | * @param callback Callback to receive each character from the syslog. | ||
| 242 | * @param user_data Custom pointer passed to the callback function. | ||
| 243 | * | ||
| 244 | * @return SYSLOG_RELAY_E_SUCCESS on success, | ||
| 245 | * SYSLOG_RELAY_E_INVALID_ARG when one or more parameters are | ||
| 246 | * invalid or SYSLOG_RELAY_E_UNKNOWN_ERROR when an unspecified | ||
| 247 | * error occurs or a syslog capture has already been started. | ||
| 248 | */ | ||
| 235 | syslog_relay_error_t syslog_relay_start_capture(syslog_relay_client_t client, syslog_relay_receive_cb_t callback, void* user_data) | 249 | syslog_relay_error_t syslog_relay_start_capture(syslog_relay_client_t client, syslog_relay_receive_cb_t callback, void* user_data) |
| 236 | { | 250 | { |
| 237 | if (!client || !callback) | 251 | if (!client || !callback) |
| @@ -259,6 +273,18 @@ syslog_relay_error_t syslog_relay_start_capture(syslog_relay_client_t client, sy | |||
| 259 | return res; | 273 | return res; |
| 260 | } | 274 | } |
| 261 | 275 | ||
| 276 | /** | ||
| 277 | * Stops capturing the syslog of the device. | ||
| 278 | * | ||
| 279 | * Use syslog_relay_start_capture() to start receiving the syslog. | ||
| 280 | * | ||
| 281 | * @param client The syslog_relay client to use | ||
| 282 | * | ||
| 283 | * @return SYSLOG_RELAY_E_SUCCESS on success, | ||
| 284 | * SYSLOG_RELAY_E_INVALID_ARG when one or more parameters are | ||
| 285 | * invalid or SYSLOG_RELAY_E_UNKNOWN_ERROR when an unspecified | ||
| 286 | * error occurs or a syslog capture has already been started. | ||
| 287 | */ | ||
| 262 | syslog_relay_error_t syslog_relay_stop_capture(syslog_relay_client_t client) | 288 | syslog_relay_error_t syslog_relay_stop_capture(syslog_relay_client_t client) |
| 263 | { | 289 | { |
| 264 | if (client->worker) { | 290 | if (client->worker) { |
