Delta Chat Core C-API
dc_loginparam.h
1 #ifndef __DC_LOGINPARAM_H__
2 #define __DC_LOGINPARAM_H__
3 #ifdef __cplusplus
4 extern "C" {
5 #endif
6 
7 
8 typedef struct _dc_loginparam dc_loginparam_t;
9 
10 
14 struct _dc_loginparam
15 {
18  /* IMAP - all pointers may be NULL if unset, public read */
19  char* addr;
20  char* mail_server;
21  char* mail_user;
22  char* mail_pw;
23  uint16_t mail_port;
24 
25  /* SMTP - all pointers may be NULL if unset, public read */
26  char* send_server;
27  char* send_user;
28  char* send_pw;
29  int send_port;
30 
31  /* Server options as DC_LP_* flags */
32  int server_flags;
33 };
34 
35 
36 dc_loginparam_t* dc_loginparam_new ();
37 void dc_loginparam_unref (dc_loginparam_t*);
38 void dc_loginparam_empty (dc_loginparam_t*); /* clears all data and frees its memory. All pointers are NULL after this function is called. */
39 void dc_loginparam_read (dc_loginparam_t*, dc_sqlite3_t*, const char* prefix);
40 void dc_loginparam_write (const dc_loginparam_t*, dc_sqlite3_t*, const char* prefix);
41 char* dc_loginparam_get_readable (const dc_loginparam_t*);
42 
43 
44 #ifdef __cplusplus
45 } /* /extern "C" */
46 #endif
47 #endif /* __DC_LOGINPARAM_H__ */
48