summaryrefslogtreecommitdiffstats
path: root/src/dfu.c
diff options
context:
space:
mode:
authorGravatar Joshua Hill2010-06-01 16:13:25 -0400
committerGravatar Joshua Hill2010-06-01 16:13:25 -0400
commit4d74cd31751165b671eba9a1b0936718b7f39b52 (patch)
treebcc8ff80fc9152823c5881de9d0163a124d369f1 /src/dfu.c
parent4de6d38c54d9f641006539a06083e423a5d0c9c9 (diff)
downloadidevicerestore-4d74cd31751165b671eba9a1b0936718b7f39b52.tar.gz
idevicerestore-4d74cd31751165b671eba9a1b0936718b7f39b52.tar.bz2
Began major refactoring, not quite finished yet, this branch is probably broke
Diffstat (limited to 'src/dfu.c')
-rw-r--r--src/dfu.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/dfu.c b/src/dfu.c
index 5e13f38..1da895d 100644
--- a/src/dfu.c
+++ b/src/dfu.c
@@ -20,9 +20,37 @@
*/
#include <stdint.h>
+#include <libirecovery.h>
#include "dfu.h"
+int dfu_check_mode() {
+ irecv_client_t dfu = NULL;
+ irecv_error_t dfu_error = IRECV_E_SUCCESS;
+
+ dfu_error = irecv_open(&dfu);
+ if (dfu_error != IRECV_E_SUCCESS) {
+ return -1;
+ }
+
+ if(dfu->mode != kDfuMode) {
+ irecv_close(dfu);
+ return -1;
+ }
+
+ irecv_close(dfu);
+ dfu = NULL;
+ return 0;
+}
+
+int dfu_get_cpid(uint32_t* cpid) {
+ return 0;
+}
+
+int dfu_get_bdid(uint32_t* bdid) {
+ return 0;
+}
+
int dfu_get_ecid(uint64_t* ecid) {
return 0;
}