aboutsummaryrefslogtreecommitdiff
path: root/lot.cpp
blob: d421064f9f4bf450d22042a43ac524fc1b1e239d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
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);
}