An object containing a simple array.
More...
#include <deltachat.h>
|
double | dc_array_get_accuracy (const dc_array_t *array, size_t index) |
| Return the accuracy of the item at the given index.
|
|
uint32_t | dc_array_get_chat_id (const dc_array_t *array, size_t index) |
| Return the chat ID of the item at the given index.
|
|
size_t | dc_array_get_cnt (const dc_array_t *array) |
| Find out the number of items in an array.
|
|
uint32_t | dc_array_get_contact_id (const dc_array_t *array, size_t index) |
| Return the contact ID of the item at the given index.
|
|
uint32_t | dc_array_get_id (const dc_array_t *array, size_t index) |
| Get the item at the given index as an ID.
|
|
double | dc_array_get_latitude (const dc_array_t *array, size_t index) |
| Return the latitude of the item at the given index.
|
|
double | dc_array_get_longitude (const dc_array_t *array, size_t index) |
| Return the longitude of the item at the given index.
|
|
char * | dc_array_get_marker (const dc_array_t *array, size_t index) |
| Return the marker-character of the item at the given index.
|
|
uint32_t | dc_array_get_msg_id (const dc_array_t *array, size_t index) |
| Return the message ID of the item at the given index.
|
|
int64_t | dc_array_get_timestamp (const dc_array_t *array, size_t index) |
| Return the timestamp of the item at the given index.
|
|
int | dc_array_is_independent (const dc_array_t *array, size_t index) |
| Return the independent-state of the location at the given index.
|
|
void | dc_array_unref (dc_array_t *array) |
| Free an array object.
|
|
An object containing a simple array.
This object is used in several places where functions need to return an array. The items of the array are typically IDs. To free an array object, use dc_array_unref().
◆ dc_array_get_accuracy()
double dc_array_get_accuracy |
( |
const dc_array_t * | array, |
|
|
size_t | index ) |
Return the accuracy of the item at the given index.
See dc_set_location() for more information about the accuracy.
- Parameters
-
array | The array object. |
index | The index of the item. Must be between 0 and dc_array_get_cnt()-1. |
- Returns
- Accuracy of the item at the given index. 0.0 if there is no longitude bound to the given item,
◆ dc_array_get_chat_id()
uint32_t dc_array_get_chat_id |
( |
const dc_array_t * | array, |
|
|
size_t | index ) |
Return the chat ID of the item at the given index.
- Parameters
-
array | The array object. |
index | The index of the item. Must be between 0 and dc_array_get_cnt()-1. |
- Returns
- The chat ID of the item at the given index. 0 if there is no chat ID bound to the given item,
◆ dc_array_get_cnt()
size_t dc_array_get_cnt |
( |
const dc_array_t * | array | ) |
|
Find out the number of items in an array.
- Parameters
-
- Returns
- Returns the number of items in a dc_array_t object. 0 on errors or if the array is empty.
◆ dc_array_get_contact_id()
uint32_t dc_array_get_contact_id |
( |
const dc_array_t * | array, |
|
|
size_t | index ) |
Return the contact ID of the item at the given index.
- Parameters
-
array | The array object. |
index | The index of the item. Must be between 0 and dc_array_get_cnt()-1. |
- Returns
- The contact ID of the item at the given index. 0 if there is no contact ID bound to the given item,
◆ dc_array_get_id()
uint32_t dc_array_get_id |
( |
const dc_array_t * | array, |
|
|
size_t | index ) |
Get the item at the given index as an ID.
- Parameters
-
array | The array object. |
index | The index of the item to get. Must be between 0 and dc_array_get_cnt()-1. |
- Returns
- Returns the item at the given index. Returns 0 on errors or if the array is empty.
◆ dc_array_get_latitude()
double dc_array_get_latitude |
( |
const dc_array_t * | array, |
|
|
size_t | index ) |
Return the latitude of the item at the given index.
- Parameters
-
array | The array object. |
index | The index of the item. Must be between 0 and dc_array_get_cnt()-1. |
- Returns
- Latitude of the item at the given index. 0.0 if there is no latitude bound to the given item,
◆ dc_array_get_longitude()
double dc_array_get_longitude |
( |
const dc_array_t * | array, |
|
|
size_t | index ) |
Return the longitude of the item at the given index.
- Parameters
-
array | The array object. |
index | The index of the item. Must be between 0 and dc_array_get_cnt()-1. |
- Returns
- Latitude of the item at the given index. 0.0 if there is no longitude bound to the given item,
◆ dc_array_get_marker()
char * dc_array_get_marker |
( |
const dc_array_t * | array, |
|
|
size_t | index ) |
Return the marker-character of the item at the given index.
Marker-character are typically bound to locations returned by dc_get_locations() and are typically created by on-character-messages which can also be an emoticon. :)
- Parameters
-
array | The array object. |
index | The index of the item. Must be between 0 and dc_array_get_cnt()-1. |
- Returns
- Marker-character of the item at the given index. NULL if there is no marker-character bound to the given item. The returned value must be released using dc_str_unref() after usage.
◆ dc_array_get_msg_id()
uint32_t dc_array_get_msg_id |
( |
const dc_array_t * | array, |
|
|
size_t | index ) |
Return the message ID of the item at the given index.
- Parameters
-
array | The array object. |
index | The index of the item. Must be between 0 and dc_array_get_cnt()-1. |
- Returns
- The message ID of the item at the given index. 0 if there is no message ID bound to the given item.
◆ dc_array_get_timestamp()
int64_t dc_array_get_timestamp |
( |
const dc_array_t * | array, |
|
|
size_t | index ) |
Return the timestamp of the item at the given index.
- Parameters
-
array | The array object. |
index | The index of the item. Must be between 0 and dc_array_get_cnt()-1. |
- Returns
- Timestamp of the item at the given index. 0 if there is no timestamp bound to the given item,
◆ dc_array_is_independent()
int dc_array_is_independent |
( |
const dc_array_t * | array, |
|
|
size_t | index ) |
Return the independent-state of the location at the given index.
Independent locations do not belong to the track of the user.
- Parameters
-
array | The array object. |
index | The index of the item. Must be between 0 and dc_array_get_cnt()-1. |
- Returns
- 0=Location belongs to the track of the user, 1=Location was reported independently.
◆ dc_array_unref()
Free an array object.
Does not free any data items.
- Parameters
-
array | The array object to free, created e.g. by dc_get_chatlist(), dc_get_contacts() and so on. If NULL is given, nothing is done. |
The documentation for this class was generated from the following file: