Delta Chat Core C Interface
Loading...
Searching...
No Matches
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.
 
int dc_lot_get_state (const dc_lot_t *lot)
 Get the associated state.
 
char * dc_lot_get_text1 (const dc_lot_t *lot)
 Get first string.
 
int dc_lot_get_text1_meaning (const dc_lot_t *lot)
 Get the meaning of the first string.
 
char * dc_lot_get_text2 (const dc_lot_t *lot)
 Get second string.
 
int64_t dc_lot_get_timestamp (const dc_lot_t *lot)
 Get the associated timestamp.
 
void dc_lot_unref (dc_lot_t *lot)
 Frees an object containing a set of parameters.
 

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 e.g. by dc_chatlist_get_summary() or dc_msg_get_summary().

NB: Lot is used in the meaning heap here.

Member Function Documentation

◆ dc_lot_get_id()

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.

◆ dc_lot_get_state()

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.

◆ dc_lot_get_text1()

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 released using dc_str_unref(). NULL if there is no such string.

◆ dc_lot_get_text1_meaning()

int dc_lot_get_text1_meaning ( const dc_lot_t * lot)

Get the meaning of the first string.

Possible meanings of the string are defined by the creator of the object and may be returned e.g. 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.

◆ dc_lot_get_text2()

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 released using dc_str_unref(). NULL if there is no such string.

◆ dc_lot_get_timestamp()

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

◆ dc_lot_unref()

void dc_lot_unref ( dc_lot_t * lot)

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 e.g. by dc_chatlist_get_summary() or dc_msg_get_summary().

Parameters
lotThe object to free. If NULL is given, nothing is done.

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