mirror of
https://github.com/deltachat/deltachat-core.git
synced 2025-10-05 19:42:04 +02:00
refactor pull -> poll
This commit is contained in:
parent
97f258fccf
commit
cc812fc69c
4 changed files with 10 additions and 10 deletions
|
@ -453,7 +453,7 @@ char* mrmailbox_cmdline(mrmailbox_t* mailbox, const char* cmdline)
|
|||
"configure\n"
|
||||
"connect\n"
|
||||
"disconnect\n"
|
||||
"pull\n"
|
||||
"poll\n"
|
||||
"help imex (Import/Export)\n"
|
||||
"==============================Chat commands==\n"
|
||||
"listchats [<query>]\n"
|
||||
|
@ -690,10 +690,10 @@ char* mrmailbox_cmdline(mrmailbox_t* mailbox, const char* cmdline)
|
|||
mrmailbox_disconnect(mailbox);
|
||||
ret = COMMAND_SUCCEEDED;
|
||||
}
|
||||
else if( strcmp(cmd, "pull")==0 )
|
||||
else if( strcmp(cmd, "poll")==0 )
|
||||
{
|
||||
int seconds = mrmailbox_pull(mailbox);
|
||||
ret = mr_mprintf("Should pull again in %i seconds.", seconds);
|
||||
int seconds = mrmailbox_poll(mailbox);
|
||||
ret = mr_mprintf("Should poll again in %i seconds.", seconds);
|
||||
}
|
||||
else if( strcmp(cmd, "info")==0 )
|
||||
{
|
||||
|
|
|
@ -1759,7 +1759,7 @@ int mrimap_markseen_msg(mrimap_t* ths, const char* folder, uint32_t server_uid,
|
|||
{
|
||||
mrmailbox_log_info(ths->m_mailbox, 0, "Message %s/%i is already in %s...", folder, (int)server_uid, ths->m_moveto_folder);
|
||||
/* avoid deadlocks as moving messages in the same folder may be result in a new server_uid and the state "fresh" -
|
||||
we will catch these messages again on the next pull, try to move them away and so on, see also (***) in mrmailbox.c */
|
||||
we will catch these messages again on the next poll, try to move them away and so on, see also (***) in mrmailbox.c */
|
||||
}
|
||||
else if( ths->m_moveto_folder )
|
||||
{
|
||||
|
|
|
@ -214,7 +214,7 @@ int mrmailbox_is_configured (mrmailbox_t*);
|
|||
|
||||
void mrmailbox_connect (mrmailbox_t*);
|
||||
void mrmailbox_disconnect (mrmailbox_t*);
|
||||
int mrmailbox_pull (mrmailbox_t*);
|
||||
int mrmailbox_poll (mrmailbox_t*);
|
||||
|
||||
void mrmailbox_stop_ongoing_process(mrmailbox_t*);
|
||||
|
||||
|
|
|
@ -68,7 +68,7 @@ cleanup:
|
|||
|
||||
/**
|
||||
* Connect to the mailbox using the configured settings. We connect using IMAP-IDLE or, if this is not possible,
|
||||
* a using pull algorithm.
|
||||
* a using poll algorithm.
|
||||
*
|
||||
* @memberof mrmailbox_t
|
||||
*
|
||||
|
@ -121,13 +121,13 @@ void mrmailbox_disconnect(mrmailbox_t* mailbox)
|
|||
|
||||
|
||||
/**
|
||||
* Check for changes in the mailbox. mrmailbox_pull() connects, checks and disconnects
|
||||
* Check for changes in the mailbox. mrmailbox_poll() connects, checks and disconnects
|
||||
* as fast as possible for this purpose. If there are new messages, you get them
|
||||
* as usual through the event handler given to mrmailbox_new().
|
||||
*
|
||||
* The function may take a while until it returns, typically about 1 second
|
||||
* but if connection is not possible, it may be much longer. The caller may
|
||||
* want to call mrmailbox_pull() from a non-ui thread therefore.
|
||||
* want to call mrmailbox_poll() from a non-ui thread therefore.
|
||||
*
|
||||
* @memberof mrmailbox_t
|
||||
*
|
||||
|
@ -135,7 +135,7 @@ void mrmailbox_disconnect(mrmailbox_t* mailbox)
|
|||
*
|
||||
* @return Returns the number of seconds when this function should be called again.
|
||||
*/
|
||||
int mrmailbox_pull(mrmailbox_t* mailbox)
|
||||
int mrmailbox_poll(mrmailbox_t* mailbox)
|
||||
{
|
||||
if( mailbox == NULL || mailbox->m_magic != MR_MAILBOX_MAGIC ) {
|
||||
goto cleanup;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue