Defines | |
#define | microfeed_store_get(s, k, t) ((t*)microfeed_store_get_impl(s, k)) |
#define | microfeed_store_get_index(s, i, t) ((t*)microfeed_store_index_impl(s, i)) |
#define | microfeed_store_remove_key(s, k, t) ((t*)microfeed_store_remove_key_impl(s, k)) |
#define | microfeed_store_remove_index(s, i, t) ((t*)microfeed_store_remove_index_impl(s, i)) |
#define | microfeed_store_iterator_get(i, t) ((t*)microfeed_store_iterator_get_impl(i)) |
Typedefs | |
typedef struct _MicrofeedStore | MicrofeedStore |
Opaque data type representing sorted array that grows automatically when items are added. | |
typedef struct _MicrofeedStoreIterator | MicrofeedStoreIterator |
Opaque data type representing sorted array iterator that traverses over the elements of the array. | |
typedef int(* | MicrofeedStoreCompareKeysFunction )(const void *key1, const void *key2) |
typedef const void *(* | MicrofeedStoreGetKeyFunction )(const void *item) |
typedef void(* | MicrofeedStoreForeachFunction )(void *data, void *user_data) |
Functions | |
MicrofeedStore * | microfeed_store_new_sorted (MicrofeedStoreCompareKeysFunction compare_keys, MicrofeedStoreGetKeyFunction get_key) |
MicrofeedStore * | microfeed_store_new_unsorted (MicrofeedStoreCompareKeysFunction compare_keys, MicrofeedStoreGetKeyFunction get_key) |
void | microfeed_store_free (MicrofeedStore *store) |
void | microfeed_store_foreach (MicrofeedStore *store, MicrofeedStoreForeachFunction foreach, void *user_data) |
void * | microfeed_store_get_impl (MicrofeedStore *store, const void *key) |
void * | microfeed_store_index_impl (MicrofeedStore *store, unsigned int index) |
unsigned int | microfeed_store_get_size (MicrofeedStore *store) |
void | microfeed_store_insert (MicrofeedStore *store, void *data) |
void * | microfeed_store_replace (MicrofeedStore *store, void *data) |
int | microfeed_store_remove (MicrofeedStore *store, const void *data) |
void * | microfeed_store_remove_key_impl (MicrofeedStore *store, const void *key) |
void * | microfeed_store_remove_index_impl (MicrofeedStore *store, unsigned int index) |
MicrofeedStoreIterator * | microfeed_store_iterate (MicrofeedStore *store, const void *start_key) |
void | microfeed_store_iterator_free (MicrofeedStoreIterator *iterator) |
void * | microfeed_store_iterator_get_impl (MicrofeedStoreIterator *iterator) |
void | microfeed_store_iterator_next (MicrofeedStoreIterator *iterator) |
int | microfeed_store_compare_keys_direct (const void *key1, const void *key2) |
const void * | microfeed_store_get_key_direct (const void *data) |
A store can be either sorted or unsorted.
#define microfeed_store_get | ( | s, | |||
k, | |||||
t | ) | ((t*)microfeed_store_get_impl(s, k)) |
Definition at line 39 of file microfeedstore.h.
Referenced by microfeed_database_environment_get_database(), microfeed_feed_send_item_data(), microfeed_publisher_remove_subscriber(), microfeed_subscriber_create_publisher(), and microfeed_subscriber_subscribe_feed().
#define microfeed_store_get_index | ( | s, | |||
i, | |||||
t | ) | ((t*)microfeed_store_index_impl(s, i)) |
Definition at line 41 of file microfeedstore.h.
#define microfeed_store_iterator_get | ( | i, | |||
t | ) | ((t*)microfeed_store_iterator_get_impl(i)) |
Definition at line 55 of file microfeedstore.h.
Referenced by microfeed_publisher_remove_subscriber().
#define microfeed_store_remove_index | ( | s, | |||
i, | |||||
t | ) | ((t*)microfeed_store_remove_index_impl(s, i)) |
Definition at line 49 of file microfeedstore.h.
#define microfeed_store_remove_key | ( | s, | |||
k, | |||||
t | ) | ((t*)microfeed_store_remove_key_impl(s, k)) |
Definition at line 47 of file microfeedstore.h.
typedef struct _MicrofeedStore MicrofeedStore |
Opaque data type representing sorted array that grows automatically when items are added.
Definition at line 19 of file microfeedstore.h.
typedef int(* MicrofeedStoreCompareKeysFunction)(const void *key1, const void *key2) |
Definition at line 30 of file microfeedstore.h.
typedef void(* MicrofeedStoreForeachFunction)(void *data, void *user_data) |
Definition at line 32 of file microfeedstore.h.
typedef const void*(* MicrofeedStoreGetKeyFunction)(const void *item) |
Definition at line 31 of file microfeedstore.h.
typedef struct _MicrofeedStoreIterator MicrofeedStoreIterator |
Opaque data type representing sorted array iterator that traverses over the elements of the array.
Definition at line 24 of file microfeedstore.h.
int microfeed_store_compare_keys_direct | ( | const void * | key1, | |
const void * | key2 | |||
) |
Definition at line 228 of file microfeedstore.c.
Referenced by microfeed_feed_send_item_data(), and microfeed_thread_pool_new_with_exit_callback().
void microfeed_store_foreach | ( | MicrofeedStore * | store, | |
MicrofeedStoreForeachFunction | foreach, | |||
void * | user_data | |||
) |
Definition at line 63 of file microfeedstore.c.
References _MicrofeedStore::data, and _MicrofeedStore::size.
void microfeed_store_free | ( | MicrofeedStore * | store | ) |
Definition at line 50 of file microfeedstore.c.
References _MicrofeedStore::data, _MicrofeedStore::iterators, _MicrofeedStoreIterator::next, _MicrofeedStore::reserved, _MicrofeedStore::size, and _MicrofeedStoreIterator::store.
void* microfeed_store_get_impl | ( | MicrofeedStore * | store, | |
const void * | key | |||
) |
const void* microfeed_store_get_key_direct | ( | const void * | data | ) |
Definition at line 233 of file microfeedstore.c.
Referenced by microfeed_feed_send_item_data(), and microfeed_thread_pool_new_with_exit_callback().
unsigned int microfeed_store_get_size | ( | MicrofeedStore * | store | ) |
Definition at line 92 of file microfeedstore.c.
References _MicrofeedStore::size.
Referenced by microfeed_publisher_remove_subscriber(), and microfeed_thread_pool_get_waiting_thread_count().
void* microfeed_store_index_impl | ( | MicrofeedStore * | store, | |
unsigned int | index | |||
) |
void microfeed_store_insert | ( | MicrofeedStore * | store, | |
void * | data | |||
) |
Definition at line 96 of file microfeedstore.c.
References _MicrofeedStore::data, DELTA, _MicrofeedStore::get_key, _MicrofeedStore::reserved, and _MicrofeedStore::size.
Referenced by microfeed_database_environment_get_database(), microfeed_feed_send_item_data(), microfeed_provider_add_publisher(), microfeed_publisher_new(), microfeed_subscriber_create_publisher(), microfeed_subscriber_subscribe_feed(), and microfeed_thread_pool_queue_thread_with_exit_callback().
MicrofeedStoreIterator* microfeed_store_iterate | ( | MicrofeedStore * | store, | |
const void * | start_key | |||
) |
Definition at line 201 of file microfeedstore.c.
References _MicrofeedStoreIterator::index, _MicrofeedStore::iterators, microfeed_memory_allocate, _MicrofeedStoreIterator::next, _MicrofeedStoreIterator::previous, _MicrofeedStore::size, and _MicrofeedStoreIterator::store.
Referenced by microfeed_publisher_remove_subscriber().
void microfeed_store_iterator_free | ( | MicrofeedStoreIterator * | iterator | ) |
Definition at line 239 of file microfeedstore.c.
References _MicrofeedStore::iterators, microfeed_memory_free(), _MicrofeedStoreIterator::next, _MicrofeedStoreIterator::previous, and _MicrofeedStoreIterator::store.
void* microfeed_store_iterator_get_impl | ( | MicrofeedStoreIterator * | iterator | ) |
Definition at line 253 of file microfeedstore.c.
References _MicrofeedStore::data, _MicrofeedStoreIterator::index, _MicrofeedStore::size, and _MicrofeedStoreIterator::store.
void microfeed_store_iterator_next | ( | MicrofeedStoreIterator * | iterator | ) |
Definition at line 263 of file microfeedstore.c.
References _MicrofeedStoreIterator::index, _MicrofeedStore::size, and _MicrofeedStoreIterator::store.
Referenced by microfeed_publisher_remove_subscriber().
MicrofeedStore* microfeed_store_new_sorted | ( | MicrofeedStoreCompareKeysFunction | compare_keys, | |
MicrofeedStoreGetKeyFunction | get_key | |||
) |
Definition at line 31 of file microfeedstore.c.
References _MicrofeedStore::compare_keys, _MicrofeedStore::get_key, and microfeed_memory_allocate.
Referenced by microfeed_database_environment_new(), microfeed_feed_new(), microfeed_feed_send_item_data(), microfeed_provider_new(), microfeed_publisher_new(), microfeed_store_new_unsorted(), and microfeed_subscriber_new().
MicrofeedStore* microfeed_store_new_unsorted | ( | MicrofeedStoreCompareKeysFunction | compare_keys, | |
MicrofeedStoreGetKeyFunction | get_key | |||
) |
Definition at line 41 of file microfeedstore.c.
References microfeed_store_new_sorted(), and _MicrofeedStore::unsorted.
Referenced by microfeed_thread_pool_new_with_exit_callback().
int microfeed_store_remove | ( | MicrofeedStore * | store, | |
const void * | data | |||
) |
Definition at line 138 of file microfeedstore.c.
References _MicrofeedStore::data, DELTA, _MicrofeedStore::get_key, _MicrofeedStore::reserved, and _MicrofeedStore::size.
Referenced by microfeed_database_free(), microfeed_provider_remove_publisher(), microfeed_publisher_remove_subscriber(), and microfeed_subscriber_unsubscribe_feed().
void* microfeed_store_remove_index_impl | ( | MicrofeedStore * | store, | |
unsigned int | index | |||
) |
Definition at line 181 of file microfeedstore.c.
References _MicrofeedStore::data, DELTA, _MicrofeedStore::reserved, and _MicrofeedStore::size.
void* microfeed_store_remove_key_impl | ( | MicrofeedStore * | store, | |
const void * | key | |||
) |
Definition at line 160 of file microfeedstore.c.
References _MicrofeedStore::data, DELTA, _MicrofeedStore::reserved, and _MicrofeedStore::size.
void* microfeed_store_replace | ( | MicrofeedStore * | store, | |
void * | data | |||
) |
Definition at line 114 of file microfeedstore.c.
References _MicrofeedStore::data, DELTA, _MicrofeedStore::get_key, _MicrofeedStore::reserved, and _MicrofeedStore::size.