1
0
Fork 0
mirror of https://github.com/deltachat/deltachat-core.git synced 2025-10-05 02:29:28 +02:00
This commit is contained in:
B. Petersen 2017-11-21 23:06:56 +01:00
parent ad483990c7
commit 25f5a0ba1f
23 changed files with 2742 additions and 2446 deletions

View file

@ -109,7 +109,7 @@ Macros</h2></td></tr>
<tr class="memdesc:a7088b24d6d49fee42d6b83360bf1fcca"><td class="mdescLeft">&#160;</td><td class="mdescRight">The user should show an error. <a href="#a7088b24d6d49fee42d6b83360bf1fcca">More...</a><br /></td></tr>
<tr class="separator:a7088b24d6d49fee42d6b83360bf1fcca"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a17eaeb107cbab46c0d9271d0b5560fc8"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="mrevent_8h.html#a17eaeb107cbab46c0d9271d0b5560fc8">MR_EVENT_MSGS_CHANGED</a>&#160;&#160;&#160;2000</td></tr>
<tr class="memdesc:a17eaeb107cbab46c0d9271d0b5560fc8"><td class="mdescLeft">&#160;</td><td class="mdescRight">One or more messages changed for some reasons in the database. <a href="#a17eaeb107cbab46c0d9271d0b5560fc8">More...</a><br /></td></tr>
<tr class="memdesc:a17eaeb107cbab46c0d9271d0b5560fc8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Messages or chats changed. <a href="#a17eaeb107cbab46c0d9271d0b5560fc8">More...</a><br /></td></tr>
<tr class="separator:a17eaeb107cbab46c0d9271d0b5560fc8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a548525a9d4cc03cd240ca6dda4246ae8"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="mrevent_8h.html#a548525a9d4cc03cd240ca6dda4246ae8">MR_EVENT_INCOMING_MSG</a>&#160;&#160;&#160;2005</td></tr>
<tr class="memdesc:a548525a9d4cc03cd240ca6dda4246ae8"><td class="mdescLeft">&#160;</td><td class="mdescRight">There is a fresh message. <a href="#a548525a9d4cc03cd240ca6dda4246ae8">More...</a><br /></td></tr>
@ -121,7 +121,7 @@ Macros</h2></td></tr>
<tr class="memdesc:a080965cf1f3dd138999c56ec30580b58"><td class="mdescLeft">&#160;</td><td class="mdescRight">A single message is read by the receiver (state changed from MR_STATE_OUT_DELIVERED to MR_STATE_OUT_MDN_RCVD, see <a class="el" href="structmrmsg__t.html#aca59d28054d3e15b4fe6ca74073d91f4" title="Message state. ">mrmsg_t::m_state</a>). <a href="#a080965cf1f3dd138999c56ec30580b58">More...</a><br /></td></tr>
<tr class="separator:a080965cf1f3dd138999c56ec30580b58"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5ac741b81ec97628f44795600c0e4d4c"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="mrevent_8h.html#a5ac741b81ec97628f44795600c0e4d4c">MR_EVENT_CHAT_MODIFIED</a>&#160;&#160;&#160;2020</td></tr>
<tr class="memdesc:a5ac741b81ec97628f44795600c0e4d4c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Group name/image changed or members added/removed. <a href="#a5ac741b81ec97628f44795600c0e4d4c">More...</a><br /></td></tr>
<tr class="memdesc:a5ac741b81ec97628f44795600c0e4d4c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Group changed. <a href="#a5ac741b81ec97628f44795600c0e4d4c">More...</a><br /></td></tr>
<tr class="separator:a5ac741b81ec97628f44795600c0e4d4c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad50b3a76349834631dc26b6c9557be8f"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="mrevent_8h.html#ad50b3a76349834631dc26b6c9557be8f">MR_EVENT_CONTACTS_CHANGED</a>&#160;&#160;&#160;2030</td></tr>
<tr class="memdesc:ad50b3a76349834631dc26b6c9557be8f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Contact(s) created, renamed, blocked or deleted. <a href="#ad50b3a76349834631dc26b6c9557be8f">More...</a><br /></td></tr>
@ -158,65 +158,45 @@ Macros</h2></td></tr>
<div class="textblock"><p>The following constants are used as events reported to the callback given to <a class="el" href="structmrmailbox__t.html#a32825e3e0a1b16679580704a4b43db1a" title="Create a new mailbox object. ">mrmailbox_new()</a>. </p>
<p>If you do not want to handle an event, it is always safe to return 0, so there is no need to add a "case" for every event. </p>
</div><h2 class="groupheader">Macro Definition Documentation</h2>
<a class="anchor" id="a5ac741b81ec97628f44795600c0e4d4c"></a>
<a class="anchor" id="abc46d188d1a1a25c92433aa05568e23b"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define MR_EVENT_CHAT_MODIFIED&#160;&#160;&#160;2020</td>
<td class="memname">#define MR_EVENT_INFO&#160;&#160;&#160;100</td>
</tr>
</table>
</div><div class="memdoc">
<p>Group name/image changed or members added/removed. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">data1</td><td>chat_id</td></tr>
<tr><td class="paramname">data2</td><td>0</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 </dd></dl>
</div>
</div>
<a class="anchor" id="abb0881d4c7c887b8f371cedc471846b5"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define MR_EVENT_CONFIGURE_PROGRESS&#160;&#160;&#160;2041</td>
</tr>
</table>
</div><div class="memdoc">
<p>Inform about the configuration progress started by <a class="el" href="structmrmailbox__t.html#a42ca741cc08785585f1dc74d515be5ef" title="Configure and connect a mailbox. ">mrmailbox_configure_and_connect()</a>. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">data1</td><td>Permille</td></tr>
<tr><td class="paramname">data2</td><td>0</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 </dd></dl>
</div>
</div>
<a class="anchor" id="ad50b3a76349834631dc26b6c9557be8f"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define MR_EVENT_CONTACTS_CHANGED&#160;&#160;&#160;2030</td>
</tr>
</table>
</div><div class="memdoc">
<p>Contact(s) created, renamed, blocked or deleted. </p>
<p>The user may write an informational string to the log. </p>
<p>Passed to the callback given to <a class="el" href="structmrmailbox__t.html#a32825e3e0a1b16679580704a4b43db1a" title="Create a new mailbox object. ">mrmailbox_new()</a>. This event should not be reported using a popup or something like that.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">data1</td><td>0</td></tr>
<tr><td class="paramname">data2</td><td>0</td></tr>
<tr><td class="paramname">data2</td><td>Info string</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 </dd></dl>
</div>
</div>
<a class="anchor" id="aa124fce3009b0cf018f49b69b76bce55"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define MR_EVENT_WARNING&#160;&#160;&#160;300</td>
</tr>
</table>
</div><div class="memdoc">
<p>The user should write an warning string to the log. </p>
<p>Passed to the callback given to <a class="el" href="structmrmailbox__t.html#a32825e3e0a1b16679580704a4b43db1a" title="Create a new mailbox object. ">mrmailbox_new()</a>. This event should not be reported using a popup or something like that.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">data1</td><td>0</td></tr>
<tr><td class="paramname">data2</td><td>Warning string</td></tr>
</table>
</dd>
</dl>
@ -247,135 +227,27 @@ Macros</h2></td></tr>
</div>
</div>
<a class="anchor" id="a465a35db3742af9f1a3e39b2ede585da"></a>
<a class="anchor" id="a17eaeb107cbab46c0d9271d0b5560fc8"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define MR_EVENT_GET_QUANTITY_STRING&#160;&#160;&#160;2092</td>
<td class="memname">#define MR_EVENT_MSGS_CHANGED&#160;&#160;&#160;2000</td>
</tr>
</table>
</div><div class="memdoc">
<p>Requeste a localized quantitiy string from the frontend. </p>
<p>Quantitiy strings may have eg. different plural forms and usually also include the count itself to the string. Typical strings in this form are "1 Message" vs. "2 Messages".</p>
<p>Messages or chats changed. </p>
<p>One or more messages or chats changed for various reasons in the database:</p><ul>
<li>Messages send, received or removed</li>
<li>A message could not be sent (see <a class="el" href="structmrmsg__t.html#a1f411e4be17fb5fe408a1aa74cba90a5" title="Get the state of a message. ">mrmsg_get_state()</a>/MR_STATE_OUT_ERROR)</li>
<li>Chats created, deleted or archived</li>
<li>A draft has been set</li>
</ul>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">data1</td><td>ID of the string to request, one of the MR_STR_* constants as defined in <a class="el" href="mrstock_8h_source.html">mrstock.h</a></td></tr>
<tr><td class="paramname">data2</td><td>The count. The frontend may retrurn different strings on this value and normally also includes the value itself to the string.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Null-terminated UTF-8 string. CAVE: The string will be free()'d by the core, so make sure it is allocated using malloc() or a compatible function. If you cannot provide the requested string, just return 0; the core will use a default string then. </dd></dl>
</div>
</div>
<a class="anchor" id="aaf5dbdab58ffcf836d65cd91283b701a"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define MR_EVENT_GET_STRING&#160;&#160;&#160;2091</td>
</tr>
</table>
</div><div class="memdoc">
<p>Requeste a localized string from the frontend. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">data1</td><td>ID of the string to request, one of the MR_STR_* constants as defined in <a class="el" href="mrstock_8h_source.html">mrstock.h</a></td></tr>
<tr><td class="paramname">data2</td><td>0</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Null-terminated UTF-8 string. CAVE: The string will be free()'d by the core, so make sure it is allocated using malloc() or a compatible function. If you cannot provide the requested string, just return 0; the core will use a default string then. </dd></dl>
</div>
</div>
<a class="anchor" id="aba8b1a46a18cd05070b301c757a74ddc"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define MR_EVENT_HTTP_GET&#160;&#160;&#160;2100</td>
</tr>
</table>
</div><div class="memdoc">
<p>Request a HTTP-file from the frontend. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">data1</td><td>URL</td></tr>
<tr><td class="paramname">data2</td><td>0</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The content of the requested file as a null-terminated UTF-8 string. CAVE: The string will be free()'d by the core, so make sure it is allocated using malloc() or a compatible function. If you cannot provide the content, just return 0. </dd></dl>
</div>
</div>
<a class="anchor" id="a10211bf20ad64f8f6d635120ca64f374"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define MR_EVENT_IMEX_ENDED&#160;&#160;&#160;2050</td>
</tr>
</table>
</div><div class="memdoc">
<p>Import/export done. </p>
<p>You'll get this event from a call to <a class="el" href="structmrmailbox__t.html#a5de7b87b8c95733619cc4051b3508973" title="Import/export things. ">mrmailbox_imex()</a>. As we want to get rid of the threads in the core, this event may be deleted.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">data1</td><td>0:failed, 1=success</td></tr>
<tr><td class="paramname">data2</td><td>0</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 </dd></dl>
</div>
</div>
<a class="anchor" id="aeb3ce82a01722f902b02c8e62cf301ab"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define MR_EVENT_IMEX_FILE_WRITTEN&#160;&#160;&#160;2052</td>
</tr>
</table>
</div><div class="memdoc">
<p>A file has been exported. </p>
<p>A file has been written by <a class="el" href="structmrmailbox__t.html#a5de7b87b8c95733619cc4051b3508973" title="Import/export things. ">mrmailbox_imex()</a>. This event may be send multiple times by a single call to <a class="el" href="structmrmailbox__t.html#a5de7b87b8c95733619cc4051b3508973" title="Import/export things. ">mrmailbox_imex()</a>; if the export is done, <a class="el" href="mrevent_8h.html#a10211bf20ad64f8f6d635120ca64f374" title="Import/export done. ">MR_EVENT_IMEX_ENDED</a> is sent.</p>
<p>A typical purpose for a handler of this event may be to make the file public to some system services.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">data1</td><td>File name</td></tr>
<tr><td class="paramname">data2</td><td>0</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 </dd></dl>
</div>
</div>
<a class="anchor" id="af046556dbd33f0bff86448d62df2b5f7"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define MR_EVENT_IMEX_PROGRESS&#160;&#160;&#160;2051</td>
</tr>
</table>
</div><div class="memdoc">
<p>Inform about the import/export progress started by <a class="el" href="structmrmailbox__t.html#a5de7b87b8c95733619cc4051b3508973" title="Import/export things. ">mrmailbox_imex()</a>. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">data1</td><td>Permille</td></tr>
<tr><td class="paramname">data2</td><td>0</td></tr>
<tr><td class="paramname">data1</td><td>chat_id for single added messages</td></tr>
<tr><td class="paramname">data2</td><td>msg_id for single added messages</td></tr>
</table>
</dd>
</dl>
@ -395,6 +267,7 @@ Macros</h2></td></tr>
<p>There is a fresh message. </p>
<p>Typically, the user will show an notification when receiving this message.</p>
<p>There is no extra <a class="el" href="mrevent_8h.html#a17eaeb107cbab46c0d9271d0b5560fc8" title="Messages or chats changed. ">MR_EVENT_MSGS_CHANGED</a> event send together with this event.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">data1</td><td>chat_id</td></tr>
@ -404,52 +277,6 @@ Macros</h2></td></tr>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 </dd></dl>
</div>
</div>
<a class="anchor" id="abc46d188d1a1a25c92433aa05568e23b"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define MR_EVENT_INFO&#160;&#160;&#160;100</td>
</tr>
</table>
</div><div class="memdoc">
<p>The user may write an informational string to the log. </p>
<p>Passed to the callback given to <a class="el" href="structmrmailbox__t.html#a32825e3e0a1b16679580704a4b43db1a" title="Create a new mailbox object. ">mrmailbox_new()</a>. This event should not be reported using a popup or something like that.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">data1</td><td>0</td></tr>
<tr><td class="paramname">data2</td><td>Info string</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 </dd></dl>
</div>
</div>
<a class="anchor" id="a9cc59f2599dc071ebe686b3dd9eb5ae2"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define MR_EVENT_IS_OFFLINE&#160;&#160;&#160;2081</td>
</tr>
</table>
</div><div class="memdoc">
<p>Ask the frontend about the offline state. </p>
<p>This function may be provided by the frontend. If we already know, that we're offline, eg. there is no need to try to connect and things will speed up.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">data1</td><td>0</td></tr>
<tr><td class="paramname">data2</td><td>0</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0=online, 1=offline </dd></dl>
</div>
</div>
<a class="anchor" id="a10c4a8b6fa9014e5725e3a1daadf301b"></a>
@ -496,27 +323,230 @@ Macros</h2></td></tr>
</div>
</div>
<a class="anchor" id="a17eaeb107cbab46c0d9271d0b5560fc8"></a>
<a class="anchor" id="a5ac741b81ec97628f44795600c0e4d4c"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define MR_EVENT_MSGS_CHANGED&#160;&#160;&#160;2000</td>
<td class="memname">#define MR_EVENT_CHAT_MODIFIED&#160;&#160;&#160;2020</td>
</tr>
</table>
</div><div class="memdoc">
<p>One or more messages changed for some reasons in the database. </p>
<p>Messages may be added or removed.</p>
<p>Group changed. </p>
<p>The name or the image of a chat group was changed or members were added or removed. See <a class="el" href="structmrmailbox__t.html#a8772e9bb55b02299f65ebd8bcc682bb1" title="Set group name. ">mrmailbox_set_chat_name()</a>, <a class="el" href="structmrmailbox__t.html#a08c527170681c949ddd6931a004fdd5f" title="Set group profile image. ">mrmailbox_set_chat_profile_image()</a>, <a class="el" href="structmrmailbox__t.html#a96368620971935c7ac4a0bb324ece2c9" title="Add a member to a group. ">mrmailbox_add_contact_to_chat()</a> and <a class="el" href="structmrmailbox__t.html#a40226d401548b002a62648ea054ac635" title="Remove a member from a group. ">mrmailbox_remove_contact_from_chat()</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">data1</td><td>chat_id for single added messages</td></tr>
<tr><td class="paramname">data2</td><td>msg_id for single added messages</td></tr>
<tr><td class="paramname">data1</td><td>chat_id</td></tr>
<tr><td class="paramname">data2</td><td>0</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 </dd></dl>
</div>
</div>
<a class="anchor" id="ad50b3a76349834631dc26b6c9557be8f"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define MR_EVENT_CONTACTS_CHANGED&#160;&#160;&#160;2030</td>
</tr>
</table>
</div><div class="memdoc">
<p>Contact(s) created, renamed, blocked or deleted. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">data1</td><td>0</td></tr>
<tr><td class="paramname">data2</td><td>0</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 </dd></dl>
</div>
</div>
<a class="anchor" id="abb0881d4c7c887b8f371cedc471846b5"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define MR_EVENT_CONFIGURE_PROGRESS&#160;&#160;&#160;2041</td>
</tr>
</table>
</div><div class="memdoc">
<p>Inform about the configuration progress started by <a class="el" href="structmrmailbox__t.html#a42ca741cc08785585f1dc74d515be5ef" title="Configure and connect a mailbox. ">mrmailbox_configure_and_connect()</a>. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">data1</td><td>Permille</td></tr>
<tr><td class="paramname">data2</td><td>0</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 </dd></dl>
</div>
</div>
<a class="anchor" id="a10211bf20ad64f8f6d635120ca64f374"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define MR_EVENT_IMEX_ENDED&#160;&#160;&#160;2050</td>
</tr>
</table>
</div><div class="memdoc">
<p>Import/export done. </p>
<p>You'll get this event from a call to <a class="el" href="structmrmailbox__t.html#a5de7b87b8c95733619cc4051b3508973" title="Import/export things. ">mrmailbox_imex()</a>. As we want to get rid of the threads in the core, this event may be deleted.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">data1</td><td>0:failed, 1=success</td></tr>
<tr><td class="paramname">data2</td><td>0</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 </dd></dl>
</div>
</div>
<a class="anchor" id="af046556dbd33f0bff86448d62df2b5f7"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define MR_EVENT_IMEX_PROGRESS&#160;&#160;&#160;2051</td>
</tr>
</table>
</div><div class="memdoc">
<p>Inform about the import/export progress started by <a class="el" href="structmrmailbox__t.html#a5de7b87b8c95733619cc4051b3508973" title="Import/export things. ">mrmailbox_imex()</a>. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">data1</td><td>Permille</td></tr>
<tr><td class="paramname">data2</td><td>0</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 </dd></dl>
</div>
</div>
<a class="anchor" id="aeb3ce82a01722f902b02c8e62cf301ab"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define MR_EVENT_IMEX_FILE_WRITTEN&#160;&#160;&#160;2052</td>
</tr>
</table>
</div><div class="memdoc">
<p>A file has been exported. </p>
<p>A file has been written by <a class="el" href="structmrmailbox__t.html#a5de7b87b8c95733619cc4051b3508973" title="Import/export things. ">mrmailbox_imex()</a>. This event may be send multiple times by a single call to <a class="el" href="structmrmailbox__t.html#a5de7b87b8c95733619cc4051b3508973" title="Import/export things. ">mrmailbox_imex()</a>; if the export is done, <a class="el" href="mrevent_8h.html#a10211bf20ad64f8f6d635120ca64f374" title="Import/export done. ">MR_EVENT_IMEX_ENDED</a> is sent.</p>
<p>A typical purpose for a handler of this event may be to make the file public to some system services.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">data1</td><td>File name</td></tr>
<tr><td class="paramname">data2</td><td>0</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 </dd></dl>
</div>
</div>
<a class="anchor" id="a9cc59f2599dc071ebe686b3dd9eb5ae2"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define MR_EVENT_IS_OFFLINE&#160;&#160;&#160;2081</td>
</tr>
</table>
</div><div class="memdoc">
<p>Ask the frontend about the offline state. </p>
<p>This function may be provided by the frontend. If we already know, that we're offline, eg. there is no need to try to connect and things will speed up.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">data1</td><td>0</td></tr>
<tr><td class="paramname">data2</td><td>0</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0=online, 1=offline </dd></dl>
</div>
</div>
<a class="anchor" id="aaf5dbdab58ffcf836d65cd91283b701a"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define MR_EVENT_GET_STRING&#160;&#160;&#160;2091</td>
</tr>
</table>
</div><div class="memdoc">
<p>Requeste a localized string from the frontend. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">data1</td><td>ID of the string to request, one of the MR_STR_* constants as defined in <a class="el" href="mrstock_8h_source.html">mrstock.h</a></td></tr>
<tr><td class="paramname">data2</td><td>0</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Null-terminated UTF-8 string. CAVE: The string will be free()'d by the core, so make sure it is allocated using malloc() or a compatible function. If you cannot provide the requested string, just return 0; the core will use a default string then. </dd></dl>
</div>
</div>
<a class="anchor" id="a465a35db3742af9f1a3e39b2ede585da"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define MR_EVENT_GET_QUANTITY_STRING&#160;&#160;&#160;2092</td>
</tr>
</table>
</div><div class="memdoc">
<p>Requeste a localized quantitiy string from the frontend. </p>
<p>Quantitiy strings may have eg. different plural forms and usually also include the count itself to the string. Typical strings in this form are "1 Message" vs. "2 Messages".</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">data1</td><td>ID of the string to request, one of the MR_STR_* constants as defined in <a class="el" href="mrstock_8h_source.html">mrstock.h</a></td></tr>
<tr><td class="paramname">data2</td><td>The count. The frontend may retrurn different strings on this value and normally also includes the value itself to the string.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Null-terminated UTF-8 string. CAVE: The string will be free()'d by the core, so make sure it is allocated using malloc() or a compatible function. If you cannot provide the requested string, just return 0; the core will use a default string then. </dd></dl>
</div>
</div>
<a class="anchor" id="aba8b1a46a18cd05070b301c757a74ddc"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define MR_EVENT_HTTP_GET&#160;&#160;&#160;2100</td>
</tr>
</table>
</div><div class="memdoc">
<p>Request a HTTP-file from the frontend. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">data1</td><td>URL</td></tr>
<tr><td class="paramname">data2</td><td>0</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The content of the requested file as a null-terminated UTF-8 string. CAVE: The string will be free()'d by the core, so make sure it is allocated using malloc() or a compatible function. If you cannot provide the content, just return 0. </dd></dl>
</div>
</div>
<a class="anchor" id="a8312b0e8f1e7422300a5502d86e0db01"></a>
@ -540,29 +570,6 @@ Macros</h2></td></tr>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 </dd></dl>
</div>
</div>
<a class="anchor" id="aa124fce3009b0cf018f49b69b76bce55"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define MR_EVENT_WARNING&#160;&#160;&#160;300</td>
</tr>
</table>
</div><div class="memdoc">
<p>The user should write an warning string to the log. </p>
<p>Passed to the callback given to <a class="el" href="structmrmailbox__t.html#a32825e3e0a1b16679580704a4b43db1a" title="Create a new mailbox object. ">mrmailbox_new()</a>. This event should not be reported using a popup or something like that.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">data1</td><td>0</td></tr>
<tr><td class="paramname">data2</td><td>Warning string</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 </dd></dl>
</div>
</div>
</div><!-- contents -->