#ifndef LIP_HTTP_SERVER_CFG_DEFS_H
#define LIP_HTTP_SERVER_CFG_DEFS_H

#include "lip/lip_cfg_defs.h"

#ifdef LIP_CFG_HTTP_SERVER_ENABLE
    #define LIP_HTTP_SERVER_ENABLE                  LIP_CFG_HTTP_SERVER_ENABLE
#elif defined LIP_USE_HTTP_SERVER
    #define LIP_HTTP_SERVER_ENABLE                  1
#else
    #define LIP_HTTP_SERVER_ENABLE                  0
#endif

#if LIP_HTTP_SERVER_ENABLE

    #ifdef LIP_CFG_HTTP_SERVER_CONNECTIONS_CNT
        #define LIP_HTTP_SERVER_CONNECTIONS_CNT         LIP_CFG_HTTP_SERVER_CONNECTIONS_CNT
    #elif !defined LIP_HTTP_SERVER_CONNECTIONS_CNT
        #define LIP_HTTP_SERVER_CONNECTIONS_CNT         1
    #endif

    #ifdef LIP_CFG_HTTP_SERVER_RXBUF_SIZE
        #define LIP_HTTP_SERVER_RXBUF_SIZE          LIP_CFG_HTTP_SERVER_RXBUF_SIZE
    #elif !defined LIP_HTTP_SERVER_RXBUF_SIZE
        #define LIP_HTTP_SERVER_RXBUF_SIZE          4096
    #endif

    #ifdef LIP_CFG_HTTP_SERVER_TXBUF_SIZE
        #define LIP_HTTP_SERVER_TXBUF_SIZE          LIP_CFG_HTTP_SERVER_TXBUF_SIZE
    #elif !defined LIP_HTTP_SERVER_TXBUF_SIZE
        #define LIP_HTTP_SERVER_TXBUF_SIZE          4096
    #endif

    #ifdef LIP_CFG_HTTP_SERVER_MAX_RXLINE_SIZE
        #define LIP_HTTP_SERVER_MAX_RXLINE_SIZE     LIP_CFG_HTTP_SERVER_MAX_RXLINE_SIZE
    #elif defined LIP_HTTP_SERVER_MAX_RXLINESIZE
        #define LIP_HTTP_SERVER_MAX_RXLINE_SIZE     LIP_HTTP_SERVER_MAX_RXLINESIZE
    #else
        #define LIP_HTTP_SERVER_MAX_RXLINE_SIZE     1024
    #endif

    #ifdef LIP_CFG_HTTP_SERVER_MAX_TXLINE_SIZE
        #define LIP_HTTP_SERVER_MAX_TXLINE_SIZE     LIP_CFG_HTTP_SERVER_MAX_TXLINE_SIZE
    #elif defined LIP_HTTP_SERVER_MAX_TXLINESIZE
        #define LIP_HTTP_SERVER_MAX_TXLINE_SIZE     LIP_HTTP_SERVER_MAX_TXLINESIZE
    #else
        #define LIP_HTTP_SERVER_MAX_TXLINE_SIZE     1024
    #endif

    #ifdef LIP_CFG_HTTP_SERVER_MAX_RESP_HDR_FIELDS
        #define LIP_HTTP_SERVER_MAX_RESP_HDR_FIELDS LIP_CFG_HTTP_SERVER_MAX_RESP_HDR_FIELDS
    #elif !defined LIP_HTTP_SERVER_MAX_RESP_HDR_FIELDS
        #define LIP_HTTP_SERVER_MAX_RESP_HDR_FIELDS 16
    #endif



    #ifdef LIP_CFG_HTTP_SERVER_BUF_MEM
        #define LIP_HTTP_SERVER_BUF_MEM(v)              LIP_CFG_HTTP_SERVER_BUF_MEM(v)
    #elif !defined LIP_HTTP_SERVER_BUF_MEM
        #define LIP_HTTP_SERVER_BUF_MEM(v)              LIP_DEFAULT_STATIC_BUF_MEM(v)
    #endif

    #ifdef LIP_CFG_HTTP_SERVER_RXBUF_MEM
        #define LIP_HTTP_SERVER_RXBUF_MEM(v)            LIP_CFG_HTTP_SERVER_RXBUF_MEM(v)
    #elif !defined LIP_HTTP_SERVER_RXBUF_MEM
        #define LIP_HTTP_SERVER_RXBUF_MEM(v)            LIP_HTTP_SERVER_BUF_MEM(v)
    #endif

    #ifdef LIP_CFG_HTTP_SERVER_TXBUF_MEM
        #define LIP_HTTP_SERVER_TXBUF_MEM(v)            LIP_CFG_HTTP_SERVER_TXBUF_MEM(v)
    #elif !defined LIP_HTTP_SERVER_TXBUF_MEM
        #define LIP_HTTP_SERVER_TXBUF_MEM(v)            LIP_HTTP_SERVER_BUF_MEM(v)
    #endif

    #ifdef LIP_CFG_HTTP_SERVER_RXTMPBUF_MEM
        #define LIP_HTTP_SERVER_RXTMPBUF_MEM(v)         LIP_CFG_HTTP_SERVER_RXTMPBUF_MEM(v)
    #elif !defined LIP_HTTP_SERVER_RXTMPBUF_MEM
        #define LIP_HTTP_SERVER_RXTMPBUF_MEM(v)         LIP_HTTP_SERVER_BUF_MEM(v)
    #endif

    #ifdef LIP_CFG_HTTP_SERVER_TXTMPBUF_MEM
        #define LIP_HTTP_SERVER_TXTMPBUF_MEM(v)         LIP_CFG_HTTP_SERVER_TXTMPBUF_MEM(v)
    #elif !defined LIP_HTTP_SERVER_TXTMPBUF_MEM
        #define LIP_HTTP_SERVER_TXTMPBUF_MEM(v)         LIP_HTTP_SERVER_BUF_MEM(v)
    #endif
#endif


#endif // LIP_HTTP_SERVER_CFG_DEFS_H
