summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2014-12-23 14:24:44 +0100
committerGravatar Martin Szulecki2015-01-12 16:51:52 +0100
commit3afdda798f446dc890b376dd54b0a8deb5bea18a (patch)
treeed87568d20b68d034ffbc9ceb51c37b1638ee1cf /common
parent016e06d4938e73bd4c0417dad2aacd5ea2b53152 (diff)
downloadlibimobiledevice-3afdda798f446dc890b376dd54b0a8deb5bea18a.tar.gz
libimobiledevice-3afdda798f446dc890b376dd54b0a8deb5bea18a.tar.bz2
common: Convert int16_t macro error types of userpref module into enum
Diffstat (limited to 'common')
-rw-r--r--common/userpref.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/common/userpref.h b/common/userpref.h
index 0c70437..84fea53 100644
--- a/common/userpref.h
+++ b/common/userpref.h
@@ -50,16 +50,16 @@ typedef gnutls_datum_t key_data_t;
#define USERPREF_SYSTEM_BUID_KEY "SystemBUID"
#define USERPREF_WIFI_MAC_ADDRESS_KEY "WiFiMACAddress"
-#define USERPREF_E_SUCCESS 0
-#define USERPREF_E_INVALID_ARG -1
-#define USERPREF_E_INVALID_CONF -2
-#define USERPREF_E_SSL_ERROR -3
-#define USERPREF_E_READ_ERROR -4
-#define USERPREF_E_WRITE_ERROR -5
-
-#define USERPREF_E_UNKNOWN_ERROR -256
-
-typedef int16_t userpref_error_t;
+/** Error Codes */
+typedef enum {
+ USERPREF_E_SUCCESS = 0,
+ USERPREF_E_INVALID_ARG = -1,
+ USERPREF_E_INVALID_CONF = -2,
+ USERPREF_E_SSL_ERROR = -3,
+ USERPREF_E_READ_ERROR = -4,
+ USERPREF_E_WRITE_ERROR = -5,
+ USERPREF_E_UNKNOWN_ERROR = -256
+} userpref_error_t;
const char *userpref_get_config_dir(void);
int userpref_read_system_buid(char **system_buid);