summaryrefslogtreecommitdiffstats
path: root/include/libimobiledevice/service.h
diff options
context:
space:
mode:
authorGravatar DanyL2019-06-13 02:01:04 +0300
committerGravatar Nikias Bassen2019-06-13 01:41:20 +0200
commit4d8b89223cbc9f530cc650ab5131c09eab1af258 (patch)
treee63216393208c07ae83c7b8eba5e0a9546de4fef /include/libimobiledevice/service.h
parent6edc36fccb52a963c9ebfbb44ba7b91570e0fd06 (diff)
downloadlibimobiledevice-4d8b89223cbc9f530cc650ab5131c09eab1af258.tar.gz
libimobiledevice-4d8b89223cbc9f530cc650ab5131c09eab1af258.tar.bz2
Timeout support for SSL connections and better timeout handeling.
Diffstat (limited to 'include/libimobiledevice/service.h')
-rw-r--r--include/libimobiledevice/service.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/include/libimobiledevice/service.h b/include/libimobiledevice/service.h
index 13c5df1..5c43e29 100644
--- a/include/libimobiledevice/service.h
+++ b/include/libimobiledevice/service.h
@@ -37,6 +37,8 @@ typedef enum {
SERVICE_E_MUX_ERROR = -3,
SERVICE_E_SSL_ERROR = -4,
SERVICE_E_START_SERVICE_ERROR = -5,
+ SERIVCE_E_NOT_ENOUGH_DATA = -6,
+ SERVICE_E_TIMEOUT = -7,
SERVICE_E_UNKNOWN_ERROR = -256
} service_error_t;
@@ -132,7 +134,9 @@ service_error_t service_receive_with_timeout(service_client_t client, char *data
*
* @return SERVICE_E_SUCCESS on success,
* SERVICE_E_INVALID_ARG when one or more parameters are
- * invalid, SERVICE_E_MUX_ERROR when a communication error
+ * invalid, SERIVCE_E_NOT_ENOUGH_DATA when not enough data
+ * received, SERVICE_E_TIMEOUT when the connection times out,
+ * SERVICE_E_MUX_ERROR when a communication error
* occurs, or SERVICE_E_UNKNOWN_ERROR when an unspecified
* error occurs.
*/
@@ -146,7 +150,9 @@ service_error_t service_receive(service_client_t client, char *data, uint32_t si
*
* @return SERVICE_E_SUCCESS on success,
* SERVICE_E_INVALID_ARG if client or client->connection is
- * NULL, SERVICE_E_SSL_ERROR when SSL could not be enabled,
+ * NULL, SERIVCE_E_NOT_ENOUGH_DATA when not enough data
+ * received, SERVICE_E_TIMEOUT when the connection times out,
+ * SERVICE_E_SSL_ERROR when SSL could not be enabled,
* or SERVICE_E_UNKNOWN_ERROR otherwise.
*/
service_error_t service_enable_ssl(service_client_t client);