2019-04-13 00:38:46 +00:00
|
|
|
#ifndef NETDISKERROR_H
|
|
|
|
#define NETDISKERROR_H
|
|
|
|
|
|
|
|
enum NetDiskError {
|
|
|
|
OPERATION_SUCCESSFUL = 0,
|
|
|
|
|
|
|
|
NETDISK_NOT_PRESENT = 100,
|
|
|
|
DISK_ALREADY_MOUNTED,
|
|
|
|
NO_DIBS_AVAILABLE,
|
|
|
|
OUT_OF_MEMORY,
|
|
|
|
|
|
|
|
/* SetURL errors */
|
|
|
|
URL_TOO_LONG = 200,
|
|
|
|
INVALID_CHARACTER_IN_URL,
|
|
|
|
BAD_URL_SYNTAX,
|
|
|
|
UNSUPPORTED_URL_SCHEME,
|
|
|
|
AUTHENTICATION_NOT_SUPPORTED,
|
|
|
|
FRAGMENT_NOT_SUPPORTED,
|
|
|
|
INVALID_PORT_NUMBER,
|
|
|
|
NO_HOST_SPECIFIED,
|
|
|
|
IPV6_NOT_SUPPORTED,
|
|
|
|
HOSTNAME_TOO_LONG,
|
|
|
|
NAME_LOOKUP_FAILED,
|
|
|
|
|
|
|
|
/* StartTCPConnection and DoHTTPRequest errors */
|
|
|
|
NETWORK_ERROR = 300,
|
|
|
|
NO_RESPONSE,
|
|
|
|
INVALID_RESPONSE,
|
|
|
|
EXCESSIVE_REDIRECTS,
|
|
|
|
UNSUPPORTED_RESPONSE,
|
|
|
|
UNSUPPORTED_HEADER_VALUE,
|
|
|
|
REDIRECT_ERROR,
|
|
|
|
NOT_DESIRED_CONTENT,
|
|
|
|
DIFFERENT_LENGTH,
|
|
|
|
|
|
|
|
/* Error values of 4xx and 5xx mean we got the corresponding HTTP error */
|
|
|
|
HTTP_ERROR = 400,
|
|
|
|
|
|
|
|
/* File format errors */
|
|
|
|
UNSUPPORTED_2IMG_FILE = 600,
|
|
|
|
NOT_MULTIPLE_OF_BLOCK_SIZE,
|
2019-04-15 00:24:07 +00:00
|
|
|
NOT_SPECIFIED_IMAGE_TYPE,
|
2019-07-15 07:25:59 +00:00
|
|
|
UNSUPPORTED_IMAGE_TYPE,
|
2019-04-13 00:38:46 +00:00
|
|
|
|
2019-04-19 04:50:57 +00:00
|
|
|
/* Errors related to processing JSON result in the disk browser */
|
2019-04-15 00:24:07 +00:00
|
|
|
JSON_PARSING_ERROR = 900,
|
|
|
|
NOT_EXPECTED_CONTENTS,
|
2019-04-13 00:38:46 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
2019-04-19 05:49:46 +00:00
|
|
|
* Return a string describing the error. It is only guaranteed to be valid
|
|
|
|
* until the next call to ErrorString().
|
2019-04-13 00:38:46 +00:00
|
|
|
*/
|
|
|
|
char *ErrorString(enum NetDiskError err);
|
|
|
|
|
|
|
|
#endif
|