Delta Chat Core C-API
 All Classes Functions Typedefs Groups Pages
Public Member Functions | List of all members
dc_lot_t Class Reference

An object containing a set of values. More...

#include <deltachat.h>

Public Member Functions

uint32_t dc_lot_get_id (const dc_lot_t *lot)
 Get the associated ID. More...
 
int dc_lot_get_state (const dc_lot_t *lot)
 Get the associated state. More...
 
char * dc_lot_get_text1 (const dc_lot_t *lot)
 Get first string. More...
 
int dc_lot_get_text1_meaning (const dc_lot_t *lot)
 Get the meaning of the first string. More...
 
char * dc_lot_get_text2 (const dc_lot_t *lot)
 Get second string. More...
 
time_t dc_lot_get_timestamp (const dc_lot_t *lot)
 Get the associated timestamp. More...
 
void dc_lot_unref (dc_lot_t *set)
 Frees an object containing a set of parameters. More...
 

Detailed Description

An object containing a set of values.

The meaning of the values is defined by the function returning the object. Lot objects are created eg. by dc_chatlist_get_summary() or dc_msg_get_summary().

NB: Lot is used in the meaning heap here.

Member Function Documentation

uint32_t dc_lot_get_id ( const dc_lot_t lot)

Get the associated ID.

The meaning of the ID is defined by the creator of the object.

Parameters
lotThe lot object.
Returns
The state as defined by the creator of the object. 0 if there is not state or on errors.
int dc_lot_get_state ( const dc_lot_t lot)

Get the associated state.

The meaning of the state is defined by the creator of the object.

Parameters
lotThe lot object.
Returns
The state as defined by the creator of the object. 0 if there is not state or on errors.
char * dc_lot_get_text1 ( const dc_lot_t lot)

Get first string.

The meaning of the string is defined by the creator of the object and may be roughly described by dc_lot_get_text1_meaning().

Parameters
lotThe lot object.
Returns
A string, the string may be empty and the returned value must be free()'d. NULL if there is no such string.
int dc_lot_get_text1_meaning ( const dc_lot_t lot)

Get the meaning of the first string.

Posssible meanings of the string are defined by the creator of the object and may be returned eg. as DC_TEXT1_DRAFT, DC_TEXT1_USERNAME or DC_TEXT1_SELF.

Parameters
lotThe lot object.
Returns
Returns the meaning of the first string, possible meanings are defined by the creator of the object. 0 if there is no concrete meaning or on errors.
char * dc_lot_get_text2 ( const dc_lot_t lot)

Get second string.

The meaning of the string is defined by the creator of the object.

Parameters
lotThe lot object.
Returns
A string, the string may be empty and the returned value must be free()'d . NULL if there is no such string.
time_t dc_lot_get_timestamp ( const dc_lot_t lot)

Get the associated timestamp.

The timestamp is returned as a unix timestamp in seconds. The meaning of the timestamp is defined by the creator of the object.

Parameters
lotThe lot object.
Returns
The timestamp as defined by the creator of the object. 0 if there is not timestamp or on errors.
void dc_lot_unref ( dc_lot_t set)

Frees an object containing a set of parameters.

If the set object contains strings, the strings are also freed with this function. Set objects are created eg. by dc_chatlist_get_summary() or dc_msg_get_summary().

Parameters
setThe object to free. If NULL is given, nothing is done.
Returns
None.

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