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 
199 dc_context_t* dc_context_new (const char* os_name, const char* dbfile, const char* blobdir);
200 
201 
213 void dc_context_unref (dc_context_t* context);
214 
215 
227 uint32_t dc_get_id (dc_context_t* context);
228 
229 
246 
247 
256 char* dc_get_blobdir (const dc_context_t* context);
257 
258 
376 int dc_set_config (dc_context_t* context, const char* key, const char* value);
377 
378 
404 char* dc_get_config (dc_context_t* context, const char* key);
405 
406 
418 int dc_set_stock_translation(dc_context_t* context, uint32_t stock_id, const char* stock_msg);
419 
420 
435 int dc_set_config_from_qr (dc_context_t* context, const char* qr);
436 
437 
452 char* dc_get_info (const dc_context_t* context);
453 
454 
484 char* dc_get_oauth2_url (dc_context_t* context, const char* addr, const char* redirect_uri);
485 
486 
487 #define DC_CONNECTIVITY_NOT_CONNECTED 1000
488 #define DC_CONNECTIVITY_CONNECTING 2000
489 #define DC_CONNECTIVITY_WORKING 3000
490 #define DC_CONNECTIVITY_CONNECTED 4000
491 
492 
513 int dc_get_connectivity (dc_context_t* context);
514 
515 
531 char* dc_get_connectivity_html (dc_context_t* context);
532 
533 
538 int dc_all_work_done (dc_context_t* context);
539 
540 
541 // connect
542 
593 void dc_configure (dc_context_t* context);
594 
595 
615 int dc_is_configured (const dc_context_t* context);
616 
617 
628 void dc_start_io (dc_context_t* context);
629 
644 void dc_stop_io(dc_context_t* context);
645 
668 void dc_maybe_network (dc_context_t* context);
669 
670 
671 
690 int dc_preconfigure_keypair (dc_context_t* context, const char *addr, const char *public_data, const char *secret_data);
691 
692 
693 // handle chatlists
694 
695 #define DC_GCL_ARCHIVED_ONLY 0x01
696 #define DC_GCL_NO_SPECIALS 0x02
697 #define DC_GCL_ADD_ALLDONE_HINT 0x04
698 #define DC_GCL_FOR_FORWARDING 0x08
699 
700 
749 dc_chatlist_t* dc_get_chatlist (dc_context_t* context, int flags, const char* query_str, uint32_t query_id);
750 
751 
752 // handle chats
753 
767 uint32_t dc_create_chat_by_contact_id (dc_context_t* context, uint32_t contact_id);
768 
769 
781 uint32_t dc_get_chat_id_by_contact_id (dc_context_t* context, uint32_t contact_id);
782 
783 
829 uint32_t dc_prepare_msg (dc_context_t* context, uint32_t chat_id, dc_msg_t* msg);
830 
831 
869 uint32_t dc_send_msg (dc_context_t* context, uint32_t chat_id, dc_msg_t* msg);
870 
886 uint32_t dc_send_msg_sync (dc_context_t* context, uint32_t chat_id, dc_msg_t* msg);
887 
888 
908 uint32_t dc_send_text_msg (dc_context_t* context, uint32_t chat_id, const char* text_to_send);
909 
910 
944 uint32_t dc_send_videochat_invitation (dc_context_t* context, uint32_t chat_id);
945 
946 
972 void dc_set_draft (dc_context_t* context, uint32_t chat_id, dc_msg_t* msg);
973 
974 
1022 uint32_t dc_add_device_msg (dc_context_t* context, const char* label, dc_msg_t* msg);
1023 
1034 int dc_was_device_msg_ever_added (dc_context_t* context, const char* label);
1035 
1036 
1049 dc_msg_t* dc_get_draft (dc_context_t* context, uint32_t chat_id);
1050 
1051 
1052 #define DC_GCM_ADDDAYMARKER 0x01
1053 #define DC_GCM_INFO_ONLY 0x02
1054 
1055 
1077 dc_array_t* dc_get_chat_msgs (dc_context_t* context, uint32_t chat_id, uint32_t flags, uint32_t marker1before);
1078 
1079 
1088 int dc_get_msg_cnt (dc_context_t* context, uint32_t chat_id);
1089 
1090 
1104 int dc_get_fresh_msg_cnt (dc_context_t* context, uint32_t chat_id);
1105 
1106 
1107 
1122 int dc_estimate_deletion_cnt (dc_context_t* context, int from_server, int64_t seconds);
1123 
1124 
1144 
1145 
1159 void dc_marknoticed_chat (dc_context_t* context, uint32_t chat_id);
1160 
1161 
1179 dc_array_t* dc_get_chat_media (dc_context_t* context, uint32_t chat_id, int msg_type, int msg_type2, int msg_type3);
1180 
1181 
1204 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);
1205 
1206 
1222 int dc_set_chat_protection (dc_context_t* context, uint32_t chat_id, int protect);
1223 
1224 
1236 void dc_set_chat_visibility (dc_context_t* context, uint32_t chat_id, int visibility);
1237 
1238 
1264 void dc_delete_chat (dc_context_t* context, uint32_t chat_id);
1265 
1279 void dc_block_chat (dc_context_t* context, uint32_t chat_id);
1280 
1290 void dc_accept_chat (dc_context_t* context, uint32_t chat_id);
1291 
1314 dc_array_t* dc_get_chat_contacts (dc_context_t* context, uint32_t chat_id);
1315 
1326 char* dc_get_chat_encrinfo (dc_context_t* context, uint32_t chat_id);
1327 
1339 uint32_t dc_get_chat_ephemeral_timer (dc_context_t* context, uint32_t chat_id);
1340 
1364 dc_array_t* dc_search_msgs (dc_context_t* context, uint32_t chat_id, const char* query);
1365 
1366 
1377 dc_chat_t* dc_get_chat (dc_context_t* context, uint32_t chat_id);
1378 
1379 
1380 // handle group chats
1381 
1410 uint32_t dc_create_group_chat (dc_context_t* context, int protect, const char* name);
1411 
1412 
1440 uint32_t dc_create_broadcast_list (dc_context_t* context);
1441 
1442 
1453 int dc_is_contact_in_chat (dc_context_t* context, uint32_t chat_id, uint32_t contact_id);
1454 
1455 
1472 int dc_add_contact_to_chat (dc_context_t* context, uint32_t chat_id, uint32_t contact_id);
1473 
1474 
1489 int dc_remove_contact_from_chat (dc_context_t* context, uint32_t chat_id, uint32_t contact_id);
1490 
1491 
1506 int dc_set_chat_name (dc_context_t* context, uint32_t chat_id, const char* name);
1507 
1525 int dc_set_chat_ephemeral_timer (dc_context_t* context, uint32_t chat_id, uint32_t timer);
1526 
1546 int dc_set_chat_profile_image (dc_context_t* context, uint32_t chat_id, const char* image);
1547 
1548 
1549 
1571 int dc_set_chat_mute_duration (dc_context_t* context, uint32_t chat_id, int64_t duration);
1572 
1573 // handle messages
1574 
1587 char* dc_get_msg_info (dc_context_t* context, uint32_t msg_id);
1588 
1589 
1637 char* dc_get_msg_html (dc_context_t* context, uint32_t msg_id);
1638 
1639 
1659 void dc_download_full_msg (dc_context_t* context, int msg_id);
1660 
1661 
1676 char* dc_get_mime_headers (dc_context_t* context, uint32_t msg_id);
1677 
1678 
1688 void dc_delete_msgs (dc_context_t* context, const uint32_t* msg_ids, int msg_cnt);
1689 
1690 
1700 void dc_forward_msgs (dc_context_t* context, const uint32_t* msg_ids, int msg_cnt, uint32_t chat_id);
1701 
1702 
1728 void dc_markseen_msgs (dc_context_t* context, const uint32_t* msg_ids, int msg_cnt);
1729 
1730 
1743 dc_msg_t* dc_get_msg (dc_context_t* context, uint32_t msg_id);
1744 
1745 
1746 // handle contacts
1747 
1761 int dc_may_be_valid_addr (const char* addr);
1762 
1763 
1777 uint32_t dc_lookup_contact_id_by_addr (dc_context_t* context, const char* addr);
1778 
1779 
1800 uint32_t dc_create_contact (dc_context_t* context, const char* name, const char* addr);
1801 
1802 
1803 #define DC_GCL_VERIFIED_ONLY 0x01
1804 #define DC_GCL_ADD_SELF 0x02
1805 
1806 
1830 int dc_add_address_book (dc_context_t* context, const char* addr_book);
1831 
1832 
1849 dc_array_t* dc_get_contacts (dc_context_t* context, uint32_t flags, const char* query);
1850 
1851 
1860 int dc_get_blocked_cnt (dc_context_t* context);
1861 
1862 
1872 
1873 
1883 void dc_block_contact (dc_context_t* context, uint32_t contact_id, int block);
1884 
1885 
1896 char* dc_get_contact_encrinfo (dc_context_t* context, uint32_t contact_id);
1897 
1898 
1910 int dc_delete_contact (dc_context_t* context, uint32_t contact_id);
1911 
1912 
1926 dc_contact_t* dc_get_contact (dc_context_t* context, uint32_t contact_id);
1927 
1928 
1929 // import/export and tools
1930 
1931 #define DC_IMEX_EXPORT_SELF_KEYS 1 // param1 is a directory where the keys are written to
1932 #define DC_IMEX_IMPORT_SELF_KEYS 2 // param1 is a directory where the keys are searched in and read from
1933 #define DC_IMEX_EXPORT_BACKUP 11 // param1 is a directory where the backup is written to
1934 #define DC_IMEX_IMPORT_BACKUP 12 // param1 is the file with the backup to import
1935 
1936 
1980 void dc_imex (dc_context_t* context, int what, const char* param1, const char* param2);
1981 
1982 
2032 char* dc_imex_has_backup (dc_context_t* context, const char* dir);
2033 
2034 
2080 char* dc_initiate_key_transfer (dc_context_t* context);
2081 
2082 
2103 int dc_continue_key_transfer (dc_context_t* context, uint32_t msg_id, const char* setup_code);
2104 
2105 
2122 void dc_stop_ongoing_process (dc_context_t* context);
2123 
2124 
2125 // out-of-band verification
2126 
2127 #define DC_QR_ASK_VERIFYCONTACT 200 // id=contact
2128 #define DC_QR_ASK_VERIFYGROUP 202 // text1=groupname
2129 #define DC_QR_FPR_OK 210 // id=contact
2130 #define DC_QR_FPR_MISMATCH 220 // id=contact
2131 #define DC_QR_FPR_WITHOUT_ADDR 230 // test1=formatted fingerprint
2132 #define DC_QR_ACCOUNT 250 // text1=domain
2133 #define DC_QR_WEBRTC_INSTANCE 260 // text1=domain, text2=instance pattern
2134 #define DC_QR_ADDR 320 // id=contact
2135 #define DC_QR_TEXT 330 // text1=text
2136 #define DC_QR_URL 332 // text1=URL
2137 #define DC_QR_ERROR 400 // text1=error string
2138 #define DC_QR_WITHDRAW_VERIFYCONTACT 500
2139 #define DC_QR_WITHDRAW_VERIFYGROUP 502 // text1=groupname
2140 #define DC_QR_REVIVE_VERIFYCONTACT 510
2141 #define DC_QR_REVIVE_VERIFYGROUP 512 // text1=groupname
2142 
2219 dc_lot_t* dc_check_qr (dc_context_t* context, const char* qr);
2220 
2221 
2243 char* dc_get_securejoin_qr (dc_context_t* context, uint32_t chat_id);
2244 
2245 
2281 uint32_t dc_join_securejoin (dc_context_t* context, const char* qr);
2282 
2283 
2284 // location streaming
2285 
2286 
2303 void dc_send_locations_to_chat (dc_context_t* context, uint32_t chat_id, int seconds);
2304 
2305 
2319 int dc_is_sending_locations_to_chat (dc_context_t* context, uint32_t chat_id);
2320 
2321 
2349 int dc_set_location (dc_context_t* context, double latitude, double longitude, double accuracy);
2350 
2351 
2412 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);
2413 
2414 
2425 void dc_delete_all_locations (dc_context_t* context);
2426 
2427 
2440 void dc_str_unref (char* str);
2441 
2442 
2489 dc_accounts_t* dc_accounts_new (const char* os_name, const char* dir);
2490 
2491 
2498 void dc_accounts_unref (dc_accounts_t* accounts);
2499 
2500 
2516 uint32_t dc_accounts_add_account (dc_accounts_t* accounts);
2517 
2518 
2533 uint32_t dc_accounts_migrate_account (dc_accounts_t* accounts, const char* dbfile);
2534 
2535 
2547 int dc_accounts_remove_account (dc_accounts_t* accounts, uint32_t account_id);
2548 
2549 
2559 
2560 
2572 dc_context_t* dc_accounts_get_account (dc_accounts_t* accounts, uint32_t account_id);
2573 
2574 
2591 
2592 
2601 int dc_accounts_select_account (dc_accounts_t* accounts, uint32_t account_id);
2602 
2603 
2619 
2620 
2630 void dc_accounts_start_io (dc_accounts_t* accounts);
2631 
2632 
2641 void dc_accounts_stop_io (dc_accounts_t* accounts);
2642 
2643 
2653 void dc_accounts_maybe_network (dc_accounts_t* accounts);
2654 
2655 
2669 
2670 
2691 
2692 
2711 void dc_array_unref (dc_array_t* array);
2712 
2713 
2721 size_t dc_array_get_cnt (const dc_array_t* array);
2722 
2723 
2732 uint32_t dc_array_get_id (const dc_array_t* array, size_t index);
2733 
2734 
2744 double dc_array_get_latitude (const dc_array_t* array, size_t index);
2745 
2746 
2756 double dc_array_get_longitude (const dc_array_t* array, size_t index);
2757 
2758 
2769 double dc_array_get_accuracy (const dc_array_t* array, size_t index);
2770 
2771 
2781 int64_t dc_array_get_timestamp (const dc_array_t* array, size_t index);
2782 
2783 
2793 uint32_t dc_array_get_chat_id (const dc_array_t* array, size_t index);
2794 
2795 
2805 uint32_t dc_array_get_contact_id (const dc_array_t* array, size_t index);
2806 
2807 
2817 uint32_t dc_array_get_msg_id (const dc_array_t* array, size_t index);
2818 
2819 
2834 char* dc_array_get_marker (const dc_array_t* array, size_t index);
2835 
2836 
2847 int dc_array_is_independent (const dc_array_t* array, size_t index);
2848 
2849 
2859 int dc_array_search_id (const dc_array_t* array, uint32_t needle, size_t* ret_index);
2860 
2861 
2903 void dc_chatlist_unref (dc_chatlist_t* chatlist);
2904 
2905 
2913 size_t dc_chatlist_get_cnt (const dc_chatlist_t* chatlist);
2914 
2915 
2927 uint32_t dc_chatlist_get_chat_id (const dc_chatlist_t* chatlist, size_t index);
2928 
2929 
2941 uint32_t dc_chatlist_get_msg_id (const dc_chatlist_t* chatlist, size_t index);
2942 
2943 
2970 dc_lot_t* dc_chatlist_get_summary (const dc_chatlist_t* chatlist, size_t index, dc_chat_t* chat);
2971 
2972 
2992 dc_lot_t* dc_chatlist_get_summary2 (dc_context_t* context, uint32_t chat_id, uint32_t msg_id);
2993 
2994 
3003 
3004 
3021 char* dc_chat_get_info_json (dc_context_t* context, size_t chat_id);
3022 
3033 #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)
3034 #define DC_CHAT_ID_ARCHIVED_LINK 6 // only an indicator in a chatlist
3035 #define DC_CHAT_ID_ALLDONE_HINT 7 // only an indicator in a chatlist
3036 #define DC_CHAT_ID_LAST_SPECIAL 9 // larger chat IDs are "real" chats, their messages are "real" messages.
3037 
3038 
3046 void dc_chat_unref (dc_chat_t* chat);
3047 
3048 
3061 uint32_t dc_chat_get_id (const dc_chat_t* chat);
3062 
3063 
3094 int dc_chat_get_type (const dc_chat_t* chat);
3095 
3096 
3108 char* dc_chat_get_name (const dc_chat_t* chat);
3109 
3110 
3124 char* dc_chat_get_profile_image (const dc_chat_t* chat);
3125 
3126 
3139 uint32_t dc_chat_get_color (const dc_chat_t* chat);
3140 
3141 
3150 int dc_chat_get_visibility (const dc_chat_t* chat);
3151 
3152 
3169 int dc_chat_is_contact_request (const dc_chat_t* chat);
3170 
3171 
3192 int dc_chat_is_unpromoted (const dc_chat_t* chat);
3193 
3194 
3203 int dc_chat_is_self_talk (const dc_chat_t* chat);
3204 
3205 
3220 int dc_chat_is_device_talk (const dc_chat_t* chat);
3221 
3222 
3234 int dc_chat_can_send (const dc_chat_t* chat);
3235 
3236 
3247 int dc_chat_is_protected (const dc_chat_t* chat);
3248 
3249 
3260 int dc_chat_is_sending_locations (const dc_chat_t* chat);
3261 
3262 
3270 int dc_chat_is_muted (const dc_chat_t* chat);
3271 
3272 
3280 int64_t dc_chat_get_remaining_mute_duration (const dc_chat_t* chat);
3281 
3282 
3292 #define DC_MSG_ID_MARKER1 1
3293 #define DC_MSG_ID_DAYMARKER 9
3294 #define DC_MSG_ID_LAST_SPECIAL 9
3295 
3296 
3309 dc_msg_t* dc_msg_new (dc_context_t* context, int viewtype);
3310 
3311 
3319 void dc_msg_unref (dc_msg_t* msg);
3320 
3321 
3330 uint32_t dc_msg_get_id (const dc_msg_t* msg);
3331 
3332 
3347 uint32_t dc_msg_get_from_id (const dc_msg_t* msg);
3348 
3349 
3358 uint32_t dc_msg_get_chat_id (const dc_msg_t* msg);
3359 
3360 
3369 int dc_msg_get_viewtype (const dc_msg_t* msg);
3370 
3371 
3414 int dc_msg_get_state (const dc_msg_t* msg);
3415 
3416 
3433 int64_t dc_msg_get_timestamp (const dc_msg_t* msg);
3434 
3435 
3447 int64_t dc_msg_get_received_timestamp (const dc_msg_t* msg);
3448 
3449 
3463 int64_t dc_msg_get_sort_timestamp (const dc_msg_t* msg);
3464 
3465 
3485 char* dc_msg_get_text (const dc_msg_t* msg);
3486 
3487 
3505 char* dc_msg_get_subject (const dc_msg_t* msg);
3506 
3520 char* dc_msg_get_file (const dc_msg_t* msg);
3521 
3522 
3533 char* dc_msg_get_filename (const dc_msg_t* msg);
3534 
3535 
3546 char* dc_msg_get_filemime (const dc_msg_t* msg);
3547 
3548 
3559 uint64_t dc_msg_get_filebytes (const dc_msg_t* msg);
3560 
3561 
3576 int dc_msg_get_width (const dc_msg_t* msg);
3577 
3578 
3593 int dc_msg_get_height (const dc_msg_t* msg);
3594 
3595 
3607 int dc_msg_get_duration (const dc_msg_t* msg);
3608 
3609 
3617 int dc_msg_get_showpadlock (const dc_msg_t* msg);
3618 
3628 int dc_msg_is_bot (const dc_msg_t* msg);
3629 
3641 uint32_t dc_msg_get_ephemeral_timer (const dc_msg_t* msg);
3642 
3655 int64_t dc_msg_get_ephemeral_timestamp (const dc_msg_t* msg);
3656 
3657 
3680 dc_lot_t* dc_msg_get_summary (const dc_msg_t* msg, const dc_chat_t* chat);
3681 
3682 
3694 char* dc_msg_get_summarytext (const dc_msg_t* msg, int approx_characters);
3695 
3696 
3725 char* dc_msg_get_override_sender_name(const dc_msg_t* msg);
3726 
3727 
3728 
3744 
3745 
3755 int dc_msg_has_location (const dc_msg_t* msg);
3756 
3757 
3768 int dc_msg_is_sent (const dc_msg_t* msg);
3769 
3770 
3787 int dc_msg_is_forwarded (const dc_msg_t* msg);
3788 
3789 
3807 int dc_msg_is_info (const dc_msg_t* msg);
3808 
3809 
3828 int dc_msg_get_info_type (const dc_msg_t* msg);
3829 
3830 
3831 // DC_INFO* uses the same values as SystemMessage in rust-land
3832 #define DC_INFO_PROTECTION_ENABLED 11
3833 #define DC_INFO_PROTECTION_DISABLED 12
3834 
3835 
3848 int dc_msg_is_increation (const dc_msg_t* msg);
3849 
3850 
3865 int dc_msg_is_setupmessage (const dc_msg_t* msg);
3866 
3867 
3882 char* dc_msg_get_setupcodebegin (const dc_msg_t* msg);
3883 
3884 
3898 char* dc_msg_get_videochat_url (const dc_msg_t* msg);
3899 
3900 
3920 char* dc_msg_get_error (const dc_msg_t* msg);
3921 
3922 
3951 int dc_msg_get_videochat_type (const dc_msg_t* msg);
3952 
3953 #define DC_VIDEOCHATTYPE_UNKNOWN 0
3954 #define DC_VIDEOCHATTYPE_BASICWEBRTC 1
3955 #define DC_VIDEOCHATTYPE_JITSI 2
3956 
3957 
3981 int dc_msg_has_html (dc_msg_t* msg);
3982 
3983 
4006 int dc_msg_get_download_state (const dc_msg_t* msg);
4007 
4008 
4017 void dc_msg_set_text (dc_msg_t* msg, const char* text);
4018 
4019 
4044 void dc_msg_set_html (dc_msg_t* msg, const char* html);
4045 
4046 
4059 void dc_msg_set_override_sender_name(dc_msg_t* msg, const char* name);
4060 
4061 
4074 void dc_msg_set_file (dc_msg_t* msg, const char* file, const char* filemime);
4075 
4076 
4087 void dc_msg_set_dimension (dc_msg_t* msg, int width, int height);
4088 
4089 
4099 void dc_msg_set_duration (dc_msg_t* msg, int duration);
4100 
4101 
4118 void dc_msg_set_location (dc_msg_t* msg, double latitude, double longitude);
4119 
4120 
4142 void dc_msg_latefiling_mediasize (dc_msg_t* msg, int width, int height, int duration);
4143 
4144 
4158 void dc_msg_set_quote (dc_msg_t* msg, const dc_msg_t* quote);
4159 
4160 
4175 char* dc_msg_get_quoted_text (const dc_msg_t* msg);
4176 
4177 
4200 
4201 
4223 #define DC_CONTACT_ID_SELF 1
4224 #define DC_CONTACT_ID_INFO 2 // centered messages as "member added", used in all chats
4225 #define DC_CONTACT_ID_DEVICE 5 // messages "update info" in the device-chat
4226 #define DC_CONTACT_ID_LAST_SPECIAL 9
4227 
4228 
4236 void dc_contact_unref (dc_contact_t* contact);
4237 
4238 
4246 uint32_t dc_contact_get_id (const dc_contact_t* contact);
4247 
4248 
4257 char* dc_contact_get_addr (const dc_contact_t* contact);
4258 
4259 
4274 char* dc_contact_get_name (const dc_contact_t* contact);
4275 
4276 
4296 char* dc_contact_get_auth_name (const dc_contact_t* contact);
4297 
4298 
4314 char* dc_contact_get_display_name (const dc_contact_t* contact);
4315 
4316 
4317 // dc_contact_get_first_name is removed,
4318 // the following define is to make upgrading more smoothly.
4319 #define dc_contact_get_first_name dc_contact_get_display_name
4320 
4321 
4336 char* dc_contact_get_name_n_addr (const dc_contact_t* contact);
4337 
4338 
4350 char* dc_contact_get_profile_image (const dc_contact_t* contact);
4351 
4352 
4364 uint32_t dc_contact_get_color (const dc_contact_t* contact);
4365 
4366 
4378 char* dc_contact_get_status (const dc_contact_t* contact);
4379 
4389 int dc_contact_is_blocked (const dc_contact_t* contact);
4390 
4391 
4403 int dc_contact_is_verified (dc_contact_t* contact);
4404 
4405 
4425 dc_provider_t* dc_provider_new_from_email (const dc_context_t* context, const char* email);
4426 
4427 
4439 char* dc_provider_get_overview_page (const dc_provider_t* provider);
4440 
4441 
4456 char* dc_provider_get_before_login_hint (const dc_provider_t* provider);
4457 
4458 
4469 int dc_provider_get_status (const dc_provider_t* provider);
4470 
4471 
4478 void dc_provider_unref (dc_provider_t* provider);
4479 
4480 
4493 #define DC_TEXT1_DRAFT 1
4494 #define DC_TEXT1_USERNAME 2
4495 #define DC_TEXT1_SELF 3
4496 
4497 
4507 void dc_lot_unref (dc_lot_t* lot);
4508 
4509 
4519 char* dc_lot_get_text1 (const dc_lot_t* lot);
4520 
4521 
4531 char* dc_lot_get_text2 (const dc_lot_t* lot);
4532 
4533 
4543 int dc_lot_get_text1_meaning (const dc_lot_t* lot);
4544 
4545 
4553 int dc_lot_get_state (const dc_lot_t* lot);
4554 
4555 
4563 uint32_t dc_lot_get_id (const dc_lot_t* lot);
4564 
4565 
4575 int64_t dc_lot_get_timestamp (const dc_lot_t* lot);
4576 
4577 
4607 #define DC_MSG_TEXT 10
4608 
4609 
4621 #define DC_MSG_IMAGE 20
4622 
4623 
4629 #define DC_MSG_GIF 21
4630 
4631 
4637 #define DC_MSG_STICKER 23
4638 
4639 
4645 #define DC_MSG_AUDIO 40
4646 
4647 
4654 #define DC_MSG_VOICE 41
4655 
4656 
4665 #define DC_MSG_VIDEO 50
4666 
4667 
4673 #define DC_MSG_FILE 60
4674 
4675 
4684 #define DC_MSG_VIDEOCHAT_INVITATION 70
4685 
4705 #define DC_STATE_UNDEFINED 0
4706 
4710 #define DC_STATE_IN_FRESH 10
4711 
4715 #define DC_STATE_IN_NOTICED 13
4716 
4720 #define DC_STATE_IN_SEEN 16
4721 
4725 #define DC_STATE_OUT_PREPARING 18
4726 
4730 #define DC_STATE_OUT_DRAFT 19
4731 
4735 #define DC_STATE_OUT_PENDING 20
4736 
4740 #define DC_STATE_OUT_FAILED 24
4741 
4746 #define DC_STATE_OUT_DELIVERED 26
4747 
4751 #define DC_STATE_OUT_MDN_RCVD 28
4752 
4773 #define DC_CHAT_TYPE_UNDEFINED 0
4774 
4778 #define DC_CHAT_TYPE_SINGLE 100
4779 
4783 #define DC_CHAT_TYPE_GROUP 120
4784 
4788 #define DC_CHAT_TYPE_MAILINGLIST 140
4789 
4793 #define DC_CHAT_TYPE_BROADCAST 160
4794 
4814 #define DC_SOCKET_AUTO 0
4815 
4816 
4820 #define DC_SOCKET_SSL 1
4821 
4822 
4826 #define DC_SOCKET_STARTTLS 2
4827 
4828 
4832 #define DC_SOCKET_PLAIN 3
4833 
4857 #define DC_LP_AUTH_OAUTH2 0x2
4858 
4859 
4864 #define DC_LP_AUTH_NORMAL 0x4
4865 
4866 
4871 #define DC_LP_AUTH_FLAGS (DC_LP_AUTH_OAUTH2|DC_LP_AUTH_NORMAL) // if none of these flags are set, the default is chosen
4872 
4888 #define DC_CERTCK_AUTO 0
4889 
4894 #define DC_CERTCK_STRICT 1
4895 
4900 #define DC_CERTCK_ACCEPT_INVALID_CERTIFICATES 3
4901 
4928 
4929 
4938 
4939 
4961 
4962 
4971 
4972 
4991 int dc_event_get_id(dc_event_t* event);
4992 
4993 
5006 
5007 
5020 
5021 
5034 char* dc_event_get_data2_str(dc_event_t* event);
5035 
5036 
5046 uint32_t dc_event_get_account_id(dc_event_t* event);
5047 
5048 
5056 void dc_event_unref(dc_event_t* event);
5057 
5058 
5081 #define DC_EVENT_INFO 100
5082 
5083 
5090 #define DC_EVENT_SMTP_CONNECTED 101
5091 
5092 
5099 #define DC_EVENT_IMAP_CONNECTED 102
5100 
5107 #define DC_EVENT_SMTP_MESSAGE_SENT 103
5108 
5115 #define DC_EVENT_IMAP_MESSAGE_DELETED 104
5116 
5123 #define DC_EVENT_IMAP_MESSAGE_MOVED 105
5124 
5131 #define DC_EVENT_NEW_BLOB_FILE 150
5132 
5139 #define DC_EVENT_DELETED_BLOB_FILE 151
5140 
5149 #define DC_EVENT_WARNING 300
5150 
5151 
5169 #define DC_EVENT_ERROR 400
5170 
5171 
5182 #define DC_EVENT_ERROR_SELF_NOT_IN_GROUP 410
5183 
5184 
5195 #define DC_EVENT_MSGS_CHANGED 2000
5196 
5197 
5207 #define DC_EVENT_INCOMING_MSG 2005
5208 
5209 
5222 #define DC_EVENT_MSGS_NOTICED 2008
5223 
5224 
5232 #define DC_EVENT_MSG_DELIVERED 2010
5233 
5234 
5243 #define DC_EVENT_MSG_FAILED 2012
5244 
5245 
5253 #define DC_EVENT_MSG_READ 2015
5254 
5255 
5265 #define DC_EVENT_CHAT_MODIFIED 2020
5266 
5273 #define DC_EVENT_CHAT_EPHEMERAL_TIMER_MODIFIED 2021
5274 
5275 
5282 #define DC_EVENT_CONTACTS_CHANGED 2030
5283 
5284 
5285 
5294 #define DC_EVENT_LOCATION_CHANGED 2035
5295 
5296 
5303 #define DC_EVENT_CONFIGURE_PROGRESS 2041
5304 
5305 
5312 #define DC_EVENT_IMEX_PROGRESS 2051
5313 
5314 
5325 #define DC_EVENT_IMEX_FILE_WRITTEN 2052
5326 
5327 
5342 #define DC_EVENT_SECUREJOIN_INVITER_PROGRESS 2060
5343 
5344 
5357 #define DC_EVENT_SECUREJOIN_JOINER_PROGRESS 2061
5358 
5359 
5369 #define DC_EVENT_CONNECTIVITY_CHANGED 2100
5370 
5371 
5376 #define DC_EVENT_SELFAVATAR_CHANGED 2110
5377 
5378 
5384 #define DC_EVENT_DATA1_IS_STRING(e) 0 // not used anymore
5385 #define DC_EVENT_DATA2_IS_STRING(e) ((e)==DC_EVENT_CONFIGURE_PROGRESS || (e)==DC_EVENT_IMEX_FILE_WRITTEN || ((e)>=100 && (e)<=499))
5386 
5387 
5388 /*
5389  * Values for dc_get|set_config("show_emails")
5390  */
5391 #define DC_SHOW_EMAILS_OFF 0
5392 #define DC_SHOW_EMAILS_ACCEPTED_CONTACTS 1
5393 #define DC_SHOW_EMAILS_ALL 2
5394 
5395 
5396 /*
5397  * Values for dc_get|set_config("media_quality")
5398  */
5399 #define DC_MEDIA_QUALITY_BALANCED 0
5400 #define DC_MEDIA_QUALITY_WORSE 1
5401 
5402 
5403 /*
5404  * Values for dc_get|set_config("key_gen_type")
5405  */
5406 #define DC_KEY_GEN_DEFAULT 0
5407 #define DC_KEY_GEN_RSA2048 1
5408 #define DC_KEY_GEN_ED25519 2
5409 
5410 
5432 #define DC_PROVIDER_STATUS_OK 1
5433 
5445 #define DC_PROVIDER_STATUS_PREPARATION 2
5446 
5459 #define DC_PROVIDER_STATUS_BROKEN 3
5460 
5481 #define DC_CHAT_VISIBILITY_NORMAL 0
5482 
5495 #define DC_CHAT_VISIBILITY_ARCHIVED 1
5496 
5501 #define DC_CHAT_VISIBILITY_PINNED 2
5502 
5522 #define DC_DOWNLOAD_DONE 0
5523 
5527 #define DC_DOWNLOAD_AVAILABLE 10
5528 
5532 #define DC_DOWNLOAD_FAILURE 20
5533 
5537 #define DC_DOWNLOAD_IN_PROGRESS 1000
5538 
5539 
5540 
5565 #define DC_STR_NOMESSAGES 1
5569 
5573 #define DC_STR_SELF 2
5574 
5578 #define DC_STR_DRAFT 3
5579 
5583 #define DC_STR_VOICEMESSAGE 7
5584 
5588 #define DC_STR_IMAGE 9
5589 
5593 #define DC_STR_VIDEO 10
5594 
5598 #define DC_STR_AUDIO 11
5599 
5603 #define DC_STR_FILE 12
5604 
5609 #define DC_STR_STATUSLINE 13
5610 
5615 #define DC_STR_NEWGROUPDRAFT 14
5616 
5622 #define DC_STR_MSGGRPNAME 15
5623 
5627 #define DC_STR_MSGGRPIMGCHANGED 16
5628 
5633 #define DC_STR_MSGADDMEMBER 17
5634 
5639 #define DC_STR_MSGDELMEMBER 18
5640 
5644 #define DC_STR_MSGGROUPLEFT 19
5645 
5649 #define DC_STR_GIF 23
5650 
5654 #define DC_STR_ENCRYPTEDMSG 24
5655 
5659 #define DC_STR_E2E_AVAILABLE 25
5660 
5662 #define DC_STR_ENCR_TRANSP 27
5663 
5667 #define DC_STR_ENCR_NONE 28
5668 
5672 #define DC_STR_CANTDECRYPT_MSG_BODY 29
5673 
5677 #define DC_STR_FINGERPRINTS 30
5678 
5682 #define DC_STR_READRCPT 31
5683 
5688 #define DC_STR_READRCPT_MAILBODY 32
5689 
5693 #define DC_STR_MSGGRPIMGDELETED 33
5694 
5698 #define DC_STR_E2E_PREFERRED 34
5699 
5704 #define DC_STR_CONTACT_VERIFIED 35
5705 
5710 #define DC_STR_CONTACT_NOT_VERIFIED 36
5711 
5716 #define DC_STR_CONTACT_SETUP_CHANGED 37
5717 
5721 #define DC_STR_ARCHIVEDCHATS 40
5722 
5726 #define DC_STR_AC_SETUP_MSG_SUBJECT 42
5727 
5731 #define DC_STR_AC_SETUP_MSG_BODY 43
5732 
5737 #define DC_STR_CANNOT_LOGIN 60
5738 
5745 #define DC_STR_MSGACTIONBYUSER 62
5746 
5752 #define DC_STR_MSGACTIONBYME 63
5753 
5757 #define DC_STR_MSGLOCATIONENABLED 64
5758 
5762 #define DC_STR_MSGLOCATIONDISABLED 65
5763 
5767 #define DC_STR_LOCATION 66
5768 
5772 #define DC_STR_STICKER 67
5773 
5777 #define DC_STR_DEVICE_MESSAGES 68
5778 
5782 #define DC_STR_SAVED_MESSAGES 69
5783 
5787 #define DC_STR_DEVICE_MESSAGES_HINT 70
5788 
5792 #define DC_STR_WELCOME_MESSAGE 71
5793 
5797 #define DC_STR_UNKNOWN_SENDER_FOR_CHAT 72
5798 
5804 #define DC_STR_SUBJECT_FOR_NEW_CONTACT 73
5805 
5810 #define DC_STR_FAILED_SENDING_TO 74
5811 
5815 #define DC_STR_EPHEMERAL_DISABLED 75
5816 
5822 #define DC_STR_EPHEMERAL_SECONDS 76
5823 
5827 #define DC_STR_EPHEMERAL_MINUTE 77
5828 
5832 #define DC_STR_EPHEMERAL_HOUR 78
5833 
5837 #define DC_STR_EPHEMERAL_DAY 79
5838 
5842 #define DC_STR_EPHEMERAL_WEEK 80
5843 
5845 #define DC_STR_EPHEMERAL_FOUR_WEEKS 81
5846 
5850 #define DC_STR_VIDEOCHAT_INVITATION 82
5851 
5856 #define DC_STR_VIDEOCHAT_INVITE_MSG_BODY 83
5857 
5862 #define DC_STR_CONFIGURATION_FAILED 84
5863 
5868 #define DC_STR_BAD_TIME_MSG_BODY 85
5869 
5873 #define DC_STR_UPDATE_REMINDER_MSG_BODY 86
5874 
5878 #define DC_STR_ERROR_NO_NETWORK 87
5879 
5883 #define DC_STR_PROTECTION_ENABLED 88
5884 
5888 #define DC_STR_PROTECTION_DISABLED 89
5889 
5894 #define DC_STR_REPLY_NOUN 90
5895 
5899 #define DC_STR_SELF_DELETED_MSG_BODY 91
5900 
5904 #define DC_STR_SERVER_TURNED_OFF 92
5905 
5909 //
5911 #define DC_STR_EPHEMERAL_MINUTES 93
5912 
5916 //
5918 #define DC_STR_EPHEMERAL_HOURS 94
5919 
5923 //
5925 #define DC_STR_EPHEMERAL_DAYS 95
5926 
5930 //
5932 #define DC_STR_EPHEMERAL_WEEKS 96
5933 
5937 #define DC_STR_FORWARDED 97
5938 
5944 #define DC_STR_QUOTA_EXCEEDING_MSG_BODY 98
5945 
5953 #define DC_STR_PARTIAL_DOWNLOAD_MSG_BODY 99
5954 
5960 #define DC_STR_DOWNLOAD_AVAILABILITY 100
5961 
5965 #define DC_STR_INCOMING_MESSAGES 103
5966 
5970 #define DC_STR_OUTGOING_MESSAGES 104
5971 
5977 #define DC_STR_STORAGE_ON_DOMAIN 105
5978 
5982 #define DC_STR_ONE_MOMENT 106
5983 
5987 #define DC_STR_CONNECTED 107
5988 
5992 #define DC_STR_CONNTECTING 108
5993 
5997 #define DC_STR_UPDATING 109
5998 
6002 #define DC_STR_SENDING 110
6003 
6007 #define DC_STR_LAST_MSG_SENT_SUCCESSFULLY 111
6008 
6014 #define DC_STR_ERROR 112
6015 
6019 #define DC_STR_NOT_SUPPORTED_BY_PROVIDER 113
6020 
6024 #define DC_STR_MESSAGES 114
6025 
6029 #define DC_STR_BROADCAST_LIST 115
6030 
6034 #define DC_STR_PART_OF_TOTAL_USED 116
6035 
6041 #ifdef PY_CFFI_INC
6042 /* Helper utility to locate the header file when building python bindings. */
6043 char* _dc_header_file_location(void) {
6044  return __FILE__;
6045 }
6046 #endif
6047 
6048 
6049 #ifdef __cplusplus
6050 }
6051 #endif
6052 #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_contact_t::dc_contact_is_blocked
int dc_contact_is_blocked(const dc_contact_t *contact)
Check if a contact is blocked.
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_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.
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_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_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_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_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_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_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_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_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_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_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.