text stringlengths 0 357 |
|---|
* @memberof dc_array_t |
* @param array The array object. |
* @param index Index of the item. Must be between 0 and dc_array_get_cnt()-1. |
* @return Latitude of the item at the given index. |
* 0.0 if there is no latitude bound to the given item, |
*/ |
double dc_array_get_latitude(const dc_array_t* array, size_t index) |
{ |
if (array==NULL || array->magic!=DC_ARRAY_MAGIC || index>=array->count |
|| array->type!=DC_ARRAY_LOCATIONS || array->array[index]==0 ) { |
return 0; |
} |
return ((struct _dc_location*)array->array[index])->latitude; |
} |
/** |
* Return the longitude of the item at the given index. |
* |
* @memberof dc_array_t |
* @param array The array object. |
* @param index Index of the item. Must be between 0 and dc_array_get_cnt()-1. |
* @return Latitude of the item at the given index. |
* 0.0 if there is no longitude bound to the given item, |
*/ |
double dc_array_get_longitude(const dc_array_t* array, size_t index) |
{ |
if (array==NULL || array->magic!=DC_ARRAY_MAGIC || index>=array->count |
|| array->type!=DC_ARRAY_LOCATIONS || array->array[index]==0 ) { |
return 0; |
} |
return ((struct _dc_location*)array->array[index])->longitude; |
} |
/** |
* Return the accuracy of the item at the given index. |
* See dc_set_location() for more information about the accuracy. |
* |
* @memberof dc_array_t |
* @param array The array object. |
* @param index Index of the item. Must be between 0 and dc_array_get_cnt()-1. |
* @return Accuracy of the item at the given index. |
* 0.0 if there is no longitude bound to the given item, |
*/ |
double dc_array_get_accuracy(const dc_array_t* array, size_t index) |
{ |
if (array==NULL || array->magic!=DC_ARRAY_MAGIC || index>=array->count |
|| array->type!=DC_ARRAY_LOCATIONS || array->array[index]==0 ) { |
return 0; |
} |
return ((struct _dc_location*)array->array[index])->accuracy; |
} |
/** |
* Return the timestamp of the item at the given index. |
* |
* @memberof dc_array_t |
* @param array The array object. |
* @param index Index of the item. Must be between 0 and dc_array_get_cnt()-1. |
* @return Timestamp of the item at the given index. |
* 0 if there is no timestamp bound to the given item, |
*/ |
time_t dc_array_get_timestamp(const dc_array_t* array, size_t index) |
{ |
if (array==NULL || array->magic!=DC_ARRAY_MAGIC || index>=array->count |
|| array->type!=DC_ARRAY_LOCATIONS || array->array[index]==0 ) { |
return 0; |
} |
return ((struct _dc_location*)array->array[index])->timestamp; |
} |
/** |
* Return the message-id of the item at the given index. |
* |
* @memberof dc_array_t |
* @param array The array object. |
* @param index Index of the item. Must be between 0 and dc_array_get_cnt()-1. |
* @return Message-id of the item at the given index. |
* 0 if there is no message-id bound to the given item, |
*/ |
uint32_t dc_array_get_msg_id(const dc_array_t* array, size_t index) |
{ |
if (array==NULL || array->magic!=DC_ARRAY_MAGIC || index>=array->count |
|| array->type!=DC_ARRAY_LOCATIONS || array->array[index]==0 ) { |
return 0; |
} |
return ((struct _dc_location*)array->array[index])->msg_id; |
} |
/** |
* Return the chat-id of the item at the given index. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.