1
0
Fork 0
mirror of https://github.com/deltachat/deltachat-core.git synced 2025-10-05 02:29:28 +02:00
This commit is contained in:
B. Petersen 2017-11-15 22:04:36 +01:00
parent 17206eacba
commit 48c81e965f
5 changed files with 50 additions and 50 deletions

View file

@ -579,7 +579,8 @@ void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="st
<p>Configure and connect a mailbox. </p>
<ul>
<li>Before your call this function, you should set at least <code>addr</code> and <code>mail_pw</code> using <a class="el" href="structmrmailbox__t.html#a19b3e9f5209bc326fc77f3944522e8ad" title="Configure the mailbox. ">mrmailbox_set_config()</a>.</li>
<li><a class="el" href="structmrmailbox__t.html#a42ca741cc08785585f1dc74d515be5ef" title="Configure and connect a mailbox. ">mrmailbox_configure_and_connect()</a> may take a while, so it might be a good idea to let it run in a non-GUI-thread; to cancel the configuration progress, you can then use <a class="el" href="structmrmailbox__t.html#a8127c0e3f4cfda14fdfd7be9f43715ef" title="Signal the configure-process to stop. ">mrmailbox_configure_cancel()</a></li>
<li><a class="el" href="structmrmailbox__t.html#a42ca741cc08785585f1dc74d515be5ef" title="Configure and connect a mailbox. ">mrmailbox_configure_and_connect()</a> may take a while, so it might be a good idea to let it run in a non-GUI-thread; to cancel the configuration progress, you can then use <a class="el" href="structmrmailbox__t.html#a8127c0e3f4cfda14fdfd7be9f43715ef" title="Signal the configure-process to stop. ">mrmailbox_configure_cancel()</a>.</li>
<li>The function sends out a number of <a class="el" href="mrevent_8h.html#abb0881d4c7c887b8f371cedc471846b5" title="Inform about the configuration progress started by mrmailbox_configure_and_connect(). ">MR_EVENT_CONFIGURE_PROGRESS</a> events that may be used to create a progress bar or stuff like that.</li>
<li>There is no need to call this every program start, the result is saved in the database.</li>
</ul>
<dl class="params"><dt>Parameters</dt><dd>
@ -608,7 +609,7 @@ void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="st
<p>Signal the configure-process to stop. </p>
<p>After that, <a class="el" href="structmrmailbox__t.html#a8127c0e3f4cfda14fdfd7be9f43715ef" title="Signal the configure-process to stop. ">mrmailbox_configure_cancel()</a> returns <em>without</em> waiting for <a class="el" href="structmrmailbox__t.html#a42ca741cc08785585f1dc74d515be5ef" title="Configure and connect a mailbox. ">mrmailbox_configure_and_connect()</a> to return.</p>
<p><a class="el" href="structmrmailbox__t.html#a42ca741cc08785585f1dc74d515be5ef" title="Configure and connect a mailbox. ">mrmailbox_configure_and_connect()</a> will return ASAP then, however, it may still take a second. If in doubt, the caller may also decide the kill the thread after a few seconds; eg. the configuration process may hang in a function not under the control of the core (eg. <a class="el" href="mrevent_8h.html#aba8b1a46a18cd05070b301c757a74ddc" title="Request a HTTP-file from the frontend. ">MR_EVENT_HTTP_GET</a>)</p>
<p><a class="el" href="structmrmailbox__t.html#a42ca741cc08785585f1dc74d515be5ef" title="Configure and connect a mailbox. ">mrmailbox_configure_and_connect()</a> will return ASAP then, however, it may still take a moment. If in doubt, the caller may also decide the kill the thread after a few seconds; eg. the configuration process may hang in a function not under the control of the core (eg. <a class="el" href="mrevent_8h.html#aba8b1a46a18cd05070b301c757a74ddc" title="Request a HTTP-file from the frontend. ">MR_EVENT_HTTP_GET</a>). Another reason for <a class="el" href="structmrmailbox__t.html#a8127c0e3f4cfda14fdfd7be9f43715ef" title="Signal the configure-process to stop. ">mrmailbox_configure_cancel()</a> not to wait is that otherwise it would be GUI-blocking and should be started in another thread then; this would make things even more complicated.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">mailbox</td><td>The mailbox object as created by <a class="el" href="structmrmailbox__t.html#a32825e3e0a1b16679580704a4b43db1a" title="Create a new mailbox object. ">mrmailbox_new()</a></td></tr>