Delta Chat Core C Interface
Loading...
Searching...
No Matches
deltachat.h
1#ifndef __DELTACHAT_H__
2#define __DELTACHAT_H__
3#ifdef __cplusplus
4extern "C" {
5#endif
6
7
8#ifndef PY_CFFI
9#include <stdint.h>
10#include <time.h>
11#endif
12
13
14typedef struct _dc_context dc_context_t;
15typedef struct _dc_accounts dc_accounts_t;
16typedef struct _dc_array dc_array_t;
17typedef struct _dc_chatlist dc_chatlist_t;
18typedef struct _dc_chat dc_chat_t;
19typedef struct _dc_msg dc_msg_t;
20typedef struct _dc_contact dc_contact_t;
21typedef struct _dc_lot dc_lot_t;
22typedef struct _dc_provider dc_provider_t;
23typedef struct _dc_event dc_event_t;
24typedef struct _dc_event_emitter dc_event_emitter_t;
25typedef struct _dc_event_channel dc_event_channel_t;
26typedef struct _dc_jsonrpc_instance dc_jsonrpc_instance_t;
27typedef struct _dc_backup_provider dc_backup_provider_t;
28
29// Alias for backwards compatibility, use dc_event_emitter_t instead.
30typedef struct _dc_event_emitter dc_accounts_event_emitter_t;
31
236
237
247
248// create/open/config/information
249
265dc_context_t* dc_context_new (const char* os_name, const char* dbfile, const char* blobdir);
266
267
284
285
305int dc_context_open (dc_context_t *context, const char* passphrase);
306
307
320int dc_context_change_passphrase (dc_context_t* context, const char* passphrase);
321
322
331
332
345
346
358uint32_t dc_get_id (dc_context_t* context);
359
360
381
382
391char* dc_get_blobdir (const dc_context_t* context);
392
393
536int dc_set_config (dc_context_t* context, const char* key, const char* value);
537
538
564char* dc_get_config (dc_context_t* context, const char* key);
565
566
578int dc_set_stock_translation(dc_context_t* context, uint32_t stock_id, const char* stock_msg);
579
580
593int dc_set_config_from_qr (dc_context_t* context, const char* qr);
594
595
610char* dc_get_info (const dc_context_t* context);
611
612
642char* dc_get_oauth2_url (dc_context_t* context, const char* addr, const char* redirect_uri);
643
644
645#define DC_CONNECTIVITY_NOT_CONNECTED 1000
646#define DC_CONNECTIVITY_CONNECTING 2000
647#define DC_CONNECTIVITY_WORKING 3000
648#define DC_CONNECTIVITY_CONNECTED 4000
649
650
672
673
690
691
692#define DC_PUSH_NOT_CONNECTED 0
693#define DC_PUSH_HEARTBEAT 1
694#define DC_PUSH_CONNECTED 2
695
708
709
710// connect
711
763
764
784int dc_is_configured (const dc_context_t* context);
785
786
797void dc_start_io (dc_context_t* context);
798
814
838
839
840
856int dc_preconfigure_keypair (dc_context_t* context, const char *secret_data);
857
858
859// handle chatlists
860
861#define DC_GCL_ARCHIVED_ONLY 0x01
862#define DC_GCL_NO_SPECIALS 0x02
863#define DC_GCL_ADD_ALLDONE_HINT 0x04
864#define DC_GCL_FOR_FORWARDING 0x08
865
866
916dc_chatlist_t* dc_get_chatlist (dc_context_t* context, int flags, const char* query_str, uint32_t query_id);
917
918
919// handle chats
920
934uint32_t dc_create_chat_by_contact_id (dc_context_t* context, uint32_t contact_id);
935
936
948uint32_t dc_get_chat_id_by_contact_id (dc_context_t* context, uint32_t contact_id);
949
950
986uint32_t dc_send_msg (dc_context_t* context, uint32_t chat_id, dc_msg_t* msg);
987
1002uint32_t dc_send_msg_sync (dc_context_t* context, uint32_t chat_id, dc_msg_t* msg);
1003
1004
1024uint32_t dc_send_text_msg (dc_context_t* context, uint32_t chat_id, const char* text_to_send);
1025
1026
1041void dc_send_edit_request (dc_context_t* context, uint32_t msg_id, const char* new_text);
1042
1043
1056 void dc_send_delete_request (dc_context_t* context, const uint32_t* msg_ids, int msg_cnt);
1057
1058
1091int dc_send_webxdc_status_update (dc_context_t* context, uint32_t msg_id, const char* json, const char* descr);
1092
1093
1124char* dc_get_webxdc_status_updates (dc_context_t* context, uint32_t msg_id, uint32_t serial);
1125
1126
1137void dc_set_webxdc_integration (dc_context_t* context, const char* file);
1138
1139
1182uint32_t dc_init_webxdc_integration (dc_context_t* context, uint32_t chat_id);
1183
1184
1250uint32_t dc_place_outgoing_call (dc_context_t* context, uint32_t chat_id, const char* place_call_info, int has_video);
1251
1252
1272 int dc_accept_incoming_call (dc_context_t* context, uint32_t msg_id, const char* accept_call_info);
1273
1274
1296 int dc_end_call (dc_context_t* context, uint32_t msg_id);
1297
1298
1322void dc_set_draft (dc_context_t* context, uint32_t chat_id, dc_msg_t* msg);
1323
1324
1372uint32_t dc_add_device_msg (dc_context_t* context, const char* label, dc_msg_t* msg);
1373
1384int dc_was_device_msg_ever_added (dc_context_t* context, const char* label);
1385
1386
1399dc_msg_t* dc_get_draft (dc_context_t* context, uint32_t chat_id);
1400
1401
1402#define DC_GCM_ADDDAYMARKER 0x01
1403#define DC_GCM_INFO_ONLY 0x02
1404
1405
1428dc_array_t* dc_get_chat_msgs (dc_context_t* context, uint32_t chat_id, uint32_t flags, uint32_t marker1before);
1429
1430
1439int dc_get_msg_cnt (dc_context_t* context, uint32_t chat_id);
1440
1441
1459int dc_get_fresh_msg_cnt (dc_context_t* context, uint32_t chat_id);
1460
1461
1475
1476
1491int dc_estimate_deletion_cnt (dc_context_t* context, int from_server, int64_t seconds);
1492
1493
1513
1514
1538
1539
1563
1564
1578void dc_marknoticed_chat (dc_context_t* context, uint32_t chat_id);
1579
1580
1601void dc_markfresh_chat (dc_context_t* context, uint32_t chat_id);
1602
1603
1622dc_array_t* dc_get_chat_media (dc_context_t* context, uint32_t chat_id, int msg_type, int msg_type2, int msg_type3);
1623
1624
1636void dc_set_chat_visibility (dc_context_t* context, uint32_t chat_id, int visibility);
1637
1638
1664void dc_delete_chat (dc_context_t* context, uint32_t chat_id);
1665
1679void dc_block_chat (dc_context_t* context, uint32_t chat_id);
1680
1693void dc_accept_chat (dc_context_t* context, uint32_t chat_id);
1694
1717dc_array_t* dc_get_chat_contacts (dc_context_t* context, uint32_t chat_id);
1718
1729char* dc_get_chat_encrinfo (dc_context_t* context, uint32_t chat_id);
1730
1742uint32_t dc_get_chat_ephemeral_timer (dc_context_t* context, uint32_t chat_id);
1743
1766dc_array_t* dc_search_msgs (dc_context_t* context, uint32_t chat_id, const char* query);
1767
1768
1779dc_chat_t* dc_get_chat (dc_context_t* context, uint32_t chat_id);
1780
1781
1782// handle group chats
1783
1809uint32_t dc_create_group_chat (dc_context_t* context, int protect, const char* name);
1810
1811
1828
1829
1840int dc_is_contact_in_chat (dc_context_t* context, uint32_t chat_id, uint32_t contact_id);
1841
1842
1859int dc_add_contact_to_chat (dc_context_t* context, uint32_t chat_id, uint32_t contact_id);
1860
1861
1876int dc_remove_contact_from_chat (dc_context_t* context, uint32_t chat_id, uint32_t contact_id);
1877
1878
1894int dc_set_chat_name (dc_context_t* context, uint32_t chat_id, const char* name);
1895
1913int dc_set_chat_ephemeral_timer (dc_context_t* context, uint32_t chat_id, uint32_t timer);
1914
1935int dc_set_chat_profile_image (dc_context_t* context, uint32_t chat_id, const char* image);
1936
1937
1938
1960int dc_set_chat_mute_duration (dc_context_t* context, uint32_t chat_id, int64_t duration);
1961
1962// handle messages
1963
1976char* dc_get_msg_info (dc_context_t* context, uint32_t msg_id);
1977
1978
2026char* dc_get_msg_html (dc_context_t* context, uint32_t msg_id);
2027
2028
2048void dc_download_full_msg (dc_context_t* context, int msg_id);
2049
2050
2060void dc_delete_msgs (dc_context_t* context, const uint32_t* msg_ids, int msg_cnt);
2061
2062
2077void dc_forward_msgs (dc_context_t* context, const uint32_t* msg_ids, int msg_cnt, uint32_t chat_id);
2078
2079
2107void dc_save_msgs (dc_context_t* context, const uint32_t* msg_ids, int msg_cnt);
2108
2109
2126int dc_resend_msgs (dc_context_t* context, const uint32_t* msg_ids, int msg_cnt);
2127
2128
2159void dc_markseen_msgs (dc_context_t* context, const uint32_t* msg_ids, int msg_cnt);
2160
2161
2174dc_msg_t* dc_get_msg (dc_context_t* context, uint32_t msg_id);
2175
2176
2177// handle contacts
2178
2192int dc_may_be_valid_addr (const char* addr);
2193
2194
2218uint32_t dc_lookup_contact_id_by_addr (dc_context_t* context, const char* addr);
2219
2220
2248uint32_t dc_create_contact (dc_context_t* context, const char* name, const char* addr);
2249
2250
2251#define DC_GCL_ADD_SELF 0x02
2252#define DC_GCL_ADDRESS 0x04
2253
2254
2278int dc_add_address_book (dc_context_t* context, const char* addr_book);
2279
2280
2289char* dc_make_vcard (dc_context_t* context, uint32_t contact_id);
2290
2291
2301dc_array_t* dc_import_vcard (dc_context_t* context, const char* vcard);
2302
2303
2320dc_array_t* dc_get_contacts (dc_context_t* context, uint32_t flags, const char* query);
2321
2322
2332
2333
2343void dc_block_contact (dc_context_t* context, uint32_t contact_id, int block);
2344
2345
2356char* dc_get_contact_encrinfo (dc_context_t* context, uint32_t contact_id);
2357
2358
2371int dc_delete_contact (dc_context_t* context, uint32_t contact_id);
2372
2373
2387dc_contact_t* dc_get_contact (dc_context_t* context, uint32_t contact_id);
2388
2389
2390// import/export and tools
2391
2392#define DC_IMEX_EXPORT_SELF_KEYS 1 // param1 is a directory where the keys are written to
2393#define DC_IMEX_IMPORT_SELF_KEYS 2 // param1 is a directory where the keys are searched in and read from
2394#define DC_IMEX_EXPORT_BACKUP 11 // param1 is a directory where the backup is written to, param2 is a passphrase to encrypt the backup
2395#define DC_IMEX_IMPORT_BACKUP 12 // param1 is the file with the backup to import, param2 is the backup's passphrase
2396
2397
2442void dc_imex (dc_context_t* context, int what, const char* param1, const char* param2);
2443
2444
2494char* dc_imex_has_backup (dc_context_t* context, const char* dir);
2495
2496
2514
2515
2516// out-of-band verification
2517
2518#define DC_QR_ASK_VERIFYCONTACT 200 // id=contact
2519#define DC_QR_ASK_VERIFYGROUP 202 // text1=groupname
2520#define DC_QR_ASK_VERIFYBROADCAST 204 // text1=broadcast name
2521#define DC_QR_FPR_OK 210 // id=contact
2522#define DC_QR_FPR_MISMATCH 220 // id=contact
2523#define DC_QR_FPR_WITHOUT_ADDR 230 // test1=formatted fingerprint
2524#define DC_QR_ACCOUNT 250 // text1=domain
2525#define DC_QR_BACKUP2 252
2526#define DC_QR_BACKUP_TOO_NEW 255
2527#define DC_QR_PROXY 271 // text1=address (e.g. "127.0.0.1:9050")
2528#define DC_QR_ADDR 320 // id=contact
2529#define DC_QR_TEXT 330 // text1=text
2530#define DC_QR_URL 332 // text1=URL
2531#define DC_QR_ERROR 400 // text1=error string
2532#define DC_QR_WITHDRAW_VERIFYCONTACT 500
2533#define DC_QR_WITHDRAW_VERIFYGROUP 502 // text1=groupname
2534#define DC_QR_WITHDRAW_JOINBROADCAST 504 // text1=broadcast name
2535#define DC_QR_REVIVE_VERIFYCONTACT 510
2536#define DC_QR_REVIVE_VERIFYGROUP 512 // text1=groupname
2537#define DC_QR_REVIVE_JOINBROADCAST 514 // text1=broadcast name
2538#define DC_QR_LOGIN 520 // text1=email_address
2539
2632dc_lot_t* dc_check_qr (dc_context_t* context, const char* qr);
2633
2634
2659char* dc_get_securejoin_qr (dc_context_t* context, uint32_t chat_id);
2660
2661
2675char* dc_get_securejoin_qr_svg (dc_context_t* context, uint32_t chat_id);
2676
2700uint32_t dc_join_securejoin (dc_context_t* context, const char* qr);
2701
2702
2703// location streaming
2704
2705
2722void dc_send_locations_to_chat (dc_context_t* context, uint32_t chat_id, int seconds);
2723
2724
2738int dc_is_sending_locations_to_chat (dc_context_t* context, uint32_t chat_id);
2739
2740
2768int dc_set_location (dc_context_t* context, double latitude, double longitude, double accuracy);
2769
2770
2831dc_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);
2832
2833
2845
2846
2847// misc
2848
2860char* dc_create_qr_svg (const char* payload);
2861
2862
2877
2878
2891void dc_str_unref (char* str);
2892
2893
2899
2923
2924
2943
2944
2960
2971
2986
3010int dc_receive_backup (dc_context_t* context, const char* qr);
3011
3038
3061dc_accounts_t* dc_accounts_new (const char* dir, int writable);
3062
3091dc_accounts_t* dc_accounts_new_with_event_channel(const char* dir, int writable, dc_event_channel_t* events_channel);
3092
3100
3101
3118
3135
3150uint32_t dc_accounts_migrate_account (dc_accounts_t* accounts, const char* dbfile);
3151
3152
3164int dc_accounts_remove_account (dc_accounts_t* accounts, uint32_t account_id);
3165
3166
3176
3177
3189dc_context_t* dc_accounts_get_account (dc_accounts_t* accounts, uint32_t account_id);
3190
3191
3208
3209
3218int dc_accounts_select_account (dc_accounts_t* accounts, uint32_t account_id);
3219
3220
3231
3232
3242
3243
3254
3255
3269
3270
3287int dc_accounts_background_fetch (dc_accounts_t* accounts, uint64_t timeout);
3288
3289
3305
3306
3314void dc_accounts_set_push_device_token (dc_accounts_t* accounts, const char *token);
3315
3340
3341
3350
3351
3361
3362
3370size_t dc_array_get_cnt (const dc_array_t* array);
3371
3372
3381uint32_t dc_array_get_id (const dc_array_t* array, size_t index);
3382
3383
3393double dc_array_get_latitude (const dc_array_t* array, size_t index);
3394
3395
3405double dc_array_get_longitude (const dc_array_t* array, size_t index);
3406
3407
3418double dc_array_get_accuracy (const dc_array_t* array, size_t index);
3419
3420
3430int64_t dc_array_get_timestamp (const dc_array_t* array, size_t index);
3431
3432
3442uint32_t dc_array_get_chat_id (const dc_array_t* array, size_t index);
3443
3444
3454uint32_t dc_array_get_contact_id (const dc_array_t* array, size_t index);
3455
3456
3466uint32_t dc_array_get_msg_id (const dc_array_t* array, size_t index);
3467
3468
3483char* dc_array_get_marker (const dc_array_t* array, size_t index);
3484
3485
3496int dc_array_is_independent (const dc_array_t* array, size_t index);
3497
3498
3508int dc_array_search_id (const dc_array_t* array, uint32_t needle, size_t* ret_index);
3509
3510
3543
3544
3553
3554
3562size_t dc_chatlist_get_cnt (const dc_chatlist_t* chatlist);
3563
3564
3576uint32_t dc_chatlist_get_chat_id (const dc_chatlist_t* chatlist, size_t index);
3577
3578
3590uint32_t dc_chatlist_get_msg_id (const dc_chatlist_t* chatlist, size_t index);
3591
3592
3619dc_lot_t* dc_chatlist_get_summary (const dc_chatlist_t* chatlist, size_t index, dc_chat_t* chat);
3620
3621
3641dc_lot_t* dc_chatlist_get_summary2 (dc_context_t* context, uint32_t chat_id, uint32_t msg_id);
3642
3643
3652
3653
3670char* dc_chat_get_info_json (dc_context_t* context, size_t chat_id);
3671
3680
3681
3682#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)
3683#define DC_CHAT_ID_ARCHIVED_LINK 6 // only an indicator in a chatlist
3684#define DC_CHAT_ID_ALLDONE_HINT 7 // only an indicator in a chatlist
3685#define DC_CHAT_ID_LAST_SPECIAL 9 // larger chat IDs are "real" chats, their messages are "real" messages
3686
3687
3696
3697
3710uint32_t dc_chat_get_id (const dc_chat_t* chat);
3711
3712
3720int dc_chat_get_type (const dc_chat_t* chat);
3721
3722
3734
3735
3747char* dc_chat_get_name (const dc_chat_t* chat);
3748
3749
3764
3765
3778uint32_t dc_chat_get_color (const dc_chat_t* chat);
3779
3780
3790
3791
3809
3810
3832
3833
3843
3844
3860
3861
3873int dc_chat_can_send (const dc_chat_t* chat);
3874
3875
3885
3886
3900
3901
3913
3914
3922int dc_chat_is_muted (const dc_chat_t* chat);
3923
3924
3933
3934
3942
3943
3944#define DC_MSG_ID_MARKER1 1 // this is used by iOS to mark things in the message list
3945#define DC_MSG_ID_DAYMARKER 9
3946#define DC_MSG_ID_LAST_SPECIAL 9
3947
3948
3961dc_msg_t* dc_msg_new (dc_context_t* context, int viewtype);
3962
3963
3972
3973
3982uint32_t dc_msg_get_id (const dc_msg_t* msg);
3983
3984
3999uint32_t dc_msg_get_from_id (const dc_msg_t* msg);
4000
4001
4010uint32_t dc_msg_get_chat_id (const dc_msg_t* msg);
4011
4012
4022
4023
4067
4068
4085int64_t dc_msg_get_timestamp (const dc_msg_t* msg);
4086
4087
4100
4101
4116
4117
4137char* dc_msg_get_text (const dc_msg_t* msg);
4138
4139
4157char* dc_msg_get_subject (const dc_msg_t* msg);
4158
4159
4173char* dc_msg_get_file (const dc_msg_t* msg);
4174
4175
4186int dc_msg_save_file (const dc_msg_t* msg, const char* path);
4187
4188
4199
4200
4212
4213
4226char* dc_msg_get_webxdc_blob (const dc_msg_t* msg, const char* filename, size_t* ret_bytes);
4227
4228
4265
4266
4278uint64_t dc_msg_get_filebytes (const dc_msg_t* msg);
4279
4280
4296
4297
4313
4314
4327
4328
4342
4352int dc_msg_is_bot (const dc_msg_t* msg);
4353
4366
4380
4381
4405
4406
4418char* dc_msg_get_summarytext (const dc_msg_t* msg, int approx_characters);
4419
4420
4450
4451
4452
4468
4469
4480
4481
4492int dc_msg_is_sent (const dc_msg_t* msg);
4493
4494
4512
4513
4525 int dc_msg_is_edited (const dc_msg_t* msg);
4526
4527
4548int dc_msg_is_info (const dc_msg_t* msg);
4549
4550
4584
4585
4607
4608
4609// DC_INFO* uses the same values as SystemMessage in rust-land
4610#define DC_INFO_UNKNOWN 0
4611#define DC_INFO_GROUP_NAME_CHANGED 2
4612#define DC_INFO_GROUP_IMAGE_CHANGED 3
4613#define DC_INFO_MEMBER_ADDED_TO_GROUP 4
4614#define DC_INFO_MEMBER_REMOVED_FROM_GROUP 5
4615
4616// Deprecated as of 2026-03-16, not used for new messages.
4617#define DC_INFO_AUTOCRYPT_SETUP_MESSAGE 6
4618
4619#define DC_INFO_SECURE_JOIN_MESSAGE 7
4620#define DC_INFO_LOCATIONSTREAMING_ENABLED 8
4621#define DC_INFO_LOCATION_ONLY 9
4622#define DC_INFO_EPHEMERAL_TIMER_CHANGED 10
4623#define DC_INFO_PROTECTION_ENABLED 11
4624#define DC_INFO_INVALID_UNENCRYPTED_MAIL 13
4625#define DC_INFO_WEBXDC_INFO_MESSAGE 32
4626#define DC_INFO_CHAT_E2EE 50
4627#define DC_INFO_GROUP_DESCRIPTION_CHANGED 70
4628
4629
4646
4647
4667char* dc_msg_get_error (const dc_msg_t* msg);
4668
4669
4694
4695
4722
4723
4732void dc_msg_set_text (dc_msg_t* msg, const char* text);
4733
4734
4759void dc_msg_set_html (dc_msg_t* msg, const char* html);
4760
4761
4771void dc_msg_set_subject (dc_msg_t* msg, const char* subject);
4772
4773
4786void dc_msg_set_override_sender_name(dc_msg_t* msg, const char* name);
4787
4788
4811void dc_msg_set_file_and_deduplicate(dc_msg_t* msg, const char* file, const char* name, const char* filemime);
4812
4813
4824void dc_msg_set_dimension (dc_msg_t* msg, int width, int height);
4825
4826
4836void dc_msg_set_duration (dc_msg_t* msg, int duration);
4837
4838
4855void dc_msg_set_location (dc_msg_t* msg, double latitude, double longitude);
4856
4857
4879void dc_msg_latefiling_mediasize (dc_msg_t* msg, int width, int height, int duration);
4880
4881
4896void dc_msg_set_quote (dc_msg_t* msg, const dc_msg_t* quote);
4897
4898
4914
4915
4938
4954
4955
4969
4970
4982uint32_t dc_msg_get_saved_msg_id (const dc_msg_t* msg);
4983
4984
4994
5014
5015
5016#define DC_CONTACT_ID_SELF 1
5017#define DC_CONTACT_ID_INFO 2 // centered messages as "member added", used in all chats
5018#define DC_CONTACT_ID_DEVICE 5 // messages "update info" in the device-chat
5019#define DC_CONTACT_ID_LAST_SPECIAL 9
5020
5021
5030
5031
5039uint32_t dc_contact_get_id (const dc_contact_t* contact);
5040
5041
5050char* dc_contact_get_addr (const dc_contact_t* contact);
5051
5052
5067char* dc_contact_get_name (const dc_contact_t* contact);
5068
5069
5090
5091
5108
5109
5110// dc_contact_get_first_name is removed,
5111// the following define is to make upgrading more smoothly.
5112#define dc_contact_get_first_name dc_contact_get_display_name
5113
5114
5130
5131
5144
5145
5157uint32_t dc_contact_get_color (const dc_contact_t* contact);
5158
5159
5172
5182
5183
5197
5198
5209
5210
5223
5232
5233
5246
5247
5276
5277
5283
5284
5298dc_provider_t* dc_provider_new_from_email (const dc_context_t* context, const char* email);
5299
5300
5315
5316
5329
5330
5346
5347
5359
5360
5368
5369
5380
5381
5382#define DC_TEXT1_DRAFT 1
5383#define DC_TEXT1_USERNAME 2
5384#define DC_TEXT1_SELF 3
5385
5386
5397
5398
5408char* dc_lot_get_text1 (const dc_lot_t* lot);
5409
5410
5420char* dc_lot_get_text2 (const dc_lot_t* lot);
5421
5422
5433
5434
5443
5444
5452uint32_t dc_lot_get_id (const dc_lot_t* lot);
5453
5454
5464int64_t dc_lot_get_timestamp (const dc_lot_t* lot);
5465
5466
5489
5490
5496#define DC_MSG_TEXT 10
5497
5498
5510#define DC_MSG_IMAGE 20
5511
5512
5518#define DC_MSG_GIF 21
5519
5520
5528#define DC_MSG_STICKER 23
5529
5530
5536#define DC_MSG_AUDIO 40
5537
5538
5545#define DC_MSG_VOICE 41
5546
5547
5556#define DC_MSG_VIDEO 50
5557
5558
5564#define DC_MSG_FILE 60
5565
5566
5582#define DC_MSG_CALL 71
5583
5584
5590#define DC_MSG_WEBXDC 80
5591
5596#define DC_MSG_VCARD 90
5597
5601
5602
5613
5617#define DC_STATE_UNDEFINED 0
5618
5622#define DC_STATE_IN_FRESH 10
5623
5627#define DC_STATE_IN_NOTICED 13
5628
5632#define DC_STATE_IN_SEEN 16
5633
5639#define DC_STATE_OUT_PREPARING 18
5640
5644#define DC_STATE_OUT_DRAFT 19
5645
5649#define DC_STATE_OUT_PENDING 20
5650
5654#define DC_STATE_OUT_FAILED 24
5655
5660#define DC_STATE_OUT_DELIVERED 26
5661
5665#define DC_STATE_OUT_MDN_RCVD 28
5666
5670
5671
5682
5687#define DC_CHAT_TYPE_UNDEFINED 0
5688
5696#define DC_CHAT_TYPE_SINGLE 100
5697
5705#define DC_CHAT_TYPE_GROUP 120
5706
5717#define DC_CHAT_TYPE_MAILINGLIST 140
5718
5730#define DC_CHAT_TYPE_OUT_BROADCAST 160
5731
5746#define DC_CHAT_TYPE_IN_BROADCAST 165
5747
5751
5752
5763
5767#define DC_SOCKET_AUTO 0
5768
5769
5773#define DC_SOCKET_SSL 1
5774
5775
5779#define DC_SOCKET_STARTTLS 2
5780
5781
5785#define DC_SOCKET_PLAIN 3
5786
5790
5791
5803
5804
5810#define DC_LP_AUTH_OAUTH2 0x2
5811
5812
5817#define DC_LP_AUTH_NORMAL 0x4
5818
5819
5823
5824#define DC_LP_AUTH_FLAGS (DC_LP_AUTH_OAUTH2|DC_LP_AUTH_NORMAL) // if none of these flags are set, the default is chosen
5825
5837
5841#define DC_CERTCK_AUTO 0
5842
5847#define DC_CERTCK_STRICT 1
5848
5853#define DC_CERTCK_ACCEPT_INVALID 2
5854
5859#define DC_CERTCK_ACCEPT_INVALID_CERTIFICATES 3
5860
5864
5865
5871
5882
5891
5918void dc_jsonrpc_request(dc_jsonrpc_instance_t* jsonrpc_instance, const char* request);
5919
5930
5942char* dc_jsonrpc_blocking_call(dc_jsonrpc_instance_t* jsonrpc_instance, const char *input);
5943
5955
5963
5974
5999
6007
6020
6021// Alias for backwards compatibility, use dc_get_next_event instead.
6022#define dc_accounts_get_next_event dc_get_next_event
6023
6032
6033// Alias for backwards compatibility, use dc_event_emtitter_unref instead.
6034#define dc_accounts_event_emitter_unref dc_event_emitter_unref
6035
6042
6055
6056
6069
6070
6083
6084
6096
6097
6109
6110
6121
6122
6131
6132
6146
6155#define DC_EVENT_INFO 100
6156
6157
6164#define DC_EVENT_SMTP_CONNECTED 101
6165
6166
6173#define DC_EVENT_IMAP_CONNECTED 102
6174
6181#define DC_EVENT_SMTP_MESSAGE_SENT 103
6182
6189#define DC_EVENT_IMAP_MESSAGE_DELETED 104
6190
6197#define DC_EVENT_IMAP_MESSAGE_MOVED 105
6198
6205#define DC_EVENT_IMAP_INBOX_IDLE 106
6206
6213#define DC_EVENT_NEW_BLOB_FILE 150
6214
6221#define DC_EVENT_DELETED_BLOB_FILE 151
6222
6231#define DC_EVENT_WARNING 300
6232
6233
6251#define DC_EVENT_ERROR 400
6252
6253
6264#define DC_EVENT_ERROR_SELF_NOT_IN_GROUP 410
6265
6266
6277#define DC_EVENT_MSGS_CHANGED 2000
6278
6279
6286#define DC_EVENT_REACTIONS_CHANGED 2001
6287
6288
6301#define DC_EVENT_INCOMING_REACTION 2002
6302
6303
6304
6321#define DC_EVENT_INCOMING_WEBXDC_NOTIFY 2003
6322
6323
6336#define DC_EVENT_INCOMING_MSG 2005
6337
6349#define DC_EVENT_INCOMING_MSG_BUNCH 2006
6350
6351
6364#define DC_EVENT_MSGS_NOTICED 2008
6365
6366
6374#define DC_EVENT_MSG_DELIVERED 2010
6375
6376
6385#define DC_EVENT_MSG_FAILED 2012
6386
6387
6395#define DC_EVENT_MSG_READ 2015
6396
6397
6404#define DC_EVENT_MSG_DELETED 2016
6405
6406
6415#define DC_EVENT_CHAT_MODIFIED 2020
6416
6423#define DC_EVENT_CHAT_EPHEMERAL_TIMER_MODIFIED 2021
6424
6425
6435#define DC_EVENT_CHAT_DELETED 2023
6436
6437
6444#define DC_EVENT_CONTACTS_CHANGED 2030
6445
6446
6447
6456#define DC_EVENT_LOCATION_CHANGED 2035
6457
6458
6465#define DC_EVENT_CONFIGURE_PROGRESS 2041
6466
6467
6474#define DC_EVENT_IMEX_PROGRESS 2051
6475
6476
6487#define DC_EVENT_IMEX_FILE_WRITTEN 2052
6488
6489
6500#define DC_EVENT_SECUREJOIN_INVITER_PROGRESS 2060
6501
6502
6516#define DC_EVENT_SECUREJOIN_JOINER_PROGRESS 2061
6517
6518
6528#define DC_EVENT_CONNECTIVITY_CHANGED 2100
6529
6530
6535#define DC_EVENT_SELFAVATAR_CHANGED 2110
6536
6537
6547#define DC_EVENT_CONFIG_SYNCED 2111
6548
6549
6564#define DC_EVENT_WEBXDC_STATUS_UPDATE 2120
6565
6571
6572#define DC_EVENT_WEBXDC_INSTANCE_DELETED 2121
6573
6583
6584#define DC_EVENT_WEBXDC_REALTIME_DATA 2150
6585
6592
6593#define DC_EVENT_WEBXDC_REALTIME_ADVERTISEMENT 2151
6594
6603
6604#define DC_EVENT_ACCOUNTS_BACKGROUND_FETCH_DONE 2200
6605
6611
6612#define DC_EVENT_CHATLIST_CHANGED 2300
6613
6620
6621#define DC_EVENT_CHATLIST_ITEM_CHANGED 2301
6622
6628
6629#define DC_EVENT_ACCOUNTS_CHANGED 2302
6630
6640
6641#define DC_EVENT_ACCOUNTS_ITEM_CHANGED 2303
6642
6648#define DC_EVENT_CHANNEL_OVERFLOW 2400
6649
6650
6651
6671#define DC_EVENT_INCOMING_CALL 2550
6672
6682 #define DC_EVENT_INCOMING_CALL_ACCEPTED 2560
6683
6692#define DC_EVENT_OUTGOING_CALL_ACCEPTED 2570
6693
6702#define DC_EVENT_CALL_ENDED 2580
6703
6712#define DC_EVENT_TRANSPORTS_MODIFIED 2600
6713
6714
6718
6719
6720#define DC_EVENT_DATA1_IS_STRING(e) 0 // not used anymore
6721#define DC_EVENT_DATA2_IS_STRING(e) ((e)==DC_EVENT_CONFIGURE_PROGRESS || (e)==DC_EVENT_IMEX_FILE_WRITTEN || ((e)>=100 && (e)<=499))
6722
6723
6724/*
6725 * Values for dc_get|set_config("show_emails")
6726 */
6727#define DC_SHOW_EMAILS_OFF 0
6728#define DC_SHOW_EMAILS_ACCEPTED_CONTACTS 1
6729#define DC_SHOW_EMAILS_ALL 2
6730
6731
6732/*
6733 * Values for dc_get|set_config("media_quality")
6734 */
6735#define DC_MEDIA_QUALITY_BALANCED 0
6736#define DC_MEDIA_QUALITY_WORSE 1
6737
6738
6747
6760#define DC_PROVIDER_STATUS_OK 1
6761
6773#define DC_PROVIDER_STATUS_PREPARATION 2
6774
6787#define DC_PROVIDER_STATUS_BROKEN 3
6788
6792
6793
6804
6809#define DC_CHAT_VISIBILITY_NORMAL 0
6810
6823#define DC_CHAT_VISIBILITY_ARCHIVED 1
6824
6829#define DC_CHAT_VISIBILITY_PINNED 2
6830
6834
6835
6846
6850#define DC_DOWNLOAD_DONE 0
6851
6855#define DC_DOWNLOAD_AVAILABLE 10
6856
6860#define DC_DOWNLOAD_FAILURE 20
6861
6865#define DC_DOWNLOAD_UNDECIPHERABLE 30
6866
6870#define DC_DOWNLOAD_IN_PROGRESS 1000
6871
6872
6873
6877
6878
6897
6901#define DC_STR_NOMESSAGES 1
6902
6906#define DC_STR_SELF 2
6907
6911#define DC_STR_DRAFT 3
6912
6916#define DC_STR_VOICEMESSAGE 7
6917
6921#define DC_STR_IMAGE 9
6922
6926#define DC_STR_VIDEO 10
6927
6931#define DC_STR_AUDIO 11
6932
6936#define DC_STR_FILE 12
6937
6941#define DC_STR_GIF 23
6942
6946#define DC_STR_E2E_AVAILABLE 25
6947
6951#define DC_STR_ENCR_NONE 28
6952
6956#define DC_STR_FINGERPRINTS 30
6957
6962#define DC_STR_CONTACT_VERIFIED 35
6963
6967#define DC_STR_ARCHIVEDCHATS 40
6968
6973#define DC_STR_CANNOT_LOGIN 60
6974
6978#define DC_STR_MSGLOCATIONENABLED 64
6979
6983#define DC_STR_MSGLOCATIONDISABLED 65
6984
6988#define DC_STR_LOCATION 66
6989
6993#define DC_STR_STICKER 67
6994
6998#define DC_STR_DEVICE_MESSAGES 68
6999
7003#define DC_STR_SAVED_MESSAGES 69
7004
7008#define DC_STR_DEVICE_MESSAGES_HINT 70
7009
7013#define DC_STR_WELCOME_MESSAGE 71
7014
7020#define DC_STR_SUBJECT_FOR_NEW_CONTACT 73
7021
7026#define DC_STR_FAILED_SENDING_TO 74
7027
7032#define DC_STR_CONFIGURATION_FAILED 84
7033
7038#define DC_STR_BAD_TIME_MSG_BODY 85
7039
7043#define DC_STR_UPDATE_REMINDER_MSG_BODY 86
7044
7048#define DC_STR_ERROR_NO_NETWORK 87
7049
7054#define DC_STR_REPLY_NOUN 90
7055
7059#define DC_STR_SELF_DELETED_MSG_BODY 91
7060
7064#define DC_STR_FORWARDED 97
7065
7071#define DC_STR_QUOTA_EXCEEDING_MSG_BODY 98
7072
7076#define DC_STR_SYNC_MSG_SUBJECT 101
7077
7086#define DC_STR_SYNC_MSG_BODY 102
7087
7091#define DC_STR_INCOMING_MESSAGES 103
7092
7096#define DC_STR_OUTGOING_MESSAGES 104
7097
7101#define DC_STR_CONNECTED 107
7102
7106#define DC_STR_CONNTECTING 108
7107
7111#define DC_STR_UPDATING 109
7112
7116#define DC_STR_SENDING 110
7117
7121#define DC_STR_LAST_MSG_SENT_SUCCESSFULLY 111
7122
7128#define DC_STR_ERROR 112
7129
7133#define DC_STR_NOT_SUPPORTED_BY_PROVIDER 113
7134
7138#define DC_STR_MESSAGES 114
7139
7143#define DC_STR_BROADCAST_LIST 115
7144
7148#define DC_STR_PART_OF_TOTAL_USED 116
7149
7157#define DC_STR_SECURE_JOIN_STARTED 117
7158
7167#define DC_STR_SECURE_JOIN_REPLIES 118
7168
7174#define DC_STR_SETUP_CONTACT_QR_DESC 119
7175
7181#define DC_STR_SECURE_JOIN_GROUP_QR_DESC 120
7182
7186#define DC_STR_NOT_CONNECTED 121
7187
7192#define DC_STR_GROUP_NAME_CHANGED_BY_YOU 124
7193
7199#define DC_STR_GROUP_NAME_CHANGED_BY_OTHER 125
7200
7202#define DC_STR_GROUP_IMAGE_CHANGED_BY_YOU 126
7203
7207#define DC_STR_GROUP_IMAGE_CHANGED_BY_OTHER 127
7208
7214#define DC_STR_ADD_MEMBER_BY_YOU 128
7215
7222#define DC_STR_ADD_MEMBER_BY_OTHER 129
7223
7229#define DC_STR_REMOVE_MEMBER_BY_YOU 130
7230
7237#define DC_STR_REMOVE_MEMBER_BY_OTHER 131
7238
7242#define DC_STR_GROUP_LEFT_BY_YOU 132
7243
7249#define DC_STR_GROUP_LEFT_BY_OTHER 133
7250
7254#define DC_STR_GROUP_IMAGE_DELETED_BY_YOU 134
7255
7261#define DC_STR_GROUP_IMAGE_DELETED_BY_OTHER 135
7262
7266#define DC_STR_LOCATION_ENABLED_BY_YOU 136
7267
7273#define DC_STR_LOCATION_ENABLED_BY_OTHER 137
7274
7278#define DC_STR_EPHEMERAL_TIMER_DISABLED_BY_YOU 138
7279
7285#define DC_STR_EPHEMERAL_TIMER_DISABLED_BY_OTHER 139
7286
7292#define DC_STR_EPHEMERAL_TIMER_SECONDS_BY_YOU 140
7293
7300#define DC_STR_EPHEMERAL_TIMER_SECONDS_BY_OTHER 141
7301
7305#define DC_STR_EPHEMERAL_TIMER_1_HOUR_BY_YOU 144
7306
7312#define DC_STR_EPHEMERAL_TIMER_1_HOUR_BY_OTHER 145
7313
7317#define DC_STR_EPHEMERAL_TIMER_1_DAY_BY_YOU 146
7318
7324#define DC_STR_EPHEMERAL_TIMER_1_DAY_BY_OTHER 147
7325
7329#define DC_STR_EPHEMERAL_TIMER_1_WEEK_BY_YOU 148
7330
7336#define DC_STR_EPHEMERAL_TIMER_1_WEEK_BY_OTHER 149
7337
7343#define DC_STR_EPHEMERAL_TIMER_MINUTES_BY_YOU 150
7344
7351#define DC_STR_EPHEMERAL_TIMER_MINUTES_BY_OTHER 151
7352
7358#define DC_STR_EPHEMERAL_TIMER_HOURS_BY_YOU 152
7359
7366#define DC_STR_EPHEMERAL_TIMER_HOURS_BY_OTHER 153
7367
7373#define DC_STR_EPHEMERAL_TIMER_DAYS_BY_YOU 154
7374
7381#define DC_STR_EPHEMERAL_TIMER_DAYS_BY_OTHER 155
7382
7388#define DC_STR_EPHEMERAL_TIMER_WEEKS_BY_YOU 156
7389
7396#define DC_STR_EPHEMERAL_TIMER_WEEKS_BY_OTHER 157
7397
7401#define DC_STR_EPHEMERAL_TIMER_1_YEAR_BY_YOU 158
7402
7408#define DC_STR_EPHEMERAL_TIMER_1_YEAR_BY_OTHER 159
7409
7413#define DC_STR_BACKUP_TRANSFER_QR 162
7414
7418#define DC_STR_BACKUP_TRANSFER_MSG_BODY 163
7419
7423#define DC_STR_CHAT_PROTECTION_ENABLED 170
7424
7428#define DC_STR_NEW_GROUP_SEND_FIRST_MESSAGE 172
7429
7435#define DC_STR_MESSAGE_ADD_MEMBER 173
7436
7442#define DC_STR_INVALID_UNENCRYPTED_MAIL 174
7443
7450#define DC_STR_YOU_REACTED 176
7451
7459#define DC_STR_REACTED_BY 177
7460
7464#define DC_STR_REMOVE_MEMBER 178
7465
7469#define DC_STR_SECUREJOIN_WAIT 190
7470
7472#define DC_STR_DONATION_REQUEST 193
7473
7475#define DC_STR_DECLINED_CALL 196
7476
7478#define DC_STR_CANCELED_CALL 197
7479
7481#define DC_STR_MISSED_CALL 198
7482
7486#define DC_STR_CHANNEL_LEFT_BY_YOU 200
7487
7493#define DC_STR_SECURE_JOIN_CHANNEL_QR_DESC 201
7494
7496#define DC_STR_MSG_YOU_JOINED_CHANNEL 202
7497
7503#define DC_STR_SECURE_JOIN_CHANNEL_STARTED 203
7504
7511#define DC_STR_CHANNEL_NAME_CHANGED 204
7512
7516#define DC_STR_CHANNEL_IMAGE_CHANGED 205
7517
7521#define DC_STR_STATS_MSG_BODY 210
7522
7526#define DC_STR_PROXY_ENABLED 220
7527
7531#define DC_STR_PROXY_ENABLED_DESCRIPTION 221
7532
7536#define DC_STR_CHAT_UNENCRYPTED_EXPLANATON 230
7537
7539#define DC_STR_OUTGOING_AUDIO_CALL 232
7540
7542#define DC_STR_OUTGOING_VIDEO_CALL 233
7543
7545#define DC_STR_INCOMING_AUDIO_CALL 234
7546
7548#define DC_STR_INCOMING_VIDEO_CALL 235
7549
7551#define DC_STR_GROUP_DESCRIPTION_CHANGED_BY_YOU 240
7552
7554#define DC_STR_GROUP_DESCRIPTION_CHANGED_BY_OTHER 241
7555
7559#define DC_STR_MESSAGES_ARE_E2EE 242
7560
7564
7565
7566#ifdef PY_CFFI_INC
7567/* Helper utility to locate the header file when building python bindings. */
7568char* _dc_header_file_location(void) {
7569 return __FILE__;
7570}
7571#endif
7572
7573
7574#ifdef __cplusplus
7575}
7576#endif
7577#endif // __DELTACHAT_H__
This class provides functionality that can be used to manage several dc_context_t objects running at ...
int dc_accounts_select_account(dc_accounts_t *accounts, uint32_t account_id)
Change the selected account.
void dc_accounts_unref(dc_accounts_t *accounts)
Free an account manager object.
dc_event_emitter_t * dc_accounts_get_event_emitter(dc_accounts_t *accounts)
Create the event emitter that is used to receive events.
dc_context_t * dc_accounts_get_selected_account(dc_accounts_t *accounts)
Get the currently selected account.
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.
uint32_t dc_accounts_migrate_account(dc_accounts_t *accounts, const char *dbfile)
Migrate independent accounts into accounts managed by the account manager.
int dc_accounts_background_fetch(dc_accounts_t *accounts, uint64_t timeout)
Perform a background fetch for all accounts in parallel with a timeout.
dc_accounts_t * dc_accounts_new_with_event_channel(const char *dir, int writable, dc_event_channel_t *events_channel)
Create a new account manager with an existing events channel, which allows you to see events emitted ...
dc_context_t * dc_accounts_get_account(dc_accounts_t *accounts, uint32_t account_id)
Get an account context from an account ID.
dc_array_t * dc_accounts_get_all(dc_accounts_t *accounts)
List all accounts.
dc_jsonrpc_instance_t * dc_jsonrpc_init(dc_accounts_t *account_manager)
Create the jsonrpc instance that is used to call the jsonrpc.
void dc_accounts_set_push_device_token(dc_accounts_t *accounts, const char *token)
Sets device token for Apple Push Notification service.
void dc_accounts_start_io(dc_accounts_t *accounts)
Start job and IMAP/SMTP tasks for all accounts managed by the account manager.
void dc_accounts_stop_io(dc_accounts_t *accounts)
Stop job and IMAP/SMTP tasks for all accounts and return when they are finished.
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.
uint32_t dc_accounts_add_account(dc_accounts_t *accounts)
Add a new account to the account manager.
dc_accounts_t * dc_accounts_new(const char *dir, int writable)
Create a new account manager.
void dc_accounts_stop_background_fetch(dc_accounts_t *accounts)
Stop ongoing background fetch.
uint32_t dc_accounts_add_closed_account(dc_accounts_t *accounts)
Add a new closed account to the account manager.
int dc_accounts_remove_account(dc_accounts_t *accounts, uint32_t account_id)
Remove an account from the account manager.
An object containing a simple array.
void dc_array_unref(dc_array_t *array)
Free an array object.
double dc_array_get_accuracy(const dc_array_t *array, size_t index)
Return the accuracy of the item at the given index.
int64_t dc_array_get_timestamp(const dc_array_t *array, size_t index)
Return the timestamp of the item at the given index.
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.
int dc_array_is_independent(const dc_array_t *array, size_t index)
Return the independent-state of the location at the given index.
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.
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.
double dc_array_get_longitude(const dc_array_t *array, size_t index)
Return the longitude of the item at the given index.
size_t dc_array_get_cnt(const dc_array_t *array)
Find out the number of items in an array.
uint32_t dc_array_get_id(const dc_array_t *array, size_t index)
Get the item at the given index as an ID.
char * dc_array_get_marker(const dc_array_t *array, size_t index)
Return the marker-character of the item at the given index.
double dc_array_get_latitude(const dc_array_t *array, size_t index)
Return the latitude of the item at the given index.
Set up another device.
char * dc_backup_provider_get_qr(const dc_backup_provider_t *backup_provider)
Returns the QR code text that will offer the backup to other devices.
void dc_backup_provider_unref(dc_backup_provider_t *backup_provider)
Frees a dc_backup_provider_t object.
void dc_backup_provider_wait(dc_backup_provider_t *backup_provider)
Waits for the sending to finish.
char * dc_backup_provider_get_qr_svg(const dc_backup_provider_t *backup_provider)
Returns the QR code SVG image that will offer the backup to other devices.
dc_backup_provider_t * dc_backup_provider_new(dc_context_t *context)
Creates an object for sending a backup to another device.
An object representing a single chat in memory.
char * dc_chat_get_name(const dc_chat_t *chat)
Get name of a chat.
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().
int dc_chat_get_type(const dc_chat_t *chat)
Get chat type as one of the DC_CHAT_TYPE constants.
char * dc_chat_get_mailinglist_addr(const dc_chat_t *chat)
Returns the address where messages are sent to if the chat is a mailing list.
uint32_t dc_chat_get_id(const dc_chat_t *chat)
Get the chat ID.
int dc_chat_is_device_talk(const dc_chat_t *chat)
Check if a chat is a device-talk.
int64_t dc_chat_get_remaining_mute_duration(const dc_chat_t *chat)
Get the exact state of the mute of a chat.
int dc_chat_is_contact_request(const dc_chat_t *chat)
Check if a chat is a contact request chat.
int dc_chat_get_visibility(const dc_chat_t *chat)
Get visibility of chat.
void dc_chat_unref(dc_chat_t *chat)
Free a chat object.
int dc_chat_is_unpromoted(const dc_chat_t *chat)
Check if a group chat is still unpromoted.
uint32_t dc_chat_get_color(const dc_chat_t *chat)
Get a color for the chat.
int dc_chat_can_send(const dc_chat_t *chat)
Check if messages can be sent to a given chat.
int dc_chat_is_self_talk(const dc_chat_t *chat)
Check if a chat is a self talk.
char * dc_chat_get_profile_image(const dc_chat_t *chat)
Get the chat's profile image.
int dc_chat_is_protected(const dc_chat_t *chat)
Deprecated, always returns 0.
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()).
int dc_chat_is_encrypted(const dc_chat_t *chat)
Check if the chat is encrypted.
An object representing a single chatlist in memory.
uint32_t dc_chatlist_get_msg_id(const dc_chatlist_t *chatlist, size_t index)
Get a single message ID of a chatlist.
void dc_chatlist_unref(dc_chatlist_t *chatlist)
Free a chatlist object.
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_context_t * dc_chatlist_get_context(dc_chatlist_t *chatlist)
Helper function to get the associated context object.
uint32_t dc_chatlist_get_chat_id(const dc_chatlist_t *chatlist, size_t index)
Get a single chat ID of a chatlist.
size_t dc_chatlist_get_cnt(const dc_chatlist_t *chatlist)
Find out the number of chats in a chatlist.
An object representing a single contact in memory.
char * dc_contact_get_addr(const dc_contact_t *contact)
Get the e-mail address of a contact.
char * dc_contact_get_name_n_addr(const dc_contact_t *contact)
Get a summary of name and address.
int dc_contact_is_verified(dc_contact_t *contact)
Check if the contact can be added to protected chats.
int dc_contact_is_key_contact(dc_contact_t *contact)
Returns whether contact is a key-contact, i.e.
char * dc_contact_get_profile_image(const dc_contact_t *contact)
Get the contact's profile image.
void dc_contact_unref(dc_contact_t *contact)
Free a contact object.
char * dc_contact_get_auth_name(const dc_contact_t *contact)
Get original contact name.
int64_t dc_contact_get_last_seen(const dc_contact_t *contact)
Get the contact's last seen timestamp.
uint32_t dc_contact_get_verifier_id(dc_contact_t *contact)
Return the contact ID that verified a contact.
char * dc_contact_get_status(const dc_contact_t *contact)
Get the contact's status.
int dc_contact_is_blocked(const dc_contact_t *contact)
Check if a contact is blocked.
char * dc_contact_get_name(const dc_contact_t *contact)
Get the edited contact name.
char * dc_contact_get_display_name(const dc_contact_t *contact)
Get display name.
uint32_t dc_contact_get_color(const dc_contact_t *contact)
Get a color for the contact.
uint32_t dc_contact_get_id(const dc_contact_t *contact)
Get the ID of a contact.
int dc_contact_is_bot(dc_contact_t *contact)
Returns whether contact is a bot.
int dc_contact_was_seen_recently(const dc_contact_t *contact)
Check if the contact was seen recently.
An object representing a single account.
char * dc_imex_has_backup(dc_context_t *context, const char *dir)
Check if there is a backup file.
int dc_add_address_book(dc_context_t *context, const char *addr_book)
Add a number of contacts.
int dc_get_msg_cnt(dc_context_t *context, uint32_t chat_id)
Get the total number of messages in a chat.
dc_context_t * dc_context_new_closed(const char *dbfile)
Create a new context object.
char * dc_make_vcard(dc_context_t *context, uint32_t contact_id)
Make a vCard.
dc_array_t * dc_get_contacts(dc_context_t *context, uint32_t flags, const char *query)
Returns known and unblocked contacts.
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.
uint32_t dc_add_device_msg(dc_context_t *context, const char *label, dc_msg_t *msg)
Add a message to the device-chat.
void dc_send_delete_request(dc_context_t *context, const uint32_t *msg_ids, int msg_cnt)
Send chat members a request to delete the given messages.
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_array_t * dc_get_next_msgs(dc_context_t *context)
Returns the message IDs of all messages of any chat with a database ID higher than last_msg_id config...
uint32_t dc_init_webxdc_integration(dc_context_t *context, uint32_t chat_id)
Init a Webxdc integration.
char * dc_get_contact_encrinfo(dc_context_t *context, uint32_t contact_id)
Get encryption info for a contact.
uint32_t dc_lookup_contact_id_by_addr(dc_context_t *context, const char *addr)
Looks up a known and unblocked contact with a given e-mail address.
int dc_set_chat_profile_image(dc_context_t *context, uint32_t chat_id, const char *image)
Set group or broadcast channel profile image.
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.
void dc_maybe_network(dc_context_t *context)
This function should be called when there is a hint that the network is available again,...
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.
uint32_t dc_get_chat_ephemeral_timer(dc_context_t *context, uint32_t chat_id)
Get the chat's ephemeral message timer.
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 given chat or any chat.
dc_lot_t * dc_check_qr(dc_context_t *context, const char *qr)
Check a scanned QR code.
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.
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_contact_t * dc_get_contact(dc_context_t *context, uint32_t contact_id)
Get a single contact object.
void dc_stop_io(dc_context_t *context)
Stop job, IMAP, SMTP and other tasks and return when they are finished.
dc_msg_t * dc_get_draft(dc_context_t *context, uint32_t chat_id)
Get draft for a chat, if any.
int dc_preconfigure_keypair(dc_context_t *context, const char *secret_data)
Save a keypair as the default keys for the user.
char * dc_create_qr_svg(const char *payload)
Create a QR code from any input data.
char * dc_get_blobdir(const dc_context_t *context)
Get the blob directory.
dc_array_t * dc_get_blocked_contacts(dc_context_t *context)
Get blocked contacts.
void dc_context_unref(dc_context_t *context)
Free a context object.
void dc_stop_ongoing_process(dc_context_t *context)
Signal an ongoing process to stop.
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.
void dc_markfresh_chat(dc_context_t *context, uint32_t chat_id)
Mark the last incoming message in chat as fresh.
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.
char * dc_get_info(const dc_context_t *context)
Get information about the context.
int dc_receive_backup(dc_context_t *context, const char *qr)
Gets a backup offered by a dc_backup_provider_t object on another device.
int dc_is_sending_locations_to_chat(dc_context_t *context, uint32_t chat_id)
Check if location streaming is enabled.
void dc_block_chat(dc_context_t *context, uint32_t chat_id)
Block a chat.
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.
int dc_end_call(dc_context_t *context, uint32_t msg_id)
End incoming or outgoing call.
dc_array_t * dc_get_fresh_msgs(dc_context_t *context)
Returns the message IDs of all fresh messages of any chat.
int dc_set_stock_translation(dc_context_t *context, uint32_t stock_id, const char *stock_msg)
Set stock string translation.
void dc_set_webxdc_integration(dc_context_t *context, const char *file)
Set Webxdc file as integration.
int dc_set_chat_mute_duration(dc_context_t *context, uint32_t chat_id, int64_t duration)
Set mute duration of a chat.
dc_array_t * dc_wait_next_msgs(dc_context_t *context)
Waits for notification of new messages and returns an array of new message IDs.
int dc_get_fresh_msg_cnt(dc_context_t *context, uint32_t chat_id)
Get the number of fresh messages in a chat.
int dc_set_chat_name(dc_context_t *context, uint32_t chat_id, const char *name)
Set the name of a group or broadcast channel.
uint32_t dc_create_broadcast_list(dc_context_t *context)
Create a new broadcast list.
void dc_marknoticed_chat(dc_context_t *context, uint32_t chat_id)
Mark all messages in a chat as noticed.
int dc_set_chat_ephemeral_timer(dc_context_t *context, uint32_t chat_id, uint32_t timer)
Set the chat's ephemeral message timer.
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_array_t * dc_search_msgs(dc_context_t *context, uint32_t chat_id, const char *query)
Search messages containing the given query string.
int dc_may_be_valid_addr(const char *addr)
Rough check if a string may be a valid e-mail address.
int dc_is_configured(const dc_context_t *context)
Check if the context is already configured.
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...
int dc_get_connectivity(dc_context_t *context)
Get the current connectivity, i.e.
char * dc_get_last_error(dc_context_t *context)
Get last error string.
char * dc_get_oauth2_url(dc_context_t *context, const char *addr, const char *redirect_uri)
Get URL that can be used to initiate an OAuth2 authorization.
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.
char * dc_get_config(dc_context_t *context, const char *key)
Get a configuration option.
int dc_set_location(dc_context_t *context, double latitude, double longitude, double accuracy)
Set current location.
void dc_set_chat_visibility(dc_context_t *context, uint32_t chat_id, int visibility)
Set chat visibility to pinned, archived or normal.
int dc_get_push_state(dc_context_t *context)
Get the current push notification state.
int dc_add_contact_to_chat(dc_context_t *context, uint32_t chat_id, uint32_t contact_id)
Add a member to a group.
char * dc_get_msg_info(dc_context_t *context, uint32_t msg_id)
Get an informational text for a single message.
char * dc_get_connectivity_html(dc_context_t *context)
Get an overview of the current connectivity, and possibly more statistics.
dc_array_t * dc_get_chat_contacts(dc_context_t *context, uint32_t chat_id)
Get the contact IDs belonging to a chat.
dc_chat_t * dc_get_chat(dc_context_t *context, uint32_t chat_id)
Get a chat object by a chat ID.
uint32_t dc_get_id(dc_context_t *context)
Get the ID of a context object.
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.
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.
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.
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.
void dc_download_full_msg(dc_context_t *context, int msg_id)
Asks the core to start downloading a message fully.
char * dc_get_msg_html(dc_context_t *context, uint32_t msg_id)
Get uncut message, if available.
dc_event_emitter_t * dc_get_event_emitter(dc_context_t *context)
Create the event emitter that is used to receive events.
void dc_start_io(dc_context_t *context)
Start job and IMAP/SMTP tasks.
void dc_imex(dc_context_t *context, int what, const char *param1, const char *param2)
Import/export things.
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_array_t * dc_import_vcard(dc_context_t *context, const char *vcard)
Import a vCard.
char * dc_get_webxdc_status_updates(dc_context_t *context, uint32_t msg_id, uint32_t serial)
Get webxdc status updates.
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.
uint32_t dc_create_chat_by_contact_id(dc_context_t *context, uint32_t contact_id)
Create a normal chat with a single user.
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.
int dc_send_webxdc_status_update(dc_context_t *context, uint32_t msg_id, const char *json, const char *descr)
A webxdc instance sends a status update to its other members.
dc_chatlist_t * dc_get_similar_chatlist(dc_context_t *context, uint32_t chat_id)
Returns a list of similar chats.
void dc_save_msgs(dc_context_t *context, const uint32_t *msg_ids, int msg_cnt)
Save a copy of messages in "Saved Messages".
int dc_set_config_from_qr(dc_context_t *context, const char *qr)
Set configuration values from a QR code.
void dc_str_unref(char *str)
Release a string returned by another deltachat-core function.
void dc_send_edit_request(dc_context_t *context, uint32_t msg_id, const char *new_text)
Send chat members a request to edit the given message's text.
int dc_delete_contact(dc_context_t *context, uint32_t contact_id)
Delete a contact so that it disappears from the corresponding lists.
void dc_delete_chat(dc_context_t *context, uint32_t chat_id)
Delete a chat.
void dc_block_contact(dc_context_t *context, uint32_t contact_id, int block)
Block or unblock a contact.
int dc_resend_msgs(dc_context_t *context, const uint32_t *msg_ids, int msg_cnt)
Resend messages and make information available for newly added chat members.
void dc_delete_msgs(dc_context_t *context, const uint32_t *msg_ids, int msg_cnt)
Delete messages.
void dc_configure(dc_context_t *context)
Configure a context.
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...
void dc_markseen_msgs(dc_context_t *context, const uint32_t *msg_ids, int msg_cnt)
Mark messages as presented to the user.
uint32_t dc_create_group_chat(dc_context_t *context, int protect, const char *name)
Create a new group chat.
void dc_delete_all_locations(dc_context_t *context)
Delete all locations on the current device.
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.
int dc_context_is_open(dc_context_t *context)
Returns 1 if database is open.
int dc_accept_incoming_call(dc_context_t *context, uint32_t msg_id, const char *accept_call_info)
Accept incoming call.
void dc_accept_chat(dc_context_t *context, uint32_t chat_id)
Accept a contact request chat.
int dc_context_open(dc_context_t *context, const char *passphrase)
Opens the database with the given passphrase.
int dc_context_change_passphrase(dc_context_t *context, const char *passphrase)
Changes the passphrase on the open database.
char * dc_get_chat_encrinfo(dc_context_t *context, uint32_t chat_id)
Get encryption info for a chat.
uint32_t dc_place_outgoing_call(dc_context_t *context, uint32_t chat_id, const char *place_call_info, int has_video)
Start an outgoing call.
int dc_set_config(dc_context_t *context, const char *key, const char *value)
Configure the context.
Opaque object that is used to create an event emitter which can be used log events during startup of ...
dc_event_channel_t * dc_event_channel_new(void)
Create a new event channel.
dc_event_emitter_t * dc_event_channel_get_event_emitter(dc_event_channel_t *event_channel)
Create the event emitter that is used to receive events.
void dc_event_channel_unref(dc_event_channel_t *event_channel)
Release/free the events channel structure.
Opaque object that is used to get events from a single context.
void dc_event_emitter_unref(dc_event_emitter_t *emitter)
Free a context event emitter object.
dc_event_t * dc_get_next_event(dc_event_emitter_t *emitter)
Get the next event from a context event emitter object.
Opaque object describing a single event.
void dc_event_unref(dc_event_t *event)
Free memory used by an event object.
int dc_event_get_data2_int(dc_event_t *event)
Get data associated with an event object.
char * dc_event_get_data1_str(dc_event_t *event)
Get data associated with an event object.
char * dc_event_get_data2_str(dc_event_t *event)
Get data associated with an event object.
uint32_t dc_event_get_account_id(dc_event_t *event)
Get the account ID this event belongs to.
int dc_event_get_id(dc_event_t *event)
Get the event ID from an event object.
int dc_event_get_data1_int(dc_event_t *event)
Get data associated with an event object.
Opaque object for using the json rpc api from the cffi bindings.
char * dc_jsonrpc_next_response(dc_jsonrpc_instance_t *jsonrpc_instance)
Get the next json_rpc response, blocks until there is a new event, so call this in a loop from a thre...
void dc_jsonrpc_unref(dc_jsonrpc_instance_t *jsonrpc_instance)
Free a jsonrpc instance.
char * dc_jsonrpc_blocking_call(dc_jsonrpc_instance_t *jsonrpc_instance, const char *input)
Make a JSON-RPC call and return a response.
void dc_jsonrpc_request(dc_jsonrpc_instance_t *jsonrpc_instance, const char *request)
Makes an asynchronous jsonrpc request, returns immediately and once the result is ready it can be ret...
An object containing a set of values.
int64_t dc_lot_get_timestamp(const dc_lot_t *lot)
Get the associated timestamp.
int dc_lot_get_state(const dc_lot_t *lot)
Get the associated state.
uint32_t dc_lot_get_id(const dc_lot_t *lot)
Get the associated ID.
int dc_lot_get_text1_meaning(const dc_lot_t *lot)
Get the meaning of the first string.
void dc_lot_unref(dc_lot_t *lot)
Frees an object containing a set of parameters.
char * dc_lot_get_text1(const dc_lot_t *lot)
Get first string.
char * dc_lot_get_text2(const dc_lot_t *lot)
Get second string.
An object representing a single message in memory.
void dc_msg_set_html(dc_msg_t *msg, const char *html)
Set the HTML part of a message object.
char * dc_msg_get_webxdc_blob(const dc_msg_t *msg, const char *filename, size_t *ret_bytes)
Return a file from inside a webxdc message.
uint32_t dc_msg_get_ephemeral_timer(const dc_msg_t *msg)
Get the ephemeral timer duration for a message.
char * dc_msg_get_filename(const dc_msg_t *msg)
Get an original attachment filename, with extension but without the path.
void dc_msg_set_override_sender_name(dc_msg_t *msg, const char *name)
Set different sender name for a message.
char * dc_msg_get_summarytext(const dc_msg_t *msg, int approx_characters)
Get a message summary as a single line of text.
int dc_msg_get_showpadlock(const dc_msg_t *msg)
Check if message was correctly encrypted and signed.
dc_lot_t * dc_msg_get_summary(const dc_msg_t *msg, const dc_chat_t *chat)
Get a summary for a message.
uint32_t dc_msg_get_chat_id(const dc_msg_t *msg)
Get the ID of the chat the message belongs to.
void dc_msg_set_quote(dc_msg_t *msg, const dc_msg_t *quote)
Set the message replying to.
int dc_msg_has_location(const dc_msg_t *msg)
Check if a message has a POI location bound to it.
char * dc_msg_get_text(const dc_msg_t *msg)
Get the text of the message.
uint32_t dc_msg_get_from_id(const dc_msg_t *msg)
Get the ID of the contact who wrote the message.
int64_t dc_msg_get_ephemeral_timestamp(const dc_msg_t *msg)
Get the timestamp of the ephemeral message removal.
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.
void dc_msg_set_duration(dc_msg_t *msg, int duration)
Set the duration associated with message object.
void dc_msg_set_file_and_deduplicate(dc_msg_t *msg, const char *file, const char *name, const char *filemime)
Sets the file associated with a message.
int dc_msg_save_file(const dc_msg_t *msg, const char *path)
Save file copy at the user-provided path.
void dc_msg_set_text(dc_msg_t *msg, const char *text)
Set the text of a message object.
int64_t dc_msg_get_timestamp(const dc_msg_t *msg)
Get the message sending time.
uint32_t dc_msg_get_original_msg_id(const dc_msg_t *msg)
Get original message ID for a saved message from the "Saved Messages" chat.
char * dc_msg_get_quoted_text(const dc_msg_t *msg)
Get quoted text, if any.
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...
void dc_msg_set_subject(dc_msg_t *msg, const char *subject)
Sets the email's subject.
int dc_msg_get_width(const dc_msg_t *msg)
Get the width of an image or a video.
char * dc_msg_get_filemime(const dc_msg_t *msg)
Get the MIME type of a file.
void dc_msg_unref(dc_msg_t *msg)
Free a message object.
char * dc_msg_get_webxdc_href(const dc_msg_t *msg)
Get link attached to an webxdc info message.
int dc_msg_is_bot(const dc_msg_t *msg)
Check if an incoming message is a bot message, i.e.
void dc_msg_set_dimension(dc_msg_t *msg, int width, int height)
Set the dimensions associated with message object.
int dc_msg_is_forwarded(const dc_msg_t *msg)
Check if the message is a forwarded message.
int dc_msg_has_deviating_timestamp(const dc_msg_t *msg)
Check if a message has a deviating timestamp.
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.
void dc_msg_latefiling_mediasize(dc_msg_t *msg, int width, int height, int duration)
Late filing information to a message.
int dc_msg_is_edited(const dc_msg_t *msg)
Check if the message was edited.
int dc_msg_get_state(const dc_msg_t *msg)
Get the state of a message.
void dc_msg_set_location(dc_msg_t *msg, double latitude, double longitude)
Set any location that should be bound to the message object.
uint64_t dc_msg_get_filebytes(const dc_msg_t *msg)
Get the size of the file.
char * dc_msg_get_subject(const dc_msg_t *msg)
Get the subject of the e-mail.
dc_msg_t * dc_msg_get_quoted_msg(const dc_msg_t *msg)
Get quoted message, if available.
uint32_t dc_msg_get_info_contact_id(const dc_msg_t *msg)
Return the contact ID of the profile to open when tapping the info message.
dc_msg_t * dc_msg_get_parent(const dc_msg_t *msg)
Get parent message, if available.
dc_msg_t * dc_msg_new(dc_context_t *context, int viewtype)
Create new message object.
void dc_msg_force_plaintext(dc_msg_t *msg)
Force the message to be sent in plain text.
int dc_msg_has_html(dc_msg_t *msg)
Checks if the message has a full HTML version.
int dc_msg_get_duration(const dc_msg_t *msg)
Get the duration of audio or video.
uint32_t dc_msg_get_id(const dc_msg_t *msg)
Get the ID of the message.
uint32_t dc_msg_get_saved_msg_id(const dc_msg_t *msg)
Check if a message was saved and return its ID inside "Saved Messages".
int dc_msg_get_info_type(const dc_msg_t *msg)
Get the type of an informational message.
int dc_msg_get_viewtype(const dc_msg_t *msg)
Get the type of the message.
int64_t dc_msg_get_sort_timestamp(const dc_msg_t *msg)
Get the message time used for sorting.
int dc_msg_get_height(const dc_msg_t *msg)
Get the height of an image or a video.
char * dc_msg_get_error(const dc_msg_t *msg)
Gets the error status of the message.
int dc_msg_is_sent(const dc_msg_t *msg)
Check if a message was sent successfully.
char * dc_msg_get_file(const dc_msg_t *msg)
Find out full path of the file associated with a message.
int64_t dc_msg_get_received_timestamp(const dc_msg_t *msg)
Get the message receive time.
char * dc_msg_get_webxdc_info(const dc_msg_t *msg)
Get info from a webxdc message, in JSON format.
Opaque object containing information about one single e-mail provider.
int dc_provider_get_status(const dc_provider_t *provider)
Whether DC works with this provider.
char * dc_provider_get_before_login_hint(const dc_provider_t *provider)
Get hints to be shown to the user on the login screen.
char * dc_provider_get_overview_page(const dc_provider_t *provider)
URL of the overview page.
dc_provider_t * dc_provider_new_from_email_with_dns(const dc_context_t *context, const char *email)
Create a provider struct for the given e-mail address by local lookup.
dc_provider_t * dc_provider_new_from_email(const dc_context_t *context, const char *email)
Create a provider struct for the given e-mail address by local lookup.
void dc_provider_unref(dc_provider_t *provider)
Free the provider info struct.