2024-06-20 00:34:32 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
typedef enum lm_error {
|
2024-06-21 01:42:51 +00:00
|
|
|
LM_ERR_NoError = 0,
|
|
|
|
LM_ERR_URLBadChar = 1,
|
|
|
|
LM_ERR_URLBadProtocol = 2,
|
|
|
|
LM_ERR_URLTooLarge = 3,
|
|
|
|
LM_ERR_URLHostLarge = 4,
|
|
|
|
LM_ERR_URLPathLarge = 5,
|
|
|
|
LM_ERR_URLBadHost = 6,
|
2024-06-22 04:03:17 +00:00
|
|
|
LM_ERR_URLBadPort = 7,
|
|
|
|
LM_ERR_URLBadPath = 8,
|
|
|
|
LM_ERR_URLPortUnknown = 9,
|
2024-06-22 22:55:01 +00:00
|
|
|
LM_ERR_BadPort = 10,
|
|
|
|
LM_ERR_BadHost = 11,
|
2024-06-22 04:03:17 +00:00
|
|
|
LM_ERR_PoolNoSupport = 12,
|
|
|
|
LM_ERR_URLEnd = 13,
|
|
|
|
LM_ERR_MPTPBadVersion = 14,
|
|
|
|
LM_ERR_MPTPBadCode = 15,
|
|
|
|
LM_ERR_MPTPBadUrl = 16,
|
|
|
|
LM_ERR_MPTPHostFail = 17,
|
|
|
|
LM_ERR_MPTPSocketFail = 18,
|
|
|
|
LM_ERR_MPTPConnectFail = 19,
|
|
|
|
LM_ERR_MPTPRecvFail = 20,
|
|
|
|
LM_ERR_MPTPSendFail = 21,
|
2024-06-22 22:55:01 +00:00
|
|
|
LM_ERR_MPTPBadData = 22,
|
|
|
|
LM_ERR_MPTPBadHost = 23,
|
|
|
|
LM_ERR_MPTPSetsockopt = 24,
|
|
|
|
LM_ERR_MPTPTimeout = 25,
|
|
|
|
LM_ERR_MPTPBindFail = 26,
|
|
|
|
LM_ERR_ArgNULL = 27,
|
|
|
|
LM_ERR_MPTPNotResponse = 28,
|
|
|
|
LM_ERR_MPTPNotRequest = 29,
|
|
|
|
LM_ERR_MPTPNotLast = 30,
|
|
|
|
LM_ERR_NoPort = 31,
|
|
|
|
LM_ERR_PoolInfoBad = 32,
|
2024-06-20 00:34:32 +00:00
|
|
|
} lm_error_t;
|
|
|
|
|
|
|
|
typedef struct lm_error_desc {
|
|
|
|
lm_error_t code;
|
2024-06-20 22:36:56 +00:00
|
|
|
char *desc;
|
2024-06-20 00:34:32 +00:00
|
|
|
} lm_error_desc_t;
|
|
|
|
|
2024-06-20 22:36:56 +00:00
|
|
|
void lm_error_set(lm_error_t code);
|
2024-06-20 00:34:32 +00:00
|
|
|
lm_error_t lm_error();
|
2024-06-20 22:36:56 +00:00
|
|
|
char *lm_strerror();
|