|
|
|
|
@@ -0,0 +1,600 @@
|
|
|
|
|
#ifndef __DELTACHAT_H__
|
|
|
|
|
#define __DELTACHAT_H__
|
|
|
|
|
|
|
|
|
|
/* Generated with cbindgen:0.21.0 */
|
|
|
|
|
|
|
|
|
|
/* WARNING: this file is autogenerated by cbindgen. Do not modify manually. */
|
|
|
|
|
|
|
|
|
|
#ifndef PY_CFFI
|
|
|
|
|
#include <stdint.h>
|
|
|
|
|
#include <time.h>
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define DC_CONNECTIVITY_CONNECTING 2000
|
|
|
|
|
|
|
|
|
|
#define DC_CONNECTIVITY_WORKING 3000
|
|
|
|
|
|
|
|
|
|
#define DC_CONNECTIVITY_CONNECTED 4000
|
|
|
|
|
|
|
|
|
|
typedef struct dc_provider_t dc_provider_t;
|
|
|
|
|
|
|
|
|
|
typedef struct dc_accounts_event_emitter_t dc_accounts_event_emitter_t;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Struct representing a list of deltachat accounts.
|
|
|
|
|
*/
|
|
|
|
|
typedef struct dc_accounts_t dc_accounts_t;
|
|
|
|
|
|
|
|
|
|
typedef struct dc_array_t dc_array_t;
|
|
|
|
|
|
|
|
|
|
typedef struct dc_chat_t dc_chat_t;
|
|
|
|
|
|
|
|
|
|
typedef struct dc_chatlist_t dc_chatlist_t;
|
|
|
|
|
|
|
|
|
|
typedef struct dc_contact_t dc_contact_t;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Struct representing the deltachat context.
|
|
|
|
|
*/
|
|
|
|
|
typedef struct dc_context_t dc_context_t;
|
|
|
|
|
|
|
|
|
|
typedef struct dc_event_emitter_t dc_event_emitter_t;
|
|
|
|
|
|
|
|
|
|
typedef struct dc_event_t dc_event_t;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 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 chatlist.get_summary() or dc_msg_get_summary().
|
|
|
|
|
*
|
|
|
|
|
* *Lot* is used in the meaning *heap* here.
|
|
|
|
|
*/
|
|
|
|
|
typedef struct dc_lot_t dc_lot_t;
|
|
|
|
|
|
|
|
|
|
typedef struct dc_msg_t dc_msg_t;
|
|
|
|
|
|
|
|
|
|
typedef struct dc_provider_t dc_provider_t;
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
extern "C" {
|
|
|
|
|
#endif // __cplusplus
|
|
|
|
|
|
|
|
|
|
struct dc_context_t *dc_context_new(const char *_os_name, const char *dbfile, const char *blobdir);
|
|
|
|
|
|
|
|
|
|
struct dc_context_t *dc_context_new_closed(const char *dbfile);
|
|
|
|
|
|
|
|
|
|
int dc_context_open(struct dc_context_t *context, const char *passphrase);
|
|
|
|
|
|
|
|
|
|
int dc_context_is_open(struct dc_context_t *context);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Release the context structure.
|
|
|
|
|
*
|
|
|
|
|
* This function releases the memory of the `dc_context_t` structure.
|
|
|
|
|
*/
|
|
|
|
|
void dc_context_unref(struct dc_context_t *context);
|
|
|
|
|
|
|
|
|
|
char *dc_get_blobdir(struct dc_context_t *context);
|
|
|
|
|
|
|
|
|
|
int dc_set_config(struct dc_context_t *context, const char *key, const char *value);
|
|
|
|
|
|
|
|
|
|
char *dc_get_config(struct dc_context_t *context, const char *key);
|
|
|
|
|
|
|
|
|
|
int dc_set_stock_translation(struct dc_context_t *context, uint32_t stock_id, char *stock_msg);
|
|
|
|
|
|
|
|
|
|
int dc_set_config_from_qr(struct dc_context_t *context, char *qr);
|
|
|
|
|
|
|
|
|
|
char *dc_get_info(const struct dc_context_t *context);
|
|
|
|
|
|
|
|
|
|
int dc_get_connectivity(const struct dc_context_t *context);
|
|
|
|
|
|
|
|
|
|
char *dc_get_connectivity_html(const struct dc_context_t *context);
|
|
|
|
|
|
|
|
|
|
int dc_all_work_done(struct dc_context_t *context);
|
|
|
|
|
|
|
|
|
|
char *dc_get_oauth2_url(struct dc_context_t *context, const char *addr, const char *redirect);
|
|
|
|
|
|
|
|
|
|
void dc_configure(struct dc_context_t *context);
|
|
|
|
|
|
|
|
|
|
int dc_is_configured(struct dc_context_t *context);
|
|
|
|
|
|
|
|
|
|
void dc_start_io(struct dc_context_t *context);
|
|
|
|
|
|
|
|
|
|
int dc_get_id(struct dc_context_t *context);
|
|
|
|
|
|
|
|
|
|
void dc_event_unref(struct dc_event_t *a);
|
|
|
|
|
|
|
|
|
|
int dc_event_get_id(struct dc_event_t *event);
|
|
|
|
|
|
|
|
|
|
int dc_event_get_data1_int(struct dc_event_t *event);
|
|
|
|
|
|
|
|
|
|
int dc_event_get_data2_int(struct dc_event_t *event);
|
|
|
|
|
|
|
|
|
|
char *dc_event_get_data2_str(struct dc_event_t *event);
|
|
|
|
|
|
|
|
|
|
uint32_t dc_event_get_account_id(struct dc_event_t *event);
|
|
|
|
|
|
|
|
|
|
struct dc_event_emitter_t *dc_get_event_emitter(struct dc_context_t *context);
|
|
|
|
|
|
|
|
|
|
void dc_event_emitter_unref(struct dc_event_emitter_t *emitter);
|
|
|
|
|
|
|
|
|
|
struct dc_event_t *dc_get_next_event(struct dc_event_emitter_t *events);
|
|
|
|
|
|
|
|
|
|
void dc_stop_io(struct dc_context_t *context);
|
|
|
|
|
|
|
|
|
|
void dc_maybe_network(struct dc_context_t *context);
|
|
|
|
|
|
|
|
|
|
int32_t dc_preconfigure_keypair(struct dc_context_t *context,
|
|
|
|
|
const char *addr,
|
|
|
|
|
const char *public_data,
|
|
|
|
|
const char *secret_data);
|
|
|
|
|
|
|
|
|
|
struct dc_chatlist_t *dc_get_chatlist(struct dc_context_t *context,
|
|
|
|
|
int flags,
|
|
|
|
|
const char *query_str,
|
|
|
|
|
uint32_t query_id);
|
|
|
|
|
|
|
|
|
|
uint32_t dc_create_chat_by_contact_id(struct dc_context_t *context, uint32_t contact_id);
|
|
|
|
|
|
|
|
|
|
uint32_t dc_get_chat_id_by_contact_id(struct dc_context_t *context, uint32_t contact_id);
|
|
|
|
|
|
|
|
|
|
uint32_t dc_prepare_msg(struct dc_context_t *context, uint32_t chat_id, struct dc_msg_t *msg);
|
|
|
|
|
|
|
|
|
|
uint32_t dc_send_msg(struct dc_context_t *context, uint32_t chat_id, struct dc_msg_t *msg);
|
|
|
|
|
|
|
|
|
|
uint32_t dc_send_msg_sync(struct dc_context_t *context, uint32_t chat_id, struct dc_msg_t *msg);
|
|
|
|
|
|
|
|
|
|
uint32_t dc_send_text_msg(struct dc_context_t *context, uint32_t chat_id, const char *text_to_send);
|
|
|
|
|
|
|
|
|
|
uint32_t dc_send_videochat_invitation(struct dc_context_t *context, uint32_t chat_id);
|
|
|
|
|
|
|
|
|
|
int dc_send_webxdc_status_update(struct dc_context_t *context,
|
|
|
|
|
uint32_t msg_id,
|
|
|
|
|
const char *json,
|
|
|
|
|
const char *descr);
|
|
|
|
|
|
|
|
|
|
char *dc_get_webxdc_status_updates(struct dc_context_t *context,
|
|
|
|
|
uint32_t msg_id,
|
|
|
|
|
uint32_t last_known_serial);
|
|
|
|
|
|
|
|
|
|
void dc_set_draft(struct dc_context_t *context, uint32_t chat_id, struct dc_msg_t *msg);
|
|
|
|
|
|
|
|
|
|
uint32_t dc_add_device_msg(struct dc_context_t *context, const char *label, struct dc_msg_t *msg);
|
|
|
|
|
|
|
|
|
|
int dc_was_device_msg_ever_added(struct dc_context_t *context, const char *label);
|
|
|
|
|
|
|
|
|
|
struct dc_msg_t *dc_get_draft(struct dc_context_t *context, uint32_t chat_id);
|
|
|
|
|
|
|
|
|
|
dc_array_t *dc_get_chat_msgs(struct dc_context_t *context,
|
|
|
|
|
uint32_t chat_id,
|
|
|
|
|
uint32_t flags,
|
|
|
|
|
uint32_t marker1before);
|
|
|
|
|
|
|
|
|
|
int dc_get_msg_cnt(struct dc_context_t *context, uint32_t chat_id);
|
|
|
|
|
|
|
|
|
|
int dc_get_fresh_msg_cnt(struct dc_context_t *context, uint32_t chat_id);
|
|
|
|
|
|
|
|
|
|
int dc_estimate_deletion_cnt(struct dc_context_t *context, int from_server, int64_t seconds);
|
|
|
|
|
|
|
|
|
|
dc_array_t *dc_get_fresh_msgs(struct dc_context_t *context);
|
|
|
|
|
|
|
|
|
|
void dc_marknoticed_chat(struct dc_context_t *context, uint32_t chat_id);
|
|
|
|
|
|
|
|
|
|
dc_array_t *dc_get_chat_media(struct dc_context_t *context,
|
|
|
|
|
uint32_t chat_id,
|
|
|
|
|
int msg_type,
|
|
|
|
|
int or_msg_type2,
|
|
|
|
|
int or_msg_type3);
|
|
|
|
|
|
|
|
|
|
uint32_t dc_get_next_media(struct dc_context_t *context,
|
|
|
|
|
uint32_t msg_id,
|
|
|
|
|
int dir,
|
|
|
|
|
int msg_type,
|
|
|
|
|
int or_msg_type2,
|
|
|
|
|
int or_msg_type3);
|
|
|
|
|
|
|
|
|
|
int dc_set_chat_protection(struct dc_context_t *context, uint32_t chat_id, int protect);
|
|
|
|
|
|
|
|
|
|
void dc_set_chat_visibility(struct dc_context_t *context, uint32_t chat_id, int archive);
|
|
|
|
|
|
|
|
|
|
void dc_delete_chat(struct dc_context_t *context, uint32_t chat_id);
|
|
|
|
|
|
|
|
|
|
void dc_block_chat(struct dc_context_t *context, uint32_t chat_id);
|
|
|
|
|
|
|
|
|
|
void dc_accept_chat(struct dc_context_t *context, uint32_t chat_id);
|
|
|
|
|
|
|
|
|
|
dc_array_t *dc_get_chat_contacts(struct dc_context_t *context, uint32_t chat_id);
|
|
|
|
|
|
|
|
|
|
dc_array_t *dc_search_msgs(struct dc_context_t *context, uint32_t chat_id, const char *query);
|
|
|
|
|
|
|
|
|
|
struct dc_chat_t *dc_get_chat(struct dc_context_t *context, uint32_t chat_id);
|
|
|
|
|
|
|
|
|
|
uint32_t dc_create_group_chat(struct dc_context_t *context, int protect, const char *name);
|
|
|
|
|
|
|
|
|
|
uint32_t dc_create_broadcast_list(struct dc_context_t *context);
|
|
|
|
|
|
|
|
|
|
int dc_is_contact_in_chat(struct dc_context_t *context, uint32_t chat_id, uint32_t contact_id);
|
|
|
|
|
|
|
|
|
|
int dc_add_contact_to_chat(struct dc_context_t *context, uint32_t chat_id, uint32_t contact_id);
|
|
|
|
|
|
|
|
|
|
int dc_remove_contact_from_chat(struct dc_context_t *context,
|
|
|
|
|
uint32_t chat_id,
|
|
|
|
|
uint32_t contact_id);
|
|
|
|
|
|
|
|
|
|
int dc_set_chat_name(struct dc_context_t *context, uint32_t chat_id, const char *name);
|
|
|
|
|
|
|
|
|
|
int dc_set_chat_profile_image(struct dc_context_t *context, uint32_t chat_id, const char *image);
|
|
|
|
|
|
|
|
|
|
int dc_set_chat_mute_duration(struct dc_context_t *context, uint32_t chat_id, int64_t duration);
|
|
|
|
|
|
|
|
|
|
char *dc_get_chat_encrinfo(struct dc_context_t *context, uint32_t chat_id);
|
|
|
|
|
|
|
|
|
|
uint32_t dc_get_chat_ephemeral_timer(struct dc_context_t *context, uint32_t chat_id);
|
|
|
|
|
|
|
|
|
|
int dc_set_chat_ephemeral_timer(struct dc_context_t *context, uint32_t chat_id, uint32_t timer);
|
|
|
|
|
|
|
|
|
|
char *dc_get_msg_info(struct dc_context_t *context, uint32_t msg_id);
|
|
|
|
|
|
|
|
|
|
char *dc_get_msg_html(struct dc_context_t *context, uint32_t msg_id);
|
|
|
|
|
|
|
|
|
|
char *dc_get_mime_headers(struct dc_context_t *context, uint32_t msg_id);
|
|
|
|
|
|
|
|
|
|
void dc_delete_msgs(struct dc_context_t *context, const uint32_t *msg_ids, int msg_cnt);
|
|
|
|
|
|
|
|
|
|
void dc_forward_msgs(struct dc_context_t *context,
|
|
|
|
|
const uint32_t *msg_ids,
|
|
|
|
|
int msg_cnt,
|
|
|
|
|
uint32_t chat_id);
|
|
|
|
|
|
|
|
|
|
void dc_markseen_msgs(struct dc_context_t *context, const uint32_t *msg_ids, int msg_cnt);
|
|
|
|
|
|
|
|
|
|
struct dc_msg_t *dc_get_msg(struct dc_context_t *context, uint32_t msg_id);
|
|
|
|
|
|
|
|
|
|
void dc_download_full_msg(struct dc_context_t *context, uint32_t msg_id);
|
|
|
|
|
|
|
|
|
|
int dc_may_be_valid_addr(const char *addr);
|
|
|
|
|
|
|
|
|
|
uint32_t dc_lookup_contact_id_by_addr(struct dc_context_t *context, const char *addr);
|
|
|
|
|
|
|
|
|
|
uint32_t dc_create_contact(struct dc_context_t *context, const char *name, const char *addr);
|
|
|
|
|
|
|
|
|
|
int dc_add_address_book(struct dc_context_t *context, const char *addr_book);
|
|
|
|
|
|
|
|
|
|
dc_array_t *dc_get_contacts(struct dc_context_t *context, uint32_t flags, const char *query);
|
|
|
|
|
|
|
|
|
|
int dc_get_blocked_cnt(struct dc_context_t *context);
|
|
|
|
|
|
|
|
|
|
dc_array_t *dc_get_blocked_contacts(struct dc_context_t *context);
|
|
|
|
|
|
|
|
|
|
void dc_block_contact(struct dc_context_t *context, uint32_t contact_id, int block);
|
|
|
|
|
|
|
|
|
|
char *dc_get_contact_encrinfo(struct dc_context_t *context, uint32_t contact_id);
|
|
|
|
|
|
|
|
|
|
int dc_delete_contact(struct dc_context_t *context, uint32_t contact_id);
|
|
|
|
|
|
|
|
|
|
struct dc_contact_t *dc_get_contact(struct dc_context_t *context, uint32_t contact_id);
|
|
|
|
|
|
|
|
|
|
void dc_imex(struct dc_context_t *context, int what_raw, const char *param1, const char *param2);
|
|
|
|
|
|
|
|
|
|
char *dc_imex_has_backup(struct dc_context_t *context, const char *dir);
|
|
|
|
|
|
|
|
|
|
char *dc_initiate_key_transfer(struct dc_context_t *context);
|
|
|
|
|
|
|
|
|
|
int dc_continue_key_transfer(struct dc_context_t *context, uint32_t msg_id, const char *setup_code);
|
|
|
|
|
|
|
|
|
|
void dc_stop_ongoing_process(struct dc_context_t *context);
|
|
|
|
|
|
|
|
|
|
struct dc_lot_t *dc_check_qr(struct dc_context_t *context, const char *qr);
|
|
|
|
|
|
|
|
|
|
char *dc_get_securejoin_qr(struct dc_context_t *context, uint32_t chat_id);
|
|
|
|
|
|
|
|
|
|
char *dc_get_securejoin_qr_svg(struct dc_context_t *context, uint32_t chat_id);
|
|
|
|
|
|
|
|
|
|
uint32_t dc_join_securejoin(struct dc_context_t *context, const char *qr);
|
|
|
|
|
|
|
|
|
|
void dc_send_locations_to_chat(struct dc_context_t *context, uint32_t chat_id, int seconds);
|
|
|
|
|
|
|
|
|
|
int dc_is_sending_locations_to_chat(struct dc_context_t *context, uint32_t chat_id);
|
|
|
|
|
|
|
|
|
|
int dc_set_location(struct dc_context_t *context,
|
|
|
|
|
double latitude,
|
|
|
|
|
double longitude,
|
|
|
|
|
double accuracy);
|
|
|
|
|
|
|
|
|
|
dc_array_t *dc_get_locations(struct dc_context_t *context,
|
|
|
|
|
uint32_t chat_id,
|
|
|
|
|
uint32_t contact_id,
|
|
|
|
|
int64_t timestamp_begin,
|
|
|
|
|
int64_t timestamp_end);
|
|
|
|
|
|
|
|
|
|
void dc_delete_all_locations(struct dc_context_t *context);
|
|
|
|
|
|
|
|
|
|
char *dc_get_last_error(struct dc_context_t *context);
|
|
|
|
|
|
|
|
|
|
void dc_array_unref(dc_array_t *a);
|
|
|
|
|
|
|
|
|
|
size_t dc_array_get_cnt(const dc_array_t *array);
|
|
|
|
|
|
|
|
|
|
uint32_t dc_array_get_id(const dc_array_t *array, size_t index);
|
|
|
|
|
|
|
|
|
|
double dc_array_get_latitude(const dc_array_t *array, size_t index);
|
|
|
|
|
|
|
|
|
|
double dc_array_get_longitude(const dc_array_t *array, size_t index);
|
|
|
|
|
|
|
|
|
|
double dc_array_get_accuracy(const dc_array_t *array, size_t index);
|
|
|
|
|
|
|
|
|
|
int64_t dc_array_get_timestamp(const dc_array_t *array, size_t index);
|
|
|
|
|
|
|
|
|
|
unsigned int dc_array_get_chat_id(const dc_array_t *array, size_t index);
|
|
|
|
|
|
|
|
|
|
unsigned int dc_array_get_contact_id(const dc_array_t *array, size_t index);
|
|
|
|
|
|
|
|
|
|
unsigned int dc_array_get_msg_id(const dc_array_t *array, size_t index);
|
|
|
|
|
|
|
|
|
|
char *dc_array_get_marker(const dc_array_t *array, size_t index);
|
|
|
|
|
|
|
|
|
|
int dc_array_search_id(const dc_array_t *array, unsigned int needle, size_t *ret_index);
|
|
|
|
|
|
|
|
|
|
void dc_chatlist_unref(struct dc_chatlist_t *chatlist);
|
|
|
|
|
|
|
|
|
|
size_t dc_chatlist_get_cnt(struct dc_chatlist_t *chatlist);
|
|
|
|
|
|
|
|
|
|
uint32_t dc_chatlist_get_chat_id(struct dc_chatlist_t *chatlist, size_t index);
|
|
|
|
|
|
|
|
|
|
uint32_t dc_chatlist_get_msg_id(struct dc_chatlist_t *chatlist, size_t index);
|
|
|
|
|
|
|
|
|
|
struct dc_lot_t *dc_chatlist_get_summary(struct dc_chatlist_t *chatlist,
|
|
|
|
|
size_t index,
|
|
|
|
|
struct dc_chat_t *chat);
|
|
|
|
|
|
|
|
|
|
struct dc_lot_t *dc_chatlist_get_summary2(struct dc_context_t *context,
|
|
|
|
|
uint32_t chat_id,
|
|
|
|
|
uint32_t msg_id);
|
|
|
|
|
|
|
|
|
|
const struct dc_context_t *dc_chatlist_get_context(struct dc_chatlist_t *chatlist);
|
|
|
|
|
|
|
|
|
|
void dc_chat_unref(struct dc_chat_t *chat);
|
|
|
|
|
|
|
|
|
|
uint32_t dc_chat_get_id(struct dc_chat_t *chat);
|
|
|
|
|
|
|
|
|
|
int dc_chat_get_type(struct dc_chat_t *chat);
|
|
|
|
|
|
|
|
|
|
char *dc_chat_get_name(struct dc_chat_t *chat);
|
|
|
|
|
|
|
|
|
|
char *dc_chat_get_profile_image(struct dc_chat_t *chat);
|
|
|
|
|
|
|
|
|
|
uint32_t dc_chat_get_color(struct dc_chat_t *chat);
|
|
|
|
|
|
|
|
|
|
int dc_chat_get_visibility(struct dc_chat_t *chat);
|
|
|
|
|
|
|
|
|
|
int dc_chat_is_contact_request(struct dc_chat_t *chat);
|
|
|
|
|
|
|
|
|
|
int dc_chat_is_unpromoted(struct dc_chat_t *chat);
|
|
|
|
|
|
|
|
|
|
int dc_chat_is_self_talk(struct dc_chat_t *chat);
|
|
|
|
|
|
|
|
|
|
int dc_chat_is_device_talk(struct dc_chat_t *chat);
|
|
|
|
|
|
|
|
|
|
int dc_chat_can_send(struct dc_chat_t *chat);
|
|
|
|
|
|
|
|
|
|
int dc_chat_is_protected(struct dc_chat_t *chat);
|
|
|
|
|
|
|
|
|
|
int dc_chat_is_sending_locations(struct dc_chat_t *chat);
|
|
|
|
|
|
|
|
|
|
int dc_chat_is_muted(struct dc_chat_t *chat);
|
|
|
|
|
|
|
|
|
|
int64_t dc_chat_get_remaining_mute_duration(struct dc_chat_t *chat);
|
|
|
|
|
|
|
|
|
|
char *dc_chat_get_info_json(struct dc_context_t *context, uint32_t chat_id);
|
|
|
|
|
|
|
|
|
|
struct dc_msg_t *dc_msg_new(struct dc_context_t *context, int viewtype);
|
|
|
|
|
|
|
|
|
|
void dc_msg_unref(struct dc_msg_t *msg);
|
|
|
|
|
|
|
|
|
|
uint32_t dc_msg_get_id(struct dc_msg_t *msg);
|
|
|
|
|
|
|
|
|
|
uint32_t dc_msg_get_from_id(struct dc_msg_t *msg);
|
|
|
|
|
|
|
|
|
|
uint32_t dc_msg_get_chat_id(struct dc_msg_t *msg);
|
|
|
|
|
|
|
|
|
|
int dc_msg_get_viewtype(struct dc_msg_t *msg);
|
|
|
|
|
|
|
|
|
|
int dc_msg_get_state(struct dc_msg_t *msg);
|
|
|
|
|
|
|
|
|
|
int dc_msg_get_download_state(struct dc_msg_t *msg);
|
|
|
|
|
|
|
|
|
|
int64_t dc_msg_get_timestamp(struct dc_msg_t *msg);
|
|
|
|
|
|
|
|
|
|
int64_t dc_msg_get_received_timestamp(struct dc_msg_t *msg);
|
|
|
|
|
|
|
|
|
|
int64_t dc_msg_get_sort_timestamp(struct dc_msg_t *msg);
|
|
|
|
|
|
|
|
|
|
char *dc_msg_get_text(struct dc_msg_t *msg);
|
|
|
|
|
|
|
|
|
|
char *dc_msg_get_subject(struct dc_msg_t *msg);
|
|
|
|
|
|
|
|
|
|
char *dc_msg_get_file(struct dc_msg_t *msg);
|
|
|
|
|
|
|
|
|
|
char *dc_msg_get_filename(struct dc_msg_t *msg);
|
|
|
|
|
|
|
|
|
|
char *dc_msg_get_webxdc_blob(struct dc_msg_t *msg, const char *filename, size_t *ret_bytes);
|
|
|
|
|
|
|
|
|
|
char *dc_msg_get_webxdc_info(struct dc_msg_t *msg);
|
|
|
|
|
|
|
|
|
|
char *dc_msg_get_filemime(struct dc_msg_t *msg);
|
|
|
|
|
|
|
|
|
|
uint64_t dc_msg_get_filebytes(struct dc_msg_t *msg);
|
|
|
|
|
|
|
|
|
|
int dc_msg_get_width(struct dc_msg_t *msg);
|
|
|
|
|
|
|
|
|
|
int dc_msg_get_height(struct dc_msg_t *msg);
|
|
|
|
|
|
|
|
|
|
int dc_msg_get_duration(struct dc_msg_t *msg);
|
|
|
|
|
|
|
|
|
|
int dc_msg_get_showpadlock(struct dc_msg_t *msg);
|
|
|
|
|
|
|
|
|
|
int dc_msg_is_bot(struct dc_msg_t *msg);
|
|
|
|
|
|
|
|
|
|
uint32_t dc_msg_get_ephemeral_timer(struct dc_msg_t *msg);
|
|
|
|
|
|
|
|
|
|
int64_t dc_msg_get_ephemeral_timestamp(struct dc_msg_t *msg);
|
|
|
|
|
|
|
|
|
|
struct dc_lot_t *dc_msg_get_summary(struct dc_msg_t *msg, struct dc_chat_t *chat);
|
|
|
|
|
|
|
|
|
|
char *dc_msg_get_summarytext(struct dc_msg_t *msg, int approx_characters);
|
|
|
|
|
|
|
|
|
|
char *dc_msg_get_override_sender_name(struct dc_msg_t *msg);
|
|
|
|
|
|
|
|
|
|
int dc_msg_has_deviating_timestamp(struct dc_msg_t *msg);
|
|
|
|
|
|
|
|
|
|
int dc_msg_has_location(struct dc_msg_t *msg);
|
|
|
|
|
|
|
|
|
|
int dc_msg_is_sent(struct dc_msg_t *msg);
|
|
|
|
|
|
|
|
|
|
int dc_msg_is_forwarded(struct dc_msg_t *msg);
|
|
|
|
|
|
|
|
|
|
int dc_msg_is_info(struct dc_msg_t *msg);
|
|
|
|
|
|
|
|
|
|
int dc_msg_get_info_type(struct dc_msg_t *msg);
|
|
|
|
|
|
|
|
|
|
int dc_msg_is_increation(struct dc_msg_t *msg);
|
|
|
|
|
|
|
|
|
|
int dc_msg_is_setupmessage(struct dc_msg_t *msg);
|
|
|
|
|
|
|
|
|
|
int dc_msg_has_html(struct dc_msg_t *msg);
|
|
|
|
|
|
|
|
|
|
char *dc_msg_get_videochat_url(struct dc_msg_t *msg);
|
|
|
|
|
|
|
|
|
|
int dc_msg_get_videochat_type(struct dc_msg_t *msg);
|
|
|
|
|
|
|
|
|
|
char *dc_msg_get_setupcodebegin(struct dc_msg_t *msg);
|
|
|
|
|
|
|
|
|
|
void dc_msg_set_text(struct dc_msg_t *msg, const char *text);
|
|
|
|
|
|
|
|
|
|
void dc_msg_set_html(struct dc_msg_t *msg, const char *html);
|
|
|
|
|
|
|
|
|
|
void dc_msg_set_override_sender_name(struct dc_msg_t *msg, const char *name);
|
|
|
|
|
|
|
|
|
|
void dc_msg_set_file(struct dc_msg_t *msg, const char *file, const char *filemime);
|
|
|
|
|
|
|
|
|
|
void dc_msg_set_dimension(struct dc_msg_t *msg, int width, int height);
|
|
|
|
|
|
|
|
|
|
void dc_msg_set_duration(struct dc_msg_t *msg, int duration);
|
|
|
|
|
|
|
|
|
|
void dc_msg_set_location(struct dc_msg_t *msg, double latitude, double longitude);
|
|
|
|
|
|
|
|
|
|
void dc_msg_latefiling_mediasize(struct dc_msg_t *msg, int width, int height, int duration);
|
|
|
|
|
|
|
|
|
|
char *dc_msg_get_error(struct dc_msg_t *msg);
|
|
|
|
|
|
|
|
|
|
void dc_msg_set_quote(struct dc_msg_t *msg, const struct dc_msg_t *quote);
|
|
|
|
|
|
|
|
|
|
char *dc_msg_get_quoted_text(const struct dc_msg_t *msg);
|
|
|
|
|
|
|
|
|
|
struct dc_msg_t *dc_msg_get_quoted_msg(const struct dc_msg_t *msg);
|
|
|
|
|
|
|
|
|
|
struct dc_msg_t *dc_msg_get_parent(const struct dc_msg_t *msg);
|
|
|
|
|
|
|
|
|
|
void dc_msg_force_plaintext(struct dc_msg_t *msg);
|
|
|
|
|
|
|
|
|
|
void dc_contact_unref(struct dc_contact_t *contact);
|
|
|
|
|
|
|
|
|
|
uint32_t dc_contact_get_id(struct dc_contact_t *contact);
|
|
|
|
|
|
|
|
|
|
char *dc_contact_get_addr(struct dc_contact_t *contact);
|
|
|
|
|
|
|
|
|
|
char *dc_contact_get_name(struct dc_contact_t *contact);
|
|
|
|
|
|
|
|
|
|
char *dc_contact_get_auth_name(struct dc_contact_t *contact);
|
|
|
|
|
|
|
|
|
|
char *dc_contact_get_display_name(struct dc_contact_t *contact);
|
|
|
|
|
|
|
|
|
|
char *dc_contact_get_name_n_addr(struct dc_contact_t *contact);
|
|
|
|
|
|
|
|
|
|
char *dc_contact_get_profile_image(struct dc_contact_t *contact);
|
|
|
|
|
|
|
|
|
|
uint32_t dc_contact_get_color(struct dc_contact_t *contact);
|
|
|
|
|
|
|
|
|
|
char *dc_contact_get_status(struct dc_contact_t *contact);
|
|
|
|
|
|
|
|
|
|
int64_t dc_contact_get_last_seen(struct dc_contact_t *contact);
|
|
|
|
|
|
|
|
|
|
int dc_contact_is_blocked(struct dc_contact_t *contact);
|
|
|
|
|
|
|
|
|
|
int dc_contact_is_verified(struct dc_contact_t *contact);
|
|
|
|
|
|
|
|
|
|
void dc_lot_unref(struct dc_lot_t *lot);
|
|
|
|
|
|
|
|
|
|
char *dc_lot_get_text1(struct dc_lot_t *lot);
|
|
|
|
|
|
|
|
|
|
char *dc_lot_get_text2(struct dc_lot_t *lot);
|
|
|
|
|
|
|
|
|
|
int dc_lot_get_text1_meaning(struct dc_lot_t *lot);
|
|
|
|
|
|
|
|
|
|
int dc_lot_get_state(struct dc_lot_t *lot);
|
|
|
|
|
|
|
|
|
|
uint32_t dc_lot_get_id(struct dc_lot_t *lot);
|
|
|
|
|
|
|
|
|
|
int64_t dc_lot_get_timestamp(struct dc_lot_t *lot);
|
|
|
|
|
|
|
|
|
|
void dc_str_unref(char *s);
|
|
|
|
|
|
|
|
|
|
const dc_provider_t *dc_provider_new_from_email(const struct dc_context_t *context,
|
|
|
|
|
const char *addr);
|
|
|
|
|
|
|
|
|
|
char *dc_provider_get_overview_page(const dc_provider_t *provider);
|
|
|
|
|
|
|
|
|
|
char *dc_provider_get_before_login_hint(const dc_provider_t *provider);
|
|
|
|
|
|
|
|
|
|
int dc_provider_get_status(const dc_provider_t *provider);
|
|
|
|
|
|
|
|
|
|
void dc_provider_unref(dc_provider_t *provider);
|
|
|
|
|
|
|
|
|
|
struct dc_accounts_t *dc_accounts_new(const char *_os_name, const char *dbfile);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Release the accounts structure.
|
|
|
|
|
*
|
|
|
|
|
* This function releases the memory of the `dc_accounts_t` structure.
|
|
|
|
|
*/
|
|
|
|
|
void dc_accounts_unref(struct dc_accounts_t *accounts);
|
|
|
|
|
|
|
|
|
|
struct dc_context_t *dc_accounts_get_account(struct dc_accounts_t *accounts, uint32_t id);
|
|
|
|
|
|
|
|
|
|
struct dc_context_t *dc_accounts_get_selected_account(struct dc_accounts_t *accounts);
|
|
|
|
|
|
|
|
|
|
int dc_accounts_select_account(struct dc_accounts_t *accounts, uint32_t id);
|
|
|
|
|
|
|
|
|
|
uint32_t dc_accounts_add_account(struct dc_accounts_t *accounts);
|
|
|
|
|
|
|
|
|
|
uint32_t dc_accounts_add_closed_account(struct dc_accounts_t *accounts);
|
|
|
|
|
|
|
|
|
|
int dc_accounts_remove_account(struct dc_accounts_t *accounts, uint32_t id);
|
|
|
|
|
|
|
|
|
|
uint32_t dc_accounts_migrate_account(struct dc_accounts_t *accounts, const char *dbfile);
|
|
|
|
|
|
|
|
|
|
dc_array_t *dc_accounts_get_all(struct dc_accounts_t *accounts);
|
|
|
|
|
|
|
|
|
|
int dc_accounts_all_work_done(struct dc_accounts_t *accounts);
|
|
|
|
|
|
|
|
|
|
void dc_accounts_start_io(struct dc_accounts_t *accounts);
|
|
|
|
|
|
|
|
|
|
void dc_accounts_stop_io(struct dc_accounts_t *accounts);
|
|
|
|
|
|
|
|
|
|
void dc_accounts_maybe_network(struct dc_accounts_t *accounts);
|
|
|
|
|
|
|
|
|
|
void dc_accounts_maybe_network_lost(struct dc_accounts_t *accounts);
|
|
|
|
|
|
|
|
|
|
struct dc_accounts_event_emitter_t *dc_accounts_get_event_emitter(struct dc_accounts_t *accounts);
|
|
|
|
|
|
|
|
|
|
void dc_accounts_event_emitter_unref(struct dc_accounts_event_emitter_t *emitter);
|
|
|
|
|
|
|
|
|
|
struct dc_event_t *dc_accounts_get_next_event(struct dc_accounts_event_emitter_t *emitter);
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
} // extern "C"
|
|
|
|
|
#endif // __cplusplus
|
|
|
|
|
|
|
|
|
|
#endif /* __DELTACHAT_H__ */
|