diff options
| author | 2025-06-07 00:53:16 +0200 | |
|---|---|---|
| committer | 2025-06-07 01:00:28 +0200 | |
| commit | f4d8e4f4a42efa6329b2adf6e8554d7235d5f95e (patch) | |
| tree | faaecd0bc0d4fed2a9b7f9417c10acd94d6f7660 /src/idevice.c | |
| parent | 0bf0f9e941c85d06ce4b5909d7a61b3a4f2a6a05 (diff) | |
| download | libimobiledevice-f4d8e4f4a42efa6329b2adf6e8554d7235d5f95e.tar.gz libimobiledevice-f4d8e4f4a42efa6329b2adf6e8554d7235d5f95e.tar.bz2 | |
Add idevice_strerror() to interface
Diffstat (limited to 'src/idevice.c')
| -rw-r--r-- | src/idevice.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/idevice.c b/src/idevice.c index d07b691..e9c909f 100644 --- a/src/idevice.c +++ b/src/idevice.c | |||
| @@ -1534,3 +1534,28 @@ idevice_error_t idevice_connection_disable_bypass_ssl(idevice_connection_t conne | |||
| 1534 | 1534 | ||
| 1535 | return IDEVICE_E_SUCCESS; | 1535 | return IDEVICE_E_SUCCESS; |
| 1536 | } | 1536 | } |
| 1537 | |||
| 1538 | const char* idevice_strerror(idevice_error_t err) | ||
| 1539 | { | ||
| 1540 | switch (err) { | ||
| 1541 | case IDEVICE_E_SUCCESS: | ||
| 1542 | return "Success"; | ||
| 1543 | case IDEVICE_E_INVALID_ARG: | ||
| 1544 | return "Invalid argument"; | ||
| 1545 | case IDEVICE_E_UNKNOWN_ERROR: | ||
| 1546 | return "Unknown Error"; | ||
| 1547 | case IDEVICE_E_NO_DEVICE: | ||
| 1548 | return "No device"; | ||
| 1549 | case IDEVICE_E_NOT_ENOUGH_DATA: | ||
| 1550 | return "Not enough data"; | ||
| 1551 | case IDEVICE_E_CONNREFUSED: | ||
| 1552 | return "Connection refused"; | ||
| 1553 | case IDEVICE_E_SSL_ERROR: | ||
| 1554 | return "SSL error"; | ||
| 1555 | case IDEVICE_E_TIMEOUT: | ||
| 1556 | return "Timeout"; | ||
| 1557 | default: | ||
| 1558 | break; | ||
| 1559 | } | ||
| 1560 | return "Unknown Error"; | ||
| 1561 | } | ||
