store.h File Reference

Store module header file. More...

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

Go to the source code of this file.

Data Structures

struct  store_data_stream_info_t
 
struct  store_data_t
 
struct  store_t
 

Enumerations

enum  E_STORE_DATA_TYPE {
  STORE_DATA_TIME_SERIES, STORE_DATA_EVENT_LIST, STORE_DATA_FILE, STORE_DATA_CUSTOM,
  STORE_DATA_STREAM, STORE_DATA_DATA_SOURCE_CONFIGURATION
}
 
enum  E_STORE_DATA_STATE {
  DATA_STATE_INITIAL, DATA_STATE_PREPARED, DATA_STATE_WRITTEN, DATA_STATE_STREAMING,
  DATA_STATE_SENT
}
 

Functions

void store_data_set_state (store_data_t *store_data, E_STORE_DATA_STATE state)
 
E_STORE_DATA_STATE store_data_get_state (store_data_t *store_data)
 
E_MCL_ERROR_CODE store_data_remove (list_t *store_list, list_node_t *store_data_node)
 
mcl_size_t store_get_data_count (store_t *store)
 

Detailed Description

Store module header file.


Date
Sep 26, 2016

Definition in file store.h.

Enumeration Type Documentation

Store data states.

Enumerator
DATA_STATE_INITIAL 

Initial state of a store data. Means this data is not processed before.

DATA_STATE_PREPARED 

Prepared. Means its meta and payload strings has been prepared.

DATA_STATE_WRITTEN 

Current data has been written to the current http request as a whole.

DATA_STATE_STREAMING 

Streaming is active. Current data has been partially written to the current http request or about to be written.

DATA_STATE_SENT 

This data has been successfully sent to the server. Can be deleted from the store.

Definition at line 34 of file store.h.

Data type of a data in the store.

Enumerator
STORE_DATA_TIME_SERIES 

Type of the data in the store is time series.

STORE_DATA_EVENT_LIST 

Type of the data in the store is event list.

STORE_DATA_FILE 

Type of the data in the store is file.

STORE_DATA_CUSTOM 

Type of the data in the store is custom data.

STORE_DATA_STREAM 

Type of the data in the store is stream.

STORE_DATA_DATA_SOURCE_CONFIGURATION 

Type of the data in the store is data source configuration.

Definition at line 21 of file store.h.

Function Documentation

E_STORE_DATA_STATE store_data_get_state ( store_data_t store_data)

This function is used to get the state of the data.

Parameters
[in]store_dataCurrent store data.
Returns
Returns the state of the data.

Definition at line 345 of file store.c.

References DEBUG_ENTRY, DEBUG_LEAVE, MCL_DEBUG, and store_data_t::state.

Referenced by _exchange_clear_sent_data_from_store(), _exchange_fill_http_request(), and _exchange_update_store_data_state().

Here is the caller graph for this function:

E_MCL_ERROR_CODE store_data_remove ( list_t store_list,
list_node_t store_data_node 
)

This function is used to remove a store data from the store.

Needs to know in which list ( high_priority_list or low_priority_list ) this data resides.

Parameters
[in]store_listThe list in the store holding the data.
[in]store_data_nodeList node of the data requested to be removed.
Returns

Definition at line 355 of file store.c.

References _store_list_destroy_callback(), DEBUG_ENTRY, DEBUG_LEAVE, and list_remove_with_content().

Referenced by _exchange_clear_sent_data_from_store().

Here is the call graph for this function:

Here is the caller graph for this function:

void store_data_set_state ( store_data_t store_data,
E_STORE_DATA_STATE  state 
)

This function is used to set the state of the store data.

Parameters
[in]store_dataCurrent store data.
[in]stateNew state of the data.

Definition at line 334 of file store.c.

References DEBUG_ENTRY, DEBUG_LEAVE, MCL_DEBUG, and store_data_t::state.

Referenced by _exchange_add_current_data_to_request(), _exchange_add_current_data_to_request_by_streaming(), _exchange_fill_http_request(), _exchange_prepare_data(), and _exchange_update_store_data_state().

Here is the caller graph for this function:

mcl_size_t store_get_data_count ( store_t store)

This function is used to get the count of items in store.

Parameters
[in]storeThe store handle.
Returns
Returns the number of store data items.

Definition at line 366 of file store.c.

References mcl_list_t::count, DEBUG_ENTRY, DEBUG_LEAVE, store_t::high_priority_list, and store_t::low_priority_list.

Referenced by http_processor_exchange(), and http_processor_stream().

Here is the caller graph for this function: