15#define FOREACH_GOLIOTH_STATUS(STATUS) \
17 STATUS(GOLIOTH_ERR_FAIL) \
18 STATUS(GOLIOTH_ERR_DNS_LOOKUP) \
19 STATUS(GOLIOTH_ERR_NOT_IMPLEMENTED) \
20 STATUS(GOLIOTH_ERR_MEM_ALLOC) \
21 STATUS(GOLIOTH_ERR_NULL) \
22 STATUS(GOLIOTH_ERR_INVALID_FORMAT) \
23 STATUS(GOLIOTH_ERR_SERIALIZE) \
24 STATUS(GOLIOTH_ERR_IO) \
25 STATUS(GOLIOTH_ERR_TIMEOUT) \
26 STATUS(GOLIOTH_ERR_QUEUE_FULL) \
27 STATUS(GOLIOTH_ERR_NOT_ALLOWED) \
28 STATUS(GOLIOTH_ERR_INVALID_STATE) \
29 STATUS(GOLIOTH_ERR_NO_MORE_DATA) \
30 STATUS(GOLIOTH_ERR_NACK) \
31 STATUS(GOLIOTH_ERR_BAD_REQUEST) \
32 STATUS(GOLIOTH_ERR_INVALID_BLOCK_SIZE) \
33 STATUS(GOLIOTH_ERR_COAP_RESPONSE)
35#define GENERATE_GOLIOTH_STATUS_ENUM(code) code,
51#define GOLIOTH_STATUS_RETURN_IF_ERROR(expr) \
54 enum golioth_status status = (expr); \
55 if (status != GOLIOTH_OK) \
#define FOREACH_GOLIOTH_STATUS(STATUS)
Status code enum used throughout Golioth SDK.
#define GENERATE_GOLIOTH_STATUS_ENUM(code)
const char * golioth_status_to_str(enum golioth_status status)