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 
414 int dc_set_config (dc_context_t* context, const char* key, const char* value);
415 
416 
442 char* dc_get_config (dc_context_t* context, const char* key);
443 
444 
456 int dc_set_stock_translation(dc_context_t* context, uint32_t stock_id, const char* stock_msg);
457 
458 
473 int dc_set_config_from_qr (dc_context_t* context, const char* qr);
474 
475 
490 char* dc_get_info (const dc_context_t* context);
491 
492 
522 char* dc_get_oauth2_url (dc_context_t* context, const char* addr, const char* redirect_uri);
523 
524 
525 #define DC_CONNECTIVITY_NOT_CONNECTED 1000
526 #define DC_CONNECTIVITY_CONNECTING 2000
527 #define DC_CONNECTIVITY_WORKING 3000
528 #define DC_CONNECTIVITY_CONNECTED 4000
529 
530 
551 int dc_get_connectivity (dc_context_t* context);
552 
553 
569 char* dc_get_connectivity_html (dc_context_t* context);
570 
571 
576 int dc_all_work_done (dc_context_t* context);
577 
578 
579 // connect
580 
631 void dc_configure (dc_context_t* context);
632 
633 
653 int dc_is_configured (const dc_context_t* context);
654 
655 
666 void dc_start_io (dc_context_t* context);
667 
682 void dc_stop_io(dc_context_t* context);
683 
706 void dc_maybe_network (dc_context_t* context);
707 
708 
709 
728 int dc_preconfigure_keypair (dc_context_t* context, const char *addr, const char *public_data, const char *secret_data);
729 
730 
731 // handle chatlists
732 
733 #define DC_GCL_ARCHIVED_ONLY 0x01
734 #define DC_GCL_NO_SPECIALS 0x02
735 #define DC_GCL_ADD_ALLDONE_HINT 0x04
736 #define DC_GCL_FOR_FORWARDING 0x08
737 
738 
787 dc_chatlist_t* dc_get_chatlist (dc_context_t* context, int flags, const char* query_str, uint32_t query_id);
788 
789 
790 // handle chats
791 
805 uint32_t dc_create_chat_by_contact_id (dc_context_t* context, uint32_t contact_id);
806 
807 
819 uint32_t dc_get_chat_id_by_contact_id (dc_context_t* context, uint32_t contact_id);
820 
821 
867 uint32_t dc_prepare_msg (dc_context_t* context, uint32_t chat_id, dc_msg_t* msg);
868 
869 
907 uint32_t dc_send_msg (dc_context_t* context, uint32_t chat_id, dc_msg_t* msg);
908 
924 uint32_t dc_send_msg_sync (dc_context_t* context, uint32_t chat_id, dc_msg_t* msg);
925 
926 
946 uint32_t dc_send_text_msg (dc_context_t* context, uint32_t chat_id, const char* text_to_send);
947 
948 
982 uint32_t dc_send_videochat_invitation (dc_context_t* context, uint32_t chat_id);
983 
984 
1012 int dc_send_webxdc_status_update (dc_context_t* context, uint32_t msg_id, const char* json, const char* descr);
1013 
1014 
1041 char* dc_get_webxdc_status_updates (dc_context_t* context, uint32_t msg_id, uint32_t status_update_id);
1042 
1066 void dc_set_draft (dc_context_t* context, uint32_t chat_id, dc_msg_t* msg);
1067 
1068 
1116 uint32_t dc_add_device_msg (dc_context_t* context, const char* label, dc_msg_t* msg);
1117 
1128 int dc_was_device_msg_ever_added (dc_context_t* context, const char* label);
1129 
1130 
1143 dc_msg_t* dc_get_draft (dc_context_t* context, uint32_t chat_id);
1144 
1145 
1146 #define DC_GCM_ADDDAYMARKER 0x01
1147 #define DC_GCM_INFO_ONLY 0x02
1148 
1149 
1171 dc_array_t* dc_get_chat_msgs (dc_context_t* context, uint32_t chat_id, uint32_t flags, uint32_t marker1before);
1172 
1173 
1182 int dc_get_msg_cnt (dc_context_t* context, uint32_t chat_id);
1183 
1184 
1198 int dc_get_fresh_msg_cnt (dc_context_t* context, uint32_t chat_id);
1199 
1200 
1201 
1216 int dc_estimate_deletion_cnt (dc_context_t* context, int from_server, int64_t seconds);
1217 
1218 
1238 
1239 
1253 void dc_marknoticed_chat (dc_context_t* context, uint32_t chat_id);
1254 
1255 
1273 dc_array_t* dc_get_chat_media (dc_context_t* context, uint32_t chat_id, int msg_type, int msg_type2, int msg_type3);
1274 
1275 
1298 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);
1299 
1300 
1316 int dc_set_chat_protection (dc_context_t* context, uint32_t chat_id, int protect);
1317 
1318 
1330 void dc_set_chat_visibility (dc_context_t* context, uint32_t chat_id, int visibility);
1331 
1332 
1358 void dc_delete_chat (dc_context_t* context, uint32_t chat_id);
1359 
1373 void dc_block_chat (dc_context_t* context, uint32_t chat_id);
1374 
1384 void dc_accept_chat (dc_context_t* context, uint32_t chat_id);
1385 
1408 dc_array_t* dc_get_chat_contacts (dc_context_t* context, uint32_t chat_id);
1409 
1420 char* dc_get_chat_encrinfo (dc_context_t* context, uint32_t chat_id);
1421 
1433 uint32_t dc_get_chat_ephemeral_timer (dc_context_t* context, uint32_t chat_id);
1434 
1458 dc_array_t* dc_search_msgs (dc_context_t* context, uint32_t chat_id, const char* query);
1459 
1460 
1471 dc_chat_t* dc_get_chat (dc_context_t* context, uint32_t chat_id);
1472 
1473 
1474 // handle group chats
1475 
1503 uint32_t dc_create_group_chat (dc_context_t* context, int protect, const char* name);
1504 
1505 
1533 uint32_t dc_create_broadcast_list (dc_context_t* context);
1534 
1535 
1546 int dc_is_contact_in_chat (dc_context_t* context, uint32_t chat_id, uint32_t contact_id);
1547 
1548 
1565 int dc_add_contact_to_chat (dc_context_t* context, uint32_t chat_id, uint32_t contact_id);
1566 
1567 
1582 int dc_remove_contact_from_chat (dc_context_t* context, uint32_t chat_id, uint32_t contact_id);
1583 
1584 
1599 int dc_set_chat_name (dc_context_t* context, uint32_t chat_id, const char* name);
1600 
1618 int dc_set_chat_ephemeral_timer (dc_context_t* context, uint32_t chat_id, uint32_t timer);
1619 
1639 int dc_set_chat_profile_image (dc_context_t* context, uint32_t chat_id, const char* image);
1640 
1641 
1642 
1664 int dc_set_chat_mute_duration (dc_context_t* context, uint32_t chat_id, int64_t duration);
1665 
1666 // handle messages
1667 
1680 char* dc_get_msg_info (dc_context_t* context, uint32_t msg_id);
1681 
1682 
1730 char* dc_get_msg_html (dc_context_t* context, uint32_t msg_id);
1731 
1732 
1752 void dc_download_full_msg (dc_context_t* context, int msg_id);
1753 
1754 
1769 char* dc_get_mime_headers (dc_context_t* context, uint32_t msg_id);
1770 
1771 
1781 void dc_delete_msgs (dc_context_t* context, const uint32_t* msg_ids, int msg_cnt);
1782 
1783 
1793 void dc_forward_msgs (dc_context_t* context, const uint32_t* msg_ids, int msg_cnt, uint32_t chat_id);
1794 
1795 
1821 void dc_markseen_msgs (dc_context_t* context, const uint32_t* msg_ids, int msg_cnt);
1822 
1823 
1836 dc_msg_t* dc_get_msg (dc_context_t* context, uint32_t msg_id);
1837 
1838 
1839 // handle contacts
1840 
1854 int dc_may_be_valid_addr (const char* addr);
1855 
1856 
1870 uint32_t dc_lookup_contact_id_by_addr (dc_context_t* context, const char* addr);
1871 
1872 
1893 uint32_t dc_create_contact (dc_context_t* context, const char* name, const char* addr);
1894 
1895 
1896 #define DC_GCL_VERIFIED_ONLY 0x01
1897 #define DC_GCL_ADD_SELF 0x02
1898 
1899 
1923 int dc_add_address_book (dc_context_t* context, const char* addr_book);
1924 
1925 
1942 dc_array_t* dc_get_contacts (dc_context_t* context, uint32_t flags, const char* query);
1943 
1944 
1953 int dc_get_blocked_cnt (dc_context_t* context);
1954 
1955 
1965 
1966 
1976 void dc_block_contact (dc_context_t* context, uint32_t contact_id, int block);
1977 
1978 
1989 char* dc_get_contact_encrinfo (dc_context_t* context, uint32_t contact_id);
1990 
1991 
2003 int dc_delete_contact (dc_context_t* context, uint32_t contact_id);
2004 
2005 
2019 dc_contact_t* dc_get_contact (dc_context_t* context, uint32_t contact_id);
2020 
2021 
2022 // import/export and tools
2023 
2024 #define DC_IMEX_EXPORT_SELF_KEYS 1 // param1 is a directory where the keys are written to
2025 #define DC_IMEX_IMPORT_SELF_KEYS 2 // param1 is a directory where the keys are searched in and read from
2026 #define DC_IMEX_EXPORT_BACKUP 11 // param1 is a directory where the backup is written to, param2 is a passphrase to encrypt the backup
2027 #define DC_IMEX_IMPORT_BACKUP 12 // param1 is the file with the backup to import, param2 is the backup's passphrase
2028 
2029 
2075 void dc_imex (dc_context_t* context, int what, const char* param1, const char* param2);
2076 
2077 
2127 char* dc_imex_has_backup (dc_context_t* context, const char* dir);
2128 
2129 
2175 char* dc_initiate_key_transfer (dc_context_t* context);
2176 
2177 
2198 int dc_continue_key_transfer (dc_context_t* context, uint32_t msg_id, const char* setup_code);
2199 
2200 
2217 void dc_stop_ongoing_process (dc_context_t* context);
2218 
2219 
2220 // out-of-band verification
2221 
2222 #define DC_QR_ASK_VERIFYCONTACT 200 // id=contact
2223 #define DC_QR_ASK_VERIFYGROUP 202 // text1=groupname
2224 #define DC_QR_FPR_OK 210 // id=contact
2225 #define DC_QR_FPR_MISMATCH 220 // id=contact
2226 #define DC_QR_FPR_WITHOUT_ADDR 230 // test1=formatted fingerprint
2227 #define DC_QR_ACCOUNT 250 // text1=domain
2228 #define DC_QR_WEBRTC_INSTANCE 260 // text1=domain, text2=instance pattern
2229 #define DC_QR_ADDR 320 // id=contact
2230 #define DC_QR_TEXT 330 // text1=text
2231 #define DC_QR_URL 332 // text1=URL
2232 #define DC_QR_ERROR 400 // text1=error string
2233 #define DC_QR_WITHDRAW_VERIFYCONTACT 500
2234 #define DC_QR_WITHDRAW_VERIFYGROUP 502 // text1=groupname
2235 #define DC_QR_REVIVE_VERIFYCONTACT 510
2236 #define DC_QR_REVIVE_VERIFYGROUP 512 // text1=groupname
2237 
2314 dc_lot_t* dc_check_qr (dc_context_t* context, const char* qr);
2315 
2316 
2338 char* dc_get_securejoin_qr (dc_context_t* context, uint32_t chat_id);
2339 
2340 
2353 char* dc_get_securejoin_qr_svg (dc_context_t* context, uint32_t chat_id);
2354 
2379 uint32_t dc_join_securejoin (dc_context_t* context, const char* qr);
2380 
2381 
2382 // location streaming
2383 
2384 
2401 void dc_send_locations_to_chat (dc_context_t* context, uint32_t chat_id, int seconds);
2402 
2403 
2417 int dc_is_sending_locations_to_chat (dc_context_t* context, uint32_t chat_id);
2418 
2419 
2447 int dc_set_location (dc_context_t* context, double latitude, double longitude, double accuracy);
2448 
2449 
2510 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);
2511 
2512 
2523 void dc_delete_all_locations (dc_context_t* context);
2524 
2525 
2539 char* dc_get_last_error (dc_context_t* context);
2540 
2541 
2554 void dc_str_unref (char* str);
2555 
2556 
2604 dc_accounts_t* dc_accounts_new (const char* os_name, const char* dir);
2605 
2606 
2613 void dc_accounts_unref (dc_accounts_t* accounts);
2614 
2615 
2631 uint32_t dc_accounts_add_account (dc_accounts_t* accounts);
2632 
2648 uint32_t dc_accounts_add_closed_account (dc_accounts_t* accounts);
2649 
2664 uint32_t dc_accounts_migrate_account (dc_accounts_t* accounts, const char* dbfile);
2665 
2666 
2678 int dc_accounts_remove_account (dc_accounts_t* accounts, uint32_t account_id);
2679 
2680 
2690 
2691 
2703 dc_context_t* dc_accounts_get_account (dc_accounts_t* accounts, uint32_t account_id);
2704 
2705 
2722 
2723 
2732 int dc_accounts_select_account (dc_accounts_t* accounts, uint32_t account_id);
2733 
2734 
2750 
2751 
2761 void dc_accounts_start_io (dc_accounts_t* accounts);
2762 
2763 
2772 void dc_accounts_stop_io (dc_accounts_t* accounts);
2773 
2774 
2784 void dc_accounts_maybe_network (dc_accounts_t* accounts);
2785 
2786 
2800 
2801 
2822 
2823 
2842 void dc_array_unref (dc_array_t* array);
2843 
2844 
2852 size_t dc_array_get_cnt (const dc_array_t* array);
2853 
2854 
2863 uint32_t dc_array_get_id (const dc_array_t* array, size_t index);
2864 
2865 
2875 double dc_array_get_latitude (const dc_array_t* array, size_t index);
2876 
2877 
2887 double dc_array_get_longitude (const dc_array_t* array, size_t index);
2888 
2889 
2900 double dc_array_get_accuracy (const dc_array_t* array, size_t index);
2901 
2902 
2912 int64_t dc_array_get_timestamp (const dc_array_t* array, size_t index);
2913 
2914 
2924 uint32_t dc_array_get_chat_id (const dc_array_t* array, size_t index);
2925 
2926 
2936 uint32_t dc_array_get_contact_id (const dc_array_t* array, size_t index);
2937 
2938 
2948 uint32_t dc_array_get_msg_id (const dc_array_t* array, size_t index);
2949 
2950 
2965 char* dc_array_get_marker (const dc_array_t* array, size_t index);
2966 
2967 
2978 int dc_array_is_independent (const dc_array_t* array, size_t index);
2979 
2980 
2990 int dc_array_search_id (const dc_array_t* array, uint32_t needle, size_t* ret_index);
2991 
2992 
3034 void dc_chatlist_unref (dc_chatlist_t* chatlist);
3035 
3036 
3044 size_t dc_chatlist_get_cnt (const dc_chatlist_t* chatlist);
3045 
3046 
3058 uint32_t dc_chatlist_get_chat_id (const dc_chatlist_t* chatlist, size_t index);
3059 
3060 
3072 uint32_t dc_chatlist_get_msg_id (const dc_chatlist_t* chatlist, size_t index);
3073 
3074 
3101 dc_lot_t* dc_chatlist_get_summary (const dc_chatlist_t* chatlist, size_t index, dc_chat_t* chat);
3102 
3103 
3123 dc_lot_t* dc_chatlist_get_summary2 (dc_context_t* context, uint32_t chat_id, uint32_t msg_id);
3124 
3125 
3134 
3135 
3152 char* dc_chat_get_info_json (dc_context_t* context, size_t chat_id);
3153 
3164 #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)
3165 #define DC_CHAT_ID_ARCHIVED_LINK 6 // only an indicator in a chatlist
3166 #define DC_CHAT_ID_ALLDONE_HINT 7 // only an indicator in a chatlist
3167 #define DC_CHAT_ID_LAST_SPECIAL 9 // larger chat IDs are "real" chats, their messages are "real" messages.
3168 
3169 
3177 void dc_chat_unref (dc_chat_t* chat);
3178 
3179 
3192 uint32_t dc_chat_get_id (const dc_chat_t* chat);
3193 
3194 
3225 int dc_chat_get_type (const dc_chat_t* chat);
3226 
3227 
3239 char* dc_chat_get_name (const dc_chat_t* chat);
3240 
3241 
3255 char* dc_chat_get_profile_image (const dc_chat_t* chat);
3256 
3257 
3270 uint32_t dc_chat_get_color (const dc_chat_t* chat);
3271 
3272 
3281 int dc_chat_get_visibility (const dc_chat_t* chat);
3282 
3283 
3300 int dc_chat_is_contact_request (const dc_chat_t* chat);
3301 
3302 
3323 int dc_chat_is_unpromoted (const dc_chat_t* chat);
3324 
3325 
3334 int dc_chat_is_self_talk (const dc_chat_t* chat);
3335 
3336 
3351 int dc_chat_is_device_talk (const dc_chat_t* chat);
3352 
3353 
3365 int dc_chat_can_send (const dc_chat_t* chat);
3366 
3367 
3378 int dc_chat_is_protected (const dc_chat_t* chat);
3379 
3380 
3391 int dc_chat_is_sending_locations (const dc_chat_t* chat);
3392 
3393 
3401 int dc_chat_is_muted (const dc_chat_t* chat);
3402 
3403 
3411 int64_t dc_chat_get_remaining_mute_duration (const dc_chat_t* chat);
3412 
3413 
3423 #define DC_MSG_ID_MARKER1 1
3424 #define DC_MSG_ID_DAYMARKER 9
3425 #define DC_MSG_ID_LAST_SPECIAL 9
3426 
3427 
3440 dc_msg_t* dc_msg_new (dc_context_t* context, int viewtype);
3441 
3442 
3450 void dc_msg_unref (dc_msg_t* msg);
3451 
3452 
3461 uint32_t dc_msg_get_id (const dc_msg_t* msg);
3462 
3463 
3478 uint32_t dc_msg_get_from_id (const dc_msg_t* msg);
3479 
3480 
3489 uint32_t dc_msg_get_chat_id (const dc_msg_t* msg);
3490 
3491 
3500 int dc_msg_get_viewtype (const dc_msg_t* msg);
3501 
3502 
3545 int dc_msg_get_state (const dc_msg_t* msg);
3546 
3547 
3564 int64_t dc_msg_get_timestamp (const dc_msg_t* msg);
3565 
3566 
3578 int64_t dc_msg_get_received_timestamp (const dc_msg_t* msg);
3579 
3580 
3594 int64_t dc_msg_get_sort_timestamp (const dc_msg_t* msg);
3595 
3596 
3616 char* dc_msg_get_text (const dc_msg_t* msg);
3617 
3618 
3636 char* dc_msg_get_subject (const dc_msg_t* msg);
3637 
3651 char* dc_msg_get_file (const dc_msg_t* msg);
3652 
3653 
3664 char* dc_msg_get_filename (const dc_msg_t* msg);
3665 
3666 
3677 char* dc_msg_get_filemime (const dc_msg_t* msg);
3678 
3679 
3692 char* dc_msg_get_webxdc_blob (const dc_msg_t* msg, const char* filename, size_t* ret_bytes);
3693 
3694 
3716 char* dc_msg_get_webxdc_info (const dc_msg_t* msg);
3717 
3718 
3729 uint64_t dc_msg_get_filebytes (const dc_msg_t* msg);
3730 
3731 
3746 int dc_msg_get_width (const dc_msg_t* msg);
3747 
3748 
3763 int dc_msg_get_height (const dc_msg_t* msg);
3764 
3765 
3777 int dc_msg_get_duration (const dc_msg_t* msg);
3778 
3779 
3787 int dc_msg_get_showpadlock (const dc_msg_t* msg);
3788 
3798 int dc_msg_is_bot (const dc_msg_t* msg);
3799 
3811 uint32_t dc_msg_get_ephemeral_timer (const dc_msg_t* msg);
3812 
3825 int64_t dc_msg_get_ephemeral_timestamp (const dc_msg_t* msg);
3826 
3827 
3850 dc_lot_t* dc_msg_get_summary (const dc_msg_t* msg, const dc_chat_t* chat);
3851 
3852 
3864 char* dc_msg_get_summarytext (const dc_msg_t* msg, int approx_characters);
3865 
3866 
3895 char* dc_msg_get_override_sender_name(const dc_msg_t* msg);
3896 
3897 
3898 
3914 
3915 
3925 int dc_msg_has_location (const dc_msg_t* msg);
3926 
3927 
3938 int dc_msg_is_sent (const dc_msg_t* msg);
3939 
3940 
3957 int dc_msg_is_forwarded (const dc_msg_t* msg);
3958 
3959 
3980 int dc_msg_is_info (const dc_msg_t* msg);
3981 
3982 
4001 int dc_msg_get_info_type (const dc_msg_t* msg);
4002 
4003 
4004 // DC_INFO* uses the same values as SystemMessage in rust-land
4005 #define DC_INFO_PROTECTION_ENABLED 11
4006 #define DC_INFO_PROTECTION_DISABLED 12
4007 
4008 
4021 int dc_msg_is_increation (const dc_msg_t* msg);
4022 
4023 
4038 int dc_msg_is_setupmessage (const dc_msg_t* msg);
4039 
4040 
4055 char* dc_msg_get_setupcodebegin (const dc_msg_t* msg);
4056 
4057 
4071 char* dc_msg_get_videochat_url (const dc_msg_t* msg);
4072 
4073 
4093 char* dc_msg_get_error (const dc_msg_t* msg);
4094 
4095 
4124 int dc_msg_get_videochat_type (const dc_msg_t* msg);
4125 
4126 #define DC_VIDEOCHATTYPE_UNKNOWN 0
4127 #define DC_VIDEOCHATTYPE_BASICWEBRTC 1
4128 #define DC_VIDEOCHATTYPE_JITSI 2
4129 
4130 
4154 int dc_msg_has_html (dc_msg_t* msg);
4155 
4156 
4179 int dc_msg_get_download_state (const dc_msg_t* msg);
4180 
4181 
4190 void dc_msg_set_text (dc_msg_t* msg, const char* text);
4191 
4192 
4217 void dc_msg_set_html (dc_msg_t* msg, const char* html);
4218 
4219 
4232 void dc_msg_set_override_sender_name(dc_msg_t* msg, const char* name);
4233 
4234 
4247 void dc_msg_set_file (dc_msg_t* msg, const char* file, const char* filemime);
4248 
4249 
4260 void dc_msg_set_dimension (dc_msg_t* msg, int width, int height);
4261 
4262 
4272 void dc_msg_set_duration (dc_msg_t* msg, int duration);
4273 
4274 
4291 void dc_msg_set_location (dc_msg_t* msg, double latitude, double longitude);
4292 
4293 
4315 void dc_msg_latefiling_mediasize (dc_msg_t* msg, int width, int height, int duration);
4316 
4317 
4332 void dc_msg_set_quote (dc_msg_t* msg, const dc_msg_t* quote);
4333 
4334 
4349 char* dc_msg_get_quoted_text (const dc_msg_t* msg);
4350 
4351 
4374 
4389 dc_msg_t* dc_msg_get_parent (const dc_msg_t* msg);
4390 
4391 
4400 void dc_msg_force_plaintext (dc_msg_t* msg);
4401 
4423 #define DC_CONTACT_ID_SELF 1
4424 #define DC_CONTACT_ID_INFO 2 // centered messages as "member added", used in all chats
4425 #define DC_CONTACT_ID_DEVICE 5 // messages "update info" in the device-chat
4426 #define DC_CONTACT_ID_LAST_SPECIAL 9
4427 
4428 
4436 void dc_contact_unref (dc_contact_t* contact);
4437 
4438 
4446 uint32_t dc_contact_get_id (const dc_contact_t* contact);
4447 
4448 
4457 char* dc_contact_get_addr (const dc_contact_t* contact);
4458 
4459 
4474 char* dc_contact_get_name (const dc_contact_t* contact);
4475 
4476 
4496 char* dc_contact_get_auth_name (const dc_contact_t* contact);
4497 
4498 
4514 char* dc_contact_get_display_name (const dc_contact_t* contact);
4515 
4516 
4517 // dc_contact_get_first_name is removed,
4518 // the following define is to make upgrading more smoothly.
4519 #define dc_contact_get_first_name dc_contact_get_display_name
4520 
4521 
4536 char* dc_contact_get_name_n_addr (const dc_contact_t* contact);
4537 
4538 
4550 char* dc_contact_get_profile_image (const dc_contact_t* contact);
4551 
4552 
4564 uint32_t dc_contact_get_color (const dc_contact_t* contact);
4565 
4566 
4578 char* dc_contact_get_status (const dc_contact_t* contact);
4579 
4588 int64_t dc_contact_get_last_seen (const dc_contact_t* contact);
4589 
4599 int dc_contact_is_blocked (const dc_contact_t* contact);
4600 
4601 
4613 int dc_contact_is_verified (dc_contact_t* contact);
4614 
4615 
4635 dc_provider_t* dc_provider_new_from_email (const dc_context_t* context, const char* email);
4636 
4637 
4649 char* dc_provider_get_overview_page (const dc_provider_t* provider);
4650 
4651 
4666 char* dc_provider_get_before_login_hint (const dc_provider_t* provider);
4667 
4668 
4679 int dc_provider_get_status (const dc_provider_t* provider);
4680 
4681 
4688 void dc_provider_unref (dc_provider_t* provider);
4689 
4690 
4703 #define DC_TEXT1_DRAFT 1
4704 #define DC_TEXT1_USERNAME 2
4705 #define DC_TEXT1_SELF 3
4706 
4707 
4717 void dc_lot_unref (dc_lot_t* lot);
4718 
4719 
4729 char* dc_lot_get_text1 (const dc_lot_t* lot);
4730 
4731 
4741 char* dc_lot_get_text2 (const dc_lot_t* lot);
4742 
4743 
4753 int dc_lot_get_text1_meaning (const dc_lot_t* lot);
4754 
4755 
4763 int dc_lot_get_state (const dc_lot_t* lot);
4764 
4765 
4773 uint32_t dc_lot_get_id (const dc_lot_t* lot);
4774 
4775 
4785 int64_t dc_lot_get_timestamp (const dc_lot_t* lot);
4786 
4787 
4817 #define DC_MSG_TEXT 10
4818 
4819 
4831 #define DC_MSG_IMAGE 20
4832 
4833 
4839 #define DC_MSG_GIF 21
4840 
4841 
4847 #define DC_MSG_STICKER 23
4848 
4849 
4855 #define DC_MSG_AUDIO 40
4856 
4857 
4864 #define DC_MSG_VOICE 41
4865 
4866 
4875 #define DC_MSG_VIDEO 50
4876 
4877 
4883 #define DC_MSG_FILE 60
4884 
4885 
4894 #define DC_MSG_VIDEOCHAT_INVITATION 70
4895 
4896 
4902 #define DC_MSG_WEBXDC 80
4903 
4904 
4924 #define DC_STATE_UNDEFINED 0
4925 
4929 #define DC_STATE_IN_FRESH 10
4930 
4934 #define DC_STATE_IN_NOTICED 13
4935 
4939 #define DC_STATE_IN_SEEN 16
4940 
4944 #define DC_STATE_OUT_PREPARING 18
4945 
4949 #define DC_STATE_OUT_DRAFT 19
4950 
4954 #define DC_STATE_OUT_PENDING 20
4955 
4959 #define DC_STATE_OUT_FAILED 24
4960 
4965 #define DC_STATE_OUT_DELIVERED 26
4966 
4970 #define DC_STATE_OUT_MDN_RCVD 28
4971 
4992 #define DC_CHAT_TYPE_UNDEFINED 0
4993 
4997 #define DC_CHAT_TYPE_SINGLE 100
4998 
5002 #define DC_CHAT_TYPE_GROUP 120
5003 
5007 #define DC_CHAT_TYPE_MAILINGLIST 140
5008 
5012 #define DC_CHAT_TYPE_BROADCAST 160
5013 
5033 #define DC_SOCKET_AUTO 0
5034 
5035 
5039 #define DC_SOCKET_SSL 1
5040 
5041 
5045 #define DC_SOCKET_STARTTLS 2
5046 
5047 
5051 #define DC_SOCKET_PLAIN 3
5052 
5076 #define DC_LP_AUTH_OAUTH2 0x2
5077 
5078 
5083 #define DC_LP_AUTH_NORMAL 0x4
5084 
5085 
5090 #define DC_LP_AUTH_FLAGS (DC_LP_AUTH_OAUTH2|DC_LP_AUTH_NORMAL) // if none of these flags are set, the default is chosen
5091 
5107 #define DC_CERTCK_AUTO 0
5108 
5113 #define DC_CERTCK_STRICT 1
5114 
5119 #define DC_CERTCK_ACCEPT_INVALID_CERTIFICATES 3
5120 
5147 
5148 
5157 
5158 
5180 
5181 
5190 
5191 
5210 int dc_event_get_id(dc_event_t* event);
5211 
5212 
5225 
5226 
5239 
5240 
5253 char* dc_event_get_data2_str(dc_event_t* event);
5254 
5255 
5265 uint32_t dc_event_get_account_id(dc_event_t* event);
5266 
5267 
5275 void dc_event_unref(dc_event_t* event);
5276 
5277 
5300 #define DC_EVENT_INFO 100
5301 
5302 
5309 #define DC_EVENT_SMTP_CONNECTED 101
5310 
5311 
5318 #define DC_EVENT_IMAP_CONNECTED 102
5319 
5326 #define DC_EVENT_SMTP_MESSAGE_SENT 103
5327 
5334 #define DC_EVENT_IMAP_MESSAGE_DELETED 104
5335 
5342 #define DC_EVENT_IMAP_MESSAGE_MOVED 105
5343 
5350 #define DC_EVENT_NEW_BLOB_FILE 150
5351 
5358 #define DC_EVENT_DELETED_BLOB_FILE 151
5359 
5368 #define DC_EVENT_WARNING 300
5369 
5370 
5388 #define DC_EVENT_ERROR 400
5389 
5390 
5401 #define DC_EVENT_ERROR_SELF_NOT_IN_GROUP 410
5402 
5403 
5414 #define DC_EVENT_MSGS_CHANGED 2000
5415 
5416 
5426 #define DC_EVENT_INCOMING_MSG 2005
5427 
5428 
5441 #define DC_EVENT_MSGS_NOTICED 2008
5442 
5443 
5451 #define DC_EVENT_MSG_DELIVERED 2010
5452 
5453 
5462 #define DC_EVENT_MSG_FAILED 2012
5463 
5464 
5472 #define DC_EVENT_MSG_READ 2015
5473 
5474 
5484 #define DC_EVENT_CHAT_MODIFIED 2020
5485 
5492 #define DC_EVENT_CHAT_EPHEMERAL_TIMER_MODIFIED 2021
5493 
5494 
5501 #define DC_EVENT_CONTACTS_CHANGED 2030
5502 
5503 
5504 
5513 #define DC_EVENT_LOCATION_CHANGED 2035
5514 
5515 
5522 #define DC_EVENT_CONFIGURE_PROGRESS 2041
5523 
5524 
5531 #define DC_EVENT_IMEX_PROGRESS 2051
5532 
5533 
5544 #define DC_EVENT_IMEX_FILE_WRITTEN 2052
5545 
5546 
5561 #define DC_EVENT_SECUREJOIN_INVITER_PROGRESS 2060
5562 
5563 
5576 #define DC_EVENT_SECUREJOIN_JOINER_PROGRESS 2061
5577 
5578 
5588 #define DC_EVENT_CONNECTIVITY_CHANGED 2100
5589 
5590 
5595 #define DC_EVENT_SELFAVATAR_CHANGED 2110
5596 
5597 
5610 #define DC_EVENT_WEBXDC_STATUS_UPDATE 2120
5611 
5612 
5618 #define DC_EVENT_DATA1_IS_STRING(e) 0 // not used anymore
5619 #define DC_EVENT_DATA2_IS_STRING(e) ((e)==DC_EVENT_CONFIGURE_PROGRESS || (e)==DC_EVENT_IMEX_FILE_WRITTEN || ((e)>=100 && (e)<=499))
5620 
5621 
5622 /*
5623  * Values for dc_get|set_config("show_emails")
5624  */
5625 #define DC_SHOW_EMAILS_OFF 0
5626 #define DC_SHOW_EMAILS_ACCEPTED_CONTACTS 1
5627 #define DC_SHOW_EMAILS_ALL 2
5628 
5629 
5630 /*
5631  * Values for dc_get|set_config("media_quality")
5632  */
5633 #define DC_MEDIA_QUALITY_BALANCED 0
5634 #define DC_MEDIA_QUALITY_WORSE 1
5635 
5636 
5637 /*
5638  * Values for dc_get|set_config("key_gen_type")
5639  */
5640 #define DC_KEY_GEN_DEFAULT 0
5641 #define DC_KEY_GEN_RSA2048 1
5642 #define DC_KEY_GEN_ED25519 2
5643 
5644 
5666 #define DC_PROVIDER_STATUS_OK 1
5667 
5679 #define DC_PROVIDER_STATUS_PREPARATION 2
5680 
5693 #define DC_PROVIDER_STATUS_BROKEN 3
5694 
5715 #define DC_CHAT_VISIBILITY_NORMAL 0
5716 
5729 #define DC_CHAT_VISIBILITY_ARCHIVED 1
5730 
5735 #define DC_CHAT_VISIBILITY_PINNED 2
5736 
5756 #define DC_DOWNLOAD_DONE 0
5757 
5761 #define DC_DOWNLOAD_AVAILABLE 10
5762 
5766 #define DC_DOWNLOAD_FAILURE 20
5767 
5771 #define DC_DOWNLOAD_IN_PROGRESS 1000
5772 
5773 
5774 
5799 #define DC_STR_NOMESSAGES 1
5803 
5807 #define DC_STR_SELF 2
5808 
5812 #define DC_STR_DRAFT 3
5813 
5817 #define DC_STR_VOICEMESSAGE 7
5818 
5822 #define DC_STR_IMAGE 9
5823 
5827 #define DC_STR_VIDEO 10
5828 
5832 #define DC_STR_AUDIO 11
5833 
5837 #define DC_STR_FILE 12
5838 
5844 #define DC_STR_MSGGRPNAME 15
5845 
5849 #define DC_STR_MSGGRPIMGCHANGED 16
5850 
5855 #define DC_STR_MSGADDMEMBER 17
5856 
5861 #define DC_STR_MSGDELMEMBER 18
5862 
5866 #define DC_STR_MSGGROUPLEFT 19
5867 
5871 #define DC_STR_GIF 23
5872 
5876 #define DC_STR_ENCRYPTEDMSG 24
5877 
5881 #define DC_STR_E2E_AVAILABLE 25
5882 
5884 #define DC_STR_ENCR_TRANSP 27
5885 
5889 #define DC_STR_ENCR_NONE 28
5890 
5894 #define DC_STR_CANTDECRYPT_MSG_BODY 29
5895 
5899 #define DC_STR_FINGERPRINTS 30
5900 
5904 #define DC_STR_READRCPT 31
5905 
5910 #define DC_STR_READRCPT_MAILBODY 32
5911 
5915 #define DC_STR_MSGGRPIMGDELETED 33
5916 
5920 #define DC_STR_E2E_PREFERRED 34
5921 
5926 #define DC_STR_CONTACT_VERIFIED 35
5927 
5932 #define DC_STR_CONTACT_NOT_VERIFIED 36
5933 
5938 #define DC_STR_CONTACT_SETUP_CHANGED 37
5939 
5943 #define DC_STR_ARCHIVEDCHATS 40
5944 
5948 #define DC_STR_AC_SETUP_MSG_SUBJECT 42
5949 
5953 #define DC_STR_AC_SETUP_MSG_BODY 43
5954 
5959 #define DC_STR_CANNOT_LOGIN 60
5960 
5967 #define DC_STR_MSGACTIONBYUSER 62
5968 
5974 #define DC_STR_MSGACTIONBYME 63
5975 
5979 #define DC_STR_MSGLOCATIONENABLED 64
5980 
5984 #define DC_STR_MSGLOCATIONDISABLED 65
5985 
5989 #define DC_STR_LOCATION 66
5990 
5994 #define DC_STR_STICKER 67
5995 
5999 #define DC_STR_DEVICE_MESSAGES 68
6000 
6004 #define DC_STR_SAVED_MESSAGES 69
6005 
6009 #define DC_STR_DEVICE_MESSAGES_HINT 70
6010 
6014 #define DC_STR_WELCOME_MESSAGE 71
6015 
6019 #define DC_STR_UNKNOWN_SENDER_FOR_CHAT 72
6020 
6026 #define DC_STR_SUBJECT_FOR_NEW_CONTACT 73
6027 
6032 #define DC_STR_FAILED_SENDING_TO 74
6033 
6037 #define DC_STR_EPHEMERAL_DISABLED 75
6038 
6044 #define DC_STR_EPHEMERAL_SECONDS 76
6045 
6049 #define DC_STR_EPHEMERAL_MINUTE 77
6050 
6054 #define DC_STR_EPHEMERAL_HOUR 78
6055 
6059 #define DC_STR_EPHEMERAL_DAY 79
6060 
6064 #define DC_STR_EPHEMERAL_WEEK 80
6065 
6067 #define DC_STR_EPHEMERAL_FOUR_WEEKS 81
6068 
6072 #define DC_STR_VIDEOCHAT_INVITATION 82
6073 
6078 #define DC_STR_VIDEOCHAT_INVITE_MSG_BODY 83
6079 
6084 #define DC_STR_CONFIGURATION_FAILED 84
6085 
6090 #define DC_STR_BAD_TIME_MSG_BODY 85
6091 
6095 #define DC_STR_UPDATE_REMINDER_MSG_BODY 86
6096 
6100 #define DC_STR_ERROR_NO_NETWORK 87
6101 
6105 #define DC_STR_PROTECTION_ENABLED 88
6106 
6110 #define DC_STR_PROTECTION_DISABLED 89
6111 
6116 #define DC_STR_REPLY_NOUN 90
6117 
6121 #define DC_STR_SELF_DELETED_MSG_BODY 91
6122 
6126 #define DC_STR_SERVER_TURNED_OFF 92
6127 
6131 //
6133 #define DC_STR_EPHEMERAL_MINUTES 93
6134 
6138 //
6140 #define DC_STR_EPHEMERAL_HOURS 94
6141 
6145 //
6147 #define DC_STR_EPHEMERAL_DAYS 95
6148 
6152 //
6154 #define DC_STR_EPHEMERAL_WEEKS 96
6155 
6159 #define DC_STR_FORWARDED 97
6160 
6166 #define DC_STR_QUOTA_EXCEEDING_MSG_BODY 98
6167 
6175 #define DC_STR_PARTIAL_DOWNLOAD_MSG_BODY 99
6176 
6182 #define DC_STR_DOWNLOAD_AVAILABILITY 100
6183 
6187 #define DC_STR_SYNC_MSG_SUBJECT 101
6188 
6197 #define DC_STR_SYNC_MSG_BODY 102
6198 
6202 #define DC_STR_INCOMING_MESSAGES 103
6203 
6207 #define DC_STR_OUTGOING_MESSAGES 104
6208 
6214 #define DC_STR_STORAGE_ON_DOMAIN 105
6215 
6219 #define DC_STR_ONE_MOMENT 106
6220 
6224 #define DC_STR_CONNECTED 107
6225 
6229 #define DC_STR_CONNTECTING 108
6230 
6234 #define DC_STR_UPDATING 109
6235 
6239 #define DC_STR_SENDING 110
6240 
6244 #define DC_STR_LAST_MSG_SENT_SUCCESSFULLY 111
6245 
6251 #define DC_STR_ERROR 112
6252 
6256 #define DC_STR_NOT_SUPPORTED_BY_PROVIDER 113
6257 
6261 #define DC_STR_MESSAGES 114
6262 
6266 #define DC_STR_BROADCAST_LIST 115
6267 
6271 #define DC_STR_PART_OF_TOTAL_USED 116
6272 
6281 #define DC_STR_SECURE_JOIN_STARTED 117
6282 
6291 #define DC_STR_SECURE_JOIN_REPLIES 118
6292 
6298 #define DC_STR_SETUP_CONTACT_QR_DESC 119
6299 
6305 #define DC_STR_SECURE_JOIN_GROUP_QR_DESC 120
6306 
6312 #ifdef PY_CFFI_INC
6313 /* Helper utility to locate the header file when building python bindings. */
6314 char* _dc_header_file_location(void) {
6315  return __FILE__;
6316 }
6317 #endif
6318 
6319 
6320 #ifdef __cplusplus
6321 }
6322 #endif
6323 #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 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 email address.
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 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 mime type of the 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 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 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 width of image or 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 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_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 a 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 ephemeral timer duration for 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 file from inside an webxdc message.
dc_contact_t::dc_contact_get_addr
char * dc_contact_get_addr(const dc_contact_t *contact)
Get email address.
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 height of image or 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_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_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 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 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 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 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 authorisation.
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 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 the 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)
An webxdc instance send 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 a 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_context_t::dc_get_webxdc_status_updates
char * dc_get_webxdc_status_updates(dc_context_t *context, uint32_t msg_id, uint32_t status_update_id)
Get webxdc status updates.
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 base file name without 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 timestamp of 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 email.
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 a 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.