This file implements MCL Store Interface. More...
#include "mcl_connectivity/mcl_store.h"
#include "store.h"
#include "mcl_core/mcl_memory.h"
#include "mcl_core/mcl_list.h"
#include "mcl_connectivity/mcl_event.h"
#include "mcl_connectivity/mcl_timeseries.h"
#include "mcl_connectivity/mcl_file.h"
#include "mcl_connectivity/mcl_custom_data.h"
#include "mcl_connectivity/mcl_data_source_configuration.h"
#include "event.h"
#include "timeseries.h"
#include "file.h"
#include "custom_data.h"
#include "data_source_configuration.h"
Go to the source code of this file.
Functions | |
static mcl_error_t | _store_add_data (mcl_store_t *store, void *item) |
static mcl_error_t | _item_destroy (void **item) |
mcl_error_t | mcl_store_initialize (mcl_store_t **store) |
mcl_error_t | mcl_store_add (mcl_store_t *store, void *item) |
void | mcl_store_destroy (mcl_store_t **store) |
void | store_item_destroy (store_item_t **store_item) |
This file implements MCL Store Interface.
Definition in file store.c.
|
static |
Definition at line 152 of file store.c.
References mcl_custom_data_destroy(), mcl_data_source_configuration_destroy(), MCL_DEBUG_ENTRY, MCL_DEBUG_LEAVE, mcl_event_destroy(), mcl_file_destroy(), MCL_ITEM_TYPE_CUSTOM_DATA, MCL_ITEM_TYPE_DATA_SOURCE_CONFIGURATION, MCL_ITEM_TYPE_EVENT, MCL_ITEM_TYPE_FILE, MCL_ITEM_TYPE_TIMESERIES, MCL_OK, and mcl_timeseries_destroy().
Referenced by store_item_destroy().
|
static |
Definition at line 99 of file store.c.
References custom_data_validate(), data_source_configuration_validate(), event_validate(), file_validate(), store_item_t::id, store_item_t::item, MCL_ASSERT_CODE_MESSAGE, MCL_ASSERT_STATEMENT_CODE_MESSAGE, MCL_DEBUG_ENTRY, MCL_DEBUG_LEAVE, MCL_FREE, MCL_INVALID_PARAMETER, MCL_ITEM_TYPE_CUSTOM_DATA, MCL_ITEM_TYPE_DATA_SOURCE_CONFIGURATION, MCL_ITEM_TYPE_EVENT, MCL_ITEM_TYPE_FILE, MCL_ITEM_TYPE_TIMESERIES, mcl_list_add(), MCL_NEW, MCL_NULL, MCL_OK, MCL_OUT_OF_MEMORY, store_item_t::status, STORE_ITEM_STATUS_READY, and timeseries_validate().
Referenced by mcl_store_add().
mcl_error_t mcl_store_add | ( | mcl_store_t * | store, |
void * | item | ||
) |
This function adds a new item to store.
[in] | store | MCL store which will contain any type of item created. |
[in] | item | Item to be added to store. |
Definition at line 58 of file store.c.
References _store_add_data(), MCL_ASSERT_NOT_NULL, MCL_DEBUG_ENTRY, MCL_DEBUG_LEAVE, MCL_FUNCTION_LEAVE_LABEL, MCL_INVALID_PARAMETER, and MCL_ITEM_PREAMBLE.
void mcl_store_destroy | ( | mcl_store_t ** | store | ) |
This function destroys the mcl_store_t object and frees any memory allocated.
[in] | store | Preinitialized mcl_store_t object to destroy. |
store
is NULL. Definition at line 81 of file store.c.
References MCL_DEBUG, MCL_DEBUG_ENTRY, MCL_DEBUG_LEAVE, MCL_FREE, mcl_list_destroy_with_content(), MCL_NULL, and store_item_destroy().
mcl_error_t mcl_store_initialize | ( | mcl_store_t ** | store | ) |
This function creates and initializes an object of type mcl_store_t.
Store is used to hold different types of data. These data will be processed later by connectivity module. to perform exchange operation.
[out] | store | The newly initialized store. |
store
is NULL. Definition at line 30 of file store.c.
References MCL_ASSERT_CODE_MESSAGE, MCL_ASSERT_NOT_NULL, MCL_ASSERT_STATEMENT_CODE_MESSAGE, MCL_DEBUG, MCL_DEBUG_ENTRY, MCL_DEBUG_LEAVE, MCL_FREE, MCL_FUNCTION_LEAVE_LABEL, MCL_ITEM_PREAMBLE, MCL_ITEM_TYPE_STORE, mcl_list_initialize(), MCL_NEW, MCL_NULL, MCL_OK, and MCL_OUT_OF_MEMORY.
void store_item_destroy | ( | store_item_t ** | store_item | ) |
This function is called to destroy store item.
[in] | store_item | Store item to be destroyed. |
Definition at line 186 of file store.c.
References _item_destroy(), MCL_DEBUG_ENTRY, MCL_DEBUG_LEAVE, and MCL_FREE.
Referenced by _remove_uploaded_store_items(), and mcl_store_destroy().