Delta Chat Core C Interface
deltachat.h
1 #ifndef __DELTACHAT_H__
2 #define __DELTACHAT_H__
3 #ifdef __cplusplus
4 extern "C" {
5 #endif
6 
7 
8 #ifndef PY_CFFI
9 #include <stdint.h>
10 #include <time.h>
11 #endif
12 
13 
14 typedef struct _dc_context dc_context_t;
15 typedef struct _dc_accounts dc_accounts_t;
16 typedef struct _dc_array dc_array_t;
17 typedef struct _dc_chatlist dc_chatlist_t;
18 typedef struct _dc_chat dc_chat_t;
19 typedef struct _dc_msg dc_msg_t;
20 typedef struct _dc_contact dc_contact_t;
21 typedef struct _dc_lot dc_lot_t;
22 typedef struct _dc_provider dc_provider_t;
23 typedef struct _dc_event dc_event_t;
24 typedef struct _dc_event_emitter dc_event_emitter_t;
25 typedef struct _dc_accounts_event_emitter dc_accounts_event_emitter_t;
26 
27 
179 // create/open/config/information
180 
196 dc_context_t* dc_context_new (const char* os_name, const char* dbfile, const char* blobdir);
197 
198 
214 dc_context_t* dc_context_new_closed (const char* dbfile);
215 
216 
231 int dc_context_open (dc_context_t *context, const char* passphrase);
232 
233 
241 int dc_context_is_open (dc_context_t *context);
242 
243 
255 void dc_context_unref (dc_context_t* context);
256 
257 
269 uint32_t dc_get_id (dc_context_t* context);
270 
271 
288 
289 
298 char* dc_get_blobdir (const dc_context_t* context);
299 
300 
420 int dc_set_config (dc_context_t* context, const char* key, const char* value);
421 
422 
448 char* dc_get_config (dc_context_t* context, const char* key);
449 
450 
462 int dc_set_stock_translation(dc_context_t* context, uint32_t stock_id, const char* stock_msg);
463 
464 
479 int dc_set_config_from_qr (dc_context_t* context, const char* qr);
480 
481 
496 char* dc_get_info (const dc_context_t* context);
497 
498 
528 char* dc_get_oauth2_url (dc_context_t* context, const char* addr, const char* redirect_uri);
529 
530 
531 #define DC_CONNECTIVITY_NOT_CONNECTED 1000
532 #define DC_CONNECTIVITY_CONNECTING 2000
533 #define DC_CONNECTIVITY_WORKING 3000
534 #define DC_CONNECTIVITY_CONNECTED 4000
535 
536 
557 int dc_get_connectivity (dc_context_t* context);
558 
559 
575 char* dc_get_connectivity_html (dc_context_t* context);
576 
577 
582 int dc_all_work_done (dc_context_t* context);
583 
584 
585 // connect
586 
637 void dc_configure (dc_context_t* context);
638 
639 
659 int dc_is_configured (const dc_context_t* context);
660 
661 
672 void dc_start_io (dc_context_t* context);
673 
688 void dc_stop_io(dc_context_t* context);
689 
712 void dc_maybe_network (dc_context_t* context);
713 
714 
715 
734 int dc_preconfigure_keypair (dc_context_t* context, const char *addr, const char *public_data, const char *secret_data);
735 
736 
737 // handle chatlists
738 
739 #define DC_GCL_ARCHIVED_ONLY 0x01
740 #define DC_GCL_NO_SPECIALS 0x02
741 #define DC_GCL_ADD_ALLDONE_HINT 0x04
742 #define DC_GCL_FOR_FORWARDING 0x08
743 
744 
793 dc_chatlist_t* dc_get_chatlist (dc_context_t* context, int flags, const char* query_str, uint32_t query_id);
794 
795 
796 // handle chats
797 
811 uint32_t dc_create_chat_by_contact_id (dc_context_t* context, uint32_t contact_id);
812 
813 
825 uint32_t dc_get_chat_id_by_contact_id (dc_context_t* context, uint32_t contact_id);
826 
827 
873 uint32_t dc_prepare_msg (dc_context_t* context, uint32_t chat_id, dc_msg_t* msg);
874 
875 
913 uint32_t dc_send_msg (dc_context_t* context, uint32_t chat_id, dc_msg_t* msg);
914 
930 uint32_t dc_send_msg_sync (dc_context_t* context, uint32_t chat_id, dc_msg_t* msg);
931 
932 
952 uint32_t dc_send_text_msg (dc_context_t* context, uint32_t chat_id, const char* text_to_send);
953 
954 
988 uint32_t dc_send_videochat_invitation (dc_context_t* context, uint32_t chat_id);
989 
990 
1018 int dc_send_webxdc_status_update (dc_context_t* context, uint32_t msg_id, const char* json, const char* descr);
1019 
1020 
1051 char* dc_get_webxdc_status_updates (dc_context_t* context, uint32_t msg_id, uint32_t serial);
1052 
1076 void dc_set_draft (dc_context_t* context, uint32_t chat_id, dc_msg_t* msg);
1077 
1078 
1126 uint32_t dc_add_device_msg (dc_context_t* context, const char* label, dc_msg_t* msg);
1127 
1138 int dc_was_device_msg_ever_added (dc_context_t* context, const char* label);
1139 
1140 
1153 dc_msg_t* dc_get_draft (dc_context_t* context, uint32_t chat_id);
1154 
1155 
1156 #define DC_GCM_ADDDAYMARKER 0x01
1157 #define DC_GCM_INFO_ONLY 0x02
1158 
1159 
1180 dc_array_t* dc_get_chat_msgs (dc_context_t* context, uint32_t chat_id, uint32_t flags, uint32_t marker1before);
1181 
1182 
1191 int dc_get_msg_cnt (dc_context_t* context, uint32_t chat_id);
1192 
1193 
1207 int dc_get_fresh_msg_cnt (dc_context_t* context, uint32_t chat_id);
1208 
1209 
1210 
1225 int dc_estimate_deletion_cnt (dc_context_t* context, int from_server, int64_t seconds);
1226 
1227 
1247 
1248 
1262 void dc_marknoticed_chat (dc_context_t* context, uint32_t chat_id);
1263 
1264 
1282 dc_array_t* dc_get_chat_media (dc_context_t* context, uint32_t chat_id, int msg_type, int msg_type2, int msg_type3);
1283 
1284 
1306 uint32_t dc_get_next_media (dc_context_t* context, uint32_t msg_id, int dir, int msg_type, int msg_type2, int msg_type3);
1307 
1308 
1324 int dc_set_chat_protection (dc_context_t* context, uint32_t chat_id, int protect);
1325 
1326 
1338 void dc_set_chat_visibility (dc_context_t* context, uint32_t chat_id, int visibility);
1339 
1340 
1366 void dc_delete_chat (dc_context_t* context, uint32_t chat_id);
1367 
1381 void dc_block_chat (dc_context_t* context, uint32_t chat_id);
1382 
1392 void dc_accept_chat (dc_context_t* context, uint32_t chat_id);
1393 
1416 dc_array_t* dc_get_chat_contacts (dc_context_t* context, uint32_t chat_id);
1417 
1428 char* dc_get_chat_encrinfo (dc_context_t* context, uint32_t chat_id);
1429 
1441 uint32_t dc_get_chat_ephemeral_timer (dc_context_t* context, uint32_t chat_id);
1442 
1465 dc_array_t* dc_search_msgs (dc_context_t* context, uint32_t chat_id, const char* query);
1466 
1467 
1478 dc_chat_t* dc_get_chat (dc_context_t* context, uint32_t chat_id);
1479 
1480 
1481 // handle group chats
1482 
1510 uint32_t dc_create_group_chat (dc_context_t* context, int protect, const char* name);
1511 
1512 
1540 uint32_t dc_create_broadcast_list (dc_context_t* context);
1541 
1542 
1553 int dc_is_contact_in_chat (dc_context_t* context, uint32_t chat_id, uint32_t contact_id);
1554 
1555 
1572 int dc_add_contact_to_chat (dc_context_t* context, uint32_t chat_id, uint32_t contact_id);
1573 
1574 
1589 int dc_remove_contact_from_chat (dc_context_t* context, uint32_t chat_id, uint32_t contact_id);
1590 
1591 
1606 int dc_set_chat_name (dc_context_t* context, uint32_t chat_id, const char* name);
1607 
1625 int dc_set_chat_ephemeral_timer (dc_context_t* context, uint32_t chat_id, uint32_t timer);
1626 
1646 int dc_set_chat_profile_image (dc_context_t* context, uint32_t chat_id, const char* image);
1647 
1648 
1649 
1671 int dc_set_chat_mute_duration (dc_context_t* context, uint32_t chat_id, int64_t duration);
1672 
1673 // handle messages
1674 
1687 char* dc_get_msg_info (dc_context_t* context, uint32_t msg_id);
1688 
1689 
1737 char* dc_get_msg_html (dc_context_t* context, uint32_t msg_id);
1738 
1739 
1759 void dc_download_full_msg (dc_context_t* context, int msg_id);
1760 
1761 
1776 char* dc_get_mime_headers (dc_context_t* context, uint32_t msg_id);
1777 
1778 
1788 void dc_delete_msgs (dc_context_t* context, const uint32_t* msg_ids, int msg_cnt);
1789 
1790 
1805 void dc_forward_msgs (dc_context_t* context, const uint32_t* msg_ids, int msg_cnt, uint32_t chat_id);
1806 
1807 
1824 int dc_resend_msgs (dc_context_t* context, const uint32_t* msg_ids, int msg_cnt);
1825 
1826 
1852 void dc_markseen_msgs (dc_context_t* context, const uint32_t* msg_ids, int msg_cnt);
1853 
1854 
1867 dc_msg_t* dc_get_msg (dc_context_t* context, uint32_t msg_id);
1868 
1869 
1870 // handle contacts
1871 
1885 int dc_may_be_valid_addr (const char* addr);
1886 
1887 
1901 uint32_t dc_lookup_contact_id_by_addr (dc_context_t* context, const char* addr);
1902 
1903 
1924 uint32_t dc_create_contact (dc_context_t* context, const char* name, const char* addr);
1925 
1926 
1927 #define DC_GCL_VERIFIED_ONLY 0x01
1928 #define DC_GCL_ADD_SELF 0x02
1929 
1930 
1954 int dc_add_address_book (dc_context_t* context, const char* addr_book);
1955 
1956 
1973 dc_array_t* dc_get_contacts (dc_context_t* context, uint32_t flags, const char* query);
1974 
1975 
1984 int dc_get_blocked_cnt (dc_context_t* context);
1985 
1986 
1996 
1997 
2007 void dc_block_contact (dc_context_t* context, uint32_t contact_id, int block);
2008 
2009 
2020 char* dc_get_contact_encrinfo (dc_context_t* context, uint32_t contact_id);
2021 
2022 
2034 int dc_delete_contact (dc_context_t* context, uint32_t contact_id);
2035 
2036 
2050 dc_contact_t* dc_get_contact (dc_context_t* context, uint32_t contact_id);
2051 
2052 
2053 // import/export and tools
2054 
2055 #define DC_IMEX_EXPORT_SELF_KEYS 1 // param1 is a directory where the keys are written to
2056 #define DC_IMEX_IMPORT_SELF_KEYS 2 // param1 is a directory where the keys are searched in and read from
2057 #define DC_IMEX_EXPORT_BACKUP 11 // param1 is a directory where the backup is written to, param2 is a passphrase to encrypt the backup
2058 #define DC_IMEX_IMPORT_BACKUP 12 // param1 is the file with the backup to import, param2 is the backup's passphrase
2059 
2060 
2106 void dc_imex (dc_context_t* context, int what, const char* param1, const char* param2);
2107 
2108 
2158 char* dc_imex_has_backup (dc_context_t* context, const char* dir);
2159 
2160 
2206 char* dc_initiate_key_transfer (dc_context_t* context);
2207 
2208 
2229 int dc_continue_key_transfer (dc_context_t* context, uint32_t msg_id, const char* setup_code);
2230 
2231 
2248 void dc_stop_ongoing_process (dc_context_t* context);
2249 
2250 
2251 // out-of-band verification
2252 
2253 #define DC_QR_ASK_VERIFYCONTACT 200 // id=contact
2254 #define DC_QR_ASK_VERIFYGROUP 202 // text1=groupname
2255 #define DC_QR_FPR_OK 210 // id=contact
2256 #define DC_QR_FPR_MISMATCH 220 // id=contact
2257 #define DC_QR_FPR_WITHOUT_ADDR 230 // test1=formatted fingerprint
2258 #define DC_QR_ACCOUNT 250 // text1=domain
2259 #define DC_QR_WEBRTC_INSTANCE 260 // text1=domain, text2=instance pattern
2260 #define DC_QR_ADDR 320 // id=contact
2261 #define DC_QR_TEXT 330 // text1=text
2262 #define DC_QR_URL 332 // text1=URL
2263 #define DC_QR_ERROR 400 // text1=error string
2264 #define DC_QR_WITHDRAW_VERIFYCONTACT 500
2265 #define DC_QR_WITHDRAW_VERIFYGROUP 502 // text1=groupname
2266 #define DC_QR_REVIVE_VERIFYCONTACT 510
2267 #define DC_QR_REVIVE_VERIFYGROUP 512 // text1=groupname
2268 
2345 dc_lot_t* dc_check_qr (dc_context_t* context, const char* qr);
2346 
2347 
2369 char* dc_get_securejoin_qr (dc_context_t* context, uint32_t chat_id);
2370 
2371 
2384 char* dc_get_securejoin_qr_svg (dc_context_t* context, uint32_t chat_id);
2385 
2410 uint32_t dc_join_securejoin (dc_context_t* context, const char* qr);
2411 
2412 
2413 // location streaming
2414 
2415 
2432 void dc_send_locations_to_chat (dc_context_t* context, uint32_t chat_id, int seconds);
2433 
2434 
2448 int dc_is_sending_locations_to_chat (dc_context_t* context, uint32_t chat_id);
2449 
2450 
2478 int dc_set_location (dc_context_t* context, double latitude, double longitude, double accuracy);
2479 
2480 
2541 dc_array_t* dc_get_locations (dc_context_t* context, uint32_t chat_id, uint32_t contact_id, int64_t timestamp_begin, int64_t timestamp_end);
2542 
2543 
2554 void dc_delete_all_locations (dc_context_t* context);
2555 
2556 
2570 char* dc_get_last_error (dc_context_t* context);
2571 
2572 
2585 void dc_str_unref (char* str);
2586 
2587 
2635 dc_accounts_t* dc_accounts_new (const char* os_name, const char* dir);
2636 
2637 
2644 void dc_accounts_unref (dc_accounts_t* accounts);
2645 
2646 
2662 uint32_t dc_accounts_add_account (dc_accounts_t* accounts);
2663 
2679 uint32_t dc_accounts_add_closed_account (dc_accounts_t* accounts);
2680 
2695 uint32_t dc_accounts_migrate_account (dc_accounts_t* accounts, const char* dbfile);
2696 
2697 
2709 int dc_accounts_remove_account (dc_accounts_t* accounts, uint32_t account_id);
2710 
2711 
2721 
2722 
2734 dc_context_t* dc_accounts_get_account (dc_accounts_t* accounts, uint32_t account_id);
2735 
2736 
2753 
2754 
2763 int dc_accounts_select_account (dc_accounts_t* accounts, uint32_t account_id);
2764 
2765 
2781 
2782 
2792 void dc_accounts_start_io (dc_accounts_t* accounts);
2793 
2794 
2803 void dc_accounts_stop_io (dc_accounts_t* accounts);
2804 
2805 
2815 void dc_accounts_maybe_network (dc_accounts_t* accounts);
2816 
2817 
2831 
2832 
2853 
2854 
2873 void dc_array_unref (dc_array_t* array);
2874 
2875 
2883 size_t dc_array_get_cnt (const dc_array_t* array);
2884 
2885 
2894 uint32_t dc_array_get_id (const dc_array_t* array, size_t index);
2895 
2896 
2906 double dc_array_get_latitude (const dc_array_t* array, size_t index);
2907 
2908 
2918 double dc_array_get_longitude (const dc_array_t* array, size_t index);
2919 
2920 
2931 double dc_array_get_accuracy (const dc_array_t* array, size_t index);
2932 
2933 
2943 int64_t dc_array_get_timestamp (const dc_array_t* array, size_t index);
2944 
2945 
2955 uint32_t dc_array_get_chat_id (const dc_array_t* array, size_t index);
2956 
2957 
2967 uint32_t dc_array_get_contact_id (const dc_array_t* array, size_t index);
2968 
2969 
2979 uint32_t dc_array_get_msg_id (const dc_array_t* array, size_t index);
2980 
2981 
2996 char* dc_array_get_marker (const dc_array_t* array, size_t index);
2997 
2998 
3009 int dc_array_is_independent (const dc_array_t* array, size_t index);
3010 
3011 
3021 int dc_array_search_id (const dc_array_t* array, uint32_t needle, size_t* ret_index);
3022 
3023 
3065 void dc_chatlist_unref (dc_chatlist_t* chatlist);
3066 
3067 
3075 size_t dc_chatlist_get_cnt (const dc_chatlist_t* chatlist);
3076 
3077 
3089 uint32_t dc_chatlist_get_chat_id (const dc_chatlist_t* chatlist, size_t index);
3090 
3091 
3103 uint32_t dc_chatlist_get_msg_id (const dc_chatlist_t* chatlist, size_t index);
3104 
3105 
3132 dc_lot_t* dc_chatlist_get_summary (const dc_chatlist_t* chatlist, size_t index, dc_chat_t* chat);
3133 
3134 
3154 dc_lot_t* dc_chatlist_get_summary2 (dc_context_t* context, uint32_t chat_id, uint32_t msg_id);
3155 
3156 
3165 
3166 
3183 char* dc_chat_get_info_json (dc_context_t* context, size_t chat_id);
3184 
3195 #define DC_CHAT_ID_TRASH 3 // messages that should be deleted get this chat ID; the messages are deleted from the working thread later then. This is also needed as rfc724_mid should be preset as long as the message is not deleted on the server (otherwise it is downloaded again)
3196 #define DC_CHAT_ID_ARCHIVED_LINK 6 // only an indicator in a chatlist
3197 #define DC_CHAT_ID_ALLDONE_HINT 7 // only an indicator in a chatlist
3198 #define DC_CHAT_ID_LAST_SPECIAL 9 // larger chat IDs are "real" chats, their messages are "real" messages
3199 
3200 
3208 void dc_chat_unref (dc_chat_t* chat);
3209 
3210 
3223 uint32_t dc_chat_get_id (const dc_chat_t* chat);
3224 
3225 
3256 int dc_chat_get_type (const dc_chat_t* chat);
3257 
3258 
3270 char* dc_chat_get_name (const dc_chat_t* chat);
3271 
3272 
3286 char* dc_chat_get_profile_image (const dc_chat_t* chat);
3287 
3288 
3301 uint32_t dc_chat_get_color (const dc_chat_t* chat);
3302 
3303 
3312 int dc_chat_get_visibility (const dc_chat_t* chat);
3313 
3314 
3331 int dc_chat_is_contact_request (const dc_chat_t* chat);
3332 
3333 
3354 int dc_chat_is_unpromoted (const dc_chat_t* chat);
3355 
3356 
3365 int dc_chat_is_self_talk (const dc_chat_t* chat);
3366 
3367 
3382 int dc_chat_is_device_talk (const dc_chat_t* chat);
3383 
3384 
3396 int dc_chat_can_send (const dc_chat_t* chat);
3397 
3398 
3409 int dc_chat_is_protected (const dc_chat_t* chat);
3410 
3411 
3422 int dc_chat_is_sending_locations (const dc_chat_t* chat);
3423 
3424 
3432 int dc_chat_is_muted (const dc_chat_t* chat);
3433 
3434 
3442 int64_t dc_chat_get_remaining_mute_duration (const dc_chat_t* chat);
3443 
3444 
3454 #define DC_MSG_ID_MARKER1 1 // this is used by iOS to mark things in the message list
3455 #define DC_MSG_ID_DAYMARKER 9
3456 #define DC_MSG_ID_LAST_SPECIAL 9
3457 
3458 
3471 dc_msg_t* dc_msg_new (dc_context_t* context, int viewtype);
3472 
3473 
3481 void dc_msg_unref (dc_msg_t* msg);
3482 
3483 
3492 uint32_t dc_msg_get_id (const dc_msg_t* msg);
3493 
3494 
3509 uint32_t dc_msg_get_from_id (const dc_msg_t* msg);
3510 
3511 
3520 uint32_t dc_msg_get_chat_id (const dc_msg_t* msg);
3521 
3522 
3531 int dc_msg_get_viewtype (const dc_msg_t* msg);
3532 
3533 
3576 int dc_msg_get_state (const dc_msg_t* msg);
3577 
3578 
3595 int64_t dc_msg_get_timestamp (const dc_msg_t* msg);
3596 
3597 
3609 int64_t dc_msg_get_received_timestamp (const dc_msg_t* msg);
3610 
3611 
3625 int64_t dc_msg_get_sort_timestamp (const dc_msg_t* msg);
3626 
3627 
3647 char* dc_msg_get_text (const dc_msg_t* msg);
3648 
3649 
3667 char* dc_msg_get_subject (const dc_msg_t* msg);
3668 
3682 char* dc_msg_get_file (const dc_msg_t* msg);
3683 
3684 
3695 char* dc_msg_get_filename (const dc_msg_t* msg);
3696 
3697 
3708 char* dc_msg_get_filemime (const dc_msg_t* msg);
3709 
3710 
3723 char* dc_msg_get_webxdc_blob (const dc_msg_t* msg, const char* filename, size_t* ret_bytes);
3724 
3725 
3753 char* dc_msg_get_webxdc_info (const dc_msg_t* msg);
3754 
3755 
3766 uint64_t dc_msg_get_filebytes (const dc_msg_t* msg);
3767 
3768 
3783 int dc_msg_get_width (const dc_msg_t* msg);
3784 
3785 
3800 int dc_msg_get_height (const dc_msg_t* msg);
3801 
3802 
3814 int dc_msg_get_duration (const dc_msg_t* msg);
3815 
3816 
3824 int dc_msg_get_showpadlock (const dc_msg_t* msg);
3825 
3835 int dc_msg_is_bot (const dc_msg_t* msg);
3836 
3848 uint32_t dc_msg_get_ephemeral_timer (const dc_msg_t* msg);
3849 
3862 int64_t dc_msg_get_ephemeral_timestamp (const dc_msg_t* msg);
3863 
3864 
3887 dc_lot_t* dc_msg_get_summary (const dc_msg_t* msg, const dc_chat_t* chat);
3888 
3889 
3901 char* dc_msg_get_summarytext (const dc_msg_t* msg, int approx_characters);
3902 
3903 
3932 char* dc_msg_get_override_sender_name(const dc_msg_t* msg);
3933 
3934 
3935 
3951 
3952 
3962 int dc_msg_has_location (const dc_msg_t* msg);
3963 
3964 
3975 int dc_msg_is_sent (const dc_msg_t* msg);
3976 
3977 
3994 int dc_msg_is_forwarded (const dc_msg_t* msg);
3995 
3996 
4017 int dc_msg_is_info (const dc_msg_t* msg);
4018 
4019 
4038 int dc_msg_get_info_type (const dc_msg_t* msg);
4039 
4040 
4041 // DC_INFO* uses the same values as SystemMessage in rust-land
4042 #define DC_INFO_PROTECTION_ENABLED 11
4043 #define DC_INFO_PROTECTION_DISABLED 12
4044 
4045 
4058 int dc_msg_is_increation (const dc_msg_t* msg);
4059 
4060 
4075 int dc_msg_is_setupmessage (const dc_msg_t* msg);
4076 
4077 
4092 char* dc_msg_get_setupcodebegin (const dc_msg_t* msg);
4093 
4094 
4108 char* dc_msg_get_videochat_url (const dc_msg_t* msg);
4109 
4110 
4130 char* dc_msg_get_error (const dc_msg_t* msg);
4131 
4132 
4161 int dc_msg_get_videochat_type (const dc_msg_t* msg);
4162 
4163 #define DC_VIDEOCHATTYPE_UNKNOWN 0
4164 #define DC_VIDEOCHATTYPE_BASICWEBRTC 1
4165 #define DC_VIDEOCHATTYPE_JITSI 2
4166 
4167 
4191 int dc_msg_has_html (dc_msg_t* msg);
4192 
4193 
4216 int dc_msg_get_download_state (const dc_msg_t* msg);
4217 
4218 
4227 void dc_msg_set_text (dc_msg_t* msg, const char* text);
4228 
4229 
4254 void dc_msg_set_html (dc_msg_t* msg, const char* html);
4255 
4256 
4269 void dc_msg_set_override_sender_name(dc_msg_t* msg, const char* name);
4270 
4271 
4284 void dc_msg_set_file (dc_msg_t* msg, const char* file, const char* filemime);
4285 
4286 
4297 void dc_msg_set_dimension (dc_msg_t* msg, int width, int height);
4298 
4299 
4309 void dc_msg_set_duration (dc_msg_t* msg, int duration);
4310 
4311 
4328 void dc_msg_set_location (dc_msg_t* msg, double latitude, double longitude);
4329 
4330 
4352 void dc_msg_latefiling_mediasize (dc_msg_t* msg, int width, int height, int duration);
4353 
4354 
4369 void dc_msg_set_quote (dc_msg_t* msg, const dc_msg_t* quote);
4370 
4371 
4386 char* dc_msg_get_quoted_text (const dc_msg_t* msg);
4387 
4388 
4411 
4426 dc_msg_t* dc_msg_get_parent (const dc_msg_t* msg);
4427 
4428 
4437 void dc_msg_force_plaintext (dc_msg_t* msg);
4438 
4460 #define DC_CONTACT_ID_SELF 1
4461 #define DC_CONTACT_ID_INFO 2 // centered messages as "member added", used in all chats
4462 #define DC_CONTACT_ID_DEVICE 5 // messages "update info" in the device-chat
4463 #define DC_CONTACT_ID_LAST_SPECIAL 9
4464 
4465 
4473 void dc_contact_unref (dc_contact_t* contact);
4474 
4475 
4483 uint32_t dc_contact_get_id (const dc_contact_t* contact);
4484 
4485 
4494 char* dc_contact_get_addr (const dc_contact_t* contact);
4495 
4496 
4511 char* dc_contact_get_name (const dc_contact_t* contact);
4512 
4513 
4533 char* dc_contact_get_auth_name (const dc_contact_t* contact);
4534 
4535 
4551 char* dc_contact_get_display_name (const dc_contact_t* contact);
4552 
4553 
4554 // dc_contact_get_first_name is removed,
4555 // the following define is to make upgrading more smoothly.
4556 #define dc_contact_get_first_name dc_contact_get_display_name
4557 
4558 
4573 char* dc_contact_get_name_n_addr (const dc_contact_t* contact);
4574 
4575 
4587 char* dc_contact_get_profile_image (const dc_contact_t* contact);
4588 
4589 
4601 uint32_t dc_contact_get_color (const dc_contact_t* contact);
4602 
4603 
4615 char* dc_contact_get_status (const dc_contact_t* contact);
4616 
4625 int64_t dc_contact_get_last_seen (const dc_contact_t* contact);
4626 
4636 int dc_contact_is_blocked (const dc_contact_t* contact);
4637 
4638 
4650 int dc_contact_is_verified (dc_contact_t* contact);
4651 
4652 
4673 dc_provider_t* dc_provider_new_from_email (const dc_context_t* context, const char* email);
4674 
4675 
4690 dc_provider_t* dc_provider_new_from_email_with_dns (const dc_context_t* context, const char* email);
4691 
4692 
4704 char* dc_provider_get_overview_page (const dc_provider_t* provider);
4705 
4706 
4721 char* dc_provider_get_before_login_hint (const dc_provider_t* provider);
4722 
4723 
4734 int dc_provider_get_status (const dc_provider_t* provider);
4735 
4736 
4743 void dc_provider_unref (dc_provider_t* provider);
4744 
4745 
4758 #define DC_TEXT1_DRAFT 1
4759 #define DC_TEXT1_USERNAME 2
4760 #define DC_TEXT1_SELF 3
4761 
4762 
4772 void dc_lot_unref (dc_lot_t* lot);
4773 
4774 
4784 char* dc_lot_get_text1 (const dc_lot_t* lot);
4785 
4786 
4796 char* dc_lot_get_text2 (const dc_lot_t* lot);
4797 
4798 
4808 int dc_lot_get_text1_meaning (const dc_lot_t* lot);
4809 
4810 
4818 int dc_lot_get_state (const dc_lot_t* lot);
4819 
4820 
4828 uint32_t dc_lot_get_id (const dc_lot_t* lot);
4829 
4830 
4840 int64_t dc_lot_get_timestamp (const dc_lot_t* lot);
4841 
4842 
4872 #define DC_MSG_TEXT 10
4873 
4874 
4886 #define DC_MSG_IMAGE 20
4887 
4888 
4894 #define DC_MSG_GIF 21
4895 
4896 
4902 #define DC_MSG_STICKER 23
4903 
4904 
4910 #define DC_MSG_AUDIO 40
4911 
4912 
4919 #define DC_MSG_VOICE 41
4920 
4921 
4930 #define DC_MSG_VIDEO 50
4931 
4932 
4938 #define DC_MSG_FILE 60
4939 
4940 
4949 #define DC_MSG_VIDEOCHAT_INVITATION 70
4950 
4951 
4957 #define DC_MSG_WEBXDC 80
4958 
4959 
4979 #define DC_STATE_UNDEFINED 0
4980 
4984 #define DC_STATE_IN_FRESH 10
4985 
4989 #define DC_STATE_IN_NOTICED 13
4990 
4994 #define DC_STATE_IN_SEEN 16
4995 
4999 #define DC_STATE_OUT_PREPARING 18
5000 
5004 #define DC_STATE_OUT_DRAFT 19
5005 
5009 #define DC_STATE_OUT_PENDING 20
5010 
5014 #define DC_STATE_OUT_FAILED 24
5015 
5020 #define DC_STATE_OUT_DELIVERED 26
5021 
5025 #define DC_STATE_OUT_MDN_RCVD 28
5026 
5047 #define DC_CHAT_TYPE_UNDEFINED 0
5048 
5052 #define DC_CHAT_TYPE_SINGLE 100
5053 
5057 #define DC_CHAT_TYPE_GROUP 120
5058 
5062 #define DC_CHAT_TYPE_MAILINGLIST 140
5063 
5067 #define DC_CHAT_TYPE_BROADCAST 160
5068 
5088 #define DC_SOCKET_AUTO 0
5089 
5090 
5094 #define DC_SOCKET_SSL 1
5095 
5096 
5100 #define DC_SOCKET_STARTTLS 2
5101 
5102 
5106 #define DC_SOCKET_PLAIN 3
5107 
5131 #define DC_LP_AUTH_OAUTH2 0x2
5132 
5133 
5138 #define DC_LP_AUTH_NORMAL 0x4
5139 
5140 
5145 #define DC_LP_AUTH_FLAGS (DC_LP_AUTH_OAUTH2|DC_LP_AUTH_NORMAL) // if none of these flags are set, the default is chosen
5146 
5162 #define DC_CERTCK_AUTO 0
5163 
5168 #define DC_CERTCK_STRICT 1
5169 
5174 #define DC_CERTCK_ACCEPT_INVALID_CERTIFICATES 3
5175 
5202 
5203 
5212 
5213 
5235 
5236 
5245 
5246 
5265 int dc_event_get_id(dc_event_t* event);
5266 
5267 
5280 
5281 
5294 
5295 
5308 char* dc_event_get_data2_str(dc_event_t* event);
5309 
5310 
5320 uint32_t dc_event_get_account_id(dc_event_t* event);
5321 
5322 
5330 void dc_event_unref(dc_event_t* event);
5331 
5332 
5355 #define DC_EVENT_INFO 100
5356 
5357 
5364 #define DC_EVENT_SMTP_CONNECTED 101
5365 
5366 
5373 #define DC_EVENT_IMAP_CONNECTED 102
5374 
5381 #define DC_EVENT_SMTP_MESSAGE_SENT 103
5382 
5389 #define DC_EVENT_IMAP_MESSAGE_DELETED 104
5390 
5397 #define DC_EVENT_IMAP_MESSAGE_MOVED 105
5398 
5405 #define DC_EVENT_NEW_BLOB_FILE 150
5406 
5413 #define DC_EVENT_DELETED_BLOB_FILE 151
5414 
5423 #define DC_EVENT_WARNING 300
5424 
5425 
5443 #define DC_EVENT_ERROR 400
5444 
5445 
5456 #define DC_EVENT_ERROR_SELF_NOT_IN_GROUP 410
5457 
5458 
5469 #define DC_EVENT_MSGS_CHANGED 2000
5470 
5471 
5481 #define DC_EVENT_INCOMING_MSG 2005
5482 
5483 
5496 #define DC_EVENT_MSGS_NOTICED 2008
5497 
5498 
5506 #define DC_EVENT_MSG_DELIVERED 2010
5507 
5508 
5517 #define DC_EVENT_MSG_FAILED 2012
5518 
5519 
5527 #define DC_EVENT_MSG_READ 2015
5528 
5529 
5539 #define DC_EVENT_CHAT_MODIFIED 2020
5540 
5547 #define DC_EVENT_CHAT_EPHEMERAL_TIMER_MODIFIED 2021
5548 
5549 
5556 #define DC_EVENT_CONTACTS_CHANGED 2030
5557 
5558 
5559 
5568 #define DC_EVENT_LOCATION_CHANGED 2035
5569 
5570 
5577 #define DC_EVENT_CONFIGURE_PROGRESS 2041
5578 
5579 
5586 #define DC_EVENT_IMEX_PROGRESS 2051
5587 
5588 
5599 #define DC_EVENT_IMEX_FILE_WRITTEN 2052
5600 
5601 
5616 #define DC_EVENT_SECUREJOIN_INVITER_PROGRESS 2060
5617 
5618 
5631 #define DC_EVENT_SECUREJOIN_JOINER_PROGRESS 2061
5632 
5633 
5643 #define DC_EVENT_CONNECTIVITY_CHANGED 2100
5644 
5645 
5650 #define DC_EVENT_SELFAVATAR_CHANGED 2110
5651 
5652 
5667 #define DC_EVENT_WEBXDC_STATUS_UPDATE 2120
5668 
5669 
5675 #define DC_EVENT_DATA1_IS_STRING(e) 0 // not used anymore
5676 #define DC_EVENT_DATA2_IS_STRING(e) ((e)==DC_EVENT_CONFIGURE_PROGRESS || (e)==DC_EVENT_IMEX_FILE_WRITTEN || ((e)>=100 && (e)<=499))
5677 
5678 
5679 /*
5680  * Values for dc_get|set_config("show_emails")
5681  */
5682 #define DC_SHOW_EMAILS_OFF 0
5683 #define DC_SHOW_EMAILS_ACCEPTED_CONTACTS 1
5684 #define DC_SHOW_EMAILS_ALL 2
5685 
5686 
5687 /*
5688  * Values for dc_get|set_config("media_quality")
5689  */
5690 #define DC_MEDIA_QUALITY_BALANCED 0
5691 #define DC_MEDIA_QUALITY_WORSE 1
5692 
5693 
5694 /*
5695  * Values for dc_get|set_config("key_gen_type")
5696  */
5697 #define DC_KEY_GEN_DEFAULT 0
5698 #define DC_KEY_GEN_RSA2048 1
5699 #define DC_KEY_GEN_ED25519 2
5700 
5701 
5723 #define DC_PROVIDER_STATUS_OK 1
5724 
5736 #define DC_PROVIDER_STATUS_PREPARATION 2
5737 
5750 #define DC_PROVIDER_STATUS_BROKEN 3
5751 
5772 #define DC_CHAT_VISIBILITY_NORMAL 0
5773 
5786 #define DC_CHAT_VISIBILITY_ARCHIVED 1
5787 
5792 #define DC_CHAT_VISIBILITY_PINNED 2
5793 
5813 #define DC_DOWNLOAD_DONE 0
5814 
5818 #define DC_DOWNLOAD_AVAILABLE 10
5819 
5823 #define DC_DOWNLOAD_FAILURE 20
5824 
5828 #define DC_DOWNLOAD_IN_PROGRESS 1000
5829 
5830 
5831 
5856 #define DC_STR_NOMESSAGES 1
5860 
5864 #define DC_STR_SELF 2
5865 
5869 #define DC_STR_DRAFT 3
5870 
5874 #define DC_STR_VOICEMESSAGE 7
5875 
5879 #define DC_STR_IMAGE 9
5880 
5884 #define DC_STR_VIDEO 10
5885 
5889 #define DC_STR_AUDIO 11
5890 
5894 #define DC_STR_FILE 12
5895 
5901 #define DC_STR_MSGGRPNAME 15
5902 
5906 #define DC_STR_MSGGRPIMGCHANGED 16
5907 
5912 #define DC_STR_MSGADDMEMBER 17
5913 
5918 #define DC_STR_MSGDELMEMBER 18
5919 
5923 #define DC_STR_MSGGROUPLEFT 19
5924 
5928 #define DC_STR_GIF 23
5929 
5933 #define DC_STR_ENCRYPTEDMSG 24
5934 
5938 #define DC_STR_E2E_AVAILABLE 25
5939 
5941 #define DC_STR_ENCR_TRANSP 27
5942 
5946 #define DC_STR_ENCR_NONE 28
5947 
5951 #define DC_STR_CANTDECRYPT_MSG_BODY 29
5952 
5956 #define DC_STR_FINGERPRINTS 30
5957 
5961 #define DC_STR_READRCPT 31
5962 
5967 #define DC_STR_READRCPT_MAILBODY 32
5968 
5972 #define DC_STR_MSGGRPIMGDELETED 33
5973 
5977 #define DC_STR_E2E_PREFERRED 34
5978 
5983 #define DC_STR_CONTACT_VERIFIED 35
5984 
5989 #define DC_STR_CONTACT_NOT_VERIFIED 36
5990 
5995 #define DC_STR_CONTACT_SETUP_CHANGED 37
5996 
6000 #define DC_STR_ARCHIVEDCHATS 40
6001 
6005 #define DC_STR_AC_SETUP_MSG_SUBJECT 42
6006 
6010 #define DC_STR_AC_SETUP_MSG_BODY 43
6011 
6016 #define DC_STR_CANNOT_LOGIN 60
6017 
6024 #define DC_STR_MSGACTIONBYUSER 62
6025 
6031 #define DC_STR_MSGACTIONBYME 63
6032 
6036 #define DC_STR_MSGLOCATIONENABLED 64
6037 
6041 #define DC_STR_MSGLOCATIONDISABLED 65
6042 
6046 #define DC_STR_LOCATION 66
6047 
6051 #define DC_STR_STICKER 67
6052 
6056 #define DC_STR_DEVICE_MESSAGES 68
6057 
6061 #define DC_STR_SAVED_MESSAGES 69
6062 
6066 #define DC_STR_DEVICE_MESSAGES_HINT 70
6067 
6071 #define DC_STR_WELCOME_MESSAGE 71
6072 
6076 #define DC_STR_UNKNOWN_SENDER_FOR_CHAT 72
6077 
6083 #define DC_STR_SUBJECT_FOR_NEW_CONTACT 73
6084 
6089 #define DC_STR_FAILED_SENDING_TO 74
6090 
6094 #define DC_STR_EPHEMERAL_DISABLED 75
6095 
6101 #define DC_STR_EPHEMERAL_SECONDS 76
6102 
6106 #define DC_STR_EPHEMERAL_MINUTE 77
6107 
6111 #define DC_STR_EPHEMERAL_HOUR 78
6112 
6116 #define DC_STR_EPHEMERAL_DAY 79
6117 
6121 #define DC_STR_EPHEMERAL_WEEK 80
6122 
6124 #define DC_STR_EPHEMERAL_FOUR_WEEKS 81
6125 
6129 #define DC_STR_VIDEOCHAT_INVITATION 82
6130 
6135 #define DC_STR_VIDEOCHAT_INVITE_MSG_BODY 83
6136 
6141 #define DC_STR_CONFIGURATION_FAILED 84
6142 
6147 #define DC_STR_BAD_TIME_MSG_BODY 85
6148 
6152 #define DC_STR_UPDATE_REMINDER_MSG_BODY 86
6153 
6157 #define DC_STR_ERROR_NO_NETWORK 87
6158 
6162 #define DC_STR_PROTECTION_ENABLED 88
6163 
6167 #define DC_STR_PROTECTION_DISABLED 89
6168 
6173 #define DC_STR_REPLY_NOUN 90
6174 
6178 #define DC_STR_SELF_DELETED_MSG_BODY 91
6179 
6183 #define DC_STR_SERVER_TURNED_OFF 92
6184 
6188 //
6190 #define DC_STR_EPHEMERAL_MINUTES 93
6191 
6195 //
6197 #define DC_STR_EPHEMERAL_HOURS 94
6198 
6202 //
6204 #define DC_STR_EPHEMERAL_DAYS 95
6205 
6209 //
6211 #define DC_STR_EPHEMERAL_WEEKS 96
6212 
6216 #define DC_STR_FORWARDED 97
6217 
6223 #define DC_STR_QUOTA_EXCEEDING_MSG_BODY 98
6224 
6232 #define DC_STR_PARTIAL_DOWNLOAD_MSG_BODY 99
6233 
6239 #define DC_STR_DOWNLOAD_AVAILABILITY 100
6240 
6244 #define DC_STR_SYNC_MSG_SUBJECT 101
6245 
6254 #define DC_STR_SYNC_MSG_BODY 102
6255 
6259 #define DC_STR_INCOMING_MESSAGES 103
6260 
6264 #define DC_STR_OUTGOING_MESSAGES 104
6265 
6271 #define DC_STR_STORAGE_ON_DOMAIN 105
6272 
6274 #define DC_STR_ONE_MOMENT 106
6275 
6279 #define DC_STR_CONNECTED 107
6280 
6284 #define DC_STR_CONNTECTING 108
6285 
6289 #define DC_STR_UPDATING 109
6290 
6294 #define DC_STR_SENDING 110
6295 
6299 #define DC_STR_LAST_MSG_SENT_SUCCESSFULLY 111
6300 
6306 #define DC_STR_ERROR 112
6307 
6311 #define DC_STR_NOT_SUPPORTED_BY_PROVIDER 113
6312 
6316 #define DC_STR_MESSAGES 114
6317 
6321 #define DC_STR_BROADCAST_LIST 115
6322 
6326 #define DC_STR_PART_OF_TOTAL_USED 116
6327 
6336 #define DC_STR_SECURE_JOIN_STARTED 117
6337 
6346 #define DC_STR_SECURE_JOIN_REPLIES 118
6347 
6353 #define DC_STR_SETUP_CONTACT_QR_DESC 119
6354 
6360 #define DC_STR_SECURE_JOIN_GROUP_QR_DESC 120
6361 
6365 #define DC_STR_NOT_CONNECTED 121
6366 
6372 #ifdef PY_CFFI_INC
6373 /* Helper utility to locate the header file when building python bindings. */
6374 char* _dc_header_file_location(void) {
6375  return __FILE__;
6376 }
6377 #endif
6378 
6379 
6380 #ifdef __cplusplus
6381 }
6382 #endif
6383 #endif // __DELTACHAT_H__
dc_context_t::dc_get_blocked_contacts
dc_array_t * dc_get_blocked_contacts(dc_context_t *context)
Get blocked contacts.
dc_chat_t
dc_msg_t::dc_msg_get_setupcodebegin
char * dc_msg_get_setupcodebegin(const dc_msg_t *msg)
Get the first characters of the setup code.
dc_context_t::dc_get_msg
dc_msg_t * dc_get_msg(dc_context_t *context, uint32_t msg_id)
Get a single message object of the type dc_msg_t.
dc_context_t::dc_context_open
int dc_context_open(dc_context_t *context, const char *passphrase)
Opens the database with the given passphrase.
dc_contact_t::dc_contact_is_blocked
int dc_contact_is_blocked(const dc_contact_t *contact)
Check if a contact is blocked.
dc_contact_t::dc_contact_get_last_seen
int64_t dc_contact_get_last_seen(const dc_contact_t *contact)
Get the contact's last seen timestamp.
dc_context_t::dc_is_sending_locations_to_chat
int dc_is_sending_locations_to_chat(dc_context_t *context, uint32_t chat_id)
Check if location streaming is enabled.
dc_msg_t::dc_msg_set_text
void dc_msg_set_text(dc_msg_t *msg, const char *text)
Set the text of a message object.
dc_context_t::dc_context_new_closed
dc_context_t * dc_context_new_closed(const char *dbfile)
Create a new context object.
dc_context_t::dc_get_securejoin_qr
char * dc_get_securejoin_qr(dc_context_t *context, uint32_t chat_id)
Get QR code text that will offer an Setup-Contact or Verified-Group invitation.
dc_context_t::dc_add_device_msg
uint32_t dc_add_device_msg(dc_context_t *context, const char *label, dc_msg_t *msg)
Add a message to the device-chat.
dc_context_t::dc_send_videochat_invitation
uint32_t dc_send_videochat_invitation(dc_context_t *context, uint32_t chat_id)
Send invitation to a videochat.
dc_context_t::dc_marknoticed_chat
void dc_marknoticed_chat(dc_context_t *context, uint32_t chat_id)
Mark all messages in a chat as noticed.
dc_context_t::dc_create_broadcast_list
uint32_t dc_create_broadcast_list(dc_context_t *context)
Create a new broadcast list.
dc_chat_t::dc_chat_is_self_talk
int dc_chat_is_self_talk(const dc_chat_t *chat)
Check if a chat is a self talk.
dc_chat_t::dc_chat_get_visibility
int dc_chat_get_visibility(const dc_chat_t *chat)
Get visibility of chat.
dc_context_t::dc_stop_ongoing_process
void dc_stop_ongoing_process(dc_context_t *context)
Signal an ongoing process to stop.
dc_msg_t::dc_msg_get_timestamp
int64_t dc_msg_get_timestamp(const dc_msg_t *msg)
Get the message sending time.
dc_context_t::dc_send_msg
uint32_t dc_send_msg(dc_context_t *context, uint32_t chat_id, dc_msg_t *msg)
Send a message defined by a dc_msg_t object to a chat.
dc_chatlist_t
dc_accounts_t::dc_accounts_maybe_network
void dc_accounts_maybe_network(dc_accounts_t *accounts)
This function should be called when there is a hint that the network is available again.
dc_msg_t::dc_msg_get_duration
int dc_msg_get_duration(const dc_msg_t *msg)
Get the duration of audio or video.
dc_accounts_t::dc_accounts_migrate_account
uint32_t dc_accounts_migrate_account(dc_accounts_t *accounts, const char *dbfile)
Migrate independent accounts into accounts managed by the account manager.
dc_chat_t::dc_chat_get_profile_image
char * dc_chat_get_profile_image(const dc_chat_t *chat)
Get the chat's profile image.
dc_context_t::dc_add_address_book
int dc_add_address_book(dc_context_t *context, const char *addr_book)
Add a number of contacts.
dc_msg_t::dc_msg_has_html
int dc_msg_has_html(dc_msg_t *msg)
Checks if the message has a full HTML version.
dc_provider_t::dc_provider_new_from_email
dc_provider_t * dc_provider_new_from_email(const dc_context_t *context, const char *email)
Create a provider struct for the given e-mail address by local lookup.
dc_contact_t::dc_contact_get_auth_name
char * dc_contact_get_auth_name(const dc_contact_t *contact)
Get original contact name.
dc_provider_t::dc_provider_get_before_login_hint
char * dc_provider_get_before_login_hint(const dc_provider_t *provider)
Get hints to be shown to the user on the login screen.
dc_chatlist_t::dc_chatlist_unref
void dc_chatlist_unref(dc_chatlist_t *chatlist)
Free a chatlist object.
dc_array_t::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.
dc_array_t::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.
dc_context_t::dc_context_unref
void dc_context_unref(dc_context_t *context)
Free a context object.
dc_chat_t::dc_chat_get_type
int dc_chat_get_type(const dc_chat_t *chat)
Get chat type as one of the DC_CHAT_TYPE constants:
dc_contact_t::dc_contact_is_verified
int dc_contact_is_verified(dc_contact_t *contact)
Check if a contact was verified.
dc_context_t::dc_get_chat_media
dc_array_t * dc_get_chat_media(dc_context_t *context, uint32_t chat_id, int msg_type, int msg_type2, int msg_type3)
Returns all message IDs of the given types in a chat.
dc_msg_t::dc_msg_get_sort_timestamp
int64_t dc_msg_get_sort_timestamp(const dc_msg_t *msg)
Get the message time used for sorting.
dc_context_t::dc_set_config_from_qr
int dc_set_config_from_qr(dc_context_t *context, const char *qr)
Set configuration values from a QR code.
dc_chat_t::dc_chat_is_device_talk
int dc_chat_is_device_talk(const dc_chat_t *chat)
Check if a chat is a device-talk.
dc_msg_t::dc_msg_set_file
void dc_msg_set_file(dc_msg_t *msg, const char *file, const char *filemime)
Set the file associated with a message object.
dc_context_t::dc_context_new
dc_context_t * dc_context_new(const char *os_name, const char *dbfile, const char *blobdir)
Create a new context object and try to open it without passphrase.
dc_context_t::dc_create_chat_by_contact_id
uint32_t dc_create_chat_by_contact_id(dc_context_t *context, uint32_t contact_id)
Create a normal chat with a single user.
dc_context_t::dc_block_contact
void dc_block_contact(dc_context_t *context, uint32_t contact_id, int block)
Block or unblock a contact.
dc_array_t::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.
dc_context_t::dc_context_is_open
int dc_context_is_open(dc_context_t *context)
Returns 1 if database is open.
dc_context_t::dc_get_contacts
dc_array_t * dc_get_contacts(dc_context_t *context, uint32_t flags, const char *query)
Returns known and unblocked contacts.
dc_context_t::dc_get_mime_headers
char * dc_get_mime_headers(dc_context_t *context, uint32_t msg_id)
Get the raw mime-headers of the given message.
dc_chat_t::dc_chat_is_sending_locations
int dc_chat_is_sending_locations(const dc_chat_t *chat)
Check if locations are sent to the chat at the time the object was created using dc_get_chat().
dc_context_t::dc_set_chat_mute_duration
int dc_set_chat_mute_duration(dc_context_t *context, uint32_t chat_id, int64_t duration)
Set mute duration of a chat.
dc_context_t::dc_get_chat_encrinfo
char * dc_get_chat_encrinfo(dc_context_t *context, uint32_t chat_id)
Get encryption info for a chat.
dc_msg_t::dc_msg_get_viewtype
int dc_msg_get_viewtype(const dc_msg_t *msg)
Get the type of the message.
dc_context_t::dc_get_id
uint32_t dc_get_id(dc_context_t *context)
Get the ID of a context object.
dc_context_t::dc_initiate_key_transfer
char * dc_initiate_key_transfer(dc_context_t *context)
Initiate Autocrypt Setup Transfer.
dc_context_t::dc_get_connectivity_html
char * dc_get_connectivity_html(dc_context_t *context)
Get an overview of the current connectivity, and possibly more statistics.
dc_context_t::dc_start_io
void dc_start_io(dc_context_t *context)
Start job and IMAP/SMTP tasks.
dc_msg_t::dc_msg_get_error
char * dc_msg_get_error(const dc_msg_t *msg)
Gets the error status of the message.
dc_context_t::dc_block_chat
void dc_block_chat(dc_context_t *context, uint32_t chat_id)
Block a chat.
dc_msg_t::dc_msg_get_filemime
char * dc_msg_get_filemime(const dc_msg_t *msg)
Get the MIME type of a file.
dc_array_t::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.
dc_context_t::dc_preconfigure_keypair
int dc_preconfigure_keypair(dc_context_t *context, const char *addr, const char *public_data, const char *secret_data)
Save a keypair as the default keys for the user.
dc_context_t::dc_is_configured
int dc_is_configured(const dc_context_t *context)
Check if the context is already configured.
dc_lot_t::dc_lot_get_text1_meaning
int dc_lot_get_text1_meaning(const dc_lot_t *lot)
Get the meaning of the first string.
dc_event_t::dc_event_get_account_id
uint32_t dc_event_get_account_id(dc_event_t *event)
Get the account ID this event belongs to.
dc_accounts_event_emitter_t::dc_accounts_event_emitter_unref
void dc_accounts_event_emitter_unref(dc_accounts_event_emitter_t *emitter)
Free an accounts event emitter object.
dc_context_t::dc_get_contact
dc_contact_t * dc_get_contact(dc_context_t *context, uint32_t contact_id)
Get a single contact object.
dc_context_t::dc_add_contact_to_chat
int dc_add_contact_to_chat(dc_context_t *context, uint32_t chat_id, uint32_t contact_id)
Add a member to a group.
dc_lot_t
dc_context_t::dc_delete_contact
int dc_delete_contact(dc_context_t *context, uint32_t contact_id)
Delete a contact.
dc_event_emitter_t::dc_event_emitter_unref
void dc_event_emitter_unref(dc_event_emitter_t *emitter)
Free a context event emitter object.
dc_lot_t::dc_lot_get_state
int dc_lot_get_state(const dc_lot_t *lot)
Get the associated state.
dc_context_t::dc_delete_all_locations
void dc_delete_all_locations(dc_context_t *context)
Delete all locations on the current device.
dc_msg_t::dc_msg_force_plaintext
void dc_msg_force_plaintext(dc_msg_t *msg)
Force the message to be sent in plain text.
dc_context_t::dc_get_fresh_msgs
dc_array_t * dc_get_fresh_msgs(dc_context_t *context)
Returns the message IDs of all fresh messages of any chat.
dc_msg_t::dc_msg_get_videochat_type
int dc_msg_get_videochat_type(const dc_msg_t *msg)
Get type of videochat.
dc_context_t::dc_estimate_deletion_cnt
int dc_estimate_deletion_cnt(dc_context_t *context, int from_server, int64_t seconds)
Estimate the number of messages that will be deleted by the dc_set_config()-options delete_device_aft...
dc_context_t::dc_get_locations
dc_array_t * dc_get_locations(dc_context_t *context, uint32_t chat_id, uint32_t contact_id, int64_t timestamp_begin, int64_t timestamp_end)
Get shared locations from the database.
dc_context_t::dc_check_qr
dc_lot_t * dc_check_qr(dc_context_t *context, const char *qr)
Check a scanned QR code.
dc_msg_t::dc_msg_is_info
int dc_msg_is_info(const dc_msg_t *msg)
Check if the message is an informational message, created by the device or by another users.
dc_msg_t::dc_msg_latefiling_mediasize
void dc_msg_latefiling_mediasize(dc_msg_t *msg, int width, int height, int duration)
Late filing information to a message.
dc_chat_t::dc_chat_get_name
char * dc_chat_get_name(const dc_chat_t *chat)
Get name of a chat.
dc_msg_t::dc_msg_get_videochat_url
char * dc_msg_get_videochat_url(const dc_msg_t *msg)
Get URL of a videochat invitation.
dc_context_t::dc_chatlist_get_summary2
dc_lot_t * dc_chatlist_get_summary2(dc_context_t *context, uint32_t chat_id, uint32_t msg_id)
Create a chatlist summary item when the chatlist object is already unref()'d.
dc_chat_t::dc_chat_unref
void dc_chat_unref(dc_chat_t *chat)
Free a chat object.
dc_msg_t::dc_msg_set_dimension
void dc_msg_set_dimension(dc_msg_t *msg, int width, int height)
Set the dimensions associated with message object.
dc_msg_t::dc_msg_get_from_id
uint32_t dc_msg_get_from_id(const dc_msg_t *msg)
Get the ID of the contact who wrote the message.
dc_context_t::dc_create_group_chat
uint32_t dc_create_group_chat(dc_context_t *context, int protect, const char *name)
Create a new group chat.
dc_accounts_event_emitter_t
dc_context_t::dc_get_info
char * dc_get_info(const dc_context_t *context)
Get information about the context.
dc_msg_t::dc_msg_get_width
int dc_msg_get_width(const dc_msg_t *msg)
Get the width of an image or a video.
dc_msg_t::dc_msg_get_chat_id
uint32_t dc_msg_get_chat_id(const dc_msg_t *msg)
Get the ID of the chat the message belongs to.
dc_array_t::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.
dc_context_t::dc_get_webxdc_status_updates
char * dc_get_webxdc_status_updates(dc_context_t *context, uint32_t msg_id, uint32_t serial)
Get webxdc status updates.
dc_msg_t::dc_msg_get_parent
dc_msg_t * dc_msg_get_parent(const dc_msg_t *msg)
Get parent message, if available.
dc_event_t::dc_event_get_data2_int
int dc_event_get_data2_int(dc_event_t *event)
Get data associated with an event object.
dc_msg_t::dc_msg_get_ephemeral_timer
uint32_t dc_msg_get_ephemeral_timer(const dc_msg_t *msg)
Get the ephemeral timer duration for a message.
dc_context_t::dc_set_draft
void dc_set_draft(dc_context_t *context, uint32_t chat_id, dc_msg_t *msg)
Save a draft for a chat in the database.
dc_context_t::dc_get_chat_msgs
dc_array_t * dc_get_chat_msgs(dc_context_t *context, uint32_t chat_id, uint32_t flags, uint32_t marker1before)
Get all message IDs belonging to a chat.
dc_msg_t::dc_msg_get_webxdc_blob
char * dc_msg_get_webxdc_blob(const dc_msg_t *msg, const char *filename, size_t *ret_bytes)
Return a file from inside a webxdc message.
dc_contact_t::dc_contact_get_addr
char * dc_contact_get_addr(const dc_contact_t *contact)
Get the e-mail address of a contact.
dc_array_t
dc_accounts_t::dc_accounts_new
dc_accounts_t * dc_accounts_new(const char *os_name, const char *dir)
Create a new account manager.
dc_context_t::dc_str_unref
void dc_str_unref(char *str)
Release a string returned by another deltachat-core function.
dc_context_t::dc_get_securejoin_qr_svg
char * dc_get_securejoin_qr_svg(dc_context_t *context, uint32_t chat_id)
Get QR code image from the QR code text generated by dc_get_securejoin_qr().
dc_context_t::dc_get_chat_ephemeral_timer
uint32_t dc_get_chat_ephemeral_timer(dc_context_t *context, uint32_t chat_id)
Get the chat's ephemeral message timer.
dc_accounts_t::dc_accounts_maybe_network_lost
void dc_accounts_maybe_network_lost(dc_accounts_t *accounts)
This function can be called when there is a hint that the network is lost.
dc_context_t::dc_set_stock_translation
int dc_set_stock_translation(dc_context_t *context, uint32_t stock_id, const char *stock_msg)
Set stock string translation.
dc_msg_t::dc_msg_get_height
int dc_msg_get_height(const dc_msg_t *msg)
Get the height of an image or a video.
dc_msg_t::dc_msg_set_override_sender_name
void dc_msg_set_override_sender_name(dc_msg_t *msg, const char *name)
Set different sender name for a message.
dc_msg_t::dc_msg_get_webxdc_info
char * dc_msg_get_webxdc_info(const dc_msg_t *msg)
Get info from a webxdc message, in JSON format.
dc_accounts_t::dc_accounts_add_account
uint32_t dc_accounts_add_account(dc_accounts_t *accounts)
Add a new account to the account manager.
dc_array_t::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.
dc_context_t::dc_get_event_emitter
dc_event_emitter_t * dc_get_event_emitter(dc_context_t *context)
Create the event emitter that is used to receive events.
dc_contact_t::dc_contact_get_color
uint32_t dc_contact_get_color(const dc_contact_t *contact)
Get a color for the contact.
dc_lot_t::dc_lot_get_text2
char * dc_lot_get_text2(const dc_lot_t *lot)
Get second string.
dc_context_t::dc_prepare_msg
uint32_t dc_prepare_msg(dc_context_t *context, uint32_t chat_id, dc_msg_t *msg)
Prepare a message for sending.
dc_msg_t::dc_msg_set_location
void dc_msg_set_location(dc_msg_t *msg, double latitude, double longitude)
Set any location that should be bound to the message object.
dc_context_t::dc_get_next_media
uint32_t dc_get_next_media(dc_context_t *context, uint32_t msg_id, int dir, int msg_type, int msg_type2, int msg_type3)
Search next/previous message based on a given message and a list of types.
dc_context_t::dc_imex_has_backup
char * dc_imex_has_backup(dc_context_t *context, const char *dir)
Check if there is a backup file.
dc_accounts_t::dc_accounts_unref
void dc_accounts_unref(dc_accounts_t *accounts)
Free an account manager object.
dc_provider_t::dc_provider_new_from_email_with_dns
dc_provider_t * dc_provider_new_from_email_with_dns(const dc_context_t *context, const char *email)
Create a provider struct for the given e-mail address by local and DNS lookup.
dc_msg_t::dc_msg_unref
void dc_msg_unref(dc_msg_t *msg)
Free a message object.
dc_msg_t::dc_msg_get_filebytes
uint64_t dc_msg_get_filebytes(const dc_msg_t *msg)
Get the size of the file.
dc_context_t::dc_get_msg_cnt
int dc_get_msg_cnt(dc_context_t *context, uint32_t chat_id)
Get the total number of messages in a chat.
dc_array_t::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.
dc_context_t::dc_resend_msgs
int dc_resend_msgs(dc_context_t *context, const uint32_t *msg_ids, int msg_cnt)
Resend messages and make information available for newly added chat members.
dc_contact_t::dc_contact_get_status
char * dc_contact_get_status(const dc_contact_t *contact)
Get the contact's status.
dc_context_t::dc_get_contact_encrinfo
char * dc_get_contact_encrinfo(dc_context_t *context, uint32_t contact_id)
Get encryption info for a contact.
dc_chat_t::dc_chat_is_unpromoted
int dc_chat_is_unpromoted(const dc_chat_t *chat)
Check if a group chat is still unpromoted.
dc_context_t::dc_imex
void dc_imex(dc_context_t *context, int what, const char *param1, const char *param2)
Import/export things.
dc_context_t::dc_continue_key_transfer
int dc_continue_key_transfer(dc_context_t *context, uint32_t msg_id, const char *setup_code)
Continue the Autocrypt Key Transfer on another device.
dc_array_t::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.
dc_context_t::dc_remove_contact_from_chat
int dc_remove_contact_from_chat(dc_context_t *context, uint32_t chat_id, uint32_t contact_id)
Remove a member from a group.
dc_msg_t::dc_msg_get_file
char * dc_msg_get_file(const dc_msg_t *msg)
Find out full path, file name and extension of the file associated with a message.
dc_context_t::dc_set_chat_name
int dc_set_chat_name(dc_context_t *context, uint32_t chat_id, const char *name)
Set group name.
dc_chatlist_t::dc_chatlist_get_msg_id
uint32_t dc_chatlist_get_msg_id(const dc_chatlist_t *chatlist, size_t index)
Get a single message ID of a chatlist.
dc_accounts_t
dc_contact_t::dc_contact_unref
void dc_contact_unref(dc_contact_t *contact)
Free a contact object.
dc_msg_t::dc_msg_has_deviating_timestamp
int dc_msg_has_deviating_timestamp(const dc_msg_t *msg)
Check if a message has a deviating timestamp.
dc_chat_t::dc_chat_is_muted
int dc_chat_is_muted(const dc_chat_t *chat)
Check whether the chat is currently muted (can be changed by dc_set_chat_mute_duration()).
dc_msg_t::dc_msg_get_summarytext
char * dc_msg_get_summarytext(const dc_msg_t *msg, int approx_characters)
Get a message summary as a single line of text.
dc_event_t
dc_context_t::dc_set_chat_profile_image
int dc_set_chat_profile_image(dc_context_t *context, uint32_t chat_id, const char *image)
Set group profile image.
dc_array_t::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.
dc_chat_t::dc_chat_get_id
uint32_t dc_chat_get_id(const dc_chat_t *chat)
Get the chat ID.
dc_chatlist_t::dc_chatlist_get_chat_id
uint32_t dc_chatlist_get_chat_id(const dc_chatlist_t *chatlist, size_t index)
Get a single chat ID of a chatlist.
dc_context_t::dc_was_device_msg_ever_added
int dc_was_device_msg_ever_added(dc_context_t *context, const char *label)
Check if a device-message with a given label was ever added.
dc_contact_t::dc_contact_get_name
char * dc_contact_get_name(const dc_contact_t *contact)
Get the edited contact name.
dc_context_t::dc_get_chat_contacts
dc_array_t * dc_get_chat_contacts(dc_context_t *context, uint32_t chat_id)
Get the contact IDs belonging to a chat.
dc_accounts_t::dc_accounts_select_account
int dc_accounts_select_account(dc_accounts_t *accounts, uint32_t account_id)
Change the selected account.
dc_context_t::dc_may_be_valid_addr
int dc_may_be_valid_addr(const char *addr)
Rough check if a string may be a valid e-mail address.
dc_accounts_t::dc_accounts_get_selected_account
dc_context_t * dc_accounts_get_selected_account(dc_accounts_t *accounts)
Get the currently selected account.
dc_context_t
dc_context_t::dc_get_last_error
char * dc_get_last_error(dc_context_t *context)
Get last error string.
dc_chat_t::dc_chat_is_protected
int dc_chat_is_protected(const dc_chat_t *chat)
Check if a chat is protected.
dc_contact_t
dc_msg_t::dc_msg_get_received_timestamp
int64_t dc_msg_get_received_timestamp(const dc_msg_t *msg)
Get the message receive time.
dc_accounts_t::dc_accounts_get_account
dc_context_t * dc_accounts_get_account(dc_accounts_t *accounts, uint32_t account_id)
Get an account context from an account ID.
dc_context_t::dc_get_chat
dc_chat_t * dc_get_chat(dc_context_t *context, uint32_t chat_id)
Get a chat object by a chat ID.
dc_context_t::dc_get_oauth2_url
char * dc_get_oauth2_url(dc_context_t *context, const char *addr, const char *redirect_uri)
Get URL that can be used to initiate an OAuth2 authorization.
dc_accounts_event_emitter_t::dc_accounts_get_next_event
dc_event_t * dc_accounts_get_next_event(dc_accounts_event_emitter_t *emitter)
Get the next event from an accounts event emitter object.
dc_provider_t::dc_provider_unref
void dc_provider_unref(dc_provider_t *provider)
Free the provider info struct.
dc_provider_t
dc_context_t::dc_is_contact_in_chat
int dc_is_contact_in_chat(dc_context_t *context, uint32_t chat_id, uint32_t contact_id)
Check if a given contact ID is a member of a group chat.
dc_context_t::dc_send_locations_to_chat
void dc_send_locations_to_chat(dc_context_t *context, uint32_t chat_id, int seconds)
Enable or disable location streaming for a chat.
dc_event_t::dc_event_get_id
int dc_event_get_id(dc_event_t *event)
Get the event ID from an event object.
dc_chatlist_t::dc_chatlist_get_context
dc_context_t * dc_chatlist_get_context(dc_chatlist_t *chatlist)
Helper function to get the associated context object.
dc_context_t::dc_configure
void dc_configure(dc_context_t *context)
Configure a context.
dc_msg_t::dc_msg_is_increation
int dc_msg_is_increation(const dc_msg_t *msg)
Check if a message is still in creation.
dc_context_t::dc_join_securejoin
uint32_t dc_join_securejoin(dc_context_t *context, const char *qr)
Continue a Setup-Contact or Verified-Group-Invite protocol started on another device with dc_get_secu...
dc_context_t::dc_set_chat_visibility
void dc_set_chat_visibility(dc_context_t *context, uint32_t chat_id, int visibility)
Set chat visibility to pinned, archived or normal.
dc_event_emitter_t::dc_get_next_event
dc_event_t * dc_get_next_event(dc_event_emitter_t *emitter)
Get the next event from a context event emitter object.
dc_context_t::dc_send_msg_sync
uint32_t dc_send_msg_sync(dc_context_t *context, uint32_t chat_id, dc_msg_t *msg)
Send a message defined by a dc_msg_t object to a chat, synchronously.
dc_lot_t::dc_lot_get_id
uint32_t dc_lot_get_id(const dc_lot_t *lot)
Get the associated ID.
dc_accounts_t::dc_accounts_get_all
dc_array_t * dc_accounts_get_all(dc_accounts_t *accounts)
List all accounts.
dc_context_t::dc_send_text_msg
uint32_t dc_send_text_msg(dc_context_t *context, uint32_t chat_id, const char *text_to_send)
Send a simple text message a given chat.
dc_msg_t::dc_msg_is_bot
int dc_msg_is_bot(const dc_msg_t *msg)
Check if an incoming message is a bot message, i.e.
dc_context_t::dc_get_blobdir
char * dc_get_blobdir(const dc_context_t *context)
Get the blob directory.
dc_chat_t::dc_chat_get_remaining_mute_duration
int64_t dc_chat_get_remaining_mute_duration(const dc_chat_t *chat)
Get the exact state of the mute of a chat.
dc_context_t::dc_accept_chat
void dc_accept_chat(dc_context_t *context, uint32_t chat_id)
Accept a contact request chat.
dc_contact_t::dc_contact_get_id
uint32_t dc_contact_get_id(const dc_contact_t *contact)
Get the ID of a contact.
dc_lot_t::dc_lot_unref
void dc_lot_unref(dc_lot_t *lot)
Frees an object containing a set of parameters.
dc_msg_t::dc_msg_is_setupmessage
int dc_msg_is_setupmessage(const dc_msg_t *msg)
Check if the message is an Autocrypt Setup Message.
dc_accounts_t::dc_accounts_add_closed_account
uint32_t dc_accounts_add_closed_account(dc_accounts_t *accounts)
Add a new closed account to the account manager.
dc_context_t::dc_create_contact
uint32_t dc_create_contact(dc_context_t *context, const char *name, const char *addr)
Add a single contact as a result of an explicit user action.
dc_accounts_t::dc_accounts_remove_account
int dc_accounts_remove_account(dc_accounts_t *accounts, uint32_t account_id)
Remove an account from the account manager.
dc_chatlist_t::dc_chatlist_get_summary
dc_lot_t * dc_chatlist_get_summary(const dc_chatlist_t *chatlist, size_t index, dc_chat_t *chat)
Get a summary for a chatlist index.
dc_array_t::dc_array_get_cnt
size_t dc_array_get_cnt(const dc_array_t *array)
Find out the number of items in an array.
dc_context_t::dc_send_webxdc_status_update
int dc_send_webxdc_status_update(dc_context_t *context, uint32_t msg_id, const char *json, const char *descr)
A webxdc instance sends a status update to its other members.
dc_event_t::dc_event_get_data1_int
int dc_event_get_data1_int(dc_event_t *event)
Get data associated with an event object.
dc_msg_t
dc_context_t::dc_get_connectivity
int dc_get_connectivity(dc_context_t *context)
Get the current connectivity, i.e.
dc_msg_t::dc_msg_get_state
int dc_msg_get_state(const dc_msg_t *msg)
Get the state of a message.
dc_msg_t::dc_msg_set_html
void dc_msg_set_html(dc_msg_t *msg, const char *html)
Set the HTML part of a message object.
dc_contact_t::dc_contact_get_display_name
char * dc_contact_get_display_name(const dc_contact_t *contact)
Get display name.
dc_context_t::dc_get_msg_info
char * dc_get_msg_info(dc_context_t *context, uint32_t msg_id)
Get an informational text for a single message.
dc_msg_t::dc_msg_get_filename
char * dc_msg_get_filename(const dc_msg_t *msg)
Get a base file name without the path.
dc_context_t::dc_set_chat_protection
int dc_set_chat_protection(dc_context_t *context, uint32_t chat_id, int protect)
Enable or disable protection against active attacks.
dc_accounts_t::dc_accounts_start_io
void dc_accounts_start_io(dc_accounts_t *accounts)
Start job and IMAP/SMTP tasks for all accounts managed by the account manager.
dc_context_t::dc_get_chat_id_by_contact_id
uint32_t dc_get_chat_id_by_contact_id(dc_context_t *context, uint32_t contact_id)
Check, if there is a normal chat with a given contact.
dc_msg_t::dc_msg_get_summary
dc_lot_t * dc_msg_get_summary(const dc_msg_t *msg, const dc_chat_t *chat)
Get a summary for a message.
dc_accounts_t::dc_accounts_stop_io
void dc_accounts_stop_io(dc_accounts_t *accounts)
Stop job and IMAP/SMTP tasks for all accounts and return when they are finished.
dc_msg_t::dc_msg_is_forwarded
int dc_msg_is_forwarded(const dc_msg_t *msg)
Check if the message is a forwarded message.
dc_context_t::dc_markseen_msgs
void dc_markseen_msgs(dc_context_t *context, const uint32_t *msg_ids, int msg_cnt)
Mark messages as presented to the user.
dc_msg_t::dc_msg_get_override_sender_name
char * dc_msg_get_override_sender_name(const dc_msg_t *msg)
Get the name that should be shown over the message (in a group chat) instead of the contact display n...
dc_msg_t::dc_msg_has_location
int dc_msg_has_location(const dc_msg_t *msg)
Check if a message has a location bound to it.
dc_context_t::dc_forward_msgs
void dc_forward_msgs(dc_context_t *context, const uint32_t *msg_ids, int msg_cnt, uint32_t chat_id)
Forward messages to another chat.
dc_msg_t::dc_msg_get_ephemeral_timestamp
int64_t dc_msg_get_ephemeral_timestamp(const dc_msg_t *msg)
Get the timestamp of the ephemeral message removal.
dc_accounts_t::dc_accounts_all_work_done
int dc_accounts_all_work_done(dc_accounts_t *accounts)
This is meant especially for iOS, because iOS needs to tell the system when its background work is do...
dc_msg_t::dc_msg_get_quoted_text
char * dc_msg_get_quoted_text(const dc_msg_t *msg)
Get quoted text, if any.
dc_context_t::dc_delete_chat
void dc_delete_chat(dc_context_t *context, uint32_t chat_id)
Delete a chat.
dc_contact_t::dc_contact_get_name_n_addr
char * dc_contact_get_name_n_addr(const dc_contact_t *contact)
Get a summary of name and address.
dc_event_emitter_t
dc_msg_t::dc_msg_get_id
uint32_t dc_msg_get_id(const dc_msg_t *msg)
Get the ID of the message.
dc_accounts_t::dc_accounts_get_event_emitter
dc_accounts_event_emitter_t * dc_accounts_get_event_emitter(dc_accounts_t *accounts)
Create the event emitter that is used to receive events.
dc_contact_t::dc_contact_get_profile_image
char * dc_contact_get_profile_image(const dc_contact_t *contact)
Get the contact's profile image.
dc_msg_t::dc_msg_get_subject
char * dc_msg_get_subject(const dc_msg_t *msg)
Get the subject of the e-mail.
dc_context_t::dc_set_location
int dc_set_location(dc_context_t *context, double latitude, double longitude, double accuracy)
Set current location.
dc_chat_t::dc_chat_can_send
int dc_chat_can_send(const dc_chat_t *chat)
Check if messages can be sent to a given chat.
dc_msg_t::dc_msg_is_sent
int dc_msg_is_sent(const dc_msg_t *msg)
Check if a message was sent successfully.
dc_provider_t::dc_provider_get_status
int dc_provider_get_status(const dc_provider_t *provider)
Whether DC works with this provider.
dc_msg_t::dc_msg_get_info_type
int dc_msg_get_info_type(const dc_msg_t *msg)
Get the type of an informational message.
dc_msg_t::dc_msg_get_showpadlock
int dc_msg_get_showpadlock(const dc_msg_t *msg)
Check if a padlock should be shown beside the message.
dc_context_t::dc_get_blocked_cnt
int dc_get_blocked_cnt(dc_context_t *context)
Get the number of blocked contacts.
dc_msg_t::dc_msg_set_duration
void dc_msg_set_duration(dc_msg_t *msg, int duration)
Set the duration associated with message object.
dc_context_t::dc_get_draft
dc_msg_t * dc_get_draft(dc_context_t *context, uint32_t chat_id)
Get draft for a chat, if any.
dc_context_t::dc_maybe_network
void dc_maybe_network(dc_context_t *context)
This function should be called when there is a hint that the network is available again,...
dc_event_t::dc_event_unref
void dc_event_unref(dc_event_t *event)
Free memory used by an event object.
dc_context_t::dc_stop_io
void dc_stop_io(dc_context_t *context)
Stop job, IMAP, SMTP and other tasks and return when they are finished.
dc_context_t::dc_download_full_msg
void dc_download_full_msg(dc_context_t *context, int msg_id)
Asks the core to start downloading a message fully.
dc_context_t::dc_get_fresh_msg_cnt
int dc_get_fresh_msg_cnt(dc_context_t *context, uint32_t chat_id)
Get the number of fresh messages in a chat.
dc_context_t::dc_delete_msgs
void dc_delete_msgs(dc_context_t *context, const uint32_t *msg_ids, int msg_cnt)
Delete messages.
dc_provider_t::dc_provider_get_overview_page
char * dc_provider_get_overview_page(const dc_provider_t *provider)
URL of the overview page.
dc_chatlist_t::dc_chatlist_get_cnt
size_t dc_chatlist_get_cnt(const dc_chatlist_t *chatlist)
Find out the number of chats in a chatlist.
dc_lot_t::dc_lot_get_text1
char * dc_lot_get_text1(const dc_lot_t *lot)
Get first string.
dc_context_t::dc_lookup_contact_id_by_addr
uint32_t dc_lookup_contact_id_by_addr(dc_context_t *context, const char *addr)
Check if an e-mail address belongs to a known and unblocked contact.
dc_chat_t::dc_chat_is_contact_request
int dc_chat_is_contact_request(const dc_chat_t *chat)
Check if a chat is a contact request chat.
dc_msg_t::dc_msg_get_download_state
int dc_msg_get_download_state(const dc_msg_t *msg)
Check if the message is completely downloaded or if some further action is needed.
dc_context_t::dc_search_msgs
dc_array_t * dc_search_msgs(dc_context_t *context, uint32_t chat_id, const char *query)
Search messages containing the given query string.
dc_event_t::dc_event_get_data2_str
char * dc_event_get_data2_str(dc_event_t *event)
Get data associated with an event object.
dc_context_t::dc_get_msg_html
char * dc_get_msg_html(dc_context_t *context, uint32_t msg_id)
Get uncut message, if available.
dc_context_t::dc_get_config
char * dc_get_config(dc_context_t *context, const char *key)
Get a configuration option.
dc_context_t::dc_set_chat_ephemeral_timer
int dc_set_chat_ephemeral_timer(dc_context_t *context, uint32_t chat_id, uint32_t timer)
Set the chat's ephemeral message timer.
dc_msg_t::dc_msg_new
dc_msg_t * dc_msg_new(dc_context_t *context, int viewtype)
Create new message object.
dc_chat_t::dc_chat_get_color
uint32_t dc_chat_get_color(const dc_chat_t *chat)
Get a color for the chat.
dc_context_t::dc_get_chatlist
dc_chatlist_t * dc_get_chatlist(dc_context_t *context, int flags, const char *query_str, uint32_t query_id)
Get a list of chats.
dc_context_t::dc_set_config
int dc_set_config(dc_context_t *context, const char *key, const char *value)
Configure the context.
dc_array_t::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.
dc_array_t::dc_array_unref
void dc_array_unref(dc_array_t *array)
Free an array object.
dc_msg_t::dc_msg_set_quote
void dc_msg_set_quote(dc_msg_t *msg, const dc_msg_t *quote)
Set the message replying to.
dc_lot_t::dc_lot_get_timestamp
int64_t dc_lot_get_timestamp(const dc_lot_t *lot)
Get the associated timestamp.
dc_msg_t::dc_msg_get_text
char * dc_msg_get_text(const dc_msg_t *msg)
Get the text of the message.
dc_msg_t::dc_msg_get_quoted_msg
dc_msg_t * dc_msg_get_quoted_msg(const dc_msg_t *msg)
Get quoted message, if available.