aboutsummaryrefslogtreecommitdiff
path: root/lot.cpp
diff options
context:
space:
mode:
authorlink2xt <link2xt@testrun.org>2020-09-12 14:10:13 +0300
committerlink2xt <link2xt@testrun.org>2020-10-03 00:20:03 +0300
commitb8762ddb38dd975b0acb217b793594dfed83a824 (patch)
tree23ccefbba703fed6c07acce82ff72e32ba77c9ba /lot.cpp
downloadkdeltachat-b8762ddb38dd975b0acb217b793594dfed83a824.tar.gz
kdeltachat-b8762ddb38dd975b0acb217b793594dfed83a824.zip
Initial commit
Diffstat (limited to 'lot.cpp')
-rw-r--r--lot.cpp58
1 files changed, 58 insertions, 0 deletions
diff --git a/lot.cpp b/lot.cpp
new file mode 100644
index 0000000..d421064
--- /dev/null
+++ b/lot.cpp
@@ -0,0 +1,58 @@
+#include <lot.h>
+
+DcLot::DcLot(QObject *parent)
+ : QObject(parent)
+{
+}
+
+DcLot::DcLot(dc_lot_t *lot)
+ : m_lot{lot}
+{
+}
+
+DcLot::~DcLot()
+{
+ dc_lot_unref(m_lot);
+}
+
+QString
+DcLot::getText1() const
+{
+ char *text1 = dc_lot_get_text1(m_lot);
+ QString result{text1};
+ dc_str_unref(text1);
+ return result;
+}
+
+QString
+DcLot::getText2() const
+{
+ char *text2 = dc_lot_get_text2(m_lot);
+ QString result{text2};
+ dc_str_unref(text2);
+ return result;
+}
+
+int
+DcLot::getText1Meaning() const
+{
+ return dc_lot_get_text1_meaning(m_lot);
+}
+
+int
+DcLot::getState() const
+{
+ return dc_lot_get_state(m_lot);
+}
+
+uint32_t
+DcLot::getId() const
+{
+ return dc_lot_get_id(m_lot);
+}
+
+int64_t
+DcLot::getTimestamp() const
+{
+ return dc_lot_get_timestamp(m_lot);
+}