store.c File Reference

This file implements MCL Store Interface. More...

Include dependency graph for store.c:

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)
 

Detailed Description

This file implements MCL Store Interface.

Definition in file store.c.

Function Documentation

static mcl_error_t _item_destroy ( void **  item)
static
mcl_error_t mcl_store_add ( mcl_store_t store,
void *  item 
)

This function adds a new item to store.

Parameters
[in]storeMCL store which will contain any type of item created.
[in]itemItem to be added to store.
Returns

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.

Here is the call graph for this function:

void mcl_store_destroy ( mcl_store_t **  store)

This function destroys the mcl_store_t object and frees any memory allocated.

Parameters
[in]storePreinitialized mcl_store_t object to destroy.
Returns

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().

Here is the call graph for this function:

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.

Parameters
[out]storeThe newly initialized store.
Returns

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.

Here is the call graph for this function:

void store_item_destroy ( store_item_t **  store_item)

This function is called to destroy store item.

Parameters
[in]store_itemStore 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().

Here is the call graph for this function:

Here is the caller graph for this function: