diff options
| author | Murilo Ijanc <[email protected]> | 2026-07-26 12:56:51 -0300 |
|---|---|---|
| committer | Murilo Ijanc <[email protected]> | 2026-07-26 12:56:59 -0300 |
| commit | b7b08a7d29d84de187dd8a55e0c94de66b07a572 (patch) | |
| tree | 7e55661d3eca3cf3b16aada6e87eabee68802fb9 /src/defs.inc | |
| download | asm-b7b08a7d29d84de187dd8a55e0c94de66b07a572.tar.gz | |
Initial importv0.1.0
Diffstat (limited to 'src/defs.inc')
| -rw-r--r-- | src/defs.inc | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/src/defs.inc b/src/defs.inc new file mode 100644 index 0000000..4a64e0e --- /dev/null +++ b/src/defs.inc @@ -0,0 +1,79 @@ +#ifndef CEPIS_DEFS_INC +#define CEPIS_DEFS_INC + +#define CEPIS_OK 0 +#define CEPIS_ERR_INVALID_CEP 1 +#define CEPIS_ERR_NOT_FOUND 2 +#define CEPIS_ERR_RATE_LIMITED 3 +#define CEPIS_ERR_SERVER 4 +#define CEPIS_ERR_NETWORK 5 +#define CEPIS_ERR_INVALID_RESPONSE 6 +#define CEPIS_ERR_NOMEM 7 +#define CEPIS_ERR_USAGE 8 + +#define GEO_LAT 0 +#define GEO_LON 8 +#define GEO_RAIO_M 16 +#define GEO_PRECISAO 24 +#define GEO_SIZE 32 + +#define A_CEP 0 +#define A_LOGRADOURO 8 +#define A_COMPLEMENTO 16 +#define A_UNIDADE 24 +#define A_BAIRRO 32 +#define A_LOCALIDADE 40 +#define A_UF 48 +#define A_ESTADO 56 +#define A_REGIAO 64 +#define A_IBGE 72 +#define A_GIA 80 +#define A_DDD 88 +#define A_SIAFI 96 +#define A_GEO 104 +#define A_RAW 112 +#define A_SIZE 120 +#define A_NFIELDS 13 + +#define H_STATUS 0 +#define H_DNE 8 +#define H_CEPS 16 +#define H_GEO 24 +#define H_BASE_GERADA 32 +#define H_RAW 40 +#define H_SIZE 48 + +#define E_STATUS 0 +#define E_HTTP_STATUS 4 +#define E_RETRY_AFTER 8 +#define E_MESSAGE 16 +#define E_MSGLEN 256 +#define E_SIZE 272 + +#define C_BASE_URL 0 +#define C_TIMEOUT 8 +#define C_MAX_ATTEMPTS 16 +#define C_BACKOFF_BASE 24 +#define C_BACKOFF_MAX 32 +#define C_TOTAL_TIMEOUT 40 +#define C_USER_AGENT 48 +#define C_SIZE 56 + +#define CL_BASE_URL 0 +#define CL_USER_AGENT 8 +#define CL_TIMEOUT 16 +#define CL_BACKOFF_BASE 24 +#define CL_BACKOFF_MAX 32 +#define CL_TOTAL_TIMEOUT 40 +#define CL_MAX_ATTEMPTS 48 +#define CL_RNG 56 +#define CL_SIZE 64 + +#define B_DATA 0 +#define B_LEN 8 +#define B_CAP 16 +#define B_SIZE 24 + +#define CEPIS_MAX_BATCH 500 + +#endif |