Macros | Functions
Valvula

Macros

#define VALVULA_CHECK_REF(ref, return_value)
 Allows to check the reference provided, and returning the return value provided. More...
 
#define VALVULA_CHECK_REF2(ref, return_value, ref2, free2_func)
 Allows to check the reference provided, returning the return value provided, also releasing a second reference with a custom free function. More...
 
#define VALVULA_MIN(a, b)   ((a) > (b) ? b : a)
 Returns the minimum from two values. More...
 

Functions

void _valvula_log (ValvulaCtx *ctx, const char *file, int line, ValvulaDebugLevel log_level, const char *message,...)
 internal definitions More...
 
axl_bool valvula_address_rule_match (ValvulaCtx *ctx, const char *rule, const char *address)
 Allows to check if the provided address matches the provided rule. More...
 
void valvula_color_log_enable (ValvulaCtx *ctx, axl_bool status)
 Enable console color log. More...
 
axl_bool valvula_color_log_is_enabled (ValvulaCtx *ctx)
 Allows to check if the color log is currently enabled. More...
 
void valvula_exit_ctx (ValvulaCtx *ctx, axl_bool free_ctx)
 Terminates the valvula library execution on the provided context. More...
 
long valvula_get_day (void)
 Allows to get current day. More...
 
const char * valvula_get_domain (const char *address)
 Allows to get the domain part of the provided address. More...
 
long valvula_get_hour (void)
 Allows to get current hour. More...
 
char * valvula_get_local_part (const char *address)
 Allows to get local part from the provided domain [local-part]@domain. More...
 
long valvula_get_minute (void)
 Allows to get current minute. More...
 
long valvula_get_month (void)
 Allows to get current month. More...
 
const char * valvula_get_recipient_domain (ValvulaRequest *request)
 Allows to get recipient domain defined at the valvula request. More...
 
char * valvula_get_recipient_local_part (ValvulaRequest *request)
 Allows to get local part associated to the recipient of the provided request. More...
 
const char * valvula_get_sasl_user (ValvulaRequest *request)
 Allows to get sasl_user associated to the request. More...
 
const char * valvula_get_sender_domain (ValvulaRequest *request)
 Support function that allows getting sender domain for the provided request. More...
 
char * valvula_get_sender_local_part (ValvulaRequest *request)
 Allows to get local part associated to the sender of the provided request. More...
 
const char * valvula_get_tld_extension (const char *address)
 Allows to get the domain extension part of the provided address (TLD). More...
 
axl_bool valvula_init_check (ValvulaCtx *ctx)
 Allows to check if the provided ValvulaCtx is initialized (valvula_init_ctx). More...
 
axl_bool valvula_init_ctx (ValvulaCtx *ctx)
 Context based valvula library init. More...
 
axl_bool valvula_is_authenticated (ValvulaRequest *request)
 Allows to check if the provided request is authenticated (SASL user enabled). More...
 
axl_bool valvula_is_exiting (ValvulaCtx *ctx)
 Allows to check if valvula engine started on the provided context is finishing (a call to valvula_exit_ctx was done). More...
 
void valvula_log2_enable (ValvulaCtx *ctx, axl_bool status)
 Enable console second level valvula log. More...
 
axl_bool valvula_log2_is_enabled (ValvulaCtx *ctx)
 Allows to get current status for second level log debug info to console. More...
 
void valvula_log_enable (ValvulaCtx *ctx, axl_bool status)
 Enable console valvula log. More...
 
axl_bool valvula_log_is_enabled (ValvulaCtx *ctx)
 Allows to get current status for log debug info to console. More...
 
long valvula_now (void)
 Allows to get current epoch (now). More...
 
void valvula_set_log_handler (ValvulaCtx *ctx, ValvulaLogHandler log_handler, axlPointer user_data)
 Allows to configure a log handler that is called every time a log is produced by the libValvula engine. More...
 

Detailed Description