summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2013-09-29 23:33:15 +0200
committerGravatar Martin Szulecki2013-09-29 23:33:15 +0200
commita39d83aca38ad50dc1ccb1756e92d62adf885ca7 (patch)
tree239dfe9ad9021f08861f4a96850c68405c504a28
parent2894a05900be6db27ab2d3a6c9496c3d6e45253b (diff)
downloadlibirecovery-a39d83aca38ad50dc1ccb1756e92d62adf885ca7.tar.gz
libirecovery-a39d83aca38ad50dc1ccb1756e92d62adf885ca7.tar.bz2
libirecovery: Add irecv_devices_get_all() to allow iteration over products
-rw-r--r--include/libirecovery.h1
-rw-r--r--src/libirecovery.c4
2 files changed, 5 insertions, 0 deletions
diff --git a/include/libirecovery.h b/include/libirecovery.h
index 1749148..f4e62c7 100644
--- a/include/libirecovery.h
+++ b/include/libirecovery.h
@@ -132,6 +132,7 @@ irecv_error_t irecv_get_srnm(irecv_client_t client, char* srnm);
irecv_error_t irecv_get_imei(irecv_client_t client, char* imei);
/* device database queries */
+irecv_device_t irecv_devices_get_all();
irecv_error_t irecv_devices_get_device_by_client(irecv_client_t client, irecv_device_t* device);
irecv_error_t irecv_devices_get_device_by_product_type(const char* product_type, irecv_device_t* device);
irecv_error_t irecv_devices_get_device_by_hardware_model(const char* hardware_model, irecv_device_t* device);
diff --git a/src/libirecovery.c b/src/libirecovery.c
index 1b547d1..8b4864c 100644
--- a/src/libirecovery.c
+++ b/src/libirecovery.c
@@ -1554,6 +1554,10 @@ irecv_error_t irecv_finish_transfer(irecv_client_t client) {
return IRECV_E_SUCCESS;
}
+irecv_device_t irecv_devices_get_all() {
+ return irecv_devices;
+}
+
irecv_error_t irecv_devices_get_device_by_client(irecv_client_t client, irecv_device_t* device) {
uint32_t bdid = 0;
uint32_t cpid = 0;