Delta Chat Core C-API
|
An object containing a simple array. More...
#include <mrarray.h>
Public Member Functions | |
void | mrarray_unref (mrarray_t *array) |
Free an array object. More... | |
size_t | mrarray_get_cnt (mrarray_t *array) |
Find out the number of items in an array. More... | |
uint32_t | mrarray_get_id (mrarray_t *array, size_t index) |
Get the item at the given index as an ID. More... | |
An object containing a simple array.
This object is used in several placed where functions need to return an array. The items of the array are typically IDs. To free an array object, use mrarray_unref().
void mrarray_unref | ( | mrarray_t * | array | ) |
Free an array object.
array | The array object to free, created eg. by mrmailbox_get_chatlist(), mrmailbox_get_known_contacts() and so on. |
size_t mrarray_get_cnt | ( | mrarray_t * | array | ) |
Find out the number of items in an array.
array | The array object. |
uint32_t mrarray_get_id | ( | mrarray_t * | array, |
size_t | index | ||
) |
Get the item at the given index as an ID.
array | The array object. |
index | Index of the item to get. Must be between 0 and mrarray_get_cnt()-1. |