35 typedef struct mrloginparam_t mrloginparam_t;
36 typedef struct mrimap_t mrimap_t;
38 #define MR_IMAP_SEEN 0x0001L 40 typedef int32_t (*mr_get_config_int_t)(mrimap_t*,
const char*, int32_t);
41 typedef void (*mr_set_config_int_t)(mrimap_t*,
const char*, int32_t);
42 typedef void (*mr_receive_imf_t) (mrimap_t*,
const char* imf_raw_not_terminated,
size_t imf_raw_bytes,
const char* server_folder, uint32_t server_uid, uint32_t flags);
48 typedef struct mrimap_t
60 pthread_mutex_t m_hEtpanmutex;
62 char* m_selected_folder;
63 int m_should_reconnect;
67 char* m_moveto_folder;
69 pthread_mutex_t m_idlemutex;
70 pthread_mutex_t m_inwait_mutex;
72 pthread_t m_watch_thread;
73 pthread_cond_t m_watch_cond;
74 pthread_mutex_t m_watch_condmutex;
78 time_t m_enter_watch_wait_time;
80 pthread_t m_heartbeat_thread;
81 pthread_cond_t m_heartbeat_cond;
82 pthread_mutex_t m_heartbeat_condmutex;
84 pthread_t m_restore_thread;
85 int m_restore_thread_created;
86 int m_restore_do_exit;
88 struct mailimap_fetch_type* m_fetch_type_uid;
89 struct mailimap_fetch_type* m_fetch_type_body;
90 struct mailimap_fetch_type* m_fetch_type_flags;
92 mr_get_config_int_t m_get_config_int;
93 mr_set_config_int_t m_set_config_int;
94 mr_receive_imf_t m_receive_imf;
98 int m_log_connect_errors;
102 mrimap_t* mrimap_new (mr_get_config_int_t, mr_set_config_int_t, mr_receive_imf_t,
void* userData,
mrmailbox_t*);
103 void mrimap_unref (mrimap_t*);
105 int mrimap_connect (mrimap_t*,
const mrloginparam_t*);
106 void mrimap_disconnect (mrimap_t*);
107 int mrimap_is_connected (mrimap_t*);
108 int mrimap_fetch (mrimap_t*);
109 int mrimap_restore (mrimap_t*, time_t seconds_to_restore);
111 int mrimap_append_msg (mrimap_t*, time_t timestamp,
const char* data_not_terminated,
size_t data_bytes,
char** ret_server_folder, uint32_t* ret_server_uid);
113 #define MR_MS_ALSO_MOVE 0x01 114 #define MR_MS_SET_MDNSent_FLAG 0x02 115 #define MR_MS_MDNSent_JUST_SET 0x10 116 int mrimap_markseen_msg (mrimap_t*,
const char* folder, uint32_t server_uid,
int ms_flags,
char** ret_server_folder, uint32_t* ret_server_uid,
int* ret_ms_flags);
118 int mrimap_delete_msg (mrimap_t*,
const char* rfc724_mid,
const char* folder, uint32_t server_uid);
120 void mrimap_heartbeat (mrimap_t*);
An object representing a single mailbox.
Definition: mrmailbox.h:179