mirror of
https://github.com/deltachat/deltachat-core.git
synced 2025-10-04 18:29:19 +02:00
575 lines
36 KiB
HTML
575 lines
36 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: 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-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 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 List</span></a></li>
|
|
<li><a href="functions.html"><span>Class 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> |
|
|
<a href="#pub-attribs">Public Attributes</a> |
|
|
<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 <<a class="el" href="mrmsg_8h_source.html">mrmsg.h</a>></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> * </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"> </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"> </td></tr>
|
|
<tr class="memitem:aa33212e41efff643aa7290753f3d9b02"><td class="memItemLeft" align="right" valign="top">void </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"> </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"> </td></tr>
|
|
<tr class="memitem:a57d94b55fc918b27874b9194d6c35388"><td class="memItemLeft" align="right" valign="top">void </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"> </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"> </td></tr>
|
|
<tr class="memitem:ae940aa79a261e1a427b12baefbee2d23"><td class="memItemLeft" align="right" valign="top">void </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"> </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"> </td></tr>
|
|
<tr class="memitem:afc3d94448ada0ad7142cf168cab1462e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structmrpoortext__t.html">mrpoortext_t</a> * </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"> </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"> </td></tr>
|
|
<tr class="memitem:a9980da92916e42081f2f39ccc72c1696"><td class="memItemLeft" align="right" valign="top">int </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"> </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"> </td></tr>
|
|
<tr class="memitem:a8c8c1f342f01439ae40c5cf37532387e"><td class="memItemLeft" align="right" valign="top">char * </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"> </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"> </td></tr>
|
|
<tr class="memitem:ad87b7df007489b3a47c3fde79978a58a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structmrpoortext__t.html">mrpoortext_t</a> * </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"> </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"> </td></tr>
|
|
<tr class="memitem:a0bc3ce5f2ef0065547e4aee0143d22ef"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0bc3ce5f2ef0065547e4aee0143d22ef"></a>
|
|
void </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"> </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"> </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 </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"> </td><td class="mdescRight">Message ID. <a href="#a793898c8da24c717dc2bb1d91faac801">More...</a><br /></td></tr>
|
|
<tr class="separator:a793898c8da24c717dc2bb1d91faac801"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a299981cb89b25ebaaedf7a8486a86ee6"><td class="memItemLeft" align="right" valign="top">uint32_t </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"> </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"> </td></tr>
|
|
<tr class="memitem:ad549fc02587ba284fda2bbecd162b16a"><td class="memItemLeft" align="right" valign="top">uint32_t </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"> </td><td class="mdescRight">Contact ID of the recipient. <a href="#ad549fc02587ba284fda2bbecd162b16a">More...</a><br /></td></tr>
|
|
<tr class="separator:ad549fc02587ba284fda2bbecd162b16a"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ac19bdc40e452c8997dd58474a7be6880"><td class="memItemLeft" align="right" valign="top">uint32_t </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"> </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"> </td></tr>
|
|
<tr class="memitem:aba09cb77cdabd1e2b2e6262d25388801"><td class="memItemLeft" align="right" valign="top">time_t </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"> </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"> </td></tr>
|
|
<tr class="memitem:a3896e269c90cbf0f563ab0848fb44c65"><td class="memItemLeft" align="right" valign="top">int </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"> </td><td class="mdescRight">Type of the message. <a href="#a3896e269c90cbf0f563ab0848fb44c65">More...</a><br /></td></tr>
|
|
<tr class="separator:a3896e269c90cbf0f563ab0848fb44c65"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:aca59d28054d3e15b4fe6ca74073d91f4"><td class="memItemLeft" align="right" valign="top">int </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"> </td><td class="mdescRight">Message state. <a href="#aca59d28054d3e15b4fe6ca74073d91f4">More...</a><br /></td></tr>
|
|
<tr class="separator:aca59d28054d3e15b4fe6ca74073d91f4"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ae54dcd4036371597d7f8bbd75303527a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae54dcd4036371597d7f8bbd75303527a"></a>
|
|
char * </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"> </td><td class="mdescRight">message text or NULL if unset <br /></td></tr>
|
|
<tr class="separator:ae54dcd4036371597d7f8bbd75303527a"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a2c31ec5b23e35fbe3ae3896eece09453"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structmrparam__t.html">mrparam_t</a> * </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"> </td><td class="mdescRight">Additional paramter for the message. <a href="#a2c31ec5b23e35fbe3ae3896eece09453">More...</a><br /></td></tr>
|
|
<tr class="separator:a2c31ec5b23e35fbe3ae3896eece09453"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a0570bbfc3add48dafb0ae70390b47adb"><td class="memItemLeft" align="right" valign="top">int </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"> </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"> </td></tr>
|
|
<tr class="memitem:aa4fbc319d61c755ce929e658ad75b21e"><td class="memItemLeft" align="right" valign="top">int </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"> </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"> </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> * </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> * </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 poortext object. ">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> * </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> * </td>
|
|
<td class="paramname"><em>chat</em> </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 poortext object. ">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> * </td>
|
|
<td class="paramname"><em>msg</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">int </td>
|
|
<td class="paramname"><em>approx_characters</em> </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'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> * </td>
|
|
<td class="paramname"><em>msg</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const char * </td>
|
|
<td class="paramname"><em>text</em> </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> * </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> * </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 if unset. See <a class="el" href="structmrchat__t.html#a1591431716413350eaffce0b588e4911" title="Chat ID under which the chat is filed in the database. ">mrchat_t::m_id</a> for special IDs. Use <a class="el" href="structmrmailbox__t.html#ad106b9c23b3a559b524a37bb5504e096" title="Get a chat object of type mrchat_t by a chat_id. ">mrmailbox_get_chat()</a> to load details about the chat. </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 if unset. See <a class="el" href="structmrcontact__t.html#ab2ee31297c327e04ed14673adbd49716" title="The contact ID. ">mrcontact_t::m_id</a> for special IDs. Use <a class="el" href="structmrmailbox__t.html#a057660d94350ff98eca72785c6e88962" title="Get a single contact object. ">mrmailbox_get_contact()</a> to load details about this contact. </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>
|
|
<p>Special message IDs:</p>
|
|
<ul>
|
|
<li>MR_MSG_ID_MARKER1 (1) - any user-defined marker, see <a class="el" href="structmrmailbox__t.html#a5d3be6ed21d43cc93f250a1e7faf979b" title="Get all message IDs belonging to a chat. ">mrmailbox_get_chat_msgs()</a></li>
|
|
<li>MR_MSG_ID_DAYMARKER (9) - in a list, the next message is on a new day, useful to show headlines, see <a class="el" href="structmrmailbox__t.html#a5d3be6ed21d43cc93f250a1e7faf979b" title="Get all message IDs belonging to a chat. ">mrmailbox_get_chat_msgs()</a></li>
|
|
</ul>
|
|
<p>Normal message IDs are larger than these special ones. </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>Additional paramter for the message. </p>
|
|
<p>MRP_FILE, MRP_WIDTH, MRP_HEIGHT etc. depends on <a class="el" href="structmrmsg__t.html#a3896e269c90cbf0f563ab0848fb44c65" title="Type of the message. ">m_type</a>. Never a NULL-pointer. </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. </p>
|
|
<p>Incoming message states:</p><ul>
|
|
<li>MR_STATE_IN_FRESH (10) - Incoming <em>fresh</em> message. Fresh messages are not noticed nor seen and are typically shown in notifications. Use <a class="el" href="structmrmailbox__t.html#adbdcde6475db0cfafd8aa127b5bd1bc1" title="Returns the message IDs of all fresh messages of any chat. ">mrmailbox_get_fresh_msgs()</a> to get all fresh messages.</li>
|
|
<li>MR_STATE_IN_NOTICED (13) - Incoming <em>noticed</em> message. Eg. chat opened but message not yet read - noticed messages are not counted as unread but did not marked as read nor resulted in MDNs. Use <a class="el" href="structmrmailbox__t.html#a07cc8fe0cfd900a9449bffc4ca5a7a95" title="Mark all message in a chat as noticed. ">mrmailbox_marknoticed_chat()</a> or <a class="el" href="structmrmailbox__t.html#a7150c575193d43e048689aa264c74c79" title="Mark all messages send by the given contact as noticed. ">mrmailbox_marknoticed_contact()</a> to mark messages as being noticed.</li>
|
|
<li>MR_STATE_IN_SEEN (16) - Incoming message, really <em>seen</em> by the user. Marked as read on IMAP and MDN may be send. Use <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> to mark messages as being seen.</li>
|
|
</ul>
|
|
<p>Outgoing message states:</p><ul>
|
|
<li>MR_STATE_OUT_PENDING (20) - The user has send the "send" button but the message is not yet sent and is pending in some way. Maybe we're offline (no checkmark).</li>
|
|
<li>MR_STATE_OUT_ERROR (24) - <em>Unrecoverable</em> error (<em>recoverable</em> errors result in pending messages)</li>
|
|
<li>MR_STATE_OUT_DELIVERED (26) - Outgoing message successfully delivered to server (one checkmark). Note, that already delivered messages may get into the state MR_STATE_OUT_ERROR if we get such a hint from the server. If a sent message changes to this state, you'll receive the event <a class="el" href="mrevent_8h.html#a10c4a8b6fa9014e5725e3a1daadf301b" title="A single message is send successfully (state changed from MR_STATE_OUT_PENDING to MR_STATE_OUT_DELIVE...">MR_EVENT_MSG_DELIVERED</a>.</li>
|
|
<li>MR_STATE_OUT_MDN_RCVD (28) - Outgoing message read by the recipient (two checkmarks; this requires goodwill on the receiver's side) If a sent message changes to this state, you'll receive the event <a class="el" href="mrevent_8h.html#a080965cf1f3dd138999c56ec30580b58" title="A single message is read by the receiver (state changed from MR_STATE_OUT_DELIVERED to MR_STATE_OUT_M...">MR_EVENT_MSG_READ</a>.</li>
|
|
</ul>
|
|
<p>The state of just created message objects is MR_STATE_UNDEFINED (0). </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>
|
|
<p>0 if unset. </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 recipient. </p>
|
|
<p>0 if unset. See <a class="el" href="structmrcontact__t.html#ab2ee31297c327e04ed14673adbd49716" title="The contact ID. ">mrcontact_t::m_id</a> for special IDs. Use <a class="el" href="structmrmailbox__t.html#a057660d94350ff98eca72785c6e88962" title="Get a single contact object. ">mrmailbox_get_contact()</a> to load details about this contact. </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>Type of the message. </p>
|
|
<ul>
|
|
<li>MR_MSG_TEXT (10)</li>
|
|
<li>MR_MSG_IMAGE (20) - <a class="el" href="structmrmsg__t.html#a2c31ec5b23e35fbe3ae3896eece09453" title="Additional paramter for the message. ">m_param</a> may contain MRP_FILE, MRP_WIDTH, MRP_HEIGHT</li>
|
|
<li>MR_MSG_GIF (21) - <a class="el" href="structmrmsg__t.html#a2c31ec5b23e35fbe3ae3896eece09453" title="Additional paramter for the message. ">m_param</a> may contain MRP_FILE, MRP_WIDTH, MRP_HEIGHT</li>
|
|
<li>MR_MSG_AUDIO (40) - <a class="el" href="structmrmsg__t.html#a2c31ec5b23e35fbe3ae3896eece09453" title="Additional paramter for the message. ">m_param</a> may contain MRP_FILE, MRP_DURATION</li>
|
|
<li>MR_MSG_VOICE (41) - <a class="el" href="structmrmsg__t.html#a2c31ec5b23e35fbe3ae3896eece09453" title="Additional paramter for the message. ">m_param</a> may contain MRP_FILE, MRP_DURATION</li>
|
|
<li>MR_MSG_VIDEO (50) - <a class="el" href="structmrmsg__t.html#a2c31ec5b23e35fbe3ae3896eece09453" title="Additional paramter for the message. ">m_param</a> may contain MRP_FILE, MRP_WIDTH, MRP_HEIGHT, MRP_DURATION</li>
|
|
<li>MR_MSG_FILE (60) - <a class="el" href="structmrmsg__t.html#a2c31ec5b23e35fbe3ae3896eece09453" title="Additional paramter for the message. ">m_param</a> may contain MRP_FILE</li>
|
|
</ul>
|
|
<p>Undefined types are filed under MR_MSG_UNDEFINED (0). </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 by  <a href="http://www.doxygen.org/index.html">
|
|
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
|
</a> 1.8.11
|
|
</small></address>
|
|
</body>
|
|
</html>
|