1
0
Fork 0
mirror of https://github.com/deltachat/deltachat-core.git synced 2025-10-04 18:29:19 +02:00
deltachat-core/docs/html/structmrmailbox__t.html
B. Petersen a73b073dc5 doxygen
2017-11-24 15:33:16 +01:00

3026 lines
176 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>Delta Chat Core C-API: mrmailbox_t Struct Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="user.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">Delta Chat Core C-API
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class&#160;List</span></a></li>
<li><a href="functions.html"><span>Class&#160;Members</span></a></li>
</ul>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="structmrmailbox__t-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">mrmailbox_t Struct Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>An object representing a single mailbox.
<a href="structmrmailbox__t.html#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="mrmailbox_8h_source.html">mrmailbox.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a957f0bbae60f389bac40acf42b68b134"><td class="memItemLeft" align="right" valign="top">typedef uintptr_t(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmailbox__t.html#a957f0bbae60f389bac40acf42b68b134">mrmailboxcb_t</a>) (<a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *, int event, uintptr_t data1, uintptr_t data2)</td></tr>
<tr class="memdesc:a957f0bbae60f389bac40acf42b68b134"><td class="mdescLeft">&#160;</td><td class="mdescRight">Callback function that should be given to <a class="el" href="structmrmailbox__t.html#a32825e3e0a1b16679580704a4b43db1a" title="Create a new mailbox object. ">mrmailbox_new()</a>. <a href="#a957f0bbae60f389bac40acf42b68b134">More...</a><br /></td></tr>
<tr class="separator:a957f0bbae60f389bac40acf42b68b134"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a32825e3e0a1b16679580704a4b43db1a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmailbox__t.html#a32825e3e0a1b16679580704a4b43db1a">mrmailbox_new</a> (<a class="el" href="structmrmailbox__t.html#a957f0bbae60f389bac40acf42b68b134">mrmailboxcb_t</a> cb, void *userdata, const char *os_name)</td></tr>
<tr class="memdesc:a32825e3e0a1b16679580704a4b43db1a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a new mailbox object. <a href="#a32825e3e0a1b16679580704a4b43db1a">More...</a><br /></td></tr>
<tr class="separator:a32825e3e0a1b16679580704a4b43db1a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a825cec4a85da05335674eae221d51374"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmailbox__t.html#a825cec4a85da05335674eae221d51374">mrmailbox_unref</a> (<a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *mailbox)</td></tr>
<tr class="memdesc:a825cec4a85da05335674eae221d51374"><td class="mdescLeft">&#160;</td><td class="mdescRight">Free a mailbox object. <a href="#a825cec4a85da05335674eae221d51374">More...</a><br /></td></tr>
<tr class="separator:a825cec4a85da05335674eae221d51374"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae4c9c9f9ce4b3de82b3ce7fc582cbc5b"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmailbox__t.html#ae4c9c9f9ce4b3de82b3ce7fc582cbc5b">mrmailbox_open</a> (<a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *mailbox, const char *dbfile, const char *blobdir)</td></tr>
<tr class="memdesc:ae4c9c9f9ce4b3de82b3ce7fc582cbc5b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Open mailbox database. <a href="#ae4c9c9f9ce4b3de82b3ce7fc582cbc5b">More...</a><br /></td></tr>
<tr class="separator:ae4c9c9f9ce4b3de82b3ce7fc582cbc5b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a75011d103515e088e950a64d0706ec86"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmailbox__t.html#a75011d103515e088e950a64d0706ec86">mrmailbox_close</a> (<a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *mailbox)</td></tr>
<tr class="memdesc:a75011d103515e088e950a64d0706ec86"><td class="mdescLeft">&#160;</td><td class="mdescRight">Close mailbox database. <a href="#a75011d103515e088e950a64d0706ec86">More...</a><br /></td></tr>
<tr class="separator:a75011d103515e088e950a64d0706ec86"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aace7cd8b68f45b869956d5c7476a1da0"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmailbox__t.html#aace7cd8b68f45b869956d5c7476a1da0">mrmailbox_is_open</a> (const <a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *mailbox)</td></tr>
<tr class="memdesc:aace7cd8b68f45b869956d5c7476a1da0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check if the mailbox database is open. <a href="#aace7cd8b68f45b869956d5c7476a1da0">More...</a><br /></td></tr>
<tr class="separator:aace7cd8b68f45b869956d5c7476a1da0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a19b3e9f5209bc326fc77f3944522e8ad"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmailbox__t.html#a19b3e9f5209bc326fc77f3944522e8ad">mrmailbox_set_config</a> (<a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *ths, const char *key, const char *value)</td></tr>
<tr class="memdesc:a19b3e9f5209bc326fc77f3944522e8ad"><td class="mdescLeft">&#160;</td><td class="mdescRight">Configure the mailbox. <a href="#a19b3e9f5209bc326fc77f3944522e8ad">More...</a><br /></td></tr>
<tr class="separator:a19b3e9f5209bc326fc77f3944522e8ad"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeb12e9631508fd76e3e9828a82031767"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmailbox__t.html#aeb12e9631508fd76e3e9828a82031767">mrmailbox_get_config</a> (<a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *ths, const char *key, const char *def)</td></tr>
<tr class="memdesc:aeb12e9631508fd76e3e9828a82031767"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a configuration option. <a href="#aeb12e9631508fd76e3e9828a82031767">More...</a><br /></td></tr>
<tr class="separator:aeb12e9631508fd76e3e9828a82031767"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a889aea3b38561016ffa2343d5106c38d"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmailbox__t.html#a889aea3b38561016ffa2343d5106c38d">mrmailbox_set_config_int</a> (<a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *ths, const char *key, int32_t value)</td></tr>
<tr class="memdesc:a889aea3b38561016ffa2343d5106c38d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Configure the mailbox. <a href="#a889aea3b38561016ffa2343d5106c38d">More...</a><br /></td></tr>
<tr class="separator:a889aea3b38561016ffa2343d5106c38d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afba149fcbcb5a069113aed4336f4bcc7"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmailbox__t.html#afba149fcbcb5a069113aed4336f4bcc7">mrmailbox_get_config_int</a> (<a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *ths, const char *key, int32_t def)</td></tr>
<tr class="memdesc:afba149fcbcb5a069113aed4336f4bcc7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a configuration option. <a href="#afba149fcbcb5a069113aed4336f4bcc7">More...</a><br /></td></tr>
<tr class="separator:afba149fcbcb5a069113aed4336f4bcc7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4b3257b21c3c9ff539fc6a9315be1164"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmailbox__t.html#a4b3257b21c3c9ff539fc6a9315be1164">mrmailbox_get_info</a> (<a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *mailbox)</td></tr>
<tr class="memdesc:a4b3257b21c3c9ff539fc6a9315be1164"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get information about the mailbox. <a href="#a4b3257b21c3c9ff539fc6a9315be1164">More...</a><br /></td></tr>
<tr class="separator:a4b3257b21c3c9ff539fc6a9315be1164"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a74bd83d36d90e1201e5ab8003d9a312f"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmailbox__t.html#a74bd83d36d90e1201e5ab8003d9a312f">mrmailbox_get_version_str</a> (void)</td></tr>
<tr class="memdesc:a74bd83d36d90e1201e5ab8003d9a312f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Find out the version of the Delta Chat core library. <a href="#a74bd83d36d90e1201e5ab8003d9a312f">More...</a><br /></td></tr>
<tr class="separator:a74bd83d36d90e1201e5ab8003d9a312f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a67eef5ffc3369b8ad09326471b0a266f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmailbox__t.html#a67eef5ffc3369b8ad09326471b0a266f">mrmailbox_connect</a> (<a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *mailbox)</td></tr>
<tr class="memdesc:a67eef5ffc3369b8ad09326471b0a266f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Connect to the mailbox using the configured settings. <a href="#a67eef5ffc3369b8ad09326471b0a266f">More...</a><br /></td></tr>
<tr class="separator:a67eef5ffc3369b8ad09326471b0a266f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7c7921ff7b7f2e10dc30522af980b785"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmailbox__t.html#a7c7921ff7b7f2e10dc30522af980b785">mrmailbox_disconnect</a> (<a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *mailbox)</td></tr>
<tr class="memdesc:a7c7921ff7b7f2e10dc30522af980b785"><td class="mdescLeft">&#160;</td><td class="mdescRight">Disonnect the mailbox from the server. <a href="#a7c7921ff7b7f2e10dc30522af980b785">More...</a><br /></td></tr>
<tr class="separator:a7c7921ff7b7f2e10dc30522af980b785"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6faa8ec4056da5d1d664d88d3f6cf176"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmailbox__t.html#a6faa8ec4056da5d1d664d88d3f6cf176">mrmailbox_heartbeat</a> (<a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *ths)</td></tr>
<tr class="memdesc:a6faa8ec4056da5d1d664d88d3f6cf176"><td class="mdescLeft">&#160;</td><td class="mdescRight">Stay alive. <a href="#a6faa8ec4056da5d1d664d88d3f6cf176">More...</a><br /></td></tr>
<tr class="separator:a6faa8ec4056da5d1d664d88d3f6cf176"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4da10c87eb65bbf6c504979d75ec3b19"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structmrchatlist__t.html">mrchatlist_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmailbox__t.html#a4da10c87eb65bbf6c504979d75ec3b19">mrmailbox_get_chatlist</a> (<a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *mailbox, int listflags, const char *query)</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 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>
<tr class="separator:a07cc8fe0cfd900a9449bffc4ca5a7a95"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a97eb029d9dd0d33ae492217608958a73"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmailbox__t.html#a97eb029d9dd0d33ae492217608958a73">mrmailbox_get_chat_id_by_contact_id</a> (<a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *mailbox, uint32_t contact_id)</td></tr>
<tr class="memdesc:a97eb029d9dd0d33ae492217608958a73"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check, if there is a normal chat with a given contact. <a href="#a97eb029d9dd0d33ae492217608958a73">More...</a><br /></td></tr>
<tr class="separator:a97eb029d9dd0d33ae492217608958a73"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1386ec2c091b936b65b25b50a302173d"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmailbox__t.html#a1386ec2c091b936b65b25b50a302173d">mrmailbox_create_chat_by_contact_id</a> (<a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *mailbox, uint32_t contact_id)</td></tr>
<tr class="memdesc:a1386ec2c091b936b65b25b50a302173d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a normal chat with a single user. <a href="#a1386ec2c091b936b65b25b50a302173d">More...</a><br /></td></tr>
<tr class="separator:a1386ec2c091b936b65b25b50a302173d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4c69c290d57aa2b76f0260c0c2702023"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structmrarray__t.html">mrarray_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmailbox__t.html#a4c69c290d57aa2b76f0260c0c2702023">mrmailbox_get_chat_media</a> (<a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *mailbox, uint32_t chat_id, int msg_type, int or_msg_type)</td></tr>
<tr class="memdesc:a4c69c290d57aa2b76f0260c0c2702023"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns all message IDs of the given types in a chat. <a href="#a4c69c290d57aa2b76f0260c0c2702023">More...</a><br /></td></tr>
<tr class="separator:a4c69c290d57aa2b76f0260c0c2702023"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a90b7861302d1276a07fdcb2d9c3c73b6"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmailbox__t.html#a90b7861302d1276a07fdcb2d9c3c73b6">mrmailbox_get_next_media</a> (<a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *mailbox, uint32_t curr_msg_id, int dir)</td></tr>
<tr class="memdesc:a90b7861302d1276a07fdcb2d9c3c73b6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get next/previous message of the same type. <a href="#a90b7861302d1276a07fdcb2d9c3c73b6">More...</a><br /></td></tr>
<tr class="separator:a90b7861302d1276a07fdcb2d9c3c73b6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab996f74d0e8b5c82ec7175f29da57e3d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structmrarray__t.html">mrarray_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmailbox__t.html#ab996f74d0e8b5c82ec7175f29da57e3d">mrmailbox_get_chat_contacts</a> (<a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *mailbox, uint32_t chat_id)</td></tr>
<tr class="memdesc:ab996f74d0e8b5c82ec7175f29da57e3d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get contact IDs belonging to a chat. <a href="#ab996f74d0e8b5c82ec7175f29da57e3d">More...</a><br /></td></tr>
<tr class="separator:ab996f74d0e8b5c82ec7175f29da57e3d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a65215149290bec16b173106269b08e5e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structmrarray__t.html">mrarray_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmailbox__t.html#a65215149290bec16b173106269b08e5e">mrmailbox_get_fresh_msgs</a> (<a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *mailbox)</td></tr>
<tr class="memdesc:a65215149290bec16b173106269b08e5e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the message IDs of all <em>fresh</em> messages of any chat. <a href="#a65215149290bec16b173106269b08e5e">More...</a><br /></td></tr>
<tr class="separator:a65215149290bec16b173106269b08e5e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af5ac7f527aef58f8e834f3bd740acd46"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structmrarray__t.html">mrarray_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmailbox__t.html#af5ac7f527aef58f8e834f3bd740acd46">mrmailbox_get_chat_msgs</a> (<a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *mailbox, uint32_t chat_id, uint32_t flags, uint32_t marker1before)</td></tr>
<tr class="memdesc:af5ac7f527aef58f8e834f3bd740acd46"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get all message IDs belonging to a chat. <a href="#af5ac7f527aef58f8e834f3bd740acd46">More...</a><br /></td></tr>
<tr class="separator:af5ac7f527aef58f8e834f3bd740acd46"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abbb08c91369ff2fedc8575f2e1f01e56"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structmrarray__t.html">mrarray_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmailbox__t.html#abbb08c91369ff2fedc8575f2e1f01e56">mrmailbox_search_msgs</a> (<a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *mailbox, uint32_t chat_id, const char *query)</td></tr>
<tr class="memdesc:abbb08c91369ff2fedc8575f2e1f01e56"><td class="mdescLeft">&#160;</td><td class="mdescRight">Search messages containing the given query string. <a href="#abbb08c91369ff2fedc8575f2e1f01e56">More...</a><br /></td></tr>
<tr class="separator:abbb08c91369ff2fedc8575f2e1f01e56"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af50446c1a5e504d27fe29de9e3b8edc3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmailbox__t.html#af50446c1a5e504d27fe29de9e3b8edc3">mrmailbox_set_draft</a> (<a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *mailbox, uint32_t chat_id, const char *msg)</td></tr>
<tr class="memdesc:af50446c1a5e504d27fe29de9e3b8edc3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Save a draft for a chat. <a href="#af50446c1a5e504d27fe29de9e3b8edc3">More...</a><br /></td></tr>
<tr class="separator:af50446c1a5e504d27fe29de9e3b8edc3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5c17b77d9d26022f0bdbef548d37b5c6"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmailbox__t.html#a5c17b77d9d26022f0bdbef548d37b5c6">mrmailbox_get_total_msg_count</a> (<a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *mailbox, uint32_t chat_id)</td></tr>
<tr class="memdesc:a5c17b77d9d26022f0bdbef548d37b5c6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the total number of messages in a chat. <a href="#a5c17b77d9d26022f0bdbef548d37b5c6">More...</a><br /></td></tr>
<tr class="separator:a5c17b77d9d26022f0bdbef548d37b5c6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adcdfd1e0899d3c9778238d49933813a5"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmailbox__t.html#adcdfd1e0899d3c9778238d49933813a5">mrmailbox_get_fresh_msg_count</a> (<a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *mailbox, uint32_t chat_id)</td></tr>
<tr class="memdesc:adcdfd1e0899d3c9778238d49933813a5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the number of <em>fresh</em> messages in a chat. <a href="#adcdfd1e0899d3c9778238d49933813a5">More...</a><br /></td></tr>
<tr class="separator:adcdfd1e0899d3c9778238d49933813a5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8e04e43dacbe3128afd71e1d6c1b0911"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmailbox__t.html#a8e04e43dacbe3128afd71e1d6c1b0911">mrmailbox_archive_chat</a> (<a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *mailbox, uint32_t chat_id, int archive)</td></tr>
<tr class="memdesc:a8e04e43dacbe3128afd71e1d6c1b0911"><td class="mdescLeft">&#160;</td><td class="mdescRight">Archive or unarchive a chat. <a href="#a8e04e43dacbe3128afd71e1d6c1b0911">More...</a><br /></td></tr>
<tr class="separator:a8e04e43dacbe3128afd71e1d6c1b0911"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a24813f8aea38bcf5f928ea8a5fd7a3ec"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmailbox__t.html#a24813f8aea38bcf5f928ea8a5fd7a3ec">mrmailbox_delete_chat</a> (<a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *mailbox, uint32_t chat_id)</td></tr>
<tr class="memdesc:a24813f8aea38bcf5f928ea8a5fd7a3ec"><td class="mdescLeft">&#160;</td><td class="mdescRight">Delete a chat. <a href="#a24813f8aea38bcf5f928ea8a5fd7a3ec">More...</a><br /></td></tr>
<tr class="separator:a24813f8aea38bcf5f928ea8a5fd7a3ec"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3f9ac5fb9ff2dcbaafdddb5d955ac39b"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmailbox__t.html#a3f9ac5fb9ff2dcbaafdddb5d955ac39b">mrmailbox_send_text_msg</a> (<a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *mailbox, uint32_t chat_id, const char *text_to_send)</td></tr>
<tr class="memdesc:a3f9ac5fb9ff2dcbaafdddb5d955ac39b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Send a simple text message a given chat. <a href="#a3f9ac5fb9ff2dcbaafdddb5d955ac39b">More...</a><br /></td></tr>
<tr class="separator:a3f9ac5fb9ff2dcbaafdddb5d955ac39b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2fdedd72b9f792463e4af173f21bb11c"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmailbox__t.html#a2fdedd72b9f792463e4af173f21bb11c">mrmailbox_send_image_msg</a> (<a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *mailbox, uint32_t chat_id, const char *file, const char *filemime, int width, int height)</td></tr>
<tr class="memdesc:a2fdedd72b9f792463e4af173f21bb11c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Send an image to a chat. <a href="#a2fdedd72b9f792463e4af173f21bb11c">More...</a><br /></td></tr>
<tr class="separator:a2fdedd72b9f792463e4af173f21bb11c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8c0dc35fd9696d35f6a8301501f37c5a"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmailbox__t.html#a8c0dc35fd9696d35f6a8301501f37c5a">mrmailbox_send_video_msg</a> (<a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *mailbox, uint32_t chat_id, const char *file, const char *filemime, int width, int height, int duration)</td></tr>
<tr class="memdesc:a8c0dc35fd9696d35f6a8301501f37c5a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Send an video to a chat. <a href="#a8c0dc35fd9696d35f6a8301501f37c5a">More...</a><br /></td></tr>
<tr class="separator:a8c0dc35fd9696d35f6a8301501f37c5a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a42935531261ba3ed8afd82cf39fe928a"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmailbox__t.html#a42935531261ba3ed8afd82cf39fe928a">mrmailbox_send_voice_msg</a> (<a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *mailbox, uint32_t chat_id, const char *file, const char *filemime, int duration)</td></tr>
<tr class="memdesc:a42935531261ba3ed8afd82cf39fe928a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Send a voice message to a chat. <a href="#a42935531261ba3ed8afd82cf39fe928a">More...</a><br /></td></tr>
<tr class="separator:a42935531261ba3ed8afd82cf39fe928a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae24df813f179fdab160f94c583c63401"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmailbox__t.html#ae24df813f179fdab160f94c583c63401">mrmailbox_send_audio_msg</a> (<a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *mailbox, uint32_t chat_id, const char *file, const char *filemime, int duration, const char *author, const char *trackname)</td></tr>
<tr class="memdesc:ae24df813f179fdab160f94c583c63401"><td class="mdescLeft">&#160;</td><td class="mdescRight">Send an audio file to a chat. <a href="#ae24df813f179fdab160f94c583c63401">More...</a><br /></td></tr>
<tr class="separator:ae24df813f179fdab160f94c583c63401"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7f39fa026b22360e282c9138e5af4ce9"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmailbox__t.html#a7f39fa026b22360e282c9138e5af4ce9">mrmailbox_send_file_msg</a> (<a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *mailbox, uint32_t chat_id, const char *file, const char *filemime)</td></tr>
<tr class="memdesc:a7f39fa026b22360e282c9138e5af4ce9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Send a document to a chat. <a href="#a7f39fa026b22360e282c9138e5af4ce9">More...</a><br /></td></tr>
<tr class="separator:a7f39fa026b22360e282c9138e5af4ce9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a88e7fe7faa3576c086b6d3e0ab825892"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmailbox__t.html#a88e7fe7faa3576c086b6d3e0ab825892">mrmailbox_send_vcard_msg</a> (<a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *mailbox, uint32_t chat_id, uint32_t contact_id)</td></tr>
<tr class="memdesc:a88e7fe7faa3576c086b6d3e0ab825892"><td class="mdescLeft">&#160;</td><td class="mdescRight">Send foreign contact data to a chat. <a href="#a88e7fe7faa3576c086b6d3e0ab825892">More...</a><br /></td></tr>
<tr class="separator:a88e7fe7faa3576c086b6d3e0ab825892"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a47156db87107ec208d6637f460d897a8"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmailbox__t.html#a47156db87107ec208d6637f460d897a8">mrmailbox_create_group_chat</a> (<a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *mailbox, const char *chat_name)</td></tr>
<tr class="memdesc:a47156db87107ec208d6637f460d897a8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a new group chat. <a href="#a47156db87107ec208d6637f460d897a8">More...</a><br /></td></tr>
<tr class="separator:a47156db87107ec208d6637f460d897a8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8772e9bb55b02299f65ebd8bcc682bb1"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmailbox__t.html#a8772e9bb55b02299f65ebd8bcc682bb1">mrmailbox_set_chat_name</a> (<a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *mailbox, uint32_t chat_id, const char *new_name)</td></tr>
<tr class="memdesc:a8772e9bb55b02299f65ebd8bcc682bb1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set group name. <a href="#a8772e9bb55b02299f65ebd8bcc682bb1">More...</a><br /></td></tr>
<tr class="separator:a8772e9bb55b02299f65ebd8bcc682bb1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a08c527170681c949ddd6931a004fdd5f"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmailbox__t.html#a08c527170681c949ddd6931a004fdd5f">mrmailbox_set_chat_profile_image</a> (<a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *mailbox, uint32_t chat_id, const char *new_image)</td></tr>
<tr class="memdesc:a08c527170681c949ddd6931a004fdd5f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set group profile image. <a href="#a08c527170681c949ddd6931a004fdd5f">More...</a><br /></td></tr>
<tr class="separator:a08c527170681c949ddd6931a004fdd5f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae37988665a3d46f42a7e8199d18735c2"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmailbox__t.html#ae37988665a3d46f42a7e8199d18735c2">mrmailbox_is_contact_in_chat</a> (<a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *mailbox, uint32_t chat_id, uint32_t contact_id)</td></tr>
<tr class="memdesc:ae37988665a3d46f42a7e8199d18735c2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check if a given contact ID is a member of a group chat. <a href="#ae37988665a3d46f42a7e8199d18735c2">More...</a><br /></td></tr>
<tr class="separator:ae37988665a3d46f42a7e8199d18735c2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a96368620971935c7ac4a0bb324ece2c9"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmailbox__t.html#a96368620971935c7ac4a0bb324ece2c9">mrmailbox_add_contact_to_chat</a> (<a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *mailbox, uint32_t chat_id, uint32_t contact_id)</td></tr>
<tr class="memdesc:a96368620971935c7ac4a0bb324ece2c9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add a member to a group. <a href="#a96368620971935c7ac4a0bb324ece2c9">More...</a><br /></td></tr>
<tr class="separator:a96368620971935c7ac4a0bb324ece2c9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a40226d401548b002a62648ea054ac635"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmailbox__t.html#a40226d401548b002a62648ea054ac635">mrmailbox_remove_contact_from_chat</a> (<a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *mailbox, uint32_t chat_id, uint32_t contact_id)</td></tr>
<tr class="memdesc:a40226d401548b002a62648ea054ac635"><td class="mdescLeft">&#160;</td><td class="mdescRight">Remove a member from a group. <a href="#a40226d401548b002a62648ea054ac635">More...</a><br /></td></tr>
<tr class="separator:a40226d401548b002a62648ea054ac635"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa089e97e7ca1add16c10d5cc0e902824"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmailbox__t.html#aa089e97e7ca1add16c10d5cc0e902824">mrmailbox_create_contact</a> (<a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *mailbox, const char *name, const char *addr)</td></tr>
<tr class="memdesc:aa089e97e7ca1add16c10d5cc0e902824"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add a single contact. <a href="#aa089e97e7ca1add16c10d5cc0e902824">More...</a><br /></td></tr>
<tr class="separator:aa089e97e7ca1add16c10d5cc0e902824"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a25720ea41355cc32cc93aa45709937d6"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmailbox__t.html#a25720ea41355cc32cc93aa45709937d6">mrmailbox_add_address_book</a> (<a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *mailbox, const char *adr_book)</td></tr>
<tr class="memdesc:a25720ea41355cc32cc93aa45709937d6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add a number of contacts. <a href="#a25720ea41355cc32cc93aa45709937d6">More...</a><br /></td></tr>
<tr class="separator:a25720ea41355cc32cc93aa45709937d6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae4ccc69ba8e8851a04f9b17b37e5f86a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structmrarray__t.html">mrarray_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmailbox__t.html#ae4ccc69ba8e8851a04f9b17b37e5f86a">mrmailbox_get_known_contacts</a> (<a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *mailbox, const char *query)</td></tr>
<tr class="memdesc:ae4ccc69ba8e8851a04f9b17b37e5f86a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns known and unblocked contacts. <a href="#ae4ccc69ba8e8851a04f9b17b37e5f86a">More...</a><br /></td></tr>
<tr class="separator:ae4ccc69ba8e8851a04f9b17b37e5f86a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a209e3832cd680d4677582923695ae872"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structmrarray__t.html">mrarray_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmailbox__t.html#a209e3832cd680d4677582923695ae872">mrmailbox_get_blocked_contacts</a> (<a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *mailbox)</td></tr>
<tr class="memdesc:a209e3832cd680d4677582923695ae872"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get blocked contacts. <a href="#a209e3832cd680d4677582923695ae872">More...</a><br /></td></tr>
<tr class="separator:a209e3832cd680d4677582923695ae872"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6c749ad5736d9c34ff492015ea10a184"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmailbox__t.html#a6c749ad5736d9c34ff492015ea10a184">mrmailbox_get_blocked_count</a> (<a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *mailbox)</td></tr>
<tr class="memdesc:a6c749ad5736d9c34ff492015ea10a184"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the number of blocked contacts. <a href="#a6c749ad5736d9c34ff492015ea10a184">More...</a><br /></td></tr>
<tr class="separator:a6c749ad5736d9c34ff492015ea10a184"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a057660d94350ff98eca72785c6e88962"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structmrcontact__t.html">mrcontact_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmailbox__t.html#a057660d94350ff98eca72785c6e88962">mrmailbox_get_contact</a> (<a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *mailbox, uint32_t contact_id)</td></tr>
<tr class="memdesc:a057660d94350ff98eca72785c6e88962"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a single contact object. <a href="#a057660d94350ff98eca72785c6e88962">More...</a><br /></td></tr>
<tr class="separator:a057660d94350ff98eca72785c6e88962"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7150c575193d43e048689aa264c74c79"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmailbox__t.html#a7150c575193d43e048689aa264c74c79">mrmailbox_marknoticed_contact</a> (<a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *mailbox, uint32_t contact_id)</td></tr>
<tr class="memdesc:a7150c575193d43e048689aa264c74c79"><td class="mdescLeft">&#160;</td><td class="mdescRight">Mark all messages send by the given contact as <em>noticed</em>. <a href="#a7150c575193d43e048689aa264c74c79">More...</a><br /></td></tr>
<tr class="separator:a7150c575193d43e048689aa264c74c79"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abb069358386b767a60444651195e0895"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmailbox__t.html#abb069358386b767a60444651195e0895">mrmailbox_block_contact</a> (<a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *mailbox, uint32_t contact_id, int new_blocking)</td></tr>
<tr class="memdesc:abb069358386b767a60444651195e0895"><td class="mdescLeft">&#160;</td><td class="mdescRight">Block or unblock a contact. <a href="#abb069358386b767a60444651195e0895">More...</a><br /></td></tr>
<tr class="separator:abb069358386b767a60444651195e0895"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa4d582bc9d6d80e43038d213b081031f"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmailbox__t.html#aa4d582bc9d6d80e43038d213b081031f">mrmailbox_get_contact_encrinfo</a> (<a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *mailbox, uint32_t contact_id)</td></tr>
<tr class="memdesc:aa4d582bc9d6d80e43038d213b081031f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get encryption info for a contact. <a href="#aa4d582bc9d6d80e43038d213b081031f">More...</a><br /></td></tr>
<tr class="separator:aa4d582bc9d6d80e43038d213b081031f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a209732d105e40cd0c61d33d76d288c59"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmailbox__t.html#a209732d105e40cd0c61d33d76d288c59">mrmailbox_delete_contact</a> (<a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *mailbox, uint32_t contact_id)</td></tr>
<tr class="memdesc:a209732d105e40cd0c61d33d76d288c59"><td class="mdescLeft">&#160;</td><td class="mdescRight">Delete a contact. <a href="#a209732d105e40cd0c61d33d76d288c59">More...</a><br /></td></tr>
<tr class="separator:a209732d105e40cd0c61d33d76d288c59"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9ef144244e7d86ba82ce3257abf14f13"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structmrmsg__t.html">mrmsg_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmailbox__t.html#a9ef144244e7d86ba82ce3257abf14f13">mrmailbox_get_msg</a> (<a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *mailbox, uint32_t msg_id)</td></tr>
<tr class="memdesc:a9ef144244e7d86ba82ce3257abf14f13"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a single message object of the type <a class="el" href="structmrmsg__t.html" title="An object representing a single message in memory. ">mrmsg_t</a>. <a href="#a9ef144244e7d86ba82ce3257abf14f13">More...</a><br /></td></tr>
<tr class="separator:a9ef144244e7d86ba82ce3257abf14f13"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a13e05fe3f43102c3323ba4c7e2761593"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmailbox__t.html#a13e05fe3f43102c3323ba4c7e2761593">mrmailbox_get_msg_info</a> (<a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *mailbox, uint32_t msg_id)</td></tr>
<tr class="memdesc:a13e05fe3f43102c3323ba4c7e2761593"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get an informational text for a single message. <a href="#a13e05fe3f43102c3323ba4c7e2761593">More...</a><br /></td></tr>
<tr class="separator:a13e05fe3f43102c3323ba4c7e2761593"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab316ed8a30c968085fa503e6c215e2f1"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmailbox__t.html#ab316ed8a30c968085fa503e6c215e2f1">mrmailbox_forward_msgs</a> (<a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *mailbox, const uint32_t *msg_ids, int msg_cnt, uint32_t chat_id)</td></tr>
<tr class="memdesc:ab316ed8a30c968085fa503e6c215e2f1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Forward messages to another chat. <a href="#ab316ed8a30c968085fa503e6c215e2f1">More...</a><br /></td></tr>
<tr class="separator:ab316ed8a30c968085fa503e6c215e2f1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8ed1c3bd08cd6515abf6046ebad9cafc"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmailbox__t.html#a8ed1c3bd08cd6515abf6046ebad9cafc">mrmailbox_star_msgs</a> (<a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *mailbox, const uint32_t *msg_ids, int msg_cnt, int star)</td></tr>
<tr class="memdesc:a8ed1c3bd08cd6515abf6046ebad9cafc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Star/unstar messages by setting the last parameter to 0 (unstar) or 1(star). <a href="#a8ed1c3bd08cd6515abf6046ebad9cafc">More...</a><br /></td></tr>
<tr class="separator:a8ed1c3bd08cd6515abf6046ebad9cafc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adf02bfc046577b46e1f0f5a31869890f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmailbox__t.html#adf02bfc046577b46e1f0f5a31869890f">mrmailbox_delete_msgs</a> (<a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *mailbox, const uint32_t *msg_ids, int msg_cnt)</td></tr>
<tr class="memdesc:adf02bfc046577b46e1f0f5a31869890f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Delete messages. <a href="#adf02bfc046577b46e1f0f5a31869890f">More...</a><br /></td></tr>
<tr class="separator:adf02bfc046577b46e1f0f5a31869890f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a67281e50b568dc18df710275e0e13f5b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmailbox__t.html#a67281e50b568dc18df710275e0e13f5b">mrmailbox_markseen_msgs</a> (<a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *mailbox, const uint32_t *msg_ids, int msg_cnt)</td></tr>
<tr class="memdesc:a67281e50b568dc18df710275e0e13f5b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Mark a message as <em>seen</em>, updates the IMAP state and sends MDNs. <a href="#a67281e50b568dc18df710275e0e13f5b">More...</a><br /></td></tr>
<tr class="separator:a67281e50b568dc18df710275e0e13f5b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a42ca741cc08785585f1dc74d515be5ef"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmailbox__t.html#a42ca741cc08785585f1dc74d515be5ef">mrmailbox_configure_and_connect</a> (<a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *mailbox)</td></tr>
<tr class="memdesc:a42ca741cc08785585f1dc74d515be5ef"><td class="mdescLeft">&#160;</td><td class="mdescRight">Configure and connect a mailbox. <a href="#a42ca741cc08785585f1dc74d515be5ef">More...</a><br /></td></tr>
<tr class="separator:a42ca741cc08785585f1dc74d515be5ef"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8127c0e3f4cfda14fdfd7be9f43715ef"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmailbox__t.html#a8127c0e3f4cfda14fdfd7be9f43715ef">mrmailbox_configure_cancel</a> (<a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *mailbox)</td></tr>
<tr class="memdesc:a8127c0e3f4cfda14fdfd7be9f43715ef"><td class="mdescLeft">&#160;</td><td class="mdescRight">Signal the configure-process to stop. <a href="#a8127c0e3f4cfda14fdfd7be9f43715ef">More...</a><br /></td></tr>
<tr class="separator:a8127c0e3f4cfda14fdfd7be9f43715ef"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa6e325e49ecccfc96276db6c327dba94"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmailbox__t.html#aa6e325e49ecccfc96276db6c327dba94">mrmailbox_is_configured</a> (<a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *mailbox)</td></tr>
<tr class="memdesc:aa6e325e49ecccfc96276db6c327dba94"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check if the mailbox is already configured. <a href="#aa6e325e49ecccfc96276db6c327dba94">More...</a><br /></td></tr>
<tr class="separator:aa6e325e49ecccfc96276db6c327dba94"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abcb59b494a430c2d3d6e77cf433f5755"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmailbox__t.html#abcb59b494a430c2d3d6e77cf433f5755">mrmailbox_imex_has_backup</a> (<a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *mailbox, const char *dir_name)</td></tr>
<tr class="memdesc:abcb59b494a430c2d3d6e77cf433f5755"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check if there is a backup file. <a href="#abcb59b494a430c2d3d6e77cf433f5755">More...</a><br /></td></tr>
<tr class="separator:abcb59b494a430c2d3d6e77cf433f5755"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5de7b87b8c95733619cc4051b3508973"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmailbox__t.html#a5de7b87b8c95733619cc4051b3508973">mrmailbox_imex</a> (<a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *mailbox, int what, const char *param1, const char *setup_code)</td></tr>
<tr class="memdesc:a5de7b87b8c95733619cc4051b3508973"><td class="mdescLeft">&#160;</td><td class="mdescRight">Import/export things. <a href="#a5de7b87b8c95733619cc4051b3508973">More...</a><br /></td></tr>
<tr class="separator:a5de7b87b8c95733619cc4051b3508973"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3b55fcb1a91c616f032e160914406ed2"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmailbox__t.html#a3b55fcb1a91c616f032e160914406ed2">mrmailbox_check_password</a> (<a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *mailbox, const char *test_pw)</td></tr>
<tr class="memdesc:a3b55fcb1a91c616f032e160914406ed2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check if the user is authorized by the given password in some way. <a href="#a3b55fcb1a91c616f032e160914406ed2">More...</a><br /></td></tr>
<tr class="separator:a3b55fcb1a91c616f032e160914406ed2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af4d9c838230758e1b0e40957447232f7"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmailbox__t.html#af4d9c838230758e1b0e40957447232f7">mrmailbox_create_setup_code</a> (<a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *mailbox)</td></tr>
<tr class="memdesc:af4d9c838230758e1b0e40957447232f7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create random setup code. <a href="#af4d9c838230758e1b0e40957447232f7">More...</a><br /></td></tr>
<tr class="separator:af4d9c838230758e1b0e40957447232f7"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:a6c557153209e128b69301246dbf9e230"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmailbox__t.html#a6c557153209e128b69301246dbf9e230">m_userdata</a></td></tr>
<tr class="memdesc:a6c557153209e128b69301246dbf9e230"><td class="mdescLeft">&#160;</td><td class="mdescRight">Use data, may be used for any purpose. <a href="#a6c557153209e128b69301246dbf9e230">More...</a><br /></td></tr>
<tr class="separator:a6c557153209e128b69301246dbf9e230"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>An object representing a single mailbox. </p>
<p>Each mailbox is linked to an IMAP/POP3 account and uses a separate SQLite database for offline functionality and for mailbox-related settings. </p>
</div><h2 class="groupheader">Member Typedef Documentation</h2>
<a class="anchor" id="a957f0bbae60f389bac40acf42b68b134"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef uintptr_t(* mrmailboxcb_t) (<a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *, int event, uintptr_t data1, uintptr_t data2)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Callback function that should be given to <a class="el" href="structmrmailbox__t.html#a32825e3e0a1b16679580704a4b43db1a" title="Create a new mailbox object. ">mrmailbox_new()</a>. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">mailbox</td><td>the mailbox object as returned by <a class="el" href="structmrmailbox__t.html#a32825e3e0a1b16679580704a4b43db1a" title="Create a new mailbox object. ">mrmailbox_new()</a>.</td></tr>
<tr><td class="paramname">event</td><td>one of the MR_EVENT_* constants as defined in <a class="el" href="mrevent_8h.html" title="The following constants are used as events reported to the callback given to mrmailbox_new(). ">mrevent.h</a></td></tr>
<tr><td class="paramname">data1</td><td>depends on the event parameter</td></tr>
<tr><td class="paramname">data2</td><td>depends on the event parameter</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>return 0 unless stated otherwise in the event parameter documentation </dd></dl>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a32825e3e0a1b16679580704a4b43db1a"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> * mrmailbox_new </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structmrmailbox__t.html#a957f0bbae60f389bac40acf42b68b134">mrmailboxcb_t</a>&#160;</td>
<td class="paramname"><em>cb</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void *&#160;</td>
<td class="paramname"><em>userdata</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>os_name</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Create a new mailbox object. </p>
<p>After creation it is usually opened, connected and mails are fetched. After usage, the object should be deleted using <a class="el" href="structmrmailbox__t.html#a825cec4a85da05335674eae221d51374" title="Free a mailbox object. ">mrmailbox_unref()</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">cb</td><td>a callback function that is called for events (update, state changes etc.) and to get some information form the client (eg. translation for a given string). See <a class="el" href="mrevent_8h.html" title="The following constants are used as events reported to the callback given to mrmailbox_new(). ">mrevent.h</a> for a list of possible events that may be passed to the callback.<ul>
<li>The callback MAY be called from <em>any</em> thread, not only the main/GUI thread!</li>
<li>The callback MUST NOT call any mrmailbox_* and related functions unless stated otherwise!</li>
<li>The callback SHOULD return <em>fast</em>, for GUI updates etc. you should post yourself an asynchronous message to your GUI thread, if needed.</li>
<li>If not mentioned otherweise, the callback should return 0.</li>
</ul>
</td></tr>
<tr><td class="paramname">userdata</td><td>can be used by the client for any purpuse. He finds it later in mrmailbox__t::m_userdata().</td></tr>
<tr><td class="paramname">os_name</td><td>is only for decorative use and is shown eg. in the X-Mailer header in the form "Delta Chat &lt;version&gt; for &lt;osName&gt;"</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a mailbox object with some public members the object must be passed to the other mailbox functions and the object must be freed using <a class="el" href="structmrmailbox__t.html#a825cec4a85da05335674eae221d51374" title="Free a mailbox object. ">mrmailbox_unref()</a> after usage. </dd></dl>
</div>
</div>
<a class="anchor" id="a825cec4a85da05335674eae221d51374"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void mrmailbox_unref </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *&#160;</td>
<td class="paramname"><em>mailbox</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Free a mailbox object. </p>
<p>If app runs can only be terminated by a forced kill, this may be superfluous.</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>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>none </dd></dl>
</div>
</div>
<a class="anchor" id="ae4c9c9f9ce4b3de82b3ce7fc582cbc5b"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int mrmailbox_open </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *&#160;</td>
<td class="paramname"><em>mailbox</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>dbfile</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>blobdir</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Open mailbox database. </p>
<p>If the given file does not exist, it is created and can be set up using <a class="el" href="structmrmailbox__t.html#a19b3e9f5209bc326fc77f3944522e8ad" title="Configure the mailbox. ">mrmailbox_set_config()</a> afterwards.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">mailbox</td><td>the mailbox object as created by mrmailbox_new</td></tr>
<tr><td class="paramname">dbfile</td><td>the file to use to store the database, sth. like "~/file" won't work on all systems, if in doubt, use absolute paths. You can find the file path later in mrmailbox_t::m_dbfile</td></tr>
<tr><td class="paramname">blobdir</td><td>a directory to store the blobs in, the trailing slash is added by us, so if you want to avoid double slashes, do not add one. If you give NULL as blobdir, <code>dbfile-blobs</code> is used in the same directory as <em>dbfile</em> will be created in. You can find the path to the blob direcrory later in mrmailbox_t::m_blobdir</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>1 on success, 0 on failure </dd></dl>
</div>
</div>
<a class="anchor" id="a75011d103515e088e950a64d0706ec86"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void mrmailbox_close </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *&#160;</td>
<td class="paramname"><em>mailbox</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Close mailbox database. </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>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>none </dd></dl>
</div>
</div>
<a class="anchor" id="aace7cd8b68f45b869956d5c7476a1da0"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int mrmailbox_is_open </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *&#160;</td>
<td class="paramname"><em>mailbox</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Check if the mailbox database is open. </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>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0=mailbox is not open, 1=mailbox is open. </dd></dl>
</div>
</div>
<a class="anchor" id="a19b3e9f5209bc326fc77f3944522e8ad"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int mrmailbox_set_config </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *&#160;</td>
<td class="paramname"><em>ths</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>key</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>value</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Configure the mailbox. </p>
<p>The configuration is handled by key=value pairs. Typical configuration options are:</p>
<ul>
<li>addr = address to display (needed)</li>
<li>mail_server = IMAP-server, guessed if left out</li>
<li>mail_user = IMAP-username, guessed if left out</li>
<li>mail_pw = IMAP-password (needed)</li>
<li>mail_port = IMAP-port, guessed if left out</li>
<li>send_server = SMTP-server, guessed if left out</li>
<li>send_user = SMTP-user, guessed if left out</li>
<li>send_pw = SMTP-password, guessed if left out</li>
<li>send_port = SMTP-port, guessed if left out</li>
<li>server_flags = IMAP-/SMTP-flags, guessed if left out</li>
<li>displayname = Own name to use when sending messages. MUAs are allowed to spread this way eg. using CC, defaults to empty</li>
<li>selfstatus = Own status to display eg. in email footers, defaults to a standard text</li>
<li>e2ee_enabled = 0=no e2ee, 1=prefer encryption (default)</li>
</ul>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">ths</td><td>the mailbox object</td></tr>
<tr><td class="paramname">key</td><td>the option to change, typically one of the strings listed above</td></tr>
<tr><td class="paramname">value</td><td>the value to save for "key"</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0=failure, 1=success </dd></dl>
</div>
</div>
<a class="anchor" id="aeb12e9631508fd76e3e9828a82031767"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">char * mrmailbox_get_config </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *&#160;</td>
<td class="paramname"><em>ths</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>key</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>def</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Get a configuration option. </p>
<p>The configuration option is typically set by <a class="el" href="structmrmailbox__t.html#a19b3e9f5209bc326fc77f3944522e8ad" title="Configure the mailbox. ">mrmailbox_set_config()</a> or by the library itself.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">ths</td><td>the mailbox object as created by mrmmailbox_new()</td></tr>
<tr><td class="paramname">key</td><td>the key to query</td></tr>
<tr><td class="paramname">def</td><td>default value to return if "key" is unset</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Returns current value of "key", if "key" is unset, "def" is returned (which may be NULL) If the returned values is not NULL, the return value must be free()'d, </dd></dl>
</div>
</div>
<a class="anchor" id="a889aea3b38561016ffa2343d5106c38d"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int mrmailbox_set_config_int </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *&#160;</td>
<td class="paramname"><em>ths</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>key</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int32_t&#160;</td>
<td class="paramname"><em>value</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Configure the mailbox. </p>
<p>Similar to <a class="el" href="structmrmailbox__t.html#a19b3e9f5209bc326fc77f3944522e8ad" title="Configure the mailbox. ">mrmailbox_set_config()</a> but sets an integer instead of a string. If there is already a key with a string set, this is overwritten by the given integer value. </p>
</div>
</div>
<a class="anchor" id="afba149fcbcb5a069113aed4336f4bcc7"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int32_t mrmailbox_get_config_int </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *&#160;</td>
<td class="paramname"><em>ths</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>key</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int32_t&#160;</td>
<td class="paramname"><em>def</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Get a configuration option. </p>
<p>Similar as <a class="el" href="structmrmailbox__t.html#aeb12e9631508fd76e3e9828a82031767" title="Get a configuration option. ">mrmailbox_get_config()</a> but gets the value as an integer instead of a string. </p>
</div>
</div>
<a class="anchor" id="a4b3257b21c3c9ff539fc6a9315be1164"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">char * mrmailbox_get_info </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *&#160;</td>
<td class="paramname"><em>mailbox</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Get information about the mailbox. </p>
<p>The information is returned by a multi-line string and contains information about the current configuration and the last log entries.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">mailbox</td><td>Mailbox object as returned 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>String which must be free()'d after usage. Never returns NULL. </dd></dl>
</div>
</div>
<a class="anchor" id="a74bd83d36d90e1201e5ab8003d9a312f"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">char * mrmailbox_get_version_str </td>
<td>(</td>
<td class="paramtype">void&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Find out the version of the Delta Chat core library. </p>
<dl class="section return"><dt>Returns</dt><dd>String with version number as <code>major.minor.revision</code>. The return value must be free()'d. </dd></dl>
</div>
</div>
<a class="anchor" id="a67eef5ffc3369b8ad09326471b0a266f"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void mrmailbox_connect </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *&#160;</td>
<td class="paramname"><em>mailbox</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Connect to the mailbox using the configured settings. </p>
<p>We connect using IMAP-IDLE or, if this is not possible, a using pull algorithm.</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>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None </dd></dl>
</div>
</div>
<a class="anchor" id="a7c7921ff7b7f2e10dc30522af980b785"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void mrmailbox_disconnect </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *&#160;</td>
<td class="paramname"><em>mailbox</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Disonnect the mailbox from the server. </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>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None </dd></dl>
</div>
</div>
<a class="anchor" id="a6faa8ec4056da5d1d664d88d3f6cf176"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void mrmailbox_heartbeat </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *&#160;</td>
<td class="paramname"><em>ths</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Stay alive. </p>
<p>The library tries itself to stay alive. For this purpose there is an additional "heartbeat" thread that checks if the IDLE-thread is up and working. This check is done about every minute. However, depending on the operating system, this thread may be delayed or stopped, if this is the case you can force additional checks manually by just calling <a class="el" href="structmrmailbox__t.html#a6faa8ec4056da5d1d664d88d3f6cf176" title="Stay alive. ">mrmailbox_heartbeat()</a> about every minute. If in doubt, call this function too often, not too less :-) </p>
</div>
</div>
<a class="anchor" id="a4da10c87eb65bbf6c504979d75ec3b19"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="structmrchatlist__t.html">mrchatlist_t</a> * mrmailbox_get_chatlist </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *&#160;</td>
<td class="paramname"><em>mailbox</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>listflags</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>query</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Get a list of chats. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">mailbox</td><td>The mailbox object as returned by <a class="el" href="structmrmailbox__t.html#a32825e3e0a1b16679580704a4b43db1a" title="Create a new mailbox object. ">mrmailbox_new()</a></td></tr>
<tr><td class="paramname">listflags</td><td>A combination of flags:<ul>
<li>if the flag MR_GCL_ARCHIVED_ONLY is set, only archived chats are returned. if MR_GCL_ARCHIVED_ONLY is not set, only unarchived chats are returned and the pseudo-chat MR_CHAT_ID_ARCHIVED_LINK is added if there are <em>any</em> archived chats</li>
<li>if the flag MR_GCL_NO_SPECIALS is set, deaddrop and archive link are not added to the list (may be used eg. for selecting chats on forwarding, the flag is F not needed when MR_GCL_ARCHIVED_ONLY is already set)</li>
</ul>
</td></tr>
<tr><td class="paramname">query</td><td>An optional query for filtering the list. Only chats matching this query are returned. Give NULL for no filtering.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A chatlist as an <a class="el" href="structmrchatlist__t.html" title="An object representing a single chatlist in memory. ">mrchatlist_t</a> object. Must be freed using <a class="el" href="structmrchatlist__t.html#ab036d6e066b5ff78779f36711c9ab2f9" title="Free a chatlist object. ">mrchatlist_unref()</a> when no longer used </dd></dl>
</div>
</div>
<a class="anchor" id="ad106b9c23b3a559b524a37bb5504e096"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="structmrchat__t.html">mrchat_t</a> * mrmailbox_get_chat </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *&#160;</td>
<td class="paramname"><em>mailbox</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>chat_id</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<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>
<tr><td class="paramname">chat_id</td><td>The ID of the chat to get the chat object for.</td></tr>
</table>
</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>
<a class="anchor" id="a07cc8fe0cfd900a9449bffc4ca5a7a95"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void mrmailbox_marknoticed_chat </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *&#160;</td>
<td class="paramname"><em>mailbox</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>chat_id</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Mark all message in a chat as <em>noticed</em>. </p>
<p><em>Noticed</em> messages are no longer <em>fresh</em> and do not count as being unseen. IMAP/MDNs is not done for noticed messages. See also <a class="el" href="structmrmailbox__t.html#a7150c575193d43e048689aa264c74c79" title="Mark all messages send by the given contact as noticed. ">mrmailbox_marknoticed_contact()</a> and <a class="el" href="structmrmailbox__t.html#a67281e50b568dc18df710275e0e13f5b" title="Mark a message as seen, updates the IMAP state and sends MDNs. ">mrmailbox_markseen_msgs()</a></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>
<tr><td class="paramname">chat_id</td><td>The chat ID of which all messages should be marked as being noticed.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None. </dd></dl>
</div>
</div>
<a class="anchor" id="a97eb029d9dd0d33ae492217608958a73"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint32_t mrmailbox_get_chat_id_by_contact_id </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *&#160;</td>
<td class="paramname"><em>mailbox</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>contact_id</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Check, if there is a normal chat with a given contact. </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>
<tr><td class="paramname">contact_id</td><td>The contact ID to check.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>If there is a normal chat with the given contact_id, this chat_id is returned. If there is no normal chat with the contact_id, the function returns 0. </dd></dl>
</div>
</div>
<a class="anchor" id="a1386ec2c091b936b65b25b50a302173d"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint32_t mrmailbox_create_chat_by_contact_id </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *&#160;</td>
<td class="paramname"><em>mailbox</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>contact_id</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Create a normal chat with a single user. </p>
<p>To create group chats, see <a class="el" href="structmrmailbox__t.html#a47156db87107ec208d6637f460d897a8" title="Create a new group chat. ">mrmailbox_create_group_chat()</a></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>
<tr><td class="paramname">contact_id</td><td>The contact ID to create the chat for. If there is already a chat with this contact, the already existing ID is returned.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The created or reused chat ID on success. 0 on errors. </dd></dl>
</div>
</div>
<a class="anchor" id="a4c69c290d57aa2b76f0260c0c2702023"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="structmrarray__t.html">mrarray_t</a> * mrmailbox_get_chat_media </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *&#160;</td>
<td class="paramname"><em>mailbox</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>chat_id</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>msg_type</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>or_msg_type</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns all message IDs of the given types in a chat. </p>
<p>Typically used to show a gallery. The result must be <a class="el" href="structmrarray__t.html#a1400b5e42c682326e809723f02739a8e" title="Free an array object. ">mrarray_unref()</a>'d</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>
<tr><td class="paramname">chat_id</td><td>The chat ID to get all messages with media from.</td></tr>
<tr><td class="paramname">msg_type</td><td>Specify a message type to query here, one of the MR_MSG_* constats.</td></tr>
<tr><td class="paramname">or_msg_type</td><td>Another message type to return, one of the MR_MSG_* constats. The function will return both types then. 0 if you need only one.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>An array with messages from the given chat ID that have the wanted message types. </dd></dl>
</div>
</div>
<a class="anchor" id="a90b7861302d1276a07fdcb2d9c3c73b6"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint32_t mrmailbox_get_next_media </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *&#160;</td>
<td class="paramname"><em>mailbox</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>curr_msg_id</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>dir</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Get next/previous message of the same type. </p>
<p>Typically used to implement the "next" and "previous" buttons on a media player playing eg. voice messages.</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>
<tr><td class="paramname">curr_msg_id</td><td>This is the current (image) message displayed.</td></tr>
<tr><td class="paramname">dir</td><td>1=get the next (image) message, -1=get the previous one.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Returns the message ID that should be played next. The returned message is in the same chat as the given one and has the same type. Typically, this result is passed again to <a class="el" href="structmrmailbox__t.html#a90b7861302d1276a07fdcb2d9c3c73b6" title="Get next/previous message of the same type. ">mrmailbox_get_next_media()</a> later on the next swipe. If there is not next/previous message, the function returns 0. </dd></dl>
</div>
</div>
<a class="anchor" id="ab996f74d0e8b5c82ec7175f29da57e3d"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="structmrarray__t.html">mrarray_t</a> * mrmailbox_get_chat_contacts </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *&#160;</td>
<td class="paramname"><em>mailbox</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>chat_id</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Get contact IDs belonging to a chat. </p>
<ul>
<li>for normal chats, the function always returns exactly one contact, MR_CONTACT_ID_SELF is <em>not</em> returned.</li>
<li>for group chats all members are returned, MR_CONTACT_ID_SELF is returned explicitly as it may happen that oneself gets removed from a still existing group</li>
<li>for the deaddrop, all contacts are returned, MR_CONTACT_ID_SELF is not added</li>
</ul>
<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>
<tr><td class="paramname">chat_id</td><td>Chat ID to get the belonging contact IDs for.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>an array of contact IDs belonging to the chat; must be freed using <a class="el" href="structmrarray__t.html#a1400b5e42c682326e809723f02739a8e" title="Free an array object. ">mrarray_unref()</a> when done. </dd></dl>
</div>
</div>
<a class="anchor" id="a65215149290bec16b173106269b08e5e"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="structmrarray__t.html">mrarray_t</a> * mrmailbox_get_fresh_msgs </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *&#160;</td>
<td class="paramname"><em>mailbox</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the message IDs of all <em>fresh</em> messages of any chat. </p>
<p>Typically used for implementing notification summaries. The result must be free()'d.</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>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="af5ac7f527aef58f8e834f3bd740acd46"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="structmrarray__t.html">mrarray_t</a> * mrmailbox_get_chat_msgs </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *&#160;</td>
<td class="paramname"><em>mailbox</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>chat_id</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>flags</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>marker1before</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Get all message IDs belonging to a chat. </p>
<p>Optionally, some special markers added to the ID-array may help to implement virtual lists.</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>
<tr><td class="paramname">chat_id</td><td>The chat ID of which the messages IDs should be queried.</td></tr>
<tr><td class="paramname">flags</td><td>If set to MR_GCM_ADD_DAY_MARKER, the marker MR_MSG_ID_DAYMARKER will be added before each day (regarding the local timezone). Set this to 0 if you do not want this behaviour.</td></tr>
<tr><td class="paramname">marker1before</td><td>An optional message ID. If set, the id MR_MSG_ID_MARKER1 will be added just before the given ID in the returned array. Set this to 0 if you do not want this behaviour.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Array of message IDs, must be <a class="el" href="structmrarray__t.html#a1400b5e42c682326e809723f02739a8e" title="Free an array object. ">mrarray_unref()</a>'d when no longer used. </dd></dl>
</div>
</div>
<a class="anchor" id="abbb08c91369ff2fedc8575f2e1f01e56"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="structmrarray__t.html">mrarray_t</a> * mrmailbox_search_msgs </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *&#160;</td>
<td class="paramname"><em>mailbox</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>chat_id</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>query</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Search messages containing the given query string. </p>
<p>Searching can be done globally (chat_id=0) or in a specified chat only (chat_id set).</p>
<p>Global chat results are typically displayed using <a class="el" href="structmrmsg__t.html#a3c14a8dbd6cc7f90c642223a873312e3" title="Get a summary for a message. ">mrmsg_get_summary()</a>, chat search results may just hilite the corresponding messages and present a prev/next button.</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>
<tr><td class="paramname">chat_id</td><td>ID of the chat to search messages in. Set this to 0 for a global search.</td></tr>
<tr><td class="paramname">query</td><td>The query to search for.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>An array of message IDs. Must be freed using <a class="el" href="structmrarray__t.html#a1400b5e42c682326e809723f02739a8e" title="Free an array object. ">mrarray_unref()</a> when no longer needed. If nothing can be found, the function returns NULL. </dd></dl>
</div>
</div>
<a class="anchor" id="af50446c1a5e504d27fe29de9e3b8edc3"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void mrmailbox_set_draft </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *&#160;</td>
<td class="paramname"><em>mailbox</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>chat_id</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>msg</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Save a draft for a chat. </p>
<p>To get the draft for a given chat ID, use <a class="el" href="structmrchat__t.html#abe916f48ac83c2ca6476312eae084cfa" title="The draft text. ">mrchat_t::m_draft_text</a></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>
<tr><td class="paramname">chat_id</td><td>The chat ID to save the draft for.</td></tr>
<tr><td class="paramname">msg</td><td>The message text to save as a draft.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None. </dd></dl>
</div>
</div>
<a class="anchor" id="a5c17b77d9d26022f0bdbef548d37b5c6"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int mrmailbox_get_total_msg_count </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *&#160;</td>
<td class="paramname"><em>mailbox</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>chat_id</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the total number of messages in a chat. </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>
<tr><td class="paramname">chat_id</td><td>The ID of the chat to count the messages for.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Number of total messages in the given chat. 0 for errors or empty chats. </dd></dl>
</div>
</div>
<a class="anchor" id="adcdfd1e0899d3c9778238d49933813a5"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int mrmailbox_get_fresh_msg_count </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *&#160;</td>
<td class="paramname"><em>mailbox</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>chat_id</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the number of <em>fresh</em> messages in a chat. </p>
<p>Typically used to implement a badge with a number in the chatlist.</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>
<tr><td class="paramname">chat_id</td><td>The ID of the chat to count the messages for.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Number of fresh messages in the given chat. 0 for errors or if there are no fresh messages. </dd></dl>
</div>
</div>
<a class="anchor" id="a8e04e43dacbe3128afd71e1d6c1b0911"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void mrmailbox_archive_chat </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *&#160;</td>
<td class="paramname"><em>mailbox</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>chat_id</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>archive</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Archive or unarchive a chat. </p>
<p>Archived chats are not included in the default chatlist returned by <a class="el" href="structmrmailbox__t.html#a4da10c87eb65bbf6c504979d75ec3b19" title="Get a list of chats. ">mrmailbox_get_chatlist()</a>. Instead, if there are <em>any</em> archived chats, the pseudo-chat with the chat_id MR_CHAT_ID_ARCHIVED_LINK will be added the the end of the chatlist.</p>
<p>To get a list of archived chats, use <a class="el" href="structmrmailbox__t.html#a4da10c87eb65bbf6c504979d75ec3b19" title="Get a list of chats. ">mrmailbox_get_chatlist()</a> with the flag MR_GCL_ARCHIVED_ONLY.</p>
<p>To find out the archived state of a given chat, use <a class="el" href="structmrchat__t.html#a5b28b343ceb290d4a613d0e5a7d528bc" title="Flag for the archived state. ">mrchat_t::m_archived</a></p>
<p>Calling this function usually results in the event <a class="el" href="mrevent_8h.html#a17eaeb107cbab46c0d9271d0b5560fc8" title="Messages or chats changed. ">MR_EVENT_MSGS_CHANGED</a></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>
<tr><td class="paramname">chat_id</td><td>The ID of the chat to archive or unarchive.</td></tr>
<tr><td class="paramname">archive</td><td>1=archive chat, 0=unarchive chat, all other values are reserved for future use</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None </dd></dl>
</div>
</div>
<a class="anchor" id="a24813f8aea38bcf5f928ea8a5fd7a3ec"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void mrmailbox_delete_chat </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *&#160;</td>
<td class="paramname"><em>mailbox</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>chat_id</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Delete a chat. </p>
<p>Messages are deleted from the device and the chat database entry is deleted. After that, the event <a class="el" href="mrevent_8h.html#a17eaeb107cbab46c0d9271d0b5560fc8" title="Messages or chats changed. ">MR_EVENT_MSGS_CHANGED</a> is posted.</p>
<p>Things that are <em>not</em> done implicitly:</p>
<ul>
<li>Messages are <b>not deleted from the server</b>.</li>
<li>The chat or the contact is <b>not blocked</b>, so new messages from the user/the group may appear and the user may create the chat again.</li>
<li><b>Groups are not left</b> - this would be unexpected as deleting a normal chat also does not prevent new mails from arriving (another argument is, that leaving a group requires sending a message to all group members - esp. for groups not used for a longer time, this is really unexpected when deletion results in contacting all members again. To leave a chat explicitly, use <a class="el" href="structmrmailbox__t.html#a40226d401548b002a62648ea054ac635" title="Remove a member from a group. ">mrmailbox_remove_contact_from_chat()</a> with chat_id=MR_CONTACT_ID_SELF)</li>
</ul>
<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>
<tr><td class="paramname">chat_id</td><td>The ID of the chat to delete.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None </dd></dl>
</div>
</div>
<a class="anchor" id="a3f9ac5fb9ff2dcbaafdddb5d955ac39b"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint32_t mrmailbox_send_text_msg </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *&#160;</td>
<td class="paramname"><em>mailbox</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>chat_id</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>text_to_send</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Send a simple text message a given chat. </p>
<p>Sends the event <a class="el" href="mrevent_8h.html#a17eaeb107cbab46c0d9271d0b5560fc8" title="Messages or chats changed. ">MR_EVENT_MSGS_CHANGED</a> on succcess. However, this does not imply, the message really reached the recipient - sending may be delayed eg. due to network problems. However, from your view, you're done with the message. Sooner or later it will find its way.</p>
<p>See also <a class="el" href="structmrmailbox__t.html#a2fdedd72b9f792463e4af173f21bb11c" title="Send an image to a chat. ">mrmailbox_send_image_msg()</a>.</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>
<tr><td class="paramname">chat_id</td><td>Chat ID to send the text message to. </td></tr>
<tr><td class="paramname">text_to_send</td><td>Text to send to the chat defined by the chat ID.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The ID of the message that is about being sent. </dd></dl>
</div>
</div>
<a class="anchor" id="a2fdedd72b9f792463e4af173f21bb11c"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint32_t mrmailbox_send_image_msg </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *&#160;</td>
<td class="paramname"><em>mailbox</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>chat_id</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>file</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>filemime</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>width</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>height</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Send an image to a chat. </p>
<p>Sends the event <a class="el" href="mrevent_8h.html#a17eaeb107cbab46c0d9271d0b5560fc8" title="Messages or chats changed. ">MR_EVENT_MSGS_CHANGED</a> on succcess. However, this does not imply, the message really reached the recipient - sending may be delayed eg. due to network problems. However, from your view, you're done with the message. Sooner or later it will find its way.</p>
<p>See also <a class="el" href="structmrmailbox__t.html#a3f9ac5fb9ff2dcbaafdddb5d955ac39b" title="Send a simple text message a given chat. ">mrmailbox_send_text_msg()</a>.</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>
<tr><td class="paramname">chat_id</td><td>Chat ID to send the image to. </td></tr>
<tr><td class="paramname">file</td><td>Full path of the image file to send. The core may make a copy of the file. </td></tr>
<tr><td class="paramname">filemime</td><td>Mime type of the file to send. NULL if you don't know or don't care. </td></tr>
<tr><td class="paramname">width</td><td>Width in pixel of the file. 0 if you don't know or don't care. </td></tr>
<tr><td class="paramname">height</td><td>Width in pixel of the file. 0 if you don't know or don't care.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The ID of the message that is about being sent. </dd></dl>
</div>
</div>
<a class="anchor" id="a8c0dc35fd9696d35f6a8301501f37c5a"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint32_t mrmailbox_send_video_msg </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *&#160;</td>
<td class="paramname"><em>mailbox</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>chat_id</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>file</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>filemime</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>width</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>height</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>duration</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Send an video to a chat. </p>
<p>Sends the event <a class="el" href="mrevent_8h.html#a17eaeb107cbab46c0d9271d0b5560fc8" title="Messages or chats changed. ">MR_EVENT_MSGS_CHANGED</a> on succcess. However, this does not imply, the message really reached the recipient - sending may be delayed eg. due to network problems. However, from your view, you're done with the message. Sooner or later it will find its way.</p>
<p>See also <a class="el" href="structmrmailbox__t.html#a2fdedd72b9f792463e4af173f21bb11c" title="Send an image to a chat. ">mrmailbox_send_image_msg()</a>.</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>
<tr><td class="paramname">chat_id</td><td>Chat ID to send the video to. </td></tr>
<tr><td class="paramname">file</td><td>Full path of the video file to send. The core may make a copy of the file. </td></tr>
<tr><td class="paramname">filemime</td><td>Mime type of the file to send. NULL if you don't know or don't care. </td></tr>
<tr><td class="paramname">width</td><td>Width in video of the file, if known. 0 if you don't know or don't care. </td></tr>
<tr><td class="paramname">height</td><td>Width in video of the file, if known. 0 if you don't know or don't care. </td></tr>
<tr><td class="paramname">duration</td><td>Length of the video in milliseconds. 0 if you don't know or don't care.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The ID of the message that is about being sent. </dd></dl>
</div>
</div>
<a class="anchor" id="a42935531261ba3ed8afd82cf39fe928a"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint32_t mrmailbox_send_voice_msg </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *&#160;</td>
<td class="paramname"><em>mailbox</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>chat_id</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>file</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>filemime</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>duration</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Send a voice message to a chat. </p>
<p>Voice messages are messages just recorded though the device microphone. For sending music or other audio data, use <a class="el" href="structmrmailbox__t.html#ae24df813f179fdab160f94c583c63401" title="Send an audio file to a chat. ">mrmailbox_send_audio_msg()</a>.</p>
<p>Sends the event <a class="el" href="mrevent_8h.html#a17eaeb107cbab46c0d9271d0b5560fc8" title="Messages or chats changed. ">MR_EVENT_MSGS_CHANGED</a> on succcess. However, this does not imply, the message really reached the recipient - sending may be delayed eg. due to network problems. However, from your view, you're done with the message. Sooner or later it will find its way.</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>
<tr><td class="paramname">chat_id</td><td>Chat ID to send the voice message to. </td></tr>
<tr><td class="paramname">file</td><td>Full path of the file to send. The core may make a copy of the file. </td></tr>
<tr><td class="paramname">filemime</td><td>Mime type of the file to send. NULL if you don't know or don't care. </td></tr>
<tr><td class="paramname">duration</td><td>Length of the voice message in milliseconds. 0 if you don't know or don't care.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The ID of the message that is about being sent. </dd></dl>
</div>
</div>
<a class="anchor" id="ae24df813f179fdab160f94c583c63401"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint32_t mrmailbox_send_audio_msg </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *&#160;</td>
<td class="paramname"><em>mailbox</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>chat_id</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>file</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>filemime</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>duration</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>author</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>trackname</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Send an audio file to a chat. </p>
<p>Audio messages are eg. music tracks. For voice messages just recorded though the device microphone, use <a class="el" href="structmrmailbox__t.html#a42935531261ba3ed8afd82cf39fe928a" title="Send a voice message to a chat. ">mrmailbox_send_voice_msg()</a>.</p>
<p>Sends the event <a class="el" href="mrevent_8h.html#a17eaeb107cbab46c0d9271d0b5560fc8" title="Messages or chats changed. ">MR_EVENT_MSGS_CHANGED</a> on succcess. However, this does not imply, the message really reached the recipient - sending may be delayed eg. due to network problems. However, from your view, you're done with the message. Sooner or later it will find its way.</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>
<tr><td class="paramname">chat_id</td><td>Chat ID to send the audio to. </td></tr>
<tr><td class="paramname">file</td><td>Full path of the file to send. The core may make a copy of the file. </td></tr>
<tr><td class="paramname">filemime</td><td>Mime type of the file to send. NULL if you don't know or don't care. </td></tr>
<tr><td class="paramname">duration</td><td>Length of the audio in milliseconds. 0 if you don't know or don't care. </td></tr>
<tr><td class="paramname">author</td><td>Author or artist of the file. NULL if you don't know or don't care. </td></tr>
<tr><td class="paramname">trackname</td><td>Trackname or title of the file. NULL if you don't know or don't care.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The ID of the message that is about being sent. </dd></dl>
</div>
</div>
<a class="anchor" id="a7f39fa026b22360e282c9138e5af4ce9"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint32_t mrmailbox_send_file_msg </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *&#160;</td>
<td class="paramname"><em>mailbox</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>chat_id</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>file</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>filemime</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Send a document to a chat. </p>
<p>Use this function to send any document or file to a chat.</p>
<p>Sends the event <a class="el" href="mrevent_8h.html#a17eaeb107cbab46c0d9271d0b5560fc8" title="Messages or chats changed. ">MR_EVENT_MSGS_CHANGED</a> on succcess. However, this does not imply, the message really reached the recipient - sending may be delayed eg. due to network problems. However, from your view, you're done with the message. Sooner or later it will find its way.</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>
<tr><td class="paramname">chat_id</td><td>Chat ID to send the document to. </td></tr>
<tr><td class="paramname">file</td><td>Full path of the file to send. The core may make a copy of the file. </td></tr>
<tr><td class="paramname">filemime</td><td>Mime type of the file to send. NULL if you don't know or don't care.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The ID of the message that is about being sent. </dd></dl>
</div>
</div>
<a class="anchor" id="a88e7fe7faa3576c086b6d3e0ab825892"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint32_t mrmailbox_send_vcard_msg </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *&#160;</td>
<td class="paramname"><em>mailbox</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>chat_id</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>contact_id</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Send foreign contact data to a chat. </p>
<p>Sends the name and the email address of another contact to a chat. The contact this may or may not be a member of the chat.</p>
<p>Typically used to share a contact to another member or to a group of members.</p>
<p>Internally, the function just creates an appropriate text message and sends it using <a class="el" href="structmrmailbox__t.html#a3f9ac5fb9ff2dcbaafdddb5d955ac39b" title="Send a simple text message a given chat. ">mrmailbox_send_text_msg()</a>.</p>
<p>Future implementations may also send the key of the user though gossip; currently, this is not done.</p>
<p>NB: The "vcard" in the function name is just an abbreviation of "visiting card" and is not related to the VCARD data format.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">mailbox</td><td>The mailbox object.</td></tr>
<tr><td class="paramname">chat_id</td><td>The chat to send the message to.</td></tr>
<tr><td class="paramname">contact_id</td><td>The contact whichs data should be shared to the chat.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Returns the ID of the message sent. </dd></dl>
</div>
</div>
<a class="anchor" id="a47156db87107ec208d6637f460d897a8"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint32_t mrmailbox_create_group_chat </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *&#160;</td>
<td class="paramname"><em>mailbox</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>chat_name</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Create a new group chat. </p>
<p>After creation, the group has one member with the ID <a class="el" href="structmrcontact__t.html#ab2ee31297c327e04ed14673adbd49716">MR_CONTACT_ID_SELF</a> and is in <em>unpromoted</em> state. This means, you can add or remove members, change the name, the group image and so on without messages being send to all group members.</p>
<p>This changes as soon as the first message is sent to the group members and the group becomes <em>promoted</em>. After that, all changes are synced with all group members by sending status message.</p>
<p>To check, if a chat is still unpromoted, you <a class="el" href="structmrchat__t.html#af23f2fd022f9978f7eed5ed46f3d9fbb" title="Check if a chat is still unpromoted. ">mrchat_is_unpromoted()</a></p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">mailbox</td><td>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">chat_name</td><td>The name of the group chat to create. The name may be changed later using <a class="el" href="structmrmailbox__t.html#a8772e9bb55b02299f65ebd8bcc682bb1" title="Set group name. ">mrmailbox_set_chat_name()</a>. To find out the name of a group later, see <a class="el" href="structmrchat__t.html#abbd344d8d361a1a4d14bfc9b5dc57140" title="Name of the chat. ">mrchat_t::m_name</a></td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The chat ID of the new group chat, 0 on errors. </dd></dl>
</div>
</div>
<a class="anchor" id="a8772e9bb55b02299f65ebd8bcc682bb1"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int mrmailbox_set_chat_name </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *&#160;</td>
<td class="paramname"><em>mailbox</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>chat_id</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>new_name</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set group name. </p>
<p>If the group is already <em>promoted</em> (any message was sent to the group), all group members are informed by a special status message that is sent automatically by this function.</p>
<p>Sends out <a class="el" href="mrevent_8h.html#a5ac741b81ec97628f44795600c0e4d4c" title="Group changed. ">MR_EVENT_CHAT_MODIFIED</a> and <a class="el" href="mrevent_8h.html#a17eaeb107cbab46c0d9271d0b5560fc8" title="Messages or chats changed. ">MR_EVENT_MSGS_CHANGED</a> if a status message was sent.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">chat_id</td><td>The chat ID to set the name for. Must be a group chat.</td></tr>
<tr><td class="paramname">new_name</td><td>New name of the group.</td></tr>
<tr><td class="paramname">mailbox</td><td>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>1=success, 0=error </dd></dl>
</div>
</div>
<a class="anchor" id="a08c527170681c949ddd6931a004fdd5f"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int mrmailbox_set_chat_profile_image </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *&#160;</td>
<td class="paramname"><em>mailbox</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>chat_id</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>new_image</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set group profile image. </p>
<p>If the group is already <em>promoted</em> (any message was sent to the group), all group members are informed by a special status message that is sent automatically by this function.</p>
<p>Sends out <a class="el" href="mrevent_8h.html#a5ac741b81ec97628f44795600c0e4d4c" title="Group changed. ">MR_EVENT_CHAT_MODIFIED</a> and <a class="el" href="mrevent_8h.html#a17eaeb107cbab46c0d9271d0b5560fc8" title="Messages or chats changed. ">MR_EVENT_MSGS_CHANGED</a> if a status message was sent.</p>
<p>To find out the profile image of a chat, use <a class="el" href="structmrchat__t.html#a12bad02bef1fb6c8003f41c72d94f54b" title="Get the chat&#39;s profile image. ">mrchat_get_profile_image()</a></p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">mailbox</td><td>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">chat_id</td><td>The chat ID to set the image for.</td></tr>
<tr><td class="paramname">new_image</td><td>Full path of the image to use as the group image. If you pass NULL here, the group image is deleted (for promoted groups, all members are informed about this change anyway).</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>1=success, 0=error </dd></dl>
</div>
</div>
<a class="anchor" id="ae37988665a3d46f42a7e8199d18735c2"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int mrmailbox_is_contact_in_chat </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *&#160;</td>
<td class="paramname"><em>mailbox</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>chat_id</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>contact_id</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Check if a given contact ID is a member of a group chat. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">mailbox</td><td>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">chat_id</td><td>The chat ID to check.</td></tr>
<tr><td class="paramname">contact_id</td><td>The contact ID to check. To check if yourself is member of the chat, pass MR_CONTACT_ID_SELF (1) here.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>1=contact ID is member of chat ID, 0=contact is not in chat </dd></dl>
</div>
</div>
<a class="anchor" id="a96368620971935c7ac4a0bb324ece2c9"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int mrmailbox_add_contact_to_chat </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *&#160;</td>
<td class="paramname"><em>mailbox</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>chat_id</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>contact_id</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Add a member to a group. </p>
<p>If the group is already <em>promoted</em> (any message was sent to the group), all group members are informed by a special status message that is sent automatically by this function.</p>
<p>Sends out <a class="el" href="mrevent_8h.html#a5ac741b81ec97628f44795600c0e4d4c" title="Group changed. ">MR_EVENT_CHAT_MODIFIED</a> and <a class="el" href="mrevent_8h.html#a17eaeb107cbab46c0d9271d0b5560fc8" title="Messages or chats changed. ">MR_EVENT_MSGS_CHANGED</a> if a status message was sent.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">mailbox</td><td>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">chat_id</td><td>The chat ID to add the contact to. Must be a group chat.</td></tr>
<tr><td class="paramname">contact_id</td><td>The contact ID to add to the chat.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>1=member added to group, 0=error </dd></dl>
</div>
</div>
<a class="anchor" id="a40226d401548b002a62648ea054ac635"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int mrmailbox_remove_contact_from_chat </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *&#160;</td>
<td class="paramname"><em>mailbox</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>chat_id</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>contact_id</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Remove a member from a group. </p>
<p>If the group is already <em>promoted</em> (any message was sent to the group), all group members are informed by a special status message that is sent automatically by this function.</p>
<p>Sends out <a class="el" href="mrevent_8h.html#a5ac741b81ec97628f44795600c0e4d4c" title="Group changed. ">MR_EVENT_CHAT_MODIFIED</a> and <a class="el" href="mrevent_8h.html#a17eaeb107cbab46c0d9271d0b5560fc8" title="Messages or chats changed. ">MR_EVENT_MSGS_CHANGED</a> if a status message was sent.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">mailbox</td><td>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">chat_id</td><td>The chat ID to remove the contact from. Must be a group chat.</td></tr>
<tr><td class="paramname">contact_id</td><td>The contact ID to remove from the chat.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>1=member removed from group, 0=error </dd></dl>
</div>
</div>
<a class="anchor" id="aa089e97e7ca1add16c10d5cc0e902824"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint32_t mrmailbox_create_contact </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *&#160;</td>
<td class="paramname"><em>mailbox</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>name</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>addr</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Add a single contact. </p>
<p>We assume, the contact name, if any, is entered by the user and is used "as is" therefore, mr_normalize_name() is <em>not</em> called for the name.</p>
<p>To add a number of contacts, see <a class="el" href="structmrmailbox__t.html#a25720ea41355cc32cc93aa45709937d6" title="Add a number of contacts. ">mrmailbox_add_address_book()</a> which is much faster for adding a bunch of addresses.</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">name</td><td>Name of the contact to add. If you do not know the name belonging to the address, you can give NULL here.</td></tr>
<tr><td class="paramname">addr</td><td>E-mail-address of the contact to add. If the email address already exists, the name is updated and the origin is increased to "manually created".</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Contact ID of the created or reused contact. </dd></dl>
</div>
</div>
<a class="anchor" id="a25720ea41355cc32cc93aa45709937d6"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int mrmailbox_add_address_book </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *&#160;</td>
<td class="paramname"><em>mailbox</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>adr_book</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Add a number of contacts. </p>
<p>Typically used to add the whole address book from the OS. As names here are typically not well formatted, we call mr_normalize_name() for each name given.</p>
<p>To add a single contact entered by the user, you should prefer <a class="el" href="structmrmailbox__t.html#aa089e97e7ca1add16c10d5cc0e902824" title="Add a single contact. ">mrmailbox_create_contact()</a>, however, for adding a bunch of addresses, this function is <em>much</em> faster.</p>
<p>The function takes are of not overwriting names manually added or edited by <a class="el" href="structmrmailbox__t.html#aa089e97e7ca1add16c10d5cc0e902824" title="Add a single contact. ">mrmailbox_create_contact()</a>.</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">adr_book</td><td>A multi-line string in the format in the format <code>Name one\nAddress one\nName two\Address two</code>. If an email address already exists, the name is updated and the origin is increased to "manually created".</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The number of modified or added contacts. </dd></dl>
</div>
</div>
<a class="anchor" id="ae4ccc69ba8e8851a04f9b17b37e5f86a"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="structmrarray__t.html">mrarray_t</a> * mrmailbox_get_known_contacts </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *&#160;</td>
<td class="paramname"><em>mailbox</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>query</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns known and unblocked contacts. </p>
<p>To get information about a single contact, see <a class="el" href="structmrmailbox__t.html#a057660d94350ff98eca72785c6e88962" title="Get a single contact object. ">mrmailbox_get_contact()</a>.</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">query</td><td>A string to filter the list. Typically used to implement an incremental search. NULL for no filtering.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>An array containing all contact IDs. Must be <a class="el" href="structmrarray__t.html#a1400b5e42c682326e809723f02739a8e" title="Free an array object. ">mrarray_unref()</a>'d after usage. </dd></dl>
</div>
</div>
<a class="anchor" id="a209e3832cd680d4677582923695ae872"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="structmrarray__t.html">mrarray_t</a> * mrmailbox_get_blocked_contacts </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *&#160;</td>
<td class="paramname"><em>mailbox</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Get blocked contacts. </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>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>An array containing all blocked contact IDs. Must be <a class="el" href="structmrarray__t.html#a1400b5e42c682326e809723f02739a8e" title="Free an array object. ">mrarray_unref()</a>'d after usage. </dd></dl>
</div>
</div>
<a class="anchor" id="a6c749ad5736d9c34ff492015ea10a184"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int mrmailbox_get_blocked_count </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *&#160;</td>
<td class="paramname"><em>mailbox</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the number of blocked contacts. </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>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a057660d94350ff98eca72785c6e88962"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="structmrcontact__t.html">mrcontact_t</a> * mrmailbox_get_contact </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *&#160;</td>
<td class="paramname"><em>mailbox</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>contact_id</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Get a single contact object. </p>
<p>For a list, see eg. <a class="el" href="structmrmailbox__t.html#ae4ccc69ba8e8851a04f9b17b37e5f86a" title="Returns known and unblocked contacts. ">mrmailbox_get_known_contacts()</a>.</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">contact_id</td><td>ID of the contact to get the object for.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The contact object, must be freed using <a class="el" href="structmrcontact__t.html#a38e17e55cd66f5e86a1dcb8d1f67797a" title="Free a contact object. ">mrcontact_unref()</a> when no longer used. NULL on errors. </dd></dl>
</div>
</div>
<a class="anchor" id="a7150c575193d43e048689aa264c74c79"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void mrmailbox_marknoticed_contact </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *&#160;</td>
<td class="paramname"><em>mailbox</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>contact_id</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Mark all messages send by the given contact as <em>noticed</em>. </p>
<p>See also <a class="el" href="structmrmailbox__t.html#a07cc8fe0cfd900a9449bffc4ca5a7a95" title="Mark all message in a chat as noticed. ">mrmailbox_marknoticed_chat()</a> and <a class="el" href="structmrmailbox__t.html#a67281e50b568dc18df710275e0e13f5b" title="Mark a message as seen, updates the IMAP state and sends MDNs. ">mrmailbox_markseen_msgs()</a></p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">mailbox</td><td>The mailbox object as created by mrmmailbox_new()</td></tr>
<tr><td class="paramname">contact_id</td><td>The contact ID of which all messages should be marked as noticed.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>none </dd></dl>
</div>
</div>
<a class="anchor" id="abb069358386b767a60444651195e0895"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void mrmailbox_block_contact </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *&#160;</td>
<td class="paramname"><em>mailbox</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>contact_id</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>new_blocking</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Block or unblock a contact. </p>
<p>May result in a <a class="el" href="mrevent_8h.html#ad50b3a76349834631dc26b6c9557be8f" title="Contact(s) created, renamed, blocked or deleted. ">MR_EVENT_CONTACTS_CHANGED</a> event.</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">contact_id</td><td>The ID of the contact to block or unblock.</td></tr>
<tr><td class="paramname">new_blocking</td><td>1=block contact, 0=unblock contact</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None. </dd></dl>
</div>
</div>
<a class="anchor" id="aa4d582bc9d6d80e43038d213b081031f"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">char * mrmailbox_get_contact_encrinfo </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *&#160;</td>
<td class="paramname"><em>mailbox</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>contact_id</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Get encryption info for a contact. </p>
<p>Get a multi-line encryption info, containing your fingerprint and the fingerprint of the contact, used eg. to compare the fingerprints for a simple out-of-band verification.</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">contact_id</td><td>ID of the contact to get the encryption info for.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>multi-line text, must be free()'d after usage. </dd></dl>
</div>
</div>
<a class="anchor" id="a209732d105e40cd0c61d33d76d288c59"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int mrmailbox_delete_contact </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *&#160;</td>
<td class="paramname"><em>mailbox</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>contact_id</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Delete a contact. </p>
<p>The contact is deleted from the local device. It may happen that this is not possible as the contact is in used. In this case, the contact can be blocked.</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">contact_id</td><td>ID of the contact to delete.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>1=success, 0=error </dd></dl>
</div>
</div>
<a class="anchor" id="a9ef144244e7d86ba82ce3257abf14f13"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="structmrmsg__t.html">mrmsg_t</a> * mrmailbox_get_msg </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *&#160;</td>
<td class="paramname"><em>mailbox</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>msg_id</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Get a single message object of the type <a class="el" href="structmrmsg__t.html" title="An object representing a single message in memory. ">mrmsg_t</a>. </p>
<p>For a list of messages in a chat, see <a class="el" href="structmrmailbox__t.html#af5ac7f527aef58f8e834f3bd740acd46" title="Get all message IDs belonging to a chat. ">mrmailbox_get_chat_msgs()</a> For a list or chats, see <a class="el" href="structmrmailbox__t.html#a4da10c87eb65bbf6c504979d75ec3b19" title="Get a list of chats. ">mrmailbox_get_chatlist()</a></p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">mailbox</td><td>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">msg_id</td><td>The message ID for which the message object should be created.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A <a class="el" href="structmrmsg__t.html" title="An object representing a single message in memory. ">mrmsg_t</a> message object. When done, the object must be freed using <a class="el" href="structmrmsg__t.html#aa33212e41efff643aa7290753f3d9b02" title="Free a message object. ">mrmsg_unref()</a> </dd></dl>
</div>
</div>
<a class="anchor" id="a13e05fe3f43102c3323ba4c7e2761593"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">char * mrmailbox_get_msg_info </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *&#160;</td>
<td class="paramname"><em>mailbox</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>msg_id</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Get an informational text for a single message. </p>
<p>the text is multiline and may contain eg. the raw text of the message.</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">msg_id</td><td>the message id for which information should be generated</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>text string, must be free()'d after usage </dd></dl>
</div>
</div>
<a class="anchor" id="ab316ed8a30c968085fa503e6c215e2f1"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void mrmailbox_forward_msgs </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *&#160;</td>
<td class="paramname"><em>mailbox</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const uint32_t *&#160;</td>
<td class="paramname"><em>msg_ids</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>msg_cnt</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>chat_id</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Forward messages to another chat. </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">msg_ids</td><td>an array of uint32_t containing all message IDs that should be forwarded</td></tr>
<tr><td class="paramname">msg_cnt</td><td>the number of messages IDs in the msg_ids array</td></tr>
<tr><td class="paramname">chat_id</td><td>The destination chat ID.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>none </dd></dl>
</div>
</div>
<a class="anchor" id="a8ed1c3bd08cd6515abf6046ebad9cafc"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void mrmailbox_star_msgs </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *&#160;</td>
<td class="paramname"><em>mailbox</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const uint32_t *&#160;</td>
<td class="paramname"><em>msg_ids</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>msg_cnt</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>star</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Star/unstar messages by setting the last parameter to 0 (unstar) or 1(star). </p>
<p>Starred messages are collected in a virtual chat that can be shown using <a class="el" href="structmrmailbox__t.html#af5ac7f527aef58f8e834f3bd740acd46" title="Get all message IDs belonging to a chat. ">mrmailbox_get_chat_msgs()</a> using the chat_id MR_CHAT_ID_STARRED.</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">msg_ids</td><td>An array of uint32_t message IDs defining the messages to star or unstar</td></tr>
<tr><td class="paramname">msg_cnt</td><td>The number of IDs in msg_ids</td></tr>
<tr><td class="paramname">star</td><td>0=unstar the messages in msg_ids, 1=star them</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>none </dd></dl>
</div>
</div>
<a class="anchor" id="adf02bfc046577b46e1f0f5a31869890f"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void mrmailbox_delete_msgs </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *&#160;</td>
<td class="paramname"><em>mailbox</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const uint32_t *&#160;</td>
<td class="paramname"><em>msg_ids</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>msg_cnt</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Delete messages. </p>
<p>The messages are deleted on the current device and on the IMAP server.</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">msg_ids</td><td>an array of uint32_t containing all message IDs that should be deleted</td></tr>
<tr><td class="paramname">msg_cnt</td><td>the number of messages IDs in the msg_ids array</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>none </dd></dl>
</div>
</div>
<a class="anchor" id="a67281e50b568dc18df710275e0e13f5b"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void mrmailbox_markseen_msgs </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *&#160;</td>
<td class="paramname"><em>mailbox</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const uint32_t *&#160;</td>
<td class="paramname"><em>msg_ids</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>msg_cnt</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Mark a message as <em>seen</em>, updates the IMAP state and sends MDNs. </p>
<p>if the message is not in a real chat (eg. a contact request), the message is only marked as NOTICED and no IMAP/MDNs is done. See also <a class="el" href="structmrmailbox__t.html#a07cc8fe0cfd900a9449bffc4ca5a7a95" title="Mark all message in a chat as noticed. ">mrmailbox_marknoticed_chat()</a> and <a class="el" href="structmrmailbox__t.html#a7150c575193d43e048689aa264c74c79" title="Mark all messages send by the given contact as noticed. ">mrmailbox_marknoticed_contact()</a></p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">mailbox</td><td>The mailbox object.</td></tr>
<tr><td class="paramname">msg_ids</td><td>an array of uint32_t containing all the messages IDs that should be marked as seen.</td></tr>
<tr><td class="paramname">msg_cnt</td><td>The number of message IDs in msg_ids.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>none </dd></dl>
</div>
</div>
<a class="anchor" id="a42ca741cc08785585f1dc74d515be5ef"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int mrmailbox_configure_and_connect </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *&#160;</td>
<td class="paramname"><em>mailbox</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<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>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>
</ul>
<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>
</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>
<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>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void mrmailbox_configure_cancel </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *&#160;</td>
<td class="paramname"><em>mailbox</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<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 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>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None </dd></dl>
</div>
</div>
<a class="anchor" id="aa6e325e49ecccfc96276db6c327dba94"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int mrmailbox_is_configured </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *&#160;</td>
<td class="paramname"><em>mailbox</em></td><td>)</td>
<td></td>
</tr>
</table>
</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 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>
</table>
</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>
<a class="anchor" id="abcb59b494a430c2d3d6e77cf433f5755"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">char * mrmailbox_imex_has_backup </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *&#160;</td>
<td class="paramname"><em>mailbox</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>dir_name</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Check if there is a backup file. </p>
<p>May only be used on fresh installations (<a class="el" href="structmrmailbox__t.html#aa6e325e49ecccfc96276db6c327dba94" title="Check if the mailbox is already configured. ">mrmailbox_is_configured()</a> returns 0).</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">mailbox</td><td>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">dir_name</td><td>Directory to search backups in.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>String with the backup file or NULL; returned strings must be free()'d. </dd></dl>
</div>
</div>
<a class="anchor" id="a5de7b87b8c95733619cc4051b3508973"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void mrmailbox_imex </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *&#160;</td>
<td class="paramname"><em>mailbox</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>what</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>param1</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>setup_code</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Import/export things. </p>
<p><a class="el" href="structmrmailbox__t.html#a5de7b87b8c95733619cc4051b3508973" title="Import/export things. ">mrmailbox_imex()</a> imports and exports export keys, backup etc. Function, sends MR_EVENT_IMEX_* events. To avoid double slashes, the given directory should not end with a slash. <em>what</em> to export is defined by a MR_IMEX_* constant.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">mailbox</td><td>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">what</td><td>One of the MR_IMEX_* constants.</td></tr>
<tr><td class="paramname">param1</td><td>Meaning depends on the MR_IMEX_* constants.</td></tr>
<tr><td class="paramname">setup_code</td><td>Setup-code to encrypt/decrypt data.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None. </dd></dl>
</div>
</div>
<a class="anchor" id="a3b55fcb1a91c616f032e160914406ed2"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int mrmailbox_check_password </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *&#160;</td>
<td class="paramname"><em>mailbox</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>test_pw</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Check if the user is authorized by the given password in some way. </p>
<p>This is to promt for the password eg. before exporting keys/backup.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">mailbox</td><td>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">test_pw</td><td>Password to check.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>1=user is authorized, 0=user is not authorized. </dd></dl>
</div>
</div>
<a class="anchor" id="af4d9c838230758e1b0e40957447232f7"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">char * mrmailbox_create_setup_code </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structmrmailbox__t.html">mrmailbox_t</a> *&#160;</td>
<td class="paramname"><em>mailbox</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Create random setup code. </p>
<p>The created "Autocrypt Level 1" setup code has the following form:</p>
<div class="fragment"><div class="line">1234-1234-1234-</div><div class="line">1234-1234-1234-</div><div class="line">1234-1234-1234</div></div><!-- fragment --><p>Linebreaks and spaces are not added to the setup code, but the "-" are. Should be given to <a class="el" href="structmrmailbox__t.html#a5de7b87b8c95733619cc4051b3508973" title="Import/export things. ">mrmailbox_imex()</a> for encryption, should be wiped and free()'d after usage.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">mailbox</td><td>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>Setup code, must be free()'d after usage. </dd></dl>
</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a class="anchor" id="a6c557153209e128b69301246dbf9e230"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void* mrmailbox_t::m_userdata</td>
</tr>
</table>
</div><div class="memdoc">
<p>Use data, may be used for any purpose. </p>
<p>The same pointer as given to <a class="el" href="structmrmailbox__t.html#a32825e3e0a1b16679580704a4b43db1a" title="Create a new mailbox object. ">mrmailbox_new()</a>, may be used by the caller for any purpose. </p>
</div>
</div>
<hr/>The documentation for this struct was generated from the following files:<ul>
<li>/home/bpetersen/projects/deltachat-core/src/<a class="el" href="mrmailbox_8h_source.html">mrmailbox.h</a></li>
<li>/home/bpetersen/projects/deltachat-core/src/mrmailbox.c</li>
<li>/home/bpetersen/projects/deltachat-core/src/mrmailbox_configure.c</li>
<li>/home/bpetersen/projects/deltachat-core/src/mrmailbox_imex.c</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>