1
0
Fork 0
mirror of https://github.com/deltachat/deltachat-core.git synced 2025-10-05 19:42:04 +02:00
This commit is contained in:
B. Petersen 2017-11-16 11:27:11 +01:00
parent 02d4b4da93
commit bf00536426
21 changed files with 122 additions and 93 deletions

View file

@ -150,7 +150,7 @@ Public Member Functions</h2></td></tr>
<tr class="memdesc:a4da10c87eb65bbf6c504979d75ec3b19"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a list of chats. <a href="#a4da10c87eb65bbf6c504979d75ec3b19">More...</a><br /></td></tr>
<tr class="separator:a4da10c87eb65bbf6c504979d75ec3b19"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad106b9c23b3a559b524a37bb5504e096"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structmrchat__t.html">mrchat_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmailbox__t.html#ad106b9c23b3a559b524a37bb5504e096">mrmailbox_get_chat</a> (<a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *mailbox, uint32_t chat_id)</td></tr>
<tr class="memdesc:ad106b9c23b3a559b524a37bb5504e096"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a chat object of type <a class="el" href="structmrchat__t.html" title="An object representing a single chat in memory. ">mrchat_t</a> by a chat_id. <a href="#ad106b9c23b3a559b524a37bb5504e096">More...</a><br /></td></tr>
<tr class="memdesc:ad106b9c23b3a559b524a37bb5504e096"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get chat object by a chat ID. <a href="#ad106b9c23b3a559b524a37bb5504e096">More...</a><br /></td></tr>
<tr class="separator:ad106b9c23b3a559b524a37bb5504e096"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a07cc8fe0cfd900a9449bffc4ca5a7a95"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmailbox__t.html#a07cc8fe0cfd900a9449bffc4ca5a7a95">mrmailbox_marknoticed_chat</a> (<a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *mailbox, uint32_t chat_id)</td></tr>
<tr class="memdesc:a07cc8fe0cfd900a9449bffc4ca5a7a95"><td class="mdescLeft">&#160;</td><td class="mdescRight">Mark all message in a chat as <em>noticed</em>. <a href="#a07cc8fe0cfd900a9449bffc4ca5a7a95">More...</a><br /></td></tr>
@ -581,7 +581,6 @@ void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="st
<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>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>
<table class="params">
@ -589,8 +588,9 @@ void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="st
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>1=configured and connected, 0=not configured, not explicitly connected, however, an existing connection may still be present </dd></dl>
<dl class="section return"><dt>Returns</dt><dd>1=configured and connected, 0=not configured, not explicitly connected, however, an existing connection may still be present</dd></dl>
<p>There is no need to call this every program start, the result is saved in the database. Instead, you can use <a class="el" href="structmrmailbox__t.html#a67eef5ffc3369b8ad09326471b0a266f" title="Connect to the mailbox using the configured settings. ">mrmailbox_connect()</a> which reuses the configuration and is much faster:</p>
<div class="fragment"><div class="line"><span class="keywordflow">if</span>( <a class="code" href="structmrmailbox__t.html#aa6e325e49ecccfc96276db6c327dba94">mrmailbox_is_configured</a>(mailbox) ) {</div><div class="line"> <a class="code" href="structmrmailbox__t.html#a67eef5ffc3369b8ad09326471b0a266f">mrmailbox_connect</a>(mailbox); <span class="comment">// fast, reuse the configuration</span></div><div class="line">}</div><div class="line"><span class="keywordflow">else</span> {</div><div class="line"> <a class="code" href="structmrmailbox__t.html#a42ca741cc08785585f1dc74d515be5ef">mrmailbox_configure_and_connect</a>(mailbox); <span class="comment">// may take a while, typically started in a thread</span></div><div class="line">}</div></div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a8127c0e3f4cfda14fdfd7be9f43715ef"></a>
@ -1066,8 +1066,7 @@ void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="st
</table>
</div><div class="memdoc">
<p>Get a chat object of type <a class="el" href="structmrchat__t.html" title="An object representing a single chat in memory. ">mrchat_t</a> by a chat_id. </p>
<p>To access the <a class="el" href="structmrchat__t.html" title="An object representing a single chat in memory. ">mrchat_t</a> object, see <a class="el" href="mrchat_8h_source.html">mrchat.h</a> The result must be unref'd using <a class="el" href="structmrchat__t.html#a3b1befb4542c1bad915f2175c7c2a2b9" title="Free a chat object. ">mrchat_unref()</a>.</p>
<p>Get chat object by a chat ID. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">mailbox</td><td>The mailbox object as returned from <a class="el" href="structmrmailbox__t.html#a32825e3e0a1b16679580704a4b43db1a" title="Create a new mailbox object. ">mrmailbox_new()</a>.</td></tr>
@ -1075,7 +1074,7 @@ void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="st
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A chat object, must be freed using <a class="el" href="structmrchat__t.html#a3b1befb4542c1bad915f2175c7c2a2b9" title="Free a chat object. ">mrchat_unref()</a> when done. </dd></dl>
<dl class="section return"><dt>Returns</dt><dd>A chat object of the type <a class="el" href="structmrchat__t.html" title="An object representing a single chat in memory. ">mrchat_t</a>, must be freed using <a class="el" href="structmrchat__t.html#a3b1befb4542c1bad915f2175c7c2a2b9" title="Free a chat object. ">mrchat_unref()</a> when done. </dd></dl>
</div>
</div>
@ -1878,14 +1877,14 @@ void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="st
</div><div class="memdoc">
<p>Check if the mailbox is already configured. </p>
<p>Typically, for unconfigured mailboxes, the user is prompeted for to enter some settings and <a class="el" href="structmrmailbox__t.html#a42ca741cc08785585f1dc74d515be5ef" title="Configure and connect a mailbox. ">mrmailbox_configure_and_connect()</a> is called with them.</p>
<p>Typically, for unconfigured mailboxes, the user is prompeted for to enter some settings and <a class="el" href="structmrmailbox__t.html#a42ca741cc08785585f1dc74d515be5ef" title="Configure and connect a mailbox. ">mrmailbox_configure_and_connect()</a> is called in a thread then.</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>
<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>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None </dd></dl>
<dl class="section return"><dt>Returns</dt><dd>1=mailbox is configured and <a class="el" href="structmrmailbox__t.html#a67eef5ffc3369b8ad09326471b0a266f" title="Connect to the mailbox using the configured settings. ">mrmailbox_connect()</a> can be called directly as needed, 0=mailbox is not configured and a configuration by <a class="el" href="structmrmailbox__t.html#a42ca741cc08785585f1dc74d515be5ef" title="Configure and connect a mailbox. ">mrmailbox_configure_and_connect()</a> is required. </dd></dl>
</div>
</div>