1
0
Fork 0
mirror of https://github.com/deltachat/deltachat-core.git synced 2025-10-04 02:09:17 +02:00
deltachat-core/docs/html/classmrmsg__t.html
B. Petersen e0234562f3 doxygen
2018-01-08 22:36:30 +01:00

985 lines
60 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 Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="user.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">Delta Chat Core C-API
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class&#160;List</span></a></li>
<li><a href="functions.html"><span>Class&#160;Members</span></a></li>
</ul>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classmrmsg__t-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">mrmsg_t Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>An object representing a single message in memory.
<a href="classmrmsg__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:aa33212e41efff643aa7290753f3d9b02"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmrmsg__t.html#aa33212e41efff643aa7290753f3d9b02">mrmsg_unref</a> (<a class="el" href="classmrmsg__t.html">mrmsg_t</a> *msg)</td></tr>
<tr class="memdesc:aa33212e41efff643aa7290753f3d9b02"><td class="mdescLeft">&#160;</td><td class="mdescRight">Free a message object. <a href="#aa33212e41efff643aa7290753f3d9b02">More...</a><br /></td></tr>
<tr class="separator:aa33212e41efff643aa7290753f3d9b02"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aba03d1355c52426e2915c8d2d35bf13d"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmrmsg__t.html#aba03d1355c52426e2915c8d2d35bf13d">mrmsg_get_id</a> (<a class="el" href="classmrmsg__t.html">mrmsg_t</a> *msg)</td></tr>
<tr class="memdesc:aba03d1355c52426e2915c8d2d35bf13d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the ID of the message. <a href="#aba03d1355c52426e2915c8d2d35bf13d">More...</a><br /></td></tr>
<tr class="separator:aba03d1355c52426e2915c8d2d35bf13d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a31b0a7ba0ac76b79786179916f4f58be"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmrmsg__t.html#a31b0a7ba0ac76b79786179916f4f58be">mrmsg_get_from_id</a> (<a class="el" href="classmrmsg__t.html">mrmsg_t</a> *msg)</td></tr>
<tr class="memdesc:a31b0a7ba0ac76b79786179916f4f58be"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the ID of contact who wrote the message. <a href="#a31b0a7ba0ac76b79786179916f4f58be">More...</a><br /></td></tr>
<tr class="separator:a31b0a7ba0ac76b79786179916f4f58be"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6c5dd1ee3ae07f25c7ae9144832b5a13"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmrmsg__t.html#a6c5dd1ee3ae07f25c7ae9144832b5a13">mrmsg_get_chat_id</a> (<a class="el" href="classmrmsg__t.html">mrmsg_t</a> *msg)</td></tr>
<tr class="memdesc:a6c5dd1ee3ae07f25c7ae9144832b5a13"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the ID of chat the message belongs to. <a href="#a6c5dd1ee3ae07f25c7ae9144832b5a13">More...</a><br /></td></tr>
<tr class="separator:a6c5dd1ee3ae07f25c7ae9144832b5a13"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a705454903b36ded8c3cd43a2044de60a"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmrmsg__t.html#a705454903b36ded8c3cd43a2044de60a">mrmsg_get_type</a> (<a class="el" href="classmrmsg__t.html">mrmsg_t</a> *msg)</td></tr>
<tr class="memdesc:a705454903b36ded8c3cd43a2044de60a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the type of the message. <a href="#a705454903b36ded8c3cd43a2044de60a">More...</a><br /></td></tr>
<tr class="separator:a705454903b36ded8c3cd43a2044de60a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1f411e4be17fb5fe408a1aa74cba90a5"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmrmsg__t.html#a1f411e4be17fb5fe408a1aa74cba90a5">mrmsg_get_state</a> (<a class="el" href="classmrmsg__t.html">mrmsg_t</a> *msg)</td></tr>
<tr class="memdesc:a1f411e4be17fb5fe408a1aa74cba90a5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the state of a message. <a href="#a1f411e4be17fb5fe408a1aa74cba90a5">More...</a><br /></td></tr>
<tr class="separator:a1f411e4be17fb5fe408a1aa74cba90a5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af5bf52ee1adbc55c9c9d4699afee87fb"><td class="memItemLeft" align="right" valign="top">time_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmrmsg__t.html#af5bf52ee1adbc55c9c9d4699afee87fb">mrmsg_get_timestamp</a> (<a class="el" href="classmrmsg__t.html">mrmsg_t</a> *msg)</td></tr>
<tr class="memdesc:af5bf52ee1adbc55c9c9d4699afee87fb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get message time. <a href="#af5bf52ee1adbc55c9c9d4699afee87fb">More...</a><br /></td></tr>
<tr class="separator:af5bf52ee1adbc55c9c9d4699afee87fb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae549e58d9ae2f73ad76bd27636b43982"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmrmsg__t.html#ae549e58d9ae2f73ad76bd27636b43982">mrmsg_get_text</a> (<a class="el" href="classmrmsg__t.html">mrmsg_t</a> *msg)</td></tr>
<tr class="memdesc:ae549e58d9ae2f73ad76bd27636b43982"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the text of the message. <a href="#ae549e58d9ae2f73ad76bd27636b43982">More...</a><br /></td></tr>
<tr class="separator:ae549e58d9ae2f73ad76bd27636b43982"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2544769c77af5447546fcf5fc95c64f7"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmrmsg__t.html#a2544769c77af5447546fcf5fc95c64f7">mrmsg_get_file</a> (<a class="el" href="classmrmsg__t.html">mrmsg_t</a> *msg)</td></tr>
<tr class="memdesc:a2544769c77af5447546fcf5fc95c64f7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Find out full path, file name and extension of the file associated with a message. <a href="#a2544769c77af5447546fcf5fc95c64f7">More...</a><br /></td></tr>
<tr class="separator:a2544769c77af5447546fcf5fc95c64f7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad0dcfc0a1e33d9a88b7381e368d7895a"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmrmsg__t.html#ad0dcfc0a1e33d9a88b7381e368d7895a">mrmsg_get_filename</a> (<a class="el" href="classmrmsg__t.html">mrmsg_t</a> *msg)</td></tr>
<tr class="memdesc:ad0dcfc0a1e33d9a88b7381e368d7895a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get base file name without path. <a href="#ad0dcfc0a1e33d9a88b7381e368d7895a">More...</a><br /></td></tr>
<tr class="separator:ad0dcfc0a1e33d9a88b7381e368d7895a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4afcbb38dd1f37fb5f7b2c6d1f4e9042"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmrmsg__t.html#a4afcbb38dd1f37fb5f7b2c6d1f4e9042">mrmsg_get_filemime</a> (<a class="el" href="classmrmsg__t.html">mrmsg_t</a> *msg)</td></tr>
<tr class="memdesc:a4afcbb38dd1f37fb5f7b2c6d1f4e9042"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get mime type of the file. <a href="#a4afcbb38dd1f37fb5f7b2c6d1f4e9042">More...</a><br /></td></tr>
<tr class="separator:a4afcbb38dd1f37fb5f7b2c6d1f4e9042"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afd11616dcf572662561829c0f48ca713"><td class="memItemLeft" align="right" valign="top">uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmrmsg__t.html#afd11616dcf572662561829c0f48ca713">mrmsg_get_filebytes</a> (<a class="el" href="classmrmsg__t.html">mrmsg_t</a> *msg)</td></tr>
<tr class="memdesc:afd11616dcf572662561829c0f48ca713"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the size of the file. <a href="#afd11616dcf572662561829c0f48ca713">More...</a><br /></td></tr>
<tr class="separator:afd11616dcf572662561829c0f48ca713"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1c6dfee4004fe0e9b9f90720bad73ecb"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classmrlot__t.html">mrlot_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmrmsg__t.html#a1c6dfee4004fe0e9b9f90720bad73ecb">mrmsg_get_mediainfo</a> (<a class="el" href="classmrmsg__t.html">mrmsg_t</a> *msg)</td></tr>
<tr class="memdesc:a1c6dfee4004fe0e9b9f90720bad73ecb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get real author and title. <a href="#a1c6dfee4004fe0e9b9f90720bad73ecb">More...</a><br /></td></tr>
<tr class="separator:a1c6dfee4004fe0e9b9f90720bad73ecb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adfe10086430b562b8df4e45668b51927"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmrmsg__t.html#adfe10086430b562b8df4e45668b51927">mrmsg_get_width</a> (<a class="el" href="classmrmsg__t.html">mrmsg_t</a> *msg)</td></tr>
<tr class="memdesc:adfe10086430b562b8df4e45668b51927"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get width of image or video. <a href="#adfe10086430b562b8df4e45668b51927">More...</a><br /></td></tr>
<tr class="separator:adfe10086430b562b8df4e45668b51927"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8600ed157b44b1089783e66ce7b33353"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmrmsg__t.html#a8600ed157b44b1089783e66ce7b33353">mrmsg_get_height</a> (<a class="el" href="classmrmsg__t.html">mrmsg_t</a> *msg)</td></tr>
<tr class="memdesc:a8600ed157b44b1089783e66ce7b33353"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get height of image or video. <a href="#a8600ed157b44b1089783e66ce7b33353">More...</a><br /></td></tr>
<tr class="separator:a8600ed157b44b1089783e66ce7b33353"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa180c0fd4c9cdd58cc47006022ebc1e0"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmrmsg__t.html#aa180c0fd4c9cdd58cc47006022ebc1e0">mrmsg_get_duration</a> (<a class="el" href="classmrmsg__t.html">mrmsg_t</a> *msg)</td></tr>
<tr class="memdesc:aa180c0fd4c9cdd58cc47006022ebc1e0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get duration of audio or video. <a href="#aa180c0fd4c9cdd58cc47006022ebc1e0">More...</a><br /></td></tr>
<tr class="separator:aa180c0fd4c9cdd58cc47006022ebc1e0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7f1bd3d845bbc5face7636aed8f8afd4"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmrmsg__t.html#a7f1bd3d845bbc5face7636aed8f8afd4">mrmsg_get_showpadlock</a> (<a class="el" href="classmrmsg__t.html">mrmsg_t</a> *msg)</td></tr>
<tr class="memdesc:a7f1bd3d845bbc5face7636aed8f8afd4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check if a padlock should be shown beside the message. <a href="#a7f1bd3d845bbc5face7636aed8f8afd4">More...</a><br /></td></tr>
<tr class="separator:a7f1bd3d845bbc5face7636aed8f8afd4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3c14a8dbd6cc7f90c642223a873312e3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classmrlot__t.html">mrlot_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmrmsg__t.html#a3c14a8dbd6cc7f90c642223a873312e3">mrmsg_get_summary</a> (<a class="el" href="classmrmsg__t.html">mrmsg_t</a> *msg, <a class="el" href="classmrchat__t.html">mrchat_t</a> *chat)</td></tr>
<tr class="memdesc:a3c14a8dbd6cc7f90c642223a873312e3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a summary for a message. <a href="#a3c14a8dbd6cc7f90c642223a873312e3">More...</a><br /></td></tr>
<tr class="separator:a3c14a8dbd6cc7f90c642223a873312e3"><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="classmrmsg__t.html#a8c8c1f342f01439ae40c5cf37532387e">mrmsg_get_summarytext</a> (<a class="el" href="classmrmsg__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:a7714f0f25b2e933dae0898965373b27d"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmrmsg__t.html#a7714f0f25b2e933dae0898965373b27d">mrmsg_is_sent</a> (<a class="el" href="classmrmsg__t.html">mrmsg_t</a> *msg)</td></tr>
<tr class="memdesc:a7714f0f25b2e933dae0898965373b27d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check if a message was sent successfully. <a href="#a7714f0f25b2e933dae0898965373b27d">More...</a><br /></td></tr>
<tr class="separator:a7714f0f25b2e933dae0898965373b27d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af202a7e7527df4681cd3ea24f779848f"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmrmsg__t.html#af202a7e7527df4681cd3ea24f779848f">mrmsg_is_starred</a> (<a class="el" href="classmrmsg__t.html">mrmsg_t</a> *msg)</td></tr>
<tr class="memdesc:af202a7e7527df4681cd3ea24f779848f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check if a message is starred. <a href="#af202a7e7527df4681cd3ea24f779848f">More...</a><br /></td></tr>
<tr class="separator:af202a7e7527df4681cd3ea24f779848f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3256ed8c6a55a6c1a30e0fce33b85421"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmrmsg__t.html#a3256ed8c6a55a6c1a30e0fce33b85421">mrmsg_is_forwarded</a> (<a class="el" href="classmrmsg__t.html">mrmsg_t</a> *msg)</td></tr>
<tr class="memdesc:a3256ed8c6a55a6c1a30e0fce33b85421"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check if the message is a forwarded message. <a href="#a3256ed8c6a55a6c1a30e0fce33b85421">More...</a><br /></td></tr>
<tr class="separator:a3256ed8c6a55a6c1a30e0fce33b85421"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a752209192e3a022d087fe6c647fb3ad9"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmrmsg__t.html#a752209192e3a022d087fe6c647fb3ad9">mrmsg_is_systemcmd</a> (<a class="el" href="classmrmsg__t.html">mrmsg_t</a> *msg)</td></tr>
<tr class="memdesc:a752209192e3a022d087fe6c647fb3ad9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check if the message is a system command. <a href="#a752209192e3a022d087fe6c647fb3ad9">More...</a><br /></td></tr>
<tr class="separator:a752209192e3a022d087fe6c647fb3ad9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab669ae58ca580d2694c6df3c95ddb89a"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmrmsg__t.html#ab669ae58ca580d2694c6df3c95ddb89a">mrmsg_is_setupmessage</a> (<a class="el" href="classmrmsg__t.html">mrmsg_t</a> *msg)</td></tr>
<tr class="memdesc:ab669ae58ca580d2694c6df3c95ddb89a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check if the message is an Autocrypt Setup Message. <a href="#ab669ae58ca580d2694c6df3c95ddb89a">More...</a><br /></td></tr>
<tr class="separator:ab669ae58ca580d2694c6df3c95ddb89a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7ef8629603b2462f890dfbbe304c8f7d"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmrmsg__t.html#a7ef8629603b2462f890dfbbe304c8f7d">mrmsg_get_setupcodebegin</a> (<a class="el" href="classmrmsg__t.html">mrmsg_t</a> *msg)</td></tr>
<tr class="memdesc:a7ef8629603b2462f890dfbbe304c8f7d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the first characters of the setup code. <a href="#a7ef8629603b2462f890dfbbe304c8f7d">More...</a><br /></td></tr>
<tr class="separator:a7ef8629603b2462f890dfbbe304c8f7d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a32d23bac4bf35ed5f8c2cfbb93d636f5"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmrmsg__t.html#a32d23bac4bf35ed5f8c2cfbb93d636f5">mrmsg_is_increation</a> (<a class="el" href="classmrmsg__t.html">mrmsg_t</a> *msg)</td></tr>
<tr class="memdesc:a32d23bac4bf35ed5f8c2cfbb93d636f5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check if a message is still in creation. <a href="#a32d23bac4bf35ed5f8c2cfbb93d636f5">More...</a><br /></td></tr>
<tr class="separator:a32d23bac4bf35ed5f8c2cfbb93d636f5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9e5dc81d4e814284b465ad23abbfb6cb"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmrmsg__t.html#a9e5dc81d4e814284b465ad23abbfb6cb">mrmsg_latefiling_mediasize</a> (<a class="el" href="classmrmsg__t.html">mrmsg_t</a> *msg, int width, int height, int duration)</td></tr>
<tr class="memdesc:a9e5dc81d4e814284b465ad23abbfb6cb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Late filing information to a message. <a href="#a9e5dc81d4e814284b465ad23abbfb6cb">More...</a><br /></td></tr>
<tr class="separator:a9e5dc81d4e814284b465ad23abbfb6cb"><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="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="classmrmsg__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 a message object. </p>
<p>Message objects are created eg. by <a class="el" href="classmrmailbox__t.html#a9ef144244e7d86ba82ce3257abf14f13" title="Get a single message object of the type mrmsg_t. ">mrmailbox_get_msg()</a>.</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>
<dl class="section return"><dt>Returns</dt><dd>None. </dd></dl>
</div>
</div>
<a class="anchor" id="aba03d1355c52426e2915c8d2d35bf13d"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint32_t mrmsg_get_id </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classmrmsg__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 the ID of 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>the ID of the message, 0 on errors. </dd></dl>
</div>
</div>
<a class="anchor" id="a31b0a7ba0ac76b79786179916f4f58be"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint32_t mrmsg_get_from_id </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classmrmsg__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 the ID of contact who wrote the message. </p>
<p>To get details about the contact, pass the returned ID to <a class="el" href="classmrmailbox__t.html#a057660d94350ff98eca72785c6e88962" title="Get a single contact object. ">mrmailbox_get_contact()</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">msg</td><td>The message object.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the ID of the contact who wrote the message, MR_CONTACT_ID_SELF (1) if this is an outgoing message, 0 on errors. </dd></dl>
</div>
</div>
<a class="anchor" id="a6c5dd1ee3ae07f25c7ae9144832b5a13"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint32_t mrmsg_get_chat_id </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classmrmsg__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 the ID of chat the message belongs to. </p>
<p>To get details about the chat, pass the returned ID to <a class="el" href="classmrmailbox__t.html#ad106b9c23b3a559b524a37bb5504e096" title="Get chat object by a chat ID. ">mrmailbox_get_chat()</a>.</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>the ID of the chat the message belongs to, 0 on errors. </dd></dl>
</div>
</div>
<a class="anchor" id="a705454903b36ded8c3cd43a2044de60a"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int mrmsg_get_type </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classmrmsg__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 the type of 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>One of MR_MSG_TEXT (10), MR_MSG_IMAGE (20), MR_MSG_GIF (21), MR_MSG_AUDIO (40), MR_MSG_VOICE (41), MR_MSG_VIDEO (50), MR_MSG_FILE (60) or MR_MSG_UNDEFINED (0) if the type is undefined. </dd></dl>
</div>
</div>
<a class="anchor" id="a1f411e4be17fb5fe408a1aa74cba90a5"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int mrmsg_get_state </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classmrmsg__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 the state of a message. </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="classmrmailbox__t.html#a65215149290bec16b173106269b08e5e" 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="classmrmailbox__t.html#a07cc8fe0cfd900a9449bffc4ca5a7a95" title="Mark all message in a chat as noticed. ">mrmailbox_marknoticed_chat()</a> or <a class="el" href="classmrmailbox__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="classmrmailbox__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 sent 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>If you just want to check if a message is sent or not, please use <a class="el" href="classmrmsg__t.html#a7714f0f25b2e933dae0898965373b27d" title="Check if a message was sent successfully. ">mrmsg_is_sent()</a> which regards all states accordingly.</p>
<p>The state of just created message objects is MR_STATE_UNDEFINED (0). The state is always set by the core-library, users of the library cannot set the state directly, but it is changed implicitly eg. when calling <a class="el" href="classmrmailbox__t.html#a07cc8fe0cfd900a9449bffc4ca5a7a95" title="Mark all message in a chat as noticed. ">mrmailbox_marknoticed_chat()</a> or <a class="el" href="classmrmailbox__t.html#a67281e50b568dc18df710275e0e13f5b" title="Mark a message as seen, updates the IMAP state and sends MDNs. ">mrmailbox_markseen_msgs()</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">msg</td><td>The message object.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The state of the message. </dd></dl>
</div>
</div>
<a class="anchor" id="af5bf52ee1adbc55c9c9d4699afee87fb"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">time_t mrmsg_get_timestamp </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classmrmsg__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 message time. </p>
<p>Unix time the message was sended or received.</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>The time of the message. </dd></dl>
</div>
</div>
<a class="anchor" id="ae549e58d9ae2f73ad76bd27636b43982"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">char * mrmsg_get_text </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classmrmsg__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 the text of the message. </p>
<p>If there is no text associalted with the message, an empty string is returned. NULL is never returned.</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>Message text. The result must be free()'d. Never returns NULL. </dd></dl>
</div>
</div>
<a class="anchor" id="a2544769c77af5447546fcf5fc95c64f7"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">char * mrmsg_get_file </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classmrmsg__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>Find out full path, file name and extension of the file associated with a message. </p>
<p>Typically files are associated with images, videos, audios, documents. Plain text messages do not have a file.</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>Full path, file name and extension of the file associated with the message. If there is no file associated with the message, an emtpy string is returned. NULL is never returned and the returned value must be free()'d. </dd></dl>
</div>
</div>
<a class="anchor" id="ad0dcfc0a1e33d9a88b7381e368d7895a"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">char * mrmsg_get_filename </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classmrmsg__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 base file name without path. </p>
<p>The base file name includes the extension; the path is not returned. To get the full path, use <a class="el" href="classmrmsg__t.html#a2544769c77af5447546fcf5fc95c64f7" title="Find out full path, file name and extension of the file associated with a message. ">mrmsg_get_file()</a>.</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>Base file name plus extension without part. If there is no file associated with the message, an empty string is returned. The returned value must be free()'d. </dd></dl>
</div>
</div>
<a class="anchor" id="a4afcbb38dd1f37fb5f7b2c6d1f4e9042"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">char * mrmsg_get_filemime </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classmrmsg__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 mime type of the file. </p>
<p>If there is not file, an empty string is returned. If there is no associated mime type with the file, the function guesses on; if in doubt, <code>application/octet-stream</code> is returned. NULL is never returned.</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>String containing the mime type. Must be free()'d after usage. NULL is never returned. </dd></dl>
</div>
</div>
<a class="anchor" id="afd11616dcf572662561829c0f48ca713"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint64_t mrmsg_get_filebytes </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classmrmsg__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 the size of the file. </p>
<p>Returns the size of the file associated with a message, if applicable.</p>
<p>Typically, this is used to show the size of document messages, eg. a PDF.</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>File size in bytes, 0 if not applicable or on errors. </dd></dl>
</div>
</div>
<a class="anchor" id="a1c6dfee4004fe0e9b9f90720bad73ecb"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classmrlot__t.html">mrlot_t</a> * mrmsg_get_mediainfo </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classmrmsg__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>The information is returned by a <a class="el" href="classmrlot__t.html" title="An object containing a set of values. ">mrlot_t</a> object with the following fields:</p>
<ul>
<li>mrlot_t::m_text1: Author of the media. For voice messages, this is the sender. For music messages, the information are read from the filename. NULL if unknown.</li>
<li>mrlot_t::m_text2: Title of the media. For voice messages, this is the date. For music messages, the information are read from the filename. NULL if unknown.</li>
</ul>
<p>Currently, we do not read ID3 and such at this stage, the needed libraries are too complicated and oversized. However, this is no big problem, as the sender usually sets the filename in a way we expect it.</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>Media information as an <a class="el" href="classmrlot__t.html" title="An object containing a set of values. ">mrlot_t</a> object. Must be freed using <a class="el" href="classmrlot__t.html#a813e4d0c2f135e962cc4d5ac0753c592" title="Frees an object containing a set of parameters. ">mrlot_unref()</a>. NULL is never returned. </dd></dl>
</div>
</div>
<a class="anchor" id="adfe10086430b562b8df4e45668b51927"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int mrmsg_get_width </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classmrmsg__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 width of image or video. </p>
<p>The width is returned in pixels. If the width is unknown or if the associated file is no image or video file, 0 is returned.</p>
<p>Often the ascpect ratio is the more interesting thing. You can calculate this using <a class="el" href="classmrmsg__t.html#adfe10086430b562b8df4e45668b51927" title="Get width of image or video. ">mrmsg_get_width()</a> / <a class="el" href="classmrmsg__t.html#a8600ed157b44b1089783e66ce7b33353" title="Get height of image or video. ">mrmsg_get_height()</a>.</p>
<p>See also <a class="el" href="classmrmsg__t.html#aa180c0fd4c9cdd58cc47006022ebc1e0" title="Get duration of audio or video. ">mrmsg_get_duration()</a>.</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>Width in pixels, if applicable. 0 otherwise or if unknown. </dd></dl>
</div>
</div>
<a class="anchor" id="a8600ed157b44b1089783e66ce7b33353"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int mrmsg_get_height </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classmrmsg__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 height of image or video. </p>
<p>The height is returned in pixels. If the height is unknown or if the associated file is no image or video file, 0 is returned.</p>
<p>Often the ascpect ratio is the more interesting thing. You can calculate this using <a class="el" href="classmrmsg__t.html#adfe10086430b562b8df4e45668b51927" title="Get width of image or video. ">mrmsg_get_width()</a> / <a class="el" href="classmrmsg__t.html#a8600ed157b44b1089783e66ce7b33353" title="Get height of image or video. ">mrmsg_get_height()</a>.</p>
<p>See also <a class="el" href="classmrmsg__t.html#aa180c0fd4c9cdd58cc47006022ebc1e0" title="Get duration of audio or video. ">mrmsg_get_duration()</a>.</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>Height in pixels, if applicable. 0 otherwise or if unknown. </dd></dl>
</div>
</div>
<a class="anchor" id="aa180c0fd4c9cdd58cc47006022ebc1e0"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int mrmsg_get_duration </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classmrmsg__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 duration of audio or video. </p>
<p>The duration is returned in milliseconds (ms). If the duration is unknown or if the associated file is no audio or video file, 0 is returned.</p>
<p>See also <a class="el" href="classmrmsg__t.html#adfe10086430b562b8df4e45668b51927" title="Get width of image or video. ">mrmsg_get_width()</a> and <a class="el" href="classmrmsg__t.html#a8600ed157b44b1089783e66ce7b33353" title="Get height of image or video. ">mrmsg_get_height()</a>.</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>Duration in milliseconds, if applicable. 0 otherwise or if unknown. </dd></dl>
</div>
</div>
<a class="anchor" id="a7f1bd3d845bbc5face7636aed8f8afd4"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int mrmsg_get_showpadlock </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classmrmsg__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="a3c14a8dbd6cc7f90c642223a873312e3"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classmrlot__t.html">mrlot_t</a> * mrmsg_get_summary </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classmrmsg__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="classmrchat__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 summary is returned by a <a class="el" href="classmrlot__t.html" title="An object containing a set of values. ">mrlot_t</a> object with the following fields:</p>
<ul>
<li>mrlot_t::m_text1: contains the username or the string "Me". The string may be colored by having a look at m_text1_meaning. If the name should not be displayed, the element is NULL.</li>
<li>mrlot_t::m_text1_meaning: one of MR_TEXT1_USERNAME or MR_TEXT1_SELF. Typically used to show mrlot_t::m_text1 with different colors. 0 if not applicable.</li>
<li>mrlot_t::m_text2: contains an excerpt of the message text.</li>
<li>mrlot_t::m_timestamp: the timestamp of the message.</li>
<li>mrlot_t::m_state: The state of the message as one of the MR_STATE_* constants (see <a class="el" href="classmrmsg__t.html#a1f411e4be17fb5fe408a1aa74cba90a5" title="Get the state of a message. ">mrmsg_get_state()</a>).</li>
</ul>
<p>Typically used to display a search result. See also <a class="el" href="classmrchatlist__t.html#a7bb0e80673ca253c7cb71ae6b9d4fa97" title="Get a summary for a chatlist index. ">mrchatlist_get_summary()</a> to display a list of chats.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">msg</td><td>The message object.</td></tr>
<tr><td class="paramname">chat</td><td>To speed up things, pass an already available chat object here. If the chat object is not yet available, it is faster to pass NULL.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The summary as an <a class="el" href="classmrlot__t.html" title="An object containing a set of values. ">mrlot_t</a> object. Must be freed using <a class="el" href="classmrlot__t.html#a813e4d0c2f135e962cc4d5ac0753c592" title="Frees an object containing a set of parameters. ">mrlot_unref()</a>. NULL is never returned. </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="classmrmsg__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.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">msg</td><td>The message object.</td></tr>
<tr><td class="paramname">approx_characters</td><td>Rough length of the expected string.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A summary for the given messages. The returned string must be free()'d. </dd></dl>
</div>
</div>
<a class="anchor" id="a7714f0f25b2e933dae0898965373b27d"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int mrmsg_is_sent </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classmrmsg__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 message was sent successfully. </p>
<p>Currently, "sent" messages are messages that are in the state "delivered" or "mdn received", see <a class="el" href="classmrmsg__t.html#a1f411e4be17fb5fe408a1aa74cba90a5" title="Get the state of a message. ">mrmsg_get_state()</a>.</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=message sent successfully, 0=message not yet sent or message is an incoming message. </dd></dl>
</div>
</div>
<a class="anchor" id="af202a7e7527df4681cd3ea24f779848f"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int mrmsg_is_starred </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classmrmsg__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 message is starred. </p>
<p>Starred messages are "favorites" marked by the user with a "star" or something like that. Starred messages can typically be shown easily and are not deleted automatically.</p>
<p>To star one or more messages, use <a class="el" href="classmrmailbox__t.html#a8ed1c3bd08cd6515abf6046ebad9cafc" title="Star/unstar messages by setting the last parameter to 0 (unstar) or 1(star). ">mrmailbox_star_msgs()</a>, to get a list of starred messages, use <a class="el" href="classmrmailbox__t.html#af5ac7f527aef58f8e834f3bd740acd46" title="Get all message IDs belonging to a chat. ">mrmailbox_get_chat_msgs()</a> using MR_CHAT_ID_STARRED as the chat_id.</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=message is starred, 0=message not starred. </dd></dl>
</div>
</div>
<a class="anchor" id="a3256ed8c6a55a6c1a30e0fce33b85421"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int mrmsg_is_forwarded </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classmrmsg__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 the message is a forwarded message. </p>
<p>Forwarded messages may not be created by the contact given as "from".</p>
<p>Typically, the UI shows a little text for a symbol above forwarded messages.</p>
<p>For privacy reasons, we do not provide the name or the email address of the original author (in a typical GUI, you select the messages text and click on "forwared"; you won't expect other data to be send to the new recipient, esp. as the new recipient may not be in any relationship to the original author)</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=message is a forwarded message, 0=message not forwarded. </dd></dl>
</div>
</div>
<a class="anchor" id="a752209192e3a022d087fe6c647fb3ad9"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int mrmsg_is_systemcmd </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classmrmsg__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 the message is a system command. </p>
<p>System command messages are messages not "typed" by the user but created due to other actions, eg. <a class="el" href="classmrmailbox__t.html#a8772e9bb55b02299f65ebd8bcc682bb1" title="Set group name. ">mrmailbox_set_chat_name()</a>, <a class="el" href="classmrmailbox__t.html#a08c527170681c949ddd6931a004fdd5f" title="Set group profile image. ">mrmailbox_set_chat_profile_image()</a> or <a class="el" href="classmrmailbox__t.html#a96368620971935c7ac4a0bb324ece2c9" title="Add a member to a group. ">mrmailbox_add_contact_to_chat()</a>.</p>
<p><a class="el" href="classmrmsg__t.html#ae549e58d9ae2f73ad76bd27636b43982" title="Get the text of the message. ">mrmsg_get_text()</a> returns a descriptive text about what is going on.</p>
<p>There is no need to perfrom any action when seeing such a message - this is already done by the core. Typically, this text is displayed in another color or in another font than normal user messages.</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=message is a system command, 0=normal message </dd></dl>
</div>
</div>
<a class="anchor" id="ab669ae58ca580d2694c6df3c95ddb89a"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int mrmsg_is_setupmessage </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classmrmsg__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 the message is an Autocrypt Setup Message. </p>
<p>Setup messages should be shown in an unique way eg. using a different text color. On a click or another action, the user should be prompted for the setup code which is forwarded to <a class="el" href="classmrmailbox__t.html#a13fde8828b56c0fe94227d0b105c5708" title="Continue the Autocrypt Key Transfer on another device. ">mrmailbox_continue_key_transfer()</a> then.</p>
<p>Setup message are typically generated by <a class="el" href="classmrmailbox__t.html#a8662e21a209936e2070f6a59479bfef4" title="Initiate Autocrypt Key Transfer. ">mrmailbox_initiate_key_transfer()</a> on another device.</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=message is a setup message, 0=no setup message. For setup messages, <a class="el" href="classmrmsg__t.html#a752209192e3a022d087fe6c647fb3ad9" title="Check if the message is a system command. ">mrmsg_is_systemcmd()</a> returns 1 and <a class="el" href="classmrmsg__t.html#a705454903b36ded8c3cd43a2044de60a" title="Get the type of the message. ">mrmsg_get_type()</a> returns MR_MSG_FILE. </dd></dl>
</div>
</div>
<a class="anchor" id="a7ef8629603b2462f890dfbbe304c8f7d"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">char * mrmsg_get_setupcodebegin </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classmrmsg__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 the first characters of the setup code. </p>
<p>Typically, this is used to pre-fill the first entry field of the setup code. If the user has several setup messages, he can be sure typing in the correct digits.</p>
<p>To check, if a message is a setup message, use <a class="el" href="classmrmsg__t.html#ab669ae58ca580d2694c6df3c95ddb89a" title="Check if the message is an Autocrypt Setup Message. ">mrmsg_is_setupmessage()</a>. To decrypt a secret key from a setup message, use <a class="el" href="classmrmailbox__t.html#a13fde8828b56c0fe94227d0b105c5708" title="Continue the Autocrypt Key Transfer on another device. ">mrmailbox_continue_key_transfer()</a>.</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>Typically, the first two digits of the setup code or an empty string if unknown. NULL is never returned. Must be free()'d when done. </dd></dl>
</div>
</div>
<a class="anchor" id="a32d23bac4bf35ed5f8c2cfbb93d636f5"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int mrmsg_is_increation </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classmrmsg__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 message is still in creation. </p>
<p>The user can mark files as being in creation by simply creating a file <code>&lt;filename&gt;.increation</code>. If <code>&lt;filename&gt;</code> is created then, the user should just delete <code>&lt;filename&gt;.increation</code>.</p>
<p>Typically, this is used for videos that should be recoded by the user before they can be sent.</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=message is still in creation (<code>&lt;filename&gt;.increation</code> exists), 0=message no longer in creation </dd></dl>
</div>
</div>
<a class="anchor" id="a9e5dc81d4e814284b465ad23abbfb6cb"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void mrmsg_latefiling_mediasize </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classmrmsg__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>width</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>height</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>duration</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Late filing information to a message. </p>
<p>Sometimes, the core cannot find out the width, the height or the duration of an image, an audio or a video.</p>
<p>If, in these cases, the frontend can provide the information, it can save them together with the message object for later usage.</p>
<p>This function should only be used if <a class="el" href="classmrmsg__t.html#adfe10086430b562b8df4e45668b51927" title="Get width of image or video. ">mrmsg_get_width()</a>, <a class="el" href="classmrmsg__t.html#a8600ed157b44b1089783e66ce7b33353" title="Get height of image or video. ">mrmsg_get_height()</a> or <a class="el" href="classmrmsg__t.html#aa180c0fd4c9cdd58cc47006022ebc1e0" title="Get duration of audio or video. ">mrmsg_get_duration()</a> do not provide the expected values.</p>
<p>To get the stored values later, use <a class="el" href="classmrmsg__t.html#adfe10086430b562b8df4e45668b51927" title="Get width of image or video. ">mrmsg_get_width()</a>, <a class="el" href="classmrmsg__t.html#a8600ed157b44b1089783e66ce7b33353" title="Get height of image or video. ">mrmsg_get_height()</a> or <a class="el" href="classmrmsg__t.html#aa180c0fd4c9cdd58cc47006022ebc1e0" title="Get duration of audio or video. ">mrmsg_get_duration()</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">msg</td><td>The message object.</td></tr>
<tr><td class="paramname">width</td><td>The new width to store in the message object. 0 if you do not want to change it.</td></tr>
<tr><td class="paramname">height</td><td>The new height to store in the message object. 0 if you do not want to change it.</td></tr>
<tr><td class="paramname">duration</td><td>The new duration to store in the message object. 0 if you do not want to change it.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None. </dd></dl>
</div>
</div>
<hr/>The documentation for this class 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 &#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>