diff options
Diffstat (limited to 'include/fhp')
-rw-r--r-- | include/fhp/fhp.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/include/fhp/fhp.h b/include/fhp/fhp.h index 7f5d66f..639eb0f 100644 --- a/include/fhp/fhp.h +++ b/include/fhp/fhp.h @@ -194,10 +194,10 @@ fhp_te_parser_get_tes(fhp_te_parser_t * const, uint32_t * const, size_t); // context functions // -typedef struct fhp_t_ fhp_t; +typedef struct fhp_ctx_t_ fhp_ctx_t; typedef bool (*fhp_cb_t)( - fhp_t * const, + fhp_ctx_t * const, fhp_token_t, uint8_t * const, size_t @@ -235,10 +235,10 @@ typedef enum { FHP_HEADER_VALUE_PARSER_LAST } fhp_header_value_parser_t; -#define FHP_MAX_BUF_SIZE 1024 -#define FHP_MAX_TRANSFER_ENCODINGS 4 +#define FHP_CTX_MAX_BUF_SIZE 1024 +#define FHP_CTX_MAX_TRANSFER_ENCODINGS 4 -struct fhp_t_ { +struct fhp_ctx_t_ { // env pointer fhp_env_t *env; @@ -258,7 +258,7 @@ struct fhp_t_ { uint64_t ofs; // fragment data buffer - uint8_t buf[FHP_MAX_BUF_SIZE]; + uint8_t buf[FHP_CTX_MAX_BUF_SIZE]; size_t buf_len; // buffer hashing state @@ -286,7 +286,7 @@ struct fhp_t_ { uint64_t content_length; // transfer encodings - uint32_t tes[FHP_MAX_TRANSFER_ENCODINGS]; + uint32_t tes[FHP_CTX_MAX_TRANSFER_ENCODINGS]; size_t num_tes; // state for url hex decoder @@ -294,15 +294,15 @@ struct fhp_t_ { }; fhp_err_t -fhp_init(fhp_t * const, fhp_env_t * const, fhp_cb_t, void * const); +fhp_ctx_init(fhp_ctx_t * const, fhp_env_t * const, fhp_cb_t, void * const); fhp_err_t -fhp_push(fhp_t * const, uint8_t * const, size_t); +fhp_ctx_push(fhp_ctx_t * const, uint8_t * const, size_t); fhp_env_t * -fhp_get_env(fhp_t * const); +fhp_ctx_get_env(fhp_ctx_t * const); void * -fhp_get_user_data(fhp_t * const); +fhp_ctx_get_user_data(fhp_ctx_t * const); #endif /* FHP_H */ |