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/structmrmsg__t.html
2017-11-14 11:59:11 +01:00

546 lines
30 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-Library: mrmsg_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-Library
</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-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="structmrmsg__t-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">mrmsg_t Struct Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>An object representing a single message in memory.
<a href="structmrmsg__t.html#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="mrmsg_8h_source.html">mrmsg.h</a>&gt;</code></p>
<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:a80f470eb34af414ff28e7d3b3c715b48"><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="structmrmsg__t.html#a80f470eb34af414ff28e7d3b3c715b48">mrmsg_new</a> ()</td></tr>
<tr class="memdesc:a80f470eb34af414ff28e7d3b3c715b48"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create new message object. <a href="#a80f470eb34af414ff28e7d3b3c715b48">More...</a><br /></td></tr>
<tr class="separator:a80f470eb34af414ff28e7d3b3c715b48"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa33212e41efff643aa7290753f3d9b02"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmsg__t.html#aa33212e41efff643aa7290753f3d9b02">mrmsg_unref</a> (<a class="el" href="structmrmsg__t.html">mrmsg_t</a> *msg)</td></tr>
<tr class="memdesc:aa33212e41efff643aa7290753f3d9b02"><td class="mdescLeft">&#160;</td><td class="mdescRight">Free an <a class="el" href="structmrmsg__t.html" title="An object representing a single message in memory. ">mrmsg_t</a> object created eg. <a href="#aa33212e41efff643aa7290753f3d9b02">More...</a><br /></td></tr>
<tr class="separator:aa33212e41efff643aa7290753f3d9b02"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a57d94b55fc918b27874b9194d6c35388"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmsg__t.html#a57d94b55fc918b27874b9194d6c35388">mrmsg_empty</a> (<a class="el" href="structmrmsg__t.html">mrmsg_t</a> *msg)</td></tr>
<tr class="memdesc:a57d94b55fc918b27874b9194d6c35388"><td class="mdescLeft">&#160;</td><td class="mdescRight">Empty a message object. <a href="#a57d94b55fc918b27874b9194d6c35388">More...</a><br /></td></tr>
<tr class="separator:a57d94b55fc918b27874b9194d6c35388"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae940aa79a261e1a427b12baefbee2d23"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmsg__t.html#ae940aa79a261e1a427b12baefbee2d23">mrmsg_set_text</a> (<a class="el" href="structmrmsg__t.html">mrmsg_t</a> *msg, const char *text)</td></tr>
<tr class="memdesc:ae940aa79a261e1a427b12baefbee2d23"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the text of a message object. <a href="#ae940aa79a261e1a427b12baefbee2d23">More...</a><br /></td></tr>
<tr class="separator:ae940aa79a261e1a427b12baefbee2d23"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afc3d94448ada0ad7142cf168cab1462e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structmrpoortext__t.html">mrpoortext_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmsg__t.html#afc3d94448ada0ad7142cf168cab1462e">mrmsg_get_summary</a> (<a class="el" href="structmrmsg__t.html">mrmsg_t</a> *msg, <a class="el" href="structmrchat__t.html">mrchat_t</a> *chat)</td></tr>
<tr class="memdesc:afc3d94448ada0ad7142cf168cab1462e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a summary for a message. <a href="#afc3d94448ada0ad7142cf168cab1462e">More...</a><br /></td></tr>
<tr class="separator:afc3d94448ada0ad7142cf168cab1462e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9980da92916e42081f2f39ccc72c1696"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmsg__t.html#a9980da92916e42081f2f39ccc72c1696">mrmsg_show_padlock</a> (<a class="el" href="structmrmsg__t.html">mrmsg_t</a> *msg)</td></tr>
<tr class="memdesc:a9980da92916e42081f2f39ccc72c1696"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check if a padlock should be shown beside the message. <a href="#a9980da92916e42081f2f39ccc72c1696">More...</a><br /></td></tr>
<tr class="separator:a9980da92916e42081f2f39ccc72c1696"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8c8c1f342f01439ae40c5cf37532387e"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmsg__t.html#a8c8c1f342f01439ae40c5cf37532387e">mrmsg_get_summarytext</a> (<a class="el" href="structmrmsg__t.html">mrmsg_t</a> *msg, int approx_characters)</td></tr>
<tr class="memdesc:a8c8c1f342f01439ae40c5cf37532387e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a message summary as a single line of text. <a href="#a8c8c1f342f01439ae40c5cf37532387e">More...</a><br /></td></tr>
<tr class="separator:a8c8c1f342f01439ae40c5cf37532387e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad87b7df007489b3a47c3fde79978a58a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structmrpoortext__t.html">mrpoortext_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmsg__t.html#ad87b7df007489b3a47c3fde79978a58a">mrmsg_get_mediainfo</a> (<a class="el" href="structmrmsg__t.html">mrmsg_t</a> *msg)</td></tr>
<tr class="memdesc:ad87b7df007489b3a47c3fde79978a58a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get real author and title. <a href="#ad87b7df007489b3a47c3fde79978a58a">More...</a><br /></td></tr>
<tr class="separator:ad87b7df007489b3a47c3fde79978a58a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0bc3ce5f2ef0065547e4aee0143d22ef"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0bc3ce5f2ef0065547e4aee0143d22ef"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmsg__t.html#a0bc3ce5f2ef0065547e4aee0143d22ef">mrmsg_save_param_to_disk</a> (<a class="el" href="structmrmsg__t.html">mrmsg_t</a> *msg)</td></tr>
<tr class="memdesc:a0bc3ce5f2ef0065547e4aee0143d22ef"><td class="mdescLeft">&#160;</td><td class="mdescRight">can be used to add some additional, persistent information to a messages record. <br /></td></tr>
<tr class="separator:a0bc3ce5f2ef0065547e4aee0143d22ef"><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:a793898c8da24c717dc2bb1d91faac801"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmsg__t.html#a793898c8da24c717dc2bb1d91faac801">m_id</a></td></tr>
<tr class="memdesc:a793898c8da24c717dc2bb1d91faac801"><td class="mdescLeft">&#160;</td><td class="mdescRight">Message ID. <a href="#a793898c8da24c717dc2bb1d91faac801">More...</a><br /></td></tr>
<tr class="separator:a793898c8da24c717dc2bb1d91faac801"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a299981cb89b25ebaaedf7a8486a86ee6"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmsg__t.html#a299981cb89b25ebaaedf7a8486a86ee6">m_from_id</a></td></tr>
<tr class="memdesc:a299981cb89b25ebaaedf7a8486a86ee6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Contact ID of the sender. <a href="#a299981cb89b25ebaaedf7a8486a86ee6">More...</a><br /></td></tr>
<tr class="separator:a299981cb89b25ebaaedf7a8486a86ee6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad549fc02587ba284fda2bbecd162b16a"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmsg__t.html#ad549fc02587ba284fda2bbecd162b16a">m_to_id</a></td></tr>
<tr class="memdesc:ad549fc02587ba284fda2bbecd162b16a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Contact ID of the receiver, if appropriate. <a href="#ad549fc02587ba284fda2bbecd162b16a">More...</a><br /></td></tr>
<tr class="separator:ad549fc02587ba284fda2bbecd162b16a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac19bdc40e452c8997dd58474a7be6880"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmsg__t.html#ac19bdc40e452c8997dd58474a7be6880">m_chat_id</a></td></tr>
<tr class="memdesc:ac19bdc40e452c8997dd58474a7be6880"><td class="mdescLeft">&#160;</td><td class="mdescRight">Chat ID the message belongs to. <a href="#ac19bdc40e452c8997dd58474a7be6880">More...</a><br /></td></tr>
<tr class="separator:ac19bdc40e452c8997dd58474a7be6880"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aba09cb77cdabd1e2b2e6262d25388801"><td class="memItemLeft" align="right" valign="top">time_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmsg__t.html#aba09cb77cdabd1e2b2e6262d25388801">m_timestamp</a></td></tr>
<tr class="memdesc:aba09cb77cdabd1e2b2e6262d25388801"><td class="mdescLeft">&#160;</td><td class="mdescRight">Unix time the message was sended or received. <a href="#aba09cb77cdabd1e2b2e6262d25388801">More...</a><br /></td></tr>
<tr class="separator:aba09cb77cdabd1e2b2e6262d25388801"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3896e269c90cbf0f563ab0848fb44c65"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmsg__t.html#a3896e269c90cbf0f563ab0848fb44c65">m_type</a></td></tr>
<tr class="memdesc:a3896e269c90cbf0f563ab0848fb44c65"><td class="mdescLeft">&#160;</td><td class="mdescRight">Message type as one of the MR_MSG_* contstants. <a href="#a3896e269c90cbf0f563ab0848fb44c65">More...</a><br /></td></tr>
<tr class="separator:a3896e269c90cbf0f563ab0848fb44c65"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aca59d28054d3e15b4fe6ca74073d91f4"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmsg__t.html#aca59d28054d3e15b4fe6ca74073d91f4">m_state</a></td></tr>
<tr class="memdesc:aca59d28054d3e15b4fe6ca74073d91f4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Message state as one of the MR_MSG_STATE_* contstants. <a href="#aca59d28054d3e15b4fe6ca74073d91f4">More...</a><br /></td></tr>
<tr class="separator:aca59d28054d3e15b4fe6ca74073d91f4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae54dcd4036371597d7f8bbd75303527a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae54dcd4036371597d7f8bbd75303527a"></a>
char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmsg__t.html#ae54dcd4036371597d7f8bbd75303527a">m_text</a></td></tr>
<tr class="memdesc:ae54dcd4036371597d7f8bbd75303527a"><td class="mdescLeft">&#160;</td><td class="mdescRight">message text or NULL if unset <br /></td></tr>
<tr class="separator:ae54dcd4036371597d7f8bbd75303527a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2c31ec5b23e35fbe3ae3896eece09453"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structmrparam__t.html">mrparam_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmsg__t.html#a2c31ec5b23e35fbe3ae3896eece09453">m_param</a></td></tr>
<tr class="memdesc:a2c31ec5b23e35fbe3ae3896eece09453"><td class="mdescLeft">&#160;</td><td class="mdescRight">MRP_FILE, MRP_WIDTH, MRP_HEIGHT etc. <a href="#a2c31ec5b23e35fbe3ae3896eece09453">More...</a><br /></td></tr>
<tr class="separator:a2c31ec5b23e35fbe3ae3896eece09453"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0570bbfc3add48dafb0ae70390b47adb"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmsg__t.html#a0570bbfc3add48dafb0ae70390b47adb">m_starred</a></td></tr>
<tr class="memdesc:a0570bbfc3add48dafb0ae70390b47adb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Starred-state of the message. <a href="#a0570bbfc3add48dafb0ae70390b47adb">More...</a><br /></td></tr>
<tr class="separator:a0570bbfc3add48dafb0ae70390b47adb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa4fbc319d61c755ce929e658ad75b21e"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrmsg__t.html#aa4fbc319d61c755ce929e658ad75b21e">m_is_msgrmsg</a></td></tr>
<tr class="memdesc:aa4fbc319d61c755ce929e658ad75b21e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set to 1 if the message was sent by another messenger. <a href="#aa4fbc319d61c755ce929e658ad75b21e">More...</a><br /></td></tr>
<tr class="separator:aa4fbc319d61c755ce929e658ad75b21e"><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 message in memory. </p>
<p>The message object is not updated. If you want an update, you have to recreate the object. </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a57d94b55fc918b27874b9194d6c35388"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void mrmsg_empty </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structmrmsg__t.html">mrmsg_t</a> *&#160;</td>
<td class="paramname"><em>msg</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Empty a message object. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">msg</td><td>The message object to empty.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None. </dd></dl>
</div>
</div>
<a class="anchor" id="ad87b7df007489b3a47c3fde79978a58a"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="structmrpoortext__t.html">mrpoortext_t</a> * mrmsg_get_mediainfo </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structmrmsg__t.html">mrmsg_t</a> *&#160;</td>
<td class="paramname"><em>msg</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Get real author and title. </p>
<p>(as return.text1, this is not always the sender, NULL if unknown) and title (return.text2, NULL if unknown) of a message.</p>
<p>For voice messages, the author the sender and the trackname is the sending time For music messages, we read the information from the filename We do not read ID3 and such at this stage, the needed libraries may be buggy and the whole stuff is way to complicated. However, this is not a great disadvantage, as the sender usually sets the filename in a way we expect it - if not, we simply print the whole filename as we do it for documents. All fine in any case :-)</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">msg</td><td>the message object</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>poortext object that must be unref'd using <a class="el" href="structmrpoortext__t.html#a89c28735bfd718051ffc6b742f9c10ed" title="Frees a mrpoortext_t object created eg. ">mrpoortext_unref()</a> when no longer used. </dd></dl>
</div>
</div>
<a class="anchor" id="afc3d94448ada0ad7142cf168cab1462e"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="structmrpoortext__t.html">mrpoortext_t</a> * mrmsg_get_summary </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structmrmsg__t.html">mrmsg_t</a> *&#160;</td>
<td class="paramname"><em>msg</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="structmrchat__t.html">mrchat_t</a> *&#160;</td>
<td class="paramname"><em>chat</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Get a summary for a message. </p>
<p>The last parameter can be set to speed up things if the chat object is already available; if not, it is faster to pass NULL here. The result must be freed using <a class="el" href="structmrpoortext__t.html#a89c28735bfd718051ffc6b742f9c10ed" title="Frees a mrpoortext_t object created eg. ">mrpoortext_unref()</a>. Typically used to display a search result.</p>
<dl class="section return"><dt>Returns</dt><dd>The returned summary is similar to <a class="el" href="structmrchatlist__t.html#ae7670d62ab7fc83aff18f299f26853d8" title="Get a summary for a chatlist index. ">mrchatlist_get_summary()</a>, however, without "draft", "no messages" and so on. </dd></dl>
</div>
</div>
<a class="anchor" id="a8c8c1f342f01439ae40c5cf37532387e"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">char * mrmsg_get_summarytext </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structmrmsg__t.html">mrmsg_t</a> *&#160;</td>
<td class="paramname"><em>msg</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>approx_characters</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Get a message summary as a single line of text. </p>
<p>Typically used for notifications. The returned value must be free()'d. </p>
</div>
</div>
<a class="anchor" id="a80f470eb34af414ff28e7d3b3c715b48"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="structmrmsg__t.html">mrmsg_t</a> * mrmsg_new </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Create new message object. </p>
<p>Message objects are needed eg. for sending messages using <a class="el" href="structmrmailbox__t.html#a88ef3066cec30fe26f61f273b233d90c" title="save message in database and send it, the given message object is not unref&#39;d by the function but som...">mrmailbox_send_msg()</a>. Moreover, they are returned eg. from <a class="el" href="structmrmailbox__t.html#a9ef144244e7d86ba82ce3257abf14f13" title="Get a single message object of the type mrmsg_t. ">mrmailbox_get_msg()</a>, set up with the current state of a message. The message object is not updated; to achieve this, you have to recreate it.</p>
<dl class="section return"><dt>Returns</dt><dd>The created message object. </dd></dl>
</div>
</div>
<a class="anchor" id="ae940aa79a261e1a427b12baefbee2d23"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void mrmsg_set_text </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structmrmsg__t.html">mrmsg_t</a> *&#160;</td>
<td class="paramname"><em>msg</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>text</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set the text of a message object. </p>
<p>The text is <em>not</em> modified in the database, this function is only a helper to set up a message object to be sent afterwards. The type of the message object is not changed implicitly to MR_MSG_TEXT when using this function. Previously set texts are free()'d.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">msg</td><td>Message to set the text for.</td></tr>
<tr><td class="paramname">text</td><td>Text to set. The function creates a copy of the given text so that it can be free()'d just after this function is called.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None. </dd></dl>
</div>
</div>
<a class="anchor" id="a9980da92916e42081f2f39ccc72c1696"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int mrmsg_show_padlock </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structmrmsg__t.html">mrmsg_t</a> *&#160;</td>
<td class="paramname"><em>msg</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Check if a padlock should be shown beside the message. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">msg</td><td>The message object.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>1=padlock should be shown beside message, 0=do not show a padlock beside the message. </dd></dl>
</div>
</div>
<a class="anchor" id="aa33212e41efff643aa7290753f3d9b02"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void mrmsg_unref </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structmrmsg__t.html">mrmsg_t</a> *&#160;</td>
<td class="paramname"><em>msg</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Free an <a class="el" href="structmrmsg__t.html" title="An object representing a single message in memory. ">mrmsg_t</a> object created eg. </p>
<p>by <a class="el" href="structmrmsg__t.html#a80f470eb34af414ff28e7d3b3c715b48" title="Create new message object. ">mrmsg_new()</a> or <a class="el" href="structmrmailbox__t.html#a9ef144244e7d86ba82ce3257abf14f13" title="Get a single message object of the type mrmsg_t. ">mrmailbox_get_msg()</a>. This also free()s all strings; so if you set up the object yourself, make sure to use strdup()!</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">msg</td><td>The message object to free. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a class="anchor" id="ac19bdc40e452c8997dd58474a7be6880"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint32_t mrmsg_t::m_chat_id</td>
</tr>
</table>
</div><div class="memdoc">
<p>Chat ID the message belongs to. </p>
<p>0=unset, 1=unknwon sender .. &gt;9=real chats </p>
</div>
</div>
<a class="anchor" id="a299981cb89b25ebaaedf7a8486a86ee6"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint32_t mrmsg_t::m_from_id</td>
</tr>
</table>
</div><div class="memdoc">
<p>Contact ID of the sender. </p>
<p>0=unset, 1=self .. &gt;9=real contacts </p>
</div>
</div>
<a class="anchor" id="a793898c8da24c717dc2bb1d91faac801"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint32_t mrmsg_t::m_id</td>
</tr>
</table>
</div><div class="memdoc">
<p>Message ID. </p>
</div>
</div>
<a class="anchor" id="aa4fbc319d61c755ce929e658ad75b21e"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int mrmsg_t::m_is_msgrmsg</td>
</tr>
</table>
</div><div class="memdoc">
<p>Set to 1 if the message was sent by another messenger. </p>
<p>0 otherwise. </p>
</div>
</div>
<a class="anchor" id="a2c31ec5b23e35fbe3ae3896eece09453"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="structmrparam__t.html">mrparam_t</a>* mrmsg_t::m_param</td>
</tr>
</table>
</div><div class="memdoc">
<p>MRP_FILE, MRP_WIDTH, MRP_HEIGHT etc. </p>
<p>depends on the type, != NULL </p>
</div>
</div>
<a class="anchor" id="a0570bbfc3add48dafb0ae70390b47adb"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int mrmsg_t::m_starred</td>
</tr>
</table>
</div><div class="memdoc">
<p>Starred-state of the message. </p>
<p>0=no, 1=yes. </p>
</div>
</div>
<a class="anchor" id="aca59d28054d3e15b4fe6ca74073d91f4"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int mrmsg_t::m_state</td>
</tr>
</table>
</div><div class="memdoc">
<p>Message state as one of the MR_MSG_STATE_* contstants. </p>
</div>
</div>
<a class="anchor" id="aba09cb77cdabd1e2b2e6262d25388801"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">time_t mrmsg_t::m_timestamp</td>
</tr>
</table>
</div><div class="memdoc">
<p>Unix time the message was sended or received. </p>
</div>
</div>
<a class="anchor" id="ad549fc02587ba284fda2bbecd162b16a"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint32_t mrmsg_t::m_to_id</td>
</tr>
</table>
</div><div class="memdoc">
<p>Contact ID of the receiver, if appropriate. </p>
<p>0=unset, 1=self .. &gt;9=real contacts </p>
</div>
</div>
<a class="anchor" id="a3896e269c90cbf0f563ab0848fb44c65"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int mrmsg_t::m_type</td>
</tr>
</table>
</div><div class="memdoc">
<p>Message type as one of the MR_MSG_* contstants. </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="mrmsg_8h_source.html">mrmsg.h</a></li>
<li>/home/bpetersen/projects/deltachat-core/src/mrmsg.c</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Tue Nov 14 2017 11:55:36 for Delta Chat Core C-Library 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>