diff options
| author | 2013-09-27 02:20:09 +0200 | |
|---|---|---|
| committer | 2013-09-27 02:20:09 +0200 | |
| commit | c84fb716cd998118c95fb59a8ba4d3e26a673749 (patch) | |
| tree | 9380312613149f810f8032158f9adb90ed69866f /src | |
| parent | 0208d9c4045d484509515b808c47a2b16f84d9fc (diff) | |
| download | libirecovery-c84fb716cd998118c95fb59a8ba4d3e26a673749.tar.gz libirecovery-c84fb716cd998118c95fb59a8ba4d3e26a673749.tar.bz2 | |
libirecovery: Provide helper to get current device mode
Diffstat (limited to 'src')
| -rw-r--r-- | src/libirecovery.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/libirecovery.c b/src/libirecovery.c index 3bd57df..e81ed2e 100644 --- a/src/libirecovery.c +++ b/src/libirecovery.c | |||
| @@ -1205,6 +1205,15 @@ irecv_error_t irecv_getret(irecv_client_t client, unsigned int* value) { | |||
| 1205 | return IRECV_E_SUCCESS; | 1205 | return IRECV_E_SUCCESS; |
| 1206 | } | 1206 | } |
| 1207 | 1207 | ||
| 1208 | irecv_error_t irecv_get_mode(irecv_client_t client, int* mode) { | ||
| 1209 | if (check_context(client) != IRECV_E_SUCCESS) | ||
| 1210 | return IRECV_E_NO_DEVICE; | ||
| 1211 | |||
| 1212 | *mode = client->mode; | ||
| 1213 | |||
| 1214 | return IRECV_E_SUCCESS; | ||
| 1215 | } | ||
| 1216 | |||
| 1208 | irecv_error_t irecv_get_cpid(irecv_client_t client, unsigned int* cpid) { | 1217 | irecv_error_t irecv_get_cpid(irecv_client_t client, unsigned int* cpid) { |
| 1209 | if (check_context(client) != IRECV_E_SUCCESS) | 1218 | if (check_context(client) != IRECV_E_SUCCESS) |
| 1210 | return IRECV_E_NO_DEVICE; | 1219 | return IRECV_E_NO_DEVICE; |
