Delta Chat Core C-API
Public Member Functions | List of all members
mrarray_t Struct Reference

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

Detailed Description

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

Member Function Documentation

void mrarray_unref ( mrarray_t array)

Free an array object.

Parameters
arrayThe array object to free, created eg. by mrmailbox_get_chatlist(), mrmailbox_get_known_contacts() and so on.
Returns
None.
size_t mrarray_get_cnt ( mrarray_t array)

Find out the number of items in an array.

Parameters
arrayThe array object.
Returns
Returns the number of items in a mrarray_t object. 0 on errors or if the array is empty.
uint32_t mrarray_get_id ( mrarray_t array,
size_t  index 
)

Get the item at the given index as an ID.

Parameters
arrayThe array object.
indexIndex of the item to get. Must be between 0 and mrarray_get_cnt()-1.
Returns
Returns the item at the given index. Returns 0 on errors or if the array is empty.

The documentation for this struct was generated from the following files: