aboutsummaryrefslogtreecommitdiff
path: root/message.cpp
diff options
context:
space:
mode:
authorlink2xt <link2xt@testrun.org>2021-05-22 15:23:11 +0300
committerlink2xt <link2xt@testrun.org>2021-05-22 15:23:11 +0300
commit166d17e61da080ee7b83317b1a97ec2046960706 (patch)
treee97b48d2f604927116f8490a991efc972c08a41e /message.cpp
parentace0d420686be26ea88cca64406a7b6cf5e10260 (diff)
downloadkdeltachat-166d17e61da080ee7b83317b1a97ec2046960706.tar.gz
kdeltachat-166d17e61da080ee7b83317b1a97ec2046960706.zip
Implement libdeltachat API for HTML view
HTML API: - Context::getMessageHtml() - DcMessage::getSubject() - DcMessage::hasHtml() Also implemented: - DcMessage::getFilemime() - DcMessage::getShowPadlock() - DcMessage::getError()
Diffstat (limited to 'message.cpp')
-rw-r--r--message.cpp39
1 files changed, 39 insertions, 0 deletions
diff --git a/message.cpp b/message.cpp
index ff4bab9..cf29dae 100644
--- a/message.cpp
+++ b/message.cpp
@@ -56,6 +56,15 @@ DcMessage::getText()
}
QString
+DcMessage::getSubject()
+{
+ char *subject = dc_msg_get_subject(m_message);
+ QString result{subject};
+ dc_str_unref(subject);
+ return result;
+}
+
+QString
DcMessage::getFile()
{
char *file = dc_msg_get_file(m_message);
@@ -73,6 +82,15 @@ DcMessage::getFilename()
return result;
}
+QString
+DcMessage::getFilemime()
+{
+ char *filemime = dc_msg_get_filemime(m_message);
+ QString result{filemime};
+ dc_str_unref(filemime);
+ return result;
+}
+
int
DcMessage::getWidth()
{
@@ -85,6 +103,12 @@ DcMessage::getHeight()
return dc_msg_get_height(m_message);
}
+bool
+DcMessage::getShowPadlock()
+{
+ return dc_msg_get_showpadlock(m_message);
+}
+
QString
DcMessage::getOverrideSenderName()
{
@@ -101,6 +125,21 @@ DcMessage::isInfo()
}
QString
+DcMessage::getError()
+{
+ char *error = dc_msg_get_error(m_message);
+ QString result{error};
+ dc_str_unref(error);
+ return result;
+}
+
+bool
+DcMessage::hasHtml()
+{
+ return dc_msg_has_html(m_message);
+}
+
+QString
DcMessage::getQuotedText()
{
char *text = dc_msg_get_quoted_text(m_message);