event.h File Reference

Event module header file. More...

#include "data_types.h"
Include dependency graph for event.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  event_t
 This struct is used for building a single event. More...
 

Functions

E_MCL_ERROR_CODE event_initialize (item_meta_t *meta, const char *type, const char *version, mcl_int32_t severity, const char *timestamp, event_t **event)
 This function creates and initializes a data struct of event_t. More...
 
void event_destroy (event_t **event)
 To destroy the event_t data struct. More...
 

Detailed Description

Event module header file.


Date
Sep 26, 2016 Meta and payload parts of event type are initialized and filled in this module.

Definition in file event.h.

Function Documentation

void event_destroy ( event_t **  event)

To destroy the event_t data struct.

Will release the event_t data struct. After destroy() operation, the data struct shouldn't be used.

Parameters
[in]eventStores all field members of event json string.

Definition at line 108 of file event.c.

References DEBUG_ENTRY, DEBUG_LEAVE, json_util_destroy(), MCL_FREE, MCL_NULL, and string_destroy().

Referenced by event_initialize(), event_list_destroy(), and mcl_store_new_event().

Here is the call graph for this function:

Here is the caller graph for this function:

E_MCL_ERROR_CODE event_initialize ( item_meta_t meta,
const char *  type,
const char *  version,
mcl_int32_t  severity,
const char *  timestamp,
event_t **  event 
)

This function creates and initializes a data struct of event_t.

Parameters
[in]metaMeta of event set which is going to be added.
[in]typeType of event.
[in]versionVersion number of event.
[in]severitySeverity level.
[in]timestampTimestamp of the event in YYYY-MM-DDThh:mm:ss.sssZ format. Ex:2016-04-26T08:06:25.317Z.
[out]eventEvent handle which is going to be initialized.
Returns

Definition at line 23 of file event.c.

References DEBUG_ENTRY, DEBUG_LEAVE, event_destroy(), MCL_DEBUG, MCL_ERROR_RETURN, MCL_FREE, MCL_NEW, MCL_NULL, MCL_OK, MCL_OUT_OF_MEMORY, random_generate_guid(), and string_initialize_new().

Referenced by mcl_store_new_event().

Here is the call graph for this function:

Here is the caller graph for this function: