Event list module implementation file. More...
#include "event_list.h"
#include "definitions.h"
#include "log_util.h"
#include "memory.h"
#include "mcl/mcl_event.h"
Go to the source code of this file.
Functions | |
static E_MCL_ERROR_CODE | _initialize_meta (event_list_t *event_list, const char *version) |
E_MCL_ERROR_CODE | event_list_initialize (const char *version, event_list_t **event_list) |
This function creates and initializes a data struct of event_list. More... | |
E_MCL_ERROR_CODE | event_list_add_event (event_t *event, event_list_t *event_list) |
This function adds event to event_list . More... | |
void | event_list_destroy (event_list_t **event_list) |
To destroy the event_list data struct. More... | |
Event list module implementation file.
Definition in file event_list.c.
|
static |
Definition at line 70 of file event_list.c.
References ASSERT_CODE_MESSAGE, DEBUG_ENTRY, DEBUG_LEAVE, MCL_OK, event_list_t::meta, META_FIELD_PAYLOAD_TYPE_BUSINESS_EVENT, META_FIELD_TYPE_ITEM, meta_field_values, META_FIELD_VERSION_CURRENT, item_meta_t::payload, string_initialize_new(), string_initialize_static(), item_meta_payload_t::type, item_meta_t::type, item_meta_payload_t::version, and item_meta_t::version.
Referenced by event_list_initialize().
E_MCL_ERROR_CODE event_list_add_event | ( | event_t * | event, |
event_list_t * | event_list | ||
) |
This function adds event
to event_list
.
[in] | event | Event handle which is going to be added to event_list . |
[in] | event_list | Which contains events with the same payload type and payload version. |
event_list
is full and event
can not be added to event_list
. Definition at line 60 of file event_list.c.
References DEBUG_ENTRY, DEBUG_LEAVE, event_list_t::events, and list_add().
Referenced by mcl_store_new_event().
void event_list_destroy | ( | event_list_t ** | event_list | ) |
To destroy the event_list
data struct.
[in] | event_list | Event set handle to be freed. |
Definition at line 98 of file event_list.c.
References DEBUG_ENTRY, DEBUG_LEAVE, event_destroy(), list_destroy_with_content(), MCL_FREE, MCL_NULL, and string_destroy().
Referenced by _store_list_destroy_callback(), event_list_initialize(), and mcl_store_new_event().
E_MCL_ERROR_CODE event_list_initialize | ( | const char * | version, |
event_list_t ** | event_list | ||
) |
This function creates and initializes a data struct of event_list.
[in] | version | Version of event. |
[out] | event_list | Created and initialized event_list data struct. |
Definition at line 23 of file event_list.c.
References _initialize_meta(), ASSERT_STATEMENT_CODE_MESSAGE, DEBUG_ENTRY, DEBUG_LEAVE, event_list_destroy(), list_initialize(), MCL_ERROR_RETURN, MCL_FREE, MCL_NEW, MCL_NULL, MCL_OK, and MCL_OUT_OF_MEMORY.
Referenced by mcl_store_new_event().