diff options
author | Nikias Bassen | 2015-07-10 03:03:23 +0200 |
---|---|---|
committer | Nikias Bassen | 2015-07-10 03:03:23 +0200 |
commit | e1cac25e632955da0c3aeb2f16f49c5a1687f81c (patch) | |
tree | 1ed7931fc3981cd0e3e5a18fa3f4a27d0df4d767 | |
parent | 65def891530879ffe9b45c1ccee64a6bed1ea93f (diff) | |
download | libimobiledevice-e1cac25e632955da0c3aeb2f16f49c5a1687f81c.tar.gz libimobiledevice-e1cac25e632955da0c3aeb2f16f49c5a1687f81c.tar.bz2 |
lockdown: Add more error codes
-rw-r--r-- | cython/lockdown.pxi | 8 | ||||
-rw-r--r-- | include/libimobiledevice/lockdown.h | 4 | ||||
-rw-r--r-- | src/lockdown.c | 10 |
3 files changed, 21 insertions, 1 deletions
diff --git a/cython/lockdown.pxi b/cython/lockdown.pxi index 7d903d6..c8d511e 100644 --- a/cython/lockdown.pxi +++ b/cython/lockdown.pxi @@ -38,6 +38,10 @@ cdef extern from "libimobiledevice/lockdown.h": LOCKDOWN_E_MISSING_ACTIVATION_RECORD LOCKDOWN_E_SERVICE_PROHIBITED LOCKDOWN_E_ESCROW_LOCKED + LOCKDOWN_E_PAIRING_PROHIBITED_OVER_THIS_CONNECTION + LOCKDOWN_E_FMIP_PROTECTED + LOCKDOWN_E_MC_PROTECTED + LOCKDOWN_E_MC_CHALLENGE_REQUIRED LOCKDOWN_E_UNKNOWN_ERROR lockdownd_error_t lockdownd_client_new(idevice_t device, lockdownd_client_t *client, char *label) @@ -103,6 +107,10 @@ cdef class LockdownError(BaseError): LOCKDOWN_E_MISSING_ACTIVATION_RECORD: "Missing activation record", LOCKDOWN_E_SERVICE_PROHIBITED: "Service prohibited", LOCKDOWN_E_ESCROW_LOCKED: "Escrow locked", + LOCKDOWN_E_PAIRING_PROHIBITED_OVER_THIS_CONNECTION: "Pairing prohibited over this connection", + LOCKDOWN_E_FMIP_PROTECTED: "Find My iPhone/iPod/iPad protected", + LOCKDOWN_E_MC_PROTECTED: "MC protected", + LOCKDOWN_E_MC_CHALLENGE_REQUIRED: "MC challenge required", LOCKDOWN_E_UNKNOWN_ERROR: "Unknown error" } BaseError.__init__(self, *args, **kwargs) diff --git a/include/libimobiledevice/lockdown.h b/include/libimobiledevice/lockdown.h index 076fa9d..46792a6 100644 --- a/include/libimobiledevice/lockdown.h +++ b/include/libimobiledevice/lockdown.h @@ -73,6 +73,10 @@ typedef enum { LOCKDOWN_E_MISSING_ACTIVATION_RECORD = -33, LOCKDOWN_E_SERVICE_PROHIBITED = -34, LOCKDOWN_E_ESCROW_LOCKED = -35, + LOCKDOWN_E_PAIRING_PROHIBITED_OVER_THIS_CONNECTION = -36, + LOCKDOWN_E_FMIP_PROTECTED = -37, + LOCKDOWN_E_MC_PROTECTED = -38, + LOCKDOWN_E_MC_CHALLENGE_REQUIRED = -39, LOCKDOWN_E_UNKNOWN_ERROR = -256 } lockdownd_error_t; diff --git a/src/lockdown.c b/src/lockdown.c index 7cb3091..026d1d1 100644 --- a/src/lockdown.c +++ b/src/lockdown.c @@ -3,7 +3,7 @@ * com.apple.mobile.lockdownd service implementation. * * Copyright (c) 2009-2015 Martin Szulecki All Rights Reserved. - * Copyright (c) 2014 Nikias Bassen. All Rights Reserved. + * Copyright (c) 2014-2015 Nikias Bassen All Rights Reserved. * Copyright (c) 2010 Bryan Forbes All Rights Reserved. * Copyright (c) 2008 Zach C. All Rights Reserved. * @@ -122,6 +122,14 @@ static lockdownd_error_t lockdownd_strtoerr(const char* name) err = LOCKDOWN_E_SERVICE_PROHIBITED; } else if (strcmp(name, "EscrowLocked") == 0) { err = LOCKDOWN_E_ESCROW_LOCKED; + } else if (strcmp(name, "PairingProhibitedOverThisConnection") == 0) { + err = LOCKDOWN_E_PAIRING_PROHIBITED_OVER_THIS_CONNECTION; + } else if (strcmp(name, "FMiPProtected") == 0) { + err = LOCKDOWN_E_FMIP_PROTECTED; + } else if (strcmp(name, "MCProtected") == 0) { + err = LOCKDOWN_E_MC_PROTECTED; + } else if (strcmp(name, "MCChallengeRequired") == 0) { + err = LOCKDOWN_E_MC_CHALLENGE_REQUIRED; } return err; |