summaryrefslogtreecommitdiffstats
path: root/cython
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 /cython
parent6edc36fccb52a963c9ebfbb44ba7b91570e0fd06 (diff)
downloadlibimobiledevice-4d8b89223cbc9f530cc650ab5131c09eab1af258.tar.gz
libimobiledevice-4d8b89223cbc9f530cc650ab5131c09eab1af258.tar.bz2
Timeout support for SSL connections and better timeout handeling.
Diffstat (limited to 'cython')
-rw-r--r--cython/heartbeat.pxi4
-rw-r--r--cython/imobiledevice.pyx6
-rw-r--r--cython/webinspector.pxi2
3 files changed, 9 insertions, 3 deletions
diff --git a/cython/heartbeat.pxi b/cython/heartbeat.pxi
index b48fb59..2f58909 100644
--- a/cython/heartbeat.pxi
+++ b/cython/heartbeat.pxi
@@ -9,6 +9,8 @@ cdef extern from "libimobiledevice/heartbeat.h":
HEARTBEAT_E_PLIST_ERROR = -2
HEARTBEAT_E_MUX_ERROR = -3
HEARTBEAT_E_SSL_ERROR = -4
+ HEARTBEAT_E_NOT_ENOUGH_DATA = -5
+ HEARTBEAT_E_TIMEOUT = -6
HEARTBEAT_E_UNKNOWN_ERROR = -256
heartbeat_error_t heartbeat_client_new(idevice_t device, lockdownd_service_descriptor_t descriptor, heartbeat_client_t * client)
@@ -26,6 +28,8 @@ cdef class HeartbeatError(BaseError):
HEARTBEAT_E_PLIST_ERROR: "Property list error",
HEARTBEAT_E_MUX_ERROR: "MUX error",
HEARTBEAT_E_SSL_ERROR: "SSL Error",
+ HEARTBEAT_E_NOT_ENOUGH_DATA: 'Not enough data',
+ HEARTBEAT_E_TIMEOUT: 'Connection timeout',
HEARTBEAT_E_UNKNOWN_ERROR: "Unknown error"
}
BaseError.__init__(self, *args, **kwargs)
diff --git a/cython/imobiledevice.pyx b/cython/imobiledevice.pyx
index bc861b3..141f67c 100644
--- a/cython/imobiledevice.pyx
+++ b/cython/imobiledevice.pyx
@@ -38,8 +38,8 @@ cdef extern from "libimobiledevice/libimobiledevice.h":
IDEVICE_E_UNKNOWN_ERROR = -2
IDEVICE_E_NO_DEVICE = -3
IDEVICE_E_NOT_ENOUGH_DATA = -4
- IDEVICE_E_BAD_HEADER = -5
IDEVICE_E_SSL_ERROR = -6
+ IDEVICE_E_TIMEOUT = -7
ctypedef void (*idevice_event_cb_t) (const_idevice_event_t event, void *user_data)
cdef extern idevice_error_t idevice_event_subscribe(idevice_event_cb_t callback, void *user_data)
cdef extern idevice_error_t idevice_event_unsubscribe()
@@ -64,8 +64,8 @@ cdef class iDeviceError(BaseError):
IDEVICE_E_UNKNOWN_ERROR: 'Unknown error',
IDEVICE_E_NO_DEVICE: 'No device',
IDEVICE_E_NOT_ENOUGH_DATA: 'Not enough data',
- IDEVICE_E_BAD_HEADER: 'Bad header',
- IDEVICE_E_SSL_ERROR: 'SSL Error'
+ IDEVICE_E_SSL_ERROR: 'SSL Error',
+ IDEVICE_E_TIMEOUT: 'Connection timeout'
}
BaseError.__init__(self, *args, **kwargs)
diff --git a/cython/webinspector.pxi b/cython/webinspector.pxi
index 4622ef5..eb9fba1 100644
--- a/cython/webinspector.pxi
+++ b/cython/webinspector.pxi
@@ -26,6 +26,8 @@ cdef class WebinspectorError(BaseError):
WEBINSPECTOR_E_PLIST_ERROR: "Property list error",
WEBINSPECTOR_E_MUX_ERROR: "MUX error",
WEBINSPECTOR_E_SSL_ERROR: "SSL Error",
+ WEBINSPECTOR_E_NOT_ENOUGH_DATA: 'Not enough data',
+ WEBINSPECTOR_E_TIMEOUT: 'Connection timeout',
WEBINSPECTOR_E_UNKNOWN_ERROR: "Unknown error"
}
BaseError.__init__(self, *args, **kwargs)